@edx/frontend-app-subscription-learner-dashboard 1.35.0 → 1.36.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/dist/containers/CoursesPanel/index.js +3 -2
- package/dist/containers/CoursesPanel/index.js.map +1 -1
- package/dist/containers/Dashboard/index.js +1 -4
- package/dist/containers/Dashboard/index.js.map +1 -1
- package/dist/containers/PopularCoursePanel/PopularCourses/index.js +2 -2
- package/dist/containers/PopularCoursePanel/PopularCourses/index.js.map +1 -1
- package/dist/containers/PopularCoursePanel/index.js +1 -1
- package/dist/containers/PopularCoursePanel/index.js.map +1 -1
- package/dist/containers/PopularCoursePanel/messages.d.ts +5 -0
- package/dist/containers/PopularCoursePanel/messages.js +5 -0
- package/dist/containers/PopularCoursePanel/messages.js.map +1 -1
- package/dist/containers/PopularProgramsPanel/PopularPrograms/index.js +2 -2
- package/dist/containers/PopularProgramsPanel/PopularPrograms/index.js.map +1 -1
- package/dist/containers/PopularProgramsPanel/index.js +1 -1
- package/dist/containers/PopularProgramsPanel/index.js.map +1 -1
- package/dist/containers/PopularProgramsPanel/messages.d.ts +5 -0
- package/dist/containers/PopularProgramsPanel/messages.js +5 -0
- package/dist/containers/PopularProgramsPanel/messages.js.map +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgress.js +8 -2
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgress.js.map +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.js +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.js.map +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/ProgressCardButton.js +3 -8
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/ProgressCardButton.js.map +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/messages.d.ts +5 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/messages.js +5 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/messages.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import React, { useMemo } from 'react';
|
|
|
3
3
|
import { useIntl } from '@openedx/frontend-base';
|
|
4
4
|
import { useInitializeSubsCourseDashboard } from '../../data/hooks';
|
|
5
5
|
import { CourseFilterControls } from '../../containers/CourseFilterControls';
|
|
6
|
+
import LoadingView from '../../containers/Dashboard/LoadingView';
|
|
6
7
|
import CourseListSlot from '../../slots/CourseListSlot';
|
|
7
8
|
import NoCoursesViewSlot from '../../slots/NoCoursesViewSlot';
|
|
8
9
|
import { useFilters } from '../../data/context';
|
|
@@ -16,7 +17,7 @@ import './index.scss';
|
|
|
16
17
|
*/
|
|
17
18
|
export const CoursesPanel = () => {
|
|
18
19
|
const { formatMessage } = useIntl();
|
|
19
|
-
const { data } = useInitializeSubsCourseDashboard();
|
|
20
|
+
const { data, isPending } = useInitializeSubsCourseDashboard();
|
|
20
21
|
const hasCourses = useMemo(() => {
|
|
21
22
|
var _a, _b;
|
|
22
23
|
return (((_a = data === null || data === void 0 ? void 0 : data.subscriptionCourses) === null || _a === void 0 ? void 0 : _a.length) || 0) > 0
|
|
@@ -41,7 +42,7 @@ export const CoursesPanel = () => {
|
|
|
41
42
|
numPages,
|
|
42
43
|
visibleList,
|
|
43
44
|
};
|
|
44
|
-
return (_jsxs("div", { className: "course-list-container", children: [_jsxs("div", { className: "course-list-heading-container mb-3", children: [_jsx("h2", { className: "course-list-title", children: formatMessage(messages.myCourses) }), _jsx("div", { className: "course-filter-controls-container", children: _jsx(CourseFilterControls, {}) })] }), hasCourses ? _jsx(CourseListSlot, { courseListData: courseListData }) : _jsx(NoCoursesViewSlot, {})] }));
|
|
45
|
+
return (_jsxs("div", { className: "course-list-container", children: [_jsxs("div", { className: "course-list-heading-container mb-3", children: [_jsx("h2", { className: "course-list-title", children: formatMessage(messages.myCourses) }), _jsx("div", { className: "course-filter-controls-container", children: _jsx(CourseFilterControls, {}) })] }), isPending ? (_jsx(LoadingView, {})) : (hasCourses ? _jsx(CourseListSlot, { courseListData: courseListData }) : _jsx(NoCoursesViewSlot, {}))] }));
|
|
45
46
|
};
|
|
46
47
|
CoursesPanel.propTypes = {};
|
|
47
48
|
export default CoursesPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/CoursesPanel/index.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,cAAc,CAAC;AAEtB;;;;EAIE;AACF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,EAAE,IAAI,EAAE,GAAG,gCAAgC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/CoursesPanel/index.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,WAAW,MAAM,uC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AAO,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAExC,uDAAuD;IACvD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,GAAG,CAAC,IAAI,UAAU,GAAG,QAAQ,EAAE,CAAC;YAC1C,aAAa,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1C,MAAM,cAAc,GAAG;QACrB,WAAW,EAAE,IAAI;QACjB,aAAa;QACb,QAAQ;QACR,WAAW;KACZ,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAK,SAAS,EAAC,oCAAoC,aACjD,aAAI,SAAS,EAAC,mBAAmB,YAAE,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAM,EAC1E,cAAK,SAAS,EAAC,kCAAkC,YAC/C,KAAC,oBAAoB,KAAG,GACpB,IACF,EACL,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,WAAW,KAAG,CAChB,CAAC,CAAC,CAAC,CACF,UAAU,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,cAAc,EAAE,cAAc,GAAI,CAAC,CAAC,CAAC,KAAC,iBAAiB,KAAG,CACxF,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,GAAG,EAAE,CAAC;AAE5B,eAAe,YAAY,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { useIntl } from '@openedx/frontend-base';\nimport { useInitializeSubsCourseDashboard } from '@src/data/hooks';\nimport { CourseFilterControls } from '@src/containers/CourseFilterControls';\nimport LoadingView from '@src/containers/Dashboard/LoadingView';\nimport CourseListSlot from '../../slots/CourseListSlot';\nimport NoCoursesViewSlot from '../../slots/NoCoursesViewSlot';\nimport { useFilters } from '@src/data/context';\n\nimport { getVisibleList } from '@src/utils/dataTransformers';\n\nimport messages from './messages';\n\nimport './index.scss';\n\n/**\n * Renders the list of CourseCards\n * Also houses the NoCoursesView to display if the user hasn't enrolled in any courses.\n * @returns List of courses as CourseCards or empty state\n*/\nexport const CoursesPanel = () => {\n const { formatMessage } = useIntl();\n const { data, isPending } = useInitializeSubsCourseDashboard();\n const hasCourses = useMemo(\n () =>\n (data?.subscriptionCourses?.length || 0) > 0\n || (data?.upgradeableCourses?.length || 0) > 0,\n [data],\n );\n const {\n filters, sortBy, pageNumber, setPageNumber,\n } = useFilters();\n const { visibleList, numPages } = useMemo(() => {\n const transformedCourses = data?.coursesByCardId\n ? Object.values(data.coursesByCardId)\n : [];\n return getVisibleList(\n transformedCourses,\n filters,\n sortBy,\n pageNumber,\n );\n }, [data, filters, sortBy, pageNumber]);\n\n // Clamp page number when filtered/mutated list shrinks\n React.useEffect(() => {\n if (numPages > 0 && pageNumber > numPages) {\n setPageNumber(1);\n }\n }, [numPages, pageNumber, setPageNumber]);\n\n const courseListData = {\n showFilters: true,\n setPageNumber,\n numPages,\n visibleList,\n };\n\n return (\n <div className=\"course-list-container\">\n <div className=\"course-list-heading-container mb-3\">\n <h2 className=\"course-list-title\">{formatMessage(messages.myCourses)}</h2>\n <div className=\"course-filter-controls-container\">\n <CourseFilterControls />\n </div>\n </div>\n {isPending ? (\n <LoadingView />\n ) : (\n hasCourses ? <CourseListSlot courseListData={courseListData} /> : <NoCoursesViewSlot />\n )}\n </div>\n );\n};\n\nCoursesPanel.propTypes = {};\n\nexport default CoursesPanel;\n"]}
|
|
@@ -8,7 +8,6 @@ import { DashboardContent } from './DashboardContent';
|
|
|
8
8
|
import DashboardModalSlot from '../../slots/DashboardModalSlot';
|
|
9
9
|
import PopularCoursePanel from '../PopularCoursePanel';
|
|
10
10
|
import PopularProgramsPanel from '../PopularProgramsPanel';
|
|
11
|
-
import LoadingView from './LoadingView';
|
|
12
11
|
import DashboardLayout from './DashboardLayout';
|
|
13
12
|
import hooks from './hooks';
|
|
14
13
|
import './index.scss';
|
|
@@ -24,9 +23,7 @@ export const Dashboard = () => {
|
|
|
24
23
|
const learnerSubscriptionData = (learnerData === null || learnerData === void 0 ? void 0 : learnerData.userSubscription) || {};
|
|
25
24
|
const userSubscriptionStartDate = (learnerSubscriptionData === null || learnerSubscriptionData === void 0 ? void 0 : learnerSubscriptionData.subscriptionStartDate) || '';
|
|
26
25
|
const hasCourses = useMemo(() => { var _a; return ((_a = data === null || data === void 0 ? void 0 : data.subscriptionCourses) === null || _a === void 0 ? void 0 : _a.length) > 0; }, [data]);
|
|
27
|
-
return (_jsx("div", { id: "learnerdashboardroot", children: _jsx("main", { children: _jsxs("div", { id: "dashboard-container", className: "d-flex flex-column p-2 pt-0", children: [_jsx("h1", { className: "sr-only", children: pageTitle }), !isPending && (_jsxs(_Fragment, { children: [_jsx(DashboardModalSlot, {}), (hasCourses && showSelectSessionModal) && _jsx(SelectSessionModal, {})] })), _jsx("div", { id: "dashboard-content", "data-testid": "dashboard-content", children:
|
|
28
|
-
? (_jsx(LoadingView, {}))
|
|
29
|
-
: (_jsxs(DashboardLayout, { children: [_jsx(DashboardHeader, { startDate: userSubscriptionStartDate }), _jsx(SubscriptionBanner, { learnerSubscriptionData: learnerSubscriptionData }), _jsx(DashboardHeroSlot, {}), _jsx(DashboardContent, {}), _jsx(PopularCoursePanel, {}), _jsx(PopularProgramsPanel, {})] })) })] }) }) }));
|
|
26
|
+
return (_jsx("div", { id: "learnerdashboardroot", children: _jsx("main", { children: _jsxs("div", { id: "dashboard-container", className: "d-flex flex-column p-2 pt-0", children: [_jsx("h1", { className: "sr-only", children: pageTitle }), !isPending && (_jsxs(_Fragment, { children: [_jsx(DashboardModalSlot, {}), (hasCourses && showSelectSessionModal) && _jsx(SelectSessionModal, {})] })), _jsx("div", { id: "dashboard-content", "data-testid": "dashboard-content", children: _jsxs(DashboardLayout, { children: [_jsx(DashboardHeader, { startDate: userSubscriptionStartDate }), _jsx(SubscriptionBanner, { learnerSubscriptionData: learnerSubscriptionData }), _jsx(DashboardHeroSlot, {}), _jsx(DashboardContent, {}), _jsx(PopularCoursePanel, {}), _jsx(PopularProgramsPanel, {})] }) })] }) }) }));
|
|
30
27
|
};
|
|
31
28
|
export default Dashboard;
|
|
32
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,kBAAkB,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAChE,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,kBAAkB,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAChE,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,OAAO,eAAe,MAAM,mBAAmB,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AI,sBAAsB,CAAC,IAAI,KAAC,kBAAkB,KAAG,IAChE,CACJ,EACD,cAAK,EAAE,EAAC,mBAAmB,iBAAa,mBAAmB,YACzD,MAAC,eAAe,eACd,KAAC,eAAe,IAAC,SAAS,EAAE,yBAAyB,GAAI,EACzD,KAAC,kBAAkB,IAAC,uBAAuB,EAAE,uBAAuB,GAAI,EACxE,KAAC,iBAAiB,KAAG,EACrB,KAAC,gBAAgB,KAAG,EACpB,KAAC,kBAAkB,KAAG,EACtB,KAAC,oBAAoB,KAAG,IACR,GACd,IACF,GACD,GACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport { DashboardHeader } from './DashboardHeader';\n\nimport { useSelectSessionModal } from '@src/data/context';\nimport { useInitializeSubsCourseDashboard } from '@src/data/hooks';\nimport SelectSessionModal from '../../containers/SelectSessionModal';\nimport { DashboardContent } from './DashboardContent';\nimport DashboardModalSlot from '../../slots/DashboardModalSlot';\nimport PopularCoursePanel from '../PopularCoursePanel';\nimport PopularProgramsPanel from '../PopularProgramsPanel';\n\nimport DashboardLayout from './DashboardLayout';\n\nimport hooks from './hooks';\nimport './index.scss';\nimport { SubscriptionBanner } from '../SubscriptionBanner';\nimport { useInitializeSubsDashboard } from '@src/data/hooks';\nimport DashboardHeroSlot from '@src/slots/DashboardHeroSlot';\n\n\nexport const Dashboard = () => {\n const { data, isPending } = useInitializeSubsCourseDashboard();\n const { data: learnerData } = useInitializeSubsDashboard();\n const { pageTitle } = hooks.useDashboardMessages();\n const { selectSessionModal } = useSelectSessionModal();\n const showSelectSessionModal = selectSessionModal.cardId !== null;\n const learnerSubscriptionData = learnerData?.userSubscription || {};\n const userSubscriptionStartDate = learnerSubscriptionData?.subscriptionStartDate || '';\n\n const hasCourses = useMemo(() => data?.subscriptionCourses?.length > 0, [data]);\n\n return (\n <div id=\"learnerdashboardroot\">\n <main>\n <div id=\"dashboard-container\" className=\"d-flex flex-column p-2 pt-0\">\n <h1 className=\"sr-only\">{pageTitle}</h1>\n {!isPending && (\n <>\n <DashboardModalSlot />\n {(hasCourses && showSelectSessionModal) && <SelectSessionModal />}\n </>\n )}\n <div id=\"dashboard-content\" data-testid=\"dashboard-content\">\n <DashboardLayout>\n <DashboardHeader startDate={userSubscriptionStartDate} />\n <SubscriptionBanner learnerSubscriptionData={learnerSubscriptionData} />\n <DashboardHeroSlot />\n <DashboardContent />\n <PopularCoursePanel />\n <PopularProgramsPanel />\n </DashboardLayout>\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Dashboard;\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ProductCard } from '../../ProductCard';
|
|
3
|
-
export const PopularCourses = ({ items
|
|
4
|
-
return (_jsx("div", { "data-testid": "popular-courses-items", children: _jsx("div", { className: "row g-3 flex-nowrap flex-md-wrap overflow-auto", children: items.map((item) => (_jsx("div", { className: "col-12 col-md-6 col-xl-3 d-flex mb-2", children: _jsx(ProductCard, { item: item
|
|
3
|
+
export const PopularCourses = ({ items }) => {
|
|
4
|
+
return (_jsx("div", { "data-testid": "popular-courses-items", children: _jsx("div", { className: "row g-3 flex-nowrap flex-md-wrap overflow-auto", children: items.map((item) => (_jsx("div", { className: "col-12 col-md-6 col-xl-3 d-flex mb-2", children: _jsx(ProductCard, { item: item }) }, item.objectID))) }) }));
|
|
5
5
|
};
|
|
6
6
|
export default PopularCourses;
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/PopularCoursePanel/PopularCourses/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/PopularCoursePanel/PopularCourses/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACnE,OAAO,CACL,6BAAiB,uBAAuB,YACtC,cAAK,SAAS,EAAC,gDAAgD,YAC5D,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,cAAyB,SAAS,EAAC,sCAAsC,YACvE,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI,IADnB,IAAI,CAAC,QAAQ,CAEjB,CACP,CAAC,GACE,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { FC } from 'react';\n\nimport { ProductCard } from '../../ProductCard';\nimport { PopularCoursesProps } from './data/types';\n\nexport const PopularCourses: FC<PopularCoursesProps> = ({ items }) => {\n return (\n <div data-testid=\"popular-courses-items\">\n <div className=\"row g-3 flex-nowrap flex-md-wrap overflow-auto\">\n {items.map((item) => (\n <div key={item.objectID} className=\"col-12 col-md-6 col-xl-3 d-flex mb-2\">\n <ProductCard item={item} />\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default PopularCourses;\n"]}
|
|
@@ -16,7 +16,7 @@ export const PopularCoursePanel = () => {
|
|
|
16
16
|
if (isError) {
|
|
17
17
|
return (_jsx("div", { className: "popular-courses-container mt-5 mb-3", "data-testid": "popular-courses-panel", children: _jsx(Alert, { variant: "danger", "data-testid": "popular-courses-error", children: formatMessage(messages.popularCoursesErrorText) }) }));
|
|
18
18
|
}
|
|
19
|
-
return (_jsxs("div", { className: "popular-courses-container mt-5 mb-3", "data-testid": "popular-courses-panel", children: [_jsx("div", { className: "popular-courses-heading-container mb-4", children: _jsx("h2", { children: formatMessage(messages.popularCoursesHeader) }) }),
|
|
19
|
+
return (_jsxs("div", { className: "popular-courses-container mt-5 mb-3", "data-testid": "popular-courses-panel", children: [_jsx("div", { className: "popular-courses-heading-container mb-4", children: _jsx("h2", { children: formatMessage(messages.popularCoursesHeader) }) }), isLoading ? (_jsx("p", { "data-testid": "popular-courses-loading", role: "status", "aria-live": "polite", children: formatMessage(messages.popularCoursesLoadingText) })) : (hasPopularCoursesData ? (_jsx(PopularCourses, { items: popularCoursesData })) : (_jsx(NoPopularCourseItems, {})))] }));
|
|
20
20
|
};
|
|
21
21
|
export default PopularCoursePanel;
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/PopularCoursePanel/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,OAAO,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAO,GAAG,EAAE;IACzC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,CAAC,YAAY,CAAC,GAAG,gBAAgB,EAAE,CAAC;IAC1C,MAAM,EACJ,IAAI,EAAE,kBAAkB,GAAG,EAAE,EAC7B,OAAO,EACP,SAAS,GACV,GAAG,gCAAgC,CAAC,YAAY,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC;IAC9E,MAAM,qBAAqB,GAAG,OAAO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OAAO,EACP,SAAS,GACV,GAAG,gCAAgC,CAAC,YAAY,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC;IAC9E,MAAM,qBAAqB,GAAG,OAAO,CACnC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EACnC,CAAC,kBAAkB,CAAC,CACrB,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,cAAK,SAAS,EAAC,qCAAqC,iBAAa,uBAAuB,YACtF,KAAC,KAAK,IAAC,OAAO,EAAC,QAAQ,iBAAa,uBAAuB,YACxD,aAAa,CAAC,QAAQ,CAAC,uBAAuB,CAAC,GAC1C,GACJ,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,eAAK,SAAS,EAAC,qCAAqC,iBAAa,uBAAuB,aACtF,cAAK,SAAS,EAAC,wCAAwC,YACrD,uBAAK,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAM,GACnD,EACL,SAAS,CAAC,CAAC,CAAC,CACX,2BACc,yBAAyB,EACrC,IAAI,EAAC,QAAQ,eACH,QAAQ,YAEjB,aAAa,CAAC,QAAQ,CAAC,yBAAyB,CAAC,GAChD,CACL,CAAC,CAAC,CAAC,CACF,qBAAqB,CAAC,CAAC,CAAC,CACtB,KAAC,cAAc,IACb,KAAK,EAAE,kBAAkB,GACzB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,oBAAoB,KAAG,CACzB,CACF,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { FC, useMemo } from 'react';\nimport { Alert } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { usePopularCoursesAndProgramsData } from '@src/hooks/usePopularCoursesAndPrograms';\nimport { useAlgoliaSearch } from '@src/utils/algoliaUtils';\nimport messages from './messages';\nimport NoPopularCourseItems from './NoPopularCourseItems';\nimport PopularCourses from './PopularCourses';\nimport { PRODUCT_TYPE_COURSE } from '@src/constants';\n\nexport const PopularCoursePanel: FC = () => {\n const { formatMessage } = useIntl();\n const [searchClient] = useAlgoliaSearch();\n const {\n data: popularCoursesData = [],\n isError,\n isLoading,\n } = usePopularCoursesAndProgramsData(searchClient, true, PRODUCT_TYPE_COURSE);\n const hasPopularCoursesData = useMemo(\n () => popularCoursesData.length > 0,\n [popularCoursesData]\n );\n\n if (isError) {\n return (\n <div className=\"popular-courses-container mt-5 mb-3\" data-testid=\"popular-courses-panel\">\n <Alert variant=\"danger\" data-testid=\"popular-courses-error\">\n {formatMessage(messages.popularCoursesErrorText)}\n </Alert>\n </div>\n );\n }\n\n return (\n <div className=\"popular-courses-container mt-5 mb-3\" data-testid=\"popular-courses-panel\">\n <div className=\"popular-courses-heading-container mb-4\">\n <h2>{formatMessage(messages.popularCoursesHeader)}</h2>\n </div>\n {isLoading ? (\n <p\n data-testid=\"popular-courses-loading\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {formatMessage(messages.popularCoursesLoadingText)}\n </p>\n ) : (\n hasPopularCoursesData ? (\n <PopularCourses\n items={popularCoursesData}\n />\n ) : (\n <NoPopularCourseItems />\n )\n )}\n </div>\n );\n};\n\nexport default PopularCoursePanel;\n"]}
|
|
@@ -10,6 +10,11 @@ const messages = defineMessages({
|
|
|
10
10
|
defaultMessage: 'Failed to load popular courses. Please try again later.',
|
|
11
11
|
description: 'Error text for failing to load popular courses',
|
|
12
12
|
},
|
|
13
|
+
popularCoursesLoadingText: {
|
|
14
|
+
id: 'subs-dash.popularCoursesPanel.loadingText',
|
|
15
|
+
defaultMessage: 'Loading course recommendations and recently viewed history',
|
|
16
|
+
description: 'Loading text shown while popular courses data is being fetched',
|
|
17
|
+
},
|
|
13
18
|
});
|
|
14
19
|
export default messages;
|
|
15
20
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/PopularCoursePanel/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,oBAAoB,EAAE;QACpB,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,iBAAiB;QACjC,WAAW,EAAE,uCAAuC;KACrD;IACD,uBAAuB,EAAE;QACvB,EAAE,EAAE,yCAAyC;QAC7C,cAAc,EAAE,yDAAyD;QACzE,WAAW,EAAE,gDAAgD;KAC9D;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n popularCoursesHeader: {\n id: 'subs-dash.popularCoursesPanel.header',\n defaultMessage: 'Popular courses',\n description: 'Label for the popular courses section',\n },\n popularCoursesErrorText: {\n id: 'subs-dash.popularCoursesPanel.errorText',\n defaultMessage: 'Failed to load popular courses. Please try again later.',\n description: 'Error text for failing to load popular courses',\n },\n});\n\nexport default messages;\n"]}
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/PopularCoursePanel/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,oBAAoB,EAAE;QACpB,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,iBAAiB;QACjC,WAAW,EAAE,uCAAuC;KACrD;IACD,uBAAuB,EAAE;QACvB,EAAE,EAAE,yCAAyC;QAC7C,cAAc,EAAE,yDAAyD;QACzE,WAAW,EAAE,gDAAgD;KAC9D;IACD,yBAAyB,EAAE;QACzB,EAAE,EAAE,2CAA2C;QAC/C,cAAc,EAAE,4DAA4D;QAC5E,WAAW,EAAE,gEAAgE;KAC9E;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n popularCoursesHeader: {\n id: 'subs-dash.popularCoursesPanel.header',\n defaultMessage: 'Popular courses',\n description: 'Label for the popular courses section',\n },\n popularCoursesErrorText: {\n id: 'subs-dash.popularCoursesPanel.errorText',\n defaultMessage: 'Failed to load popular courses. Please try again later.',\n description: 'Error text for failing to load popular courses',\n },\n popularCoursesLoadingText: {\n id: 'subs-dash.popularCoursesPanel.loadingText',\n defaultMessage: 'Loading course recommendations and recently viewed history',\n description: 'Loading text shown while popular courses data is being fetched',\n },\n});\n\nexport default messages;\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ProductCard } from '../../ProductCard';
|
|
3
|
-
export const PopularPrograms = ({ items
|
|
4
|
-
return (_jsx("div", { "data-testid": "popular-programs-items", children: _jsx("div", { className: "row g-3 flex-nowrap flex-md-wrap overflow-auto", children: items.map((item) => (_jsx("div", { className: "col-12 col-md-6 col-xl-3 d-flex mb-2", children: _jsx(ProductCard, { item: item
|
|
3
|
+
export const PopularPrograms = ({ items }) => {
|
|
4
|
+
return (_jsx("div", { "data-testid": "popular-programs-items", children: _jsx("div", { className: "row g-3 flex-nowrap flex-md-wrap overflow-auto", children: items.map((item) => (_jsx("div", { className: "col-12 col-md-6 col-xl-3 d-flex mb-2", children: _jsx(ProductCard, { item: item }) }, item.objectID))) }) }));
|
|
5
5
|
};
|
|
6
6
|
export default PopularPrograms;
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/PopularProgramsPanel/PopularPrograms/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/PopularProgramsPanel/PopularPrograms/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrE,OAAO,CACL,6BAAiB,wBAAwB,YACvC,cAAK,SAAS,EAAC,gDAAgD,YAC5D,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,cAAyB,SAAS,EAAC,sCAAsC,YACvE,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI,IADnB,IAAI,CAAC,QAAQ,CAEjB,CACP,CAAC,GACE,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { FC } from 'react';\n\nimport { ProductCard } from '../../ProductCard';\nimport { PopularProgramsProps } from './data/types';\n\nexport const PopularPrograms: FC<PopularProgramsProps> = ({ items }) => {\n return (\n <div data-testid=\"popular-programs-items\">\n <div className=\"row g-3 flex-nowrap flex-md-wrap overflow-auto\">\n {items.map((item) => (\n <div key={item.objectID} className=\"col-12 col-md-6 col-xl-3 d-flex mb-2\">\n <ProductCard item={item} />\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default PopularPrograms;\n"]}
|
|
@@ -16,7 +16,7 @@ export const PopularProgramsPanel = () => {
|
|
|
16
16
|
if (isError) {
|
|
17
17
|
return (_jsx("div", { className: "popular-programs-container mt-5 mb-3", "data-testid": "popular-programs-panel", children: _jsx(Alert, { variant: "danger", "data-testid": "popular-programs-error", children: formatMessage(messages.popularProgramsErrorText) }) }));
|
|
18
18
|
}
|
|
19
|
-
return (_jsxs("div", { className: "popular-programs-container mt-5 mb-3", "data-testid": "popular-programs-panel", children: [_jsx("div", { className: "popular-programs-heading-container mb-4", children: _jsx("h2", { children: formatMessage(messages.popularProgramsHeader) }) }),
|
|
19
|
+
return (_jsxs("div", { className: "popular-programs-container mt-5 mb-3", "data-testid": "popular-programs-panel", children: [_jsx("div", { className: "popular-programs-heading-container mb-4", children: _jsx("h2", { children: formatMessage(messages.popularProgramsHeader) }) }), isLoading ? (_jsx("p", { "data-testid": "popular-programs-loading", role: "status", "aria-live": "polite", children: formatMessage(messages.popularProgramsLoadingText) })) : (hasPopularProgramsData ? (_jsx(PopularPrograms, { items: popularProgramsData })) : (_jsx(NoPopularProgramItems, {})))] }));
|
|
20
20
|
};
|
|
21
21
|
export default PopularProgramsPanel;
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/PopularProgramsPanel/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,OAAO,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAAoB,GAAO,GAAG,EAAE;IAC3C,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,CAAC,YAAY,CAAC,GAAG,gBAAgB,EAAE,CAAC;IAC1C,MAAM,EACJ,IAAI,EAAE,mBAAmB,GAAG,EAAE,EAC9B,OAAO,EACP,SAAS,GACV,GAAG,gCAAgC,CAAC,YAAY,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;IAC/E,MAAM,sBAAsB,GAAG,OAAO,CACpC,GAAG,EAAE,CAAC,mBAAmB,CAAC,MAAM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YAAY,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;IAC/E,MAAM,sBAAsB,GAAG,OAAO,CACpC,GAAG,EAAE,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,EACpC,CAAC,mBAAmB,CAAC,CACtB,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,cAAK,SAAS,EAAC,sCAAsC,iBAAa,wBAAwB,YACxF,KAAC,KAAK,IAAC,OAAO,EAAC,QAAQ,iBAAa,wBAAwB,YACzD,aAAa,CAAC,QAAQ,CAAC,wBAAwB,CAAC,GAC3C,GACJ,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,eAAK,SAAS,EAAC,sCAAsC,iBAAa,wBAAwB,aACxF,cAAK,SAAS,EAAC,yCAAyC,YACtD,uBAAK,aAAa,CAAC,QAAQ,CAAC,qBAAqB,CAAC,GAAM,GACpD,EACL,SAAS,CAAC,CAAC,CAAC,CACX,2BACc,0BAA0B,EACtC,IAAI,EAAC,QAAQ,eACH,QAAQ,YAEjB,aAAa,CAAC,QAAQ,CAAC,0BAA0B,CAAC,GACjD,CACL,CAAC,CAAC,CAAC,CACF,sBAAsB,CAAC,CAAC,CAAC,CACvB,KAAC,eAAe,IACd,KAAK,EAAE,mBAAmB,GAC1B,CACH,CAAC,CAAC,CAAC,CACF,KAAC,qBAAqB,KAAG,CAC1B,CACF,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { FC, useMemo } from 'react';\nimport { Alert } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { usePopularCoursesAndProgramsData } from '@src/hooks/usePopularCoursesAndPrograms';\nimport { useAlgoliaSearch } from '@src/utils/algoliaUtils';\nimport messages from './messages';\nimport NoPopularProgramItems from './NoPopularProgramItems';\nimport PopularPrograms from './PopularPrograms';\nimport { PRODUCT_TYPE_PROGRAM } from '@src/constants';\n\nexport const PopularProgramsPanel: FC = () => {\n const { formatMessage } = useIntl();\n const [searchClient] = useAlgoliaSearch();\n const {\n data: popularProgramsData = [],\n isError,\n isLoading,\n } = usePopularCoursesAndProgramsData(searchClient, true, PRODUCT_TYPE_PROGRAM);\n const hasPopularProgramsData = useMemo(\n () => popularProgramsData.length > 0,\n [popularProgramsData]\n );\n\n if (isError) {\n return (\n <div className=\"popular-programs-container mt-5 mb-3\" data-testid=\"popular-programs-panel\">\n <Alert variant=\"danger\" data-testid=\"popular-programs-error\">\n {formatMessage(messages.popularProgramsErrorText)}\n </Alert>\n </div>\n );\n }\n\n return (\n <div className=\"popular-programs-container mt-5 mb-3\" data-testid=\"popular-programs-panel\">\n <div className=\"popular-programs-heading-container mb-4\">\n <h2>{formatMessage(messages.popularProgramsHeader)}</h2>\n </div>\n {isLoading ? (\n <p\n data-testid=\"popular-programs-loading\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {formatMessage(messages.popularProgramsLoadingText)}\n </p>\n ) : (\n hasPopularProgramsData ? (\n <PopularPrograms\n items={popularProgramsData}\n />\n ) : (\n <NoPopularProgramItems />\n )\n )}\n </div>\n );\n};\n\nexport default PopularProgramsPanel;\n"]}
|
|
@@ -10,6 +10,11 @@ const messages = defineMessages({
|
|
|
10
10
|
defaultMessage: 'Failed to load popular programs. Please try again later.',
|
|
11
11
|
description: 'Error text for failing to load popular programs',
|
|
12
12
|
},
|
|
13
|
+
popularProgramsLoadingText: {
|
|
14
|
+
id: 'subs-dash.popularProgramsPanel.loadingText',
|
|
15
|
+
defaultMessage: 'Loading program recommendations and recently viewed history',
|
|
16
|
+
description: 'Loading text shown while popular programs data is being fetched',
|
|
17
|
+
},
|
|
13
18
|
});
|
|
14
19
|
export default messages;
|
|
15
20
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/PopularProgramsPanel/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,qBAAqB,EAAE;QACrB,EAAE,EAAE,uCAAuC;QAC3C,cAAc,EAAE,kBAAkB;QAClC,WAAW,EAAE,wCAAwC;KACtD;IACD,wBAAwB,EAAE;QACxB,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,0DAA0D;QAC1E,WAAW,EAAE,iDAAiD;KAC/D;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n popularProgramsHeader: {\n id: 'subs-dash.popularProgramsPanel.header',\n defaultMessage: 'Popular programs',\n description: 'Label for the popular programs section',\n },\n popularProgramsErrorText: {\n id: 'subs-dash.popularProgramsPanel.errorText',\n defaultMessage: 'Failed to load popular programs. Please try again later.',\n description: 'Error text for failing to load popular programs',\n },\n});\n\nexport default messages;\n"]}
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/PopularProgramsPanel/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,qBAAqB,EAAE;QACrB,EAAE,EAAE,uCAAuC;QAC3C,cAAc,EAAE,kBAAkB;QAClC,WAAW,EAAE,wCAAwC;KACtD;IACD,wBAAwB,EAAE;QACxB,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,0DAA0D;QAC1E,WAAW,EAAE,iDAAiD;KAC/D;IACD,0BAA0B,EAAE;QAC1B,EAAE,EAAE,4CAA4C;QAChD,cAAc,EAAE,6DAA6D;QAC7E,WAAW,EAAE,iEAAiE;KAC/E;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n popularProgramsHeader: {\n id: 'subs-dash.popularProgramsPanel.header',\n defaultMessage: 'Popular programs',\n description: 'Label for the popular programs section',\n },\n popularProgramsErrorText: {\n id: 'subs-dash.popularProgramsPanel.errorText',\n defaultMessage: 'Failed to load popular programs. Please try again later.',\n description: 'Error text for failing to load popular programs',\n },\n popularProgramsLoadingText: {\n id: 'subs-dash.popularProgramsPanel.loadingText',\n defaultMessage: 'Loading program recommendations and recently viewed history',\n description: 'Loading text shown while popular programs data is being fetched',\n },\n});\n\nexport default messages;\n"]}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Helmet } from 'react-helmet';
|
|
3
|
-
import {
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
import { Col, Container, Icon, Row } from '@openedx/paragon';
|
|
5
|
+
import { ArrowBack } from '@openedx/paragon/icons';
|
|
6
|
+
import { useIntl } from '@openedx/frontend-base';
|
|
4
7
|
import './index.scss';
|
|
5
8
|
import { useProgressData } from '../../../hooks';
|
|
6
9
|
import ProgramProgressHeader from './ProgramProgressHeader';
|
|
7
10
|
import ProgramProgressInfo from './ProgramProgressInfo';
|
|
8
11
|
import { ProgramProgressTabs } from './ProgramProgressTabs';
|
|
9
12
|
import { ProgramProgressSidebar } from './ProgramProgressSidebar';
|
|
13
|
+
import { subscriptionDashboardUrlPath } from '../../../constants';
|
|
14
|
+
import messages from './messages';
|
|
10
15
|
const ProgramProgress = () => {
|
|
11
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
12
17
|
const { programProgressData, isLoading, error } = useProgressData();
|
|
18
|
+
const { formatMessage } = useIntl();
|
|
13
19
|
if (programProgressData === null) {
|
|
14
20
|
return _jsx("div", { children: "Invalid URL" });
|
|
15
21
|
}
|
|
@@ -32,7 +38,7 @@ const ProgramProgress = () => {
|
|
|
32
38
|
const remainingCourseCount = ((_j = courseData === null || courseData === void 0 ? void 0 : courseData.notStarted) === null || _j === void 0 ? void 0 : _j.length) || 0;
|
|
33
39
|
const completedCourseCount = ((_k = courseData === null || courseData === void 0 ? void 0 : courseData.completed) === null || _k === void 0 ? void 0 : _k.length) || 0;
|
|
34
40
|
const discountData = programData === null || programData === void 0 ? void 0 : programData.discountData;
|
|
35
|
-
return (_jsxs(_Fragment, { children: [_jsx(Helmet, { title: `${programData === null || programData === void 0 ? void 0 : programData.title}` }), _jsxs(Container, { fluid: false, size: "xl", className: "p-4.5", children: [_jsx(ProgramProgressHeader, { programTitle: (_l = programData === null || programData === void 0 ? void 0 : programData.title) !== null && _l !== void 0 ? _l : '', programType: (_m = programData === null || programData === void 0 ? void 0 : programData.type) !== null && _m !== void 0 ? _m : '', authoringOrganizations: programData === null || programData === void 0 ? void 0 : programData.authoringOrganizations }), _jsxs(Row, { children: [_jsxs(Col, { sm: 12, md: 8, children: [_jsx(ProgramProgressInfo, { allCoursesCompleted: allCoursesCompleted, totalCoursesInProgram: totalCoursesInProgram, programTitle: (_o = programData === null || programData === void 0 ? void 0 : programData.title) !== null && _o !== void 0 ? _o : '', discountData: discountData }), _jsx(ProgramProgressTabs, { counts: { inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }, type: programType })] }), _jsx(Col, { sm: 12, md: 4, children: _jsx(ProgramProgressSidebar, { inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }) })] })] })] }));
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx(Helmet, { title: `${programData === null || programData === void 0 ? void 0 : programData.title}` }), _jsxs(Container, { fluid: false, size: "xl", className: "p-4.5", children: [_jsx("div", { className: "d-block d-lg-none mb-4", children: _jsxs(Link, { to: subscriptionDashboardUrlPath, className: "text-reset text-decoration-none d-inline-flex align-items-center", children: [_jsx(Icon, { src: ArrowBack, className: "mr-2" }), formatMessage(messages.programProgressReturnToDashboardText)] }) }), _jsx(ProgramProgressHeader, { programTitle: (_l = programData === null || programData === void 0 ? void 0 : programData.title) !== null && _l !== void 0 ? _l : '', programType: (_m = programData === null || programData === void 0 ? void 0 : programData.type) !== null && _m !== void 0 ? _m : '', authoringOrganizations: programData === null || programData === void 0 ? void 0 : programData.authoringOrganizations }), _jsxs(Row, { children: [_jsxs(Col, { sm: 12, md: 8, children: [_jsx(ProgramProgressInfo, { allCoursesCompleted: allCoursesCompleted, totalCoursesInProgram: totalCoursesInProgram, programTitle: (_o = programData === null || programData === void 0 ? void 0 : programData.title) !== null && _o !== void 0 ? _o : '', discountData: discountData }), _jsx(ProgramProgressTabs, { counts: { inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }, type: programType })] }), _jsx(Col, { sm: 12, md: 4, children: _jsx(ProgramProgressSidebar, { inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }) })] })] })] }));
|
|
36
42
|
};
|
|
37
43
|
export default ProgramProgress;
|
|
38
44
|
//# sourceMappingURL=ProgramProgress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgramProgress.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/ProgramProgress/ProgramProgress.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgramProgress.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/ProgramProgress/ProgramProgress.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB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WAAW,CAAE,IAAI,mCAAI,EAAE,EACpC,sBAAsB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,sBAAsB,GAC3D,EACF,MAAC,GAAG,eACF,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,aAChB,KAAC,mBAAmB,IAClB,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,YAAY,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,mCAAI,EAAE,EACtC,YAAY,EAAE,YAAY,GAC1B,EACF,KAAC,mBAAmB,IAAC,MAAM,EAAE,EAAE,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAE,oBAAoB,EAAE,SAAS,EAAE,oBAAoB,EAAE,EAAE,IAAI,EAAE,WAAW,GAAI,IACvJ,EAEN,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,YAChB,KAAC,sBAAsB,IACrB,UAAU,EAAE,qBAAqB,EACjC,SAAS,EAAE,oBAAoB,EAC/B,SAAS,EAAE,oBAAoB,GAC/B,GACE,IACF,IACI,IACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { FC } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { Link } from 'react-router-dom';\nimport { Col, Container, Icon, Row } from '@openedx/paragon';\nimport { ArrowBack } from '@openedx/paragon/icons';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport './index.scss';\nimport { useProgressData } from '@src/hooks';\nimport ProgramProgressHeader from './ProgramProgressHeader';\nimport ProgramProgressInfo from './ProgramProgressInfo';\nimport { ProgramProgressTabs } from './ProgramProgressTabs';\nimport { ProgramProgressSidebar } from './ProgramProgressSidebar';\nimport { subscriptionDashboardUrlPath } from '@src/constants';\nimport messages from './messages';\n\nconst ProgramProgress: FC = () => {\n const { programProgressData, isLoading, error } = useProgressData();\n const { formatMessage } = useIntl();\n\n if (programProgressData === null) {\n return <div>Invalid URL</div>;\n }\n\n if (isLoading) {\n return <div>Loading...</div>;\n }\n\n if (error) {\n return <div>Error occurred</div>;\n }\n\n const programData = programProgressData?.programData;\n const courseData = programProgressData?.courseData;\n\n const totalCoursesInProgram = (courseData.notStarted?.length || 0)\n + (courseData.completed?.length || 0)\n + (courseData.inProgress?.length || 0);\n\n const allCoursesCompleted = !courseData.notStarted?.length\n && !courseData.inProgress?.length\n && courseData.completed?.length;\n\n const programType = programData?.type ?? '';\n const inProgressCourseCount = courseData?.inProgress?.length || 0;\n const remainingCourseCount = courseData?.notStarted?.length || 0;\n const completedCourseCount = courseData?.completed?.length || 0;\n const discountData = programData?.discountData;\n\n return (\n <>\n <Helmet title={`${programData?.title}`} />\n <Container fluid={false} size=\"xl\" className=\"p-4.5\">\n <div className=\"d-block d-lg-none mb-4\">\n <Link to={subscriptionDashboardUrlPath} className=\"text-reset text-decoration-none d-inline-flex align-items-center\">\n <Icon src={ArrowBack} className=\"mr-2\" />\n {formatMessage(messages.programProgressReturnToDashboardText)}\n </Link>\n </div>\n <ProgramProgressHeader\n programTitle={programData?.title ?? ''}\n programType={programData?.type ?? ''}\n authoringOrganizations={programData?.authoringOrganizations}\n />\n <Row>\n <Col sm={12} md={8}>\n <ProgramProgressInfo\n allCoursesCompleted={allCoursesCompleted}\n totalCoursesInProgram={totalCoursesInProgram}\n programTitle={programData?.title ?? ''}\n discountData={discountData}\n />\n <ProgramProgressTabs counts={{ inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }} type={programType} />\n </Col>\n\n <Col sm={12} md={4}>\n <ProgramProgressSidebar\n inProgress={inProgressCourseCount}\n remaining={remainingCourseCount}\n completed={completedCourseCount}\n />\n </Col>\n </Row>\n </Container>\n </>\n );\n};\n\nexport default ProgramProgress;\n"]}
|
|
@@ -44,7 +44,7 @@ export const ProgressCard = ({ progressCardData, isLoading, tabType }) => {
|
|
|
44
44
|
})) }), _jsx(ProgressCardButton, { variant: "brand", redirectUrl: certificateUrl ? `${getSiteConfig().lmsBaseUrl}${certificateUrl}` : '', buttonText: formatMessage(messages.programProgressCardCompletedCertificateButton) })] }) })), isInProgressTab && (_jsxs(_Fragment, { children: [(isProfessionalProgram || isXSeriesProgram)
|
|
45
45
|
&& canUpgrade
|
|
46
46
|
&& getCertificatePriceString(seats)
|
|
47
|
-
&& (_jsxs(Row, { className: "pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center", children: [_jsx(Col, { xs: 12, md: 8, className: "d-flex justify-content-between align-items-center px-0", children: _jsx("span", { className: "text-start", children: formatMessage(messages.programProgressInProgressProfessionalCertificate) }) }), _jsx(Col, { xs: 12, md: 4, className: "d-flex justify-content-between align-items-center px-0", children: _jsx(UpgradeCourseButton, { variant: "brand", buttonText: formatMessage(messages.programProgressCardUpgradeButton), title: title, price: getCertificatePriceString(seats), courseRunKey: courseRunKey || '', courseUrl: courseUrl }) })] })), isMicroMastersProgram
|
|
47
|
+
&& (_jsxs(Row, { className: "pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center", children: [_jsx(Col, { xs: 12, md: 8, className: "d-flex justify-content-between align-items-center px-0", children: _jsx("span", { className: "text-start", children: formatMessage(messages.programProgressInProgressProfessionalCertificate) }) }), _jsx(Col, { xs: 12, md: 4, className: "d-flex justify-content-between align-items-center px-0", children: _jsx(UpgradeCourseButton, { variant: "brand", buttonText: formatMessage(messages.programProgressCardUpgradeButton), title: title, price: getCertificatePriceString(seats), courseRunKey: courseRunKey || '', courseUrl: courseUrl ? `${getSiteConfig().lmsBaseUrl}${courseUrl}` : '' }) })] })), isMicroMastersProgram
|
|
48
48
|
&& checkoutUrl
|
|
49
49
|
&& canUpgrade
|
|
50
50
|
&& (_jsxs(Row, { className: "pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center", children: [_jsx(Col, { xs: 12, md: 8, className: "d-flex justify-content-between align-items-center px-0", children: _jsx("span", { className: "text-start", children: formatMessage(messages.programProgressInProgressMicromastersCertificate) }) }), _jsx(Col, { xs: 12, md: 4, className: "d-flex justify-content-between align-items-center", children: _jsx(ProgressCardButton, { variant: "brand", redirectUrl: checkoutUrl, buttonText: formatMessage(messages.programProgressInProgressCourseMicromastersUpgrade, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAEjF,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9F,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,CAAC;IAEhD,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAC;IAErL,MAAM,gBAAgB,GAAG,aAAa,CAAC,QAAQ,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{ Card, Row, Col } from '@openedx/paragon';\nimport { getSiteConfig, useIntl } from '@openedx/frontend-base';\n\nimport { ProgressCardProps } from '../../data/types';\nimport messages from '../messages';\nimport './index.scss';\nimport { ProgressCardActions } from '../ProgressCardActions';\nimport { dateFormatter } from '@src/utils/dateFormatter';\nimport { ProgressCardButton } from '../ProgressCardActions/ProgressCardButton';\nimport { PROGRAM_TYPE_MAP } from '../../data/constants';\nimport { getCertificatePriceString } from '../../data/util';\nimport { UpgradeCourseButton } from '../ProgressCardActions/UpgradeCourseButton';\n\nexport const ProgressCard: FC<ProgressCardProps> = ({ progressCardData, isLoading, tabType }) => {\n const { formatMessage, formatDate } = useIntl();\n\n const { title, enrollment_date, end, certificateUrl, courseUrl, upgradeUrl, programType, checkoutUrl, expired, seats, description, destinationUrl, courseRunKey } = progressCardData;\n\n const inProgressTabKey = formatMessage(messages.programProgressInProgressTab).toLowerCase();\n const isInProgressTab = tabType === inProgressTabKey;\n const isRemainingTab = tabType === formatMessage(messages.programProgressRemainingTab).toLowerCase();\n const isPathwaysTab = tabType === formatMessage(messages.programProgressPathwaysTab).toLowerCase();\n const isProfessionalProgram = programType === PROGRAM_TYPE_MAP.PROFESSIONAL_CERTIFICATE;\n const isXSeriesProgram = programType === PROGRAM_TYPE_MAP.XSERIES;\n const isMicroMastersProgram = programType === PROGRAM_TYPE_MAP.MICROMASTERS;\n /*\n - Formatting pacing type safely\n - replace underscores with spaces\n - capitalize first letter of each word\n - example: 'self_paced' -> 'Self Paced'\n */\n // base string; pathways tab has no enrollment/subscription status\n let enrollmentInfo = '';\n if (!isPathwaysTab) {\n enrollmentInfo = isRemainingTab\n ? formatMessage(messages.programProgressCardIncludedInSubscriptionText)\n : formatMessage(messages.programProgressCardEnrollText);\n }\n\n // if enrollment start exists\n if (!isPathwaysTab && !isRemainingTab && enrollment_date) {\n const enrollment_date_formatted = dateFormatter(formatDate, enrollment_date, 'short');\n\n enrollmentInfo = enrollmentInfo && `${enrollmentInfo} ${enrollment_date_formatted}`;\n }\n\n // using expired key from course object to determine if the course is expired as per condition on confluence and learners dashboard code.\n const canUpgrade = Boolean(upgradeUrl) && !expired;\n return (\n <Card className=\"progress-card mb-3\" data-testid=\"progress-card\" isLoading={isLoading}>\n <Card.Section className=\"pt-3 pb-2 px-4\">\n <Row className=\"mb-2\">\n <Col xs={12}>\n {isPathwaysTab ? (\n <h5 className=\"mb-1 font-weight-bold card-title\">{title}</h5>\n ) : (\n <h4 className=\"mb-1 font-weight-bold card-title\">{title}</h4>\n )}\n <div className=\"card-description\">\n {enrollmentInfo}\n {description && (\n <>\n {description}\n </>\n )}\n </div>\n </Col>\n <ProgressCardActions tabType={tabType} redirectUrl={destinationUrl || courseUrl} />\n </Row>\n\n {tabType === (formatMessage(messages.programProgressCompletedTab).toLowerCase()) && (\n <Row className=\"pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center\">\n <Col xs={12} className=\"d-flex justify-content-between align-items-center px-0\">\n <span className=\"text-start\">\n {end && (\n formatMessage(messages.programProgressCardCompletedCertificateText, {\n certificateDate: (end ? dateFormatter(formatDate, end, 'short') : ''),\n })\n )}\n </span>\n\n <ProgressCardButton variant=\"brand\" redirectUrl={certificateUrl ? `${getSiteConfig().lmsBaseUrl}${certificateUrl}` : ''} buttonText={formatMessage(messages.programProgressCardCompletedCertificateButton)} />\n </Col>\n </Row>\n )}\n\n {isInProgressTab && (\n <>\n {(isProfessionalProgram || isXSeriesProgram)\n && canUpgrade\n && getCertificatePriceString(seats)\n && (\n <Row className=\"pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center\">\n <Col xs={12} md={8} className=\"d-flex justify-content-between align-items-center px-0\">\n <span className=\"text-start\">\n {formatMessage(messages.programProgressInProgressProfessionalCertificate)}\n </span>\n </Col>\n <Col xs={12} md={4} className=\"d-flex justify-content-between align-items-center px-0\">\n <UpgradeCourseButton\n variant=\"brand\"\n buttonText={formatMessage(messages.programProgressCardUpgradeButton)}\n title={title}\n price={getCertificatePriceString(seats)}\n courseRunKey={courseRunKey || ''}\n courseUrl={courseUrl}\n />\n </Col>\n </Row>\n )}\n {isMicroMastersProgram\n && checkoutUrl\n && canUpgrade\n && (\n <Row className=\"pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center\">\n <Col xs={12} md={8} className=\"d-flex justify-content-between align-items-center px-0\">\n <span className=\"text-start\">\n {formatMessage(messages.programProgressInProgressMicromastersCertificate)}\n </span>\n </Col>\n <Col xs={12} md={4} className=\"d-flex justify-content-between align-items-center\">\n <ProgressCardButton\n variant=\"brand\"\n redirectUrl={checkoutUrl}\n buttonText={formatMessage(messages.programProgressInProgressCourseMicromastersUpgrade, {\n price: getCertificatePriceString(seats, true),\n })}\n />\n </Col>\n </Row>\n )}\n </>\n )}\n\n </Card.Section>\n </Card>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAEjF,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE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gD,CAAC,GACpE,GACH,EACN,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAC,mDAAmD,YAC/E,KAAC,kBAAkB,IACjB,OAAO,EAAC,OAAO,EACf,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAC,kDAAkD,EAAE;gDACrF,KAAK,EAAE,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC;6CAC9C,CAAC,GACF,GACE,IACF,CACP,IACA,CACJ,IAEY,GACV,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { Card, Row, Col } from '@openedx/paragon';\nimport { getSiteConfig, useIntl } from '@openedx/frontend-base';\n\nimport { ProgressCardProps } from '../../data/types';\nimport messages from '../messages';\nimport './index.scss';\nimport { ProgressCardActions } from '../ProgressCardActions';\nimport { dateFormatter } from '@src/utils/dateFormatter';\nimport { ProgressCardButton } from '../ProgressCardActions/ProgressCardButton';\nimport { PROGRAM_TYPE_MAP } from '../../data/constants';\nimport { getCertificatePriceString } from '../../data/util';\nimport { UpgradeCourseButton } from '../ProgressCardActions/UpgradeCourseButton';\n\nexport const ProgressCard: FC<ProgressCardProps> = ({ progressCardData, isLoading, tabType }) => {\n const { formatMessage, formatDate } = useIntl();\n\n const { title, enrollment_date, end, certificateUrl, courseUrl, upgradeUrl, programType, checkoutUrl, expired, seats, description, destinationUrl, courseRunKey } = progressCardData;\n\n const inProgressTabKey = formatMessage(messages.programProgressInProgressTab).toLowerCase();\n const isInProgressTab = tabType === inProgressTabKey;\n const isRemainingTab = tabType === formatMessage(messages.programProgressRemainingTab).toLowerCase();\n const isPathwaysTab = tabType === formatMessage(messages.programProgressPathwaysTab).toLowerCase();\n const isProfessionalProgram = programType === PROGRAM_TYPE_MAP.PROFESSIONAL_CERTIFICATE;\n const isXSeriesProgram = programType === PROGRAM_TYPE_MAP.XSERIES;\n const isMicroMastersProgram = programType === PROGRAM_TYPE_MAP.MICROMASTERS;\n /*\n - Formatting pacing type safely\n - replace underscores with spaces\n - capitalize first letter of each word\n - example: 'self_paced' -> 'Self Paced'\n */\n // base string; pathways tab has no enrollment/subscription status\n let enrollmentInfo = '';\n if (!isPathwaysTab) {\n enrollmentInfo = isRemainingTab\n ? formatMessage(messages.programProgressCardIncludedInSubscriptionText)\n : formatMessage(messages.programProgressCardEnrollText);\n }\n\n // if enrollment start exists\n if (!isPathwaysTab && !isRemainingTab && enrollment_date) {\n const enrollment_date_formatted = dateFormatter(formatDate, enrollment_date, 'short');\n\n enrollmentInfo = enrollmentInfo && `${enrollmentInfo} ${enrollment_date_formatted}`;\n }\n\n // using expired key from course object to determine if the course is expired as per condition on confluence and learners dashboard code.\n const canUpgrade = Boolean(upgradeUrl) && !expired;\n return (\n <Card className=\"progress-card mb-3\" data-testid=\"progress-card\" isLoading={isLoading}>\n <Card.Section className=\"pt-3 pb-2 px-4\">\n <Row className=\"mb-2\">\n <Col xs={12}>\n {isPathwaysTab ? (\n <h5 className=\"mb-1 font-weight-bold card-title\">{title}</h5>\n ) : (\n <h4 className=\"mb-1 font-weight-bold card-title\">{title}</h4>\n )}\n <div className=\"card-description\">\n {enrollmentInfo}\n {description && (\n <>\n {description}\n </>\n )}\n </div>\n </Col>\n <ProgressCardActions tabType={tabType} redirectUrl={destinationUrl || courseUrl} />\n </Row>\n\n {tabType === (formatMessage(messages.programProgressCompletedTab).toLowerCase()) && (\n <Row className=\"pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center\">\n <Col xs={12} className=\"d-flex justify-content-between align-items-center px-0\">\n <span className=\"text-start\">\n {end && (\n formatMessage(messages.programProgressCardCompletedCertificateText, {\n certificateDate: (end ? dateFormatter(formatDate, end, 'short') : ''),\n })\n )}\n </span>\n\n <ProgressCardButton variant=\"brand\" redirectUrl={certificateUrl ? `${getSiteConfig().lmsBaseUrl}${certificateUrl}` : ''} buttonText={formatMessage(messages.programProgressCardCompletedCertificateButton)} />\n </Col>\n </Row>\n )}\n\n {isInProgressTab && (\n <>\n {(isProfessionalProgram || isXSeriesProgram)\n && canUpgrade\n && getCertificatePriceString(seats)\n && (\n <Row className=\"pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center\">\n <Col xs={12} md={8} className=\"d-flex justify-content-between align-items-center px-0\">\n <span className=\"text-start\">\n {formatMessage(messages.programProgressInProgressProfessionalCertificate)}\n </span>\n </Col>\n <Col xs={12} md={4} className=\"d-flex justify-content-between align-items-center px-0\">\n <UpgradeCourseButton\n variant=\"brand\"\n buttonText={formatMessage(messages.programProgressCardUpgradeButton)}\n title={title}\n price={getCertificatePriceString(seats)}\n courseRunKey={courseRunKey || ''}\n courseUrl={courseUrl ? `${getSiteConfig().lmsBaseUrl}${courseUrl}` : ''}\n />\n </Col>\n </Row>\n )}\n {isMicroMastersProgram\n && checkoutUrl\n && canUpgrade\n && (\n <Row className=\"pt-3 pb-2 px-2 border-top border-2 border-muted mb-2 align-items-center\">\n <Col xs={12} md={8} className=\"d-flex justify-content-between align-items-center px-0\">\n <span className=\"text-start\">\n {formatMessage(messages.programProgressInProgressMicromastersCertificate)}\n </span>\n </Col>\n <Col xs={12} md={4} className=\"d-flex justify-content-between align-items-center\">\n <ProgressCardButton\n variant=\"brand\"\n redirectUrl={checkoutUrl}\n buttonText={formatMessage(messages.programProgressInProgressCourseMicromastersUpgrade, {\n price: getCertificatePriceString(seats, true),\n })}\n />\n </Col>\n </Row>\n )}\n </>\n )}\n\n </Card.Section>\n </Card>\n );\n};\n"]}
|
package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/ProgressCardButton.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
-
import { Button,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Icon } from '@openedx/paragon';
|
|
3
3
|
import { useIntl } from '@openedx/frontend-base';
|
|
4
4
|
import { Link } from 'react-router-dom';
|
|
5
5
|
import messages from '../messages';
|
|
6
6
|
import { Launch } from '@openedx/paragon/icons';
|
|
7
|
-
export const ProgressCardButton = ({ variant, redirectUrl, buttonText,
|
|
8
|
-
const [isOpen, open, close] = useToggle(false);
|
|
7
|
+
export const ProgressCardButton = ({ variant, redirectUrl, buttonText, destinationUrl }) => {
|
|
9
8
|
const { formatMessage } = useIntl();
|
|
10
|
-
const isUpgradeButton = type === 'upgrade' && courseUrl; // TODO : Check needs to be added to open this modal only when Upgrade api is as success
|
|
11
9
|
if (redirectUrl) {
|
|
12
10
|
return (_jsx(Button, { variant: variant, as: Link, to: redirectUrl, children: buttonText }));
|
|
13
11
|
}
|
|
14
|
-
if (isUpgradeButton) {
|
|
15
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: variant, onClick: open, children: buttonText }), _jsx(StandardModal, { title: formatMessage(messages.programProgressInProgressCourseProfessionalUpgradeModalTitle, { title }), isOpen: isOpen, onClose: close, hasCloseButton: false, className: "program-progress-upgrade-modal", footerNode: (_jsxs(ActionRow, { children: [_jsx(Button, { variant: "tertiary", onClick: close, children: "Close" }), _jsx(Button, { as: Link, to: courseUrl, variant: "brand", "data-testid": "action-row-btn", children: formatMessage(messages.programProgressCardResumeCourseButton) })] })), isOverflowVisible: false, children: _jsx("p", { children: formatMessage(messages.programProgressInProgressCourseProfessionalUpgradeModalContent, { price }) }) })] }));
|
|
16
|
-
}
|
|
17
12
|
if (destinationUrl) {
|
|
18
13
|
return (_jsxs(Button, { variant: variant, href: destinationUrl, children: [buttonText, buttonText === formatMessage(messages.programProgressPathwaysCreditPathwayLearnMore) && (_jsx(Icon, { src: Launch, className: "ms-1 ml-1.5" }))] }));
|
|
19
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressCardButton.js","sourceRoot":"","sources":["../../../../../src/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/ProgressCardButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"ProgressCardButton.js","sourceRoot":"","sources":["../../../../../src/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/ProgressCardButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAgC,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,EAAE;IACtH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CACL,KAAC,MAAM,IAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,YAChD,UAAU,GACJ,CACV,CAAC;IACJ,CAAC;IAED,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,CACL,MAAC,MAAM,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,aAC3C,UAAU,EACV,UAAU,KAAK,aAAa,CAAC,QAAQ,CAAC,6CAA6C,CAAC,IAAI,CACvF,KAAC,IAAI,IAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAC,aAAa,GAAG,CAC9C,IACM,CACV,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,MAAM,IAAC,OAAO,EAAE,OAAO,YACrB,UAAU,GACJ,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { Button, Icon } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\nimport { Link } from 'react-router-dom';\n\nimport { ProgressCardButtonProps } from '../../data/types';\nimport messages from '../messages';\nimport { Launch } from '@openedx/paragon/icons';\n\nexport const ProgressCardButton: FC<ProgressCardButtonProps> = ({ variant, redirectUrl, buttonText, destinationUrl }) => {\n const { formatMessage } = useIntl();\n\n if (redirectUrl) {\n return (\n <Button variant={variant} as={Link} to={redirectUrl}>\n {buttonText}\n </Button>\n );\n }\n\n if (destinationUrl) {\n return (\n <Button variant={variant} href={destinationUrl}>\n {buttonText}\n {buttonText === formatMessage(messages.programProgressPathwaysCreditPathwayLearnMore) && (\n <Icon src={Launch} className=\"ms-1 ml-1.5\" />\n )}\n </Button>\n );\n }\n\n return (\n <Button variant={variant}>\n {buttonText}\n </Button>\n );\n};\n"]}
|
|
@@ -225,6 +225,11 @@ const messages = defineMessages({
|
|
|
225
225
|
id: 'program.progress.pathways.credit.pathway.faq.description',
|
|
226
226
|
description: 'Description for the FAQ section in the Credit Pathway section of the Pathways tab.',
|
|
227
227
|
},
|
|
228
|
+
programProgressReturnToDashboardText: {
|
|
229
|
+
defaultMessage: 'Return to dashboard',
|
|
230
|
+
id: 'program.progress.return.to.dashboard.text',
|
|
231
|
+
description: 'Text for the return to dashboard link.',
|
|
232
|
+
},
|
|
228
233
|
});
|
|
229
234
|
export default messages;
|
|
230
235
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/ProgramProgress/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,2BAA2B,EAAE;QAC3B,cAAc,EAAE,cAAc;QAC9B,EAAE,EAAE,+BAA+B;QACnC,WAAW,EAAE,yCAAyC;KACvD;IACD,gBAAgB,EAAE;QAChB,cAAc,EAAE,uBAAuB;QACvC,EAAE,EAAE,qCAAqC;QACzC,W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AAE,8DAA8D;QAClE,WAAW,EAAE,wFAAwF;KACtG;IACD,gDAAgD,EAAE;QAChD,cAAc,EAAE,sFAAsF;QACtG,EAAE,EAAE,sEAAsE;QAC1E,WAAW,EAAE,sHAAsH;KACpI;IACD,yCAAyC,EAAE;QACzC,cAAc,EAAE,iBAAiB;QACjC,EAAE,EAAE,gDAAgD;QACpD,WAAW,EAAE,2DAA2D;KACzE;IACD,oDAAoD,EAAE;QACpD,cAAc,EAAE,0DAA0D;QAC1E,EAAE,EAAE,4DAA4D;QAChE,WAAW,EAAE,+EAA+E;KAC7F;IACD,oDAAoD,EAAE;QACpD,cAAc,EAAE,2KAA2K;QAC3L,EAAE,EAAE,4DAA4D;QAChE,WAAW,EAAE,gFAAgF;KAC9F;IACD,6CAA6C,EAAE;QAC7C,cAAc,EAAE,YAAY;QAC5B,EAAE,EAAE,qDAAqD;QACzD,WAAW,EAAE,iFAAiF;KAC/F;IACD,6CAA6C,EAAE;QAC7C,cAAc,EAAE,yBAAyB;QACzC,EAAE,EAAE,8CAA8C;QAClD,WAAW,EAAE,0EAA0E;KACxF;IACD,4CAA4C,EAAE;QAC5C,cAAc,EAAE,oDAAoD;QACpE,EAAE,EAAE,oDAAoD;QACxD,WAAW,EAAE,8EAA8E;KAC5F;IACD,kDAAkD,EAAE;QAClD,cAAc,EAAE,iIAAiI;QACjJ,EAAE,EAAE,0DAA0D;QAC9D,WAAW,EAAE,oFAAoF;KAClG;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n programProgressInstitutions: {\n defaultMessage: 'Institutions',\n id: 'program.progress.institutions',\n description: 'Label text for organization image logos',\n },\n programTypeLabel: {\n defaultMessage: '{programType} program',\n id: 'program.progress.program.type.label',\n description: 'Label displaying the program type (e.g. \"MicroMasters program\", \"Professional Certificate program\")',\n },\n programProgressCompleteHeader: {\n defaultMessage: 'Congratulations!',\n id: 'program.progress.complete.header',\n description: 'header text for the program progress page when all courses are complete',\n },\n programProgressCompleteText: {\n defaultMessage: 'You have successfully completed all the requirements for {programTitle}.',\n id: 'program.progress.complete.text',\n description: 'text to display when a user has completed all of the courses for the program',\n },\n programProgressIncompleteHeader: {\n defaultMessage: 'Your Program Journey',\n id: 'program.progress.incomplete.header',\n description: 'header text to display when the user has remaining incomplete courses in the program',\n },\n programProgressIncompleteText: {\n defaultMessage: 'Track and plan your progress through the {totalCoursesInProgram} courses in this program. To complete the program, you must earn a verified certificate for each course.',\n id: 'program.progress.incomplete.text',\n description: 'text to display when a user has not completed all of the courses for a program',\n },\n programProgressCardCompletedCertificateText: {\n defaultMessage: 'You earned the certificate on {certificateDate}',\n id: 'program.progress.card.completed.certificate.text',\n description: 'text to display on the progress card completed tab related to the certificate status for the course',\n },\n programProgressCardCompletedCertificateButton: {\n defaultMessage: 'View certificate',\n id: 'program.progress.card.completed.certificate.button.text',\n description: 'text to display on the progress card on certificate button for completed courses',\n },\n programProgressCardViewCourseDetailButton: {\n defaultMessage: 'View course details',\n id: 'program.progress.card.view.course.detail.button.text',\n description: 'text to display on the progress card for the view course details button',\n },\n programProgressCardResumeCourseButton: {\n defaultMessage: 'Resume course',\n id: 'program.progress.card.resume.course.button.text',\n description: 'text to display on the progress card for the resume course button',\n },\n programProgressCardUpgradeButton: {\n defaultMessage: 'Upgrade with your subscription',\n id: 'program.progress.card.upgrade.button.text',\n description: 'text to display on the progress card for the upgrade button',\n },\n programProgressCardEnrollText: {\n defaultMessage: 'Enrolled on:',\n id: 'program.progress.card.enroll.text',\n description: 'text to display on the progress card for the enrolled status of the course',\n },\n programProgressCardIncludedInSubscriptionText: {\n defaultMessage: 'Included in your subscription',\n id: 'program.progress.card.included.in.subscription.text',\n description: 'text to display on the progress card for remaining courses that are included in the subscription',\n },\n programProgressCardStartText: {\n defaultMessage: 'Started',\n id: 'program.progress.card.start.text',\n description: 'text to display on the progress card for the start date of the course',\n },\n programProgressInProgressTab: {\n defaultMessage: 'In progress',\n id: 'program.progress.in.progress.tab',\n description: 'Label for the \"In progress\" tab on the program progress page, which lists courses that the user has started but not yet completed.',\n },\n programProgressRemainingTab: {\n defaultMessage: 'Remaining',\n id: 'program.progress.remaining.tab',\n description: 'Label for the \"Remaining\" tab on the program progress page, which lists courses that the user has not yet started.',\n },\n programProgressCompletedTab: {\n defaultMessage: 'Completed',\n id: 'program.progress.completed.tab',\n description: 'Label for the \"Completed\" tab on the program progress page, which lists courses that the user has completed.',\n },\n programProgressPathwaysTab: {\n defaultMessage: 'Pathways',\n id: 'program.progress.pathways.tab',\n description: 'Label for the \"Pathways\" tab on the program progress page, which gives details of how the program can be used to further the learners education. This tab is only shown for MicroMasters programs.',\n },\n programProgressRemainingCourse: {\n defaultMessage: 'Remaining Courses',\n id: 'program.progress.remaining.course',\n description: 'Header text to be displayed inside the Remaining tab of the program progress page.',\n },\n programProgressRemainingTabNoCourse: {\n defaultMessage: \"You have enrolled in all of this program's courses.\",\n id: 'program.progress.remaining.tab.no.course',\n description: 'Text to display on the Remaining tab of the program progress page when there is no course remaining for the user',\n },\n programProgressCompletedCourse: {\n defaultMessage: 'Completed courses',\n id: 'program.progress.completed.course',\n description: 'Header text to be displayed inside the Completed tab of the program progress page.',\n },\n programProgressCompletedTabNoCourse: {\n defaultMessage: 'As you complete courses, you will see them listed here.',\n id: 'program.progress.completed.tab.no.course',\n description: 'Text to display on the Completed tab of the program progress page when no course is completed for the user',\n },\n programProgressCompletedBannerTitle: {\n defaultMessage: 'Earning a program record',\n id: 'program.progress.completed.banner.title',\n description: 'Title text for the banner displayed on the Completed tab of the program progress page.',\n },\n programProgressCompletedBannerDescription: {\n defaultMessage: 'Once you meet all course and program requirements, you will receive a program record and your professional certificate.',\n id: 'program.progress.completed.banner.description',\n description: 'Description text for the banner displayed on the Completed tab of the program progress page.',\n },\n programProgressCompletedBannerHelpCenterButton: {\n defaultMessage: 'Help center',\n id: 'program.progress.completed.banner.help.center.button',\n description: 'Text for the Help Center button displayed on the banner in the Completed tab of the program progress page.',\n },\n programProgressCompletedBannerMyProgramRecordsButton: {\n defaultMessage: 'My program records',\n id: 'program.progress.completed.banner.my.program.records.button',\n description: 'Text for the My Program Records button displayed on the banner in the Completed tab of the program progress page.',\n },\n programProgressEarnedCertificates: {\n defaultMessage: 'Earned Certificates',\n id: 'program.progress.earned.certificates',\n description: 'Label shown in the program progress circle',\n },\n programProgressCertificateLabel: {\n defaultMessage: 'Program Certificate Progress',\n id: 'program.progress.certificate.program.progress',\n description: 'Label shown under the program progress circle',\n },\n programProgressCertificateContentOne: {\n defaultMessage: 'Earn a professional certificate when you meet requirements for all courses in the series.',\n id: 'program.progress.certificate.content.one',\n description: 'First content paragraph shown under the program progress circle',\n },\n programProgressCertificateContentTwo: {\n defaultMessage: 'This program is valued at {price} for non-subscribers.',\n id: 'program.progress.certificate.content.two',\n description: 'Second content paragraph shown under the program progress circle',\n },\n programProgressInProgressCourse: {\n defaultMessage: 'Courses in progress',\n id: 'program.progress.in.progress.course',\n description: 'Header text to be displayed inside the In Progress tab of the program progress page.',\n },\n programProgressInProgressCourseMicromastersUpgrade: {\n defaultMessage: 'Upgrade to verified for {price}',\n id: 'program.progress.in.progress.course.micromasters.upgrade',\n description: 'Upgrade message for Micromasters courses in the In Progress tab.',\n },\n programProgressInProgressRemainingCourses: {\n defaultMessage: 'Enroll in the next course in the program.',\n id: 'program.progress.in.progress.remaining.courses',\n description: 'Message for remaining courses in the In Progress tab.',\n },\n programProgressInProgressCompletedCourses: {\n defaultMessage: 'You have completed all courses in the program.',\n id: 'program.progress.in.progress.completed.courses',\n description: 'Message for completed courses in the In Progress tab.',\n },\n programProgressInProgressCourseProfessionalUpgradeModalTitle: {\n defaultMessage: 'You now have full access to the {title}',\n id: 'program.progress.in.progress.course.professional.upgrade.modal.title',\n description: 'Modal title for Professional Certificate courses in the In Progress tab.',\n },\n programProgressInProgressCourseProfessionalUpgradeModalContent: {\n defaultMessage: \"You're saving as a subscriber. This course is valued at {price}.\",\n id: 'program.progress.in.progress.course.professional.upgrade.modal.content',\n description: 'Modal content for Professional Certificate courses in the In Progress tab.',\n },\n programProgressInProgressProfessionalCertificate: {\n defaultMessage: 'This course is included in your subscription. Upgrade to get full course access.',\n id: 'program.progress.in.progress.professional.certificate.status',\n description: 'Certificate status for courses in the In Progress tab related to professional program.',\n },\n programProgressInProgressMicromastersCertificate: {\n defaultMessage: 'Upgrade to get full course access. This course is not included in your subscription.',\n id: 'program.progress.in.progress.micromasters.certificate.needs.verified',\n description: 'Certificate status indicating that a verified certificate is needed for Micromasters courses in the In Progress tab.',\n },\n programProgressPathwaysCreditPathwayTitle: {\n defaultMessage: 'Credit pathways',\n id: 'program.progress.pathways.credit.pathway.title',\n description: 'Title for the Credit Pathway section in the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayDescriptionLine1: {\n defaultMessage: 'Transform your {org} {type} into a full master’s degree.',\n id: 'program.progress.pathways.credit.pathway.description.line1',\n description: 'First line of description for the Credit Pathway section in the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayDescriptionLine2: {\n defaultMessage: 'Successful completion of <i>{org} {title}</i> credential can be applied towards flexible, rigorous, and affordable masters degrees from the world’s leading universities.',\n id: 'program.progress.pathways.credit.pathway.description.line2',\n description: 'Second line of description for the Credit Pathway section in the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayLearnMore: {\n defaultMessage: 'Learn more',\n id: 'program.progress.pathways.credit.pathway.learn.more',\n description: 'Text for the Learn More link in the Credit Pathway section of the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayFaqButton: {\n defaultMessage: 'MicroMasters Credit FAQ',\n id: 'program.progress.pathways.credit.pathway.faq',\n description: 'Text for the FAQ link in the Credit Pathway section of the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayFaqTitle: {\n defaultMessage: 'Learn more about how to transfer your MicroMasters',\n id: 'program.progress.pathways.credit.pathway.faq.title',\n description: 'Title for the FAQ section in the Credit Pathway section of the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayFaqDescription: {\n defaultMessage: 'Helper copy to be updated here. Information about how to earn and transfer credits from edX partners to university institutions',\n id: 'program.progress.pathways.credit.pathway.faq.description',\n description: 'Description for the FAQ section in the Credit Pathway section of the Pathways tab.',\n },\n});\n\nexport default messages;\n"]}
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/ProgramProgress/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,2BAA2B,EAAE;QAC3B,cAAc,EAAE,cAAc;QAC9B,EAAE,EAAE,+BAA+B;QACnC,WAAW,EAAE,yCAAyC;KACvD;IACD,gBAAgB,EAAE;QAChB,cAAc,EAAE,uBAAuB;QACvC,EAAE,EAAE,qCAAqC;QACzC,WAAW,EAAE,qGAAqG;KACnH;IACD,6BAA6B,EAAE;QAC7B,cAAc,EAAE,kBAAkB;QAClC,EAAE,EAAE,kCAAkC;QACtC,WAAW,EAAE,yEAAyE;KACvF;IACD,2BAA2B,EAAE;QAC3B,cAAc,EAAE,0EAA0E;QAC1F,EAAE,EAAE,gCAAgC;QACpC,WAAW,EAAE,8EAA8E;KAC5F;IACD,+BAA+B,EAAE;QAC/B,cAAc,EAAE,sBAAsB;QACtC,EAAE,EAAE,oCAAoC;QACxC,WAAW,EAAE,sFAAsF;KACpG;IACD,6BAA6B,EAAE;QAC7B,cAAc,EAAE,0KAA0K;QAC1L,EAAE,EAAE,kCAAkC;QACtC,WAAW,EAAE,gFAAgF;KAC9F;IACD,2CAA2C,EAAE;QAC3C,cAAc,EAAE,iDAAiD;QACjE,EAAE,EAAE,kDAAkD;QACtD,WAAW,EAAE,qGAAqG;KACnH;IACD,6CAA6C,EAAE;QAC7C,cAAc,EAAE,kBAAkB;QAClC,EAAE,EAAE,yDAAyD;QAC7D,WAAW,EAAE,kFAAkF;KAChG;IACD,yCAAyC,EA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IACD,4CAA4C,EAAE;QAC5C,cAAc,EAAE,oDAAoD;QACpE,EAAE,EAAE,oDAAoD;QACxD,WAAW,EAAE,8EAA8E;KAC5F;IACD,kDAAkD,EAAE;QAClD,cAAc,EAAE,iIAAiI;QACjJ,EAAE,EAAE,0DAA0D;QAC9D,WAAW,EAAE,oFAAoF;KAClG;IACD,oCAAoC,EAAE;QACpC,cAAc,EAAE,qBAAqB;QACrC,EAAE,EAAE,2CAA2C;QAC/C,WAAW,EAAE,wCAAwC;KACtD;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n programProgressInstitutions: {\n defaultMessage: 'Institutions',\n id: 'program.progress.institutions',\n description: 'Label text for organization image logos',\n },\n programTypeLabel: {\n defaultMessage: '{programType} program',\n id: 'program.progress.program.type.label',\n description: 'Label displaying the program type (e.g. \"MicroMasters program\", \"Professional Certificate program\")',\n },\n programProgressCompleteHeader: {\n defaultMessage: 'Congratulations!',\n id: 'program.progress.complete.header',\n description: 'header text for the program progress page when all courses are complete',\n },\n programProgressCompleteText: {\n defaultMessage: 'You have successfully completed all the requirements for {programTitle}.',\n id: 'program.progress.complete.text',\n description: 'text to display when a user has completed all of the courses for the program',\n },\n programProgressIncompleteHeader: {\n defaultMessage: 'Your Program Journey',\n id: 'program.progress.incomplete.header',\n description: 'header text to display when the user has remaining incomplete courses in the program',\n },\n programProgressIncompleteText: {\n defaultMessage: 'Track and plan your progress through the {totalCoursesInProgram} courses in this program. To complete the program, you must earn a verified certificate for each course.',\n id: 'program.progress.incomplete.text',\n description: 'text to display when a user has not completed all of the courses for a program',\n },\n programProgressCardCompletedCertificateText: {\n defaultMessage: 'You earned the certificate on {certificateDate}',\n id: 'program.progress.card.completed.certificate.text',\n description: 'text to display on the progress card completed tab related to the certificate status for the course',\n },\n programProgressCardCompletedCertificateButton: {\n defaultMessage: 'View certificate',\n id: 'program.progress.card.completed.certificate.button.text',\n description: 'text to display on the progress card on certificate button for completed courses',\n },\n programProgressCardViewCourseDetailButton: {\n defaultMessage: 'View course details',\n id: 'program.progress.card.view.course.detail.button.text',\n description: 'text to display on the progress card for the view course details button',\n },\n programProgressCardResumeCourseButton: {\n defaultMessage: 'Resume course',\n id: 'program.progress.card.resume.course.button.text',\n description: 'text to display on the progress card for the resume course button',\n },\n programProgressCardUpgradeButton: {\n defaultMessage: 'Upgrade with your subscription',\n id: 'program.progress.card.upgrade.button.text',\n description: 'text to display on the progress card for the upgrade button',\n },\n programProgressCardEnrollText: {\n defaultMessage: 'Enrolled on:',\n id: 'program.progress.card.enroll.text',\n description: 'text to display on the progress card for the enrolled status of the course',\n },\n programProgressCardIncludedInSubscriptionText: {\n defaultMessage: 'Included in your subscription',\n id: 'program.progress.card.included.in.subscription.text',\n description: 'text to display on the progress card for remaining courses that are included in the subscription',\n },\n programProgressCardStartText: {\n defaultMessage: 'Started',\n id: 'program.progress.card.start.text',\n description: 'text to display on the progress card for the start date of the course',\n },\n programProgressInProgressTab: {\n defaultMessage: 'In progress',\n id: 'program.progress.in.progress.tab',\n description: 'Label for the \"In progress\" tab on the program progress page, which lists courses that the user has started but not yet completed.',\n },\n programProgressRemainingTab: {\n defaultMessage: 'Remaining',\n id: 'program.progress.remaining.tab',\n description: 'Label for the \"Remaining\" tab on the program progress page, which lists courses that the user has not yet started.',\n },\n programProgressCompletedTab: {\n defaultMessage: 'Completed',\n id: 'program.progress.completed.tab',\n description: 'Label for the \"Completed\" tab on the program progress page, which lists courses that the user has completed.',\n },\n programProgressPathwaysTab: {\n defaultMessage: 'Pathways',\n id: 'program.progress.pathways.tab',\n description: 'Label for the \"Pathways\" tab on the program progress page, which gives details of how the program can be used to further the learners education. This tab is only shown for MicroMasters programs.',\n },\n programProgressRemainingCourse: {\n defaultMessage: 'Remaining Courses',\n id: 'program.progress.remaining.course',\n description: 'Header text to be displayed inside the Remaining tab of the program progress page.',\n },\n programProgressRemainingTabNoCourse: {\n defaultMessage: \"You have enrolled in all of this program's courses.\",\n id: 'program.progress.remaining.tab.no.course',\n description: 'Text to display on the Remaining tab of the program progress page when there is no course remaining for the user',\n },\n programProgressCompletedCourse: {\n defaultMessage: 'Completed courses',\n id: 'program.progress.completed.course',\n description: 'Header text to be displayed inside the Completed tab of the program progress page.',\n },\n programProgressCompletedTabNoCourse: {\n defaultMessage: 'As you complete courses, you will see them listed here.',\n id: 'program.progress.completed.tab.no.course',\n description: 'Text to display on the Completed tab of the program progress page when no course is completed for the user',\n },\n programProgressCompletedBannerTitle: {\n defaultMessage: 'Earning a program record',\n id: 'program.progress.completed.banner.title',\n description: 'Title text for the banner displayed on the Completed tab of the program progress page.',\n },\n programProgressCompletedBannerDescription: {\n defaultMessage: 'Once you meet all course and program requirements, you will receive a program record and your professional certificate.',\n id: 'program.progress.completed.banner.description',\n description: 'Description text for the banner displayed on the Completed tab of the program progress page.',\n },\n programProgressCompletedBannerHelpCenterButton: {\n defaultMessage: 'Help center',\n id: 'program.progress.completed.banner.help.center.button',\n description: 'Text for the Help Center button displayed on the banner in the Completed tab of the program progress page.',\n },\n programProgressCompletedBannerMyProgramRecordsButton: {\n defaultMessage: 'My program records',\n id: 'program.progress.completed.banner.my.program.records.button',\n description: 'Text for the My Program Records button displayed on the banner in the Completed tab of the program progress page.',\n },\n programProgressEarnedCertificates: {\n defaultMessage: 'Earned Certificates',\n id: 'program.progress.earned.certificates',\n description: 'Label shown in the program progress circle',\n },\n programProgressCertificateLabel: {\n defaultMessage: 'Program Certificate Progress',\n id: 'program.progress.certificate.program.progress',\n description: 'Label shown under the program progress circle',\n },\n programProgressCertificateContentOne: {\n defaultMessage: 'Earn a professional certificate when you meet requirements for all courses in the series.',\n id: 'program.progress.certificate.content.one',\n description: 'First content paragraph shown under the program progress circle',\n },\n programProgressCertificateContentTwo: {\n defaultMessage: 'This program is valued at {price} for non-subscribers.',\n id: 'program.progress.certificate.content.two',\n description: 'Second content paragraph shown under the program progress circle',\n },\n programProgressInProgressCourse: {\n defaultMessage: 'Courses in progress',\n id: 'program.progress.in.progress.course',\n description: 'Header text to be displayed inside the In Progress tab of the program progress page.',\n },\n programProgressInProgressCourseMicromastersUpgrade: {\n defaultMessage: 'Upgrade to verified for {price}',\n id: 'program.progress.in.progress.course.micromasters.upgrade',\n description: 'Upgrade message for Micromasters courses in the In Progress tab.',\n },\n programProgressInProgressRemainingCourses: {\n defaultMessage: 'Enroll in the next course in the program.',\n id: 'program.progress.in.progress.remaining.courses',\n description: 'Message for remaining courses in the In Progress tab.',\n },\n programProgressInProgressCompletedCourses: {\n defaultMessage: 'You have completed all courses in the program.',\n id: 'program.progress.in.progress.completed.courses',\n description: 'Message for completed courses in the In Progress tab.',\n },\n programProgressInProgressCourseProfessionalUpgradeModalTitle: {\n defaultMessage: 'You now have full access to the {title}',\n id: 'program.progress.in.progress.course.professional.upgrade.modal.title',\n description: 'Modal title for Professional Certificate courses in the In Progress tab.',\n },\n programProgressInProgressCourseProfessionalUpgradeModalContent: {\n defaultMessage: \"You're saving as a subscriber. This course is valued at {price}.\",\n id: 'program.progress.in.progress.course.professional.upgrade.modal.content',\n description: 'Modal content for Professional Certificate courses in the In Progress tab.',\n },\n programProgressInProgressProfessionalCertificate: {\n defaultMessage: 'This course is included in your subscription. Upgrade to get full course access.',\n id: 'program.progress.in.progress.professional.certificate.status',\n description: 'Certificate status for courses in the In Progress tab related to professional program.',\n },\n programProgressInProgressMicromastersCertificate: {\n defaultMessage: 'Upgrade to get full course access. This course is not included in your subscription.',\n id: 'program.progress.in.progress.micromasters.certificate.needs.verified',\n description: 'Certificate status indicating that a verified certificate is needed for Micromasters courses in the In Progress tab.',\n },\n programProgressPathwaysCreditPathwayTitle: {\n defaultMessage: 'Credit pathways',\n id: 'program.progress.pathways.credit.pathway.title',\n description: 'Title for the Credit Pathway section in the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayDescriptionLine1: {\n defaultMessage: 'Transform your {org} {type} into a full master’s degree.',\n id: 'program.progress.pathways.credit.pathway.description.line1',\n description: 'First line of description for the Credit Pathway section in the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayDescriptionLine2: {\n defaultMessage: 'Successful completion of <i>{org} {title}</i> credential can be applied towards flexible, rigorous, and affordable masters degrees from the world’s leading universities.',\n id: 'program.progress.pathways.credit.pathway.description.line2',\n description: 'Second line of description for the Credit Pathway section in the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayLearnMore: {\n defaultMessage: 'Learn more',\n id: 'program.progress.pathways.credit.pathway.learn.more',\n description: 'Text for the Learn More link in the Credit Pathway section of the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayFaqButton: {\n defaultMessage: 'MicroMasters Credit FAQ',\n id: 'program.progress.pathways.credit.pathway.faq',\n description: 'Text for the FAQ link in the Credit Pathway section of the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayFaqTitle: {\n defaultMessage: 'Learn more about how to transfer your MicroMasters',\n id: 'program.progress.pathways.credit.pathway.faq.title',\n description: 'Title for the FAQ section in the Credit Pathway section of the Pathways tab.',\n },\n programProgressPathwaysCreditPathwayFaqDescription: {\n defaultMessage: 'Helper copy to be updated here. Information about how to earn and transfer credits from edX partners to university institutions',\n id: 'program.progress.pathways.credit.pathway.faq.description',\n description: 'Description for the FAQ section in the Credit Pathway section of the Pathways tab.',\n },\n programProgressReturnToDashboardText: {\n defaultMessage: 'Return to dashboard',\n id: 'program.progress.return.to.dashboard.text',\n description: 'Text for the return to dashboard link.',\n },\n});\n\nexport default messages;\n"]}
|