@coorpacademy/components 11.22.0 → 11.22.2
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/button-link/index.js +4 -2
- package/es/atom/button-link/index.js.map +1 -1
- package/es/molecule/bulk-infos/index.d.ts.map +1 -1
- package/es/molecule/bulk-infos/index.js +15 -6
- package/es/molecule/bulk-infos/index.js.map +1 -1
- package/es/molecule/bulk-infos/style.css +9 -2
- package/es/molecule/cm-popin/types.d.ts +1 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/questions/template/index.d.ts +1 -1
- package/es/organism/brand-analytics/index.js +2 -2
- package/es/organism/brand-analytics/index.js.map +1 -1
- package/es/organism/list-items/index.d.ts +3 -1
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +11 -3
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/list-items/style.css +14 -0
- package/es/organism/wizard-contents/index.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.js +1 -1
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/template/app-player/loading/index.d.ts +1 -0
- package/es/template/app-player/player/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts +1 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +1 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +1 -0
- package/es/template/app-review/index.d.ts +1 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +1 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +1 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +2 -0
- package/es/template/common/dashboard/index.d.ts +2 -0
- package/es/template/common/search-page/index.d.ts +1 -0
- package/es/template/external-course/index.d.ts +1 -0
- package/es/util/button-icons.d.ts +10 -0
- package/es/util/button-icons.d.ts.map +1 -1
- package/es/util/button-icons.js +3 -1
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/button-link/index.js +4 -2
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/molecule/bulk-infos/index.d.ts.map +1 -1
- package/lib/molecule/bulk-infos/index.js +16 -6
- package/lib/molecule/bulk-infos/index.js.map +1 -1
- package/lib/molecule/bulk-infos/style.css +9 -2
- package/lib/molecule/cm-popin/types.d.ts +1 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/questions/template/index.d.ts +1 -1
- package/lib/organism/brand-analytics/index.js +2 -2
- package/lib/organism/brand-analytics/index.js.map +1 -1
- package/lib/organism/list-items/index.d.ts +3 -1
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +12 -3
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/list-items/style.css +14 -0
- package/lib/organism/wizard-contents/index.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.js +1 -1
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +1 -0
- package/lib/template/app-player/player/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts +1 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +1 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +1 -0
- package/lib/template/app-review/index.d.ts +1 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +1 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +1 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +2 -0
- package/lib/template/common/dashboard/index.d.ts +2 -0
- package/lib/template/common/search-page/index.d.ts +1 -0
- package/lib/template/external-course/index.d.ts +1 -0
- package/lib/util/button-icons.d.ts +10 -0
- package/lib/util/button-icons.d.ts.map +1 -1
- package/lib/util/button-icons.js +6 -1
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -475,6 +475,7 @@ declare namespace BrandUpdate {
|
|
|
475
475
|
emptyStateSecondMessage: PropTypes.Requireable<string>;
|
|
476
476
|
}> | null | undefined>>;
|
|
477
477
|
title: PropTypes.Requireable<string>;
|
|
478
|
+
isFetching: PropTypes.Requireable<boolean>;
|
|
478
479
|
}> | PropTypes.InferProps<{
|
|
479
480
|
key: PropTypes.Requireable<string>;
|
|
480
481
|
type: PropTypes.Requireable<string>;
|
|
@@ -950,6 +951,7 @@ declare namespace BrandUpdate {
|
|
|
950
951
|
emptyStateSecondMessage: PropTypes.Requireable<string>;
|
|
951
952
|
}> | null | undefined>>;
|
|
952
953
|
title: PropTypes.Requireable<string>;
|
|
954
|
+
isFetching: PropTypes.Requireable<boolean>;
|
|
953
955
|
}> | null | undefined>>;
|
|
954
956
|
}>>;
|
|
955
957
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -249,6 +249,7 @@ declare namespace Dashboard {
|
|
|
249
249
|
emptyStateSecondMessage: PropTypes.Requireable<string>;
|
|
250
250
|
}> | null | undefined>>;
|
|
251
251
|
title: PropTypes.Requireable<string>;
|
|
252
|
+
isFetching: PropTypes.Requireable<boolean>;
|
|
252
253
|
}> | null | undefined>>;
|
|
253
254
|
}>>;
|
|
254
255
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -517,6 +518,7 @@ declare namespace Dashboard {
|
|
|
517
518
|
emptyStateSecondMessage: PropTypes.Requireable<string>;
|
|
518
519
|
}> | null | undefined>>;
|
|
519
520
|
title: PropTypes.Requireable<string>;
|
|
521
|
+
isFetching: PropTypes.Requireable<boolean>;
|
|
520
522
|
}> | null | undefined>>;
|
|
521
523
|
}>>;
|
|
522
524
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -421,6 +421,7 @@ declare namespace SearchPage {
|
|
|
421
421
|
emptyStateSecondMessage: PropTypes.Requireable<string>;
|
|
422
422
|
}> | null | undefined>>;
|
|
423
423
|
title: PropTypes.Requireable<string>;
|
|
424
|
+
isFetching: PropTypes.Requireable<boolean>;
|
|
424
425
|
}> | null | undefined>>;
|
|
425
426
|
}>>;
|
|
426
427
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -266,6 +266,7 @@ declare namespace ExternalCourse {
|
|
|
266
266
|
emptyStateSecondMessage: PropTypes.Requireable<string>;
|
|
267
267
|
}> | null | undefined>>;
|
|
268
268
|
title: PropTypes.Requireable<string>;
|
|
269
|
+
isFetching: PropTypes.Requireable<boolean>;
|
|
269
270
|
}> | null | undefined>>;
|
|
270
271
|
}>>;
|
|
271
272
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -19,5 +19,15 @@ export const ICONS: {
|
|
|
19
19
|
pdf: any;
|
|
20
20
|
back: any;
|
|
21
21
|
delete: any;
|
|
22
|
+
loader: {
|
|
23
|
+
({ className, theme }: {
|
|
24
|
+
className: any;
|
|
25
|
+
theme?: string | undefined;
|
|
26
|
+
}): JSX.Element;
|
|
27
|
+
propTypes: {
|
|
28
|
+
className: import("prop-types").Requireable<string>;
|
|
29
|
+
theme: import("prop-types").Requireable<string>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
22
32
|
};
|
|
23
33
|
//# sourceMappingURL=button-icons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-icons.d.ts","sourceRoot":"","sources":["../../src/util/button-icons.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button-icons.d.ts","sourceRoot":"","sources":["../../src/util/button-icons.js"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBE"}
|
package/es/util/button-icons.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NovaSolidRemoveAddAddCircle1 as AddIcon, NovaCompositionCoorpacademyAnalytics as AnalyticsIcon, NovaSolidContentEditionBin as BinIcon, NovaCompositionCoorpacademyBulletPoint as BulletPointIcon, NovaCompositionNavigationArrowLeft as ChevronLeftIcon, NovaCompositionNavigationArrowRight as ChevronRightIcon, NovaSolidStatusClose as CloseIcon, NovaSolidContentEditionPencilWrite as EditIcon, NovaCompositionCoorpacademyEye as EyeIcon, NovaSolidContentContentViewModule1 as ListIcon, NovaSolidLoginLogout1 as LogoutIcon, NovaSolidApplicationsWindowUpload3 as PublishIcon, NovaSolidComputersSdCard as SaveIcon, NovaLineLoginKey1 as KlfIcon, NovaSolidFilesFoldersFolders as FoldersIcon, NovaSolidFilesBasicFileUpload2 as UploadIcon, NovaCompositionNavigationArrowDown as ArrowDown, NovaCompositionNavigationArrowLeft as ArrowLeft, NovaLineFilesOfficeFileOfficePdf as PDF, NovaSolidContentEditionDelete1 as DeleteIcon } from '@coorpacademy/nova-icons';
|
|
2
|
+
import Loader from '../atom/loader';
|
|
2
3
|
export const ICONS = {
|
|
3
4
|
add: AddIcon,
|
|
4
5
|
analytics: AnalyticsIcon,
|
|
@@ -19,6 +20,7 @@ export const ICONS = {
|
|
|
19
20
|
down: ArrowDown,
|
|
20
21
|
pdf: PDF,
|
|
21
22
|
back: ArrowLeft,
|
|
22
|
-
delete: DeleteIcon
|
|
23
|
+
delete: DeleteIcon,
|
|
24
|
+
loader: Loader
|
|
23
25
|
};
|
|
24
26
|
//# sourceMappingURL=button-icons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-icons.js","names":["NovaSolidRemoveAddAddCircle1","AddIcon","NovaCompositionCoorpacademyAnalytics","AnalyticsIcon","NovaSolidContentEditionBin","BinIcon","NovaCompositionCoorpacademyBulletPoint","BulletPointIcon","NovaCompositionNavigationArrowLeft","ChevronLeftIcon","NovaCompositionNavigationArrowRight","ChevronRightIcon","NovaSolidStatusClose","CloseIcon","NovaSolidContentEditionPencilWrite","EditIcon","NovaCompositionCoorpacademyEye","EyeIcon","NovaSolidContentContentViewModule1","ListIcon","NovaSolidLoginLogout1","LogoutIcon","NovaSolidApplicationsWindowUpload3","PublishIcon","NovaSolidComputersSdCard","SaveIcon","NovaLineLoginKey1","KlfIcon","NovaSolidFilesFoldersFolders","FoldersIcon","NovaSolidFilesBasicFileUpload2","UploadIcon","NovaCompositionNavigationArrowDown","ArrowDown","ArrowLeft","NovaLineFilesOfficeFileOfficePdf","PDF","NovaSolidContentEditionDelete1","DeleteIcon","ICONS","add","analytics","bin","close","edit","key","list","logout","publish","save","see","folders","upload","down","pdf","back","delete"],"sources":["../../src/util/button-icons.js"],"sourcesContent":["import {\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaCompositionCoorpacademyAnalytics as AnalyticsIcon,\n NovaSolidContentEditionBin as BinIcon,\n NovaCompositionCoorpacademyBulletPoint as BulletPointIcon,\n NovaCompositionNavigationArrowLeft as ChevronLeftIcon,\n NovaCompositionNavigationArrowRight as ChevronRightIcon,\n NovaSolidStatusClose as CloseIcon,\n NovaSolidContentEditionPencilWrite as EditIcon,\n NovaCompositionCoorpacademyEye as EyeIcon,\n NovaSolidContentContentViewModule1 as ListIcon,\n NovaSolidLoginLogout1 as LogoutIcon,\n NovaSolidApplicationsWindowUpload3 as PublishIcon,\n NovaSolidComputersSdCard as SaveIcon,\n NovaLineLoginKey1 as KlfIcon,\n NovaSolidFilesFoldersFolders as FoldersIcon,\n NovaSolidFilesBasicFileUpload2 as UploadIcon,\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionNavigationArrowLeft as ArrowLeft,\n NovaLineFilesOfficeFileOfficePdf as PDF,\n NovaSolidContentEditionDelete1 as DeleteIcon\n} from '@coorpacademy/nova-icons';\n\nexport const ICONS = {\n add: AddIcon,\n analytics: AnalyticsIcon,\n bin: BinIcon,\n 'bullet-point': BulletPointIcon,\n 'chevron-left': ChevronLeftIcon,\n 'chevron-right': ChevronRightIcon,\n close: CloseIcon,\n edit: EditIcon,\n key: KlfIcon,\n list: ListIcon,\n logout: LogoutIcon,\n publish: PublishIcon,\n save: SaveIcon,\n see: EyeIcon,\n folders: FoldersIcon,\n upload: UploadIcon,\n down: ArrowDown,\n pdf: PDF,\n back: ArrowLeft,\n delete: DeleteIcon\n};\n"],"mappings":"AAAA,SACEA,4BAA4B,IAAIC,OADlC,EAEEC,oCAAoC,IAAIC,aAF1C,EAGEC,0BAA0B,IAAIC,OAHhC,EAIEC,sCAAsC,IAAIC,eAJ5C,EAKEC,kCAAkC,IAAIC,eALxC,EAMEC,mCAAmC,IAAIC,gBANzC,EAOEC,oBAAoB,IAAIC,SAP1B,EAQEC,kCAAkC,IAAIC,QARxC,EASEC,8BAA8B,IAAIC,OATpC,EAUEC,kCAAkC,IAAIC,QAVxC,EAWEC,qBAAqB,IAAIC,UAX3B,EAYEC,kCAAkC,IAAIC,WAZxC,EAaEC,wBAAwB,IAAIC,QAb9B,EAcEC,iBAAiB,IAAIC,OAdvB,EAeEC,4BAA4B,IAAIC,WAflC,EAgBEC,8BAA8B,IAAIC,UAhBpC,EAiBEC,kCAAkC,IAAIC,SAjBxC,EAkBEzB,kCAAkC,IAAI0B,SAlBxC,EAmBEC,gCAAgC,IAAIC,GAnBtC,EAoBEC,8BAA8B,IAAIC,UApBpC,QAqBO,0BArBP;
|
|
1
|
+
{"version":3,"file":"button-icons.js","names":["NovaSolidRemoveAddAddCircle1","AddIcon","NovaCompositionCoorpacademyAnalytics","AnalyticsIcon","NovaSolidContentEditionBin","BinIcon","NovaCompositionCoorpacademyBulletPoint","BulletPointIcon","NovaCompositionNavigationArrowLeft","ChevronLeftIcon","NovaCompositionNavigationArrowRight","ChevronRightIcon","NovaSolidStatusClose","CloseIcon","NovaSolidContentEditionPencilWrite","EditIcon","NovaCompositionCoorpacademyEye","EyeIcon","NovaSolidContentContentViewModule1","ListIcon","NovaSolidLoginLogout1","LogoutIcon","NovaSolidApplicationsWindowUpload3","PublishIcon","NovaSolidComputersSdCard","SaveIcon","NovaLineLoginKey1","KlfIcon","NovaSolidFilesFoldersFolders","FoldersIcon","NovaSolidFilesBasicFileUpload2","UploadIcon","NovaCompositionNavigationArrowDown","ArrowDown","ArrowLeft","NovaLineFilesOfficeFileOfficePdf","PDF","NovaSolidContentEditionDelete1","DeleteIcon","Loader","ICONS","add","analytics","bin","close","edit","key","list","logout","publish","save","see","folders","upload","down","pdf","back","delete","loader"],"sources":["../../src/util/button-icons.js"],"sourcesContent":["import {\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaCompositionCoorpacademyAnalytics as AnalyticsIcon,\n NovaSolidContentEditionBin as BinIcon,\n NovaCompositionCoorpacademyBulletPoint as BulletPointIcon,\n NovaCompositionNavigationArrowLeft as ChevronLeftIcon,\n NovaCompositionNavigationArrowRight as ChevronRightIcon,\n NovaSolidStatusClose as CloseIcon,\n NovaSolidContentEditionPencilWrite as EditIcon,\n NovaCompositionCoorpacademyEye as EyeIcon,\n NovaSolidContentContentViewModule1 as ListIcon,\n NovaSolidLoginLogout1 as LogoutIcon,\n NovaSolidApplicationsWindowUpload3 as PublishIcon,\n NovaSolidComputersSdCard as SaveIcon,\n NovaLineLoginKey1 as KlfIcon,\n NovaSolidFilesFoldersFolders as FoldersIcon,\n NovaSolidFilesBasicFileUpload2 as UploadIcon,\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionNavigationArrowLeft as ArrowLeft,\n NovaLineFilesOfficeFileOfficePdf as PDF,\n NovaSolidContentEditionDelete1 as DeleteIcon\n} from '@coorpacademy/nova-icons';\nimport Loader from '../atom/loader';\n\nexport const ICONS = {\n add: AddIcon,\n analytics: AnalyticsIcon,\n bin: BinIcon,\n 'bullet-point': BulletPointIcon,\n 'chevron-left': ChevronLeftIcon,\n 'chevron-right': ChevronRightIcon,\n close: CloseIcon,\n edit: EditIcon,\n key: KlfIcon,\n list: ListIcon,\n logout: LogoutIcon,\n publish: PublishIcon,\n save: SaveIcon,\n see: EyeIcon,\n folders: FoldersIcon,\n upload: UploadIcon,\n down: ArrowDown,\n pdf: PDF,\n back: ArrowLeft,\n delete: DeleteIcon,\n loader: Loader\n};\n"],"mappings":"AAAA,SACEA,4BAA4B,IAAIC,OADlC,EAEEC,oCAAoC,IAAIC,aAF1C,EAGEC,0BAA0B,IAAIC,OAHhC,EAIEC,sCAAsC,IAAIC,eAJ5C,EAKEC,kCAAkC,IAAIC,eALxC,EAMEC,mCAAmC,IAAIC,gBANzC,EAOEC,oBAAoB,IAAIC,SAP1B,EAQEC,kCAAkC,IAAIC,QARxC,EASEC,8BAA8B,IAAIC,OATpC,EAUEC,kCAAkC,IAAIC,QAVxC,EAWEC,qBAAqB,IAAIC,UAX3B,EAYEC,kCAAkC,IAAIC,WAZxC,EAaEC,wBAAwB,IAAIC,QAb9B,EAcEC,iBAAiB,IAAIC,OAdvB,EAeEC,4BAA4B,IAAIC,WAflC,EAgBEC,8BAA8B,IAAIC,UAhBpC,EAiBEC,kCAAkC,IAAIC,SAjBxC,EAkBEzB,kCAAkC,IAAI0B,SAlBxC,EAmBEC,gCAAgC,IAAIC,GAnBtC,EAoBEC,8BAA8B,IAAIC,UApBpC,QAqBO,0BArBP;AAsBA,OAAOC,MAAP,MAAmB,gBAAnB;AAEA,OAAO,MAAMC,KAAK,GAAG;EACnBC,GAAG,EAAExC,OADc;EAEnByC,SAAS,EAAEvC,aAFQ;EAGnBwC,GAAG,EAAEtC,OAHc;EAInB,gBAAgBE,eAJG;EAKnB,gBAAgBE,eALG;EAMnB,iBAAiBE,gBANE;EAOnBiC,KAAK,EAAE/B,SAPY;EAQnBgC,IAAI,EAAE9B,QARa;EASnB+B,GAAG,EAAEnB,OATc;EAUnBoB,IAAI,EAAE5B,QAVa;EAWnB6B,MAAM,EAAE3B,UAXW;EAYnB4B,OAAO,EAAE1B,WAZU;EAanB2B,IAAI,EAAEzB,QAba;EAcnB0B,GAAG,EAAElC,OAdc;EAenBmC,OAAO,EAAEvB,WAfU;EAgBnBwB,MAAM,EAAEtB,UAhBW;EAiBnBuB,IAAI,EAAErB,SAjBa;EAkBnBsB,GAAG,EAAEnB,GAlBc;EAmBnBoB,IAAI,EAAEtB,SAnBa;EAoBnBuB,MAAM,EAAEnB,UApBW;EAqBnBoB,MAAM,EAAEnB;AArBW,CAAd"}
|
|
@@ -46,11 +46,13 @@ const getButtonContent = (icon, label) => {
|
|
|
46
46
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
47
|
className: _style.default.buttonContent
|
|
48
48
|
}, position === 'left' ? /*#__PURE__*/_react.default.createElement(Icon, {
|
|
49
|
-
className: _style.default.icon
|
|
49
|
+
className: _style.default.icon,
|
|
50
|
+
theme: "coorpmanager"
|
|
50
51
|
}) : null, label ? /*#__PURE__*/_react.default.createElement("span", {
|
|
51
52
|
className: _style.default.label
|
|
52
53
|
}, label) : null, position === 'right' ? /*#__PURE__*/_react.default.createElement(Icon, {
|
|
53
|
-
className: _style.default.icon
|
|
54
|
+
className: _style.default.icon,
|
|
55
|
+
theme: "coorpmanager"
|
|
54
56
|
}) : null);
|
|
55
57
|
};
|
|
56
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","handleOnClick","useCallback","handleOnKeyDown","event","title","propTypes"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, label?: string) => {\n const {type, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n {label ? <span className={style.label}>{label}</span> : null}\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n disabled,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAkBC,KAAlB,KAAqC;EAC5D,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAI,IAAI;IAACE,IAAI,EAAE,EAAP;IAAWC,QAAQ,EAAE;EAArB,CAAjC;EACA,MAAMC,IAAI,GAAGF,IAAI,IAAIG,kBAAA,CAAMH,IAAN,CAArB;;EAEA,IAAI,CAACE,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAML;IAAvB,GAA+BA,KAA/B,CADF,CADF;EAKD;;EAED,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMC;EAAtB,GACGJ,QAAQ,KAAK,MAAb,gBAAsB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;
|
|
1
|
+
{"version":3,"file":"index.js","names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","handleOnClick","useCallback","handleOnKeyDown","event","title","propTypes"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, label?: string) => {\n const {type, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} theme=\"coorpmanager\" /> : null}\n {label ? <span className={style.label}>{label}</span> : null}\n {position === 'right' ? <Icon className={style.icon} theme=\"coorpmanager\" /> : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n disabled,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n t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Pf;IAQE,KAAK,EAAEM,WART;IASE,SAAS,EAAEG,WATb;IAUE,OAAO,EAAEQ,aAVX;IAWE,SAAS,EAAEE,eAXb;IAYE,QAAQ,EAAE;EAZZ,IAcGX,WAdH,CADF;AAkBD,CArED;;AAuEAZ,UAAU,CAAC0B,SAAX,2CAAuBA,cAAvB;eAEe1B,U"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-infos/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-infos/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,cAAc,IAAI,KAAK,EAAY,MAAM,SAAS,CAAC;AAiB3D,QAAA,MAAM,SAAS;sFAOZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBP,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -5,6 +5,8 @@ exports.default = void 0;
|
|
|
5
5
|
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
|
|
8
|
+
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
9
|
+
|
|
8
10
|
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
9
11
|
|
|
10
12
|
var _loader = _interopRequireDefault(require("../../atom/loader"));
|
|
@@ -17,6 +19,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
19
|
|
|
18
20
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
21
|
|
|
22
|
+
const buildIcon = progression => {
|
|
23
|
+
if (progression === undefined) return null;
|
|
24
|
+
if (progression === 100) return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
className: _style.default.icon
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusCheckCircle2, null));
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
className: _style.default.loader
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
30
|
+
theme: "coorpmanager"
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
|
|
20
34
|
const BulkInfos = ({
|
|
21
35
|
mainText,
|
|
22
36
|
subText,
|
|
@@ -32,13 +46,9 @@ const BulkInfos = ({
|
|
|
32
46
|
className: _style.default.img,
|
|
33
47
|
src: imageUrl,
|
|
34
48
|
"aria-hidden": "true"
|
|
35
|
-
}) : null, progression
|
|
36
|
-
className: _style.default.loader
|
|
37
|
-
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
38
|
-
theme: "coorpmanager"
|
|
39
|
-
})) : null), /*#__PURE__*/_react.default.createElement("p", {
|
|
49
|
+
}) : null, buildIcon(progression)), /*#__PURE__*/_react.default.createElement("p", {
|
|
40
50
|
className: _style.default.mainText
|
|
41
|
-
}, `${mainText} ${progression
|
|
51
|
+
}, `${mainText} ${progression === undefined || progression === 100 ? '' : `${progression}%`}`), /*#__PURE__*/_react.default.createElement("p", {
|
|
42
52
|
className: _style.default.subText
|
|
43
53
|
}, subText), /*#__PURE__*/_react.default.createElement("div", {
|
|
44
54
|
className: _style.default.buttonsContainer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["buildIcon","progression","undefined","style","icon","loader","BulkInfos","mainText","subText","imageUrl","firstButtonLink","secondButtonLink","container","header","img","buttonsContainer","buttonContainer","button","propTypes"],"sources":["../../../src/molecule/bulk-infos/index.tsx"],"sourcesContent":["import React from 'react';\nimport {NovaSolidStatusCheckCircle2 as CheckIcon} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\nimport {BulkInfosProps as Props, propTypes} from './types';\n\nconst buildIcon = (progression?: number) => {\n if (progression === undefined) return null;\n if (progression === 100)\n return (\n <div className={style.icon}>\n <CheckIcon />\n </div>\n );\n return (\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n );\n};\n\nconst BulkInfos = ({\n mainText,\n subText,\n imageUrl,\n progression,\n firstButtonLink,\n secondButtonLink\n}: Props) => (\n <div className={style.container}>\n <div className={style.header}>\n {imageUrl && typeof imageUrl === 'string' ? (\n <img className={style.img} src={imageUrl} aria-hidden=\"true\" />\n ) : null}\n {buildIcon(progression)}\n </div>\n <p className={style.mainText}>\n {`${mainText} ${progression === undefined || progression === 100 ? '' : `${progression}%`}`}\n </p>\n <p className={style.subText}>{subText}</p>\n <div className={style.buttonsContainer}>\n {firstButtonLink ? (\n <div className={style.buttonContainer}>\n <ButtonLink {...firstButtonLink} className={style.button} />\n </div>\n ) : null}\n {secondButtonLink ? (\n <div className={style.buttonContainer}>\n <ButtonLink {...secondButtonLink} className={style.button} />\n </div>\n ) : null}\n </div>\n </div>\n);\n\nBulkInfos.propTypes = propTypes;\n\nexport default BulkInfos;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,SAAS,GAAIC,WAAD,IAA0B;EAC1C,IAAIA,WAAW,KAAKC,SAApB,EAA+B,OAAO,IAAP;EAC/B,IAAID,WAAW,KAAK,GAApB,EACE,oBACE;IAAK,SAAS,EAAEE,cAAA,CAAMC;EAAtB,gBACE,6BAAC,sCAAD,OADF,CADF;EAKF,oBACE;IAAK,SAAS,EAAED,cAAA,CAAME;EAAtB,gBACE,6BAAC,eAAD;IAAQ,KAAK,EAAC;EAAd,EADF,CADF;AAKD,CAbD;;AAeA,MAAMC,SAAS,GAAG,CAAC;EACjBC,QADiB;EAEjBC,OAFiB;EAGjBC,QAHiB;EAIjBR,WAJiB;EAKjBS,eALiB;EAMjBC;AANiB,CAAD,kBAQhB;EAAK,SAAS,EAAER,cAAA,CAAMS;AAAtB,gBACE;EAAK,SAAS,EAAET,cAAA,CAAMU;AAAtB,GACGJ,QAAQ,IAAI,OAAOA,QAAP,KAAoB,QAAhC,gBACC;EAAK,SAAS,EAAEN,cAAA,CAAMW,GAAtB;EAA2B,GAAG,EAAEL,QAAhC;EAA0C,eAAY;AAAtD,EADD,GAEG,IAHN,EAIGT,SAAS,CAACC,WAAD,CAJZ,CADF,eAOE;EAAG,SAAS,EAAEE,cAAA,CAAMI;AAApB,GACI,GAAEA,QAAS,IAAGN,WAAW,KAAKC,SAAhB,IAA6BD,WAAW,KAAK,GAA7C,GAAmD,EAAnD,GAAyD,GAAEA,WAAY,GAAG,EAD5F,CAPF,eAUE;EAAG,SAAS,EAAEE,cAAA,CAAMK;AAApB,GAA8BA,OAA9B,CAVF,eAWE;EAAK,SAAS,EAAEL,cAAA,CAAMY;AAAtB,GACGL,eAAe,gBACd;EAAK,SAAS,EAAEP,cAAA,CAAMa;AAAtB,gBACE,6BAAC,mBAAD,eAAgBN,eAAhB;EAAiC,SAAS,EAAEP,cAAA,CAAMc;AAAlD,GADF,CADc,GAIZ,IALN,EAMGN,gBAAgB,gBACf;EAAK,SAAS,EAAER,cAAA,CAAMa;AAAtB,gBACE,6BAAC,mBAAD,eAAgBL,gBAAhB;EAAkC,SAAS,EAAER,cAAA,CAAMc;AAAnD,GADF,CADe,GAIb,IAVN,CAXF,CARF;;AAkCAX,SAAS,CAACY,SAAV,2CAAsBA,gBAAtB;eAEeZ,S"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@value colors: "../../variables/colors.css";
|
|
2
2
|
@value cm_grey_500: from colors;
|
|
3
3
|
@value cm_grey_800: from colors;
|
|
4
|
+
@value cm_green_200: from colors;
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
.container {
|
|
@@ -67,6 +68,12 @@
|
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
.button {
|
|
70
|
-
|
|
71
|
+
min-width: 170px;
|
|
71
72
|
height: 44px;
|
|
72
|
-
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.icon{
|
|
76
|
+
color: cm_green_200;
|
|
77
|
+
height: 50px;
|
|
78
|
+
width: 50px;
|
|
79
|
+
}
|
|
@@ -247,6 +247,7 @@ declare const propTypes: {
|
|
|
247
247
|
emptyStateSecondMessage: PropTypes.Requireable<string>;
|
|
248
248
|
}> | null | undefined>>;
|
|
249
249
|
title: PropTypes.Requireable<string>;
|
|
250
|
+
isFetching: PropTypes.Requireable<boolean>;
|
|
250
251
|
}> | null | undefined>>;
|
|
251
252
|
}>>;
|
|
252
253
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -29,7 +29,7 @@ declare namespace Template {
|
|
|
29
29
|
theme: PropTypes.Requireable<string>;
|
|
30
30
|
'aria-label': PropTypes.Requireable<string>;
|
|
31
31
|
groupAriaLabel: PropTypes.Requireable<string>;
|
|
32
|
-
}, "aria-label" | "
|
|
32
|
+
}, "aria-label" | "theme" | "onChange" | "options" | "groupAriaLabel">>>) | null | undefined)[]>;
|
|
33
33
|
const groupAriaLabel: PropTypes.Requireable<string>;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -57,9 +57,9 @@ const Analytics = (props, context) => {
|
|
|
57
57
|
|
|
58
58
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
59
59
|
className: _style.default.dashboardSelection
|
|
60
|
-
}, (0, _has2.default)('name', selected) ? /*#__PURE__*/_react.default.createElement("h1", {
|
|
60
|
+
}, (0, _has2.default)('name', selected) ? null : /*#__PURE__*/_react.default.createElement("h1", {
|
|
61
61
|
className: _style.default.noSelectedDashboard
|
|
62
|
-
}, translate('No Selected Dashboard'))
|
|
62
|
+
}, translate('No Selected Dashboard')), body());
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
Analytics.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Analytics","props","context","url","error","selected","skin","translate","body","style","dashboardIframe","dashboardNoSelection","color","dashboardSelection","noSelectedDashboard","propTypes","PropTypes","string","shape","name","contextTypes","Provider","childContextTypes","ErrorPopin","onErrorRedirect","ctaLabel","func","isRequired","BrandAnalytics","dashboards","currentDashboard","sidebarItems","length","dashboardContent","arrayOf","href","description","currentVersion","versions","schema","oneOfType","title","type","value","onChange","option","bool","inputParams"],"sources":["../../../src/organism/brand-analytics/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, getOr, has} from 'lodash/fp';\nimport Sidebar from '../sidebar';\nimport Provider from '../../atom/provider';\nimport Loader from '../../template/app-player/loading';\nimport AnalyticsPopin from './analytics-popin';\nimport style from './style.css';\n\nconst Analytics = (props, context) => {\n const {url, error, selected} = props;\n const {skin, translate} = context;\n const body = () => {\n if (selected) {\n if (url) return <iframe src={url} className={style.dashboardIframe} frameBorder=\"0\" />;\n if (!error) return <Loader />;\n }\n if (error) return null;\n\n return (\n <div\n className={style.dashboardNoSelection}\n style={{color: getOr('#00B0FF', 'common.primary', skin)}}\n >\n {translate('Select a dashboard in the Sidebar')}\n </div>\n );\n };\n return (\n <div className={style.dashboardSelection}>\n {has('name', selected) ? (\n <h1 className={style.noSelectedDashboard}>{translate('No Selected Dashboard')}</h1>\n )
|
|
1
|
+
{"version":3,"file":"index.js","names":["Analytics","props","context","url","error","selected","skin","translate","body","style","dashboardIframe","dashboardNoSelection","color","dashboardSelection","noSelectedDashboard","propTypes","PropTypes","string","shape","name","contextTypes","Provider","childContextTypes","ErrorPopin","onErrorRedirect","ctaLabel","func","isRequired","BrandAnalytics","dashboards","currentDashboard","sidebarItems","length","dashboardContent","arrayOf","href","description","currentVersion","versions","schema","oneOfType","title","type","value","onChange","option","bool","inputParams"],"sources":["../../../src/organism/brand-analytics/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, getOr, has} from 'lodash/fp';\nimport Sidebar from '../sidebar';\nimport Provider from '../../atom/provider';\nimport Loader from '../../template/app-player/loading';\nimport AnalyticsPopin from './analytics-popin';\nimport style from './style.css';\n\nconst Analytics = (props, context) => {\n const {url, error, selected} = props;\n const {skin, translate} = context;\n const body = () => {\n if (selected) {\n if (url) return <iframe src={url} className={style.dashboardIframe} frameBorder=\"0\" />;\n if (!error) return <Loader />;\n }\n if (error) return null;\n\n return (\n <div\n className={style.dashboardNoSelection}\n style={{color: getOr('#00B0FF', 'common.primary', skin)}}\n >\n {translate('Select a dashboard in the Sidebar')}\n </div>\n );\n };\n return (\n <div className={style.dashboardSelection}>\n {has('name', selected) ? null : (\n <h1 className={style.noSelectedDashboard}>{translate('No Selected Dashboard')}</h1>\n )}\n {body()}\n </div>\n );\n};\n\nAnalytics.propTypes = {\n url: PropTypes.string,\n error: PropTypes.string,\n selected: PropTypes.shape({\n name: PropTypes.string\n })\n};\n\nAnalytics.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nconst ErrorPopin = ({onErrorRedirect, ctaLabel, error}, {translate}) => {\n return error ? (\n <AnalyticsPopin\n header={translate('An Error Occurred')}\n ctaLabel={ctaLabel}\n ctaOnClick={onErrorRedirect}\n closeOnClick={onErrorRedirect}\n >\n <p>{error}</p>\n </AnalyticsPopin>\n ) : null;\n};\n\nErrorPopin.propTypes = {\n onErrorRedirect: PropTypes.func.isRequired,\n ctaLabel: PropTypes.string.isRequired,\n error: PropTypes.string\n};\n\nErrorPopin.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst BrandAnalytics = (props, context) => {\n const {\n dashboards = [],\n currentDashboard,\n onErrorRedirect = noop,\n url,\n error,\n sidebarItems\n } = props;\n\n const {translate} = context;\n\n if (!dashboards || dashboards.length === 0) {\n if (error)\n return (\n <ErrorPopin\n ctaLabel={translate('Reload')}\n error={error}\n onErrorRedirect={onErrorRedirect}\n />\n );\n return <Loader />;\n }\n\n return (\n <div>\n <Sidebar items={sidebarItems} />\n <div className={style.dashboardContent}>\n <Analytics error={error} selected={currentDashboard} url={url} />\n <ErrorPopin\n ctaLabel={translate('Back to Dashboard Home')}\n error={error}\n onErrorRedirect={onErrorRedirect}\n />\n </div>\n </div>\n );\n};\n\nBrandAnalytics.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nBrandAnalytics.propTypes = {\n dashboards: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n href: PropTypes.string,\n description: PropTypes.string.isRequired\n })\n ),\n currentDashboard: PropTypes.shape({\n name: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n currentVersion: PropTypes.string.isRequired,\n versions: PropTypes.shape({}).isRequired,\n schema: PropTypes.arrayOf(PropTypes.string)\n }),\n sidebarItems: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired\n }),\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n name: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n option: PropTypes.bool.isRequired\n }),\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n name: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func\n })\n ])\n ),\n url: PropTypes.string,\n error: PropTypes.string,\n onErrorRedirect: PropTypes.func,\n inputParams: PropTypes.shape({})\n};\n\nexport default BrandAnalytics;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,SAAS,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACpC,MAAM;IAACC,GAAD;IAAMC,KAAN;IAAaC;EAAb,IAAyBJ,KAA/B;EACA,MAAM;IAACK,IAAD;IAAOC;EAAP,IAAoBL,OAA1B;;EACA,MAAMM,IAAI,GAAG,MAAM;IACjB,IAAIH,QAAJ,EAAc;MACZ,IAAIF,GAAJ,EAAS,oBAAO;QAAQ,GAAG,EAAEA,GAAb;QAAkB,SAAS,EAAEM,cAAA,CAAMC,eAAnC;QAAoD,WAAW,EAAC;MAAhE,EAAP;MACT,IAAI,CAACN,KAAL,EAAY,oBAAO,6BAAC,gBAAD,OAAP;IACb;;IACD,IAAIA,KAAJ,EAAW,OAAO,IAAP;IAEX,oBACE;MACE,SAAS,EAAEK,cAAA,CAAME,oBADnB;MAEE,KAAK,EAAE;QAACC,KAAK,EAAE,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCN,IAA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,EAAE1B,kBAAA,CAAUC,MAAV,CAAiBU,UAFT;IAGdR,IAAI,EAAEH,kBAAA,CAAUC,MAHF;IAId0B,KAAK,EAAE3B,kBAAA,CAAUC,MAJH;IAKd2B,QAAQ,EAAE5B,kBAAA,CAAUU;EALN,CAAhB,CAbkB,CAApB,CADY,CAfW;EAsCzBvB,GAAG,EAAEa,kBAAA,CAAUC,MAtCU;EAuCzBb,KAAK,EAAEY,kBAAA,CAAUC,MAvCQ;EAwCzBO,eAAe,EAAER,kBAAA,CAAUU,IAxCF;EAyCzBqB,WAAW,EAAE/B,kBAAA,CAAUE,KAAV,CAAgB,EAAhB;AAzCY,CAA3B;eA4CeU,c"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export default ListItems;
|
|
2
|
-
declare function ListItems({ title, buttonLink, selectMultiple, content, "aria-label": ariaLabel }: {
|
|
2
|
+
declare function ListItems({ title, buttonLink, selectMultiple, content, "aria-label": ariaLabel, isFetching }: {
|
|
3
3
|
title: any;
|
|
4
4
|
buttonLink: any;
|
|
5
5
|
selectMultiple: any;
|
|
6
6
|
content: any;
|
|
7
7
|
"aria-label": any;
|
|
8
|
+
isFetching: any;
|
|
8
9
|
}): JSX.Element;
|
|
9
10
|
declare namespace ListItems {
|
|
10
11
|
const propTypes: {
|
|
@@ -179,6 +180,7 @@ declare namespace ListItems {
|
|
|
179
180
|
emptyStateSecondMessage: PropTypes.Requireable<string>;
|
|
180
181
|
}> | null | undefined>>;
|
|
181
182
|
title: PropTypes.Requireable<string>;
|
|
183
|
+
isFetching: PropTypes.Requireable<boolean>;
|
|
182
184
|
};
|
|
183
185
|
}
|
|
184
186
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";AA2EA;;;;;;;gBAkCC"}
|
|
@@ -23,6 +23,8 @@ var _selectMultiple = _interopRequireDefault(require("../../molecule/select-mult
|
|
|
23
23
|
|
|
24
24
|
var _expandibleActionableTable = _interopRequireDefault(require("../../molecule/expandible-actionable-table"));
|
|
25
25
|
|
|
26
|
+
var _loader = _interopRequireDefault(require("../../atom/loader"));
|
|
27
|
+
|
|
26
28
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -97,7 +99,8 @@ const ListItems = ({
|
|
|
97
99
|
buttonLink,
|
|
98
100
|
selectMultiple,
|
|
99
101
|
content,
|
|
100
|
-
'aria-label': ariaLabel
|
|
102
|
+
'aria-label': ariaLabel,
|
|
103
|
+
isFetching
|
|
101
104
|
}) => {
|
|
102
105
|
const contentView = buildContentView(content, ariaLabel, selectMultiple);
|
|
103
106
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -112,7 +115,12 @@ const ListItems = ({
|
|
|
112
115
|
className: _style.default.actionsWrapper
|
|
113
116
|
}, selectMultiple ? /*#__PURE__*/_react.default.createElement("div", {
|
|
114
117
|
className: _style.default.selectMultiple
|
|
115
|
-
}, /*#__PURE__*/_react.default.createElement(_selectMultiple.default, selectMultiple)) : null, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonLink))),
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement(_selectMultiple.default, selectMultiple)) : null, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonLink))), isFetching ? /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
+
className: _style.default.loaderContainer
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
121
|
+
className: _style.default.loader,
|
|
122
|
+
theme: "coorpmanager"
|
|
123
|
+
})) : contentView);
|
|
116
124
|
};
|
|
117
125
|
|
|
118
126
|
ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -129,7 +137,8 @@ ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
129
137
|
}), _propTypes.default.shape(_extends({}, _expandibleActionableTable.default.propTypes, {
|
|
130
138
|
type: _propTypes.default.oneOf(['expandible-actionable-table'])
|
|
131
139
|
}))]),
|
|
132
|
-
title: _propTypes.default.string
|
|
140
|
+
title: _propTypes.default.string,
|
|
141
|
+
isFetching: _propTypes.default.bool
|
|
133
142
|
} : {};
|
|
134
143
|
var _default = ListItems;
|
|
135
144
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["buildListItemsView","content","ariaLabel","selectMultiple","items","itemType","onDrop","isDraggable","tableHeader","itemsView","length","map","item","contentType","index","id","style","tableHeaderView","isNil","isEmpty","tableHeaderWrapper","dataColumnsWrapper","tableHeaderItem","flexGrow","flexShrink","flexBasis","settings","list","listWithSelectMultiple","buildContentView","type","ListItems","title","buttonLink","contentView","header","actionsWrapper","propTypes","PropTypes","string","shape","ButtonLink","SelectMultiple","oneOfType","arrayOf","ListItem","oneOf","func","bool","ExpandibleActionableTable"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isNil from 'lodash/fp/isNil';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport ListItem from '../list-item';\nimport DraggableList from '../../molecule/draggable-list';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport ExpandibleActionableTable from '../../molecule/expandible-actionable-table';\nimport style from './style.css';\n\nconst buildListItemsView = (content, ariaLabel, selectMultiple) => {\n const {items, itemType, onDrop, isDraggable = false, tableHeader} = content;\n const itemsView =\n isDraggable && items.length > 1 ? (\n <DraggableList\n items={items.map(item => ({...item, contentType: itemType}))}\n itemType=\"list-item\"\n onDrop={onDrop}\n />\n ) : (\n items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={null} contentType={itemType} />\n </li>\n ))\n );\n const tableHeaderView =\n !isNil(tableHeader) && !isEmpty(tableHeader) ? (\n <div className={style.tableHeaderWrapper}>\n <div className={style.dataColumnsWrapper}>\n {tableHeader.map((tableHeaderItem, index) => (\n <div\n key={`tableHeadeColumn-key-${index}`}\n className={style.tableHeaderItem}\n data-name={`tableHeader-${index}`}\n style={\n index === 0\n ? {flexGrow: 2, flexShrink: 0, flexBasis: 0}\n : {flexGrow: 1, flexShrink: 0, flexBasis: 0}\n }\n >\n {tableHeaderItem}\n </div>\n ))}\n </div>\n <div className={style.settings}>{''}</div>\n </div>\n ) : null;\n return (\n <div>\n {tableHeaderView}\n <ul\n className={!selectMultiple ? style.list : style.listWithSelectMultiple}\n aria-label={ariaLabel}\n data-name={'content-list'}\n >\n {itemsView}\n </ul>\n </div>\n );\n};\n\nconst buildContentView = (content, ariaLabel, selectMultiple) => {\n const {type} = content;\n switch (type) {\n case 'list':\n return buildListItemsView(content, ariaLabel, selectMultiple);\n case 'expandible-actionable-table':\n return <ExpandibleActionableTable {...content} />;\n }\n};\n\nconst ListItems = ({title
|
|
1
|
+
{"version":3,"file":"index.js","names":["buildListItemsView","content","ariaLabel","selectMultiple","items","itemType","onDrop","isDraggable","tableHeader","itemsView","length","map","item","contentType","index","id","style","tableHeaderView","isNil","isEmpty","tableHeaderWrapper","dataColumnsWrapper","tableHeaderItem","flexGrow","flexShrink","flexBasis","settings","list","listWithSelectMultiple","buildContentView","type","ListItems","title","buttonLink","isFetching","contentView","header","actionsWrapper","loaderContainer","loader","propTypes","PropTypes","string","shape","ButtonLink","SelectMultiple","oneOfType","arrayOf","ListItem","oneOf","func","bool","ExpandibleActionableTable"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isNil from 'lodash/fp/isNil';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport ListItem from '../list-item';\nimport DraggableList from '../../molecule/draggable-list';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport ExpandibleActionableTable from '../../molecule/expandible-actionable-table';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildListItemsView = (content, ariaLabel, selectMultiple) => {\n const {items, itemType, onDrop, isDraggable = false, tableHeader} = content;\n const itemsView =\n isDraggable && items.length > 1 ? (\n <DraggableList\n items={items.map(item => ({...item, contentType: itemType}))}\n itemType=\"list-item\"\n onDrop={onDrop}\n />\n ) : (\n items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={null} contentType={itemType} />\n </li>\n ))\n );\n const tableHeaderView =\n !isNil(tableHeader) && !isEmpty(tableHeader) ? (\n <div className={style.tableHeaderWrapper}>\n <div className={style.dataColumnsWrapper}>\n {tableHeader.map((tableHeaderItem, index) => (\n <div\n key={`tableHeadeColumn-key-${index}`}\n className={style.tableHeaderItem}\n data-name={`tableHeader-${index}`}\n style={\n index === 0\n ? {flexGrow: 2, flexShrink: 0, flexBasis: 0}\n : {flexGrow: 1, flexShrink: 0, flexBasis: 0}\n }\n >\n {tableHeaderItem}\n </div>\n ))}\n </div>\n <div className={style.settings}>{''}</div>\n </div>\n ) : null;\n return (\n <div>\n {tableHeaderView}\n <ul\n className={!selectMultiple ? style.list : style.listWithSelectMultiple}\n aria-label={ariaLabel}\n data-name={'content-list'}\n >\n {itemsView}\n </ul>\n </div>\n );\n};\n\nconst buildContentView = (content, ariaLabel, selectMultiple) => {\n const {type} = content;\n switch (type) {\n case 'list':\n return buildListItemsView(content, ariaLabel, selectMultiple);\n case 'expandible-actionable-table':\n return <ExpandibleActionableTable {...content} />;\n }\n};\n\nconst ListItems = ({\n title,\n buttonLink,\n selectMultiple,\n content,\n 'aria-label': ariaLabel,\n isFetching\n}) => {\n const contentView = buildContentView(content, ariaLabel, selectMultiple);\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.actionsWrapper}>\n {selectMultiple ? (\n <div className={style.selectMultiple}>\n <SelectMultiple {...selectMultiple} />\n </div>\n ) : null}\n\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n {isFetching ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n contentView\n )}\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n selectMultiple: PropTypes.shape(SelectMultiple.propTypes),\n content: PropTypes.oneOfType([\n PropTypes.shape({\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n type: PropTypes.oneOf(['list']),\n itemType: PropTypes.string,\n onDrop: PropTypes.func,\n isDraggable: PropTypes.bool,\n tableHeader: PropTypes.arrayOf(PropTypes.string)\n }),\n PropTypes.shape({\n ...ExpandibleActionableTable.propTypes,\n type: PropTypes.oneOf(['expandible-actionable-table'])\n })\n ]),\n title: PropTypes.string,\n isFetching: PropTypes.bool\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,kBAAkB,GAAG,CAACC,OAAD,EAAUC,SAAV,EAAqBC,cAArB,KAAwC;EACjE,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBC,MAAlB;IAA0BC,WAAW,GAAG,KAAxC;IAA+CC;EAA/C,IAA8DP,OAApE;EACA,MAAMQ,SAAS,GACbF,WAAW,IAAIH,KAAK,CAACM,MAAN,GAAe,CAA9B,gBACE,6BAAC,sBAAD;IACE,KAAK,EAAEN,KAAK,CAACO,GAAN,CAAUC,IAAI,iBAASA,IAAT;MAAeC,WAAW,EAAER;IAA5B,EAAd,CADT;IAEE,QAAQ,EAAC,WAFX;IAGE,MAAM,EAAE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KAAV,CAAgBC,mBAAA,CAAWJ,SAA3B,CAFQ;EAGpBrC,cAAc,EAAEsC,kBAAA,CAAUE,KAAV,CAAgBE,uBAAA,CAAeL,SAA/B,CAHI;EAIpBvC,OAAO,EAAEwC,kBAAA,CAAUK,SAAV,CAAoB,CAC3BL,kBAAA,CAAUE,KAAV,CAAgB;IACdvC,KAAK,EAAEqC,kBAAA,CAAUM,OAAV,CAAkBN,kBAAA,CAAUE,KAAV,CAAgBK,iBAAA,CAASR,SAAzB,CAAlB,CADO;IAEdV,IAAI,EAAEW,kBAAA,CAAUQ,KAAV,CAAgB,CAAC,MAAD,CAAhB,CAFQ;IAGd5C,QAAQ,EAAEoC,kBAAA,CAAUC,MAHN;IAIdpC,MAAM,EAAEmC,kBAAA,CAAUS,IAJJ;IAKd3C,WAAW,EAAEkC,kBAAA,CAAUU,IALT;IAMd3C,WAAW,EAAEiC,kBAAA,CAAUM,OAAV,CAAkBN,kBAAA,CAAUC,MAA5B;EANC,CAAhB,CAD2B,EAS3BD,kBAAA,CAAUE,KAAV,cACKS,kCAAA,CAA0BZ,SAD/B;IAEEV,IAAI,EAAEW,kBAAA,CAAUQ,KAAV,CAAgB,CAAC,6BAAD,CAAhB;EAFR,GAT2B,CAApB,CAJW;EAkBpBjB,KAAK,EAAES,kBAAA,CAAUC,MAlBG;EAmBpBR,UAAU,EAAEO,kBAAA,CAAUU;AAnBF,CAAtB;eAsBepB,S"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/wizard-contents/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/wizard-contents/index.js"],"names":[],"mappings":";AA+IA,yDAqCC"}
|
|
@@ -64,7 +64,7 @@ const buildHeader = (wizardHeader, actions, steps, tabs) => {
|
|
|
64
64
|
"data-name": 'content-title'
|
|
65
65
|
}, title)), actions ? /*#__PURE__*/_react.default.createElement("div", {
|
|
66
66
|
className: _style.default.actionsWrapper
|
|
67
|
-
}, /*#__PURE__*/_react.default.createElement(_bulletPointMenuButton.default, actions.bulletPointMenuButton), /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
+
}, actions.bulletPointMenuButton ? /*#__PURE__*/_react.default.createElement(_bulletPointMenuButton.default, actions.bulletPointMenuButton) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
68
68
|
className: _style.default.buttonLink
|
|
69
69
|
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, actions.firstButtonLink)), /*#__PURE__*/_react.default.createElement("div", {
|
|
70
70
|
className: _style.default.buttonLink
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["buildHeader","wizardHeader","actions","steps","tabs","title","onClick","buttonCloseIcon","size","icon","style","header","titleWrapper","headerTitle","actionsWrapper","bulletPointMenuButton","buttonLink","firstButtonLink","secondButtonLink","buildView","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","getOr","nextButton","actionZone","button","THEMES","container","containerWithoutSummary","footer","footerWithoutSummary","actionFooter","actionFooterWithoutSummary","leftSection","leftSectionWithoutSummary","summary","getTheme","WizardContents","props","isLoading","headerView","view","rightActionView","footerActionView","currentStyle","summaryWrapper","rightSection","stickySection","summaryZone","form","summaryFooter","propTypes","PropTypes","bool","shape","string","func","isRequired","buttonAriaLabel","menuAriaLabel","buttons","arrayOf","ButtonLink","WizardSteps","BrandTabs","WizardSummary","oneOfType","BrandForm","oneOf","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","RewardsForm","ExpandibleActionableErrorsTable","BulkInfos"],"sources":["../../../src/organism/wizard-contents/index.js"],"sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport BrandTabs from '../../molecule/brand-tabs';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport RewardsForm from '../rewards-form';\nimport ExpandibleActionableErrorsTable from '../../molecule/expandible-actionable-table';\nimport BulkInfos from '../../molecule/bulk-infos';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, actions, steps, tabs) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.titleWrapper}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'content-title'}>\n {title}\n </div>\n </div>\n {actions ? (\n <div className={style.actionsWrapper}>\n <BulletPointMenuButton {...actions.bulletPointMenuButton} />\n <div className={style.buttonLink}>\n <ButtonLink {...actions.firstButtonLink} />\n </div>\n <div className={style.buttonLink}>\n <ButtonLink {...actions.secondButtonLink} />\n </div>\n </div>\n ) : null}\n </div>\n {steps ? <WizardSteps steps={steps} /> : null}\n {tabs ? (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={tabs} />\n </div>\n ) : null}\n </div>\n );\n};\n\nconst buildView = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n case 'rewards':\n return <RewardsForm {...content} />;\n case 'expandible-table':\n return <ExpandibleActionableErrorsTable {...content} />;\n case 'upload-progression':\n return <BulkInfos {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst THEMES = {\n 'no-summary': {\n container: style.containerWithoutSummary,\n footer: style.footerWithoutSummary,\n actionFooter: style.actionFooterWithoutSummary,\n leftSection: style.leftSectionWithoutSummary\n },\n summary: {\n container: style.container,\n footer: style.footer,\n actionFooter: style.actionFooter,\n leftSection: style.leftSection\n }\n};\n\nconst getTheme = summary => (summary ? 'summary' : 'no-summary');\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, actions, steps, tabs, summary, content, nextStep, previousStep} =\n props;\n const headerView = buildHeader(wizardHeader, actions, steps, tabs);\n const view = buildView({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n const currentStyle = THEMES[getTheme(summary)];\n\n const summaryWrapper = (\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n );\n\n return (\n <div className={currentStyle.container} data-name=\"content-summary\">\n <div className={currentStyle.leftSection}>\n {headerView}\n <div className={style.form}>{view}</div>\n </div>\n {summary ? summaryWrapper : null}\n <div className={currentStyle.footer} data-name=\"footer-section\">\n {summary ? (\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n ) : null}\n <div className={currentStyle.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n actions: PropTypes.shape({\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n firstButtonLink: PropTypes.shape(ButtonLink.propTypes),\n secondButtonLink: PropTypes.shape(ButtonLink.propTypes)\n }),\n steps: WizardSteps.propTypes.steps,\n tabs: BrandTabs.propTypes.tabs,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }),\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n }),\n PropTypes.shape({\n ...RewardsForm.propTypes,\n type: PropTypes.oneOf(['rewards'])\n }),\n PropTypes.shape({\n ...ExpandibleActionableErrorsTable.propTypes,\n type: PropTypes.oneOf(['expandible-table'])\n }),\n PropTypes.shape({\n ...BulkInfos.propTypes,\n type: PropTypes.oneOf(['upload-progression'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAW,GAAG,CAACC,YAAD,EAAeC,OAAf,EAAwBC,KAAxB,EAA+BC,IAA/B,KAAwC;EAC1D,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAmBL,YAAzB;EAEA,MAAMM,eAAe,GAAG;IACtBC,IAAI,EAAE,OADgB;IAEtB,aAAa,cAFS;IAGtB,cAAc,cAHQ;IAItBC,IAAI,EAAE,OAJgB;IAKtBH;EALsB,CAAxB;EAQA,oBACE,uDACE;IAAK,SAAS,EAAEI,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,CAAME;EAAtB,gBACE,6BAAC,2BAAD,EAAwBL,eAAxB,CADF,eAEE;IAAK,SAAS,EAAEG,cAAA,CAAMG,WAAtB;IAAmC,aAAW;EAA9C,GACGR,KADH,CAFF,CADF,EAOGH,OAAO,gBACN;IAAK,SAAS,EAAEQ,cAAA,CAAMI;EAAtB,gBACE,6BAAC,8BAAD,EAA2BZ,OAAO,CAACa,qBAAnC,CADF,eAEE;IAAK,SAAS,EAAEL,cAAA,CAAMM;EAAtB,gBACE,6BAAC,mBAAD,EAAgBd,OAAO,CAACe,eAAxB,CADF,CAFF,eAKE;IAAK,SAAS,EAAEP,cAAA,CAAMM;EAAtB,gBACE,6BAAC,mBAAD,EAAgBd,OAAO,CAACgB,gBAAxB,CADF,CALF,CADM,GAUJ,IAjBN,CADF,EAoBGf,KAAK,gBAAG,6BAAC,oBAAD;IAAa,KAAK,EAAEA;EAApB,EAAH,GAAmC,IApB3C,EAqBGC,IAAI,gB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AhB;EAFR,GAzB2B,EA6B3BhB,kBAAA,CAAUE,KAAV,cACKqB,kBAAA,CAAUxB,SADf;IAEE7C,IAAI,EAAE8C,kBAAA,CAAUgB,KAAV,CAAgB,CAAC,oBAAD,CAAhB;EAFR,GA7B2B,CAApB,CA5BgB;EA8DzBlD,YAAY,EAAEkC,kBAAA,CAAUE,KAAV,CAAgB;IAC5BvC,KAAK,EAAEqC,kBAAA,CAAUG,MADW;IAE5BhE,OAAO,EAAE6D,kBAAA,CAAUI;EAFS,CAAhB,CA9DW;EAkEzBrC,QAAQ,EAAEiC,kBAAA,CAAUE,KAAV,CAAgB;IACxBhD,IAAI,EAAE8C,kBAAA,CAAUgB,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;IAExBrD,KAAK,EAAEqC,kBAAA,CAAUG,MAFO;IAGxBhE,OAAO,EAAE6D,kBAAA,CAAUI;EAHK,CAAhB;AAlEe,CAA3B;eAyEenB,c"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["buildHeader","wizardHeader","actions","steps","tabs","title","onClick","buttonCloseIcon","size","icon","style","header","titleWrapper","headerTitle","actionsWrapper","bulletPointMenuButton","buttonLink","firstButtonLink","secondButtonLink","buildView","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","getOr","nextButton","actionZone","button","THEMES","container","containerWithoutSummary","footer","footerWithoutSummary","actionFooter","actionFooterWithoutSummary","leftSection","leftSectionWithoutSummary","summary","getTheme","WizardContents","props","isLoading","headerView","view","rightActionView","footerActionView","currentStyle","summaryWrapper","rightSection","stickySection","summaryZone","form","summaryFooter","propTypes","PropTypes","bool","shape","string","func","isRequired","buttonAriaLabel","menuAriaLabel","buttons","arrayOf","ButtonLink","WizardSteps","BrandTabs","WizardSummary","oneOfType","BrandForm","oneOf","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","RewardsForm","ExpandibleActionableErrorsTable","BulkInfos"],"sources":["../../../src/organism/wizard-contents/index.js"],"sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport BrandTabs from '../../molecule/brand-tabs';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport RewardsForm from '../rewards-form';\nimport ExpandibleActionableErrorsTable from '../../molecule/expandible-actionable-table';\nimport BulkInfos from '../../molecule/bulk-infos';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, actions, steps, tabs) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.titleWrapper}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'content-title'}>\n {title}\n </div>\n </div>\n {actions ? (\n <div className={style.actionsWrapper}>\n {actions.bulletPointMenuButton ? (\n <BulletPointMenuButton {...actions.bulletPointMenuButton} />\n ) : null}\n <div className={style.buttonLink}>\n <ButtonLink {...actions.firstButtonLink} />\n </div>\n <div className={style.buttonLink}>\n <ButtonLink {...actions.secondButtonLink} />\n </div>\n </div>\n ) : null}\n </div>\n {steps ? <WizardSteps steps={steps} /> : null}\n {tabs ? (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={tabs} />\n </div>\n ) : null}\n </div>\n );\n};\n\nconst buildView = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n case 'rewards':\n return <RewardsForm {...content} />;\n case 'expandible-table':\n return <ExpandibleActionableErrorsTable {...content} />;\n case 'upload-progression':\n return <BulkInfos {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst THEMES = {\n 'no-summary': {\n container: style.containerWithoutSummary,\n footer: style.footerWithoutSummary,\n actionFooter: style.actionFooterWithoutSummary,\n leftSection: style.leftSectionWithoutSummary\n },\n summary: {\n container: style.container,\n footer: style.footer,\n actionFooter: style.actionFooter,\n leftSection: style.leftSection\n }\n};\n\nconst getTheme = summary => (summary ? 'summary' : 'no-summary');\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, actions, steps, tabs, summary, content, nextStep, previousStep} =\n props;\n const headerView = buildHeader(wizardHeader, actions, steps, tabs);\n const view = buildView({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n const currentStyle = THEMES[getTheme(summary)];\n\n const summaryWrapper = (\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n );\n\n return (\n <div className={currentStyle.container} data-name=\"content-summary\">\n <div className={currentStyle.leftSection}>\n {headerView}\n <div className={style.form}>{view}</div>\n </div>\n {summary ? summaryWrapper : null}\n <div className={currentStyle.footer} data-name=\"footer-section\">\n {summary ? (\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n ) : null}\n <div className={currentStyle.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n actions: PropTypes.shape({\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n firstButtonLink: PropTypes.shape(ButtonLink.propTypes),\n secondButtonLink: PropTypes.shape(ButtonLink.propTypes)\n }),\n steps: WizardSteps.propTypes.steps,\n tabs: BrandTabs.propTypes.tabs,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }),\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n }),\n PropTypes.shape({\n ...RewardsForm.propTypes,\n type: PropTypes.oneOf(['rewards'])\n }),\n PropTypes.shape({\n ...ExpandibleActionableErrorsTable.propTypes,\n type: PropTypes.oneOf(['expandible-table'])\n }),\n PropTypes.shape({\n ...BulkInfos.propTypes,\n type: PropTypes.oneOf(['upload-progression'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAW,GAAG,CAACC,YAAD,EAAeC,OAAf,EAAwBC,KAAxB,EAA+BC,IAA/B,KAAwC;EAC1D,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAmBL,YAAzB;EAEA,MAAMM,eAAe,GAAG;IACtBC,IAAI,EAAE,OADgB;IAEtB,aAAa,cAFS;IAGtB,cAAc,cAHQ;IAItBC,IAAI,EAAE,OAJgB;IAKtBH;EALsB,CAAxB;EAQA,oBACE,uDACE;IAAK,SAAS,EAAEI,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,CAAME;EAAtB,gBACE,6BAAC,2BAAD,EAAwBL,eAAxB,CADF,eAEE;IAAK,SAAS,EAAEG,cAAA,CAAMG,WAAtB;IAAmC,aAAW;EAA9C,GACGR,KADH,CAFF,CADF,EAOGH,OAAO,gBACN;IAAK,SAAS,EAAEQ,cAAA,CAAMI;EAAtB,GACGZ,OAAO,CAACa,qBAAR,gBACC,6BAAC,8BAAD,EAA2Bb,OAAO,CAACa,qBAAnC,CADD,GAEG,IAHN,eAIE;IAAK,SAAS,EAAEL,cAAA,CAAMM;EAAtB,gBACE,6BAAC,mBAAD,EAAgBd,OAAO,CAAC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