@openedx/frontend-app-learner-dashboard 1.0.0-alpha.10 → 1.0.0-alpha.12

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.
@@ -1 +1,2 @@
1
1
  export declare const appId = "org.openedx.frontend.app.learnerDashboard";
2
+ export declare const dashboardRole = "org.openedx.frontend.role.dashboard";
package/dist/constants.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export const appId = 'org.openedx.frontend.app.learnerDashboard';
2
+ export const dashboardRole = 'org.openedx.frontend.role.dashboard';
2
3
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,2CAA2C,CAAC","sourcesContent":["export const appId = 'org.openedx.frontend.app.learnerDashboard';\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,2CAA2C,CAAC;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,qCAAqC,CAAC","sourcesContent":["export const appId = 'org.openedx.frontend.app.learnerDashboard';\nexport const dashboardRole = 'org.openedx.frontend.role.dashboard';\n"]}
@@ -6,6 +6,7 @@ import { EXECUTIVE_EDUCATION_COURSE_MODES } from '../../../../data/constants/cou
6
6
  import track from '../../../../tracking';
7
7
  import { useCourseTrackingEvent, useCourseData } from '../../../../hooks';
8
8
  import { useInitializeLearnerHome } from '../../../../data/hooks';
9
+ import { baseAppUrl } from '../../../../data/services/lms/urls';
9
10
  import useActionDisabledState from '../hooks';
10
11
  import ActionButton from './ActionButton';
11
12
  import messages from './messages';
@@ -14,7 +15,7 @@ export const ResumeButton = ({ cardId }) => {
14
15
  const { formatMessage } = useIntl();
15
16
  const { data: learnerData } = useInitializeLearnerHome();
16
17
  const courseData = useCourseData(cardId);
17
- const resumeUrl = (_a = courseData === null || courseData === void 0 ? void 0 : courseData.courseRun) === null || _a === void 0 ? void 0 : _a.resumeUrl;
18
+ const resumeUrl = baseAppUrl((_a = courseData === null || courseData === void 0 ? void 0 : courseData.courseRun) === null || _a === void 0 ? void 0 : _a.resumeUrl);
18
19
  const execEdTrackingParam = useMemo(() => {
19
20
  const isExecEd2UCourse = EXECUTIVE_EDUCATION_COURSE_MODES.includes(courseData.enrollment.mode);
20
21
  const { authOrgId } = learnerData.enterpriseDashboard || {};
@@ -1 +1 @@
1
- {"version":3,"file":"ResumeButton.js","sourceRoot":"","sources":["../../../../../src/containers/CourseCard/components/CourseCardActions/ResumeButton.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,KAAK,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,sBAAsB,MAAM,UAAU,CAAC;AAC9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;;IACzC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,wBAAwB,EAAE,CAAC;IACzD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,0CAAE,SAAS,CAAC;IACnD,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;QACvC,MAAM,gBAAgB,GAAG,gCAAgC,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC/F,MAAM,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC,mBAAmB,IAAI,EAAE,CAAC;QAC5D,OAAO,gBAAgB,CAAC,CAAC,CAAC,WAAW,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACxD,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAClE,MAAM,EAAE,mBAAmB,EAAE,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAE/D,MAAM,WAAW,GAAG,sBAAsB,CACxC,KAAK,CAAC,MAAM,CAAC,kBAAkB,EAC/B,MAAM,EACN,SAAS,GAAG,mBAAmB,CAChC,CAAC;IACF,OAAO,CACL,KAAC,YAAY,IACX,QAAQ,EAAE,mBAAmB,EAC7B,EAAE,EAAC,GAAG,EACN,IAAI,EAAE,SAAS,GAAG,mBAAmB,EACrC,OAAO,EAAE,WAAW,YAEnB,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,GAClB,CAChB,CAAC;AACJ,CAAC,CAAC;AACF,YAAY,CAAC,SAAS,GAAG;IACvB,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;CACpC,CAAC;AACF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { EXECUTIVE_EDUCATION_COURSE_MODES } from '@src/data/constants/course';\nimport track from '@src/tracking';\nimport { useCourseTrackingEvent, useCourseData } from '@src/hooks';\nimport { useInitializeLearnerHome } from '@src/data/hooks';\nimport useActionDisabledState from '../hooks';\nimport ActionButton from './ActionButton';\nimport messages from './messages';\n\nexport const ResumeButton = ({ cardId }) => {\n const { formatMessage } = useIntl();\n const { data: learnerData } = useInitializeLearnerHome();\n const courseData = useCourseData(cardId);\n const resumeUrl = courseData?.courseRun?.resumeUrl;\n const execEdTrackingParam = useMemo(() => {\n const isExecEd2UCourse = EXECUTIVE_EDUCATION_COURSE_MODES.includes(courseData.enrollment.mode);\n const { authOrgId } = learnerData.enterpriseDashboard || {};\n return isExecEd2UCourse ? `?org_id=${authOrgId}` : '';\n }, [courseData.enrollment.mode, learnerData.enterpriseDashboard]);\n const { disableResumeCourse } = useActionDisabledState(cardId);\n\n const handleClick = useCourseTrackingEvent(\n track.course.enterCourseClicked,\n cardId,\n resumeUrl + execEdTrackingParam,\n );\n return (\n <ActionButton\n disabled={disableResumeCourse}\n as=\"a\"\n href={resumeUrl + execEdTrackingParam}\n onClick={handleClick}\n >\n {formatMessage(messages.resume)}\n </ActionButton>\n );\n};\nResumeButton.propTypes = {\n cardId: PropTypes.string.isRequired,\n};\nexport default ResumeButton;\n"]}
1
+ {"version":3,"file":"ResumeButton.js","sourceRoot":"","sources":["../../../../../src/containers/CourseCard/components/CourseCardActions/ResumeButton.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,KAAK,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,sBAAsB,MAAM,UAAU,CAAC;AAC9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,QAAQ,MAAM,YAAY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M,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;CACpC,CAAC;AACF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { EXECUTIVE_EDUCATION_COURSE_MODES } from '@src/data/constants/course';\nimport track from '@src/tracking';\nimport { useCourseTrackingEvent, useCourseData } from '@src/hooks';\nimport { useInitializeLearnerHome } from '@src/data/hooks';\nimport { baseAppUrl } from '@src/data/services/lms/urls';\nimport useActionDisabledState from '../hooks';\nimport ActionButton from './ActionButton';\nimport messages from './messages';\n\nexport const ResumeButton = ({ cardId }) => {\n const { formatMessage } = useIntl();\n const { data: learnerData } = useInitializeLearnerHome();\n const courseData = useCourseData(cardId);\n const resumeUrl = baseAppUrl(courseData?.courseRun?.resumeUrl);\n const execEdTrackingParam = useMemo(() => {\n const isExecEd2UCourse = EXECUTIVE_EDUCATION_COURSE_MODES.includes(courseData.enrollment.mode);\n const { authOrgId } = learnerData.enterpriseDashboard || {};\n return isExecEd2UCourse ? `?org_id=${authOrgId}` : '';\n }, [courseData.enrollment.mode, learnerData.enterpriseDashboard]);\n const { disableResumeCourse } = useActionDisabledState(cardId);\n\n const handleClick = useCourseTrackingEvent(\n track.course.enterCourseClicked,\n cardId,\n resumeUrl + execEdTrackingParam,\n );\n return (\n <ActionButton\n disabled={disableResumeCourse}\n as=\"a\"\n href={resumeUrl + execEdTrackingParam}\n onClick={handleClick}\n >\n {formatMessage(messages.resume)}\n </ActionButton>\n );\n};\nResumeButton.propTypes = {\n cardId: PropTypes.string.isRequired,\n};\nexport default ResumeButton;\n"]}
package/dist/routes.js CHANGED
@@ -8,13 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { authenticatedLoader } from '@openedx/frontend-base';
11
+ import { dashboardRole } from './constants';
11
12
  const routes = [
12
13
  {
13
14
  id: 'org.openedx.frontend.route.learnerDashboard.main',
14
15
  path: '/learner-dashboard',
15
16
  loader: authenticatedLoader,
16
17
  handle: {
17
- role: 'org.openedx.frontend.role.dashboard'
18
+ role: dashboardRole
18
19
  },
19
20
  lazy() {
20
21
  return __awaiter(this, void 0, void 0, function* () {
@@ -1 +1 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.jsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,MAAM,GAAG;IACb;QACE,EAAE,EAAE,kDAAkD;QACtD,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,mBAAmB;QAC3B,MAAM,EAAE;YACN,IAAI,EAAE,qCAAqC;SAC5C;QACK,IAAI;;gBACR,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACtC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;YACvC,CAAC;SAAA;KACF;CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { authenticatedLoader } from '@openedx/frontend-base';\n\nconst routes = [\n {\n id: 'org.openedx.frontend.route.learnerDashboard.main',\n path: '/learner-dashboard',\n loader: authenticatedLoader,\n handle: {\n role: 'org.openedx.frontend.role.dashboard'\n },\n async lazy () {\n const module = await import('./Main');\n return { Component: module.default };\n },\n }\n];\n\nexport default routes;\n"]}
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.jsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,MAAM,GAAG;IACb;QACE,EAAE,EAAE,kDAAkD;QACtD,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,mBAAmB;QAC3B,MAAM,EAAE;YACN,IAAI,EAAE,aAAa;SACpB;QACK,IAAI;;gBACR,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACtC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;YACvC,CAAC;SAAA;KACF;CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { authenticatedLoader } from '@openedx/frontend-base';\nimport { dashboardRole } from './constants';\n\nconst routes = [\n {\n id: 'org.openedx.frontend.route.learnerDashboard.main',\n path: '/learner-dashboard',\n loader: authenticatedLoader,\n handle: {\n role: dashboardRole\n },\n async lazy () {\n const module = await import('./Main');\n return { Component: module.default };\n },\n }\n];\n\nexport default routes;\n"]}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { LinkMenuItem, WidgetOperationTypes, getAppConfig } from '@openedx/frontend-base';
3
- import { appId } from '../../constants';
3
+ import { appId, dashboardRole } from '../../constants';
4
4
  import ConfirmEmailBanner from './ConfirmEmailBanner';
5
5
  import MasqueradeBar from './MasqueradeBar';
6
6
  import CoursesLink from './CoursesLink';
@@ -16,12 +16,18 @@ const app = {
16
16
  id: 'org.openedx.frontend.widget.learnerDashboard.headerConfirmEmail.v1',
17
17
  op: WidgetOperationTypes.PREPEND,
18
18
  component: ConfirmEmailBanner,
19
+ condition: {
20
+ active: [dashboardRole]
21
+ }
19
22
  },
20
23
  {
21
24
  slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',
22
25
  id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkCourses.v1',
23
26
  op: WidgetOperationTypes.APPEND,
24
- element: (_jsx(LinkMenuItem, { label: _jsx(CoursesLink, {}), url: "/", variant: "navLink" }))
27
+ element: (_jsx(LinkMenuItem, { label: _jsx(CoursesLink, {}), url: "/", variant: "navLink" })),
28
+ condition: {
29
+ active: [dashboardRole]
30
+ }
25
31
  },
26
32
  {
27
33
  slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',
@@ -29,6 +35,7 @@ const app = {
29
35
  op: WidgetOperationTypes.APPEND,
30
36
  element: (_jsx(ProgramsLinkMenuItem, { variant: "navLink" })),
31
37
  condition: {
38
+ active: [dashboardRole],
32
39
  callback: () => getAppConfig(appId).ENABLE_PROGRAMS === true,
33
40
  }
34
41
  },
@@ -37,6 +44,9 @@ const app = {
37
44
  id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkDiscover.v1',
38
45
  op: WidgetOperationTypes.APPEND,
39
46
  element: (_jsx(DiscoverLinkMenuItem, { variant: "navLink" })),
47
+ condition: {
48
+ active: [dashboardRole]
49
+ }
40
50
  },
41
51
  {
42
52
  slotId: 'org.openedx.frontend.slot.header.secondaryLinks.v1',
@@ -44,6 +54,7 @@ const app = {
44
54
  op: WidgetOperationTypes.APPEND,
45
55
  element: (_jsx(SupportLinkMenuItem, { variant: "navLink" })),
46
56
  condition: {
57
+ active: [dashboardRole],
47
58
  callback: () => getAppConfig(appId).SUPPORT_URL ? true : false,
48
59
  }
49
60
  },
@@ -54,6 +65,7 @@ const app = {
54
65
  relatedId: 'org.openedx.frontend.widget.header.desktopAuthenticatedMenuLogout.v1',
55
66
  element: (_jsx(OrderHistoryLinkMenuItem, { variant: "navLink" })),
56
67
  condition: {
68
+ active: [dashboardRole],
57
69
  callback: () => getAppConfig(appId).ORDER_HISTORY_URL ? true : false,
58
70
  }
59
71
  },
@@ -62,6 +74,9 @@ const app = {
62
74
  id: 'org.openedx.frontend.widget.learnerDashboard.headerMasqueradeBar.v1',
63
75
  op: WidgetOperationTypes.APPEND,
64
76
  component: MasqueradeBar,
77
+ condition: {
78
+ active: [dashboardRole]
79
+ }
65
80
  },
66
81
  ]
67
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/widgets/LearnerDashboardHeader/app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAO,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE/F,OAAO,EAAE,KAAK,EAA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E,EAAE,mEAAmE;YACvE,EAAE,EAAE,oBAAoB,CAAC,MAAM;YAC/B,OAAO,EAAE,CACP,KAAC,mBAAmB,IAClB,OAAO,EAAC,SAAS,GACjB,CACH;YACD,SAAS,EAAE;gBACT,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;aAC/D;SACF;QACD;YACE,MAAM,EAAE,uDAAuD;YAC/D,EAAE,EAAE,wEAAwE;YAC5E,EAAE,EAAE,oBAAoB,CAAC,aAAa;YACtC,SAAS,EAAE,sEAAsE;YACjF,OAAO,EAAE,CACP,KAAC,wBAAwB,IACvB,OAAO,EAAC,SAAS,GACjB,CACH;YACD,SAAS,EAAE;gBACT,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;aACrE;SACF;QACD;YACE,MAAM,EAAE,0CAA0C;YAClD,EAAE,EAAE,qEAAqE;YACzE,EAAE,EAAE,oBAAoB,CAAC,MAAM;YAC/B,SAAS,EAAE,aAAa;SACzB;KACF;CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { App, LinkMenuItem, WidgetOperationTypes, getAppConfig } from '@openedx/frontend-base';\n\nimport { appId } from '../../constants';\n\nimport ConfirmEmailBanner from './ConfirmEmailBanner';\nimport MasqueradeBar from './MasqueradeBar';\nimport CoursesLink from './CoursesLink';\nimport DiscoverLinkMenuItem from './DiscoverLinkMenuItem';\nimport ProgramsLinkMenuItem from './ProgramsLinkMenuItem';\nimport SupportLinkMenuItem from './SupportLinkMenuItem';\nimport OrderHistoryLinkMenuItem from './OrderHistoryLinkMenuItem';\n\nconst app: App = {\n appId: 'org.openedx.frontend.app.learnerDashboard.header',\n slots: [\n {\n slotId: 'org.openedx.frontend.slot.header.main.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerConfirmEmail.v1',\n op: WidgetOperationTypes.PREPEND,\n component: ConfirmEmailBanner,\n },\n {\n slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkCourses.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <LinkMenuItem\n label={<CoursesLink />}\n url=\"/\"\n variant=\"navLink\"\n />\n )\n },\n {\n slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkPrograms.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <ProgramsLinkMenuItem\n variant=\"navLink\"\n />\n ),\n condition: {\n callback: () => getAppConfig(appId).ENABLE_PROGRAMS === true,\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkDiscover.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <DiscoverLinkMenuItem\n variant=\"navLink\"\n />\n ),\n },\n {\n slotId: 'org.openedx.frontend.slot.header.secondaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkSupport.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <SupportLinkMenuItem\n variant=\"navLink\"\n />\n ),\n condition: {\n callback: () => getAppConfig(appId).SUPPORT_URL ? true : false,\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkOrderHistory.v1',\n op: WidgetOperationTypes.INSERT_BEFORE,\n relatedId: 'org.openedx.frontend.widget.header.desktopAuthenticatedMenuLogout.v1',\n element: (\n <OrderHistoryLinkMenuItem\n variant=\"navLink\"\n />\n ),\n condition: {\n callback: () => getAppConfig(appId).ORDER_HISTORY_URL ? true : false,\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.main.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerMasqueradeBar.v1',\n op: WidgetOperationTypes.APPEND,\n component: MasqueradeBar,\n },\n ]\n};\n\nexport default app;\n"]}
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/widgets/LearnerDashboardHeader/app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAO,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE/F,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,MAAM,GAAG,GAAQ;IACf,KAAK,EAAE,kDAAkD;IACzD,KAAK,EAAE;QACL;YACE,MAAM,EAAE,0CAA0C;YAClD,EAAE,EAAE,oEAAoE;YACxE,EAAE,EAAE,oBAAoB,CAAC,OAAO;YAChC,SAAS,EAAE,kBAAkB;YAC7B,SAAS,EAAE;gBACT,MAAM,EAAE,CAAC,aAAa,CAAC;aACxB;SACF;QACD;YACE,MAAM,EAAE,kDAAkD;YAC1D,EAAE,EAAE,mEAAmE;YACvE,EAAE,EAAE,oBAAoB,CAAC,MAAM;YAC/B,OAAO,EAAE,CACP,KAAC,YAAY,IACX,KAAK,EAAE,KAAC,WAAW,KAAG,EACtB,GAAG,EAAC,GAAG,EACP,OAAO,EAAC,SAAS,GACjB,CACH;YACD,SAAS,EAAE;gBACT,MAAM,EAAE,CAAC,aAAa,CAAC;aACxB;SACF;QACD;YACE,MAAM,EAAE,kDAAkD;YAC1D,EAAE,EAAE,oEAAoE;YACxE,EAAE,EAAE,oBAAoB,CAAC,MAAM;YAC/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EAAE,EAAE,qEAAqE;YACzE,EAAE,EAAE,oBAAoB,CAAC,MAAM;YAC/B,SAAS,EAAE,aAAa;YACxB,SAAS,EAAE;gBACT,MAAM,EAAE,CAAC,aAAa,CAAC;aACxB;SACF;KACF;CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { App, LinkMenuItem, WidgetOperationTypes, getAppConfig } from '@openedx/frontend-base';\n\nimport { appId, dashboardRole } from '../../constants';\n\nimport ConfirmEmailBanner from './ConfirmEmailBanner';\nimport MasqueradeBar from './MasqueradeBar';\nimport CoursesLink from './CoursesLink';\nimport DiscoverLinkMenuItem from './DiscoverLinkMenuItem';\nimport ProgramsLinkMenuItem from './ProgramsLinkMenuItem';\nimport SupportLinkMenuItem from './SupportLinkMenuItem';\nimport OrderHistoryLinkMenuItem from './OrderHistoryLinkMenuItem';\n\nconst app: App = {\n appId: 'org.openedx.frontend.app.learnerDashboard.header',\n slots: [\n {\n slotId: 'org.openedx.frontend.slot.header.main.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerConfirmEmail.v1',\n op: WidgetOperationTypes.PREPEND,\n component: ConfirmEmailBanner,\n condition: {\n active: [dashboardRole]\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkCourses.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <LinkMenuItem\n label={<CoursesLink />}\n url=\"/\"\n variant=\"navLink\"\n />\n ),\n condition: {\n active: [dashboardRole]\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkPrograms.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <ProgramsLinkMenuItem\n variant=\"navLink\"\n />\n ),\n condition: {\n active: [dashboardRole],\n callback: () => getAppConfig(appId).ENABLE_PROGRAMS === true,\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkDiscover.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <DiscoverLinkMenuItem\n variant=\"navLink\"\n />\n ),\n condition: {\n active: [dashboardRole]\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.secondaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkSupport.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <SupportLinkMenuItem\n variant=\"navLink\"\n />\n ),\n condition: {\n active: [dashboardRole],\n callback: () => getAppConfig(appId).SUPPORT_URL ? true : false,\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkOrderHistory.v1',\n op: WidgetOperationTypes.INSERT_BEFORE,\n relatedId: 'org.openedx.frontend.widget.header.desktopAuthenticatedMenuLogout.v1',\n element: (\n <OrderHistoryLinkMenuItem\n variant=\"navLink\"\n />\n ),\n condition: {\n active: [dashboardRole],\n callback: () => getAppConfig(appId).ORDER_HISTORY_URL ? true : false,\n }\n },\n {\n slotId: 'org.openedx.frontend.slot.header.main.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerMasqueradeBar.v1',\n op: WidgetOperationTypes.APPEND,\n component: MasqueradeBar,\n condition: {\n active: [dashboardRole]\n }\n },\n ]\n};\n\nexport default app;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openedx/frontend-app-learner-dashboard",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.12",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",