@coorpacademy/components 11.40.26 → 11.41.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/es/atom/chip/index.d.ts +1 -0
- package/es/atom/chip/index.d.ts.map +1 -1
- package/es/atom/chip/index.js +6 -3
- package/es/atom/chip/index.js.map +1 -1
- package/es/atom/drag-and-drop/index.d.ts +2 -0
- package/es/atom/drag-and-drop/index.d.ts.map +1 -1
- package/es/atom/drag-and-drop/index.js +9 -4
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/input-date/index.d.ts +21 -0
- package/es/atom/input-date/index.d.ts.map +1 -0
- package/es/atom/input-date/index.js +73 -0
- package/es/atom/input-date/index.js.map +1 -0
- package/es/atom/input-date/style.css +88 -0
- package/es/atom/input-file-draggable/index.d.ts +10 -2
- package/es/atom/input-file-draggable/index.d.ts.map +1 -1
- package/es/atom/input-file-draggable/index.js +12 -4
- package/es/atom/input-file-draggable/index.js.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +1 -0
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +1 -0
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/title/index.d.ts +1 -0
- package/es/atom/title/index.d.ts.map +1 -1
- package/es/atom/title/index.js +16 -6
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/title/style.css +4 -0
- package/es/atom/video-upload/index.d.ts +2 -0
- package/es/molecule/assignment-card/index.d.ts +62 -0
- package/es/molecule/assignment-card/index.d.ts.map +1 -0
- package/es/molecule/assignment-card/index.js +91 -0
- package/es/molecule/assignment-card/index.js.map +1 -0
- package/es/molecule/assignment-card/style.css +98 -0
- package/es/molecule/assignment-status-tag/index.d.ts +13 -0
- package/es/molecule/assignment-status-tag/index.d.ts.map +1 -0
- package/es/molecule/assignment-status-tag/index.js +42 -0
- package/es/molecule/assignment-status-tag/index.js.map +1 -0
- package/es/molecule/assignment-status-tag/types.d.ts +15 -0
- package/es/molecule/assignment-status-tag/types.d.ts.map +1 -0
- package/es/molecule/assignment-status-tag/types.js +8 -0
- package/es/molecule/assignment-status-tag/types.js.map +1 -0
- package/es/molecule/brand-form-group/index.d.ts.map +1 -1
- package/es/molecule/brand-form-group/index.js +7 -0
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/card/index.d.ts +1 -0
- package/es/molecule/card/index.d.ts.map +1 -1
- package/es/molecule/card/index.js +3 -0
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card-content/index.d.ts +3 -1
- package/es/molecule/card-content/index.d.ts.map +1 -1
- package/es/molecule/card-content/index.js +7 -1
- package/es/molecule/card-content/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +11 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts +3 -0
- package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.js +11 -5
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.d.ts +1 -0
- package/es/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.js.map +1 -1
- package/es/molecule/drag-and-drop-wrapper/index.d.ts +6 -0
- package/es/molecule/draggable-list/index.d.ts +63 -54
- package/es/molecule/tabs/index.d.ts +1 -0
- package/es/molecule/tabs/index.d.ts.map +1 -1
- package/es/molecule/tabs/index.js +7 -3
- package/es/molecule/tabs/index.js.map +1 -1
- package/es/molecule/tabs/style.css +4 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +13 -0
- package/es/molecule/title-radio-wrapper/index.d.ts +7 -0
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +7 -0
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/assignment-audience/index.d.ts +92 -0
- package/es/organism/assignment-audience/index.d.ts.map +1 -0
- package/es/organism/assignment-audience/index.js +236 -0
- package/es/organism/assignment-audience/index.js.map +1 -0
- package/es/organism/assignment-audience/style.css +115 -0
- package/es/organism/assignment-audience/types.d.ts +193 -0
- package/es/organism/assignment-audience/types.d.ts.map +1 -0
- package/es/organism/assignment-audience/types.js +108 -0
- package/es/organism/assignment-audience/types.js.map +1 -0
- package/es/organism/assignment-audience/upload-result.css +47 -0
- package/es/organism/assignment-audience/upload-result.d.ts +26 -0
- package/es/organism/assignment-audience/upload-result.d.ts.map +1 -0
- package/es/organism/assignment-audience/upload-result.js +89 -0
- package/es/organism/assignment-audience/upload-result.js.map +1 -0
- package/es/organism/assignment-row/index.d.ts +55 -0
- package/es/organism/assignment-row/index.d.ts.map +1 -0
- package/es/organism/assignment-row/index.js +38 -0
- package/es/organism/assignment-row/index.js.map +1 -0
- package/es/organism/assignment-row/types.d.ts +83 -0
- package/es/organism/assignment-row/types.d.ts.map +1 -0
- package/es/organism/assignment-row/types.js +29 -0
- package/es/organism/assignment-row/types.js.map +1 -0
- package/es/organism/brand-learning-priorities/index.d.ts +63 -54
- package/es/organism/content-skill-modal/index.d.ts +10 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +10 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/list-item/index.d.ts +13 -1
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +45 -3
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +36 -0
- package/es/organism/list-items/index.d.ts +10 -0
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +4 -1
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/mooc-header/index.d.ts +7 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +30 -1
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/mooc-header/style.css +11 -0
- package/es/organism/rewards-form/index.d.ts +13 -0
- package/es/organism/select-opponents/index.d.ts +13 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +13 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/title-and-input/index.d.ts +14 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +14 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +13 -0
- package/es/template/app-player/loading/index.d.ts +11 -0
- package/es/template/app-player/player/index.d.ts +22 -0
- package/es/template/app-player/player/slides/index.d.ts +11 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +11 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +14 -0
- package/es/template/app-player/popin-end/summary.d.ts +3 -0
- package/es/template/app-review/index.d.ts +11 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +11 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +11 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +95 -54
- package/es/template/certification-detail/index.d.ts +11 -0
- package/es/template/cockpit/jw-uploader/index.d.ts +2 -0
- package/es/template/common/dashboard/index.d.ts +22 -0
- package/es/template/common/dashboard/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.js +37 -1
- package/es/template/common/dashboard/index.js.map +1 -1
- package/es/template/common/search-page/index.d.ts +17 -0
- package/es/template/external-course/index.d.ts +11 -0
- package/es/template/my-assignments/index.d.ts +167 -0
- package/es/template/my-assignments/index.d.ts.map +1 -0
- package/es/template/my-assignments/index.js +221 -0
- package/es/template/my-assignments/index.js.map +1 -0
- package/es/template/my-assignments/style.css +84 -0
- package/es/template/my-learning/index.d.ts +3 -0
- package/es/template/playlist-detail/index.d.ts +11 -0
- package/es/template/teams-dashboard/index.d.ts +3 -0
- package/es/util/proptypes.d.ts.map +1 -1
- package/es/util/proptypes.js +2 -2
- package/es/util/proptypes.js.map +1 -1
- package/lib/atom/chip/index.d.ts +1 -0
- package/lib/atom/chip/index.d.ts.map +1 -1
- package/lib/atom/chip/index.js +6 -3
- package/lib/atom/chip/index.js.map +1 -1
- package/lib/atom/drag-and-drop/index.d.ts +2 -0
- package/lib/atom/drag-and-drop/index.d.ts.map +1 -1
- package/lib/atom/drag-and-drop/index.js +9 -4
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/input-date/index.d.ts +21 -0
- package/lib/atom/input-date/index.d.ts.map +1 -0
- package/lib/atom/input-date/index.js +80 -0
- package/lib/atom/input-date/index.js.map +1 -0
- package/lib/atom/input-date/style.css +88 -0
- package/lib/atom/input-file-draggable/index.d.ts +10 -2
- package/lib/atom/input-file-draggable/index.d.ts.map +1 -1
- package/lib/atom/input-file-draggable/index.js +12 -4
- package/lib/atom/input-file-draggable/index.js.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +1 -0
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +1 -0
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/title/index.d.ts +1 -0
- package/lib/atom/title/index.d.ts.map +1 -1
- package/lib/atom/title/index.js +16 -6
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/title/style.css +4 -0
- package/lib/atom/video-upload/index.d.ts +2 -0
- package/lib/molecule/assignment-card/index.d.ts +62 -0
- package/lib/molecule/assignment-card/index.d.ts.map +1 -0
- package/lib/molecule/assignment-card/index.js +97 -0
- package/lib/molecule/assignment-card/index.js.map +1 -0
- package/lib/molecule/assignment-card/style.css +98 -0
- package/lib/molecule/assignment-status-tag/index.d.ts +13 -0
- package/lib/molecule/assignment-status-tag/index.d.ts.map +1 -0
- package/lib/molecule/assignment-status-tag/index.js +47 -0
- package/lib/molecule/assignment-status-tag/index.js.map +1 -0
- package/lib/molecule/assignment-status-tag/types.d.ts +15 -0
- package/lib/molecule/assignment-status-tag/types.d.ts.map +1 -0
- package/lib/molecule/assignment-status-tag/types.js +13 -0
- package/lib/molecule/assignment-status-tag/types.js.map +1 -0
- package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
- package/lib/molecule/brand-form-group/index.js +7 -0
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/card/index.d.ts +1 -0
- package/lib/molecule/card/index.d.ts.map +1 -1
- package/lib/molecule/card/index.js +3 -0
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card-content/index.d.ts +3 -1
- package/lib/molecule/card-content/index.d.ts.map +1 -1
- package/lib/molecule/card-content/index.js +7 -1
- package/lib/molecule/card-content/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +11 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts +3 -0
- package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.js +11 -5
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts +1 -0
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.js.map +1 -1
- package/lib/molecule/drag-and-drop-wrapper/index.d.ts +6 -0
- package/lib/molecule/draggable-list/index.d.ts +63 -54
- package/lib/molecule/tabs/index.d.ts +1 -0
- package/lib/molecule/tabs/index.d.ts.map +1 -1
- package/lib/molecule/tabs/index.js +7 -3
- package/lib/molecule/tabs/index.js.map +1 -1
- package/lib/molecule/tabs/style.css +4 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +13 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts +7 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +7 -0
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/assignment-audience/index.d.ts +92 -0
- package/lib/organism/assignment-audience/index.d.ts.map +1 -0
- package/lib/organism/assignment-audience/index.js +242 -0
- package/lib/organism/assignment-audience/index.js.map +1 -0
- package/lib/organism/assignment-audience/style.css +115 -0
- package/lib/organism/assignment-audience/types.d.ts +193 -0
- package/lib/organism/assignment-audience/types.d.ts.map +1 -0
- package/lib/organism/assignment-audience/types.js +112 -0
- package/lib/organism/assignment-audience/types.js.map +1 -0
- package/lib/organism/assignment-audience/upload-result.css +47 -0
- package/lib/organism/assignment-audience/upload-result.d.ts +26 -0
- package/lib/organism/assignment-audience/upload-result.d.ts.map +1 -0
- package/lib/organism/assignment-audience/upload-result.js +94 -0
- package/lib/organism/assignment-audience/upload-result.js.map +1 -0
- package/lib/organism/assignment-row/index.d.ts +55 -0
- package/lib/organism/assignment-row/index.d.ts.map +1 -0
- package/lib/organism/assignment-row/index.js +45 -0
- package/lib/organism/assignment-row/index.js.map +1 -0
- package/lib/organism/assignment-row/types.d.ts +83 -0
- package/lib/organism/assignment-row/types.d.ts.map +1 -0
- package/lib/organism/assignment-row/types.js +34 -0
- package/lib/organism/assignment-row/types.js.map +1 -0
- package/lib/organism/brand-learning-priorities/index.d.ts +63 -54
- package/lib/organism/content-skill-modal/index.d.ts +10 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +10 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/list-item/index.d.ts +13 -1
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +44 -3
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +36 -0
- package/lib/organism/list-items/index.d.ts +10 -0
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +4 -1
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/mooc-header/index.d.ts +7 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +30 -1
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/mooc-header/style.css +11 -0
- package/lib/organism/rewards-form/index.d.ts +13 -0
- package/lib/organism/select-opponents/index.d.ts +13 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +13 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +14 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +14 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +13 -0
- package/lib/template/app-player/loading/index.d.ts +11 -0
- package/lib/template/app-player/player/index.d.ts +22 -0
- package/lib/template/app-player/player/slides/index.d.ts +11 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +11 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +14 -0
- package/lib/template/app-player/popin-end/summary.d.ts +3 -0
- package/lib/template/app-review/index.d.ts +11 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +11 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +11 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +95 -54
- package/lib/template/certification-detail/index.d.ts +11 -0
- package/lib/template/cockpit/jw-uploader/index.d.ts +2 -0
- package/lib/template/common/dashboard/index.d.ts +22 -0
- package/lib/template/common/dashboard/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.js +37 -1
- package/lib/template/common/dashboard/index.js.map +1 -1
- package/lib/template/common/search-page/index.d.ts +17 -0
- package/lib/template/external-course/index.d.ts +11 -0
- package/lib/template/my-assignments/index.d.ts +167 -0
- package/lib/template/my-assignments/index.d.ts.map +1 -0
- package/lib/template/my-assignments/index.js +227 -0
- package/lib/template/my-assignments/index.js.map +1 -0
- package/lib/template/my-assignments/style.css +84 -0
- package/lib/template/my-learning/index.d.ts +3 -0
- package/lib/template/playlist-detail/index.d.ts +11 -0
- package/lib/template/teams-dashboard/index.d.ts +3 -0
- package/lib/util/proptypes.d.ts.map +1 -1
- package/lib/util/proptypes.js +2 -2
- package/lib/util/proptypes.js.map +1 -1
- package/package.json +2 -2
|
@@ -106,6 +106,7 @@ declare namespace ExternalCourse {
|
|
|
106
106
|
customLabelClassName: PropTypes.Requireable<string>;
|
|
107
107
|
}>>;
|
|
108
108
|
required: PropTypes.Requireable<boolean>;
|
|
109
|
+
headingLevel: PropTypes.Requireable<number>;
|
|
109
110
|
}>>;
|
|
110
111
|
headerIcon: PropTypes.Requireable<string>;
|
|
111
112
|
backgroundImage: PropTypes.Requireable<string>;
|
|
@@ -256,6 +257,15 @@ declare namespace ExternalCourse {
|
|
|
256
257
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
257
258
|
title: PropTypes.Validator<string>;
|
|
258
259
|
subtitle: PropTypes.Requireable<string>;
|
|
260
|
+
titleTags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
261
|
+
label: PropTypes.Validator<string>;
|
|
262
|
+
type: PropTypes.Requireable<string>;
|
|
263
|
+
}> | null | undefined)[]>;
|
|
264
|
+
details: PropTypes.Requireable<string>;
|
|
265
|
+
progress: PropTypes.Requireable<PropTypes.InferProps<{
|
|
266
|
+
value: PropTypes.Validator<number>;
|
|
267
|
+
label: PropTypes.Validator<string>;
|
|
268
|
+
}>>;
|
|
259
269
|
'data-name': PropTypes.Requireable<string>;
|
|
260
270
|
provider: PropTypes.Requireable<PropTypes.InferProps<{
|
|
261
271
|
label: PropTypes.Requireable<string>;
|
|
@@ -702,6 +712,7 @@ declare namespace ExternalCourse {
|
|
|
702
712
|
customLabelClassName: PropTypes.Requireable<string>;
|
|
703
713
|
}>>;
|
|
704
714
|
required: PropTypes.Requireable<boolean>;
|
|
715
|
+
headingLevel: PropTypes.Requireable<number>;
|
|
705
716
|
}> | null | undefined>>;
|
|
706
717
|
isFetching: PropTypes.Requireable<boolean>;
|
|
707
718
|
search: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
export default MyAssignments;
|
|
2
|
+
declare function MyAssignments({ title, tabs, sections, cards, emptyState, loading, onCardClick }: {
|
|
3
|
+
title: any;
|
|
4
|
+
tabs?: any[] | undefined;
|
|
5
|
+
sections?: any[] | undefined;
|
|
6
|
+
cards?: any[] | undefined;
|
|
7
|
+
emptyState: any;
|
|
8
|
+
loading?: boolean | undefined;
|
|
9
|
+
onCardClick: any;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
declare namespace MyAssignments {
|
|
12
|
+
namespace propTypes {
|
|
13
|
+
export const title: PropTypes.Requireable<string>;
|
|
14
|
+
export const tabs: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
15
|
+
key: PropTypes.Validator<string>;
|
|
16
|
+
label: PropTypes.Requireable<string>;
|
|
17
|
+
count: PropTypes.Requireable<number>;
|
|
18
|
+
selected: PropTypes.Requireable<boolean>;
|
|
19
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
}> | null | undefined)[]>;
|
|
21
|
+
export const sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
22
|
+
key: PropTypes.Validator<string>;
|
|
23
|
+
title: PropTypes.Requireable<string>;
|
|
24
|
+
subtitle: PropTypes.Requireable<string>;
|
|
25
|
+
count: PropTypes.Validator<number>;
|
|
26
|
+
cards: PropTypes.Validator<(PropTypes.InferProps<{
|
|
27
|
+
typeLabel: PropTypes.Requireable<string>;
|
|
28
|
+
dueState: PropTypes.Validator<string>;
|
|
29
|
+
dueStateLabel: PropTypes.Validator<string>;
|
|
30
|
+
dueDateLabel: PropTypes.Validator<string>;
|
|
31
|
+
badge: PropTypes.Requireable<string>;
|
|
32
|
+
image: PropTypes.Requireable<string>;
|
|
33
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
34
|
+
adaptiv: PropTypes.Requireable<boolean>;
|
|
35
|
+
type: PropTypes.Requireable<string>;
|
|
36
|
+
title: PropTypes.Requireable<string>;
|
|
37
|
+
author: PropTypes.Requireable<string>;
|
|
38
|
+
certifiedAuthor: PropTypes.Requireable<boolean>;
|
|
39
|
+
customer: PropTypes.Requireable<PropTypes.InferProps<{
|
|
40
|
+
theme: PropTypes.Requireable<string>;
|
|
41
|
+
type: PropTypes.Requireable<string>;
|
|
42
|
+
name: PropTypes.Requireable<string>;
|
|
43
|
+
coorpOriginal: PropTypes.Validator<boolean>;
|
|
44
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
45
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
46
|
+
}>>;
|
|
47
|
+
progress: PropTypes.Requireable<number>;
|
|
48
|
+
favorite: PropTypes.Requireable<boolean>;
|
|
49
|
+
addFavoriteToolTip: PropTypes.Requireable<string>;
|
|
50
|
+
removeFavoriteToolTip: PropTypes.Requireable<string>;
|
|
51
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
|
+
onFavoriteClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
|
+
isSelected: PropTypes.Requireable<boolean>;
|
|
54
|
+
notification: PropTypes.Requireable<PropTypes.InferProps<{
|
|
55
|
+
message: PropTypes.Validator<string>;
|
|
56
|
+
icon: PropTypes.Validator<string>;
|
|
57
|
+
}>>;
|
|
58
|
+
badgeCategory: PropTypes.Requireable<string>;
|
|
59
|
+
badgeLabel: PropTypes.Requireable<string>;
|
|
60
|
+
theme: PropTypes.Requireable<string>;
|
|
61
|
+
disabledContent: PropTypes.Requireable<string>;
|
|
62
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
63
|
+
'background-aria-label': PropTypes.Requireable<string>;
|
|
64
|
+
'favorite-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
65
|
+
favorite: PropTypes.Requireable<string>;
|
|
66
|
+
addToFavorite: PropTypes.Requireable<string>;
|
|
67
|
+
removeFromFavorite: PropTypes.Requireable<string>;
|
|
68
|
+
}>>;
|
|
69
|
+
'selectable-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
70
|
+
select: PropTypes.Requireable<string>;
|
|
71
|
+
unSelect: PropTypes.Requireable<string>;
|
|
72
|
+
}>>;
|
|
73
|
+
'customer-aria-label': PropTypes.Requireable<string>;
|
|
74
|
+
'badge-aria-label': PropTypes.Requireable<string>;
|
|
75
|
+
'disabled-aria-label': PropTypes.Requireable<string>;
|
|
76
|
+
'card-content-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
77
|
+
author: PropTypes.Requireable<string>;
|
|
78
|
+
progression: PropTypes.Requireable<string>;
|
|
79
|
+
adaptive: PropTypes.Requireable<string>;
|
|
80
|
+
}>>;
|
|
81
|
+
}> | null | undefined)[]>;
|
|
82
|
+
}> | null | undefined)[]>;
|
|
83
|
+
import cards = cards;
|
|
84
|
+
export { cards };
|
|
85
|
+
export const loading: PropTypes.Requireable<boolean>;
|
|
86
|
+
export const emptyState: PropTypes.Requireable<PropTypes.InferProps<{
|
|
87
|
+
title: PropTypes.Requireable<string>;
|
|
88
|
+
message: PropTypes.Requireable<string>;
|
|
89
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
90
|
+
label: PropTypes.Requireable<string>;
|
|
91
|
+
href: PropTypes.Requireable<string>;
|
|
92
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
93
|
+
}>>;
|
|
94
|
+
}>>;
|
|
95
|
+
export const onCardClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
import PropTypes from "prop-types";
|
|
99
|
+
declare function Grid({ cards, onCardClick, "data-name": dataName }: {
|
|
100
|
+
cards: any;
|
|
101
|
+
onCardClick: any;
|
|
102
|
+
"data-name": any;
|
|
103
|
+
}): JSX.Element;
|
|
104
|
+
declare namespace Grid {
|
|
105
|
+
const propTypes_1: {
|
|
106
|
+
cards: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
107
|
+
typeLabel: PropTypes.Requireable<string>;
|
|
108
|
+
dueState: PropTypes.Validator<string>;
|
|
109
|
+
dueStateLabel: PropTypes.Validator<string>;
|
|
110
|
+
dueDateLabel: PropTypes.Validator<string>;
|
|
111
|
+
badge: PropTypes.Requireable<string>;
|
|
112
|
+
image: PropTypes.Requireable<string>;
|
|
113
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
114
|
+
adaptiv: PropTypes.Requireable<boolean>;
|
|
115
|
+
type: PropTypes.Requireable<string>;
|
|
116
|
+
title: PropTypes.Requireable<string>;
|
|
117
|
+
author: PropTypes.Requireable<string>;
|
|
118
|
+
certifiedAuthor: PropTypes.Requireable<boolean>;
|
|
119
|
+
customer: PropTypes.Requireable<PropTypes.InferProps<{
|
|
120
|
+
theme: PropTypes.Requireable<string>;
|
|
121
|
+
type: PropTypes.Requireable<string>;
|
|
122
|
+
name: PropTypes.Requireable<string>;
|
|
123
|
+
coorpOriginal: PropTypes.Validator<boolean>;
|
|
124
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
125
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
126
|
+
}>>;
|
|
127
|
+
progress: PropTypes.Requireable<number>;
|
|
128
|
+
favorite: PropTypes.Requireable<boolean>;
|
|
129
|
+
addFavoriteToolTip: PropTypes.Requireable<string>;
|
|
130
|
+
removeFavoriteToolTip: PropTypes.Requireable<string>;
|
|
131
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
132
|
+
onFavoriteClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
133
|
+
isSelected: PropTypes.Requireable<boolean>;
|
|
134
|
+
notification: PropTypes.Requireable<PropTypes.InferProps<{
|
|
135
|
+
message: PropTypes.Validator<string>;
|
|
136
|
+
icon: PropTypes.Validator<string>;
|
|
137
|
+
}>>;
|
|
138
|
+
badgeCategory: PropTypes.Requireable<string>;
|
|
139
|
+
badgeLabel: PropTypes.Requireable<string>;
|
|
140
|
+
theme: PropTypes.Requireable<string>;
|
|
141
|
+
disabledContent: PropTypes.Requireable<string>;
|
|
142
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
143
|
+
'background-aria-label': PropTypes.Requireable<string>;
|
|
144
|
+
'favorite-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
145
|
+
favorite: PropTypes.Requireable<string>;
|
|
146
|
+
addToFavorite: PropTypes.Requireable<string>;
|
|
147
|
+
removeFromFavorite: PropTypes.Requireable<string>;
|
|
148
|
+
}>>;
|
|
149
|
+
'selectable-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
150
|
+
select: PropTypes.Requireable<string>;
|
|
151
|
+
unSelect: PropTypes.Requireable<string>;
|
|
152
|
+
}>>;
|
|
153
|
+
'customer-aria-label': PropTypes.Requireable<string>;
|
|
154
|
+
'badge-aria-label': PropTypes.Requireable<string>;
|
|
155
|
+
'disabled-aria-label': PropTypes.Requireable<string>;
|
|
156
|
+
'card-content-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
157
|
+
author: PropTypes.Requireable<string>;
|
|
158
|
+
progression: PropTypes.Requireable<string>;
|
|
159
|
+
adaptive: PropTypes.Requireable<string>;
|
|
160
|
+
}>>;
|
|
161
|
+
}> | null | undefined)[]>;
|
|
162
|
+
onCardClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
163
|
+
'data-name': PropTypes.Requireable<string>;
|
|
164
|
+
};
|
|
165
|
+
export { propTypes_1 as propTypes };
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/my-assignments/index.js"],"names":[],"mappings":";AAuEA;;;;;;;;gBAyEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlHD;;;;gBAMC"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
|
+
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
8
|
+
var _tabs = _interopRequireDefault(require("../../molecule/tabs"));
|
|
9
|
+
var _loader = _interopRequireDefault(require("../../atom/loader"));
|
|
10
|
+
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
11
|
+
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
12
|
+
var _tag = _interopRequireDefault(require("../../atom/tag"));
|
|
13
|
+
var _colors = require("../../variables/colors");
|
|
14
|
+
var _assignmentCard = _interopRequireDefault(require("../../molecule/assignment-card"));
|
|
15
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20
|
+
// To do is split by due date, always in this order (N4). "Later" is gone.
|
|
21
|
+
const SECTIONS = {
|
|
22
|
+
overdue: {
|
|
23
|
+
iconName: 'triangle-exclamation',
|
|
24
|
+
color: _colors.COLORS.cm_negative_200
|
|
25
|
+
},
|
|
26
|
+
dueThisWeek: {
|
|
27
|
+
iconName: 'clock',
|
|
28
|
+
color: _colors.COLORS.cm_yellow_400
|
|
29
|
+
},
|
|
30
|
+
dueAfterThisWeek: {
|
|
31
|
+
iconName: 'circle',
|
|
32
|
+
color: _colors.COLORS.cm_grey_500
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const SECTION_KEYS = ['overdue', 'dueThisWeek', 'dueAfterThisWeek'];
|
|
36
|
+
const GridCard = ({
|
|
37
|
+
card,
|
|
38
|
+
onCardClick
|
|
39
|
+
}) => {
|
|
40
|
+
const handleClick = (0, _react.useCallback)(event => onCardClick(card, event), [card, onCardClick]);
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_assignmentCard.default, _extends({}, card, {
|
|
42
|
+
onClick: onCardClick ? handleClick : card.onClick
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
45
|
+
GridCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
46
|
+
card: _propTypes.default.shape(_assignmentCard.default.propTypes),
|
|
47
|
+
onCardClick: _propTypes.default.func
|
|
48
|
+
} : {};
|
|
49
|
+
const Grid = ({
|
|
50
|
+
cards,
|
|
51
|
+
onCardClick,
|
|
52
|
+
'data-name': dataName
|
|
53
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
className: _style.default.grid,
|
|
55
|
+
"data-name": dataName
|
|
56
|
+
}, cards.map((card, index) => /*#__PURE__*/_react.default.createElement(GridCard, {
|
|
57
|
+
key: index,
|
|
58
|
+
card: card,
|
|
59
|
+
onCardClick: onCardClick
|
|
60
|
+
})));
|
|
61
|
+
Grid.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
62
|
+
cards: _propTypes.default.arrayOf(_propTypes.default.shape(_assignmentCard.default.propTypes)),
|
|
63
|
+
onCardClick: _propTypes.default.func,
|
|
64
|
+
'data-name': _propTypes.default.string
|
|
65
|
+
} : {};
|
|
66
|
+
const DueSection = ({
|
|
67
|
+
sectionKey,
|
|
68
|
+
title,
|
|
69
|
+
subtitle,
|
|
70
|
+
count,
|
|
71
|
+
cards,
|
|
72
|
+
onCardClick
|
|
73
|
+
}) => {
|
|
74
|
+
const {
|
|
75
|
+
iconName,
|
|
76
|
+
color
|
|
77
|
+
} = SECTIONS[sectionKey];
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement("section", {
|
|
79
|
+
className: _style.default.section,
|
|
80
|
+
"data-name": "due-section",
|
|
81
|
+
"data-key": sectionKey
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
83
|
+
className: _style.default.sectionHead
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
85
|
+
iconName: iconName,
|
|
86
|
+
iconColor: color,
|
|
87
|
+
size: {
|
|
88
|
+
faSize: 16,
|
|
89
|
+
wrapperSize: 16
|
|
90
|
+
}
|
|
91
|
+
}), /*#__PURE__*/_react.default.createElement("h2", {
|
|
92
|
+
className: _style.default.sectionTitle
|
|
93
|
+
}, title), /*#__PURE__*/_react.default.createElement(_tag.default, {
|
|
94
|
+
label: String(count),
|
|
95
|
+
size: "S"
|
|
96
|
+
}), subtitle ? /*#__PURE__*/_react.default.createElement("span", {
|
|
97
|
+
className: _style.default.sectionSubtitle
|
|
98
|
+
}, subtitle) : null), /*#__PURE__*/_react.default.createElement(Grid, {
|
|
99
|
+
cards: cards,
|
|
100
|
+
onCardClick: onCardClick
|
|
101
|
+
}));
|
|
102
|
+
};
|
|
103
|
+
DueSection.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
104
|
+
sectionKey: _propTypes.default.oneOf(SECTION_KEYS),
|
|
105
|
+
title: _propTypes.default.string,
|
|
106
|
+
subtitle: _propTypes.default.string,
|
|
107
|
+
count: _propTypes.default.number,
|
|
108
|
+
cards: Grid.propTypes.cards,
|
|
109
|
+
onCardClick: _propTypes.default.func
|
|
110
|
+
} : {};
|
|
111
|
+
|
|
112
|
+
// « Assigned to you » at /assigned (N4): two tabs, To do (not started + in progress) in three
|
|
113
|
+
// due-date sections, and Finished as a flat grid. The MOOC sorts every list; lateness is never
|
|
114
|
+
// shown (L0) and no assignment is ever named (L5).
|
|
115
|
+
const MyAssignments = ({
|
|
116
|
+
title,
|
|
117
|
+
tabs = [],
|
|
118
|
+
sections = [],
|
|
119
|
+
cards = [],
|
|
120
|
+
emptyState,
|
|
121
|
+
loading = false,
|
|
122
|
+
onCardClick
|
|
123
|
+
}) => {
|
|
124
|
+
const selectedTab = tabs.find(tab => tab.selected);
|
|
125
|
+
const isTodo = !selectedTab || selectedTab.key === 'todo';
|
|
126
|
+
const visibleSections = SECTION_KEYS.map(key => sections.find(section => section.key === key)).filter(section => section && section.cards.length > 0);
|
|
127
|
+
const isEmpty = isTodo ? visibleSections.length === 0 : cards.length === 0;
|
|
128
|
+
const handleEmptyLinkClick = emptyState && emptyState.link && emptyState.link.onClick;
|
|
129
|
+
let panel;
|
|
130
|
+
if (loading) {
|
|
131
|
+
panel = /*#__PURE__*/_react.default.createElement(_loader.default, null);
|
|
132
|
+
} else if (isEmpty) {
|
|
133
|
+
panel = emptyState ? /*#__PURE__*/_react.default.createElement("div", {
|
|
134
|
+
className: _style.default.empty,
|
|
135
|
+
"data-name": "empty-state"
|
|
136
|
+
}, /*#__PURE__*/_react.default.createElement("h2", {
|
|
137
|
+
className: _style.default.emptyTitle
|
|
138
|
+
}, emptyState.title), /*#__PURE__*/_react.default.createElement("p", {
|
|
139
|
+
className: _style.default.emptyMessage
|
|
140
|
+
}, emptyState.message), emptyState.link ? /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
141
|
+
className: _style.default.emptyLink,
|
|
142
|
+
href: emptyState.link.href,
|
|
143
|
+
onClick: handleEmptyLinkClick
|
|
144
|
+
}, emptyState.link.label) : null) : null;
|
|
145
|
+
} else if (isTodo) {
|
|
146
|
+
panel = visibleSections.map(section => /*#__PURE__*/_react.default.createElement(DueSection, {
|
|
147
|
+
key: section.key,
|
|
148
|
+
sectionKey: section.key,
|
|
149
|
+
title: section.title,
|
|
150
|
+
subtitle: section.subtitle,
|
|
151
|
+
count: section.count,
|
|
152
|
+
cards: section.cards,
|
|
153
|
+
onCardClick: onCardClick
|
|
154
|
+
}));
|
|
155
|
+
} else {
|
|
156
|
+
panel = /*#__PURE__*/_react.default.createElement(Grid, {
|
|
157
|
+
cards: cards,
|
|
158
|
+
onCardClick: onCardClick,
|
|
159
|
+
"data-name": "finished-grid"
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
163
|
+
className: _style.default.backgroundContainer
|
|
164
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
165
|
+
className: _style.default.container
|
|
166
|
+
}, title ? /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
167
|
+
type: "page",
|
|
168
|
+
title: title
|
|
169
|
+
}) : null, /*#__PURE__*/_react.default.createElement(_tabs.default, {
|
|
170
|
+
compact: true,
|
|
171
|
+
items: tabs.map(({
|
|
172
|
+
key,
|
|
173
|
+
label,
|
|
174
|
+
count,
|
|
175
|
+
selected,
|
|
176
|
+
onClick
|
|
177
|
+
}) => ({
|
|
178
|
+
key,
|
|
179
|
+
title: label,
|
|
180
|
+
count,
|
|
181
|
+
isActive: selected,
|
|
182
|
+
onClick
|
|
183
|
+
}))
|
|
184
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
+
role: "tabpanel",
|
|
186
|
+
"aria-label": selectedTab && selectedTab.label,
|
|
187
|
+
"aria-busy": loading
|
|
188
|
+
}, panel)));
|
|
189
|
+
};
|
|
190
|
+
MyAssignments.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
191
|
+
// « Assigned to you »
|
|
192
|
+
title: _propTypes.default.string,
|
|
193
|
+
tabs: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
194
|
+
key: _propTypes.default.oneOf(['todo', 'done']).isRequired,
|
|
195
|
+
label: _propTypes.default.string,
|
|
196
|
+
count: _propTypes.default.number,
|
|
197
|
+
selected: _propTypes.default.bool,
|
|
198
|
+
onClick: _propTypes.default.func
|
|
199
|
+
})),
|
|
200
|
+
// To do: Overdue / Due this week / Due after this week. An empty section is not rendered.
|
|
201
|
+
sections: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
202
|
+
key: _propTypes.default.oneOf(SECTION_KEYS).isRequired,
|
|
203
|
+
title: _propTypes.default.string,
|
|
204
|
+
// A date range label, e.g. "Wed 21 Oct – Wed 28 Oct"
|
|
205
|
+
subtitle: _propTypes.default.string,
|
|
206
|
+
// Every module of the section, whatever the number of cards loaded
|
|
207
|
+
count: _propTypes.default.number.isRequired,
|
|
208
|
+
cards: Grid.propTypes.cards.isRequired
|
|
209
|
+
})),
|
|
210
|
+
// Finished: most recently finished first (D1)
|
|
211
|
+
cards: Grid.propTypes.cards,
|
|
212
|
+
loading: _propTypes.default.bool,
|
|
213
|
+
// The empty state of the selected tab
|
|
214
|
+
emptyState: _propTypes.default.shape({
|
|
215
|
+
title: _propTypes.default.string,
|
|
216
|
+
message: _propTypes.default.string,
|
|
217
|
+
link: _propTypes.default.shape({
|
|
218
|
+
label: _propTypes.default.string,
|
|
219
|
+
href: _propTypes.default.string,
|
|
220
|
+
onClick: _propTypes.default.func
|
|
221
|
+
})
|
|
222
|
+
}),
|
|
223
|
+
// Receives the card's content and the click event
|
|
224
|
+
onCardClick: _propTypes.default.func
|
|
225
|
+
} : {};
|
|
226
|
+
var _default = exports.default = MyAssignments;
|
|
227
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_title","_tabs","_loader","_link","_icon","_tag","_colors","_assignmentCard","_style","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","SECTIONS","overdue","iconName","color","COLORS","cm_negative_200","dueThisWeek","cm_yellow_400","dueAfterThisWeek","cm_grey_500","SECTION_KEYS","GridCard","card","onCardClick","handleClick","useCallback","event","createElement","onClick","propTypes","process","env","NODE_ENV","PropTypes","shape","AssignmentCard","func","Grid","cards","dataName","className","style","grid","map","index","key","arrayOf","string","DueSection","sectionKey","title","subtitle","count","section","sectionHead","iconColor","size","faSize","wrapperSize","sectionTitle","label","String","sectionSubtitle","oneOf","number","MyAssignments","tabs","sections","emptyState","loading","selectedTab","find","tab","selected","isTodo","visibleSections","filter","isEmpty","handleEmptyLinkClick","link","panel","empty","emptyTitle","emptyMessage","message","emptyLink","href","backgroundContainer","container","type","compact","items","isActive","role","isRequired","bool","_default","exports"],"sources":["../../../src/template/my-assignments/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Title from '../../atom/title';\nimport Tabs from '../../molecule/tabs';\nimport Loader from '../../atom/loader';\nimport Link from '../../atom/link';\nimport FaIcon from '../../atom/icon';\nimport Tag from '../../atom/tag';\nimport {COLORS} from '../../variables/colors';\nimport AssignmentCard from '../../molecule/assignment-card';\nimport style from './style.css';\n\n// To do is split by due date, always in this order (N4). \"Later\" is gone.\nconst SECTIONS = {\n overdue: {iconName: 'triangle-exclamation', color: COLORS.cm_negative_200},\n dueThisWeek: {iconName: 'clock', color: COLORS.cm_yellow_400},\n dueAfterThisWeek: {iconName: 'circle', color: COLORS.cm_grey_500}\n};\nconst SECTION_KEYS = ['overdue', 'dueThisWeek', 'dueAfterThisWeek'];\n\nconst GridCard = ({card, onCardClick}) => {\n const handleClick = useCallback(event => onCardClick(card, event), [card, onCardClick]);\n return <AssignmentCard {...card} onClick={onCardClick ? handleClick : card.onClick} />;\n};\n\nGridCard.propTypes = {\n card: PropTypes.shape(AssignmentCard.propTypes),\n onCardClick: PropTypes.func\n};\n\nconst Grid = ({cards, onCardClick, 'data-name': dataName}) => (\n <div className={style.grid} data-name={dataName}>\n {cards.map((card, index) => (\n <GridCard key={index} card={card} onCardClick={onCardClick} />\n ))}\n </div>\n);\n\nGrid.propTypes = {\n cards: PropTypes.arrayOf(PropTypes.shape(AssignmentCard.propTypes)),\n onCardClick: PropTypes.func,\n 'data-name': PropTypes.string\n};\n\nconst DueSection = ({sectionKey, title, subtitle, count, cards, onCardClick}) => {\n const {iconName, color} = SECTIONS[sectionKey];\n return (\n <section className={style.section} data-name=\"due-section\" data-key={sectionKey}>\n <div className={style.sectionHead}>\n <FaIcon iconName={iconName} iconColor={color} size={{faSize: 16, wrapperSize: 16}} />\n <h2 className={style.sectionTitle}>{title}</h2>\n <Tag label={String(count)} size=\"S\" />\n {subtitle ? <span className={style.sectionSubtitle}>{subtitle}</span> : null}\n </div>\n <Grid cards={cards} onCardClick={onCardClick} />\n </section>\n );\n};\n\nDueSection.propTypes = {\n sectionKey: PropTypes.oneOf(SECTION_KEYS),\n title: PropTypes.string,\n subtitle: PropTypes.string,\n count: PropTypes.number,\n cards: Grid.propTypes.cards,\n onCardClick: PropTypes.func\n};\n\n// « Assigned to you » at /assigned (N4): two tabs, To do (not started + in progress) in three\n// due-date sections, and Finished as a flat grid. The MOOC sorts every list; lateness is never\n// shown (L0) and no assignment is ever named (L5).\nconst MyAssignments = ({\n title,\n tabs = [],\n sections = [],\n cards = [],\n emptyState,\n loading = false,\n onCardClick\n}) => {\n const selectedTab = tabs.find(tab => tab.selected);\n const isTodo = !selectedTab || selectedTab.key === 'todo';\n const visibleSections = SECTION_KEYS.map(key =>\n sections.find(section => section.key === key)\n ).filter(section => section && section.cards.length > 0);\n const isEmpty = isTodo ? visibleSections.length === 0 : cards.length === 0;\n\n const handleEmptyLinkClick = emptyState && emptyState.link && emptyState.link.onClick;\n\n let panel;\n if (loading) {\n panel = <Loader />;\n } else if (isEmpty) {\n panel = emptyState ? (\n <div className={style.empty} data-name=\"empty-state\">\n <h2 className={style.emptyTitle}>{emptyState.title}</h2>\n <p className={style.emptyMessage}>{emptyState.message}</p>\n {emptyState.link ? (\n <Link\n className={style.emptyLink}\n href={emptyState.link.href}\n onClick={handleEmptyLinkClick}\n >\n {emptyState.link.label}\n </Link>\n ) : null}\n </div>\n ) : null;\n } else if (isTodo) {\n panel = visibleSections.map(section => (\n <DueSection\n key={section.key}\n sectionKey={section.key}\n title={section.title}\n subtitle={section.subtitle}\n count={section.count}\n cards={section.cards}\n onCardClick={onCardClick}\n />\n ));\n } else {\n panel = <Grid cards={cards} onCardClick={onCardClick} data-name=\"finished-grid\" />;\n }\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container}>\n {title ? <Title type=\"page\" title={title} /> : null}\n <Tabs\n compact\n items={tabs.map(({key, label, count, selected, onClick}) => ({\n key,\n title: label,\n count,\n isActive: selected,\n onClick\n }))}\n />\n <div role=\"tabpanel\" aria-label={selectedTab && selectedTab.label} aria-busy={loading}>\n {panel}\n </div>\n </div>\n </div>\n );\n};\n\nMyAssignments.propTypes = {\n // « Assigned to you »\n title: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.oneOf(['todo', 'done']).isRequired,\n label: PropTypes.string,\n count: PropTypes.number,\n selected: PropTypes.bool,\n onClick: PropTypes.func\n })\n ),\n // To do: Overdue / Due this week / Due after this week. An empty section is not rendered.\n sections: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.oneOf(SECTION_KEYS).isRequired,\n title: PropTypes.string,\n // A date range label, e.g. \"Wed 21 Oct – Wed 28 Oct\"\n subtitle: PropTypes.string,\n // Every module of the section, whatever the number of cards loaded\n count: PropTypes.number.isRequired,\n cards: Grid.propTypes.cards.isRequired\n })\n ),\n // Finished: most recently finished first (D1)\n cards: Grid.propTypes.cards,\n loading: PropTypes.bool,\n // The empty state of the selected tab\n emptyState: PropTypes.shape({\n title: PropTypes.string,\n message: PropTypes.string,\n link: PropTypes.shape({\n label: PropTypes.string,\n href: PropTypes.string,\n onClick: PropTypes.func\n })\n }),\n // Receives the card's content and the click event\n onCardClick: PropTypes.func\n};\n\nexport default MyAssignments;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,KAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,IAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,eAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,MAAA,GAAAT,sBAAA,CAAAF,OAAA;AAAgC,SAAAE,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAb,wBAA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S,CAACc,MAAM;IACvBqC,OAAO,EAAEnD,kBAAS,CAACc,MAAM;IACzBgC,IAAI,EAAE9C,kBAAS,CAACC,KAAK,CAAC;MACpB0B,KAAK,EAAE3B,kBAAS,CAACc,MAAM;MACvBuC,IAAI,EAAErD,kBAAS,CAACc,MAAM;MACtBnB,OAAO,EAAEK,kBAAS,CAACG;IACrB,CAAC;EACH,CAAC,CAAC;EACF;EACAb,WAAW,EAAEU,kBAAS,CAACG;AACzB,CAAC;AAAC,IAAA4D,QAAA,GAAAC,OAAA,CAAA/G,OAAA,GAEa+E,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_grey_100, cm_grey_500, cm_grey_800, cm_primary_blue from colors;
|
|
3
|
+
|
|
4
|
+
.backgroundContainer {
|
|
5
|
+
background-color: white;
|
|
6
|
+
min-height: 100%;
|
|
7
|
+
width: 100%;
|
|
8
|
+
font-family: "Gilroy";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.container {
|
|
12
|
+
margin: 48px auto;
|
|
13
|
+
padding: 0 16px;
|
|
14
|
+
position: relative;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
min-height: 100%;
|
|
17
|
+
width: 100%;
|
|
18
|
+
max-width: calc(1080px + 32px);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.grid {
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-columns: repeat(auto-fill, minmax(min(256px, 100%), 1fr));
|
|
24
|
+
gap: 24px 16px;
|
|
25
|
+
margin-top: 16px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.section {
|
|
29
|
+
margin-top: 32px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sectionHead {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 8px;
|
|
36
|
+
padding-bottom: 12px;
|
|
37
|
+
border-bottom: 1px solid cm_grey_100;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.sectionTitle {
|
|
41
|
+
margin: 0;
|
|
42
|
+
font-size: 18px;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
line-height: 24px;
|
|
45
|
+
color: cm_grey_800;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sectionSubtitle {
|
|
49
|
+
margin-left: auto;
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
color: cm_grey_500;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.empty {
|
|
57
|
+
max-width: 502px;
|
|
58
|
+
margin: 0 auto;
|
|
59
|
+
padding: 72px 16px;
|
|
60
|
+
text-align: center;
|
|
61
|
+
overflow-wrap: anywhere;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.emptyTitle {
|
|
65
|
+
margin: 0;
|
|
66
|
+
font-size: 20px;
|
|
67
|
+
font-weight: 700;
|
|
68
|
+
line-height: 28px;
|
|
69
|
+
color: cm_grey_800;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.emptyMessage {
|
|
73
|
+
margin: 8px 0 20px;
|
|
74
|
+
font-size: 16px;
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
line-height: 22px;
|
|
77
|
+
color: cm_grey_500;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.emptyLink {
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
font-weight: 700;
|
|
83
|
+
color: cm_primary_blue;
|
|
84
|
+
}
|
|
@@ -52,12 +52,14 @@ declare namespace MyLearning {
|
|
|
52
52
|
dataName: PropTypes.Requireable<string>;
|
|
53
53
|
title: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
54
54
|
showMore: PropTypes.Requireable<string>;
|
|
55
|
+
alwaysShowMore: PropTypes.Requireable<boolean>;
|
|
55
56
|
cards: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
56
57
|
badge: PropTypes.Requireable<string>;
|
|
57
58
|
image: PropTypes.Requireable<string>;
|
|
58
59
|
disabled: PropTypes.Requireable<boolean>;
|
|
59
60
|
adaptiv: PropTypes.Requireable<boolean>;
|
|
60
61
|
type: PropTypes.Requireable<string>;
|
|
62
|
+
typeLabel: PropTypes.Requireable<string>;
|
|
61
63
|
title: PropTypes.Requireable<string>;
|
|
62
64
|
author: PropTypes.Requireable<string>;
|
|
63
65
|
certifiedAuthor: PropTypes.Requireable<boolean>;
|
|
@@ -117,6 +119,7 @@ declare namespace MyLearning {
|
|
|
117
119
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
120
|
isActive: PropTypes.Requireable<boolean>;
|
|
119
121
|
}> | null | undefined)[]>;
|
|
122
|
+
compact: PropTypes.Requireable<boolean>;
|
|
120
123
|
}>>;
|
|
121
124
|
customStyle: PropTypes.Requireable<{
|
|
122
125
|
[x: string]: string | null | undefined;
|
|
@@ -175,6 +175,7 @@ declare namespace PlaylistDetail {
|
|
|
175
175
|
customLabelClassName: PropTypes.Requireable<string>;
|
|
176
176
|
}>>;
|
|
177
177
|
required: PropTypes.Requireable<boolean>;
|
|
178
|
+
headingLevel: PropTypes.Requireable<number>;
|
|
178
179
|
}>>;
|
|
179
180
|
headerIcon: PropTypes.Requireable<string>;
|
|
180
181
|
backgroundImage: PropTypes.Requireable<string>;
|
|
@@ -325,6 +326,15 @@ declare namespace PlaylistDetail {
|
|
|
325
326
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
326
327
|
title: PropTypes.Validator<string>;
|
|
327
328
|
subtitle: PropTypes.Requireable<string>;
|
|
329
|
+
titleTags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
330
|
+
label: PropTypes.Validator<string>;
|
|
331
|
+
type: PropTypes.Requireable<string>;
|
|
332
|
+
}> | null | undefined)[]>;
|
|
333
|
+
details: PropTypes.Requireable<string>;
|
|
334
|
+
progress: PropTypes.Requireable<PropTypes.InferProps<{
|
|
335
|
+
value: PropTypes.Validator<number>;
|
|
336
|
+
label: PropTypes.Validator<string>;
|
|
337
|
+
}>>;
|
|
328
338
|
'data-name': PropTypes.Requireable<string>;
|
|
329
339
|
provider: PropTypes.Requireable<PropTypes.InferProps<{
|
|
330
340
|
label: PropTypes.Requireable<string>;
|
|
@@ -771,6 +781,7 @@ declare namespace PlaylistDetail {
|
|
|
771
781
|
customLabelClassName: PropTypes.Requireable<string>;
|
|
772
782
|
}>>;
|
|
773
783
|
required: PropTypes.Requireable<boolean>;
|
|
784
|
+
headingLevel: PropTypes.Requireable<number>;
|
|
774
785
|
}> | null | undefined>>;
|
|
775
786
|
isFetching: PropTypes.Requireable<boolean>;
|
|
776
787
|
search: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -39,12 +39,14 @@ declare namespace TeamsDashboard {
|
|
|
39
39
|
dataName: PropTypes.Requireable<string>;
|
|
40
40
|
title: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
41
41
|
showMore: PropTypes.Requireable<string>;
|
|
42
|
+
alwaysShowMore: PropTypes.Requireable<boolean>;
|
|
42
43
|
cards: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
43
44
|
badge: PropTypes.Requireable<string>;
|
|
44
45
|
image: PropTypes.Requireable<string>;
|
|
45
46
|
disabled: PropTypes.Requireable<boolean>;
|
|
46
47
|
adaptiv: PropTypes.Requireable<boolean>;
|
|
47
48
|
type: PropTypes.Requireable<string>;
|
|
49
|
+
typeLabel: PropTypes.Requireable<string>;
|
|
48
50
|
title: PropTypes.Requireable<string>;
|
|
49
51
|
author: PropTypes.Requireable<string>;
|
|
50
52
|
certifiedAuthor: PropTypes.Requireable<boolean>;
|
|
@@ -104,6 +106,7 @@ declare namespace TeamsDashboard {
|
|
|
104
106
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
105
107
|
isActive: PropTypes.Requireable<boolean>;
|
|
106
108
|
}> | null | undefined)[]>;
|
|
109
|
+
compact: PropTypes.Requireable<boolean>;
|
|
107
110
|
}>>;
|
|
108
111
|
customStyle: PropTypes.Requireable<{
|
|
109
112
|
[x: string]: string | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proptypes.d.ts","sourceRoot":"","sources":["../../src/util/proptypes.js"],"names":[],"mappings":"AAcA,8BAAsD;AAGtD,+BAAwD;AAExD,qDAA4E;AAErE,
|
|
1
|
+
{"version":3,"file":"proptypes.d.ts","sourceRoot":"","sources":["../../src/util/proptypes.js"],"names":[],"mappings":"AAcA,8BAAsD;AAGtD,+BAAwD;AAExD,qDAA4E;AAErE,2FAsBN;AAED,gCAA4C;AAC5C,8BAAwC"}
|
package/lib/util/proptypes.js
CHANGED
|
@@ -19,12 +19,12 @@ const PATH_REGEXP = /^\/([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$/;
|
|
|
19
19
|
const PathPropType = exports.PathPropType = (0, _stringMatching.default)(PATH_REGEXP);
|
|
20
20
|
const SrcPropType = exports.SrcPropType = _propTypes.default.oneOfType([UrlPropType, PathPropType]);
|
|
21
21
|
const FilesPropType = (props, propName, componentName) => {
|
|
22
|
-
const validFilesTypes = ['image/jpeg', 'image/png', 'image/svg+xml', 'image/*', 'application/pdf', 'application/zip', 'text/csv'];
|
|
22
|
+
const validFilesTypes = ['image/jpeg', 'image/png', 'image/svg+xml', 'image/*', 'application/pdf', 'application/zip', 'text/csv', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
|
|
23
23
|
const propValue = props[propName];
|
|
24
24
|
const filesTypes = (0, _split.default)(',', propValue);
|
|
25
25
|
const isValid = (0, _isEmpty.default)((0, _head.default)(filesTypes)) || (0, _every.default)(type => (0, _includes.default)((0, _trim.default)(type), validFilesTypes), filesTypes);
|
|
26
26
|
if (isValid) return null;
|
|
27
|
-
return new Error(`Invalid prop value: ${propValue}, at component: ${componentName}. Expected a valid
|
|
27
|
+
return new Error(`Invalid prop value: ${propValue}, at component: ${componentName}. Expected a valid file type: image/jpeg, image/png, image/* image/svg+xml, application/pdf, application/zip, text/csv or an Excel type.`);
|
|
28
28
|
};
|
|
29
29
|
exports.FilesPropType = FilesPropType;
|
|
30
30
|
const ColorPropType = exports.ColorPropType = _color.default;
|