From bb4d1c67bc5a4c11561f2db509beaf0a37ec966e Mon Sep 17 00:00:00 2001 From: Sandro Costa Date: Fri, 23 Aug 2024 17:19:43 +0000 Subject: [PATCH] refactor: add environment settings for links and socials * add new footer env vars to allow quick update of links * remove incorrectly commited dist dir --- .gitignore | 3 +- dist/_footer.scss | 50 -- dist/components/Footer.js | 191 ------ dist/components/Footer.js.map | 1 - dist/components/Footer.messages.js | 120 ---- dist/components/Footer.messages.js.map | 1 - dist/components/LanguageSelector.js | 61 -- dist/components/LanguageSelector.js.map | 1 - dist/components/footer-links/FooterLinks.js | 60 -- .../footer-links/FooterLinks.js.map | 1 - dist/components/studio-footer/StudioFooter.js | 104 ---- .../studio-footer/StudioFooter.js.map | 1 - .../studio-footer/StudioFooter.test.jsx | 121 ---- dist/components/studio-footer/index.js | 3 - dist/components/studio-footer/index.js.map | 1 - dist/components/studio-footer/messages.js | 60 -- dist/components/studio-footer/messages.js.map | 1 - dist/data/footerLinks.js | 80 --- dist/data/footerLinks.js.map | 1 - dist/i18n/index.js | 2 - dist/i18n/index.js.map | 1 - dist/i18n/messages/pt_PT.json | 23 - dist/index.js | 6 - dist/index.js.map | 1 - dist/setupTest.js | 22 - src/components/Footer.jsx | 43 +- src/components/Footer.messages.js | 5 + .../__snapshots__/Footer.test.jsx.snap | 561 ------------------ .../{FooterLinks.jsx => FooterNavLinks.jsx} | 25 +- .../footer-links/FooterSocialLinks.jsx | 41 ++ src/data/footerLinks.js | 99 ---- src/i18n/messages/pt_PT.json | 1 + src/utils/parseData.js | 12 + 33 files changed, 76 insertions(+), 1627 deletions(-) delete mode 100644 dist/_footer.scss delete mode 100644 dist/components/Footer.js delete mode 100644 dist/components/Footer.js.map delete mode 100644 dist/components/Footer.messages.js delete mode 100644 dist/components/Footer.messages.js.map delete mode 100644 dist/components/LanguageSelector.js delete mode 100644 dist/components/LanguageSelector.js.map delete mode 100644 dist/components/footer-links/FooterLinks.js delete mode 100644 dist/components/footer-links/FooterLinks.js.map delete mode 100644 dist/components/studio-footer/StudioFooter.js delete mode 100644 dist/components/studio-footer/StudioFooter.js.map delete mode 100644 dist/components/studio-footer/StudioFooter.test.jsx delete mode 100644 dist/components/studio-footer/index.js delete mode 100644 dist/components/studio-footer/index.js.map delete mode 100644 dist/components/studio-footer/messages.js delete mode 100644 dist/components/studio-footer/messages.js.map delete mode 100644 dist/data/footerLinks.js delete mode 100644 dist/data/footerLinks.js.map delete mode 100644 dist/i18n/index.js delete mode 100644 dist/i18n/index.js.map delete mode 100644 dist/i18n/messages/pt_PT.json delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 dist/setupTest.js rename src/components/footer-links/{FooterLinks.jsx => FooterNavLinks.jsx} (73%) create mode 100644 src/components/footer-links/FooterSocialLinks.jsx delete mode 100644 src/data/footerLinks.js create mode 100644 src/utils/parseData.js diff --git a/.gitignore b/.gitignore index da2f397b0..f1a319aee 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ coverage node_modules temp +dist .idea/ @@ -9,4 +10,4 @@ src/i18n/transifex_input.json temp/babel-plugin-react-intl /.vscode module.config.js -src/i18n/messages \ No newline at end of file +src/i18n/messages diff --git a/dist/_footer.scss b/dist/_footer.scss deleted file mode 100644 index 50667223d..000000000 --- a/dist/_footer.scss +++ /dev/null @@ -1,50 +0,0 @@ -$gray-footer: #eee !default; -$logo-color: #4e4e4e !default; - -.footer-navigation { - background-color: $gray-footer; -} - -.footer-copyright { - &__logo { - background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg width='100%25' height='100%25' viewBox='0 0 1479 309' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' xmlns:serif='http://www.serif.com/' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3E%3Cg transform='matrix(1,0,0,1,-4011,-451)'%3E%3Cg id='Artboard3' transform='matrix(1.37114,0,0,0.917279,-1488.81,36.619)'%3E%3Crect x='4011.14' y='451.75' width='1078.65' height='336.336' style='fill:none;'/%3E%3Cg transform='matrix(2.41263,0,0,3.60636,-2939.58,388.811)'%3E%3Cg transform='matrix(0.585513,0,0,0.585513,2835.42,-381.681)'%3E%3Cg transform='matrix(50,0,0,50,475.265,750.862)'%3E%3Cpath d='M0.315,0.009C0.477,0.009 0.577,-0.067 0.577,-0.192C0.577,-0.299 0.508,-0.366 0.378,-0.393L0.283,-0.413C0.209,-0.429 0.164,-0.46 0.164,-0.517C0.164,-0.596 0.224,-0.629 0.314,-0.629C0.422,-0.629 0.472,-0.577 0.476,-0.501L0.565,-0.501C0.564,-0.625 0.466,-0.709 0.316,-0.709C0.161,-0.709 0.073,-0.635 0.073,-0.517C0.073,-0.41 0.138,-0.354 0.259,-0.328L0.361,-0.306C0.437,-0.29 0.486,-0.26 0.486,-0.192C0.486,-0.11 0.426,-0.07 0.315,-0.07C0.205,-0.07 0.144,-0.123 0.139,-0.21L0.05,-0.21C0.054,-0.078 0.145,0.009 0.315,0.009Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,511.335,750.862)'%3E%3Cpath d='M0.1,-0L0.55,-0L0.55,-0.079L0.187,-0.079L0.187,-0.321L0.519,-0.321L0.519,-0.401L0.187,-0.401L0.187,-0.62L0.55,-0.62L0.55,-0.7L0.1,-0.7L0.1,-0Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,546.304,750.862)'%3E%3Cpath d='M0.1,-0L0.183,-0L0.183,-0.564L0.187,-0.564L0.435,-0.12L0.445,-0.12L0.693,-0.561L0.697,-0.561L0.697,-0L0.78,-0L0.78,-0.7L0.679,-0.7L0.443,-0.273L0.439,-0.273L0.203,-0.7L0.1,-0.7L0.1,-0Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,594.773,750.862)'%3E%3Cpath d='M0.1,-0L0.187,-0L0.187,-0.254L0.358,-0.254C0.499,-0.254 0.589,-0.345 0.589,-0.479C0.589,-0.609 0.501,-0.7 0.358,-0.7L0.1,-0.7L0.1,-0ZM0.187,-0.334L0.187,-0.621L0.347,-0.621C0.441,-0.621 0.499,-0.569 0.499,-0.479C0.499,-0.385 0.444,-0.334 0.347,-0.334L0.187,-0.334Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,631.693,750.862)'%3E%3Cpath d='M0.448,-0.288C0.539,-0.314 0.599,-0.386 0.599,-0.49C0.599,-0.609 0.52,-0.7 0.377,-0.7L0.1,-0.7L0.1,-0L0.187,-0L0.187,-0.277L0.357,-0.277L0.541,-0L0.636,-0L0.636,-0.01L0.448,-0.288ZM0.187,-0.62L0.372,-0.62C0.46,-0.62 0.508,-0.571 0.508,-0.489C0.508,-0.405 0.46,-0.357 0.372,-0.357L0.187,-0.357L0.187,-0.62Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,669.662,750.862)'%3E%3Cpath d='M0.1,-0L0.55,-0L0.55,-0.079L0.187,-0.079L0.187,-0.321L0.519,-0.321L0.519,-0.401L0.187,-0.401L0.187,-0.62L0.55,-0.62L0.55,-0.7L0.1,-0.7L0.1,-0Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,475.265,806.07)'%3E%3Cpath d='M0.394,-0.7L0.287,-0.7L0.03,-0.01L0.03,-0L0.121,-0L0.187,-0.183L0.493,-0.183L0.559,-0L0.652,-0L0.652,-0.01L0.394,-0.7ZM0.215,-0.261L0.338,-0.603L0.342,-0.603L0.465,-0.261L0.215,-0.261Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,528.835,806.07)'%3E%3Cpath d='M0.394,-0.7L0.287,-0.7L0.03,-0.01L0.03,-0L0.121,-0L0.187,-0.183L0.493,-0.183L0.559,-0L0.652,-0L0.652,-0.01L0.394,-0.7ZM0.215,-0.261L0.338,-0.603L0.342,-0.603L0.465,-0.261L0.215,-0.261Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,567.404,806.07)'%3E%3Cpath d='M0.1,-0L0.187,-0L0.187,-0.254L0.358,-0.254C0.499,-0.254 0.589,-0.345 0.589,-0.479C0.589,-0.609 0.501,-0.7 0.358,-0.7L0.1,-0.7L0.1,-0ZM0.187,-0.334L0.187,-0.621L0.347,-0.621C0.441,-0.621 0.499,-0.569 0.499,-0.479C0.499,-0.385 0.444,-0.334 0.347,-0.334L0.187,-0.334Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,604.323,806.07)'%3E%3Cpath d='M0.448,-0.288C0.539,-0.314 0.599,-0.386 0.599,-0.49C0.599,-0.609 0.52,-0.7 0.377,-0.7L0.1,-0.7L0.1,-0L0.187,-0L0.187,-0.277L0.357,-0.277L0.541,-0L0.636,-0L0.636,-0.01L0.448,-0.288ZM0.187,-0.62L0.372,-0.62C0.46,-0.62 0.508,-0.571 0.508,-0.489C0.508,-0.405 0.46,-0.357 0.372,-0.357L0.187,-0.357L0.187,-0.62Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,642.293,806.07)'%3E%3Cpath d='M0.1,-0L0.55,-0L0.55,-0.079L0.187,-0.079L0.187,-0.321L0.519,-0.321L0.519,-0.401L0.187,-0.401L0.187,-0.62L0.55,-0.62L0.55,-0.7L0.1,-0.7L0.1,-0Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,677.262,806.07)'%3E%3Cpath d='M0.1,-0L0.185,-0L0.185,-0.554L0.189,-0.554L0.547,-0L0.643,-0L0.643,-0.7L0.557,-0.7L0.557,-0.143L0.553,-0.143L0.195,-0.7L0.1,-0.7L0.1,-0Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,718.882,806.07)'%3E%3Cpath d='M0.1,-0L0.332,-0C0.541,-0 0.644,-0.155 0.644,-0.35C0.644,-0.56 0.531,-0.7 0.332,-0.7L0.1,-0.7L0.1,-0ZM0.187,-0.079L0.187,-0.62L0.323,-0.62C0.484,-0.62 0.554,-0.495 0.554,-0.35C0.554,-0.204 0.484,-0.079 0.323,-0.079L0.187,-0.079Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,758.551,806.07)'%3E%3Cpath d='M0.1,-0L0.55,-0L0.55,-0.079L0.187,-0.079L0.187,-0.321L0.519,-0.321L0.519,-0.401L0.187,-0.401L0.187,-0.62L0.55,-0.62L0.55,-0.7L0.1,-0.7L0.1,-0Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3Cg transform='matrix(50,0,0,50,793.52,806.07)'%3E%3Cpath d='M0.448,-0.288C0.539,-0.314 0.599,-0.386 0.599,-0.49C0.599,-0.609 0.52,-0.7 0.377,-0.7L0.1,-0.7L0.1,-0L0.187,-0L0.187,-0.277L0.357,-0.277L0.541,-0L0.636,-0L0.636,-0.01L0.448,-0.288ZM0.187,-0.62L0.372,-0.62C0.46,-0.62 0.508,-0.571 0.508,-0.489C0.508,-0.405 0.46,-0.357 0.372,-0.357L0.187,-0.357L0.187,-0.62Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3C/g%3E%3Cg transform='matrix(1.04521,0,0,1.04521,2811.99,-89.5631)'%3E%3Cpath d='M184.924,172.141C179.682,176.013 173.205,178.308 166.188,178.308C162.853,178.308 159.638,177.791 156.62,176.832C148.211,174.162 142.619,166.188 142.62,157.365L142.623,132.031L142.621,132.03C142.621,124.914 138.76,119.692 135.027,118.888L135.027,115.043L145.272,115.043C150.437,115.043 155.036,117.456 158.011,121.213C163.253,117.339 169.732,115.043 176.75,115.043C180.085,115.043 183.3,115.56 186.318,116.519C194.727,119.189 200.318,127.163 200.318,135.986L200.315,161.321L200.316,161.322C200.316,168.437 204.179,173.659 207.911,174.463L207.911,178.308L197.666,178.308C192.501,178.308 187.9,175.898 184.924,172.141ZM214.946,162.265C214.946,171.041 222.027,178.155 230.803,178.155L230.983,178.155C236.997,178.155 243.045,175.516 247.541,171.76L247.541,176.749L271.335,176.749L271.335,172.904L270.433,172.904C267.993,172.904 266.014,170.925 266.014,168.485L266.014,124.637C266.014,122.197 267.993,120.218 270.433,120.218L271.335,120.218L271.335,116.373L247.541,116.378L247.541,159.883C247.541,166.305 233.521,169.708 233.521,159.299L233.521,131.033C233.521,122.201 226.362,115.043 217.531,115.043L207.481,115.043L207.481,118.827C211.155,119.619 214.956,124.758 214.956,131.762L214.957,131.762L214.946,162.265ZM128.57,130.934L128.558,161.436L128.56,161.437C128.56,168.44 132.361,173.579 136.034,174.371L136.034,178.155L125.984,178.155C117.153,178.155 109.994,170.996 109.994,162.166L109.994,133.9C109.994,123.49 95.975,126.894 95.975,133.315L95.975,176.745L72.18,176.749L72.18,172.903L73.082,172.903C75.522,172.903 77.501,170.925 77.501,168.484L77.501,124.637C77.501,122.197 75.522,120.218 73.082,120.218L72.18,120.218L72.18,116.373L95.975,116.373L95.975,121.438C100.47,117.682 106.518,115.043 112.533,115.043L112.712,115.043C121.488,115.043 128.57,122.157 128.57,130.934ZM159.239,122.991L159.249,123.009C159.413,123.284 159.566,123.565 159.714,123.85C159.744,123.91 159.775,123.969 159.805,124.029C159.953,124.323 160.094,124.622 160.224,124.926C161.057,126.881 161.518,129.031 161.518,131.289L161.518,153.5L161.522,153.499C161.522,162.873 169.122,168.946 178.496,168.946C179.951,168.946 181.362,168.761 182.709,168.416C181.879,166.464 181.42,164.317 181.42,162.062L181.42,139.851L181.416,139.853C181.416,130.478 173.816,124.406 164.442,124.406C162.987,124.406 161.576,124.591 160.228,124.936C159.942,124.262 159.61,123.613 159.239,122.991Z' style='fill:rgb(78,78,78);fill-rule:nonzero;'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: top left; - padding-left: 140px; - color: $logo-color; - } - - span { - font-size: 0.7rem; - display: block; - line-height: 1.1; - } -} - -.footer-links-navigation { - flex-basis: 260px; - min-width: 200px; - font-size: 0.9rem; - - span { - font-weight: 600; - } - - ul { - list-style: none; - padding: 0; - margin: 0; - - a { - color: black; - } - } -} - -.footer-social { - flex-basis: 50px; - - &__badge { - margin-right: 1.5rem; - } -} \ No newline at end of file diff --git a/dist/components/Footer.js b/dist/components/Footer.js deleted file mode 100644 index b5e0b4edb..000000000 --- a/dist/components/Footer.js +++ /dev/null @@ -1,191 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } -import React from 'react'; -import PropTypes from 'prop-types'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; -import { sendTrackEvent } from '@edx/frontend-platform/analytics'; -import { ensureConfig, getConfig } from '@edx/frontend-platform'; -import { AppContext } from '@edx/frontend-platform/react'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faFacebookF, faLinkedinIn } from '@fortawesome/free-brands-svg-icons'; -import { faEnvelope } from '@fortawesome/free-regular-svg-icons'; -import messages from './Footer.messages'; -import LanguageSelector from './LanguageSelector'; -import { links, social } from '../data/footerLinks'; -import FooterLinks from './footer-links/FooterLinks'; -ensureConfig(['LMS_BASE_URL', 'LOGO_TRADEMARK_URL'], 'Footer component'); -var EVENT_NAMES = { - FOOTER_LINK: 'edx.bi.footer.link' -}; -var FooterSocial = function FooterSocial(_ref) { - var intl = _ref.intl; - return /*#__PURE__*/React.createElement("div", { - className: "footer-social d-flex mt-2" - }, /*#__PURE__*/React.createElement("a", { - className: "footer-social__badge", - href: social === null || social === void 0 ? void 0 : social.newsletter, - target: "_blank", - rel: "noopener noreferrer", - title: intl.formatMessage(messages['footer.nau.social.newsletter']) - }, /*#__PURE__*/React.createElement(FontAwesomeIcon, { - icon: faEnvelope - })), /*#__PURE__*/React.createElement("a", { - className: "footer-social__badge", - href: social === null || social === void 0 ? void 0 : social.facebook, - target: "_blank", - rel: "noopener noreferrer", - title: intl.formatMessage(messages['footer.nau.social.facebook']) - }, /*#__PURE__*/React.createElement(FontAwesomeIcon, { - icon: faFacebookF - })), /*#__PURE__*/React.createElement("a", { - className: "footer-social__badge", - href: social === null || social === void 0 ? void 0 : social.linkedin, - target: "_blank", - rel: "noopener noreferrer", - title: intl.formatMessage(messages['footer.nau.social.linkedin']) - }, /*#__PURE__*/React.createElement(FontAwesomeIcon, { - icon: faLinkedinIn - }))); -}; -FooterSocial.propTypes = { - intl: intlShape.isRequired -}; -var AdditionalLogosSection = function AdditionalLogosSection() { - var FOOTER_LOGOS = getConfig().FOOTER_ADDITIONAL_LOGOS || process.env.FOOTER_ADDITIONAL_LOGOS; - var parseFooterLogos = function parseFooterLogos() { - try { - if (Array.isArray(FOOTER_LOGOS)) { - return FOOTER_LOGOS; - } - return JSON.parse(FOOTER_LOGOS); - } catch (e) { - return null; - } - }; - var logos = parseFooterLogos(); - if (!logos) { - return null; - } - return /*#__PURE__*/React.createElement("section", { - className: "footer-additional-logos" - }, /*#__PURE__*/React.createElement("div", { - className: "d-md-flex justify-content-between px-4" - }, logos.map(function (logo) { - return /*#__PURE__*/React.createElement("div", { - className: "py-3" - }, /*#__PURE__*/React.createElement("a", { - href: logo.url, - target: "_blank", - rel: "noopener noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: logo.src, - alt: logo.alt, - style: { - maxHeight: '45px', - maxWidth: '280px' - } - }))); - }))); -}; -var FooterCopyrightSection = function FooterCopyrightSection(_ref2) { - var intl = _ref2.intl; - return /*#__PURE__*/React.createElement("section", { - className: "footer-copyright py-3 px-4" - }, /*#__PURE__*/React.createElement("div", { - className: "footer-copyright__logo" - }, /*#__PURE__*/React.createElement("span", null, "\xA9 ", new Date().getFullYear(), " - FCT|FCCN", /*#__PURE__*/React.createElement("br", null), intl.formatMessage(messages['footer.copyright.message'])))); -}; -FooterCopyrightSection.propTypes = { - intl: intlShape.isRequired -}; -var SiteFooter = /*#__PURE__*/function (_React$Component) { - _inherits(SiteFooter, _React$Component); - var _super = _createSuper(SiteFooter); - function SiteFooter(props) { - var _this; - _classCallCheck(this, SiteFooter); - _this = _super.call(this, props); - _this.externalLinkClickHandler = _this.externalLinkClickHandler.bind(_assertThisInitialized(_this)); - return _this; - } - _createClass(SiteFooter, [{ - key: "externalLinkClickHandler", - value: function externalLinkClickHandler(event) { - var label = event.currentTarget.getAttribute('href'); - var eventName = EVENT_NAMES.FOOTER_LINK; - var properties = { - category: 'outbound_link', - label: label - }; - sendTrackEvent(eventName, properties); - } - }, { - key: "render", - value: function render() { - var _this$props = this.props, - supportedLanguages = _this$props.supportedLanguages, - onLanguageSelected = _this$props.onLanguageSelected, - logo = _this$props.logo, - intl = _this$props.intl; - var showLanguageSelector = supportedLanguages.length > 0 && onLanguageSelected; - var config = this.context.config; - return /*#__PURE__*/React.createElement("footer", { - role: "contentinfo" - }, /*#__PURE__*/React.createElement("section", { - className: "footer-navigation container-fluid d-md-flex justify-content-between py-3 px-4" - }, /*#__PURE__*/React.createElement("div", { - className: "footer-navigation__brand d-flex flex-column justify-content-between" - }, /*#__PURE__*/React.createElement("a", { - className: "d-block", - href: config.LMS_BASE_URL, - "aria-label": intl.formatMessage(messages['footer.logo.ariaLabel']) - }, /*#__PURE__*/React.createElement("img", { - style: { - maxHeight: 45 - }, - src: logo || config.LOGO_TRADEMARK_URL, - alt: intl.formatMessage(messages['footer.logo.altText']) - })), /*#__PURE__*/React.createElement(FooterSocial, { - intl: intl - })), /*#__PURE__*/React.createElement(FooterLinks, { - links: links, - intl: intl - }), showLanguageSelector && /*#__PURE__*/React.createElement(LanguageSelector, { - options: supportedLanguages, - onSubmit: onLanguageSelected - })), /*#__PURE__*/React.createElement(AdditionalLogosSection, null), /*#__PURE__*/React.createElement(FooterCopyrightSection, { - intl: intl - })); - } - }]); - return SiteFooter; -}(React.Component); -SiteFooter.contextType = AppContext; -SiteFooter.propTypes = { - intl: intlShape.isRequired, - logo: PropTypes.string, - onLanguageSelected: PropTypes.func, - supportedLanguages: PropTypes.arrayOf(PropTypes.shape({ - label: PropTypes.string.isRequired, - value: PropTypes.string.isRequired - })) -}; -SiteFooter.defaultProps = { - logo: undefined, - onLanguageSelected: undefined, - supportedLanguages: [] -}; -export default injectIntl(SiteFooter); -export { EVENT_NAMES }; -//# sourceMappingURL=Footer.js.map \ No newline at end of file diff --git a/dist/components/Footer.js.map b/dist/components/Footer.js.map deleted file mode 100644 index 38e1b5d66..000000000 --- a/dist/components/Footer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Footer.js","names":["React","PropTypes","injectIntl","intlShape","sendTrackEvent","ensureConfig","getConfig","AppContext","FontAwesomeIcon","faFacebookF","faLinkedinIn","faEnvelope","messages","LanguageSelector","links","social","FooterLinks","EVENT_NAMES","FOOTER_LINK","FooterSocial","_ref","intl","createElement","className","href","newsletter","target","rel","title","formatMessage","icon","facebook","linkedin","propTypes","isRequired","AdditionalLogosSection","FOOTER_LOGOS","FOOTER_ADDITIONAL_LOGOS","process","env","parseFooterLogos","Array","isArray","JSON","parse","e","logos","map","logo","url","src","alt","style","maxHeight","maxWidth","FooterCopyrightSection","_ref2","Date","getFullYear","SiteFooter","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","externalLinkClickHandler","bind","_assertThisInitialized","_createClass","key","value","event","label","currentTarget","getAttribute","eventName","properties","category","render","_this$props","supportedLanguages","onLanguageSelected","showLanguageSelector","length","config","context","role","LMS_BASE_URL","LOGO_TRADEMARK_URL","options","onSubmit","Component","contextType","string","func","arrayOf","shape","defaultProps","undefined"],"sources":["../../src/components/Footer.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, intlShape } from '@edx/frontend-platform/i18n';\nimport { sendTrackEvent } from '@edx/frontend-platform/analytics';\nimport { ensureConfig, getConfig } from '@edx/frontend-platform';\nimport { AppContext } from '@edx/frontend-platform/react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faFacebookF, faLinkedinIn } from '@fortawesome/free-brands-svg-icons';\nimport { faEnvelope } from '@fortawesome/free-regular-svg-icons';\n\nimport messages from './Footer.messages';\nimport LanguageSelector from './LanguageSelector';\nimport { links, social } from '../data/footerLinks';\nimport FooterLinks from './footer-links/FooterLinks';\n\nensureConfig([\n 'LMS_BASE_URL',\n 'LOGO_TRADEMARK_URL',\n], 'Footer component');\n\nconst EVENT_NAMES = {\n FOOTER_LINK: 'edx.bi.footer.link',\n};\n\nconst FooterSocial = ({ intl }) => (\n
\n \n \n \n \n \n \n \n \n \n
\n);\n\nFooterSocial.propTypes = {\n intl: intlShape.isRequired,\n};\n\nconst AdditionalLogosSection = () => {\n const FOOTER_LOGOS = getConfig().FOOTER_ADDITIONAL_LOGOS || process.env.FOOTER_ADDITIONAL_LOGOS;\n const parseFooterLogos = () => {\n try {\n if (Array.isArray(FOOTER_LOGOS)) {\n return FOOTER_LOGOS;\n }\n return JSON.parse(FOOTER_LOGOS);\n } catch (e) {\n return null;\n }\n };\n\n const logos = parseFooterLogos();\n\n if (!logos) { return null; }\n\n return (\n
\n
\n {logos.map((logo) => (\n
\n \n {logo.alt}\n \n
\n ))}\n
\n
\n );\n};\n\nconst FooterCopyrightSection = ({ intl }) => (\n
\n
\n © {new Date().getFullYear()} - FCT|FCCN\n
\n {intl.formatMessage(messages['footer.copyright.message'])}\n
\n
\n
\n);\n\nFooterCopyrightSection.propTypes = {\n intl: intlShape.isRequired,\n};\n\nclass SiteFooter extends React.Component {\n constructor(props) {\n super(props);\n this.externalLinkClickHandler = this.externalLinkClickHandler.bind(this);\n }\n\n externalLinkClickHandler(event) {\n const label = event.currentTarget.getAttribute('href');\n const eventName = EVENT_NAMES.FOOTER_LINK;\n const properties = {\n category: 'outbound_link',\n label,\n };\n sendTrackEvent(eventName, properties);\n }\n\n render() {\n const {\n supportedLanguages,\n onLanguageSelected,\n logo,\n intl,\n } = this.props;\n const showLanguageSelector = supportedLanguages.length > 0 && onLanguageSelected;\n const { config } = this.context;\n\n return (\n \n
\n
\n \n \n \n \n
\n \n\n {showLanguageSelector && (\n \n )}\n
\n \n \n \n );\n }\n}\n\nSiteFooter.contextType = AppContext;\n\nSiteFooter.propTypes = {\n intl: intlShape.isRequired,\n logo: PropTypes.string,\n onLanguageSelected: PropTypes.func,\n supportedLanguages: PropTypes.arrayOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n })),\n};\n\nSiteFooter.defaultProps = {\n logo: undefined,\n onLanguageSelected: undefined,\n supportedLanguages: [],\n};\n\nexport default injectIntl(SiteFooter);\nexport { EVENT_NAMES };\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAK,M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C,KAAK,EAAExE,SAAS,CAAC+F,MAAM,CAAC9D;EAC1B,CAAC,CAAC;AACJ,CAAC;AAEDyB,UAAU,CAACyC,YAAY,GAAG;EACxBpD,IAAI,EAAEqD,SAAS;EACfjB,kBAAkB,EAAEiB,SAAS;EAC7BlB,kBAAkB,EAAE;AACtB,CAAC;AAED,eAAejF,UAAU,CAACyD,UAAU,CAAC;AACrC,SAAS1C,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/dist/components/Footer.messages.js b/dist/components/Footer.messages.js deleted file mode 100644 index 8f30b9218..000000000 --- a/dist/components/Footer.messages.js +++ /dev/null @@ -1,120 +0,0 @@ -import { defineMessages } from '@edx/frontend-platform/i18n'; -var messages = defineMessages({ - 'footer.languageForm.select.label': { - id: 'footer.languageForm.select.label', - defaultMessage: 'Choose Language', - description: 'The label for the laguage select part of the language selection form.' - }, - 'footer.languageForm.submit.label': { - id: 'footer.languageForm.submit.label', - defaultMessage: 'Apply', - description: 'The label for button to submit the language selection form.' - }, - 'footer.logo.altText': { - id: 'footer.logo.altText', - defaultMessage: 'Powered by Open edX', - description: 'alt text for the footer logo.' - }, - 'footer.logo.ariaLabel': { - id: 'footer.logo.ariaLabel', - defaultMessage: 'edX Home', - description: 'aria-label for the footer logo.' - }, - 'footer.ariaLabel': { - id: 'footer.ariaLabel', - defaultMessage: 'Page Footer', - description: 'aria-label for the footer component' - }, - 'footer.copyright.message': { - id: 'footer.copyright.message', - defaultMessage: 'All rights reserved', - description: 'Message to display on the copyright section of the footer' - }, - 'footer.nau.title': { - id: 'footer.nau.title', - defaultMessage: 'NAU', - description: 'The label for the nau section of the footer.' - }, - 'footer.nau.about': { - id: 'footer.nau.about', - defaultMessage: 'About', - description: 'The label for the link to the nau about page.' - }, - 'footer.nau.courses': { - id: 'footer.nau.courses', - defaultMessage: 'Courses', - description: 'The label for the link to the nau courses page.' - }, - 'footer.nau.partner': { - id: 'footer.nau.partner', - defaultMessage: 'How to become a partner', - description: 'The label for the link to the nau partner page.' - }, - 'footer.nau.communication': { - id: 'footer.nau.communication', - defaultMessage: 'Communication', - description: 'The label for the communication section of the nau footer.' - }, - 'footer.nau.help': { - id: 'footer.nau.help', - defaultMessage: 'Help', - description: 'The label for the link to the nau help page.' - }, - 'footer.nau.news': { - id: 'footer.nau.news', - defaultMessage: 'News', - description: 'The label for the link to the nau news page.' - }, - 'footer.nau.legal': { - id: 'footer.nau.legal', - defaultMessage: 'Legal', - description: 'The label for the legal section of the nau footer.' - }, - 'footer.nau.mediakit': { - id: 'footer.nau.mediakit', - defaultMessage: 'Media Kit', - description: 'The label for the link to the nau media kit page.' - }, - 'footer.nau.termsconditions': { - id: 'footer.nau.termsconditions', - defaultMessage: 'Terms and Conditions', - description: 'The label for the link to the nau terms and conditions page.' - }, - 'footer.nau.privacypolicy': { - id: 'footer.nau.privacypolicy', - defaultMessage: 'Privacy Policy', - description: 'The label for the link to the nau privacy policy page.' - }, - 'footer.nau.cookies': { - id: 'footer.nau.cookies', - defaultMessage: 'Cookies Policy', - description: 'The label for the link to the nau cookies policy page.' - }, - 'footer.nau.certification': { - id: 'footer.nau.certification', - defaultMessage: 'Certification Policy', - description: 'The label for the link to the nau certification policy page.' - }, - 'footer.nau.codeofhonor': { - id: 'footer.nau.codeofhonor', - defaultMessage: 'Code of Honor', - description: 'The label for the link to the nau code of honor page.' - }, - 'footer.nau.social.facebook': { - id: 'footer.nau.social.facebook', - defaultMessage: 'Follow us on Facebook', - description: 'The label for the link to the nau facebook page.' - }, - 'footer.nau.social.linkedin': { - id: 'footer.nau.social.linkedin', - defaultMessage: 'Follow us on LinkedIn', - description: 'The label for the link to the nau linkedin page.' - }, - 'footer.nau.social.newsletter': { - id: 'footer.nau.social.newsletter', - defaultMessage: 'Subscribe to our newsletter', - description: 'The label for the link to the nau newsletter page.' - } -}); -export default messages; -//# sourceMappingURL=Footer.messages.js.map \ No newline at end of file diff --git a/dist/components/Footer.messages.js.map b/dist/components/Footer.messages.js.map deleted file mode 100644 index 239afc01e..000000000 --- a/dist/components/Footer.messages.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Footer.messages.js","names":["defineMessages","messages","id","defaultMessage","description"],"sources":["../../src/components/Footer.messages.js"],"sourcesContent":["import { defineMessages } from '@edx/frontend-platform/i18n';\n\nconst messages = defineMessages({\n 'footer.languageForm.select.label': {\n id: 'footer.languageForm.select.label',\n defaultMessage: 'Choose Language',\n description: 'The label for the laguage select part of the language selection form.',\n },\n 'footer.languageForm.submit.label': {\n id: 'footer.languageForm.submit.label',\n defaultMessage: 'Apply',\n description: 'The label for button to submit the language selection form.',\n },\n 'footer.logo.altText': {\n id: 'footer.logo.altText',\n defaultMessage: 'Powered by Open edX',\n description: 'alt text for the footer logo.',\n },\n 'footer.logo.ariaLabel': {\n id: 'footer.logo.ariaLabel',\n defaultMessage: 'edX Home',\n description: 'aria-label for the footer logo.',\n },\n 'footer.ariaLabel': {\n id: 'footer.ariaLabel',\n defaultMessage: 'Page Footer',\n description: 'aria-label for the footer component',\n },\n 'footer.copyright.message': {\n id: 'footer.copyright.message',\n defaultMessage: 'All rights reserved',\n description: 'Message to display on the copyright section of the footer',\n },\n 'footer.nau.title': {\n id: 'footer.nau.title',\n defaultMessage: 'NAU',\n description: 'The label for the nau section of the footer.',\n },\n 'footer.nau.about': {\n id: 'footer.nau.about',\n defaultMessage: 'About',\n description: 'The label for the link to the nau about page.',\n },\n 'footer.nau.courses': {\n id: 'footer.nau.courses',\n defaultMessage: 'Courses',\n description: 'The label for the link to the nau courses page.',\n },\n 'footer.nau.partner': {\n id: 'footer.nau.partner',\n defaultMessage: 'How to become a partner',\n description: 'The label for the link to the nau partner page.',\n },\n 'footer.nau.communication': {\n id: 'footer.nau.communication',\n defaultMessage: 'Communication',\n description: 'The label for the communication section of the nau footer.',\n },\n 'footer.nau.help': {\n id: 'footer.nau.help',\n defaultMessage: 'Help',\n description: 'The label for the link to the nau help page.',\n },\n 'footer.nau.news': {\n id: 'footer.nau.news',\n defaultMessage: 'News',\n description: 'The label for the link to the nau news page.',\n },\n 'footer.nau.legal': {\n id: 'footer.nau.legal',\n defaultMessage: 'Legal',\n description: 'The label for the legal section of the nau footer.',\n },\n 'footer.nau.mediakit': {\n id: 'footer.nau.mediakit',\n defaultMessage: 'Media Kit',\n description: 'The label for the link to the nau media kit page.',\n },\n 'footer.nau.termsconditions': {\n id: 'footer.nau.termsconditions',\n defaultMessage: 'Terms and Conditions',\n description: 'The label for the link to the nau terms and conditions page.',\n },\n 'footer.nau.privacypolicy': {\n id: 'footer.nau.privacypolicy',\n defaultMessage: 'Privacy Policy',\n description: 'The label for the link to the nau privacy policy page.',\n },\n 'footer.nau.cookies': {\n id: 'footer.nau.cookies',\n defaultMessage: 'Cookies Policy',\n description: 'The label for the link to the nau cookies policy page.',\n },\n 'footer.nau.certification': {\n id: 'footer.nau.certification',\n defaultMessage: 'Certification Policy',\n description: 'The label for the link to the nau certification policy page.',\n },\n 'footer.nau.codeofhonor': {\n id: 'footer.nau.codeofhonor',\n defaultMessage: 'Code of Honor',\n description: 'The label for the link to the nau code of honor page.',\n },\n 'footer.nau.social.facebook': {\n id: 'footer.nau.social.facebook',\n defaultMessage: 'Follow us on Facebook',\n description: 'The label for the link to the nau facebook page.',\n },\n 'footer.nau.social.linkedin': {\n id: 'footer.nau.social.linkedin',\n defaultMessage: 'Follow us on LinkedIn',\n description: 'The label for the link to the nau linkedin page.',\n },\n 'footer.nau.social.newsletter': {\n id: 'footer.nau.social.newsletter',\n defaultMessage: 'Subscribe to our newsletter',\n description: 'The label for the link to the nau newsletter page.',\n },\n});\n\nexport default messages;\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,6BAA6B;AAE5D,IAAMC,QAAQ,GAAGD,cAAc,CAAC;EAC9B,kCAAkC,EAAE;IAClCE,EAAE,EAAE,kCAAkC;IACtCC,cAAc,EAAE,iBAAiB;IACjCC,WAAW,EAAE;EACf,CAAC;EACD,kCAAkC,EAAE;IAClCF,EAAE,EAAE,kCAAkC;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AE,kBAAkB;IACtBC,cAAc,EAAE,OAAO;IACvBC,WAAW,EAAE;EACf,CAAC;EACD,qBAAqB,EAAE;IACrBF,EAAE,EAAE,qBAAqB;IACzBC,cAAc,EAAE,WAAW;IAC3BC,WAAW,EAAE;EACf,CAAC;EACD,4BAA4B,EAAE;IAC5BF,EAAE,EAAE,4BAA4B;IAChCC,cAAc,EAAE,sBAAsB;IACtCC,WAAW,EAAE;EACf,CAAC;EACD,0BAA0B,EAAE;IAC1BF,EAAE,EAAE,0BAA0B;IAC9BC,cAAc,EAAE,gBAAgB;IAChCC,WAAW,EAAE;EACf,CAAC;EACD,oBAAoB,EAAE;IACpBF,EAAE,EAAE,oBAAoB;IACxBC,cAAc,EAAE,gBAAgB;IAChCC,WAAW,EAAE;EACf,CAAC;EACD,0BAA0B,EAAE;IAC1BF,EAAE,EAAE,0BAA0B;IAC9BC,cAAc,EAAE,sBAAsB;IACtCC,WAAW,EAAE;EACf,CAAC;EACD,wBAAwB,EAAE;IACxBF,EAAE,EAAE,wBAAwB;IAC5BC,cAAc,EAAE,eAAe;IAC/BC,WAAW,EAAE;EACf,CAAC;EACD,4BAA4B,EAAE;IAC5BF,EAAE,EAAE,4BAA4B;IAChCC,cAAc,EAAE,uBAAuB;IACvCC,WAAW,EAAE;EACf,CAAC;EACD,4BAA4B,EAAE;IAC5BF,EAAE,EAAE,4BAA4B;IAChCC,cAAc,EAAE,uBAAuB;IACvCC,WAAW,EAAE;EACf,CAAC;EACD,8BAA8B,EAAE;IAC9BF,EAAE,EAAE,8BAA8B;IAClCC,cAAc,EAAE,6BAA6B;IAC7CC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAEF,eAAeH,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/dist/components/LanguageSelector.js b/dist/components/LanguageSelector.js deleted file mode 100644 index 85a14c91c..000000000 --- a/dist/components/LanguageSelector.js +++ /dev/null @@ -1,61 +0,0 @@ -var _excluded = ["intl", "options", "onSubmit"]; -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } -function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } -import React from 'react'; -import PropTypes from 'prop-types'; -import { injectIntl, intlShape, FormattedMessage } from '@edx/frontend-platform/i18n'; -var LanguageSelector = function LanguageSelector(_ref) { - var intl = _ref.intl, - options = _ref.options, - onSubmit = _ref.onSubmit, - props = _objectWithoutProperties(_ref, _excluded); - var handleSubmit = function handleSubmit(e) { - e.preventDefault(); - var languageCode = e.target.elements['site-footer-language-select'].value; - onSubmit(languageCode); - }; - return /*#__PURE__*/React.createElement("form", _extends({ - className: "form-inline", - onSubmit: handleSubmit - }, props), /*#__PURE__*/React.createElement("div", { - className: "form-group" - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "site-footer-language-select", - className: "d-inline-block m-0" - }, /*#__PURE__*/React.createElement(FormattedMessage, { - id: "footer.languageForm.select.label", - defaultMessage: "Choose Language", - description: "The label for the laguage select part of the language selection form." - })), /*#__PURE__*/React.createElement("select", { - id: "site-footer-language-select", - className: "form-control-sm mx-2", - name: "site-footer-language-select", - defaultValue: intl.locale - }, options.map(function (_ref2) { - var value = _ref2.value, - label = _ref2.label; - return /*#__PURE__*/React.createElement("option", { - key: value, - value: value - }, label); - })), /*#__PURE__*/React.createElement("button", { - "data-testid": "site-footer-submit-btn", - className: "btn btn-outline-primary btn-sm", - type: "submit" - }, /*#__PURE__*/React.createElement(FormattedMessage, { - id: "footer.languageForm.submit.label", - defaultMessage: "Apply", - description: "The label for button to submit the language selection form." - })))); -}; -LanguageSelector.propTypes = { - intl: intlShape.isRequired, - onSubmit: PropTypes.func.isRequired, - options: PropTypes.arrayOf(PropTypes.shape({ - value: PropTypes.string, - label: PropTypes.string - })).isRequired -}; -export default injectIntl(LanguageSelector); -//# sourceMappingURL=LanguageSelector.js.map \ No newline at end of file diff --git a/dist/components/LanguageSelector.js.map b/dist/components/LanguageSelector.js.map deleted file mode 100644 index 9e72f0aeb..000000000 --- a/dist/components/LanguageSelector.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LanguageSelector.js","names":["React","PropTypes","injectIntl","intlShape","FormattedMessage","LanguageSelector","_ref","intl","options","onSubmit","props","_objectWithoutProperties","_excluded","handleSubmit","e","preventDefault","languageCode","target","elements","value","createElement","_extends","className","htmlFor","id","defaultMessage","description","name","defaultValue","locale","map","_ref2","label","key","type","propTypes","isRequired","func","arrayOf","shape","string"],"sources":["../../src/components/LanguageSelector.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, intlShape, FormattedMessage } from '@edx/frontend-platform/i18n';\n\nconst LanguageSelector = ({\n intl, options, onSubmit, ...props\n}) => {\n const handleSubmit = (e) => {\n e.preventDefault();\n const languageCode = e.target.elements['site-footer-language-select'].value;\n onSubmit(languageCode);\n };\n\n return (\n \n
\n {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}\n \n \n {options.map(({ value, label }) => )}\n \n \n
\n \n );\n};\n\nLanguageSelector.propTypes = {\n intl: intlShape.isRequired,\n onSubmit: PropTypes.func.isRequired,\n options: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.string,\n label: PropTypes.string,\n })).isRequ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AAC,KAAA;IAAA,IAAGZ,KAAK,GAAAY,KAAA,CAALZ,KAAK;MAAEa,KAAK,GAAAD,KAAA,CAALC,KAAK;IAAA,oBAAOhC,KAAA,CAAAoB,aAAA;MAAQa,GAAG,EAAEd,KAAM;MAACA,KAAK,EAAEA;IAAM,GAAEa,KAAc,CAAC;EAAA,EAC/E,CAAC,eACThC,KAAA,CAAAoB,aAAA;IAAQ,eAAY,wBAAwB;IAACE,SAAS,EAAC,gCAAgC;IAACY,IAAI,EAAC;EAAQ,gBACnGlC,KAAA,CAAAoB,aAAA,CAAChB,gBAAgB;IACfoB,EAAE,EAAC,kCAAkC;IACrCC,cAAc,EAAC,OAAO;IACtBC,WAAW,EAAC;EAA6D,CAC1E,CACK,CACL,CACD,CAAC;AAEX,CAAC;AAEDrB,gBAAgB,CAAC8B,SAAS,GAAG;EAC3B5B,IAAI,EAAEJ,SAAS,CAACiC,UAAU;EAC1B3B,QAAQ,EAAER,SAAS,CAACoC,IAAI,CAACD,UAAU;EACnC5B,OAAO,EAAEP,SAAS,CAACqC,OAAO,CAACrC,SAAS,CAACsC,KAAK,CAAC;IACzCpB,KAAK,EAAElB,SAAS,CAACuC,MAAM;IACvBR,KAAK,EAAE/B,SAAS,CAACuC;EACnB,CAAC,CAAC,CAAC,CAACJ;AACN,CAAC;AAED,eAAelC,UAAU,CAACG,gBAAgB,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/dist/components/footer-links/FooterLinks.js b/dist/components/footer-links/FooterLinks.js deleted file mode 100644 index 25aecd1ad..000000000 --- a/dist/components/footer-links/FooterLinks.js +++ /dev/null @@ -1,60 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -import React from 'react'; -import PropTypes from 'prop-types'; -import { intlShape } from '@edx/frontend-platform/i18n'; -import messages from '../Footer.messages'; -var FooterLinkItem = function FooterLinkItem(_ref) { - var intl = _ref.intl, - link = _ref.link; - var getLocaleCode = intl.locale.split('-')[0] === 'pt' ? 'pt' : 'en'; - var renderUrl = function renderUrl(url) { - if (_typeof(url) === 'object') { - return url[getLocaleCode]; - } - return url; - }; - return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("a", { - href: renderUrl(link.url) - }, intl.formatMessage(messages[link.title]))); -}; -var FooterLinks = function FooterLinks(_ref2) { - var intl = _ref2.intl, - links = _ref2.links; - if (!links) { - return null; - } - return /*#__PURE__*/React.createElement("nav", { - className: "footer-links d-md-flex justify-content-between px-4" - }, links.map(function (link) { - return /*#__PURE__*/React.createElement("div", { - className: "footer-links-navigation py-3" - }, /*#__PURE__*/React.createElement("span", null, intl.formatMessage(messages[link.title])), /*#__PURE__*/React.createElement("ul", null, link.menus.map(function (menu) { - return /*#__PURE__*/React.createElement(FooterLinkItem, { - intl: intl, - link: menu - }); - }))); - })); -}; -FooterLinkItem.propTypes = { - intl: intlShape.isRequired, - link: PropTypes.shape({ - title: PropTypes.string.isRequired, - url: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired - }).isRequired -}; -FooterLinks.propTypes = { - intl: intlShape.isRequired, - links: PropTypes.arrayOf(PropTypes.shape({ - title: PropTypes.string.isRequired, - menus: PropTypes.arrayOf(PropTypes.shape({ - title: PropTypes.string.isRequired, - url: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired - })).isRequired - })) -}; -FooterLinks.defaultProps = { - links: [] -}; -export default FooterLinks; -//# sourceMappingURL=FooterLinks.js.map \ No newline at end of file diff --git a/dist/components/footer-links/FooterLinks.js.map b/dist/components/footer-links/FooterLinks.js.map deleted file mode 100644 index 5ade22ae7..000000000 --- a/dist/components/footer-links/FooterLinks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FooterLinks.js","names":["React","PropTypes","intlShape","messages","FooterLinkItem","_ref","intl","link","getLocaleCode","locale","split","renderUrl","url","_typeof","createElement","href","formatMessage","title","FooterLinks","_ref2","links","className","map","menus","menu","propTypes","isRequired","shape","string","oneOfType","object","arrayOf","defaultProps"],"sources":["../../../src/components/footer-links/FooterLinks.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { intlShape } from '@edx/frontend-platform/i18n';\nimport messages from '../Footer.messages';\n\nconst FooterLinkItem = ({ intl, link }) => {\n const getLocaleCode = (intl.locale.split('-')[0] === 'pt') ? 'pt' : 'en';\n\n const renderUrl = (url) => {\n if (typeof url === 'object') { return url[getLocaleCode]; }\n return url;\n };\n\n return (\n
  • \n {intl.formatMessage(messages[link.title])}\n
  • \n );\n};\n\nconst FooterLinks = ({ intl, links }) => {\n if (!links) { return null; }\n\n return (\n \n );\n};\n\nFooterLinkItem.propTypes = {\n intl: intlShape.isRequired,\n link: PropTypes.shape({\n title: PropTypes.string.isRequired,\n url: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object,\n ]).isRequired,\n }).isRequired,\n};\n\nFooterLinks.propTypes = {\n intl: intlShape.isRequired,\n links: PropTypes.arrayOf(PropTypes.shape({\n title: PropTypes.string.isRequired,\n menus: PropTypes.arrayOf(PropTypes.shape({\n title: PropTypes.string.isRequired,\n url: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object,\n ]).isRequired,\n })).isRequired,\n })),\n};\n\nFooterLinks.defaultProps = {\n links: [],\n};\n\nexport default FooterLinks;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,6BAA6B;AACvD,OAAOC,QAAQ,MAAM,oBAAoB;AAEzC,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAAuB;EAAA,IAAjBC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;EAClC,IAAMC,aAAa,G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,CAAC;AAEDpB,cAAc,CAACqB,SAAS,GAAG;EACzBnB,IAAI,EAAEJ,SAAS,CAACwB,UAAU;EAC1BnB,IAAI,EAAEN,SAAS,CAAC0B,KAAK,CAAC;IACpBV,KAAK,EAAEhB,SAAS,CAAC2B,MAAM,CAACF,UAAU;IAClCd,GAAG,EAAEX,SAAS,CAAC4B,SAAS,CAAC,CACvB5B,SAAS,CAAC2B,MAAM,EAChB3B,SAAS,CAAC6B,MAAM,CACjB,CAAC,CAACJ;EACL,CAAC,CAAC,CAACA;AACL,CAAC;AAEDR,WAAW,CAACO,SAAS,GAAG;EACtBnB,IAAI,EAAEJ,SAAS,CAACwB,UAAU;EAC1BN,KAAK,EAAEnB,SAAS,CAAC8B,OAAO,CAAC9B,SAAS,CAAC0B,KAAK,CAAC;IACvCV,KAAK,EAAEhB,SAAS,CAAC2B,MAAM,CAACF,UAAU;IAClCH,KAAK,EAAEtB,SAAS,CAAC8B,OAAO,CAAC9B,SAAS,CAAC0B,KAAK,CAAC;MACvCV,KAAK,EAAEhB,SAAS,CAAC2B,MAAM,CAACF,UAAU;MAClCd,GAAG,EAAEX,SAAS,CAAC4B,SAAS,CAAC,CACvB5B,SAAS,CAAC2B,MAAM,EAChB3B,SAAS,CAAC6B,MAAM,CACjB,CAAC,CAACJ;IACL,CAAC,CAAC,CAAC,CAACA;EACN,CAAC,CAAC;AACJ,CAAC;AAEDR,WAAW,CAACc,YAAY,GAAG;EACzBZ,KAAK,EAAE;AACT,CAAC;AAED,eAAeF,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/dist/components/studio-footer/StudioFooter.js b/dist/components/studio-footer/StudioFooter.js deleted file mode 100644 index 2725f8b65..000000000 --- a/dist/components/studio-footer/StudioFooter.js +++ /dev/null @@ -1,104 +0,0 @@ -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import React, { useContext, useState } from 'react'; -import _ from 'lodash'; -import { intlShape, injectIntl, FormattedMessage } from '@edx/frontend-platform/i18n'; -import { ensureConfig } from '@edx/frontend-platform'; -import { AppContext } from '@edx/frontend-platform/react'; -import { ActionRow, Button, Container, Hyperlink, Image, TransitionReplace } from '@openedx/paragon'; -import { ExpandLess, ExpandMore, Help } from '@openedx/paragon/icons'; -import messages from './messages'; -ensureConfig(['LMS_BASE_URL', 'MARKETING_SITE_BASE_URL', 'TERMS_OF_SERVICE_URL', 'PRIVACY_POLICY_URL', 'SUPPORT_EMAIL', 'SITE_NAME', 'STUDIO_BASE_URL', 'ENABLE_ACCESSIBILITY_PAGE'], 'Studio Footer component'); -var StudioFooter = function StudioFooter(_ref) { - var intl = _ref.intl; - var _useState = useState(false), - _useState2 = _slicedToArray(_useState, 2), - isOpen = _useState2[0], - setIsOpen = _useState2[1]; - var _useContext = useContext(AppContext), - config = _useContext.config; - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "m-0 mt-6 row align-items-center justify-content-center" - }, /*#__PURE__*/React.createElement("div", { - className: "col border-top mr-2" - }), /*#__PURE__*/React.createElement(Button, { - "data-testid": "helpToggleButton", - variant: "outline-primary", - onClick: function onClick() { - return setIsOpen(!isOpen); - }, - iconBefore: Help, - iconAfter: isOpen ? ExpandLess : ExpandMore, - size: "sm" - }, isOpen ? intl.formatMessage(messages.closeHelpButtonLabel) : intl.formatMessage(messages.openHelpButtonLabel)), /*#__PURE__*/React.createElement("div", { - className: "col border-top ml-2" - })), /*#__PURE__*/React.createElement(Container, { - size: "xl", - className: "px-4" - }, /*#__PURE__*/React.createElement(TransitionReplace, null, isOpen ? /*#__PURE__*/React.createElement(ActionRow, { - key: "help-link-button-row", - className: "py-4", - "data-testid": "helpButtonRow" - }, /*#__PURE__*/React.createElement(ActionRow.Spacer, null), /*#__PURE__*/React.createElement(Button, { - as: "a", - href: "https://docs.edx.org/", - size: "sm" - }, /*#__PURE__*/React.createElement(FormattedMessage, messages.edxDocumentationButtonLabel)), /*#__PURE__*/React.createElement(Button, { - as: "a", - href: "https://open.edx.org/", - size: "sm", - "data-testid": "openEdXPortalButton" - }, /*#__PURE__*/React.createElement(FormattedMessage, messages.openEdxPortalButtonLabel)), /*#__PURE__*/React.createElement(Button, { - as: "a", - href: "https://www.edx.org/course/edx101-overview-of-creating-an-edx-course#.VO4eaLPF-n1", - size: "sm" - }, /*#__PURE__*/React.createElement(FormattedMessage, messages.edx101ButtonLabel)), /*#__PURE__*/React.createElement(Button, { - as: "a", - href: "https://www.edx.org/course/studiox-creating-a-course-with-edx-studio", - size: "sm" - }, /*#__PURE__*/React.createElement(FormattedMessage, messages.studioXButtonLabel)), !_.isEmpty(config.SUPPORT_EMAIL) && /*#__PURE__*/React.createElement(Button, { - as: "a", - href: "mailto:".concat(config.SUPPORT_EMAIL), - size: "sm", - "data-testid": "contactUsButton" - }, /*#__PURE__*/React.createElement(FormattedMessage, messages.contactUsButtonLabel)), /*#__PURE__*/React.createElement(ActionRow.Spacer, null)) : null), /*#__PURE__*/React.createElement(ActionRow, { - className: "pt-3 m-0 x-small" - }, "\xA9 ", new Date().getFullYear(), " ", /*#__PURE__*/React.createElement(Hyperlink, { - destination: config.MARKETING_SITE_BASE_URL, - target: "_blank", - className: "ml-2" - }, config.SITE_NAME), /*#__PURE__*/React.createElement(ActionRow.Spacer, null), !_.isEmpty(config.TERMS_OF_SERVICE_URL) && /*#__PURE__*/React.createElement(Hyperlink, { - destination: config.TERMS_OF_SERVICE_URL, - "data-testid": "termsOfService" - }, intl.formatMessage(messages.termsOfServiceLinkLabel)), !_.isEmpty(config.PRIVACY_POLICY_URL) && /*#__PURE__*/React.createElement(Hyperlink, { - destination: config.PRIVACY_POLICY_URL, - "data-testid": "privacyPolicy" - }, intl.formatMessage(messages.privacyPolicyLinkLabel)), config.ENABLE_ACCESSIBILITY_PAGE === 'true' && /*#__PURE__*/React.createElement(Hyperlink, { - destination: "".concat(config.STUDIO_BASE_URL, "/accessibility"), - "data-testid": "accessibilityRequest" - }, intl.formatMessage(messages.accessibilityRequestLinkLabel)), /*#__PURE__*/React.createElement(Hyperlink, { - destination: config.LMS_BASE_URL - }, "LMS")), /*#__PURE__*/React.createElement(ActionRow, { - className: "mt-3 pb-4 x-small" - }, /*#__PURE__*/React.createElement(FormattedMessage, messages.trademarkMessage), /*#__PURE__*/React.createElement(Hyperlink, { - className: "ml-1", - destination: "https://www.edx.org" - }, "edX Inc"), ".", /*#__PURE__*/React.createElement(ActionRow.Spacer, null), /*#__PURE__*/React.createElement(Hyperlink, { - destination: "https://open.edx.org", - className: "float-right" - }, /*#__PURE__*/React.createElement(Image, { - width: "120px", - alt: "Powered by Open edX", - src: "https://logos.openedx.org/open-edx-logo-tag.png" - }))))); -}; -StudioFooter.propTypes = { - // injected - intl: intlShape.isRequired -}; -export default injectIntl(StudioFooter); -//# sourceMappingURL=StudioFooter.js.map \ No newline at end of file diff --git a/dist/components/studio-footer/StudioFooter.js.map b/dist/components/studio-footer/StudioFooter.js.map deleted file mode 100644 index 803211d18..000000000 --- a/dist/components/studio-footer/StudioFooter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StudioFooter.js","names":["React","useContext","useState","_","intlShape","injectIntl","FormattedMessage","ensureConfig","AppContext","ActionRow","Button","Container","Hyperlink","Image","TransitionReplace","ExpandLess","ExpandMore","Help","messages","StudioFooter","_ref","intl","_useState","_useState2","_slicedToArray","isOpen","setIsOpen","_useContext","config","createElement","Fragment","className","variant","onClick","iconBefore","iconAfter","size","formatMessage","closeHelpButtonLabel","openHelpButtonLabel","key","Spacer","as","href","edxDocumentationButtonLabel","openEdxPortalButtonLabel","edx101ButtonLabel","studioXButtonLabel","isEmpty","SUPPORT_EMAIL","concat","contactUsButtonLabel","Date","getFullYear","destination","MARKETING_SITE_BASE_URL","target","SITE_NAME","TERMS_OF_SERVICE_URL","termsOfServiceLinkLabel","PRIVACY_POLICY_URL","privacyPolicyLinkLabel","ENABLE_ACCESSIBILITY_PAGE","STUDIO_BASE_URL","accessibilityRequestLinkLabel","LMS_BASE_URL","trademarkMessage","width","alt","src","propTypes","isRequired"],"sources":["../../../src/components/studio-footer/StudioFooter.jsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\nimport _ from 'lodash';\nimport { intlShape, injectIntl, FormattedMessage } from '@edx/frontend-platform/i18n';\nimport { ensureConfig } from '@edx/frontend-platform';\nimport { AppContext } from '@edx/frontend-platform/react';\nimport {\n ActionRow,\n Button,\n Container,\n Hyperlink,\n Image,\n TransitionReplace,\n} from '@openedx/paragon';\nimport { ExpandLess, ExpandMore, Help } from '@openedx/paragon/icons';\nimport messages from './messages';\n\nensureConfig([\n 'LMS_BASE_URL',\n 'MARKETING_SITE_BASE_URL',\n 'TERMS_OF_SERVICE_URL',\n 'PRIVACY_POLICY_URL',\n 'SUPPORT_EMAIL',\n 'SITE_NAME',\n 'STUDIO_BASE_URL',\n 'ENABLE_ACCESSIBILITY_PAGE',\n], 'Studio Footer component');\n\nconst StudioFooter = ({\n // injected\n intl,\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n const { config } = useContext(AppContext);\n\n return (\n <>\n
    \n
    \n setIsOpen(!isOpen)}\n iconBefore={Help}\n iconAfter={isOpen ? ExpandLess : ExpandMore}\n size=\"sm\"\n >\n {isOpen ? intl.formatMessage(messages.closeHelpButtonLabel)\n : intl.formatMessage(messages.openHelpButtonLabel)}\n \n
    \n
    \n \n \n {isOpen ? (\n \n \n \n \n \n \n \n \n \n \n \n \n {!_.isEmpty(config.SUPPORT_EMAIL) && (\n \n \n \n )}\n \n \n ) : null}\n \n \n © {new Date().getFullYear()} {config.SITE_NAME}\n \n {!_.isEmpty(config.TERMS_OF_SERVICE_URL) && (\n \n {intl.formatMessage(messages.termsOfServiceLinkLabel)}\n \n )}{!_.isEmpty(config.PRIVACY_POLICY_URL) && (\n \n {intl.formatMessage(messages.privacyPolicyLinkLabel)}\n \n )}\n {config.ENABLE_ACCESSIBILITY_PAGE === 'true' && (\n \n {intl.formatMessage(messages.accessibilityRequestLinkLabel)}\n \n )}\n LMS\n \n \n {/*\n Site operators: Please do not remove this paragraph! this attributes back to edX and\n makes your acknowledgement of edX's trademarks clear.\n Translators: 'edX' and 'Open edX' are trademarks of 'edX Inc.'. Please do not translate\n any of these trademarks and company names.\n */}\n \n edX Inc.\n \n \n \n \n \n \n \n );\n};\n\nStudioFooter.propTypes = {\n // injected\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(StudioFooter);\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AACnD,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,SAAS,EAAEC,UAAU,EAAEC,gBAAgB,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B;EACAjD,IAAI,EAAEjB,SAAS,CAACmE;AAClB,CAAC;AAED,eAAelE,UAAU,CAACc,YAAY,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/dist/components/studio-footer/StudioFooter.test.jsx b/dist/components/studio-footer/StudioFooter.test.jsx deleted file mode 100644 index 44332bba4..000000000 --- a/dist/components/studio-footer/StudioFooter.test.jsx +++ /dev/null @@ -1,121 +0,0 @@ -/* eslint-disable react/prop-types */ -import React, { useMemo } from 'react'; -import { fireEvent, render, screen } from '@testing-library/react'; -import '@testing-library/jest-dom/extend-expect'; -import { IntlProvider } from '@edx/frontend-platform/i18n'; -import { AppContext } from '@edx/frontend-platform/react'; -import StudioFooter from './StudioFooter'; -import messages from './messages'; - -const config = { - LMS_BASE_URL: process.env.LMS_BASE_URL, - MARKETING_SITE_BASE_URL: process.env.MARKETING_SITE_BASE_URL, - TERMS_OF_SERVICE_URL: process.env.TERMS_OF_SERVICE_URL, - PRIVACY_POLICY_URL: process.env.PRIVACY_POLICY_URL, - SUPPORT_EMAIL: process.env.SUPPORT_EMAIL, - SITE_NAME: process.env.SITE_NAME, - STUDIO_BASE_URL: process.env.STUDIO_BASE_URL, - ENABLE_ACCESSIBILITY_PAGE: process.env.ENABLE_ACCESSIBILITY_PAGE, -}; - -let currentConfig = config; -const Component = ({ updateVariable }) => { - if (updateVariable) { - const [variable, value] = updateVariable; - currentConfig = { - ...config, - [variable]: value, - }; - } - const contextValue = useMemo(() => ({ - authenticatedUser: null, - config: currentConfig, - }), []); - - return ( - - - - - - ); -}; - -jest.unmock('@openedx/paragon'); - -describe('Footer', () => { - describe('help section default view', () => { - it('help button should read Looking for help with Studio?', () => { - render(); - expect(screen.getByText(messages.openHelpButtonLabel.defaultMessage)) - .toBeVisible(); - }); - it('help button link row should not be visible', () => { - render(); - expect(screen.queryByTestId('helpButtonRow')).toBeNull(); - }); - }); - describe('help section expanded view', () => { - it('help button should read Hide Studio help', () => { - render(); - const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage); - fireEvent.click(helpToggleButton); - expect(screen.getByText(messages.closeHelpButtonLabel.defaultMessage)) - .toBeVisible(); - }); - it('help button link row should be visible', () => { - render(); - const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage); - fireEvent.click(helpToggleButton); - expect(screen.getByTestId('helpButtonRow')).toBeVisible(); - }); - it('Open edX portal button should be visible', () => { - render(); - const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage); - fireEvent.click(helpToggleButton); - expect(screen.getByTestId('openEdXPortalButton')).toBeVisible(); - }); - it('should not show contact us button', () => { - render(); - const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage); - fireEvent.click(helpToggleButton); - expect(screen.queryByTestId('contactUsButton')).toBeNull(); - }); - it('should show contact us button', () => { - render(); - const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage); - fireEvent.click(helpToggleButton); - expect(screen.getByTestId('contactUsButton')).toBeVisible(); - }); - }); - describe('policy link row', () => { - it('should only show LMS link', () => { - render(); - expect(screen.getByText('LMS')).toBeVisible(); - expect(screen.queryByTestId('termsOfService')).toBeNull(); - expect(screen.queryByTestId('privacyPolicy')).toBeNull(); - expect(screen.queryByTestId('accessibilityRequest')).toBeNull(); - }); - it('should show terms of service link', () => { - render(); - expect(screen.getByText('LMS')).toBeVisible(); - expect(screen.queryByTestId('termsOfService')).toBeVisible(); - expect(screen.queryByTestId('privacyPolicy')).toBeNull(); - expect(screen.queryByTestId('accessibilityRequest')).toBeNull(); - }); - it('should show privacy policy link', () => { - render(); - expect(screen.getByText('LMS')).toBeVisible(); - expect(screen.queryByTestId('termsOfService')).toBeNull(); - expect(screen.queryByTestId('privacyPolicy')).toBeVisible(); - expect(screen.queryByTestId('accessibilityRequest')).toBeNull(); - }); - it('should show accessibilty request link', () => { - render(); - expect(screen.getByText('LMS')).toBeVisible(); - expect(screen.queryByTestId('termsOfService')).toBeNull(); - expect(screen.queryByTestId('privacyPolicy')).toBeNull(); - expect(screen.queryByTestId('accessibilityRequest')).toBeVisible(); - }); - }); -}); diff --git a/dist/components/studio-footer/index.js b/dist/components/studio-footer/index.js deleted file mode 100644 index 0c728ea45..000000000 --- a/dist/components/studio-footer/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import StudioFooter from './StudioFooter'; -export default StudioFooter; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/components/studio-footer/index.js.map b/dist/components/studio-footer/index.js.map deleted file mode 100644 index ced930721..000000000 --- a/dist/components/studio-footer/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","names":["StudioFooter"],"sources":["../../../src/components/studio-footer/index.jsx"],"sourcesContent":["import StudioFooter from './StudioFooter';\n\nexport default StudioFooter;\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,gBAAgB;AAEzC,eAAeA,YAAY","ignoreList":[]} \ No newline at end of file diff --git a/dist/components/studio-footer/messages.js b/dist/components/studio-footer/messages.js deleted file mode 100644 index 8e1f9cf48..000000000 --- a/dist/components/studio-footer/messages.js +++ /dev/null @@ -1,60 +0,0 @@ -import { defineMessages } from '@edx/frontend-platform/i18n'; -var messages = defineMessages({ - openHelpButtonLabel: { - id: 'authoring.footer.help.openHelp.button.label', - defaultMessage: 'Looking for help with Studio?', - description: 'Label for button that opens the collapsed section with help buttons' - }, - closeHelpButtonLabel: { - id: 'authoring.footer.help.closeHelp.button.label', - defaultMessage: 'Hide Studio help', - description: 'Label for button that closes the collapsed section with help buttons' - }, - edxDocumentationButtonLabel: { - id: 'authoring.footer.help.edxDocumentation.button.label', - defaultMessage: 'edX documentation', - description: 'Label for button that links to the edX documentation site' - }, - openEdxPortalButtonLabel: { - id: 'authoring.footer.help.openEdxPortal.button.label', - defaultMessage: 'Open edX portal', - description: 'Label for button that links to the Open edX portal' - }, - edx101ButtonLabel: { - id: 'authoring.footer.help.edx101.button.label', - defaultMessage: 'Enroll in edX 101', - description: 'Label for button that links to the edX 101 course' - }, - studioXButtonLabel: { - id: 'authoring.footer.help.studioX.button.label', - defaultMessage: 'Enroll in StudioX', - description: 'Label for button that links to the edX StudioX course' - }, - contactUsButtonLabel: { - id: 'authoring.footer.help.contactUs.button.label', - defaultMessage: 'Contact us', - description: 'Label for button that links to the email for partner support' - }, - termsOfServiceLinkLabel: { - id: 'authoring.footer.termsOfService.link.label', - defaultMessage: 'Terms of Service', - description: 'Label for button that links to the terms of service page' - }, - privacyPolicyLinkLabel: { - id: 'authoring.footer.privacyPolicy.link.label', - defaultMessage: 'Privacy Policy', - description: 'Label for button that links to the privacy policy page' - }, - accessibilityRequestLinkLabel: { - id: 'authoring.footer.accessibilityRequest.link.label', - defaultMessage: 'Accessibility Accomodation Request', - description: 'Label for button that links to the accessibility accomodation requests page' - }, - trademarkMessage: { - id: 'authoring.footer.trademark.message', - defaultMessage: 'edX and Open edX, and the edX and Open edX logos are registered trademarks of', - description: 'Message about the use of logos and names edX and Open edX' - } -}); -export default messages; -//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/dist/components/studio-footer/messages.js.map b/dist/components/studio-footer/messages.js.map deleted file mode 100644 index 45410c739..000000000 --- a/dist/components/studio-footer/messages.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"messages.js","names":["defineMessages","messages","openHelpButtonLabel","id","defaultMessage","description","closeHelpButtonLabel","edxDocumentationButtonLabel","openEdxPortalButtonLabel","edx101ButtonLabel","studioXButtonLabel","contactUsButtonLabel","termsOfServiceLinkLabel","privacyPolicyLinkLabel","accessibilityRequestLinkLabel","trademarkMessage"],"sources":["../../../src/components/studio-footer/messages.js"],"sourcesContent":["import { defineMessages } from '@edx/frontend-platform/i18n';\n\nconst messages = defineMessages({\n openHelpButtonLabel: {\n id: 'authoring.footer.help.openHelp.button.label',\n defaultMessage: 'Looking for help with Studio?',\n description: 'Label for button that opens the collapsed section with help buttons',\n },\n closeHelpButtonLabel: {\n id: 'authoring.footer.help.closeHelp.button.label',\n defaultMessage: 'Hide Studio help',\n description: 'Label for button that closes the collapsed section with help buttons',\n },\n edxDocumentationButtonLabel: {\n id: 'authoring.footer.help.edxDocumentation.button.label',\n defaultMessage: 'edX documentation',\n description: 'Label for button that links to the edX documentation site',\n },\n openEdxPortalButtonLabel: {\n id: 'authoring.footer.help.openEdxPortal.button.label',\n defaultMessage: 'Open edX portal',\n description: 'Label for button that links to the Open edX portal',\n },\n edx101ButtonLabel: {\n id: 'authoring.footer.help.edx101.button.label',\n defaultMessage: 'Enroll in edX 101',\n description: 'Label for button that links to the edX 101 course',\n },\n studioXButtonLabel: {\n id: 'authoring.footer.help.studioX.button.label',\n defaultMessage: 'Enroll in StudioX',\n description: 'Label for button that links to the edX StudioX course',\n },\n contactUsButtonLabel: {\n id: 'authoring.footer.help.contactUs.button.label',\n defaultMessage: 'Contact us',\n description: 'Label for button that links to the email for partner support',\n },\n termsOfServiceLinkLabel: {\n id: 'authoring.footer.termsOfService.link.label',\n defaultMessage: 'Terms of Service',\n description: 'Label for button that links to the terms of service page',\n },\n privacyPolicyLinkLabel: {\n id: 'authoring.footer.privacyPolicy.link.label',\n defaultMessage: 'Privacy Policy',\n description: 'Label for button that links to the privacy policy page',\n },\n accessibilityRequestLinkLabel: {\n id: 'authoring.footer.accessibilityRequest.link.label',\n defaultMessage: 'Accessibility Accomodation Request',\n description: 'Label for button that links to the accessibility accomodation requests page',\n },\n trademarkMessage: {\n id: 'authoring.footer.trademark.message',\n defaultMessage: 'edX and Open edX, and the edX and Open edX logos are registered trademarks of',\n description: 'Message about the use of logos and names edX and Open edX',\n },\n});\n\nexport default messages;\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,6BAA6B;AAE5D,IAAMC,QAAQ,GAAGD,cAAc,CAAC;EAC9BE,mBAAmB,EAAE;IACnBC,EAAE,EAAE,6CAA6C;IACjDC,cAAc,EAAE,+BAA+B;IAC/CC,WAAW,EAAE;EACf,CAAC;EACDC,oBAAoB,EAAE;IACpBH,EAAE,EAAE,8CAA8C;IAClDC,cAAc,EAAE,kBAAkB;IAClCC,WAAW,EAAE;EACf,CAAC;EACDE,2BAA2B,EAAE;IAC3BJ,EAAE,EAAE,qDAAqD;IACzDC,cAAc,EAAE,mBAAmB;IACnCC,WAAW,EAAE;EACf,CAAC;EACDG,wBAAwB,EAAE;IACxBL,EAAE,EAAE,kDAAkD;IACtDC,cAAc,EAAE,iBAAiB;IACjCC,WAAW,EAAE;EACf,CAAC;EACDI,iBAAiB,EAAE;IACjBN,EAAE,EAAE,2CAA2C;IAC/CC,cAAc,EAAE,mBAAmB;IACnCC,WAAW,EAAE;EACf,CAAC;EACDK,kBAAkB,EAAE;IAClBP,EAAE,EAAE,4CAA4C;IAChDC,cAAc,EAAE,mBAAmB;IACnCC,WAAW,EAAE;EACf,CAAC;EACDM,oBAAoB,EAAE;IACpBR,EAAE,EAAE,8CAA8C;IAClDC,cAAc,EAAE,YAAY;IAC5BC,WAAW,EAAE;EACf,CAAC;EACDO,uBAAuB,EAAE;IACvBT,EAAE,EAAE,4CAA4C;IAChDC,cAAc,EAAE,kBAAkB;IAClCC,WAAW,EAAE;EACf,CAAC;EACDQ,sBAAsB,EAAE;IACtBV,EAAE,EAAE,2CAA2C;IAC/CC,cAAc,EAAE,gBAAgB;IAChCC,WAAW,EAAE;EACf,CAAC;EACDS,6BAA6B,EAAE;IAC7BX,EAAE,EAAE,kDAAkD;IACtDC,cAAc,EAAE,oCAAoC;IACpDC,WAAW,EAAE;EACf,CAAC;EACDU,gBAAgB,EAAE;IAChBZ,EAAE,EAAE,oCAAoC;IACxCC,cAAc,EAAE,+EAA+E;IAC/FC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAEF,eAAeJ,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/dist/data/footerLinks.js b/dist/data/footerLinks.js deleted file mode 100644 index c7c632124..000000000 --- a/dist/data/footerLinks.js +++ /dev/null @@ -1,80 +0,0 @@ -var links = [{ - title: 'footer.nau.title', - menus: [{ - title: 'footer.nau.about', - url: { - en: 'https://www.nau.edu.pt/en/about/', - pt: 'https://www.nau.edu.pt/pt/sobre/' - } - }, { - title: 'footer.nau.courses', - url: { - en: 'https://www.nau.edu.pt/en/courses/', - pt: 'https://www.nau.edu.pt/pt/cursos/' - } - }, { - title: 'footer.nau.partner', - url: { - en: 'https://www.nau.edu.pt/en/partners/how-to-become-a-partner/', - pt: 'https://www.nau.edu.pt/pt/parceiros/como-se-tornar-parceiro/' - } - }] -}, { - title: 'footer.nau.communication', - menus: [{ - title: 'footer.nau.help', - url: 'https://ajuda.nau.edu.pt/' - }, { - title: 'footer.nau.news', - url: { - en: 'https://www.nau.edu.pt/en/news/', - pt: 'https://www.nau.edu.pt/pt/noticias/' - } - }, { - title: 'footer.nau.mediakit', - url: { - en: 'https://www.nau.edu.pt/en/media-kit/', - pt: 'https://www.nau.edu.pt/pt/material-de-divulgacao/' - } - }] -}, { - title: 'footer.nau.legal', - menus: [{ - title: 'footer.nau.termsconditions', - url: { - en: 'https://www.nau.edu.pt/en/terms-and-conditions/', - pt: 'https://www.nau.edu.pt/pt/legal/termos-e-condicoes/' - } - }, { - title: 'footer.nau.privacypolicy', - url: { - en: 'https://www.nau.edu.pt/en/privacy-policy/', - pt: 'https://www.nau.edu.pt/pt/legal/politica-de-privacidade/' - } - }, { - title: 'footer.nau.cookies', - url: { - en: 'https://www.nau.edu.pt/en/legal/cookies-policy/', - pt: 'https://www.nau.edu.pt/pt/legal/cookies/' - } - }, { - title: 'footer.nau.certification', - url: { - en: 'https://www.nau.edu.pt/en/legal/politica-de-certificacao/', - pt: 'https://www.nau.edu.pt/pt/legal/politica-de-certificacao/' - } - }, { - title: 'footer.nau.codeofhonor', - url: { - en: 'https://www.nau.edu.pt/en/legal/codigo-de-honra/', - pt: 'https://www.nau.edu.pt/pt/legal/codigo-de-honra/' - } - }] -}]; -var social = { - facebook: 'https://www.facebook.com/plataformanau/', - linkedin: 'https://www.linkedin.com/company/plataformanau/', - newsletter: 'https://www.nau.edu.pt/newsletter' -}; -export { links, social }; -//# sourceMappingURL=footerLinks.js.map \ No newline at end of file diff --git a/dist/data/footerLinks.js.map b/dist/data/footerLinks.js.map deleted file mode 100644 index dd1766a9e..000000000 --- a/dist/data/footerLinks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"footerLinks.js","names":["links","title","menus","url","en","pt","social","facebook","linkedin","newsletter"],"sources":["../../src/data/footerLinks.js"],"sourcesContent":["const links = [\n {\n title: 'footer.nau.title',\n menus: [\n {\n title: 'footer.nau.about',\n url: {\n en: 'https://www.nau.edu.pt/en/about/',\n pt: 'https://www.nau.edu.pt/pt/sobre/',\n },\n },\n {\n title: 'footer.nau.courses',\n url: {\n en: 'https://www.nau.edu.pt/en/courses/',\n pt: 'https://www.nau.edu.pt/pt/cursos/',\n },\n },\n {\n title: 'footer.nau.partner',\n url: {\n en: 'https://www.nau.edu.pt/en/partners/how-to-become-a-partner/',\n pt: 'https://www.nau.edu.pt/pt/parceiros/como-se-tornar-parceiro/',\n },\n },\n ],\n },\n {\n title: 'footer.nau.communication',\n menus: [\n {\n title: 'footer.nau.help',\n url: 'https://ajuda.nau.edu.pt/',\n },\n {\n title: 'footer.nau.news',\n url: {\n en: 'https://www.nau.edu.pt/en/news/',\n pt: 'https://www.nau.edu.pt/pt/noticias/',\n },\n },\n {\n title: 'footer.nau.mediakit',\n url: {\n en: 'https://www.nau.edu.pt/en/media-kit/',\n pt: 'https://www.nau.edu.pt/pt/material-de-divulgacao/',\n },\n },\n ],\n },\n {\n title: 'footer.nau.legal',\n menus: [\n {\n title: 'footer.nau.termsconditions',\n url: {\n en: 'https://www.nau.edu.pt/en/terms-and-conditions/',\n pt: 'https://www.nau.edu.pt/pt/legal/termos-e-condicoes/',\n },\n },\n {\n title: 'footer.nau.privacypolicy',\n url: {\n en: 'https://www.nau.edu.pt/en/privacy-policy/',\n pt: 'https://www.nau.edu.pt/pt/legal/politica-de-privacidade/',\n },\n },\n {\n title: 'footer.nau.cookies',\n url: {\n en: 'https://www.nau.edu.pt/en/legal/cookies-policy/',\n pt: 'https://www.nau.edu.pt/pt/legal/cookies/',\n },\n },\n {\n title: 'footer.nau.certification',\n url: {\n en: 'https://www.nau.edu.pt/en/legal/politica-de-certificacao/',\n pt: 'https://www.nau.edu.pt/pt/legal/politica-de-certificacao/',\n },\n },\n {\n title: 'footer.nau.codeofhonor',\n url: {\n en: 'https://www.nau.edu.pt/en/legal/codigo-de-honra/',\n pt: 'https://www.nau.edu.pt/pt/legal/codigo-de-honra/',\n },\n },\n ],\n },\n];\n\nconst social = {\n facebook: 'https://www.facebook.com/plataformanau/',\n linkedin: 'https://www.linkedin.com/company/plataformanau/',\n newsletter: 'https://www.nau.edu.pt/newsletter',\n};\n\nexport { links, social };\n"],"mappings":"AAAA,IAAMA,KAAK,GAAG,CACZ;EACEC,KAAK,EAAE,kBAAkB;EACzBC,KAAK,EAAE,CACL;IACED,KAAK,EAAE,kBAAkB;IACzBE,GAAG,EAAE;MACHC,EAAE,EAAE,kCAAkC;MACtCC,EAAE,EAAE;IACN;EACF,CAAC,EACD;IACEJ,KAAK,EAAE,oBAAoB;IAC3BE,GAAG,EAAE;MACHC,EAAE,EAAE,oCAAoC;MACxCC,EAAE,EAAE;IACN;EACF,CAAC,EACD;IACEJ,KAAK,EAAE,oBAAoB;IAC3BE,GAAG,EAAE;MACHC,EAAE,EAAE,6DAA6D;MACjEC,EAAE,EAAE;IACN;EACF,CAAC;AAEL,CAAC,EACD;EACEJ,KAAK,EAAE,0BAA0B;EACjCC,KAAK,EAAE,CACL;IACED,KAAK,EAAE,iBAAiB;IACxBE,GAAG,EAAE;EACP,CAAC,EACD;IACEF,KAAK,EAAE,iBAAiB;IACxBE,GAAG,EAAE;MACHC,EAAE,EAAE,iCAAiC;MACrCC,EAAE,EAAE;IACN;EACF,CAAC,EACD;IACEJ,KAAK,EAAE,qBAAqB;IAC5BE,GAAG,EAAE;MACHC,EAAE,EAAE,sCAAsC;MAC1CC,EAAE,EAAE;IACN;EACF,CAAC;AAEL,CAAC,EACD;EACEJ,KAAK,EAAE,kBAAkB;EACzBC,KAAK,EAAE,CACL;IACED,KAAK,EAAE,4BAA4B;IACnCE,GAAG,EAAE;MACHC,EAAE,EAAE,iDAAiD;MACrDC,EAAE,EAAE;IACN;EACF,CAAC,EACD;IACEJ,KAAK,EAAE,0BAA0B;IACjCE,GAAG,EAAE;MACHC,EAAE,EAAE,2CAA2C;MAC/CC,EAAE,EAAE;IACN;EACF,CAAC,EACD;IACEJ,KAAK,EAAE,oBAAoB;IAC3BE,GAAG,EAAE;MACHC,EAAE,EAAE,iDAAiD;MACrDC,EAAE,EAAE;IACN;EACF,CAAC,EACD;IACEJ,KAAK,EAAE,0BAA0B;IACjCE,GAAG,EAAE;MACHC,EAAE,EAAE,2DAA2D;MAC/DC,EAAE,EAAE;IACN;EACF,CAAC,EACD;IACEJ,KAAK,EAAE,wBAAwB;IAC/BE,GAAG,EAAE;MACHC,EAAE,EAAE,kDAAkD;MACtDC,EAAE,EAAE;IACN;EACF,CAAC;AAEL,CAAC,CACF;AAED,IAAMC,MAAM,GAAG;EACbC,QAAQ,EAAE,yCAAyC;EACnDC,QAAQ,EAAE,iDAAiD;EAC3DC,UAAU,EAAE;AACd,CAAC;AAED,SAAST,KAAK,EAAEM,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/dist/i18n/index.js b/dist/i18n/index.js deleted file mode 100644 index 2fe05b263..000000000 --- a/dist/i18n/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export default {}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/i18n/index.js.map b/dist/i18n/index.js.map deleted file mode 100644 index e86f6ffbd..000000000 --- a/dist/i18n/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","names":[],"sources":["../../src/i18n/index.js"],"sourcesContent":["export default {};\n"],"mappings":"AAAA,eAAe,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/dist/i18n/messages/pt_PT.json b/dist/i18n/messages/pt_PT.json deleted file mode 100644 index 0f3ea2b21..000000000 --- a/dist/i18n/messages/pt_PT.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "footer.languageForm.select.label": "Escolha a língua", - "footer.languageForm.submit.label": "Aplicar", - "footer.copyright.message": "Todos os direitos reservados.", - "footer.nau.title": "NAU - Sempre a Aprender", - "footer.nau.about": "Sobre", - "footer.nau.contact": "Contactos", - "footer.nau.help": "Ajuda", - "footer.nau.courses": "Cursos", - "footer.nau.partner": "Como se tornar parceiro", - "footer.nau.communication": "Comunicação", - "footer.nau.news": "Notícias", - "footer.nau.mediakit": "Media Kit", - "footer.nau.legal": "Legal", - "footer.nau.termsconditions": "Termos e condições", - "footer.nau.privacypolicy": "Política de Privacidade", - "footer.nau.cookies": "Política de Cookies", - "footer.nau.certification": "Política de Certificação", - "footer.nau.codeofhonor": "Código de Honra", - "footer.nau.social.facebook": "Siga-nos no Facebook", - "footer.nau.social.linkedin": "Siga-nos no LinkedIn", - "footer.nau.social.newsletter": "Subscreva a nossa lista de e-mail (newsletter)" -} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 584c60871..000000000 --- a/dist/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import Footer, { EVENT_NAMES } from './components/Footer'; -import messages from './i18n/index'; -import StudioFooter from './components/studio-footer'; -export default Footer; -export { messages, EVENT_NAMES, StudioFooter }; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index be9826bb1..000000000 --- a/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","names":["Footer","EVENT_NAMES","messages","StudioFooter"],"sources":["../src/index.js"],"sourcesContent":["import Footer, { EVENT_NAMES } from './components/Footer';\nimport messages from './i18n/index';\nimport StudioFooter from './components/studio-footer';\n\nexport default Footer;\nexport {\n messages, EVENT_NAMES, StudioFooter,\n};\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,WAAW,QAAQ,qBAAqB;AACzD,OAAOC,QAAQ,MAAM,cAAc;AACnC,OAAOC,YAAY,MAAM,4BAA4B;AAErD,eAAeH,MAAM;AACrB,SACEE,QAAQ,EAAED,WAAW,EAAEE,YAAY","ignoreList":[]} \ No newline at end of file diff --git a/dist/setupTest.js b/dist/setupTest.js deleted file mode 100644 index b47c955f3..000000000 --- a/dist/setupTest.js +++ /dev/null @@ -1,22 +0,0 @@ -// These configuration values are usually set in webpack's EnvironmentPlugin however -// Jest does not use webpack so we need to set these so for testing -process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload'; -process.env.BASE_URL = 'localhost:1995'; -process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150'; -process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token'; -process.env.ECOMMERCE_BASE_URL = 'http://localhost:18130'; -process.env.LANGUAGE_PREFERENCE_COOKIE_NAME = 'openedx-language-preference'; -process.env.LMS_BASE_URL = 'http://localhost:18000'; -process.env.LOGIN_URL = 'http://localhost:18000/login'; -process.env.LOGOUT_URL = 'http://localhost:18000/login'; -process.env.MARKETING_SITE_BASE_URL = 'http://localhost:18000'; -process.env.ORDER_HISTORY_URL = 'localhost:1996/orders'; -process.env.REFRESH_ACCESS_TOKEN_ENDPOINT = 'http://localhost:18000/login_refresh'; -process.env.SEGMENT_KEY = 'segment_whoa'; -process.env.SITE_NAME = 'edX'; -process.env.USER_INFO_COOKIE_NAME = 'edx-user-info'; -process.env.LOGO_URL = 'https://edx-cdn.org/v3/default/logo.svg'; -process.env.LOGO_TRADEMARK_URL = 'https://edx-cdn.org/v3/default/logo-trademark.svg'; -process.env.LOGO_WHITE_URL = 'https://edx-cdn.org/v3/default/logo-white.svg'; -process.env.FAVICON_URL = 'https://edx-cdn.org/v3/default/favicon.ico'; -process.env.ENABLE_ACCESSIBILITY_PAGE = 'false'; diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 9542bd6c4..4bbaf5966 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -4,14 +4,12 @@ import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import { sendTrackEvent } from '@edx/frontend-platform/analytics'; import { ensureConfig, getConfig } from '@edx/frontend-platform'; import { AppContext } from '@edx/frontend-platform/react'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faFacebookF, faLinkedinIn } from '@fortawesome/free-brands-svg-icons'; -import { faEnvelope } from '@fortawesome/free-regular-svg-icons'; import messages from './Footer.messages'; import LanguageSelector from './LanguageSelector'; -import { links, social } from '../data/footerLinks'; -import FooterLinks from './footer-links/FooterLinks'; +import FooterLinks from './footer-links/FooterNavLinks'; +import FooterSocial from './footer-links/FooterSocialLinks'; +import parseEnvSettings from '../utils/parseData'; ensureConfig([ 'LMS_BASE_URL', @@ -22,38 +20,11 @@ const EVENT_NAMES = { FOOTER_LINK: 'edx.bi.footer.link', }; -const FooterSocial = ({ intl }) => ( - -); - -FooterSocial.propTypes = { - intl: intlShape.isRequired, -}; const AdditionalLogosSection = () => { - const FOOTER_LOGOS = getConfig().FOOTER_ADDITIONAL_LOGOS || process.env.FOOTER_ADDITIONAL_LOGOS; - const parseFooterLogos = () => { - try { - if (Array.isArray(FOOTER_LOGOS)) { - return FOOTER_LOGOS; - } - return JSON.parse(FOOTER_LOGOS); - } catch (e) { - return null; - } - }; - - const logos = parseFooterLogos(); + const FOOTER_ADDITIONAL_LOGOS = getConfig().FOOTER_ADDITIONAL_LOGOS || process.env.FOOTER_ADDITIONAL_LOGOS; + + const logos = parseEnvSettings(FOOTER_ADDITIONAL_LOGOS); if (!logos) { return null; } @@ -132,7 +103,7 @@ class SiteFooter extends React.Component {
    - + {showLanguageSelector && ( renders correctly renders with a language selector 1`] = ` } /> -
    -
    renders correctly renders without a language selector 1`] = } /> - -
    renders correctly renders without a language selector in pt- } /> - -
    { const getLocaleCode = (intl.locale.split('-')[0] === 'pt') ? 'pt' : 'en'; @@ -18,12 +20,15 @@ const FooterLinkItem = ({ intl, link }) => { ); }; -const FooterLinks = ({ intl, links }) => { - if (!links) { return null; } +const FooterLinks = ({ intl }) => { + const FOOTER_NAV_LINKS = getConfig().FOOTER_NAV_LINKS || process.env.FOOTER_NAV_LINKS + const footerLinks = parseEnvSettings(FOOTER_NAV_LINKS); + + if (!footerLinks) { return null; } return (