@edx/frontend-app-subscription-learner-dashboard 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.d.ts +4 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.js +14 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.js.map +1 -0
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.scss +3 -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/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card, Button, Row, Col } from '@openedx/paragon';
|
|
3
|
+
import { useIntl } from '@openedx/frontend-base';
|
|
4
|
+
import messages from '../messages';
|
|
5
|
+
import './index.scss';
|
|
6
|
+
export const ProgressCard = ({ progressCardData, isLoading }) => {
|
|
7
|
+
const { formatMessage } = useIntl();
|
|
8
|
+
const { title, enrollmentInfo, certificateStatus } = progressCardData;
|
|
9
|
+
return (_jsxs(Card, { className: "progress-card", "data-testid": "progress-card", isLoading: isLoading, children: [_jsx(Card.Section, { className: "pt-3 pb-2 px-4", children: _jsxs(Row, { children: [_jsxs(Col, { xs: 12, children: [_jsx("h4", { className: "mb-1 font-weight-bold", children: title }), _jsx("div", { className: "text-muted", children: formatMessage(messages.programProgressCardEnrollment, { enrollmentInfo }) })] }), _jsx(Col, { xs: 12, className: "d-flex justify-content-md-end align-items-start", children: _jsx(Button, { variant: "primary", children: formatMessage(messages.programProgressCardResumeButton) }) })] }) }), _jsx(Card.Section, { className: "pt-3 pb-2 px-4", children: _jsxs(Row, { children: [_jsx(Col, { xs: 12, md: 9, children: _jsx("span", { children: formatMessage(messages.programProgressCardCertificate, {
|
|
10
|
+
certificateStatus,
|
|
11
|
+
bold: (chunks) => (_jsx("span", { className: "font-weight-bold", children: chunks })),
|
|
12
|
+
}) }) }), _jsx(Col, { xs: 12, md: 3, className: "d-flex justify-content-md-end", children: _jsx(Button, { variant: "outline-brand", children: formatMessage(messages.programProgressCardUpgradeButton) }) })] }) })] }));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGjD,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,EAAE;IACrF,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,gBAAgB,CAAC;IAEtE,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAC,eAAe,iBAAa,eAAe,EAAC,SAAS,EAAE,SAAS,aAC9E,KAAC,IAAI,CAAC,OAAO,IAAC,SAAS,EAAC,gBAAgB,YACtC,MAAC,GAAG,eACF,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,aACT,aAAI,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAM,EAClD,cAAK,SAAS,EAAC,YAAY,YACxB,aAAa,CAAC,QAAQ,CAAC,6BAA6B,EAAE,EAAE,cAAc,EAAE,CAAC,GACtE,IACF,EACN,KAAC,GAAG,IACF,EAAE,EAAE,EAAE,EACN,SAAS,EAAC,iDAAiD,YAE3D,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,YACtB,aAAa,CAAC,QAAQ,CAAC,+BAA+B,CAAC,GACjD,GACL,IACF,GACO,EAEf,KAAC,IAAI,CAAC,OAAO,IAAC,SAAS,EAAC,gBAAgB,YACtC,MAAC,GAAG,eACF,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,YAChB,yBACG,aAAa,CAAC,QAAQ,CAAC,8BAA8B,EAAE;oCACtD,iBAAiB;oCACjB,IAAI,EAAE,CAAC,MAAuB,EAAE,EAAE,CAAC,CACjC,eAAM,SAAS,EAAC,kBAAkB,YAAE,MAAM,GAAQ,CACnD;iCACF,CAAC,GACG,GACH,EAEN,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAC,+BAA+B,YAC3D,KAAC,MAAM,IAAC,OAAO,EAAC,eAAe,YAC5B,aAAa,CAAC,QAAQ,CAAC,gCAAgC,CAAC,GAClD,GACL,IACF,GACO,IACV,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { Card, Button, Row, Col } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { ProgressCardProps } from '../../data/types';\nimport messages from '../messages';\nimport './index.scss';\n\nexport const ProgressCard: FC<ProgressCardProps> = ({ progressCardData, isLoading }) => {\n const { formatMessage } = useIntl();\n const { title, enrollmentInfo, certificateStatus } = progressCardData;\n\n return (\n <Card className=\"progress-card\" data-testid=\"progress-card\" isLoading={isLoading}>\n <Card.Section className=\"pt-3 pb-2 px-4\">\n <Row>\n <Col xs={12}>\n <h4 className=\"mb-1 font-weight-bold\">{title}</h4>\n <div className=\"text-muted\">\n {formatMessage(messages.programProgressCardEnrollment, { enrollmentInfo })}\n </div>\n </Col>\n <Col\n xs={12}\n className=\"d-flex justify-content-md-end align-items-start\"\n >\n <Button variant=\"primary\">\n {formatMessage(messages.programProgressCardResumeButton)}\n </Button>\n </Col>\n </Row>\n </Card.Section>\n\n <Card.Section className=\"pt-3 pb-2 px-4\">\n <Row>\n <Col xs={12} md={9}>\n <span>\n {formatMessage(messages.programProgressCardCertificate, {\n certificateStatus,\n bold: (chunks: React.ReactNode) => (\n <span className=\"font-weight-bold\">{chunks}</span>\n ),\n })}\n </span>\n </Col>\n\n <Col xs={12} md={3} className=\"d-flex justify-content-md-end\">\n <Button variant=\"outline-brand\">\n {formatMessage(messages.programProgressCardUpgradeButton)}\n </Button>\n </Col>\n </Row>\n </Card.Section>\n </Card>\n );\n};\n"]}
|
|
@@ -29,5 +29,25 @@ declare const messages: {
|
|
|
29
29
|
id: string;
|
|
30
30
|
description: string;
|
|
31
31
|
};
|
|
32
|
+
programProgressCardEnrollment: {
|
|
33
|
+
defaultMessage: string;
|
|
34
|
+
id: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
programProgressCardCertificate: {
|
|
38
|
+
defaultMessage: string;
|
|
39
|
+
id: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
programProgressCardResumeButton: {
|
|
43
|
+
defaultMessage: string;
|
|
44
|
+
id: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
programProgressCardUpgradeButton: {
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
id: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
32
52
|
};
|
|
33
53
|
export default messages;
|
|
@@ -28,7 +28,27 @@ const messages = defineMessages({
|
|
|
28
28
|
programProgressIncompleteText: {
|
|
29
29
|
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.',
|
|
30
30
|
id: 'program.progress.incomplete.text',
|
|
31
|
-
description: 'text to
|
|
31
|
+
description: 'text to display when a user has not completed all of the courses for a program',
|
|
32
|
+
},
|
|
33
|
+
programProgressCardEnrollment: {
|
|
34
|
+
defaultMessage: 'Enrolled: {enrollmentInfo}',
|
|
35
|
+
id: 'program.progress.card.enrollment.text',
|
|
36
|
+
description: 'text to display on the progress card related to the enrollment date for the course',
|
|
37
|
+
},
|
|
38
|
+
programProgressCardCertificate: {
|
|
39
|
+
defaultMessage: '<bold>Certificate Status:</bold> {certificateStatus}',
|
|
40
|
+
id: 'program.progress.card.certificate.text',
|
|
41
|
+
description: 'text to display on the progress card related to the certificate status for the course',
|
|
42
|
+
},
|
|
43
|
+
programProgressCardResumeButton: {
|
|
44
|
+
defaultMessage: 'Resume course',
|
|
45
|
+
id: 'program.progress.card.resume.button.text',
|
|
46
|
+
description: 'text to display on the progress card for the resume course button',
|
|
47
|
+
},
|
|
48
|
+
programProgressCardUpgradeButton: {
|
|
49
|
+
defaultMessage: 'Upgrade with your subscription',
|
|
50
|
+
id: 'program.progress.card.upgrade.button.text',
|
|
51
|
+
description: 'text to display on the progress card for the upgrade button',
|
|
32
52
|
},
|
|
33
53
|
});
|
|
34
54
|
export default messages;
|
|
@@ -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;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,+
|
|
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,6BAA6B,EAAE;QAC7B,cAAc,EAAE,4BAA4B;QAC5C,EAAE,EAAE,uCAAuC;QAC3C,WAAW,EAAE,oFAAoF;KAClG;IACD,8BAA8B,EAAE;QAC9B,cAAc,EAAE,sDAAsD;QACtE,EAAE,EAAE,wCAAwC;QAC5C,WAAW,EAAE,uFAAuF;KACrG;IACD,+BAA+B,EAAE;QAC/B,cAAc,EAAE,eAAe;QAC/B,EAAE,EAAE,0CAA0C;QAC9C,WAAW,EAAE,mEAAmE;KACjF;IACD,gCAAgC,EAAE;QAChC,cAAc,EAAE,gCAAgC;QAChD,EAAE,EAAE,2CAA2C;QAC/C,WAAW,EAAE,6DAA6D;KAC3E;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 programProgressCardEnrollment: {\n defaultMessage: 'Enrolled: {enrollmentInfo}',\n id: 'program.progress.card.enrollment.text',\n description: 'text to display on the progress card related to the enrollment date for the course',\n },\n programProgressCardCertificate: {\n defaultMessage: '<bold>Certificate Status:</bold> {certificateStatus}',\n id: 'program.progress.card.certificate.text',\n description: 'text to display on the progress card related to the certificate status for the course',\n },\n programProgressCardResumeButton: {\n defaultMessage: 'Resume course',\n id: 'program.progress.card.resume.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});\n\nexport default messages;\n"]}
|