@coorpacademy/components 11.20.6 → 11.21.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/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +9 -5
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +23 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +10 -2
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/organism/list-item/style.css +0 -1
- package/es/template/app-player/loading/index.d.ts +21 -0
- package/es/template/app-player/player/index.d.ts +42 -0
- package/es/template/app-player/player/slides/index.d.ts +21 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +21 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +21 -0
- package/es/template/app-review/index.d.ts +21 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +21 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +21 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +21 -0
- package/es/template/common/dashboard/index.d.ts +42 -0
- package/es/template/common/search-page/index.d.ts +21 -0
- package/es/template/external-course/index.d.ts +21 -0
- package/es/util/button-icons.d.ts +1 -0
- package/es/util/button-icons.d.ts.map +1 -1
- package/es/util/button-icons.js +3 -2
- package/es/util/button-icons.js.map +1 -1
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +9 -4
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +23 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +13 -2
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/organism/list-item/style.css +0 -1
- package/lib/template/app-player/loading/index.d.ts +21 -0
- package/lib/template/app-player/player/index.d.ts +42 -0
- package/lib/template/app-player/player/slides/index.d.ts +21 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +21 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +21 -0
- package/lib/template/app-review/index.d.ts +21 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +21 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +21 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +21 -0
- package/lib/template/common/dashboard/index.d.ts +42 -0
- package/lib/template/common/search-page/index.d.ts +21 -0
- package/lib/template/external-course/index.d.ts +21 -0
- package/lib/util/button-icons.d.ts +1 -0
- package/lib/util/button-icons.d.ts.map +1 -1
- package/lib/util/button-icons.js +2 -1
- package/lib/util/button-icons.js.map +1 -1
- package/locales/.mtslconfig.json +1 -0
- package/package.json +3 -3
|
@@ -546,6 +546,10 @@ declare const propTypes: {
|
|
|
546
546
|
'aria-label': PropTypes.Requireable<string>;
|
|
547
547
|
largeButton: PropTypes.Requireable<boolean>;
|
|
548
548
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
549
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
550
|
+
position: PropTypes.Requireable<string>;
|
|
551
|
+
type: PropTypes.Requireable<string>;
|
|
552
|
+
}>>;
|
|
549
553
|
}>>;
|
|
550
554
|
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
551
555
|
label: PropTypes.Requireable<string>;
|
|
@@ -758,6 +762,23 @@ declare const propTypes: {
|
|
|
758
762
|
title: PropTypes.Requireable<string>;
|
|
759
763
|
}> | null | undefined>>;
|
|
760
764
|
}>>;
|
|
765
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
766
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
767
|
+
className: PropTypes.Requireable<string>;
|
|
768
|
+
href: PropTypes.Requireable<string>;
|
|
769
|
+
'data-name': PropTypes.Requireable<string>;
|
|
770
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
771
|
+
title: PropTypes.Requireable<string>;
|
|
772
|
+
target: PropTypes.Requireable<string>;
|
|
773
|
+
skinHover: PropTypes.Requireable<boolean>;
|
|
774
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
775
|
+
download: PropTypes.Requireable<boolean>;
|
|
776
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
777
|
+
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
778
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
779
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
780
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
781
|
+
}>>;
|
|
761
782
|
}>>;
|
|
762
783
|
}>>;
|
|
763
784
|
};
|
|
@@ -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":["../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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -736,6 +736,10 @@ declare namespace BrandUpdate {
|
|
|
736
736
|
'aria-label': PropTypes.Requireable<string>;
|
|
737
737
|
largeButton: PropTypes.Requireable<boolean>;
|
|
738
738
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
739
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
740
|
+
position: PropTypes.Requireable<string>;
|
|
741
|
+
type: PropTypes.Requireable<string>;
|
|
742
|
+
}>>;
|
|
739
743
|
}>>;
|
|
740
744
|
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
741
745
|
label: PropTypes.Requireable<string>;
|
|
@@ -948,6 +952,23 @@ declare namespace BrandUpdate {
|
|
|
948
952
|
title: PropTypes.Requireable<string>;
|
|
949
953
|
}> | null | undefined>>;
|
|
950
954
|
}>>;
|
|
955
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
956
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
957
|
+
className: PropTypes.Requireable<string>;
|
|
958
|
+
href: PropTypes.Requireable<string>;
|
|
959
|
+
'data-name': PropTypes.Requireable<string>;
|
|
960
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
961
|
+
title: PropTypes.Requireable<string>;
|
|
962
|
+
target: PropTypes.Requireable<string>;
|
|
963
|
+
skinHover: PropTypes.Requireable<boolean>;
|
|
964
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
965
|
+
download: PropTypes.Requireable<boolean>;
|
|
966
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
967
|
+
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
968
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
969
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
970
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
971
|
+
}>>;
|
|
951
972
|
}>>;
|
|
952
973
|
export const details: PropTypes.Requireable<PropTypes.InferProps<{
|
|
953
974
|
key: PropTypes.Requireable<string>;
|
|
@@ -35,6 +35,10 @@ declare namespace Dashboard {
|
|
|
35
35
|
'aria-label': PropTypes.Requireable<string>;
|
|
36
36
|
largeButton: PropTypes.Requireable<boolean>;
|
|
37
37
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
38
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
39
|
+
position: PropTypes.Requireable<string>;
|
|
40
|
+
type: PropTypes.Requireable<string>;
|
|
41
|
+
}>>;
|
|
38
42
|
}>>;
|
|
39
43
|
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
40
44
|
label: PropTypes.Requireable<string>;
|
|
@@ -247,6 +251,23 @@ declare namespace Dashboard {
|
|
|
247
251
|
title: PropTypes.Requireable<string>;
|
|
248
252
|
}> | null | undefined>>;
|
|
249
253
|
}>>;
|
|
254
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
255
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
256
|
+
className: PropTypes.Requireable<string>;
|
|
257
|
+
href: PropTypes.Requireable<string>;
|
|
258
|
+
'data-name': PropTypes.Requireable<string>;
|
|
259
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
260
|
+
title: PropTypes.Requireable<string>;
|
|
261
|
+
target: PropTypes.Requireable<string>;
|
|
262
|
+
skinHover: PropTypes.Requireable<boolean>;
|
|
263
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
264
|
+
download: PropTypes.Requireable<boolean>;
|
|
265
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
266
|
+
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
267
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
268
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
269
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
270
|
+
}>>;
|
|
250
271
|
}>>;
|
|
251
272
|
'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
252
273
|
showMoreOnLeftAriaLabel: PropTypes.Requireable<string>;
|
|
@@ -282,6 +303,10 @@ declare namespace Dashboard {
|
|
|
282
303
|
'aria-label': PropTypes.Requireable<string>;
|
|
283
304
|
largeButton: PropTypes.Requireable<boolean>;
|
|
284
305
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
306
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
307
|
+
position: PropTypes.Requireable<string>;
|
|
308
|
+
type: PropTypes.Requireable<string>;
|
|
309
|
+
}>>;
|
|
285
310
|
}>>;
|
|
286
311
|
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
287
312
|
label: PropTypes.Requireable<string>;
|
|
@@ -494,6 +519,23 @@ declare namespace Dashboard {
|
|
|
494
519
|
title: PropTypes.Requireable<string>;
|
|
495
520
|
}> | null | undefined>>;
|
|
496
521
|
}>>;
|
|
522
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
523
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
524
|
+
className: PropTypes.Requireable<string>;
|
|
525
|
+
href: PropTypes.Requireable<string>;
|
|
526
|
+
'data-name': PropTypes.Requireable<string>;
|
|
527
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
528
|
+
title: PropTypes.Requireable<string>;
|
|
529
|
+
target: PropTypes.Requireable<string>;
|
|
530
|
+
skinHover: PropTypes.Requireable<boolean>;
|
|
531
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
532
|
+
download: PropTypes.Requireable<boolean>;
|
|
533
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
534
|
+
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
535
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
536
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
537
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
538
|
+
}>>;
|
|
497
539
|
}>>;
|
|
498
540
|
};
|
|
499
541
|
}
|
|
@@ -207,6 +207,10 @@ declare namespace SearchPage {
|
|
|
207
207
|
'aria-label': PropTypes.Requireable<string>;
|
|
208
208
|
largeButton: PropTypes.Requireable<boolean>;
|
|
209
209
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
210
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
211
|
+
position: PropTypes.Requireable<string>;
|
|
212
|
+
type: PropTypes.Requireable<string>;
|
|
213
|
+
}>>;
|
|
210
214
|
}>>;
|
|
211
215
|
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
212
216
|
label: PropTypes.Requireable<string>;
|
|
@@ -419,6 +423,23 @@ declare namespace SearchPage {
|
|
|
419
423
|
title: PropTypes.Requireable<string>;
|
|
420
424
|
}> | null | undefined>>;
|
|
421
425
|
}>>;
|
|
426
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
427
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
428
|
+
className: PropTypes.Requireable<string>;
|
|
429
|
+
href: PropTypes.Requireable<string>;
|
|
430
|
+
'data-name': PropTypes.Requireable<string>;
|
|
431
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
432
|
+
title: PropTypes.Requireable<string>;
|
|
433
|
+
target: PropTypes.Requireable<string>;
|
|
434
|
+
skinHover: PropTypes.Requireable<boolean>;
|
|
435
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
436
|
+
download: PropTypes.Requireable<boolean>;
|
|
437
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
438
|
+
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
439
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
440
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
441
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
442
|
+
}>>;
|
|
422
443
|
}>>;
|
|
423
444
|
}
|
|
424
445
|
}
|
|
@@ -52,6 +52,10 @@ declare namespace ExternalCourse {
|
|
|
52
52
|
'aria-label': PropTypes.Requireable<string>;
|
|
53
53
|
largeButton: PropTypes.Requireable<boolean>;
|
|
54
54
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
55
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
56
|
+
position: PropTypes.Requireable<string>;
|
|
57
|
+
type: PropTypes.Requireable<string>;
|
|
58
|
+
}>>;
|
|
55
59
|
}>>;
|
|
56
60
|
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
57
61
|
label: PropTypes.Requireable<string>;
|
|
@@ -264,6 +268,23 @@ declare namespace ExternalCourse {
|
|
|
264
268
|
title: PropTypes.Requireable<string>;
|
|
265
269
|
}> | null | undefined>>;
|
|
266
270
|
}>>;
|
|
271
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
272
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
273
|
+
className: PropTypes.Requireable<string>;
|
|
274
|
+
href: PropTypes.Requireable<string>;
|
|
275
|
+
'data-name': PropTypes.Requireable<string>;
|
|
276
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
277
|
+
title: PropTypes.Requireable<string>;
|
|
278
|
+
target: PropTypes.Requireable<string>;
|
|
279
|
+
skinHover: PropTypes.Requireable<boolean>;
|
|
280
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
281
|
+
download: PropTypes.Requireable<boolean>;
|
|
282
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
283
|
+
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
284
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
285
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
286
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
287
|
+
}>>;
|
|
267
288
|
}>>;
|
|
268
289
|
}
|
|
269
290
|
namespace contextTypes {
|
|
@@ -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":"AAuBA;;;;;;;;;;;;;;;;;;;;;EAqBE"}
|
package/es/util/button-icons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 } from '@coorpacademy/nova-icons';
|
|
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
2
|
export const ICONS = {
|
|
3
3
|
add: AddIcon,
|
|
4
4
|
analytics: AnalyticsIcon,
|
|
@@ -18,6 +18,7 @@ export const ICONS = {
|
|
|
18
18
|
upload: UploadIcon,
|
|
19
19
|
down: ArrowDown,
|
|
20
20
|
pdf: PDF,
|
|
21
|
-
back: ArrowLeft
|
|
21
|
+
back: ArrowLeft,
|
|
22
|
+
delete: DeleteIcon
|
|
22
23
|
};
|
|
23
24
|
//# 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","ICONS","add","analytics","bin","close","edit","key","list","logout","publish","save","see","folders","upload","down","pdf","back"],"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} 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};\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,
|
|
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;AAuBA,OAAO,MAAMC,KAAK,GAAG;EACnBC,GAAG,EAAEvC,OADc;EAEnBwC,SAAS,EAAEtC,aAFQ;EAGnBuC,GAAG,EAAErC,OAHc;EAInB,gBAAgBE,eAJG;EAKnB,gBAAgBE,eALG;EAMnB,iBAAiBE,gBANE;EAOnBgC,KAAK,EAAE9B,SAPY;EAQnB+B,IAAI,EAAE7B,QARa;EASnB8B,GAAG,EAAElB,OATc;EAUnBmB,IAAI,EAAE3B,QAVa;EAWnB4B,MAAM,EAAE1B,UAXW;EAYnB2B,OAAO,EAAEzB,WAZU;EAanB0B,IAAI,EAAExB,QAba;EAcnByB,GAAG,EAAEjC,OAdc;EAenBkC,OAAO,EAAEtB,WAfU;EAgBnBuB,MAAM,EAAErB,UAhBW;EAiBnBsB,IAAI,EAAEpB,SAjBa;EAkBnBqB,GAAG,EAAElB,GAlBc;EAmBnBmB,IAAI,EAAErB,SAnBa;EAoBnBsB,MAAM,EAAElB;AApBW,CAAd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAkCA,kDAoQC"}
|
|
@@ -27,6 +27,8 @@ var _cardsGrid = _interopRequireDefault(require("../../organism/cards-grid"));
|
|
|
27
27
|
|
|
28
28
|
var _listItems = _interopRequireDefault(require("../../organism/list-items"));
|
|
29
29
|
|
|
30
|
+
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
31
|
+
|
|
30
32
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
31
33
|
|
|
32
34
|
var _types = _interopRequireDefault(require("./types"));
|
|
@@ -63,13 +65,15 @@ const CMPopin = props => {
|
|
|
63
65
|
cookieTitle,
|
|
64
66
|
descriptionBtnTxt,
|
|
65
67
|
listBtnSwicth,
|
|
66
|
-
items
|
|
68
|
+
items,
|
|
69
|
+
link
|
|
67
70
|
} = props;
|
|
68
71
|
const logo = {
|
|
69
72
|
AlertDiamond: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertDiamond,
|
|
70
73
|
WindowUpload: _novaIcons.NovaSolidApplicationsWindowUpload3,
|
|
71
74
|
MoonRocket: _novaIcons.NovaSolidSpaceMoonRocket,
|
|
72
|
-
CheckCircle1: _novaIcons.NovaLineStatusCheckCircle1
|
|
75
|
+
CheckCircle1: _novaIcons.NovaLineStatusCheckCircle1,
|
|
76
|
+
AlertIcon: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertRounded
|
|
73
77
|
};
|
|
74
78
|
const LogoComponent = logo[icon];
|
|
75
79
|
const backgroundImageStyle = backgroundImageUrl ? {
|
|
@@ -233,7 +237,7 @@ const CMPopin = props => {
|
|
|
233
237
|
dangerouslySetInnerHTML: {
|
|
234
238
|
__html: descriptionText
|
|
235
239
|
}
|
|
236
|
-
}) : null) : null, descriptionBtnTxt ? /*#__PURE__*/_react.default.createElement("div", {
|
|
240
|
+
}) : null, link ? /*#__PURE__*/_react.default.createElement(_link.default, link) : null) : null, descriptionBtnTxt ? /*#__PURE__*/_react.default.createElement("div", {
|
|
237
241
|
className: _style.default.descriptionBtn
|
|
238
242
|
}, descriptionBtnTxt) : null, !(0, _isEmpty.default)(items) ? renderItems() : null, renderBtnSwitch(), firstButton || secondButton || thirdButton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
239
243
|
className: _style.default.buttonContainer
|
|
@@ -254,7 +258,8 @@ const CMPopin = props => {
|
|
|
254
258
|
"data-name": `cm-popin-cta-${secondButton.type}`,
|
|
255
259
|
"aria-label": secondButton['aria-label'],
|
|
256
260
|
type: secondButton.type,
|
|
257
|
-
customStyle: secondButton.customStyle
|
|
261
|
+
customStyle: secondButton.customStyle,
|
|
262
|
+
icon: secondButton.icon
|
|
258
263
|
})) : null, thirdButton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
259
264
|
className: thirdButton.largeButton ? _style.default.largeButton : _style.default.button
|
|
260
265
|
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["IconType","lockedContent","style","lockIcon","fileZipped","filesListIconContainer","filesListIcon","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","items","logo","AlertDiamond","WindowUpload","MoonRocket","CheckCircle1","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","handleCloseButton","useMemo","nodeRef","useRef","useEffect","closePopin","e","current","contains","target","handleKeyDown","key","document","addEventListener","removeEventListener","renderHeader","title","headerIcon","TopTitleIcon","headerContent","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","renderItems","list","isEmpty","itemsContainer","filesListContainer","wrapperPopinStyle","classNames","popinCookie","popinFilesList","popinItems","popin","background","popinHeader","onCloseButton","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes","contextTypes","translate","Provider","childContextTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React, {useRef, useEffect, useMemo} from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaLineStatusCheckCircle1 as CheckCircle1,\n NovaSolidFilesBasicFileLines as FileLinesIcon\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport classNames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst IconType = {\n lockedContent: <LockIcon className={style.lockIcon} />,\n fileZipped: (\n <div className={style.filesListIconContainer}>\n <FileLinesIcon className={style.filesListIcon} />\n </div>\n )\n};\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth,\n items\n } = props;\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const handleCloseButton = useMemo(() => () => onClose(), [onClose]);\n const nodeRef = useRef(null);\n useEffect(() => {\n if (mode === 'items') {\n const closePopin = e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n handleCloseButton();\n }\n };\n const handleKeyDown = e => {\n if (e?.key === 'Escape') {\n handleCloseButton();\n }\n };\n document.addEventListener('click', closePopin);\n document.addEventListener('touchstart', closePopin);\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('click', closePopin);\n document.removeEventListener('touchstart', closePopin);\n document.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [handleCloseButton, mode, onClose]);\n const renderHeader = () => {\n if (header) {\n const {title, headerIcon, backgroundImage} = header;\n const TopTitleIcon = IconType[headerIcon];\n\n return (\n <>\n {title ? (\n <div className={style.headerContent}>\n {TopTitleIcon}\n <Title {...title} />\n </div>\n ) : null}\n {backgroundImage ? (\n <img className={style.headerBackground} src={backgroundImage} />\n ) : null}\n </>\n );\n }\n\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n\n return null;\n };\n\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n\n const renderItems = () => {\n const {type, list} = items;\n if (isEmpty(list)) return null;\n\n if (type === 'content')\n return (\n <div className={style.itemsContainer} data-name={'cm-popin-cards'}>\n <CardsGrid {...list} />\n </div>\n );\n if (type === 'list')\n return (\n <div className={style.filesListContainer}>\n <ListItems {...list} />\n </div>\n );\n\n return null;\n };\n const wrapperPopinStyle = classNames(\n mode === 'cookie' && style.popinCookie,\n mode === 'list' && style.popinFilesList,\n mode === 'items' && style.popinItems,\n style.popin\n );\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={wrapperPopinStyle} ref={nodeRef}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <div className={style.onCloseButton}>\n <ButtonLinkIconOnly\n onClick={handleCloseButton}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n </div>\n ) : null}\n </header>\n {mode !== 'items' && mode !== 'list' ? (\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n ) : null}\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {!isEmpty(items) ? renderItems() : null}\n {renderBtnSwitch()}\n {firstButton || secondButton || thirdButton ? (\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\nCMPopin.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAG;EACfC,aAAa,eAAE,6BAAC,6CAAD;IAAU,SAAS,EAAEC,cAAA,CAAMC;EAA3B,EADA;EAEfC,UAAU,eACR;IAAK,SAAS,EAAEF,cAAA,CAAMG;EAAtB,gBACE,6BAAC,uCAAD;IAAe,SAAS,EAAEH,cAAA,CAAMI;EAAhC,EADF;AAHa,CAAjB;;AASA,MAAMC,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC,aAbI;IAcJC;EAdI,IAeFd,KAfJ;EAgBA,MAAMe,IAAI,GAAG;IACXC,YAAY,EAAZA,0DADW;IAEXC,YAAY,EAAZA,6CAFW;IAGXC,UAAU,EAAVA,mCAHW;IAIXC,YAAY,EAAZA;EAJW,CAAb;EAMA,MAAMC,aAAa,GAAGL,IAAI,CAACR,IAAD,CAA1B;EAEA,MAAMc,oBAAoB,GAAGb,kBAAkB,GAC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ElD,WAAW,CAACqF;EAN3B,EADF,CADU,GAWR,IApCN,CADD,GAuCG,IArFN,CALF,CADF;AA+FD,CAhQD;;AAkQAhG,OAAO,CAACiG,SAAR,2CAAoBA,cAApB;AACAjG,OAAO,CAACkG,YAAR,GAAuB;EACrBC,SAAS,EAAEC,iBAAA,CAASC,iBAAT,CAA2BF;AADjB,CAAvB;eAIenG,O"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["IconType","lockedContent","style","lockIcon","fileZipped","filesListIconContainer","filesListIcon","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","items","link","logo","AlertDiamond","WindowUpload","MoonRocket","CheckCircle1","AlertIcon","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","handleCloseButton","useMemo","nodeRef","useRef","useEffect","closePopin","e","current","contains","target","handleKeyDown","key","document","addEventListener","removeEventListener","renderHeader","title","headerIcon","TopTitleIcon","headerContent","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","renderItems","list","isEmpty","itemsContainer","filesListContainer","wrapperPopinStyle","classNames","popinCookie","popinFilesList","popinItems","popin","background","popinHeader","onCloseButton","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes","contextTypes","translate","Provider","childContextTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React, {useRef, useEffect, useMemo} from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaLineStatusCheckCircle1 as CheckCircle1,\n NovaSolidFilesBasicFileLines as FileLinesIcon,\n NovaSolidInterfaceFeedbackInterfaceAlertRounded as AlertIcon\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport classNames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport Link from '../../atom/link';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst IconType = {\n lockedContent: <LockIcon className={style.lockIcon} />,\n fileZipped: (\n <div className={style.filesListIconContainer}>\n <FileLinesIcon className={style.filesListIcon} />\n </div>\n )\n};\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth,\n items,\n link\n } = props;\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1,\n AlertIcon\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const handleCloseButton = useMemo(() => () => onClose(), [onClose]);\n const nodeRef = useRef(null);\n useEffect(() => {\n if (mode === 'items') {\n const closePopin = e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n handleCloseButton();\n }\n };\n const handleKeyDown = e => {\n if (e?.key === 'Escape') {\n handleCloseButton();\n }\n };\n document.addEventListener('click', closePopin);\n document.addEventListener('touchstart', closePopin);\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('click', closePopin);\n document.removeEventListener('touchstart', closePopin);\n document.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [handleCloseButton, mode, onClose]);\n const renderHeader = () => {\n if (header) {\n const {title, headerIcon, backgroundImage} = header;\n const TopTitleIcon = IconType[headerIcon];\n\n return (\n <>\n {title ? (\n <div className={style.headerContent}>\n {TopTitleIcon}\n <Title {...title} />\n </div>\n ) : null}\n {backgroundImage ? (\n <img className={style.headerBackground} src={backgroundImage} />\n ) : null}\n </>\n );\n }\n\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n\n return null;\n };\n\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n\n const renderItems = () => {\n const {type, list} = items;\n if (isEmpty(list)) return null;\n\n if (type === 'content')\n return (\n <div className={style.itemsContainer} data-name={'cm-popin-cards'}>\n <CardsGrid {...list} />\n </div>\n );\n if (type === 'list')\n return (\n <div className={style.filesListContainer}>\n <ListItems {...list} />\n </div>\n );\n\n return null;\n };\n const wrapperPopinStyle = classNames(\n mode === 'cookie' && style.popinCookie,\n mode === 'list' && style.popinFilesList,\n mode === 'items' && style.popinItems,\n style.popin\n );\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={wrapperPopinStyle} ref={nodeRef}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <div className={style.onCloseButton}>\n <ButtonLinkIconOnly\n onClick={handleCloseButton}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n </div>\n ) : null}\n </header>\n {mode !== 'items' && mode !== 'list' ? (\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n {link ? <Link {...link} /> : null}\n </div>\n ) : null}\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {!isEmpty(items) ? renderItems() : null}\n {renderBtnSwitch()}\n {firstButton || secondButton || thirdButton ? (\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n icon={secondButton.icon}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\nCMPopin.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AAUA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAG;EACfC,aAAa,eAAE,6BAAC,6CAAD;IAAU,SAAS,EAAEC,cAAA,CAAMC;EAA3B,EADA;EAEfC,UAAU,eACR;IAAK,SAAS,EAAEF,cAAA,CAAMG;EAAtB,gBACE,6BAAC,uCAAD;IAAe,SAAS,EAAEH,cAAA,CAAMI;EAAhC,EADF;AAHa,CAAjB;;AASA,MAAMC,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC,aAbI;IAcJC,KAdI;IAeJC;EAfI,IAgBFf,KAhBJ;EAiBA,MAAMgB,IAAI,GAAG;IACXC,YAAY,EAAZA,0DADW;IAEXC,YAAY,EAAZA,6CAFW;IAGXC,UAAU,EAAVA,mCAHW;IAIXC,YAAY,EAAZA,qCAJW;IAKXC,SAAS,EAATA;EALW,CAAb;EAOA,MAAMC,aAAa,GAAGN,IAAI,CAACT,IAAD,CAA1B;EAEA,MAAMgB,oBAAoB,GAAGf,kBAAkB,GAC3C;IACEgB,eAAe,EAAG,OAAMhB,kBAAmB,GAD7C;IAEEiB,cAAc,EAAE;EAFlB,CAD2C,GAK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,WAAW,CAACoD,IALpB;IAME,WAAW,EAAEpD,WAAW,CAACuF;EAN3B,EADF,CADU,GAWR,IArCN,CADD,GAwCG,IAvFN,CALF,CADF;AAiGD,CApQD;;AAsQAlG,OAAO,CAACmG,SAAR,2CAAoBA,cAApB;AACAnG,OAAO,CAACoG,YAAR,GAAuB;EACrBC,SAAS,EAAEC,iBAAA,CAASC,iBAAT,CAA2BF;AADjB,CAAvB;eAIerG,O"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import Link from '../../atom/link';
|
|
2
3
|
import { TitleProps } from '../../atom/title/types';
|
|
3
4
|
import CardsGrid from '../../organism/cards-grid';
|
|
4
5
|
import ListItems from '../../organism/list-items';
|
|
@@ -32,6 +33,10 @@ declare const propTypes: {
|
|
|
32
33
|
'aria-label': PropTypes.Requireable<string>;
|
|
33
34
|
largeButton: PropTypes.Requireable<boolean>;
|
|
34
35
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
36
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
37
|
+
position: PropTypes.Requireable<string>;
|
|
38
|
+
type: PropTypes.Requireable<string>;
|
|
39
|
+
}>>;
|
|
35
40
|
}>>;
|
|
36
41
|
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
37
42
|
label: PropTypes.Requireable<string>;
|
|
@@ -244,6 +249,23 @@ declare const propTypes: {
|
|
|
244
249
|
title: PropTypes.Requireable<string>;
|
|
245
250
|
}> | null | undefined>>;
|
|
246
251
|
}>>;
|
|
252
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
253
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
254
|
+
className: PropTypes.Requireable<string>;
|
|
255
|
+
href: PropTypes.Requireable<string>;
|
|
256
|
+
'data-name': PropTypes.Requireable<string>;
|
|
257
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
258
|
+
title: PropTypes.Requireable<string>;
|
|
259
|
+
target: PropTypes.Requireable<string>;
|
|
260
|
+
skinHover: PropTypes.Requireable<boolean>;
|
|
261
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
262
|
+
download: PropTypes.Requireable<boolean>;
|
|
263
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
264
|
+
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
265
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
266
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
267
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
268
|
+
}>>;
|
|
247
269
|
};
|
|
248
270
|
declare type PopinHeaderProps = {
|
|
249
271
|
title: TitleProps;
|
|
@@ -273,6 +295,7 @@ export declare type CMPopinProps = {
|
|
|
273
295
|
type: 'content' | 'list';
|
|
274
296
|
list: PropTypes.InferProps<typeof CardsGrid.propTypes> | PropTypes.InferProps<typeof ListItems.propTypes>;
|
|
275
297
|
};
|
|
298
|
+
link?: PropTypes.InferProps<typeof Link.propTypes>;
|
|
276
299
|
};
|
|
277
300
|
export default propTypes;
|
|
278
301
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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;
|
|
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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AO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
+
var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
|
|
7
|
+
|
|
6
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
9
|
|
|
8
10
|
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
@@ -11,10 +13,14 @@ var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
|
|
|
11
13
|
|
|
12
14
|
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
13
15
|
|
|
16
|
+
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
17
|
+
|
|
14
18
|
var _cardsGrid = _interopRequireDefault(require("../../organism/cards-grid"));
|
|
15
19
|
|
|
16
20
|
var _listItems = _interopRequireDefault(require("../../organism/list-items"));
|
|
17
21
|
|
|
22
|
+
var _buttonIcons = require("../../util/button-icons");
|
|
23
|
+
|
|
18
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
25
|
|
|
20
26
|
const propTypes = {
|
|
@@ -39,7 +45,11 @@ const propTypes = {
|
|
|
39
45
|
type: _propTypes.default.oneOf(['dangerous', 'primary', 'secondary']),
|
|
40
46
|
'aria-label': _propTypes.default.string,
|
|
41
47
|
largeButton: _propTypes.default.bool,
|
|
42
|
-
customStyle: _buttonLink.default.propTypes.customStyle
|
|
48
|
+
customStyle: _buttonLink.default.propTypes.customStyle,
|
|
49
|
+
icon: _propTypes.default.shape({
|
|
50
|
+
position: _propTypes.default.oneOf(['right', 'left']),
|
|
51
|
+
type: _propTypes.default.oneOf((0, _keys2.default)(_buttonIcons.ICONS))
|
|
52
|
+
})
|
|
43
53
|
}),
|
|
44
54
|
thirdButton: _propTypes.default.shape({
|
|
45
55
|
label: _propTypes.default.string,
|
|
@@ -60,7 +70,8 @@ const propTypes = {
|
|
|
60
70
|
items: _propTypes.default.shape({
|
|
61
71
|
type: _propTypes.default.oneOf(['content', 'list']),
|
|
62
72
|
list: _propTypes.default.oneOfType([_propTypes.default.shape(_cardsGrid.default.propTypes), _propTypes.default.shape(_listItems.default.propTypes)])
|
|
63
|
-
})
|
|
73
|
+
}),
|
|
74
|
+
link: _propTypes.default.shape(_link.default.propTypes)
|
|
64
75
|
};
|
|
65
76
|
var _default = propTypes;
|
|
66
77
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["propTypes","content","PropTypes","string","mode","oneOf","header","shape","title","Title","headerIcon","backgroundImage","firstButton","label","handleOnclick","func","largeButton","bool","type","customStyle","Cta","secondButton","
|
|
1
|
+
{"version":3,"file":"types.js","names":["propTypes","content","PropTypes","string","mode","oneOf","header","shape","title","Title","headerIcon","backgroundImage","firstButton","label","handleOnclick","func","largeButton","bool","type","customStyle","Cta","secondButton","icon","position","ICONS","thirdButton","onClose","backgroundImageUrl","descriptionText","cookieTitle","headerSubtitle","descriptionBtnTxt","listBtnSwicth","arrayOf","InputSwitch","items","list","oneOfType","CardsGrid","ListItems","link","Link"],"sources":["../../../src/molecule/cm-popin/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport Cta from '../../atom/button-link';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport Link from '../../atom/link';\nimport {TitleProps} from '../../atom/title/types';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items', 'list']),\n header: PropTypes.shape({\n title: PropTypes.shape(Title.propTypes),\n headerIcon: PropTypes.string,\n backgroundImage: PropTypes.string\n }),\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: Cta.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: Cta.propTypes.customStyle,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n })\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: Cta.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.string,\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n cookieTitle: PropTypes.string,\n headerSubtitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes)),\n items: PropTypes.shape({\n type: PropTypes.oneOf(['content', 'list']),\n list: PropTypes.oneOfType([\n PropTypes.shape(CardsGrid.propTypes),\n PropTypes.shape(ListItems.propTypes)\n ])\n }),\n link: PropTypes.shape(Link.propTypes)\n};\n\ntype PopinHeaderProps = {\n title: TitleProps;\n backgroundImage: string;\n headerIcon: string;\n};\n\nexport type QuitPopinButton = {\n 'aria-label'?: string;\n label: string;\n type: string;\n customStyle?: {\n backgroundColor?: string;\n color?: string;\n };\n handleOnclick: () => void;\n};\n\nexport type CMPopinProps = {\n content: string;\n icon: string;\n mode: 'alert' | 'information' | 'cookie' | 'items' | 'list';\n onClose?: () => void;\n popinHeader?: PopinHeaderProps;\n descriptionText: string;\n firstButton?: QuitPopinButton;\n secondButton?: QuitPopinButton;\n items?: {\n type: 'content' | 'list';\n list:\n | PropTypes.InferProps<typeof CardsGrid.propTypes>\n | PropTypes.InferProps<typeof ListItems.propTypes>;\n };\n link?: PropTypes.InferProps<typeof Link.propTypes>;\n};\n\nexport default propTypes;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,OAAO,EAAEC,kBAAA,CAAUC,MADH;EAEhBC,IAAI,EAAEF,kBAAA,CAAUG,KAAV,CAAgB,CAAC,OAAD,EAAU,aAAV,EAAyB,QAAzB,EAAmC,OAAnC,EAA4C,MAA5C,CAAhB,CAFU;EAGhBC,MAAM,EAAEJ,kBAAA,CAAUK,KAAV,CAAgB;IACtBC,KAAK,EAAEN,kBAAA,CAAUK,KAAV,CAAgBE,cAAA,CAAMT,SAAtB,CADe;IAEtBU,UAAU,EAAER,kBAAA,CAAUC,MAFA;IAGtBQ,eAAe,EAAET,kBAAA,CAAUC;EAHL,CAAhB,CAHQ;EAQhBS,WAAW,EAAEV,kBAAA,CAAUK,KAAV,CAAgB;IAC3BM,KAAK,EAAEX,kBAAA,CAAUC,MADU;IAE3BW,aAAa,EAAEZ,kBAAA,CAAUa,IAFE;IAG3B,cAAcb,kBAAA,CAAUC,MAHG;IAI3Ba,WAAW,EAAEd,kBAAA,CAAUe,IAJI;IAK3BC,IAAI,EAAEhB,kBAAA,CAAUG,KAAV,CAAgB,CAAC,WAAD,EAAc,SAAd,EAAyB,WAAzB,EAAsC,UAAtC,CAAhB,CALqB;IAM3Bc,WAAW,EAAEC,mBAAA,CAAIpB,SAAJ,CAAcmB;EANA,CAAhB,CARG;EAgBhBE,YAAY,EAAEnB,kBAAA,CAAUK,KAAV,CAAgB;IAC5BM,KAAK,EAAEX,kBAAA,CAAUC,MADW;IAE5BW,aAAa,EA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AAa,EAAE9B,kBAAA,CAAU+B,OAAV,CAAkB/B,kBAAA,CAAUK,KAAV,CAAgB2B,oBAAA,CAAYlC,SAA5B,CAAlB,CA3CC;EA4ChBmC,KAAK,EAAEjC,kBAAA,CAAUK,KAAV,CAAgB;IACrBW,IAAI,EAAEhB,kBAAA,CAAUG,KAAV,CAAgB,CAAC,SAAD,EAAY,MAAZ,CAAhB,CADe;IAErB+B,IAAI,EAAElC,kBAAA,CAAUmC,SAAV,CAAoB,CACxBnC,kBAAA,CAAUK,KAAV,CAAgB+B,kBAAA,CAAUtC,SAA1B,CADwB,EAExBE,kBAAA,CAAUK,KAAV,CAAgBgC,kBAAA,CAAUvC,SAA1B,CAFwB,CAApB;EAFe,CAAhB,CA5CS;EAmDhBwC,IAAI,EAAEtC,kBAAA,CAAUK,KAAV,CAAgBkC,aAAA,CAAKzC,SAArB;AAnDU,CAAlB;eAyFeA,S"}
|
|
@@ -34,6 +34,10 @@ declare namespace PlayerLoading {
|
|
|
34
34
|
'aria-label': PropTypes.Requireable<string>;
|
|
35
35
|
largeButton: PropTypes.Requireable<boolean>;
|
|
36
36
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
37
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
38
|
+
position: PropTypes.Requireable<string>;
|
|
39
|
+
type: PropTypes.Requireable<string>;
|
|
40
|
+
}>>;
|
|
37
41
|
}>>;
|
|
38
42
|
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
39
43
|
label: PropTypes.Requireable<string>;
|
|
@@ -246,6 +250,23 @@ declare namespace PlayerLoading {
|
|
|
246
250
|
title: PropTypes.Requireable<string>;
|
|
247
251
|
}> | null | undefined>>;
|
|
248
252
|
}>>;
|
|
253
|
+
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
254
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
255
|
+
className: PropTypes.Requireable<string>;
|
|
256
|
+
href: PropTypes.Requireable<string>;
|
|
257
|
+
'data-name': PropTypes.Requireable<string>;
|
|
258
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
259
|
+
title: PropTypes.Requireable<string>;
|
|
260
|
+
target: PropTypes.Requireable<string>;
|
|
261
|
+
skinHover: PropTypes.Requireable<boolean>;
|
|
262
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
263
|
+
download: PropTypes.Requireable<boolean>;
|
|
264
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
265
|
+
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
266
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
267
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
268
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
269
|
+
}>>;
|
|
249
270
|
}>>;
|
|
250
271
|
}
|
|
251
272
|
}
|