@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/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # MFE Footer Sumac
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://gitlab.artistanbul.io/edx/omnikampus/Themes/ege/mfe-footer-sumac.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](https://gitlab.artistanbul.io/edx/omnikampus/Themes/ege/mfe-footer-sumac/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
package/README.rst ADDED
@@ -0,0 +1,207 @@
1
+ #########################
2
+ frontend-component-footer
3
+ #########################
4
+
5
+ |Build Status| |Codecov| |npm_version| |npm_downloads| |license| |semantic-release|
6
+
7
+ ********
8
+ Purpose
9
+ ********
10
+
11
+ A generic footer for Open edX micro-frontend applications. It includes a logo and an optional language selector dropdown.
12
+
13
+ ***************
14
+ Getting Started
15
+ ***************
16
+
17
+ Prerequisites
18
+ =============
19
+
20
+ The `devstack`_ is currently recommended as a development environment for your
21
+ new MFE. If you start it with ``make dev.up.lms`` that should give you
22
+ everything you need as a companion to this frontend.
23
+
24
+ Note that it is also possible to use `Tutor`_ to develop an MFE. You can refer
25
+ to the `relevant tutor-mfe documentation`_ to get started using it.
26
+
27
+ .. _Devstack: https://github.com/openedx/devstack
28
+
29
+ .. _Tutor: https://github.com/overhangio/tutor
30
+
31
+ .. _relevant tutor-mfe documentation: https://github.com/overhangio/tutor-mfe#mfe-development
32
+
33
+ Requirements
34
+ ============
35
+
36
+ This component uses ``@edx/frontend-platform`` services such as i18n, analytics, configuration, and the ``AppContext`` React component, and expects that it has been loaded into a micro-frontend that has been properly initialized via ``@edx/frontend-platform``'s ``initialize`` function. `Please visit the frontend template application to see an example. <https://github.com/openedx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx>`_
37
+
38
+ Environment Variables
39
+ =====================
40
+
41
+ This component requires that the following environment variable be set by the consuming micro-frontend.
42
+
43
+ * ``LMS_BASE_URL`` - The URL of the LMS of your Open edX instance.
44
+ * ``LOGO_TRADEMARK_URL`` - This is a URL to a logo for use in the footer. This is a different environment variable than ``LOGO_URL`` (used in frontend-component-header) to accommodate sites that would like to have additional trademark information on a logo in the footer, such as a (tm) or (r) symbol.
45
+
46
+ Installation
47
+ ============
48
+
49
+ To install this footer into your Open edX micro-frontend, run the following command in your MFE:
50
+
51
+ ``npm i --save @edx/frontend-component-footer``
52
+
53
+ This will make the component available to be imported into your application.
54
+
55
+ Cloning and Startup
56
+ ===================
57
+
58
+ .. code-block::
59
+
60
+
61
+ 1. Clone your new repo:
62
+
63
+ ``git clone https://github.com/openedx/frontend-component-footer.git``
64
+
65
+ 2. Use node v18.x.
66
+
67
+ The current version of the micro-frontend build scripts support node 18.
68
+ Using other major versions of node *may* work, but this is unsupported. For
69
+ convenience, this repository includes an .nvmrc file to help in setting the
70
+ correct node version via `nvm <https://github.com/nvm-sh/nvm>`_.
71
+
72
+ 3. Install npm dependencies:
73
+
74
+ ``cd frontend-component-footer && npm ci``
75
+
76
+ 4. Start the dev server:
77
+
78
+ ``npm start``
79
+
80
+ Usage
81
+ =====
82
+
83
+ This library has the following exports:
84
+
85
+ * ``(default)``: The footer as a React component.
86
+ * ``messages``: Internationalization messages suitable for use with `@edx/frontend-platform/i18n <https://edx.github.io/frontend-platform/module-Internationalization.html>`_
87
+ * ``dist/footer.scss``: A SASS file which contains style information for the component. It should be imported into the micro-frontend's own SCSS file.
88
+
89
+ <Footer /> component props
90
+ ==========================
91
+
92
+ * onLanguageSelected: Provides the footer with an event handler for when the user selects a
93
+ language from its dropdown.
94
+ * supportedLanguages: An array of objects representing available languages. See example below for object shape.
95
+
96
+ Plugin
97
+ ======
98
+ The footer can be replaced using using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.
99
+
100
+ Information on how to utilize the ``FooterSlot`` component to do so is available in the `frontend-slot-footer repository <https://github.com/openedx/frontend-slot-footer/>`_.
101
+
102
+ Examples
103
+ ========
104
+
105
+ Component Usage Example::
106
+
107
+ import Footer, { messages } from '@edx/frontend-component-footer';
108
+
109
+ ...
110
+
111
+ <Footer
112
+ onLanguageSelected={(languageCode) => {/* set language */}}
113
+ supportedLanguages={[
114
+ { label: 'English', value: 'en'},
115
+ { label: 'Español', value: 'es' },
116
+ ]}
117
+ />
118
+
119
+ * `An example of minimal component and messages usage. <https://github.com/openedx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx#L23>`_
120
+ * `An example of SCSS file usage. <https://github.com/openedx/frontend-template-application/blob/3cd5485bf387b8c479baf6b02bf59e3061dc3465/src/index.scss#L9>`_
121
+
122
+
123
+
124
+ Development
125
+ ===========
126
+
127
+ Install dependencies::
128
+
129
+ npm i
130
+
131
+ Start the development server::
132
+
133
+ npm start
134
+
135
+ Build a production distribution::
136
+
137
+ npm run build
138
+
139
+ License
140
+ =======
141
+
142
+ The code in this repository is licensed under the AGPLv3 unless otherwise
143
+ noted.
144
+
145
+ Please see `LICENSE <LICENSE>`_ for details.
146
+
147
+ Contributing
148
+ ============
149
+
150
+ Contributions are very welcome. Please read `How To Contribute`_ for details.
151
+
152
+ .. _How To Contribute: https://openedx.org/r/how-to-contribute
153
+
154
+ This project is currently accepting all types of contributions, bug fixes,
155
+ security fixes, maintenance work, or new features. However, please make sure
156
+ to have a discussion about your new feature idea with the maintainers prior to
157
+ beginning development to maximize the chances of your change being accepted.
158
+ You can start a conversation by creating a new issue on this repo summarizing
159
+ your idea.
160
+
161
+ Getting Help
162
+ ===========
163
+
164
+ If you're having trouble, we have discussion forums at
165
+ https://discuss.openedx.org where you can connect with others in the community.
166
+
167
+ Our real-time conversations are on Slack. You can request a `Slack
168
+ invitation`_, then join our `community Slack workspace`_. Because this is a
169
+ frontend repository, the best place to discuss it would be in the `#wg-frontend
170
+ channel`_.
171
+
172
+ For anything non-trivial, the best path is to open an issue in this repository
173
+ with as many details about the issue you are facing as you can provide.
174
+
175
+ https://github.com/openedx/frontend-component-footer/issues
176
+
177
+ For more information about these options, see the `Getting Help`_ page.
178
+
179
+ .. _Slack invitation: https://openedx.org/slack
180
+ .. _community Slack workspace: https://openedx.slack.com/
181
+ .. _#wg-frontend channel: https://openedx.slack.com/archives/C04BM6YC7A6
182
+ .. _Getting Help: https://openedx.org/community/connect
183
+
184
+ The Open edX Code of Conduct
185
+ ============================
186
+
187
+ All community members are expected to follow the `Open edX Code of Conduct`_.
188
+
189
+ .. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/
190
+
191
+ Reporting Security Issues
192
+ =========================
193
+
194
+ Please do not report security issues in public. Please email security@openedx.org.
195
+
196
+ .. |Build Status| image:: https://api.travis-ci.com/edx/frontend-component-footer.svg?branch=master
197
+ :target: https://travis-ci.com/edx/frontend-component-footer
198
+ .. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-component-footer
199
+ :target: @edx/frontend-component-footer
200
+ .. |npm_version| image:: https://img.shields.io/npm/v/@edx/frontend-component-footer.svg
201
+ :target: @edx/frontend-component-footer
202
+ .. |npm_downloads| image:: https://img.shields.io/npm/dt/@edx/frontend-component-footer.svg
203
+ :target: @edx/frontend-component-footer
204
+ .. |license| image:: https://img.shields.io/npm/l/@edx/frontend-component-footer.svg
205
+ :target: @edx/frontend-component-footer
206
+ .. |semantic-release| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
207
+ :target: https://github.com/semantic-release/semantic-release
@@ -0,0 +1,79 @@
1
+ $gray-footer: #fcfcfc !default;
2
+
3
+ // Filters:
4
+ $filter-white: brightness(0) saturate(100%) invert(100%) sepia(0%)
5
+ saturate(7498%) hue-rotate(168deg) brightness(100%) contrast(103%)
6
+ drop-shadow(0 2px 1px rgba(0, 0, 0, 0.05));
7
+
8
+ // Omnikampus Colors:
9
+ $green: #32ab5c;
10
+ $white: #ffffff;
11
+
12
+ #root {
13
+ .footer {
14
+ background-color: $green !important;
15
+
16
+ .omni-logos {
17
+ .logo-box {
18
+ a.logo {
19
+ img {
20
+ filter: $filter-white;
21
+ height: 50px;
22
+ }
23
+ }
24
+ }
25
+ }
26
+
27
+ form {
28
+ .form-group {
29
+ label {
30
+ color: $white;
31
+ }
32
+
33
+ .btn-outline-primary {
34
+ color: $white;
35
+ border-color: $white;
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ .studio-footer-disabled {
42
+ button.btn-outline-primary {
43
+ color: $green;
44
+ border-color: $green;
45
+
46
+ &:focus::before {
47
+ border-color: $green;
48
+ }
49
+ }
50
+
51
+ .btn-primary {
52
+ background-color: $green;
53
+ border-color: $green;
54
+
55
+ &:focus::before {
56
+ border-color: $green;
57
+ }
58
+ }
59
+
60
+ a.default-link {
61
+ color: $green;
62
+ }
63
+ }
64
+
65
+ .studio-footer {
66
+ .studio-logo-box {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 20px;
70
+ .art-logo {
71
+ padding: 0 5px;
72
+ img {
73
+ filter: brightness(0) saturate(100%) invert(14%) sepia(34%)
74
+ saturate(2846%) hue-rotate(185deg) brightness(94%) contrast(95%);
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,108 @@
1
+ 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); }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ 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); }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
+ import React from "react";
15
+ import PropTypes from "prop-types";
16
+ import { injectIntl, intlShape } from "@edx/frontend-platform/i18n";
17
+ import { sendTrackEvent } from "@edx/frontend-platform/analytics";
18
+ import { ensureConfig } from "@edx/frontend-platform";
19
+ import { AppContext } from "@edx/frontend-platform/react";
20
+ import messages from "./Footer.messages";
21
+ import LanguageSelector from "./LanguageSelector";
22
+ import logoArtistanbul from "../images/omnikampus/artistanbul-logo.png";
23
+ import logoOmnikampus from "../images/omnikampus/omnikampus-logo.png";
24
+ import "../_footer.scss";
25
+ ensureConfig(["LMS_BASE_URL", "LOGO_TRADEMARK_URL"], "Footer component");
26
+ var EVENT_NAMES = {
27
+ FOOTER_LINK: "edx.bi.footer.link"
28
+ };
29
+ var SiteFooter = /*#__PURE__*/function (_React$Component) {
30
+ function SiteFooter(props) {
31
+ var _this;
32
+ _classCallCheck(this, SiteFooter);
33
+ _this = _callSuper(this, SiteFooter, [props]);
34
+ _this.externalLinkClickHandler = _this.externalLinkClickHandler.bind(_this);
35
+ return _this;
36
+ }
37
+ _inherits(SiteFooter, _React$Component);
38
+ return _createClass(SiteFooter, [{
39
+ key: "externalLinkClickHandler",
40
+ value: function externalLinkClickHandler(event) {
41
+ var label = event.currentTarget.getAttribute("href");
42
+ var eventName = EVENT_NAMES.FOOTER_LINK;
43
+ var properties = {
44
+ category: "outbound_link",
45
+ label: label
46
+ };
47
+ sendTrackEvent(eventName, properties);
48
+ }
49
+ }, {
50
+ key: "render",
51
+ value: function render() {
52
+ var _this$props = this.props,
53
+ supportedLanguages = _this$props.supportedLanguages,
54
+ onLanguageSelected = _this$props.onLanguageSelected,
55
+ logo = _this$props.logo,
56
+ intl = _this$props.intl;
57
+ var showLanguageSelector = supportedLanguages.length > 0 && onLanguageSelected;
58
+ var config = this.context.config;
59
+ return /*#__PURE__*/React.createElement("footer", {
60
+ role: "contentinfo",
61
+ className: "footer d-flex border-top py-3 px-4"
62
+ }, /*#__PURE__*/React.createElement("div", {
63
+ className: "container-fluid d-flex"
64
+ }, /*#__PURE__*/React.createElement("div", {
65
+ className: "omni-logos"
66
+ }, /*#__PURE__*/React.createElement("div", {
67
+ className: "logo-box mb-2"
68
+ }, /*#__PURE__*/React.createElement("a", {
69
+ href: "https://www.artistanbul.io/",
70
+ className: "logo art-logo"
71
+ }, /*#__PURE__*/React.createElement("img", {
72
+ src: logoArtistanbul,
73
+ alt: "artistanbul-logo"
74
+ }))), /*#__PURE__*/React.createElement("div", {
75
+ className: "logo-box"
76
+ }, /*#__PURE__*/React.createElement("a", {
77
+ href: "https://www.omnikampus.com/",
78
+ className: "logo omni-logo"
79
+ }, /*#__PURE__*/React.createElement("img", {
80
+ src: logoOmnikampus,
81
+ alt: "omnikampus-logo"
82
+ })))), /*#__PURE__*/React.createElement("div", {
83
+ className: "flex-grow-1"
84
+ }), showLanguageSelector && /*#__PURE__*/React.createElement(LanguageSelector, {
85
+ options: supportedLanguages,
86
+ onSubmit: onLanguageSelected
87
+ })));
88
+ }
89
+ }]);
90
+ }(React.Component);
91
+ SiteFooter.contextType = AppContext;
92
+ SiteFooter.propTypes = {
93
+ intl: intlShape.isRequired,
94
+ logo: PropTypes.string,
95
+ onLanguageSelected: PropTypes.func,
96
+ supportedLanguages: PropTypes.arrayOf(PropTypes.shape({
97
+ label: PropTypes.string.isRequired,
98
+ value: PropTypes.string.isRequired
99
+ }))
100
+ };
101
+ SiteFooter.defaultProps = {
102
+ logo: undefined,
103
+ onLanguageSelected: undefined,
104
+ supportedLanguages: []
105
+ };
106
+ export default injectIntl(SiteFooter);
107
+ export { EVENT_NAMES };
108
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.js","names":["React","PropTypes","injectIntl","intlShape","sendTrackEvent","ensureConfig","AppContext","messages","LanguageSelector","logoArtistanbul","logoOmnikampus","EVENT_NAMES","FOOTER_LINK","SiteFooter","_React$Component","props","_this","_classCallCheck","_callSuper","externalLinkClickHandler","bind","_inherits","_createClass","key","value","event","label","currentTarget","getAttribute","eventName","properties","category","render","_this$props","supportedLanguages","onLanguageSelected","logo","intl","showLanguageSelector","length","config","context","createElement","role","className","href","src","alt","options","onSubmit","Component","contextType","propTypes","isRequired","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 } from \"@edx/frontend-platform\";\nimport { AppContext } from \"@edx/frontend-platform/react\";\n\nimport messages from \"./Footer.messages\";\nimport LanguageSelector from \"./LanguageSelector\";\n\nimport logoArtistanbul from \"../images/omnikampus/artistanbul-logo.png\";\nimport logoOmnikampus from \"../images/omnikampus/omnikampus-logo.png\";\n\nimport \"../_footer.scss\";\n\nensureConfig([\"LMS_BASE_URL\", \"LOGO_TRADEMARK_URL\"], \"Footer component\");\n\nconst EVENT_NAMES = {\n FOOTER_LINK: \"edx.bi.footer.link\",\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 { supportedLanguages, onLanguageSelected, logo, intl } = this.props;\n const showLanguageSelector =\n supportedLanguages.length > 0 && onLanguageSelected;\n const { config } = this.context;\n\n return (\n <footer role=\"contentinfo\" className=\"footer d-flex border-top py-3 px-4\">\n <div className=\"container-fluid d-flex\">\n <div className=\"omni-logos\">\n <div className=\"logo-box mb-2\">\n <a href=\"https://www.artistanbul.io/\" className=\"logo art-logo\">\n <img src={logoArtistanbul} alt=\"artistanbul-logo\" />\n </a>\n </div>\n <div className=\"logo-box\">\n <a href=\"https://www.omnikampus.com/\" className=\"logo omni-logo\">\n <img src={logoOmnikampus} alt=\"omnikampus-logo\" />\n </a>\n </div>\n </div>\n <div className=\"flex-grow-1\" />\n {showLanguageSelector && (\n <LanguageSelector\n options={supportedLanguages}\n onSubmit={onLanguageSelected}\n />\n )}\n </div>\n </footer>\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(\n PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n })\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,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,EAAEC,SAAS,QAAQ,6BAA6B;AACnE,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,cAAc,MAAM,0CAA0C;AAErE,OAAO,iBAAiB;AAExBL,YAAY,CAAC,CAAC,cAAc,EAAE,oBAAoB,CAAC,EAAE,kBAAkB,CAAC;AAExE,IAAMM,WAAW,GAAG;EAClBC,WAAW,EAAE;AACf,CAAC;AAAC,IAEIC,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AAC6C,YAAY,GAAG;EACxBtB,IAAI,EAAEuB,SAAS;EACfxB,kBAAkB,EAAEwB,SAAS;EAC7BzB,kBAAkB,EAAE;AACtB,CAAC;AAED,eAAehC,UAAU,CAACW,UAAU,CAAC;AACrC,SAASF,WAAW","ignoreList":[]}
@@ -0,0 +1,155 @@
1
+ import { defineMessages } from '@edx/frontend-platform/i18n';
2
+ var messages = defineMessages({
3
+ 'footer.socialLinks.srText.facebook': {
4
+ id: 'footer.socialLinks.srText.facebook',
5
+ defaultMessage: 'Like edX on Facebook',
6
+ description: 'This is screenreader text for the edX Facebook social media link in the footer.'
7
+ },
8
+ 'footer.socialLinks.srText.twitter': {
9
+ id: 'footer.socialLinks.srText.twitter',
10
+ defaultMessage: 'Follow edX on Twitter',
11
+ description: 'This is screenreader text for the edX Twitter social media link in the footer.'
12
+ },
13
+ 'footer.socialLinks.srText.youtube': {
14
+ id: 'footer.socialLinks.srText.youtube',
15
+ defaultMessage: 'Subscribe to the edX YouTube channel',
16
+ description: 'This is screenreader text for the edX YouTube social media link in the footer.'
17
+ },
18
+ 'footer.socialLinks.srText.linkedin': {
19
+ id: 'footer.socialLinks.srText.linkedin',
20
+ defaultMessage: 'Follow edX on LinkedIn',
21
+ description: 'This is screenreader text for the edX LinkedIn social media link in the footer.'
22
+ },
23
+ 'footer.socialLinks.srText.reddit': {
24
+ id: 'footer.socialLinks.srText.reddit',
25
+ defaultMessage: 'Subscribe to the edX subreddit',
26
+ description: 'This is screenreader text for the edX reddit social media link in the footer.'
27
+ },
28
+ 'footer.languageForm.select.label': {
29
+ id: 'footer.languageForm.select.label',
30
+ defaultMessage: 'Choose Language',
31
+ description: 'The label for the laguage select part of the language selection form.'
32
+ },
33
+ 'footer.languageForm.submit.label': {
34
+ id: 'footer.languageForm.submit.label',
35
+ defaultMessage: 'Apply',
36
+ description: 'The label for button to submit the language selection form.'
37
+ },
38
+ 'footer.edxLinks.about': {
39
+ id: 'footer.edxLinks.about',
40
+ defaultMessage: 'About',
41
+ description: 'The label for the link to the about edX page.'
42
+ },
43
+ 'footer.edxLinks.business': {
44
+ id: 'footer.edxLinks.business',
45
+ defaultMessage: 'edX for Business',
46
+ description: 'The label for the link to the edX for business page.'
47
+ },
48
+ 'footer.edxLinks.affiliates': {
49
+ id: 'footer.edxLinks.affiliates',
50
+ defaultMessage: 'Affiliates',
51
+ description: 'The label for the link to the edX affiliates page.'
52
+ },
53
+ 'footer.edxLinks.openEdx': {
54
+ id: 'footer.edxLinks.openEdx',
55
+ defaultMessage: 'Open edX',
56
+ description: 'The label for the link to the open edX site.'
57
+ },
58
+ 'footer.edxLinks.careers': {
59
+ id: 'footer.edxLinks.careers',
60
+ defaultMessage: 'Careers',
61
+ description: 'The label for the link to the edX Careers page.'
62
+ },
63
+ 'footer.edxLinks.news': {
64
+ id: 'footer.edxLinks.news',
65
+ defaultMessage: 'News',
66
+ description: 'The label for the link to the edX news page.'
67
+ },
68
+ 'footer.legalLinks.heading': {
69
+ id: 'footer.legalLinks.heading',
70
+ defaultMessage: 'Legal',
71
+ description: 'Heading for the legal links section of the footer.'
72
+ },
73
+ 'footer.legalLinks.termsOfService': {
74
+ id: 'footer.legalLinks.termsOfService',
75
+ defaultMessage: 'Terms of Service & Honor Code',
76
+ description: 'The label for the link to the edX terms of service page.'
77
+ },
78
+ 'footer.legalLinks.privacyPolicy': {
79
+ id: 'footer.legalLinks.privacyPolicy',
80
+ defaultMessage: 'Privacy Policy',
81
+ description: 'The label for the link to the edX privacy policy page.'
82
+ },
83
+ 'footer.legalLinks.a11yPolicy': {
84
+ id: 'footer.legalLinks.a11yPolicy',
85
+ defaultMessage: 'Accessibility Policy',
86
+ description: 'The label for the link to the edX accessibility policy page.'
87
+ },
88
+ 'footer.legalLinks.trademarkPolicy': {
89
+ id: 'footer.legalLinks.trademarkPolicy',
90
+ defaultMessage: 'Trademark Policy',
91
+ description: 'The label for the link to the edX trademark policy page.'
92
+ },
93
+ 'footer.legalLinks.sitemap': {
94
+ id: 'footer.legalLinks.sitemap',
95
+ defaultMessage: 'Sitemap',
96
+ description: 'The label for the link to the edX sitemap page.'
97
+ },
98
+ 'footer.connectLinks.heading': {
99
+ id: 'footer.connectLinks.heading',
100
+ defaultMessage: 'Connect',
101
+ description: 'Heading for the connect links section of the footer.'
102
+ },
103
+ 'footer.connectLinks.blog': {
104
+ id: 'footer.connectLinks.blog',
105
+ defaultMessage: 'Blog',
106
+ description: 'The label for the link to the edX blog.'
107
+ },
108
+ 'footer.connectLinks.contact': {
109
+ id: 'footer.connectLinks.contact',
110
+ defaultMessage: 'Contact Us',
111
+ description: 'The label for the link to the contact edX page.'
112
+ },
113
+ 'footer.connectLinks.help': {
114
+ id: 'footer.connectLinks.help',
115
+ defaultMessage: 'Help Center',
116
+ description: 'The label for the link to the edX help center.'
117
+ },
118
+ 'footer.connectLinks.mediaKit': {
119
+ id: 'footer.connectLinks.mediaKit',
120
+ defaultMessage: 'Media Kit',
121
+ description: 'The label for the link to the edX media kit page.'
122
+ },
123
+ 'footer.connectLinks.donate': {
124
+ id: 'footer.connectLinks.donate',
125
+ defaultMessage: 'Donate',
126
+ description: 'The label for the link to the edX donation page.'
127
+ },
128
+ 'footer.mobileApp.apple': {
129
+ id: 'footer.mobileApp.apple',
130
+ defaultMessage: 'Download the edX mobile app from the Apple App Store',
131
+ description: 'The label for the link to download the apple version of the edX app.'
132
+ },
133
+ 'footer.mobileApp.google': {
134
+ id: 'footer.mobileApp.google',
135
+ defaultMessage: 'Download the edX mobile app from Google Play',
136
+ description: 'The label for the link to download the google version of the edX app.'
137
+ },
138
+ 'footer.logo.altText': {
139
+ id: 'footer.logo.altText',
140
+ defaultMessage: 'Powered by Open edX',
141
+ description: 'alt text for the footer logo.'
142
+ },
143
+ 'footer.logo.ariaLabel': {
144
+ id: 'footer.logo.ariaLabel',
145
+ defaultMessage: 'edX Home',
146
+ description: 'aria-label for the footer logo.'
147
+ },
148
+ 'footer.ariaLabel': {
149
+ id: 'footer.ariaLabel',
150
+ defaultMessage: 'Page Footer',
151
+ description: 'aria-label for the footer component'
152
+ }
153
+ });
154
+ export default messages;
155
+ //# sourceMappingURL=Footer.messages.js.map