@artistanbul/frontend-component-footer-sumac 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +93 -0
- package/README.rst +207 -0
- package/dist/_footer.scss +79 -0
- package/dist/components/Footer.js +108 -0
- package/dist/components/Footer.js.map +1 -0
- package/dist/components/Footer.messages.js +155 -0
- package/dist/components/Footer.messages.js.map +1 -0
- package/dist/components/LanguageSelector.js +61 -0
- package/dist/components/LanguageSelector.js.map +1 -0
- package/dist/components/studio-footer/StudioFooter.js +131 -0
- package/dist/components/studio-footer/StudioFooter.js.map +1 -0
- package/dist/components/studio-footer/StudioFooter.test.jsx +121 -0
- package/dist/components/studio-footer/index.js +3 -0
- package/dist/components/studio-footer/index.js.map +1 -0
- package/dist/components/studio-footer/messages.js +60 -0
- package/dist/components/studio-footer/messages.js.map +1 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/images/omnikampus/artistanbul-logo.png +0 -0
- package/dist/images/omnikampus/omnikampus-just-logo.png +0 -0
- package/dist/images/omnikampus/omnikampus-logo.png +0 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/index.scss +6 -0
- package/dist/setupTest.js +22 -0
- package/package.json +74 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"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.socialLinks.srText.facebook': {\n id: 'footer.socialLinks.srText.facebook',\n defaultMessage: 'Like edX on Facebook',\n description: 'This is screenreader text for the edX Facebook social media link in the footer.',\n },\n 'footer.socialLinks.srText.twitter': {\n id: 'footer.socialLinks.srText.twitter',\n defaultMessage: 'Follow edX on Twitter',\n description: 'This is screenreader text for the edX Twitter social media link in the footer.',\n },\n 'footer.socialLinks.srText.youtube': {\n id: 'footer.socialLinks.srText.youtube',\n defaultMessage: 'Subscribe to the edX YouTube channel',\n description: 'This is screenreader text for the edX YouTube social media link in the footer.',\n },\n 'footer.socialLinks.srText.linkedin': {\n id: 'footer.socialLinks.srText.linkedin',\n defaultMessage: 'Follow edX on LinkedIn',\n description: 'This is screenreader text for the edX LinkedIn social media link in the footer.',\n },\n 'footer.socialLinks.srText.reddit': {\n id: 'footer.socialLinks.srText.reddit',\n defaultMessage: 'Subscribe to the edX subreddit',\n description: 'This is screenreader text for the edX reddit social media link in the footer.',\n },\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.edxLinks.about': {\n id: 'footer.edxLinks.about',\n defaultMessage: 'About',\n description: 'The label for the link to the about edX page.',\n },\n 'footer.edxLinks.business': {\n id: 'footer.edxLinks.business',\n defaultMessage: 'edX for Business',\n description: 'The label for the link to the edX for business page.',\n },\n 'footer.edxLinks.affiliates': {\n id: 'footer.edxLinks.affiliates',\n defaultMessage: 'Affiliates',\n description: 'The label for the link to the edX affiliates page.',\n },\n 'footer.edxLinks.openEdx': {\n id: 'footer.edxLinks.openEdx',\n defaultMessage: 'Open edX',\n description: 'The label for the link to the open edX site.',\n },\n 'footer.edxLinks.careers': {\n id: 'footer.edxLinks.careers',\n defaultMessage: 'Careers',\n description: 'The label for the link to the edX Careers page.',\n },\n 'footer.edxLinks.news': {\n id: 'footer.edxLinks.news',\n defaultMessage: 'News',\n description: 'The label for the link to the edX news page.',\n },\n 'footer.legalLinks.heading': {\n id: 'footer.legalLinks.heading',\n defaultMessage: 'Legal',\n description: 'Heading for the legal links section of the footer.',\n },\n 'footer.legalLinks.termsOfService': {\n id: 'footer.legalLinks.termsOfService',\n defaultMessage: 'Terms of Service & Honor Code',\n description: 'The label for the link to the edX terms of service page.',\n },\n 'footer.legalLinks.privacyPolicy': {\n id: 'footer.legalLinks.privacyPolicy',\n defaultMessage: 'Privacy Policy',\n description: 'The label for the link to the edX privacy policy page.',\n },\n 'footer.legalLinks.a11yPolicy': {\n id: 'footer.legalLinks.a11yPolicy',\n defaultMessage: 'Accessibility Policy',\n description: 'The label for the link to the edX accessibility policy page.',\n },\n 'footer.legalLinks.trademarkPolicy': {\n id: 'footer.legalLinks.trademarkPolicy',\n defaultMessage: 'Trademark Policy',\n description: 'The label for the link to the edX trademark policy page.',\n },\n 'footer.legalLinks.sitemap': {\n id: 'footer.legalLinks.sitemap',\n defaultMessage: 'Sitemap',\n description: 'The label for the link to the edX sitemap page.',\n },\n 'footer.connectLinks.heading': {\n id: 'footer.connectLinks.heading',\n defaultMessage: 'Connect',\n description: 'Heading for the connect links section of the footer.',\n },\n 'footer.connectLinks.blog': {\n id: 'footer.connectLinks.blog',\n defaultMessage: 'Blog',\n description: 'The label for the link to the edX blog.',\n },\n 'footer.connectLinks.contact': {\n id: 'footer.connectLinks.contact',\n defaultMessage: 'Contact Us',\n description: 'The label for the link to the contact edX page.',\n },\n 'footer.connectLinks.help': {\n id: 'footer.connectLinks.help',\n defaultMessage: 'Help Center',\n description: 'The label for the link to the edX help center.',\n },\n 'footer.connectLinks.mediaKit': {\n id: 'footer.connectLinks.mediaKit',\n defaultMessage: 'Media Kit',\n description: 'The label for the link to the edX media kit page.',\n },\n 'footer.connectLinks.donate': {\n id: 'footer.connectLinks.donate',\n defaultMessage: 'Donate',\n description: 'The label for the link to the edX donation page.',\n },\n 'footer.mobileApp.apple': {\n id: 'footer.mobileApp.apple',\n defaultMessage: 'Download the edX mobile app from the Apple App Store',\n description: 'The label for the link to download the apple version of the edX app.',\n },\n 'footer.mobileApp.google': {\n id: 'footer.mobileApp.google',\n defaultMessage: 'Download the edX mobile app from Google Play',\n description: 'The label for the link to download the google version of the edX app.',\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});\n\nexport default messages;\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,6BAA6B;AAE5D,IAAMC,QAAQ,GAAGD,cAAc,CAAC;EAC9B,oCAAoC,EAAE;IACpCE,EAAE,EAAE,oCAAoC;IACxCC,cAAc,EAAE,sBAAsB;IACtCC,WAAW,EAAE;EACf,CAAC;EACD,mCAAmC,EAAE;IACnCF,EAAE,EAAE,mCAAmC;IACvCC,cAAc,EAAE,uBAAuB;IACvCC,WAAW,EAAE;EACf,CAAC;EACD,mCAAmC,EAAE;IACnCF,EAAE,EAAE,mCAAmC;IACvCC,cAAc,EAAE,sCAAsC;IACtDC,WAAW,EAAE;EACf,CAAC;EACD,oCAAoC,EAAE;IACpCF,EAAE,EAAE,oCAAoC;IACxCC,cAAc,EAAE,wBAAwB;IACxCC,WAAW,EAAE;EACf,CAAC;EACD,kCAAkC,EAAE;IAClCF,EAAE,EAAE,kCAAkC;IACtCC,cAAc,EAAE,gCAAgC;IAChDC,WAAW,EAAE;EACf,CAAC;EACD,kCAAkC,EAAE;IAClCF,EAAE,EAAE,kCAAkC;IACtCC,cAAc,EAAE,iBAAiB;IACjCC,WAAW,EAAE;EACf,CAAC;EACD,kCAAkC,EAAE;IAClCF,EAAE,EAAE,kCAAkC;IACtCC,cAAc,EAAE,OAAO;IACvBC,WAAW,EAAE;EACf,CAAC;EACD,uBAAuB,EAAE;IACvBF,EAAE,EAAE,uBAAuB;IAC3BC,cAAc,EAAE,OAAO;IACvBC,WAAW,EAAE;EACf,CAAC;EACD,0BAA0B,EAAE;IAC1BF,EAAE,EAAE,0BAA0B;IAC9BC,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E,EAAE,0BAA0B;IAC9BC,cAAc,EAAE,MAAM;IACtBC,WAAW,EAAE;EACf,CAAC;EACD,6BAA6B,EAAE;IAC7BF,EAAE,EAAE,6BAA6B;IACjCC,cAAc,EAAE,YAAY;IAC5BC,WAAW,EAAE;EACf,CAAC;EACD,0BAA0B,EAAE;IAC1BF,EAAE,EAAE,0BAA0B;IAC9BC,cAAc,EAAE,aAAa;IAC7BC,WAAW,EAAE;EACf,CAAC;EACD,8BAA8B,EAAE;IAC9BF,EAAE,EAAE,8BAA8B;IAClCC,cAAc,EAAE,WAAW;IAC3BC,WAAW,EAAE;EACf,CAAC;EACD,4BAA4B,EAAE;IAC5BF,EAAE,EAAE,4BAA4B;IAChCC,cAAc,EAAE,QAAQ;IACxBC,WAAW,EAAE;EACf,CAAC;EACD,wBAAwB,EAAE;IACxBF,EAAE,EAAE,wBAAwB;IAC5BC,cAAc,EAAE,sDAAsD;IACtEC,WAAW,EAAE;EACf,CAAC;EACD,yBAAyB,EAAE;IACzBF,EAAE,EAAE,yBAAyB;IAC7BC,cAAc,EAAE,8CAA8C;IAC9DC,WAAW,EAAE;EACf,CAAC;EACD,qBAAqB,EAAE;IACrBF,EAAE,EAAE,qBAAqB;IACzBC,cAAc,EAAE,qBAAqB;IACrCC,WAAW,EAAE;EACf,CAAC;EACD,uBAAuB,EAAE;IACvBF,EAAE,EAAE,uBAAuB;IAC3BC,cAAc,EAAE,UAAU;IAC1BC,WAAW,EAAE;EACf,CAAC;EACD,kBAAkB,EAAE;IAClBF,EAAE,EAAE,kBAAkB;IACtBC,cAAc,EAAE,aAAa;IAC7BC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAEF,eAAeH,QAAQ","ignoreList":[]}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
var _excluded = ["intl", "options", "onSubmit"];
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
5
|
+
import React from 'react';
|
6
|
+
import PropTypes from 'prop-types';
|
7
|
+
import { injectIntl, intlShape, FormattedMessage } from '@edx/frontend-platform/i18n';
|
8
|
+
var LanguageSelector = function LanguageSelector(_ref) {
|
9
|
+
var intl = _ref.intl,
|
10
|
+
options = _ref.options,
|
11
|
+
onSubmit = _ref.onSubmit,
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
13
|
+
var handleSubmit = function handleSubmit(e) {
|
14
|
+
e.preventDefault();
|
15
|
+
var languageCode = e.target.elements['site-footer-language-select'].value;
|
16
|
+
onSubmit(languageCode);
|
17
|
+
};
|
18
|
+
return /*#__PURE__*/React.createElement("form", _extends({
|
19
|
+
className: "form-inline",
|
20
|
+
onSubmit: handleSubmit
|
21
|
+
}, props), /*#__PURE__*/React.createElement("div", {
|
22
|
+
className: "form-group"
|
23
|
+
}, /*#__PURE__*/React.createElement("label", {
|
24
|
+
htmlFor: "site-footer-language-select",
|
25
|
+
className: "d-inline-block m-0"
|
26
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
27
|
+
id: "footer.languageForm.select.label",
|
28
|
+
defaultMessage: "Choose Language",
|
29
|
+
description: "The label for the laguage select part of the language selection form."
|
30
|
+
})), /*#__PURE__*/React.createElement("select", {
|
31
|
+
id: "site-footer-language-select",
|
32
|
+
className: "form-control-sm mx-2",
|
33
|
+
name: "site-footer-language-select",
|
34
|
+
defaultValue: intl.locale
|
35
|
+
}, options.map(function (_ref2) {
|
36
|
+
var value = _ref2.value,
|
37
|
+
label = _ref2.label;
|
38
|
+
return /*#__PURE__*/React.createElement("option", {
|
39
|
+
key: value,
|
40
|
+
value: value
|
41
|
+
}, label);
|
42
|
+
})), /*#__PURE__*/React.createElement("button", {
|
43
|
+
"data-testid": "site-footer-submit-btn",
|
44
|
+
className: "btn btn-outline-primary btn-sm",
|
45
|
+
type: "submit"
|
46
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
47
|
+
id: "footer.languageForm.submit.label",
|
48
|
+
defaultMessage: "Apply",
|
49
|
+
description: "The label for button to submit the language selection form."
|
50
|
+
}))));
|
51
|
+
};
|
52
|
+
LanguageSelector.propTypes = {
|
53
|
+
intl: intlShape.isRequired,
|
54
|
+
onSubmit: PropTypes.func.isRequired,
|
55
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
56
|
+
value: PropTypes.string,
|
57
|
+
label: PropTypes.string
|
58
|
+
})).isRequired
|
59
|
+
};
|
60
|
+
export default injectIntl(LanguageSelector);
|
61
|
+
//# sourceMappingURL=LanguageSelector.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"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 <form\n className=\"form-inline\"\n onSubmit={handleSubmit}\n {...props}\n >\n <div className=\"form-group\">\n {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}\n <label htmlFor=\"site-footer-language-select\" className=\"d-inline-block m-0\">\n <FormattedMessage\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 </label>\n <select\n id=\"site-footer-language-select\"\n className=\"form-control-sm mx-2\"\n name=\"site-footer-language-select\"\n defaultValue={intl.locale}\n >\n {options.map(({ value, label }) => <option key={value} value={value}>{label}</option>)}\n </select>\n <button data-testid=\"site-footer-submit-btn\" className=\"btn btn-outline-primary btn-sm\" type=\"submit\">\n <FormattedMessage\n id=\"footer.languageForm.submit.label\"\n defaultMessage=\"Apply\"\n description=\"The label for button to submit the language selection form.\"\n />\n </button>\n </div>\n </form>\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 })).isRequired,\n};\n\nexport default injectIntl(LanguageSelector);\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,EAAEC,SAAS,EAAEC,gBAAgB,QAAQ,6BAA6B;AAErF,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAEhB;EAAA,IADJC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAEjC,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,CAAC,EAAK;IAC1BA,CAAC,CAACC,cAAc,CAAC,CAAC;IAClB,IAAMC,YAAY,G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AI,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":[]}
|
@@ -0,0 +1,131 @@
|
|
1
|
+
var _excluded = ["containerClassName"];
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
5
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
6
|
+
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."); }
|
7
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
8
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
9
|
+
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; } }
|
10
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
11
|
+
import React, { useContext, useState } from 'react';
|
12
|
+
import _ from 'lodash';
|
13
|
+
import { useIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
|
14
|
+
import { ensureConfig } from '@edx/frontend-platform';
|
15
|
+
import { AppContext } from '@edx/frontend-platform/react';
|
16
|
+
import { ActionRow, Button, Container, Hyperlink, Image, TransitionReplace } from '@openedx/paragon';
|
17
|
+
import { ExpandLess, ExpandMore, Help } from '@openedx/paragon/icons';
|
18
|
+
import classNames from 'classnames';
|
19
|
+
import PropTypes from 'prop-types';
|
20
|
+
import messages from './messages';
|
21
|
+
import artLogo from "../../images/omnikampus/artistanbul-logo.png";
|
22
|
+
import "../../_footer.scss";
|
23
|
+
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');
|
24
|
+
var StudioFooter = function StudioFooter(_ref) {
|
25
|
+
var containerProps = _ref.containerProps;
|
26
|
+
var intl = useIntl();
|
27
|
+
var _useState = useState(false),
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
29
|
+
isOpen = _useState2[0],
|
30
|
+
setIsOpen = _useState2[1];
|
31
|
+
var _useContext = useContext(AppContext),
|
32
|
+
config = _useContext.config;
|
33
|
+
var _ref2 = containerProps || {},
|
34
|
+
containerClassName = _ref2.containerClassName,
|
35
|
+
restContainerProps = _objectWithoutProperties(_ref2, _excluded);
|
36
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
37
|
+
className: "studio-footer"
|
38
|
+
}, /*#__PURE__*/React.createElement("div", {
|
39
|
+
className: "m-0 mt-6 row align-items-center justify-content-center"
|
40
|
+
}, /*#__PURE__*/React.createElement("div", {
|
41
|
+
className: "col border-top mr-2"
|
42
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
43
|
+
"data-testid": "helpToggleButton",
|
44
|
+
variant: "outline-primary",
|
45
|
+
onClick: function onClick() {
|
46
|
+
return setIsOpen(!isOpen);
|
47
|
+
},
|
48
|
+
iconBefore: Help,
|
49
|
+
iconAfter: isOpen ? ExpandLess : ExpandMore,
|
50
|
+
size: "sm"
|
51
|
+
}, isOpen ? intl.formatMessage(messages.closeHelpButtonLabel) : intl.formatMessage(messages.openHelpButtonLabel)), /*#__PURE__*/React.createElement("div", {
|
52
|
+
className: "col border-top ml-2"
|
53
|
+
})), /*#__PURE__*/React.createElement(Container, _extends({
|
54
|
+
size: "xl",
|
55
|
+
className: classNames('px-4', containerClassName)
|
56
|
+
}, restContainerProps), /*#__PURE__*/React.createElement(TransitionReplace, null, isOpen ? /*#__PURE__*/React.createElement(ActionRow, {
|
57
|
+
key: "help-link-button-row",
|
58
|
+
className: "py-4",
|
59
|
+
"data-testid": "helpButtonRow"
|
60
|
+
}, /*#__PURE__*/React.createElement(ActionRow.Spacer, null), /*#__PURE__*/React.createElement(Button, {
|
61
|
+
as: "a",
|
62
|
+
href: "https://docs.edx.org/",
|
63
|
+
size: "sm"
|
64
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.edxDocumentationButtonLabel)), /*#__PURE__*/React.createElement(Button, {
|
65
|
+
as: "a",
|
66
|
+
href: "https://open.edx.org/",
|
67
|
+
size: "sm",
|
68
|
+
"data-testid": "openEdXPortalButton"
|
69
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.openEdxPortalButtonLabel)), /*#__PURE__*/React.createElement(Button, {
|
70
|
+
as: "a",
|
71
|
+
href: "https://www.edx.org/course/edx101-overview-of-creating-an-edx-course#.VO4eaLPF-n1",
|
72
|
+
size: "sm"
|
73
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.edx101ButtonLabel)), /*#__PURE__*/React.createElement(Button, {
|
74
|
+
as: "a",
|
75
|
+
href: "https://www.edx.org/course/studiox-creating-a-course-with-edx-studio",
|
76
|
+
size: "sm"
|
77
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.studioXButtonLabel)), !_.isEmpty(config.SUPPORT_EMAIL) && /*#__PURE__*/React.createElement(Button, {
|
78
|
+
as: "a",
|
79
|
+
href: "mailto:".concat(config.SUPPORT_EMAIL),
|
80
|
+
size: "sm",
|
81
|
+
"data-testid": "contactUsButton"
|
82
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.contactUsButtonLabel)), /*#__PURE__*/React.createElement(ActionRow.Spacer, null)) : null), /*#__PURE__*/React.createElement(ActionRow, {
|
83
|
+
className: "pt-3 m-0 x-small"
|
84
|
+
}, "\xA9 ", new Date().getFullYear(), " ", /*#__PURE__*/React.createElement(Hyperlink, {
|
85
|
+
destination: config.MARKETING_SITE_BASE_URL,
|
86
|
+
target: "_blank",
|
87
|
+
className: "ml-2"
|
88
|
+
}, config.SITE_NAME), /*#__PURE__*/React.createElement(ActionRow.Spacer, null), !_.isEmpty(config.TERMS_OF_SERVICE_URL) && /*#__PURE__*/React.createElement(Hyperlink, {
|
89
|
+
destination: config.TERMS_OF_SERVICE_URL,
|
90
|
+
"data-testid": "termsOfService"
|
91
|
+
}, intl.formatMessage(messages.termsOfServiceLinkLabel)), !_.isEmpty(config.PRIVACY_POLICY_URL) && /*#__PURE__*/React.createElement(Hyperlink, {
|
92
|
+
destination: config.PRIVACY_POLICY_URL,
|
93
|
+
"data-testid": "privacyPolicy"
|
94
|
+
}, intl.formatMessage(messages.privacyPolicyLinkLabel)), config.ENABLE_ACCESSIBILITY_PAGE === 'true' && /*#__PURE__*/React.createElement(Hyperlink, {
|
95
|
+
destination: "".concat(config.STUDIO_BASE_URL, "/accessibility"),
|
96
|
+
"data-testid": "accessibilityRequest"
|
97
|
+
}, intl.formatMessage(messages.accessibilityRequestLinkLabel)), /*#__PURE__*/React.createElement(Hyperlink, {
|
98
|
+
destination: config.LMS_BASE_URL
|
99
|
+
}, "LMS")), /*#__PURE__*/React.createElement(ActionRow, {
|
100
|
+
className: "mt-3 pb-4 x-small"
|
101
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.trademarkMessage), /*#__PURE__*/React.createElement(Hyperlink, {
|
102
|
+
className: "ml-1",
|
103
|
+
destination: "https://www.edx.org"
|
104
|
+
}, "edX Inc"), ".", /*#__PURE__*/React.createElement(ActionRow.Spacer, null), /*#__PURE__*/React.createElement("div", {
|
105
|
+
className: "studio-logo-box"
|
106
|
+
}, /*#__PURE__*/React.createElement("div", {
|
107
|
+
className: "art-logo"
|
108
|
+
}, /*#__PURE__*/React.createElement(Hyperlink, {
|
109
|
+
destination: "https://artistanbul.io",
|
110
|
+
className: "float-right"
|
111
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
112
|
+
width: "100px",
|
113
|
+
alt: "Powered by Artistanbul",
|
114
|
+
src: artLogo
|
115
|
+
}))), /*#__PURE__*/React.createElement(Hyperlink, {
|
116
|
+
destination: "https://open.edx.org",
|
117
|
+
className: "float-right"
|
118
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
119
|
+
width: "120px",
|
120
|
+
alt: "Powered by Open edX",
|
121
|
+
src: "https://logos.openedx.org/open-edx-logo-tag.png"
|
122
|
+
})))))));
|
123
|
+
};
|
124
|
+
StudioFooter.propTypes = {
|
125
|
+
containerProps: PropTypes.shape(Container.propTypes)
|
126
|
+
};
|
127
|
+
StudioFooter.defaultProps = {
|
128
|
+
containerProps: {}
|
129
|
+
};
|
130
|
+
export default StudioFooter;
|
131
|
+
//# sourceMappingURL=StudioFooter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"StudioFooter.js","names":["React","useContext","useState","_","useIntl","FormattedMessage","ensureConfig","AppContext","ActionRow","Button","Container","Hyperlink","Image","TransitionReplace","ExpandLess","ExpandMore","Help","classNames","PropTypes","messages","artLogo","StudioFooter","_ref","containerProps","intl","_useState","_useState2","_slicedToArray","isOpen","setIsOpen","_useContext","config","_ref2","containerClassName","restContainerProps","_objectWithoutProperties","_excluded","createElement","Fragment","className","variant","onClick","iconBefore","iconAfter","size","formatMessage","closeHelpButtonLabel","openHelpButtonLabel","_extends","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","shape","defaultProps"],"sources":["../../../src/components/studio-footer/StudioFooter.jsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\nimport _ from 'lodash';\nimport { useIntl, 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 classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\nimport messages from './messages';\n\nimport artLogo from \"../../images/omnikampus/artistanbul-logo.png\"\n\nimport \"../../_footer.scss\"\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 containerProps,\n}) => {\n const intl = useIntl();\n const [isOpen, setIsOpen] = useState(false);\n const { config } = useContext(AppContext);\n\n const { containerClassName, ...restContainerProps } = containerProps || {};\n\n return (\n <>\n <div className=\"studio-footer\">\n <div className=\"m-0 mt-6 row align-items-center justify-content-center\">\n <div className=\"col border-top mr-2\" />\n <Button\n data-testid=\"helpToggleButton\"\n variant=\"outline-primary\"\n onClick={() => 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 </Button>\n <div className=\"col border-top ml-2\" />\n </div>\n <Container\n size=\"xl\"\n className={classNames('px-4', containerClassName)}\n {...restContainerProps}\n >\n <TransitionReplace>\n {isOpen ? (\n <ActionRow key=\"help-link-button-row\" className=\"py-4\" data-testid=\"helpButtonRow\">\n <ActionRow.Spacer />\n <Button as=\"a\" href=\"https://docs.edx.org/\" size=\"sm\">\n <FormattedMessage {...messages.edxDocumentationButtonLabel} />\n </Button>\n <Button\n as=\"a\"\n href=\"https://open.edx.org/\"\n size=\"sm\"\n data-testid=\"openEdXPortalButton\"\n >\n <FormattedMessage {...messages.openEdxPortalButtonLabel} />\n </Button>\n <Button\n as=\"a\"\n href=\"https://www.edx.org/course/edx101-overview-of-creating-an-edx-course#.VO4eaLPF-n1\"\n size=\"sm\"\n >\n <FormattedMessage {...messages.edx101ButtonLabel} />\n </Button>\n <Button\n as=\"a\"\n href=\"https://www.edx.org/course/studiox-creating-a-course-with-edx-studio\"\n size=\"sm\"\n >\n <FormattedMessage {...messages.studioXButtonLabel} />\n </Button>\n {!_.isEmpty(config.SUPPORT_EMAIL) && (\n <Button\n as=\"a\"\n href={`mailto:${config.SUPPORT_EMAIL}`}\n size=\"sm\"\n data-testid=\"contactUsButton\"\n >\n <FormattedMessage {...messages.contactUsButtonLabel} />\n </Button>\n )}\n <ActionRow.Spacer />\n </ActionRow>\n ) : null}\n </TransitionReplace>\n <ActionRow className=\"pt-3 m-0 x-small\">\n © {new Date().getFullYear()} <Hyperlink destination={config.MARKETING_SITE_BASE_URL} target=\"_blank\" className=\"ml-2\">{config.SITE_NAME}</Hyperlink>\n <ActionRow.Spacer />\n {!_.isEmpty(config.TERMS_OF_SERVICE_URL) && (\n <Hyperlink destination={config.TERMS_OF_SERVICE_URL} data-testid=\"termsOfService\">\n {intl.formatMessage(messages.termsOfServiceLinkLabel)}\n </Hyperlink>\n )}{!_.isEmpty(config.PRIVACY_POLICY_URL) && (\n <Hyperlink destination={config.PRIVACY_POLICY_URL} data-testid=\"privacyPolicy\">\n {intl.formatMessage(messages.privacyPolicyLinkLabel)}\n </Hyperlink>\n )}\n {config.ENABLE_ACCESSIBILITY_PAGE === 'true' && (\n <Hyperlink\n destination={`${config.STUDIO_BASE_URL}/accessibility`}\n data-testid=\"accessibilityRequest\"\n >\n {intl.formatMessage(messages.accessibilityRequestLinkLabel)}\n </Hyperlink>\n )}\n <Hyperlink destination={config.LMS_BASE_URL}>LMS</Hyperlink>\n </ActionRow>\n <ActionRow className=\"mt-3 pb-4 x-small\">\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 <FormattedMessage {...messages.trademarkMessage} />\n <Hyperlink className=\"ml-1\" destination=\"https://www.edx.org\">edX Inc</Hyperlink>.\n <ActionRow.Spacer />\n <div className=\"studio-logo-box\">\n <div className=\"art-logo\">\n <Hyperlink destination=\"https://artistanbul.io\" className=\"float-right\">\n <Image\n width=\"100px\"\n alt=\"Powered by Artistanbul\"\n src={artLogo}\n />\n </Hyperlink>\n </div>\n <Hyperlink destination=\"https://open.edx.org\" className=\"float-right\">\n <Image\n width=\"120px\"\n alt=\"Powered by Open edX\"\n src=\"https://logos.openedx.org/open-edx-logo-tag.png\"\n />\n </Hyperlink>\n </div>\n </ActionRow>\n </Container>\n </div>\n </>\n );\n};\n\nStudioFooter.propTypes = {\n containerProps: PropTypes.shape(Container.propTypes),\n};\n\nStudioFooter.defaultProps = {\n containerProps: {},\n};\n\nexport default StudioFooter;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AACnD,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,OAAO,EAAEC,gBAAgB,QAAQ,6BAA6B;AACvE,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SACEC,SAAS,EACTC,MAAM,EACNC,SAAS,EACTC,SAAS,EACTC,KAAK,EACLC,iBAAiB,QACZ,kBAAkB;AACzB,SAASC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,wBAAwB;AACrE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,QAAQ,MAAM,YAAY;AAEjC,OAAOC,OAAO,MAAM,8CAA8C;AAElE,OAAO,oBAAoB;AAE3Bd,YAAY,CAAC,CACX,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,2BAA2B,CAC5B,EAAE,yBAAyB,CAAC;AAE7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,KAAA,CAAAqC,aAAA,CAAC1B,SAAS;IAACoD,WAAW,EAAC,sBAAsB;IAACxB,SAAS,EAAC;EAAa,gBACnEvC,KAAA,CAAAqC,aAAA,CAACzB,KAAK;IACJgE,KAAK,EAAC,OAAO;IACbC,GAAG,EAAC,qBAAqB;IACzBC,GAAG,EAAC;EAAiD,CACtD,CACQ,CACN,CACI,CACF,CACN,CACL,CAAC;AAEP,CAAC;AAEDzD,YAAY,CAAC0D,SAAS,GAAG;EACvBxD,cAAc,EAAEL,SAAS,CAAC8D,KAAK,CAACtE,SAAS,CAACqE,SAAS;AACrD,CAAC;AAED1D,YAAY,CAAC4D,YAAY,GAAG;EAC1B1D,cAAc,EAAE,CAAC;AACnB,CAAC;AAED,eAAeF,YAAY","ignoreList":[]}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
/* eslint-disable react/prop-types */
|
2
|
+
import React, { useMemo } from 'react';
|
3
|
+
import { fireEvent, render, screen } from '@testing-library/react';
|
4
|
+
import '@testing-library/jest-dom/extend-expect';
|
5
|
+
import { IntlProvider } from '@edx/frontend-platform/i18n';
|
6
|
+
import { AppContext } from '@edx/frontend-platform/react';
|
7
|
+
import StudioFooter from './StudioFooter';
|
8
|
+
import messages from './messages';
|
9
|
+
|
10
|
+
const config = {
|
11
|
+
LMS_BASE_URL: process.env.LMS_BASE_URL,
|
12
|
+
MARKETING_SITE_BASE_URL: process.env.MARKETING_SITE_BASE_URL,
|
13
|
+
TERMS_OF_SERVICE_URL: process.env.TERMS_OF_SERVICE_URL,
|
14
|
+
PRIVACY_POLICY_URL: process.env.PRIVACY_POLICY_URL,
|
15
|
+
SUPPORT_EMAIL: process.env.SUPPORT_EMAIL,
|
16
|
+
SITE_NAME: process.env.SITE_NAME,
|
17
|
+
STUDIO_BASE_URL: process.env.STUDIO_BASE_URL,
|
18
|
+
ENABLE_ACCESSIBILITY_PAGE: process.env.ENABLE_ACCESSIBILITY_PAGE,
|
19
|
+
};
|
20
|
+
|
21
|
+
let currentConfig = config;
|
22
|
+
const Component = ({ updateVariable }) => {
|
23
|
+
if (updateVariable) {
|
24
|
+
const [variable, value] = updateVariable;
|
25
|
+
currentConfig = {
|
26
|
+
...config,
|
27
|
+
[variable]: value,
|
28
|
+
};
|
29
|
+
}
|
30
|
+
const contextValue = useMemo(() => ({
|
31
|
+
authenticatedUser: null,
|
32
|
+
config: currentConfig,
|
33
|
+
}), []);
|
34
|
+
|
35
|
+
return (
|
36
|
+
<IntlProvider locale="en">
|
37
|
+
<AppContext.Provider value={contextValue}>
|
38
|
+
<StudioFooter />
|
39
|
+
</AppContext.Provider>
|
40
|
+
</IntlProvider>
|
41
|
+
);
|
42
|
+
};
|
43
|
+
|
44
|
+
jest.unmock('@openedx/paragon');
|
45
|
+
|
46
|
+
describe('Footer', () => {
|
47
|
+
describe('help section default view', () => {
|
48
|
+
it('help button should read Looking for help with Studio?', () => {
|
49
|
+
render(<Component />);
|
50
|
+
expect(screen.getByText(messages.openHelpButtonLabel.defaultMessage))
|
51
|
+
.toBeVisible();
|
52
|
+
});
|
53
|
+
it('help button link row should not be visible', () => {
|
54
|
+
render(<Component />);
|
55
|
+
expect(screen.queryByTestId('helpButtonRow')).toBeNull();
|
56
|
+
});
|
57
|
+
});
|
58
|
+
describe('help section expanded view', () => {
|
59
|
+
it('help button should read Hide Studio help', () => {
|
60
|
+
render(<Component />);
|
61
|
+
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
|
62
|
+
fireEvent.click(helpToggleButton);
|
63
|
+
expect(screen.getByText(messages.closeHelpButtonLabel.defaultMessage))
|
64
|
+
.toBeVisible();
|
65
|
+
});
|
66
|
+
it('help button link row should be visible', () => {
|
67
|
+
render(<Component />);
|
68
|
+
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
|
69
|
+
fireEvent.click(helpToggleButton);
|
70
|
+
expect(screen.getByTestId('helpButtonRow')).toBeVisible();
|
71
|
+
});
|
72
|
+
it('Open edX portal button should be visible', () => {
|
73
|
+
render(<Component />);
|
74
|
+
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
|
75
|
+
fireEvent.click(helpToggleButton);
|
76
|
+
expect(screen.getByTestId('openEdXPortalButton')).toBeVisible();
|
77
|
+
});
|
78
|
+
it('should not show contact us button', () => {
|
79
|
+
render(<Component />);
|
80
|
+
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
|
81
|
+
fireEvent.click(helpToggleButton);
|
82
|
+
expect(screen.queryByTestId('contactUsButton')).toBeNull();
|
83
|
+
});
|
84
|
+
it('should show contact us button', () => {
|
85
|
+
render(<Component updateVariable={['SUPPORT_EMAIL', 'support@email.com']} />);
|
86
|
+
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
|
87
|
+
fireEvent.click(helpToggleButton);
|
88
|
+
expect(screen.getByTestId('contactUsButton')).toBeVisible();
|
89
|
+
});
|
90
|
+
});
|
91
|
+
describe('policy link row', () => {
|
92
|
+
it('should only show LMS link', () => {
|
93
|
+
render(<Component />);
|
94
|
+
expect(screen.getByText('LMS')).toBeVisible();
|
95
|
+
expect(screen.queryByTestId('termsOfService')).toBeNull();
|
96
|
+
expect(screen.queryByTestId('privacyPolicy')).toBeNull();
|
97
|
+
expect(screen.queryByTestId('accessibilityRequest')).toBeNull();
|
98
|
+
});
|
99
|
+
it('should show terms of service link', () => {
|
100
|
+
render(<Component updateVariable={['TERMS_OF_SERVICE_URL', 'termsofserviceurl']} />);
|
101
|
+
expect(screen.getByText('LMS')).toBeVisible();
|
102
|
+
expect(screen.queryByTestId('termsOfService')).toBeVisible();
|
103
|
+
expect(screen.queryByTestId('privacyPolicy')).toBeNull();
|
104
|
+
expect(screen.queryByTestId('accessibilityRequest')).toBeNull();
|
105
|
+
});
|
106
|
+
it('should show privacy policy link', () => {
|
107
|
+
render(<Component updateVariable={['PRIVACY_POLICY_URL', 'privacypolicyurl']} />);
|
108
|
+
expect(screen.getByText('LMS')).toBeVisible();
|
109
|
+
expect(screen.queryByTestId('termsOfService')).toBeNull();
|
110
|
+
expect(screen.queryByTestId('privacyPolicy')).toBeVisible();
|
111
|
+
expect(screen.queryByTestId('accessibilityRequest')).toBeNull();
|
112
|
+
});
|
113
|
+
it('should show accessibilty request link', () => {
|
114
|
+
render(<Component updateVariable={['ENABLE_ACCESSIBILITY_PAGE', 'true']} />);
|
115
|
+
expect(screen.getByText('LMS')).toBeVisible();
|
116
|
+
expect(screen.queryByTestId('termsOfService')).toBeNull();
|
117
|
+
expect(screen.queryByTestId('privacyPolicy')).toBeNull();
|
118
|
+
expect(screen.queryByTestId('accessibilityRequest')).toBeVisible();
|
119
|
+
});
|
120
|
+
});
|
121
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
{"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":[]}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { defineMessages } from '@edx/frontend-platform/i18n';
|
2
|
+
var messages = defineMessages({
|
3
|
+
openHelpButtonLabel: {
|
4
|
+
id: 'authoring.footer.help.openHelp.button.label',
|
5
|
+
defaultMessage: 'Looking for help with Studio?',
|
6
|
+
description: 'Label for button that opens the collapsed section with help buttons'
|
7
|
+
},
|
8
|
+
closeHelpButtonLabel: {
|
9
|
+
id: 'authoring.footer.help.closeHelp.button.label',
|
10
|
+
defaultMessage: 'Hide Studio help',
|
11
|
+
description: 'Label for button that closes the collapsed section with help buttons'
|
12
|
+
},
|
13
|
+
edxDocumentationButtonLabel: {
|
14
|
+
id: 'authoring.footer.help.edxDocumentation.button.label',
|
15
|
+
defaultMessage: 'edX documentation',
|
16
|
+
description: 'Label for button that links to the edX documentation site'
|
17
|
+
},
|
18
|
+
openEdxPortalButtonLabel: {
|
19
|
+
id: 'authoring.footer.help.openEdxPortal.button.label',
|
20
|
+
defaultMessage: 'Open edX portal',
|
21
|
+
description: 'Label for button that links to the Open edX portal'
|
22
|
+
},
|
23
|
+
edx101ButtonLabel: {
|
24
|
+
id: 'authoring.footer.help.edx101.button.label',
|
25
|
+
defaultMessage: 'Enroll in edX 101',
|
26
|
+
description: 'Label for button that links to the edX 101 course'
|
27
|
+
},
|
28
|
+
studioXButtonLabel: {
|
29
|
+
id: 'authoring.footer.help.studioX.button.label',
|
30
|
+
defaultMessage: 'Enroll in StudioX',
|
31
|
+
description: 'Label for button that links to the edX StudioX course'
|
32
|
+
},
|
33
|
+
contactUsButtonLabel: {
|
34
|
+
id: 'authoring.footer.help.contactUs.button.label',
|
35
|
+
defaultMessage: 'Contact us',
|
36
|
+
description: 'Label for button that links to the email for partner support'
|
37
|
+
},
|
38
|
+
termsOfServiceLinkLabel: {
|
39
|
+
id: 'authoring.footer.termsOfService.link.label',
|
40
|
+
defaultMessage: 'Terms of Service',
|
41
|
+
description: 'Label for button that links to the terms of service page'
|
42
|
+
},
|
43
|
+
privacyPolicyLinkLabel: {
|
44
|
+
id: 'authoring.footer.privacyPolicy.link.label',
|
45
|
+
defaultMessage: 'Privacy Policy',
|
46
|
+
description: 'Label for button that links to the privacy policy page'
|
47
|
+
},
|
48
|
+
accessibilityRequestLinkLabel: {
|
49
|
+
id: 'authoring.footer.accessibilityRequest.link.label',
|
50
|
+
defaultMessage: 'Accessibility Accomodation Request',
|
51
|
+
description: 'Label for button that links to the accessibility accomodation requests page'
|
52
|
+
},
|
53
|
+
trademarkMessage: {
|
54
|
+
id: 'authoring.footer.trademark.message',
|
55
|
+
defaultMessage: 'edX and Open edX, and the edX and Open edX logos are registered trademarks of',
|
56
|
+
description: 'Message about the use of logos and names edX and Open edX'
|
57
|
+
}
|
58
|
+
});
|
59
|
+
export default messages;
|
60
|
+
//# sourceMappingURL=messages.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"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":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/i18n/index.js"],"sourcesContent":["export default {};\n"],"mappings":"AAAA,eAAe,CAAC,CAAC","ignoreList":[]}
|
Binary file
|
Binary file
|
Binary file
|
package/dist/index.js
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
import "babel-polyfill";
|
2
|
+
import React from "react";
|
3
|
+
import ReactDOM from "react-dom";
|
4
|
+
import { initialize, getConfig, subscribe, APP_READY } from "@edx/frontend-platform";
|
5
|
+
import { AppContext, AppProvider } from "@edx/frontend-platform/react";
|
6
|
+
import Footer from "./components/Footer";
|
7
|
+
import StudioFooter from "./components/studio-footer/StudioFooter";
|
8
|
+
import "./index.scss";
|
9
|
+
subscribe(APP_READY, function () {
|
10
|
+
ReactDOM.render(/*#__PURE__*/React.createElement(AppProvider, null, /*#__PURE__*/React.createElement(AppContext.Provider, {
|
11
|
+
value: {
|
12
|
+
authenticatedUser: null,
|
13
|
+
config: getConfig()
|
14
|
+
}
|
15
|
+
}, /*#__PURE__*/React.createElement(Footer, {
|
16
|
+
onLanguageSelected: function onLanguageSelected() {},
|
17
|
+
supportedLanguages: [{
|
18
|
+
label: "English",
|
19
|
+
value: "en"
|
20
|
+
}, {
|
21
|
+
label: "Español",
|
22
|
+
value: "es"
|
23
|
+
}]
|
24
|
+
}), /*#__PURE__*/React.createElement(StudioFooter, {
|
25
|
+
onLanguageSelected: function onLanguageSelected() {},
|
26
|
+
supportedLanguages: [{
|
27
|
+
label: "English",
|
28
|
+
value: "en"
|
29
|
+
}, {
|
30
|
+
label: "Español",
|
31
|
+
value: "es"
|
32
|
+
}]
|
33
|
+
}))), document.getElementById("root"));
|
34
|
+
});
|
35
|
+
initialize({
|
36
|
+
messages: []
|
37
|
+
});
|
38
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","ReactDOM","initialize","getConfig","subscribe","APP_READY","AppContext","AppProvider","Footer","StudioFooter","render","createElement","Provider","value","authenticatedUser","config","onLanguageSelected","supportedLanguages","label","document","getElementById","messages"],"sources":["../src/index.jsx"],"sourcesContent":["import \"babel-polyfill\";\n\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport {\n initialize,\n getConfig,\n subscribe,\n APP_READY,\n} from \"@edx/frontend-platform\";\nimport { AppContext, AppProvider } from \"@edx/frontend-platform/react\";\nimport Footer from \"./components/Footer\";\nimport StudioFooter from \"./components/studio-footer/StudioFooter\";\n\nimport \"./index.scss\";\n\nsubscribe(APP_READY, () => {\n ReactDOM.render(\n <AppProvider>\n <AppContext.Provider\n value={{\n authenticatedUser: null,\n config: getConfig(),\n }}\n >\n <Footer\n onLanguageSelected={() => {}}\n supportedLanguages={[\n { label: \"English\", value: \"en\" },\n { label: \"Español\", value: \"es\" },\n ]}\n />\n\n <StudioFooter\n onLanguageSelected={() => {}}\n supportedLanguages={[\n { label: \"English\", value: \"en\" },\n { label: \"Español\", value: \"es\" },\n ]}\n />\n </AppContext.Provider>\n </AppProvider>,\n document.getElementById(\"root\")\n );\n});\n\ninitialize({\n messages: [],\n});\n"],"mappings":"AAAA,OAAO,gBAAgB;AAEvB,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,WAAW;AAChC,SACEC,UAAU,EACVC,SAAS,EACTC,SAAS,EACTC,SAAS,QACJ,wBAAwB;AAC/B,SAASC,UAAU,EAAEC,WAAW,QAAQ,8BAA8B;AACtE,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,YAAY,MAAM,yCAAyC;AAElE,OAAO,cAAc;AAErBL,SAAS,CAACC,SAAS,EAAE,YAAM;EACzBJ,QAAQ,CAACS,MAAM,cACbV,KAAA,CAAAW,aAAA,CAACJ,WAAW,qBACVP,KAAA,CAAAW,aAAA,CAACL,UAAU,CAACM,QAAQ;IAClBC,KAAK,EAAE;MACLC,iBAAiB,EAAE,IAAI;MACvBC,MAAM,EAAEZ,SAAS,CAAC;IACpB;EAAE,gBAEFH,KAAA,CAAAW,aAAA,CAACH,MAAM;IACLQ,kBAAkB,EAAE,SAApBA,kBAAkBA,CAAA,EAAQ,CAAC,CAAE;IAC7BC,kBAAkB,EAAE,CAClB;MAAEC,KAAK,EAAE,SAAS;MAAEL,KAAK,EAAE;IAAK,CAAC,EACjC;MAAEK,KAAK,EAAE,SAAS;MAAEL,KAAK,EAAE;IAAK,CAAC;EACjC,CACH,CAAC,eAEFb,KAAA,CAAAW,aAAA,CAACF,YAAY;IACXO,kBAAkB,EAAE,SAApBA,kBAAkBA,CAAA,EAAQ,CAAC,CAAE;IAC7BC,kBAAkB,EAAE,CAClB;MAAEC,KAAK,EAAE,SAAS;MAAEL,KAAK,EAAE;IAAK,CAAC,EACjC;MAAEK,KAAK,EAAE,SAAS;MAAEL,KAAK,EAAE;IAAK,CAAC;EACjC,CACH,CACkB,CACV,CAAC,EACdM,QAAQ,CAACC,cAAc,CAAC,MAAM,CAChC,CAAC;AACH,CAAC,CAAC;AAEFlB,UAAU,CAAC;EACTmB,QAAQ,EAAE;AACZ,CAAC,CAAC","ignoreList":[]}
|
package/dist/index.scss
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
// These configuration values are usually set in webpack's EnvironmentPlugin however
|
2
|
+
// Jest does not use webpack so we need to set these so for testing
|
3
|
+
process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload';
|
4
|
+
process.env.BASE_URL = 'localhost:1995';
|
5
|
+
process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150';
|
6
|
+
process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token';
|
7
|
+
process.env.ECOMMERCE_BASE_URL = 'http://localhost:18130';
|
8
|
+
process.env.LANGUAGE_PREFERENCE_COOKIE_NAME = 'openedx-language-preference';
|
9
|
+
process.env.LMS_BASE_URL = 'http://localhost:18000';
|
10
|
+
process.env.LOGIN_URL = 'http://localhost:18000/login';
|
11
|
+
process.env.LOGOUT_URL = 'http://localhost:18000/login';
|
12
|
+
process.env.MARKETING_SITE_BASE_URL = 'http://localhost:18000';
|
13
|
+
process.env.ORDER_HISTORY_URL = 'localhost:1996/orders';
|
14
|
+
process.env.REFRESH_ACCESS_TOKEN_ENDPOINT = 'http://localhost:18000/login_refresh';
|
15
|
+
process.env.SEGMENT_KEY = 'segment_whoa';
|
16
|
+
process.env.SITE_NAME = 'edX';
|
17
|
+
process.env.USER_INFO_COOKIE_NAME = 'edx-user-info';
|
18
|
+
process.env.LOGO_URL = 'https://edx-cdn.org/v3/default/logo.svg';
|
19
|
+
process.env.LOGO_TRADEMARK_URL = 'https://edx-cdn.org/v3/default/logo-trademark.svg';
|
20
|
+
process.env.LOGO_WHITE_URL = 'https://edx-cdn.org/v3/default/logo-white.svg';
|
21
|
+
process.env.FAVICON_URL = 'https://edx-cdn.org/v3/default/favicon.ico';
|
22
|
+
process.env.ENABLE_ACCESSIBILITY_PAGE = 'false';
|