@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
|
@@ -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,221 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import React, { useCallback } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import Title from '../../atom/title';
|
|
5
|
+
import Tabs from '../../molecule/tabs';
|
|
6
|
+
import Loader from '../../atom/loader';
|
|
7
|
+
import Link from '../../atom/link';
|
|
8
|
+
import FaIcon from '../../atom/icon';
|
|
9
|
+
import Tag from '../../atom/tag';
|
|
10
|
+
import { COLORS } from '../../variables/colors';
|
|
11
|
+
import AssignmentCard from '../../molecule/assignment-card';
|
|
12
|
+
import style from './style.css';
|
|
13
|
+
|
|
14
|
+
// To do is split by due date, always in this order (N4). "Later" is gone.
|
|
15
|
+
const SECTIONS = {
|
|
16
|
+
overdue: {
|
|
17
|
+
iconName: 'triangle-exclamation',
|
|
18
|
+
color: COLORS.cm_negative_200
|
|
19
|
+
},
|
|
20
|
+
dueThisWeek: {
|
|
21
|
+
iconName: 'clock',
|
|
22
|
+
color: COLORS.cm_yellow_400
|
|
23
|
+
},
|
|
24
|
+
dueAfterThisWeek: {
|
|
25
|
+
iconName: 'circle',
|
|
26
|
+
color: COLORS.cm_grey_500
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const SECTION_KEYS = ['overdue', 'dueThisWeek', 'dueAfterThisWeek'];
|
|
30
|
+
const GridCard = ({
|
|
31
|
+
card,
|
|
32
|
+
onCardClick
|
|
33
|
+
}) => {
|
|
34
|
+
const handleClick = useCallback(event => onCardClick(card, event), [card, onCardClick]);
|
|
35
|
+
return /*#__PURE__*/React.createElement(AssignmentCard, _extends({}, card, {
|
|
36
|
+
onClick: onCardClick ? handleClick : card.onClick
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
GridCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
40
|
+
card: PropTypes.shape(AssignmentCard.propTypes),
|
|
41
|
+
onCardClick: PropTypes.func
|
|
42
|
+
} : {};
|
|
43
|
+
const Grid = ({
|
|
44
|
+
cards,
|
|
45
|
+
onCardClick,
|
|
46
|
+
'data-name': dataName
|
|
47
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: style.grid,
|
|
49
|
+
"data-name": dataName
|
|
50
|
+
}, cards.map((card, index) => /*#__PURE__*/React.createElement(GridCard, {
|
|
51
|
+
key: index,
|
|
52
|
+
card: card,
|
|
53
|
+
onCardClick: onCardClick
|
|
54
|
+
})));
|
|
55
|
+
Grid.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
56
|
+
cards: PropTypes.arrayOf(PropTypes.shape(AssignmentCard.propTypes)),
|
|
57
|
+
onCardClick: PropTypes.func,
|
|
58
|
+
'data-name': PropTypes.string
|
|
59
|
+
} : {};
|
|
60
|
+
const DueSection = ({
|
|
61
|
+
sectionKey,
|
|
62
|
+
title,
|
|
63
|
+
subtitle,
|
|
64
|
+
count,
|
|
65
|
+
cards,
|
|
66
|
+
onCardClick
|
|
67
|
+
}) => {
|
|
68
|
+
const {
|
|
69
|
+
iconName,
|
|
70
|
+
color
|
|
71
|
+
} = SECTIONS[sectionKey];
|
|
72
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
73
|
+
className: style.section,
|
|
74
|
+
"data-name": "due-section",
|
|
75
|
+
"data-key": sectionKey
|
|
76
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
className: style.sectionHead
|
|
78
|
+
}, /*#__PURE__*/React.createElement(FaIcon, {
|
|
79
|
+
iconName: iconName,
|
|
80
|
+
iconColor: color,
|
|
81
|
+
size: {
|
|
82
|
+
faSize: 16,
|
|
83
|
+
wrapperSize: 16
|
|
84
|
+
}
|
|
85
|
+
}), /*#__PURE__*/React.createElement("h2", {
|
|
86
|
+
className: style.sectionTitle
|
|
87
|
+
}, title), /*#__PURE__*/React.createElement(Tag, {
|
|
88
|
+
label: String(count),
|
|
89
|
+
size: "S"
|
|
90
|
+
}), subtitle ? /*#__PURE__*/React.createElement("span", {
|
|
91
|
+
className: style.sectionSubtitle
|
|
92
|
+
}, subtitle) : null), /*#__PURE__*/React.createElement(Grid, {
|
|
93
|
+
cards: cards,
|
|
94
|
+
onCardClick: onCardClick
|
|
95
|
+
}));
|
|
96
|
+
};
|
|
97
|
+
DueSection.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
98
|
+
sectionKey: PropTypes.oneOf(SECTION_KEYS),
|
|
99
|
+
title: PropTypes.string,
|
|
100
|
+
subtitle: PropTypes.string,
|
|
101
|
+
count: PropTypes.number,
|
|
102
|
+
cards: Grid.propTypes.cards,
|
|
103
|
+
onCardClick: PropTypes.func
|
|
104
|
+
} : {};
|
|
105
|
+
|
|
106
|
+
// « Assigned to you » at /assigned (N4): two tabs, To do (not started + in progress) in three
|
|
107
|
+
// due-date sections, and Finished as a flat grid. The MOOC sorts every list; lateness is never
|
|
108
|
+
// shown (L0) and no assignment is ever named (L5).
|
|
109
|
+
const MyAssignments = ({
|
|
110
|
+
title,
|
|
111
|
+
tabs = [],
|
|
112
|
+
sections = [],
|
|
113
|
+
cards = [],
|
|
114
|
+
emptyState,
|
|
115
|
+
loading = false,
|
|
116
|
+
onCardClick
|
|
117
|
+
}) => {
|
|
118
|
+
const selectedTab = tabs.find(tab => tab.selected);
|
|
119
|
+
const isTodo = !selectedTab || selectedTab.key === 'todo';
|
|
120
|
+
const visibleSections = SECTION_KEYS.map(key => sections.find(section => section.key === key)).filter(section => section && section.cards.length > 0);
|
|
121
|
+
const isEmpty = isTodo ? visibleSections.length === 0 : cards.length === 0;
|
|
122
|
+
const handleEmptyLinkClick = emptyState && emptyState.link && emptyState.link.onClick;
|
|
123
|
+
let panel;
|
|
124
|
+
if (loading) {
|
|
125
|
+
panel = /*#__PURE__*/React.createElement(Loader, null);
|
|
126
|
+
} else if (isEmpty) {
|
|
127
|
+
panel = emptyState ? /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
className: style.empty,
|
|
129
|
+
"data-name": "empty-state"
|
|
130
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
131
|
+
className: style.emptyTitle
|
|
132
|
+
}, emptyState.title), /*#__PURE__*/React.createElement("p", {
|
|
133
|
+
className: style.emptyMessage
|
|
134
|
+
}, emptyState.message), emptyState.link ? /*#__PURE__*/React.createElement(Link, {
|
|
135
|
+
className: style.emptyLink,
|
|
136
|
+
href: emptyState.link.href,
|
|
137
|
+
onClick: handleEmptyLinkClick
|
|
138
|
+
}, emptyState.link.label) : null) : null;
|
|
139
|
+
} else if (isTodo) {
|
|
140
|
+
panel = visibleSections.map(section => /*#__PURE__*/React.createElement(DueSection, {
|
|
141
|
+
key: section.key,
|
|
142
|
+
sectionKey: section.key,
|
|
143
|
+
title: section.title,
|
|
144
|
+
subtitle: section.subtitle,
|
|
145
|
+
count: section.count,
|
|
146
|
+
cards: section.cards,
|
|
147
|
+
onCardClick: onCardClick
|
|
148
|
+
}));
|
|
149
|
+
} else {
|
|
150
|
+
panel = /*#__PURE__*/React.createElement(Grid, {
|
|
151
|
+
cards: cards,
|
|
152
|
+
onCardClick: onCardClick,
|
|
153
|
+
"data-name": "finished-grid"
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
className: style.backgroundContainer
|
|
158
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: style.container
|
|
160
|
+
}, title ? /*#__PURE__*/React.createElement(Title, {
|
|
161
|
+
type: "page",
|
|
162
|
+
title: title
|
|
163
|
+
}) : null, /*#__PURE__*/React.createElement(Tabs, {
|
|
164
|
+
compact: true,
|
|
165
|
+
items: tabs.map(({
|
|
166
|
+
key,
|
|
167
|
+
label,
|
|
168
|
+
count,
|
|
169
|
+
selected,
|
|
170
|
+
onClick
|
|
171
|
+
}) => ({
|
|
172
|
+
key,
|
|
173
|
+
title: label,
|
|
174
|
+
count,
|
|
175
|
+
isActive: selected,
|
|
176
|
+
onClick
|
|
177
|
+
}))
|
|
178
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
179
|
+
role: "tabpanel",
|
|
180
|
+
"aria-label": selectedTab && selectedTab.label,
|
|
181
|
+
"aria-busy": loading
|
|
182
|
+
}, panel)));
|
|
183
|
+
};
|
|
184
|
+
MyAssignments.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
185
|
+
// « Assigned to you »
|
|
186
|
+
title: PropTypes.string,
|
|
187
|
+
tabs: PropTypes.arrayOf(PropTypes.shape({
|
|
188
|
+
key: PropTypes.oneOf(['todo', 'done']).isRequired,
|
|
189
|
+
label: PropTypes.string,
|
|
190
|
+
count: PropTypes.number,
|
|
191
|
+
selected: PropTypes.bool,
|
|
192
|
+
onClick: PropTypes.func
|
|
193
|
+
})),
|
|
194
|
+
// To do: Overdue / Due this week / Due after this week. An empty section is not rendered.
|
|
195
|
+
sections: PropTypes.arrayOf(PropTypes.shape({
|
|
196
|
+
key: PropTypes.oneOf(SECTION_KEYS).isRequired,
|
|
197
|
+
title: PropTypes.string,
|
|
198
|
+
// A date range label, e.g. "Wed 21 Oct – Wed 28 Oct"
|
|
199
|
+
subtitle: PropTypes.string,
|
|
200
|
+
// Every module of the section, whatever the number of cards loaded
|
|
201
|
+
count: PropTypes.number.isRequired,
|
|
202
|
+
cards: Grid.propTypes.cards.isRequired
|
|
203
|
+
})),
|
|
204
|
+
// Finished: most recently finished first (D1)
|
|
205
|
+
cards: Grid.propTypes.cards,
|
|
206
|
+
loading: PropTypes.bool,
|
|
207
|
+
// The empty state of the selected tab
|
|
208
|
+
emptyState: PropTypes.shape({
|
|
209
|
+
title: PropTypes.string,
|
|
210
|
+
message: PropTypes.string,
|
|
211
|
+
link: PropTypes.shape({
|
|
212
|
+
label: PropTypes.string,
|
|
213
|
+
href: PropTypes.string,
|
|
214
|
+
onClick: PropTypes.func
|
|
215
|
+
})
|
|
216
|
+
}),
|
|
217
|
+
// Receives the card's content and the click event
|
|
218
|
+
onCardClick: PropTypes.func
|
|
219
|
+
} : {};
|
|
220
|
+
export default MyAssignments;
|
|
221
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","Title","Tabs","Loader","Link","FaIcon","Tag","COLORS","AssignmentCard","style","SECTIONS","overdue","iconName","color","cm_negative_200","dueThisWeek","cm_yellow_400","dueAfterThisWeek","cm_grey_500","SECTION_KEYS","GridCard","card","onCardClick","handleClick","event","createElement","_extends","onClick","propTypes","process","env","NODE_ENV","shape","func","Grid","cards","dataName","className","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","length","isEmpty","handleEmptyLinkClick","link","panel","empty","emptyTitle","emptyMessage","message","emptyLink","href","backgroundContainer","container","type","compact","items","isActive","role","isRequired","bool"],"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,OAAOA,KAAK,IAAGC,WAAW,QAAO,OAAO;AACxC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,IAAI,MAAM,qBAAqB;AACtC,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,OAAOC,KAAK,MAAM,aAAa;;AAE/B;AACA,MAAMC,QAAQ,GAAG;EACfC,OAAO,EAAE;IAACC,QAAQ,EAAE,sBAAsB;IAAEC,KAAK,EAAEN,MAAM,CAACO;EAAe,CAAC;EAC1EC,WAAW,EAAE;IAACH,QAAQ,EAAE,OAAO;IAAEC,KAAK,EAAEN,MAAM,CAACS;EAAa,CAAC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;EACD;EACA8B,QAAQ,EAAE/D,SAAS,CAAC0C,OAAO,CACzB1C,SAAS,CAACgC,KAAK,CAAC;IACdS,GAAG,EAAEzC,SAAS,CAAC2D,KAAK,CAACxC,YAAY,CAAC,CAACwE,UAAU;IAC7C7C,KAAK,EAAE9C,SAAS,CAAC2C,MAAM;IACvB;IACAI,QAAQ,EAAE/C,SAAS,CAAC2C,MAAM;IAC1B;IACAK,KAAK,EAAEhD,SAAS,CAAC4D,MAAM,CAAC+B,UAAU;IAClCxD,KAAK,EAAED,IAAI,CAACN,SAAS,CAACO,KAAK,CAACwD;EAC9B,CAAC,CACH,CAAC;EACD;EACAxD,KAAK,EAAED,IAAI,CAACN,SAAS,CAACO,KAAK;EAC3B8B,OAAO,EAAEjE,SAAS,CAAC4F,IAAI;EACvB;EACA5B,UAAU,EAAEhE,SAAS,CAACgC,KAAK,CAAC;IAC1Bc,KAAK,EAAE9C,SAAS,CAAC2C,MAAM;IACvBsC,OAAO,EAAEjF,SAAS,CAAC2C,MAAM;IACzBiC,IAAI,EAAE5E,SAAS,CAACgC,KAAK,CAAC;MACpBwB,KAAK,EAAExD,SAAS,CAAC2C,MAAM;MACvBwC,IAAI,EAAEnF,SAAS,CAAC2C,MAAM;MACtBhB,OAAO,EAAE3B,SAAS,CAACiC;IACrB,CAAC;EACH,CAAC,CAAC;EACF;EACAX,WAAW,EAAEtB,SAAS,CAACiC;AACzB,CAAC;AAED,eAAe4B,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/es/util/proptypes.js
CHANGED
|
@@ -14,12 +14,12 @@ const PATH_REGEXP = /^\/([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$/;
|
|
|
14
14
|
export const PathPropType = stringMatching(PATH_REGEXP);
|
|
15
15
|
export const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);
|
|
16
16
|
export const FilesPropType = (props, propName, componentName) => {
|
|
17
|
-
const validFilesTypes = ['image/jpeg', 'image/png', 'image/svg+xml', 'image/*', 'application/pdf', 'application/zip', 'text/csv'];
|
|
17
|
+
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'];
|
|
18
18
|
const propValue = props[propName];
|
|
19
19
|
const filesTypes = split(',', propValue);
|
|
20
20
|
const isValid = isEmpty(head(filesTypes)) || every(type => includes(trim(type), validFilesTypes), filesTypes);
|
|
21
21
|
if (isValid) return null;
|
|
22
|
-
return new Error(`Invalid prop value: ${propValue}, at component: ${componentName}. Expected a valid
|
|
22
|
+
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.`);
|
|
23
23
|
};
|
|
24
24
|
export const ColorPropType = _ColorPropType;
|
|
25
25
|
export const HexPropType = _HexPropType;
|
package/es/util/proptypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proptypes.js","names":["PropTypes","split","trim","includes","every","stringMatching","_ColorPropType","_HexPropType","isEmpty","head","URL_REGEXP","UrlPropType","PATH_REGEXP","PathPropType","SrcPropType","oneOfType","FilesPropType","props","propName","componentName","validFilesTypes","propValue","filesTypes","isValid","type","Error","ColorPropType","HexPropType"],"sources":["../../src/util/proptypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport split from 'lodash/fp/split';\nimport trim from 'lodash/fp/trim';\nimport includes from 'lodash/fp/includes';\nimport every from 'lodash/fp/every';\nimport stringMatching from 'extended-proptypes/lib/validators/stringMatching';\n\nimport _ColorPropType from 'extended-proptypes/lib/validators/color';\nimport _HexPropType from 'extended-proptypes/lib/validators/hex';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport head from 'lodash/fp/head';\n\nconst URL_REGEXP =\n /^(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const UrlPropType = stringMatching(URL_REGEXP);\n\nconst PATH_REGEXP = /^\\/([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const PathPropType = stringMatching(PATH_REGEXP);\n\nexport const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);\n\nexport const FilesPropType = (props, propName, componentName) => {\n const validFilesTypes = [\n 'image/jpeg',\n 'image/png',\n 'image/svg+xml',\n 'image/*',\n 'application/pdf',\n 'application/zip',\n 'text/csv'\n ];\n\n const propValue = props[propName];\n const filesTypes = split(',', propValue);\n const isValid =\n isEmpty(head(filesTypes)) || every(type => includes(trim(type), validFilesTypes), filesTypes);\n if (isValid) return null;\n\n return new Error(\n `Invalid prop value: ${propValue}, at component: ${componentName}. Expected a valid
|
|
1
|
+
{"version":3,"file":"proptypes.js","names":["PropTypes","split","trim","includes","every","stringMatching","_ColorPropType","_HexPropType","isEmpty","head","URL_REGEXP","UrlPropType","PATH_REGEXP","PathPropType","SrcPropType","oneOfType","FilesPropType","props","propName","componentName","validFilesTypes","propValue","filesTypes","isValid","type","Error","ColorPropType","HexPropType"],"sources":["../../src/util/proptypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport split from 'lodash/fp/split';\nimport trim from 'lodash/fp/trim';\nimport includes from 'lodash/fp/includes';\nimport every from 'lodash/fp/every';\nimport stringMatching from 'extended-proptypes/lib/validators/stringMatching';\n\nimport _ColorPropType from 'extended-proptypes/lib/validators/color';\nimport _HexPropType from 'extended-proptypes/lib/validators/hex';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport head from 'lodash/fp/head';\n\nconst URL_REGEXP =\n /^(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const UrlPropType = stringMatching(URL_REGEXP);\n\nconst PATH_REGEXP = /^\\/([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const PathPropType = stringMatching(PATH_REGEXP);\n\nexport const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);\n\nexport const FilesPropType = (props, propName, componentName) => {\n const validFilesTypes = [\n 'image/jpeg',\n 'image/png',\n 'image/svg+xml',\n 'image/*',\n 'application/pdf',\n 'application/zip',\n 'text/csv',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n ];\n\n const propValue = props[propName];\n const filesTypes = split(',', propValue);\n const isValid =\n isEmpty(head(filesTypes)) || every(type => includes(trim(type), validFilesTypes), filesTypes);\n if (isValid) return null;\n\n return new Error(\n `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.`\n );\n};\n\nexport const ColorPropType = _ColorPropType;\nexport const HexPropType = _HexPropType;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,IAAI,MAAM,gBAAgB;AACjC,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,cAAc,MAAM,kDAAkD;AAE7E,OAAOC,cAAc,MAAM,yCAAyC;AACpE,OAAOC,YAAY,MAAM,uCAAuC;AAChE,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,IAAI,MAAM,gBAAgB;AAEjC,MAAMC,UAAU,GACd,8FAA8F;AAChG,OAAO,MAAMC,WAAW,GAAGN,cAAc,CAACK,UAAU,CAAC;AAErD,MAAME,WAAW,GAAG,oCAAoC;AACxD,OAAO,MAAMC,YAAY,GAAGR,cAAc,CAACO,WAAW,CAAC;AAEvD,OAAO,MAAME,WAAW,GAAGd,SAAS,CAACe,SAAS,CAAC,CAACJ,WAAW,EAAEE,YAAY,CAAC,CAAC;AAE3E,OAAO,MAAMG,aAAa,GAAGA,CAACC,KAAK,EAAEC,QAAQ,EAAEC,aAAa,KAAK;EAC/D,MAAMC,eAAe,GAAG,CACtB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,0BAA0B,EAC1B,mEAAmE,CACpE;EAED,MAAMC,SAAS,GAAGJ,KAAK,CAACC,QAAQ,CAAC;EACjC,MAAMI,UAAU,GAAGrB,KAAK,CAAC,GAAG,EAAEoB,SAAS,CAAC;EACxC,MAAME,OAAO,GACXf,OAAO,CAACC,IAAI,CAACa,UAAU,CAAC,CAAC,IAAIlB,KAAK,CAACoB,IAAI,IAAIrB,QAAQ,CAACD,IAAI,CAACsB,IAAI,CAAC,EAAEJ,eAAe,CAAC,EAAEE,UAAU,CAAC;EAC/F,IAAIC,OAAO,EAAE,OAAO,IAAI;EAExB,OAAO,IAAIE,KAAK,CACd,uBAAuBJ,SAAS,mBAAmBF,aAAa,0IAClE,CAAC;AACH,CAAC;AAED,OAAO,MAAMO,aAAa,GAAGpB,cAAc;AAC3C,OAAO,MAAMqB,WAAW,GAAGpB,YAAY","ignoreList":[]}
|
package/lib/atom/chip/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chip/index.js"],"names":[],"mappings":"AA2BO,qGAG0E;;AAGjF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chip/index.js"],"names":[],"mappings":"AA2BO,qGAG0E;;AAGjF,6DA8EC"}
|