@epec-fcfm-uchile/frontend-component-header 1.0.38 → 1.0.39
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.
|
@@ -20,7 +20,7 @@ var LearningHeader = function LearningHeader(_ref) {
|
|
|
20
20
|
var _useContext = useContext(AppContext),
|
|
21
21
|
authenticatedUser = _useContext.authenticatedUser;
|
|
22
22
|
var headerLogo = /*#__PURE__*/React.createElement(LogoSlot, {
|
|
23
|
-
href: "".concat(login_domain, "/"),
|
|
23
|
+
href: "https://".concat(login_domain, "/"),
|
|
24
24
|
src: getConfig().LOGO_URL,
|
|
25
25
|
alt: getConfig().SITE_NAME
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningHeader.js","names":["React","useContext","PropTypes","getConfig","useIntl","AppContext","AuthenticatedUserDropdown","LogoSlot","CourseInfoSlot","courseInfoDataShape","messages","Cookies","login_subdomain","get","login_domain","concat","trim","toLowerCase","replace","LearningHeader","_ref","courseOrg","courseNumber","courseTitle","showUserDropdown","intl","_useContext","authenticatedUser","headerLogo","createElement","href","src","LOGO_URL","alt","SITE_NAME","className","formatMessage","skipNavLink","style","lineHeight","Fragment","username","email","propTypes","bool","defaultProps"],"sources":["../../src/learning-header/LearningHeader.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { getConfig } from '@edx/frontend-platform';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport { AppContext } from '@edx/frontend-platform/react';\n\nimport AuthenticatedUserDropdown from './AuthenticatedUserDropdown';\nimport LogoSlot from '../plugin-slots/LogoSlot';\nimport CourseInfoSlot from '../plugin-slots/CourseInfoSlot';\nimport { courseInfoDataShape } from './LearningHeaderCourseInfo';\nimport messages from './messages';\nimport Cookies from 'js-cookie';\nconst login_subdomain = Cookies.get('_epec_session_subdomain');\nconst login_domain = (typeof login_subdomain ==='string' && login_subdomain)?`${login_subdomain.trim().toLowerCase().replace(/[^a-z]/g, '')}.fcfmonline.cl`:'app.fcfmonline.cl';\n\nconst LearningHeader = ({\n courseOrg,\n courseNumber,\n courseTitle,\n showUserDropdown,\n}) => {\n const intl = useIntl();\n const { authenticatedUser } = useContext(AppContext);\n\n const headerLogo = (\n <LogoSlot\n href={
|
|
1
|
+
{"version":3,"file":"LearningHeader.js","names":["React","useContext","PropTypes","getConfig","useIntl","AppContext","AuthenticatedUserDropdown","LogoSlot","CourseInfoSlot","courseInfoDataShape","messages","Cookies","login_subdomain","get","login_domain","concat","trim","toLowerCase","replace","LearningHeader","_ref","courseOrg","courseNumber","courseTitle","showUserDropdown","intl","_useContext","authenticatedUser","headerLogo","createElement","href","src","LOGO_URL","alt","SITE_NAME","className","formatMessage","skipNavLink","style","lineHeight","Fragment","username","email","propTypes","bool","defaultProps"],"sources":["../../src/learning-header/LearningHeader.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { getConfig } from '@edx/frontend-platform';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport { AppContext } from '@edx/frontend-platform/react';\n\nimport AuthenticatedUserDropdown from './AuthenticatedUserDropdown';\nimport LogoSlot from '../plugin-slots/LogoSlot';\nimport CourseInfoSlot from '../plugin-slots/CourseInfoSlot';\nimport { courseInfoDataShape } from './LearningHeaderCourseInfo';\nimport messages from './messages';\nimport Cookies from 'js-cookie';\nconst login_subdomain = Cookies.get('_epec_session_subdomain');\nconst login_domain = (typeof login_subdomain ==='string' && login_subdomain)?`${login_subdomain.trim().toLowerCase().replace(/[^a-z]/g, '')}.fcfmonline.cl`:'app.fcfmonline.cl';\n\nconst LearningHeader = ({\n courseOrg,\n courseNumber,\n courseTitle,\n showUserDropdown,\n}) => {\n const intl = useIntl();\n const { authenticatedUser } = useContext(AppContext);\n\n const headerLogo = (\n <LogoSlot\n href={`https://${login_domain}/`}\n src={getConfig().LOGO_URL}\n alt={getConfig().SITE_NAME}\n />\n );\n\n return (\n <header className=\"learning-header align-items-center\">\n <a className=\"sr-only sr-only-focusable\" href=\"#main-content\">{intl.formatMessage(messages.skipNavLink)}</a>\n <div className=\"d-flex align-items-center px-1 px-sm-3 sub-learning-header justify-content-between\">\n {headerLogo}\n <div className=\"flex-grow-1 course-title-lockup d-none d-sm-flex\" style={{ lineHeight: 1 }}>\n <CourseInfoSlot courseOrg={courseOrg} courseNumber={courseNumber} courseTitle={courseTitle} />\n </div>\n {showUserDropdown && authenticatedUser && (\n <>\n <AuthenticatedUserDropdown\n username={authenticatedUser.username} email={authenticatedUser.email}\n />\n </>\n )}\n {showUserDropdown && !authenticatedUser && (\n <div></div>\n )}\n </div>\n </header>\n );\n};\n\nLearningHeader.propTypes = {\n courseOrg: courseInfoDataShape.courseOrg,\n courseNumber: courseInfoDataShape.courseNumber,\n courseTitle: courseInfoDataShape.courseTitle,\n showUserDropdown: PropTypes.bool,\n};\n\nLearningHeader.defaultProps = {\n courseOrg: null,\n courseNumber: null,\n courseTitle: null,\n showUserDropdown: true,\n};\n\nexport default LearningHeader;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,wBAAwB;AAClD,SAASC,OAAO,QAAQ,6BAA6B;AACrD,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAOC,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,QAAQ,MAAM,0BAA0B;AAC/C,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,OAAO,MAAM,WAAW;AAC/B,IAAMC,eAAe,GAAGD,OAAO,CAACE,GAAG,CAAC,yBAAyB,CAAC;AAC9D,IAAMC,YAAY,GAAI,OAAOF,eAAe,KAAI,QAAQ,IAAIA,eAAe,MAAAG,MAAA,CAAKH,eAAe,CAACI,IAAI,CAAC,CAAC,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