@edx/frontend-app-subscription-learner-dashboard 1.11.0 → 1.11.1
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 +2 -7
- package/dist/containers/CoursesPanel/index.js.map +1 -1
- package/dist/containers/CoursesPanel/messages.d.ts +1 -9
- package/dist/containers/CoursesPanel/messages.js +1 -6
- package/dist/containers/CoursesPanel/messages.js.map +1 -1
- package/dist/containers/Dashboard/DashboardContent.d.ts +2 -0
- package/dist/containers/Dashboard/DashboardContent.js +5 -0
- package/dist/containers/Dashboard/DashboardContent.js.map +1 -0
- package/dist/containers/Dashboard/index.js +2 -2
- package/dist/containers/Dashboard/index.js.map +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgress.js +2 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgress.js.map +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/ProgramProgressCircle.d.ts +4 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/ProgramProgressCircle.js +29 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/ProgramProgressCircle.js.map +1 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/index.d.ts +4 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/index.js +12 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/index.js.map +1 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/index.scss +63 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/messages.d.ts +20 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/messages.js +21 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/messages.js.map +1 -1
- package/dist/containers/ProgramDashboard/data/constants.d.ts +7 -0
- package/dist/containers/ProgramDashboard/data/constants.js +7 -0
- package/dist/containers/ProgramDashboard/data/constants.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { useIntl } from '@openedx/frontend-base';
|
|
4
4
|
import { useInitializeSubsCourseDashboard } from '../../data/hooks';
|
|
5
|
-
import { CourseFilterControls, } from '../../containers/CourseFilterControls';
|
|
6
5
|
import CourseListSlot from '../../slots/CourseListSlot';
|
|
7
6
|
import NoCoursesViewSlot from '../../slots/NoCoursesViewSlot';
|
|
8
7
|
import { useFilters } from '../../data/context';
|
|
@@ -10,7 +9,7 @@ import { getVisibleList } from '../../utils/dataTransformers';
|
|
|
10
9
|
import messages from './messages';
|
|
11
10
|
import './index.scss';
|
|
12
11
|
/**
|
|
13
|
-
* Renders the list of CourseCards
|
|
12
|
+
* Renders the list of CourseCards
|
|
14
13
|
* Also houses the NoCoursesView to display if the user hasn't enrolled in any courses.
|
|
15
14
|
* @returns List of courses as CourseCards or empty state
|
|
16
15
|
*/
|
|
@@ -31,9 +30,6 @@ export const CoursesPanel = () => {
|
|
|
31
30
|
setPageNumber(1);
|
|
32
31
|
}
|
|
33
32
|
}, [numPages, pageNumber, setPageNumber]);
|
|
34
|
-
// TODO [TEMP]: Passing data twice and displaying the list twice, also fixed the corresponding test cases to reflect this.
|
|
35
|
-
// Reason: Requirements not finalized
|
|
36
|
-
// Action: Revisit after UX and data confirmation
|
|
37
33
|
const courseListData = {
|
|
38
34
|
showFilters: true,
|
|
39
35
|
setPageNumber,
|
|
@@ -41,8 +37,7 @@ export const CoursesPanel = () => {
|
|
|
41
37
|
visibleList,
|
|
42
38
|
verifiedCourse: true,
|
|
43
39
|
};
|
|
44
|
-
|
|
45
|
-
return (_jsxs("div", { className: "course-list-container", children: [_jsxs("div", { className: "course-list-heading-container", children: [_jsx("h2", { className: "course-list-title", children: formatMessage(messages.myCourses) }), _jsx("p", { className: "mb-4.5", children: formatMessage(messages.lastSession) })] }), hasCourses ? _jsx(CourseListSlot, { courseListData: courseListData }) : _jsx(NoCoursesViewSlot, {}), _jsx("div", { className: "course-list-heading-container", children: _jsx("h2", { className: "course-list-title text-gray-700", children: formatMessage(messages.limitedCourse) }) }), hasCourses ? _jsx(CourseListSlot, { courseListData: limitedCourseListData }) : _jsx(NoCoursesViewSlot, {})] }));
|
|
40
|
+
return (_jsxs("div", { className: "course-list-container", children: [_jsxs("div", { className: "course-list-heading-container", children: [_jsx("h2", { className: "course-list-title", children: formatMessage(messages.myCourses) }), _jsx("p", { className: "mb-4.5", children: formatMessage(messages.lastSession) })] }), hasCourses ? _jsx(CourseListSlot, { courseListData: courseListData }) : _jsx(NoCoursesViewSlot, {})] }));
|
|
46
41
|
};
|
|
47
42
|
CoursesPanel.propTypes = {};
|
|
48
43
|
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,
|
|
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,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,MAA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AW,EAAE,IAAI;QACjB,aAAa;QACb,QAAQ;QACR,WAAW;QACX,cAAc,EAAE,IAAI;KACrB,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAK,SAAS,EAAC,+BAA+B,aAC5C,aAAI,SAAS,EAAC,mBAAmB,YAAE,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAM,EAC1E,YAAG,SAAS,EAAC,QAAQ,YAAE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAK,IAC3D,EACL,UAAU,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,cAAc,EAAE,cAAc,GAAI,CAAC,CAAC,CAAC,KAAC,iBAAiB,KAAG,IACpF,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 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 } = useInitializeSubsCourseDashboard();\n const hasCourses = useMemo(() => data?.subscriptionCourses?.length > 0, [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 verifiedCourse: true,\n };\n\n return (\n <div className=\"course-list-container\">\n <div className=\"course-list-heading-container\">\n <h2 className=\"course-list-title\">{formatMessage(messages.myCourses)}</h2>\n <p className=\"mb-4.5\">{formatMessage(messages.lastSession)}</p>\n </div>\n {hasCourses ? <CourseListSlot courseListData={courseListData} /> : <NoCoursesViewSlot />}\n </div>\n );\n};\n\nCoursesPanel.propTypes = {};\n\nexport default CoursesPanel;\n"]}
|
|
@@ -5,7 +5,7 @@ declare namespace messages {
|
|
|
5
5
|
let defaultMessage: string;
|
|
6
6
|
let description: string;
|
|
7
7
|
}
|
|
8
|
-
namespace
|
|
8
|
+
namespace lastSession {
|
|
9
9
|
let id_1: string;
|
|
10
10
|
export { id_1 as id };
|
|
11
11
|
let defaultMessage_1: string;
|
|
@@ -13,12 +13,4 @@ declare namespace messages {
|
|
|
13
13
|
let description_1: string;
|
|
14
14
|
export { description_1 as description };
|
|
15
15
|
}
|
|
16
|
-
namespace lastSession {
|
|
17
|
-
let id_2: string;
|
|
18
|
-
export { id_2 as id };
|
|
19
|
-
let defaultMessage_2: string;
|
|
20
|
-
export { defaultMessage_2 as defaultMessage };
|
|
21
|
-
let description_2: string;
|
|
22
|
-
export { description_2 as description };
|
|
23
|
-
}
|
|
24
16
|
}
|
|
@@ -2,14 +2,9 @@ import { defineMessages } from '@openedx/frontend-base';
|
|
|
2
2
|
const messages = defineMessages({
|
|
3
3
|
myCourses: {
|
|
4
4
|
id: 'dashboard.mycourses',
|
|
5
|
-
defaultMessage: '
|
|
5
|
+
defaultMessage: 'My courses',
|
|
6
6
|
description: 'Label for courses belonging to a user\'s active subscription',
|
|
7
7
|
},
|
|
8
|
-
limitedCourse: {
|
|
9
|
-
id: 'subs.limitedCourses',
|
|
10
|
-
defaultMessage: 'Limited access courses',
|
|
11
|
-
description: 'Label for subscription courses with limited access',
|
|
12
|
-
},
|
|
13
8
|
lastSession: {
|
|
14
9
|
id: 'subs.lastSession',
|
|
15
10
|
defaultMessage: 'Last session was Thursday, May 20, 2026.', // This is a placeholder default message. The actual message should be dynamic based on the last session date received via api.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/CoursesPanel/messages.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,SAAS,EAAE;QACT,EAAE,EAAE,qBAAqB;QACzB,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/CoursesPanel/messages.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,SAAS,EAAE;QACT,EAAE,EAAE,qBAAqB;QACzB,cAAc,EAAE,YAAY;QAC5B,WAAW,EAAE,8DAA8D;KAC5E;IACD,WAAW,EAAE;QACX,EAAE,EAAE,kBAAkB;QACtB,cAAc,EAAE,0CAA0C,EAAE,+HAA+H;QAC3L,WAAW,EAAE,iEAAiE;KAC/E;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n myCourses: {\n id: 'dashboard.mycourses',\n defaultMessage: 'My courses',\n description: 'Label for courses belonging to a user\\'s active subscription',\n },\n lastSession: {\n id: 'subs.lastSession',\n defaultMessage: 'Last session was Thursday, May 20, 2026.', // This is a placeholder default message. The actual message should be dynamic based on the last session date received via api.\n description: 'Label for subscription courses to show last session information',\n }\n});\n\nexport default messages;\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Row, Col } from '@openedx/paragon';
|
|
3
|
+
import DashboardTabs from './DashboardTabs';
|
|
4
|
+
export const DashboardContent = () => (_jsxs(Row, { children: [_jsx(Col, { xs: 12, lg: 8, children: _jsx(DashboardTabs, {}) }), _jsx(Col, { xs: 12, lg: 4, className: "mt-4", "data-testid": "dashboard-sidebar", children: _jsxs("div", { className: "dashboard-sidebar", children: [_jsx("h2", { children: "Sidebar" }), _jsx("p", { children: "This is the sidebar content." })] }) })] }));
|
|
5
|
+
//# sourceMappingURL=DashboardContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardContent.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/DashboardContent.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAO,GAAG,EAAE,CAAC,CACxC,MAAC,GAAG,eACF,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,YAChB,KAAC,aAAa,KAAG,GACb,EAEN,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAC,MAAM,iBAAa,mBAAmB,YAClE,eAAK,SAAS,EAAC,mBAAmB,aAEhC,mCAAgB,EAChB,uDAAmC,IAC/B,GACF,IACF,CACP,CAAC","sourcesContent":["import { FC } from 'react';\nimport { Row, Col } from '@openedx/paragon';\nimport DashboardTabs from './DashboardTabs';\n\nexport const DashboardContent: FC = () => (\n <Row>\n <Col xs={12} lg={8}>\n <DashboardTabs />\n </Col>\n\n <Col xs={12} lg={4} className=\"mt-4\" data-testid=\"dashboard-sidebar\">\n <div className=\"dashboard-sidebar\">\n {/* Temporary Content added, will be replaced with actual sidebar content */}\n <h2>Sidebar</h2>\n <p>This is the sidebar content.</p>\n </div>\n </Col>\n </Row>\n);\n"]}
|
|
@@ -3,7 +3,7 @@ import { useMemo } from 'react';
|
|
|
3
3
|
import { useSelectSessionModal } from '../../data/context';
|
|
4
4
|
import { useInitializeSubsCourseDashboard } from '../../data/hooks';
|
|
5
5
|
import SelectSessionModal from '../../containers/SelectSessionModal';
|
|
6
|
-
import
|
|
6
|
+
import { DashboardContent } from './DashboardContent';
|
|
7
7
|
import DashboardModalSlot from '../../slots/DashboardModalSlot';
|
|
8
8
|
import RecentlyViewedPanel from '../RecentlyViewedPanel';
|
|
9
9
|
import LoadingView from './LoadingView';
|
|
@@ -20,7 +20,7 @@ export const Dashboard = () => {
|
|
|
20
20
|
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]);
|
|
21
21
|
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: isPending
|
|
22
22
|
? (_jsx(LoadingView, {}))
|
|
23
|
-
: (_jsxs(DashboardLayout, { children: [_jsx(SubscriptionBanner, {}), _jsx(DashboardTitle, {}), _jsx(
|
|
23
|
+
: (_jsxs(DashboardLayout, { children: [_jsx(SubscriptionBanner, {}), _jsx(DashboardTitle, {}), _jsx(DashboardContent, {}), _jsx(RecentlyViewedPanel, {})] })) })] }) }) }));
|
|
24
24
|
};
|
|
25
25
|
export default Dashboard;
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/index.jsx"],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AG,EAAE,WAAC,OAAA,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,mBAAmB,0CAAE,MAAM,IAAG,CAAC,CAAA,EAAA,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhF,OAAO,CACL,cAAK,EAAE,EAAC,sBAAsB,YAC5B,yBACE,eAAK,EAAE,EAAC,qBAAqB,EAAC,SAAS,EAAC,6BAA6B,aACnE,aAAI,SAAS,EAAC,SAAS,YAAE,SAAS,GAAM,EACvC,CAAC,SAAS,IAAI,CACb,8BACE,KAAC,kBAAkB,KAAG,EACrB,CAAC,UAAU,IAAI,sBAAsB,CAAC,IAAI,KAAC,kBAAkB,KAAG,IAChE,CACJ,EACD,cAAK,EAAE,EAAC,mBAAmB,iBAAa,mBAAmB,YACxD,SAAS;4BACR,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,CAAC;4BACnB,CAAC,CAAC,CACA,MAAC,eAAe,eACd,KAAC,kBAAkB,KAAG,EACtB,KAAC,cAAc,KAAG,EAClB,KAAC,gBAAgB,KAAG,EACpB,KAAC,mBAAmB,KAAG,IACP,CACnB,GACC,IACF,GACD,GACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { useMemo } from 'react';\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 RecentlyViewedPanel from '../RecentlyViewedPanel';\n\nimport LoadingView from './LoadingView';\nimport DashboardLayout from './DashboardLayout';\n\nimport hooks from './hooks';\nimport './index.scss';\nimport { SubscriptionBanner } from '../SubscriptionBanner';\nimport { DashboardTitle } from './DashboardTitle';\n\nexport const Dashboard = () => {\n const { data, isPending } = useInitializeSubsCourseDashboard();\n const { pageTitle } = hooks.useDashboardMessages();\n const { selectSessionModal } = useSelectSessionModal();\n const showSelectSessionModal = selectSessionModal.cardId !== null;\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 {isPending\n ? (<LoadingView />)\n : (\n <DashboardLayout>\n <SubscriptionBanner />\n <DashboardTitle />\n <DashboardContent />\n <RecentlyViewedPanel />\n </DashboardLayout>\n )}\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Dashboard;\n"]}
|
|
@@ -6,6 +6,7 @@ import { useProgressData } from '../../../hooks';
|
|
|
6
6
|
import ProgramProgressHeader from './ProgramProgressHeader';
|
|
7
7
|
import ProgramProgressInfo from './ProgramProgressInfo';
|
|
8
8
|
import { ProgramProgressTabs } from './ProgramProgressTabs';
|
|
9
|
+
import { ProgramProgressSidebar } from './ProgramProgressSidebar';
|
|
9
10
|
const ProgramProgress = () => {
|
|
10
11
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
11
12
|
const { programProgressData, isLoading, error } = useProgressData();
|
|
@@ -31,7 +32,7 @@ const ProgramProgress = () => {
|
|
|
31
32
|
const remainingCourseCount = ((_j = courseData === null || courseData === void 0 ? void 0 : courseData.notStarted) === null || _j === void 0 ? void 0 : _j.length) || 0;
|
|
32
33
|
const completedCourseCount = ((_k = courseData === null || courseData === void 0 ? void 0 : courseData.completed) === null || _k === void 0 ? void 0 : _k.length) || 0;
|
|
33
34
|
const discountData = programData === null || programData === void 0 ? void 0 : programData.discountData;
|
|
34
|
-
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 }),
|
|
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 }) })] })] })] }));
|
|
35
36
|
};
|
|
36
37
|
export default ProgramProgress;
|
|
37
38
|
//# 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;AAEvD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,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,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,eAAe,GAAO,GAAG,EAAE;;IAC/B,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,eAAe,EAAE,CAAC;IAEpE,IAAI,mBAAmB,KAAK,IAAI,EAAE,CAAC;QACjC,OAAO,wCAAsB,CAAC;IAChC,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,uCAAqB,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,2CAAyB,CAAC;IACnC,CAAC;IAED,MAAM,WAAW,GAAG,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,WAAW,CAAC;IACrD,MAAM,UAAU,GAAG,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,UAAU,C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BAAX,WAAW,CAAE,KAAK,mCAAI,EAAE,EACtC,WAAW,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,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 { Col, Container, Row } from '@openedx/paragon';\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';\n\nconst ProgramProgress: FC = () => {\n const { programProgressData, isLoading, error } = useProgressData();\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 <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"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { PROGRAM_PROGRESS_CIRCLE_MAP } from '../../data/constants';
|
|
3
|
+
import { useIntl } from '@openedx/frontend-base';
|
|
4
|
+
import messages from '../messages';
|
|
5
|
+
const { X_AXIS, Y_AXIS, CIRCLE_RADIUS, CIRCLE_DEGREES, STROKE_WIDTH, } = PROGRAM_PROGRESS_CIRCLE_MAP;
|
|
6
|
+
const CircleSegment = ({ total, index, classList, }) => {
|
|
7
|
+
const segmentDash = 2 * Math.PI * CIRCLE_RADIUS;
|
|
8
|
+
const degreeInc = 360 / total;
|
|
9
|
+
// Remove strokeWidth to show a gap between the segments
|
|
10
|
+
let dashArray = segmentDash - STROKE_WIDTH;
|
|
11
|
+
const segmentDegrees = CIRCLE_DEGREES + (index * degreeInc);
|
|
12
|
+
const offset = segmentDash - ((1 / total) * segmentDash);
|
|
13
|
+
// Want the incomplete segments to have no gaps
|
|
14
|
+
if (classList === 'incomplete' && (index + 1) < total) {
|
|
15
|
+
dashArray = segmentDash;
|
|
16
|
+
}
|
|
17
|
+
return (_jsx("circle", { "data-testid": "circle-segment", className: classList, r: CIRCLE_RADIUS, cx: X_AXIS, cy: Y_AXIS, transform: `rotate(${segmentDegrees} ${X_AXIS} ${Y_AXIS})`, strokeWidth: STROKE_WIDTH, fill: "none", strokeDasharray: dashArray, strokeDashoffset: offset }));
|
|
18
|
+
};
|
|
19
|
+
const ProgramProgressCircle = ({ inProgress, remaining, completed }) => {
|
|
20
|
+
const totalCourses = inProgress + remaining + completed;
|
|
21
|
+
const { formatMessage } = useIntl();
|
|
22
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "progress-circle-wrapper", children: [_jsxs("svg", { "data-testid": "svg-circle", className: "progress-circle w-100 h-100", viewBox: "5.4 5.4 33.2 33.2", "aria-hidden": "true", children: [_jsx("circle", { className: "bg", r: CIRCLE_RADIUS, cx: X_AXIS, cy: Y_AXIS, strokeWidth: STROKE_WIDTH, fill: "none" }), Array.from({ length: totalCourses }).map((_, index) => {
|
|
23
|
+
const segmentType = index >= completed ? 'incomplete' : 'complete';
|
|
24
|
+
const typeIndex = index >= completed ? index - completed : index;
|
|
25
|
+
return (_jsx(CircleSegment, { total: totalCourses, index: index, classList: segmentType }, `${segmentType}-${typeIndex}`));
|
|
26
|
+
})] }), _jsxs("div", { className: "progress-label", children: [_jsxs("div", { className: "numbers", children: [_jsx("span", { className: "complete", children: completed }), "/", _jsx("span", { className: "total", children: totalCourses })] }), _jsx("div", { className: "label", children: formatMessage(messages.programProgressEarnedCertificates) })] })] }) }));
|
|
27
|
+
};
|
|
28
|
+
export default ProgramProgressCircle;
|
|
29
|
+
//# sourceMappingURL=ProgramProgressCircle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgramProgressCircle.js","sourceRoot":"","sources":["../../../../../src/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/ProgramProgressCircle.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,MAAM,EACJ,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,GAC5D,GAAG,2BAA2B,CAAC;AAEhC,MAAM,aAAa,GAAG,CAAC,EACrB,KAAK,EAAE,KAAK,EAAE,SAAS,GACJ,EAAE,EAAE;IACvB,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,aAAa,CAAC;IAChD,MAAM,SAAS,GAAG,GAAG,GAAG,KAAK,CAAC;IAC9B,wDAAwD;IACxD,IAAI,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;IAC3C,MAAM,cAAc,GAAG,cAAc,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC;IACzD,+CAA+C;IAC/C,IAAI,SAAS,KAAK,YAAY,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC;QACtD,SAAS,GAAG,WAAW,CAAC;IAC1B,CAAC;IAED,OAAO,CACL,gCACc,gBAAgB,EAC5B,SAAS,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AAS,EAAE,CAIlC,CACH,CAAC;wBACJ,CAAC,CAAC,IACE,EACN,eAAK,SAAS,EAAC,gBAAgB,aAC7B,eAAK,SAAS,EAAC,SAAS,aACtB,eAAM,SAAS,EAAC,UAAU,YAAE,SAAS,GAAQ,OAAC,eAAM,SAAS,EAAC,OAAO,YAAE,YAAY,GAAQ,IACvF,EACN,cAAK,SAAS,EAAC,OAAO,YACnB,aAAa,CAAC,QAAQ,CAAC,iCAAiC,CAAC,GACtD,IACF,IACF,GACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import { ProgramProgressCircleProps, CircleSegmentProps } from '../../data/types';\nimport { FC } from 'react';\nimport { PROGRAM_PROGRESS_CIRCLE_MAP } from '../../data/constants';\nimport { useIntl } from '@openedx/frontend-base';\nimport messages from '../messages';\n\nconst {\n X_AXIS, Y_AXIS, CIRCLE_RADIUS, CIRCLE_DEGREES, STROKE_WIDTH,\n} = PROGRAM_PROGRESS_CIRCLE_MAP;\n\nconst CircleSegment = ({\n total, index, classList,\n}: CircleSegmentProps) => {\n const segmentDash = 2 * Math.PI * CIRCLE_RADIUS;\n const degreeInc = 360 / total;\n // Remove strokeWidth to show a gap between the segments\n let dashArray = segmentDash - STROKE_WIDTH;\n const segmentDegrees = CIRCLE_DEGREES + (index * degreeInc);\n const offset = segmentDash - ((1 / total) * segmentDash);\n // Want the incomplete segments to have no gaps\n if (classList === 'incomplete' && (index + 1) < total) {\n dashArray = segmentDash;\n }\n\n return (\n <circle\n data-testid=\"circle-segment\"\n className={classList}\n r={CIRCLE_RADIUS}\n cx={X_AXIS}\n cy={Y_AXIS}\n transform={`rotate(${segmentDegrees} ${X_AXIS} ${Y_AXIS})`}\n strokeWidth={STROKE_WIDTH}\n fill=\"none\"\n strokeDasharray={dashArray}\n strokeDashoffset={offset}\n />\n );\n};\n\nconst ProgramProgressCircle: FC<ProgramProgressCircleProps> = ({ inProgress, remaining, completed }) => {\n const totalCourses = inProgress + remaining + completed;\n const { formatMessage } = useIntl();\n\n return (\n <>\n <div className=\"progress-circle-wrapper\">\n <svg data-testid=\"svg-circle\" className=\"progress-circle w-100 h-100\" viewBox=\"5.4 5.4 33.2 33.2\" aria-hidden=\"true\">\n <circle className=\"bg\" r={CIRCLE_RADIUS} cx={X_AXIS} cy={Y_AXIS} strokeWidth={STROKE_WIDTH} fill=\"none\" />\n {Array.from({ length: totalCourses }).map((_, index) => {\n const segmentType = index >= completed ? 'incomplete' : 'complete';\n const typeIndex = index >= completed ? index - completed : index;\n return (\n <CircleSegment\n key={`${segmentType}-${typeIndex}`}\n total={totalCourses}\n index={index}\n classList={segmentType}\n />\n );\n })}\n </svg>\n <div className=\"progress-label\">\n <div className=\"numbers\">\n <span className=\"complete\">{completed}</span>/<span className=\"total\">{totalCourses}</span>\n </div>\n <div className=\"label\">\n {formatMessage(messages.programProgressEarnedCertificates)}\n </div>\n </div>\n </div>\n </>\n );\n};\n\nexport default ProgramProgressCircle;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useIntl } from '@openedx/frontend-base';
|
|
3
|
+
import messages from '../messages';
|
|
4
|
+
import ProgramProgressCircle from './ProgramProgressCircle';
|
|
5
|
+
import './index.scss';
|
|
6
|
+
export const ProgramProgressSidebar = ({ inProgress, remaining, completed }) => {
|
|
7
|
+
const { formatMessage } = useIntl();
|
|
8
|
+
// TODO: Replace hard-coded price with API value when integrated
|
|
9
|
+
const formattedPrice = '$896.10';
|
|
10
|
+
return (_jsxs("div", { className: "program-certificate-widget", "data-testid": "program-certificate-progress", children: [_jsx(ProgramProgressCircle, { inProgress: inProgress, remaining: remaining, completed: completed }), _jsx("h6", { className: "progress-heading-circle font-weight-bold mb-4 mt-4", children: formatMessage(messages.programProgressCertificateLabel) }), _jsxs("div", { className: "progress-certificate-content pt-3 px-3", children: [_jsx("p", { children: formatMessage(messages.programProgressCertificateContentOne) }), _jsx("p", { children: formatMessage(messages.programProgressCertificateContentTwo, { price: formattedPrice }) })] })] }));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/containers/ProgramDashboard/ProgramProgress/ProgramProgressSidebar/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,sBAAsB,GAAoC,CAAC,EACtE,UAAU,EAAE,SAAS,EAAE,SAAS,EACjC,EAAE,EAAE;IACH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,gEAAgE;IAChE,MAAM,cAAc,GAAG,SAAS,CAAC;IAEjC,OAAO,CACL,eACE,SAAS,EAAC,4BAA4B,iBAC1B,8BAA8B,aAE1C,KAAC,qBAAqB,IAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAI,EAC7F,aAAI,SAAS,EAAC,oDAAoD,YAC/D,aAAa,CAAC,QAAQ,CAAC,+BAA+B,CAAC,GACrD,EACL,eAAK,SAAS,EAAC,wCAAwC,aACrD,sBACG,aAAa,CAAC,QAAQ,CAAC,oCAAoC,CAAC,GAC3D,EACJ,sBACG,aAAa,CAAC,QAAQ,CAAC,oCAAoC,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,GACtF,IACA,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { useIntl } from '@openedx/frontend-base';\nimport messages from '../messages';\nimport { ProgramProgressSidebarProps } from '../../data/types';\nimport ProgramProgressCircle from './ProgramProgressCircle';\nimport './index.scss';\n\nexport const ProgramProgressSidebar: FC<ProgramProgressSidebarProps> = ({\n inProgress, remaining, completed\n}) => {\n const { formatMessage } = useIntl();\n // TODO: Replace hard-coded price with API value when integrated\n const formattedPrice = '$896.10';\n\n return (\n <div\n className=\"program-certificate-widget\"\n data-testid=\"program-certificate-progress\"\n >\n <ProgramProgressCircle inProgress={inProgress} remaining={remaining} completed={completed} />\n <h6 className=\"progress-heading-circle font-weight-bold mb-4 mt-4\">\n {formatMessage(messages.programProgressCertificateLabel)}\n </h6>\n <div className=\"progress-certificate-content pt-3 px-3\">\n <p>\n {formatMessage(messages.programProgressCertificateContentOne)}\n </p>\n <p>\n {formatMessage(messages.programProgressCertificateContentTwo, { price: formattedPrice })}\n </p>\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
$progress-incomplete-number-color: #002B2B !default;
|
|
2
|
+
$progress-number-label-color: #454545 !default;
|
|
3
|
+
$progress-heading-circle-color: #333333 !default;
|
|
4
|
+
|
|
5
|
+
.program-certificate-widget {
|
|
6
|
+
padding-right: 1.125rem;
|
|
7
|
+
padding-left: 3.1rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.progress-circle-wrapper {
|
|
11
|
+
position: relative;
|
|
12
|
+
width: 14.375rem;
|
|
13
|
+
height: 14.375rem;
|
|
14
|
+
margin: .5rem auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.progress-circle {
|
|
18
|
+
.bg {
|
|
19
|
+
stroke: var(--pgn-color-primary-200);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.complete {
|
|
23
|
+
stroke: var(--pgn-color-primary-500);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.incomplete {
|
|
27
|
+
stroke: var(--pgn-color-primary-200);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.progress-label {
|
|
32
|
+
position: absolute;
|
|
33
|
+
inset: 0;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
text-align: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.numbers {
|
|
42
|
+
color: $progress-incomplete-number-color;
|
|
43
|
+
font-size: 3.25rem;
|
|
44
|
+
line-height: 3.75rem;
|
|
45
|
+
letter-spacing: -0.065rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.label {
|
|
49
|
+
color: $progress-number-label-color;
|
|
50
|
+
font-size: 0.875rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.progress-heading-circle {
|
|
54
|
+
color: $progress-heading-circle-color;
|
|
55
|
+
text-align: center;
|
|
56
|
+
font-size: 0.875rem;
|
|
57
|
+
line-height: 1.25rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.progress-certificate-content {
|
|
61
|
+
color: $progress-heading-circle-color;
|
|
62
|
+
line-height: 1.575rem;
|
|
63
|
+
}
|
|
@@ -124,5 +124,25 @@ declare const messages: {
|
|
|
124
124
|
id: string;
|
|
125
125
|
description: string;
|
|
126
126
|
};
|
|
127
|
+
programProgressEarnedCertificates: {
|
|
128
|
+
defaultMessage: string;
|
|
129
|
+
id: string;
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
programProgressCertificateLabel: {
|
|
133
|
+
defaultMessage: string;
|
|
134
|
+
id: string;
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
programProgressCertificateContentOne: {
|
|
138
|
+
defaultMessage: string;
|
|
139
|
+
id: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
programProgressCertificateContentTwo: {
|
|
143
|
+
defaultMessage: string;
|
|
144
|
+
id: string;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
127
147
|
};
|
|
128
148
|
export default messages;
|
|
@@ -124,7 +124,27 @@ const messages = defineMessages({
|
|
|
124
124
|
defaultMessage: 'My program records',
|
|
125
125
|
id: 'program.progress.completed.banner.my.program.records.button',
|
|
126
126
|
description: 'Text for the My Program Records button displayed on the banner in the Completed tab of the program progress page.',
|
|
127
|
-
}
|
|
127
|
+
},
|
|
128
|
+
programProgressEarnedCertificates: {
|
|
129
|
+
defaultMessage: 'Earned Certificates',
|
|
130
|
+
id: 'program.progress.earned.certificates',
|
|
131
|
+
description: 'Label shown in the program progress circle',
|
|
132
|
+
},
|
|
133
|
+
programProgressCertificateLabel: {
|
|
134
|
+
defaultMessage: 'Program Certificate Progress',
|
|
135
|
+
id: 'program.progress.certificate.program.progress',
|
|
136
|
+
description: 'Label shown under the program progress circle',
|
|
137
|
+
},
|
|
138
|
+
programProgressCertificateContentOne: {
|
|
139
|
+
defaultMessage: 'Earn a professional certificate when you meet requirements for all courses in the series.',
|
|
140
|
+
id: 'program.progress.certificate.content.one',
|
|
141
|
+
description: 'First content paragraph shown under the program progress circle',
|
|
142
|
+
},
|
|
143
|
+
programProgressCertificateContentTwo: {
|
|
144
|
+
defaultMessage: "This program is valued at '{'{price}'}' for non-subscribers.",
|
|
145
|
+
id: 'program.progress.certificate.content.two',
|
|
146
|
+
description: 'Second content paragraph shown under the program progress circle',
|
|
147
|
+
},
|
|
128
148
|
});
|
|
129
149
|
export default messages;
|
|
130
150
|
//# 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,WAAW,EAAE,qGAAqG;K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,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:',\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 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});\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,cAA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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:',\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 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});\n\nexport default messages;\n"]}
|
|
@@ -6,3 +6,10 @@ export declare const PROGRAM_TYPE_MAP: {
|
|
|
6
6
|
MICROBACHELORS: string;
|
|
7
7
|
MASTERS: string;
|
|
8
8
|
};
|
|
9
|
+
export declare const PROGRAM_PROGRESS_CIRCLE_MAP: {
|
|
10
|
+
X_AXIS: number;
|
|
11
|
+
Y_AXIS: number;
|
|
12
|
+
CIRCLE_RADIUS: number;
|
|
13
|
+
CIRCLE_DEGREES: number;
|
|
14
|
+
STROKE_WIDTH: number;
|
|
15
|
+
};
|
|
@@ -6,4 +6,11 @@ export const PROGRAM_TYPE_MAP = {
|
|
|
6
6
|
MICROBACHELORS: 'MicroBachelors',
|
|
7
7
|
MASTERS: 'Masters',
|
|
8
8
|
};
|
|
9
|
+
export const PROGRAM_PROGRESS_CIRCLE_MAP = {
|
|
10
|
+
X_AXIS: 22,
|
|
11
|
+
Y_AXIS: 22,
|
|
12
|
+
CIRCLE_RADIUS: 16,
|
|
13
|
+
CIRCLE_DEGREES: 180,
|
|
14
|
+
STROKE_WIDTH: 1.2,
|
|
15
|
+
};
|
|
9
16
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/data/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,wBAAwB,EAAE,0BAA0B;IACpD,cAAc,EAAE,gBAAgB;IAChC,OAAO,EAAE,SAAS;CACnB,CAAC","sourcesContent":["export const PROGRAM_TYPE_MAP = {\n MICROMASTERS: 'MicroMasters',\n CREDIT: 'Credit',\n XSERIES: 'XSeries',\n PROFESSIONAL_CERTIFICATE: 'Professional Certificate',\n MICROBACHELORS: 'MicroBachelors',\n MASTERS: 'Masters',\n};\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/data/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,wBAAwB,EAAE,0BAA0B;IACpD,cAAc,EAAE,gBAAgB;IAChC,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,EAAE;IACV,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,GAAG;IACnB,YAAY,EAAE,GAAG;CAClB,CAAC","sourcesContent":["export const PROGRAM_TYPE_MAP = {\n MICROMASTERS: 'MicroMasters',\n CREDIT: 'Credit',\n XSERIES: 'XSeries',\n PROFESSIONAL_CERTIFICATE: 'Professional Certificate',\n MICROBACHELORS: 'MicroBachelors',\n MASTERS: 'Masters',\n};\n\nexport const PROGRAM_PROGRESS_CIRCLE_MAP = {\n X_AXIS: 22,\n Y_AXIS: 22,\n CIRCLE_RADIUS: 16,\n CIRCLE_DEGREES: 180,\n STROKE_WIDTH: 1.2,\n};\n"]}
|