@coorpacademy/components 11.12.1 → 11.12.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/drag-and-drop/index.d.ts +2 -0
- package/es/atom/drag-and-drop/index.d.ts.map +1 -1
- package/es/atom/drag-and-drop/index.js +26 -2
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/style.css +21 -5
- package/es/atom/image-upload/index.d.ts +5 -1
- package/es/atom/image-upload/index.d.ts.map +1 -1
- package/es/atom/image-upload/index.js +8 -10
- package/es/atom/image-upload/index.js.map +1 -1
- package/es/atom/video-upload/index.d.ts +2 -0
- package/es/molecule/brand-form-group/index.d.ts +4 -0
- package/es/molecule/card/favorite.d.ts +14 -9
- package/es/molecule/card/favorite.d.ts.map +1 -1
- package/es/molecule/card/favorite.js +51 -65
- package/es/molecule/card/favorite.js.map +1 -1
- package/es/molecule/drag-and-drop-wrapper/index.d.ts +2 -0
- package/es/molecule/drag-and-drop-wrapper/style.css +1 -1
- package/es/molecule/setup-slide/index.d.ts +2 -0
- package/es/molecule/setup-slider/index.d.ts +2 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +2 -0
- package/es/organism/brand-form/index.d.ts +4 -0
- package/es/organism/list-item/index.d.ts +1 -0
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +5 -3
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-items/index.d.ts +4 -1
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +6 -3
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/rewards-form/index.d.ts +2 -0
- package/es/organism/wizard-contents/index.d.ts +6 -0
- package/es/template/back-office/brand-update/index.d.ts +12 -0
- package/es/template/back-office/brand-update/index.js +2 -1
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/cockpit/jw-uploader/index.d.ts +2 -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/es/util/proptypes.d.ts.map +1 -1
- package/es/util/proptypes.js +2 -2
- package/es/util/proptypes.js.map +1 -1
- package/lib/atom/drag-and-drop/index.d.ts +2 -0
- package/lib/atom/drag-and-drop/index.d.ts.map +1 -1
- package/lib/atom/drag-and-drop/index.js +26 -2
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +21 -5
- package/lib/atom/image-upload/index.d.ts +5 -1
- package/lib/atom/image-upload/index.d.ts.map +1 -1
- package/lib/atom/image-upload/index.js +8 -11
- package/lib/atom/image-upload/index.js.map +1 -1
- package/lib/atom/video-upload/index.d.ts +2 -0
- package/lib/molecule/brand-form-group/index.d.ts +4 -0
- package/lib/molecule/card/favorite.d.ts +14 -9
- package/lib/molecule/card/favorite.d.ts.map +1 -1
- package/lib/molecule/card/favorite.js +55 -65
- package/lib/molecule/card/favorite.js.map +1 -1
- package/lib/molecule/drag-and-drop-wrapper/index.d.ts +2 -0
- package/lib/molecule/drag-and-drop-wrapper/style.css +1 -1
- package/lib/molecule/setup-slide/index.d.ts +2 -0
- package/lib/molecule/setup-slider/index.d.ts +2 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -0
- package/lib/organism/brand-form/index.d.ts +4 -0
- package/lib/organism/list-item/index.d.ts +1 -0
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +5 -3
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-items/index.d.ts +4 -1
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +6 -3
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/rewards-form/index.d.ts +2 -0
- package/lib/organism/wizard-contents/index.d.ts +6 -0
- package/lib/template/back-office/brand-update/index.d.ts +12 -0
- package/lib/template/back-office/brand-update/index.js +2 -1
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/cockpit/jw-uploader/index.d.ts +2 -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/lib/util/proptypes.d.ts.map +1 -1
- package/lib/util/proptypes.js +2 -2
- package/lib/util/proptypes.js.map +1 -1
- package/package.json +2 -2
- package/locales/.mtslconfig.json +0 -1
|
@@ -23,14 +23,16 @@ const ListItems = ({
|
|
|
23
23
|
title,
|
|
24
24
|
buttonLink,
|
|
25
25
|
items,
|
|
26
|
-
'aria-label': ariaLabel
|
|
26
|
+
'aria-label': ariaLabel,
|
|
27
|
+
contentType
|
|
27
28
|
}) => {
|
|
28
29
|
const itemsView = items.map((item, index) => /*#__PURE__*/_react.default.createElement("li", {
|
|
29
30
|
key: item.id,
|
|
30
31
|
className: _style.default.item,
|
|
31
32
|
"data-name": `content-${index}`
|
|
32
33
|
}, /*#__PURE__*/_react.default.createElement(_listItem.default, _extends({}, item, {
|
|
33
|
-
order: index
|
|
34
|
+
order: index,
|
|
35
|
+
contentType: contentType
|
|
34
36
|
}))));
|
|
35
37
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
36
38
|
className: _style.default.header
|
|
@@ -53,7 +55,8 @@ ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
53
55
|
'aria-label': _propTypes.default.string,
|
|
54
56
|
buttonLink: _propTypes.default.shape(_buttonLink.default.propTypes),
|
|
55
57
|
items: _propTypes.default.arrayOf(_propTypes.default.shape(_listItem.default.propTypes)),
|
|
56
|
-
title: _propTypes.default.string
|
|
58
|
+
title: _propTypes.default.string,
|
|
59
|
+
contentType: _propTypes.default.string
|
|
57
60
|
} : {};
|
|
58
61
|
var _default = ListItems;
|
|
59
62
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ListItems","title","buttonLink","items","ariaLabel","itemsView","map","item","index","id","style","header","buttonCreate","list","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} />\n </li>\n ));\n\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.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC,UAAR;EAAoBC,KAApB;EAA2B,cAAcC;
|
|
1
|
+
{"version":3,"file":"index.js","names":["ListItems","title","buttonLink","items","ariaLabel","contentType","itemsView","map","item","index","id","style","header","buttonCreate","list","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={contentType} />\n </li>\n ));\n\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.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string,\n contentType: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC,UAAR;EAAoBC,KAApB;EAA2B,cAAcC,SAAzC;EAAoDC;AAApD,CAAD,KAAsE;EACtF,MAAMC,SAAS,GAAGH,KAAK,CAACI,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;IAAI,GAAG,EAAED,IAAI,CAACE,EAAd;IAAkB,SAAS,EAAEC,cAAA,CAAMH,IAAnC;IAAyC,aAAY,WAAUC,KAAM;EAArE,gBACE,6BAAC,iBAAD,eAAcD,IAAd;IAAoB,KAAK,EAAEC,KAA3B;IAAkC,WAAW,EAAEJ;EAA/C,GADF,CADgB,CAAlB;EAMA,oBACE,uDACE;IAAK,SAAS,EAAEM,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,CAAMV;EAAtB,gBACE,6BAAC,cAAD;IAAO,KAAK,EAAEA,KAAd;IAAqB,IAAI,EAAE,YAA3B;IAAyC,aAAW;EAApD,EADF,CADF,eAIE;IAAK,SAAS,EAAEU,cAAA,CAAME;EAAtB,gBACE,6BAAC,mBAAD,EAAgBX,UAAhB,CADF,CAJF,CADF,eASE;IAAI,SAAS,EAAES,cAAA,CAAMG,IAArB;IAA2B,cAAYV,SAAvC;IAAkD,aAAW;EAA7D,GACGE,SADH,CATF,CADF;AAeD,CAtBD;;AAwBAN,SAAS,CAACe,SAAV,2CAAsB;EACpB,cAAcC,kBAAA,CAAUC,MADJ;EAEpBf,UAAU,EAAEc,kBAAA,CAAUE,KAAV,CAAgBC,mBAAA,CAAWJ,SAA3B,CAFQ;EAGpBZ,KAAK,EAAEa,kBAAA,CAAUI,OAAV,CAAkBJ,kBAAA,CAAUE,KAAV,CAAgBG,iBAAA,CAASN,SAAzB,CAAlB,CAHa;EAIpBd,KAAK,EAAEe,kBAAA,CAAUC,MAJG;EAKpBZ,WAAW,EAAEW,kBAAA,CAAUC;AALH,CAAtB;eAQejB,S"}
|
|
@@ -68,6 +68,8 @@ declare namespace RewardsForm {
|
|
|
68
68
|
modified: PropTypes.Requireable<boolean>;
|
|
69
69
|
disabled: PropTypes.Requireable<boolean>;
|
|
70
70
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
71
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
72
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
71
73
|
}> | null | undefined)[]>;
|
|
72
74
|
'data-name': PropTypes.Requireable<string>;
|
|
73
75
|
}> | null | undefined>>;
|
|
@@ -195,6 +195,8 @@ declare namespace WizardContents {
|
|
|
195
195
|
modified: PropTypes.Requireable<boolean>;
|
|
196
196
|
disabled: PropTypes.Requireable<boolean>;
|
|
197
197
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
198
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
199
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
198
200
|
}> | PropTypes.InferProps<{
|
|
199
201
|
type: PropTypes.Requireable<string>;
|
|
200
202
|
tabProps: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -313,6 +315,8 @@ declare namespace WizardContents {
|
|
|
313
315
|
modified: PropTypes.Requireable<boolean>;
|
|
314
316
|
disabled: PropTypes.Requireable<boolean>;
|
|
315
317
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
318
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
319
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
316
320
|
}> | PropTypes.InferProps<{
|
|
317
321
|
type: PropTypes.Requireable<string>;
|
|
318
322
|
title: PropTypes.Validator<string>;
|
|
@@ -703,6 +707,8 @@ declare namespace WizardContents {
|
|
|
703
707
|
modified: PropTypes.Requireable<boolean>;
|
|
704
708
|
disabled: PropTypes.Requireable<boolean>;
|
|
705
709
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
710
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
711
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
706
712
|
}> | null | undefined)[]>;
|
|
707
713
|
'data-name': PropTypes.Requireable<string>;
|
|
708
714
|
}> | null | undefined>>;
|
|
@@ -280,6 +280,8 @@ declare namespace BrandUpdate {
|
|
|
280
280
|
modified: PropTypes.Requireable<boolean>;
|
|
281
281
|
disabled: PropTypes.Requireable<boolean>;
|
|
282
282
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
283
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
284
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
283
285
|
}> | PropTypes.InferProps<{
|
|
284
286
|
type: PropTypes.Requireable<string>;
|
|
285
287
|
tabProps: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -398,6 +400,8 @@ declare namespace BrandUpdate {
|
|
|
398
400
|
modified: PropTypes.Requireable<boolean>;
|
|
399
401
|
disabled: PropTypes.Requireable<boolean>;
|
|
400
402
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
403
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
404
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
401
405
|
}> | PropTypes.InferProps<{
|
|
402
406
|
type: PropTypes.Requireable<string>;
|
|
403
407
|
title: PropTypes.Validator<string>;
|
|
@@ -934,6 +938,8 @@ declare namespace BrandUpdate {
|
|
|
934
938
|
modified: PropTypes.Requireable<boolean>;
|
|
935
939
|
disabled: PropTypes.Requireable<boolean>;
|
|
936
940
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
941
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
942
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
937
943
|
}> | PropTypes.InferProps<{
|
|
938
944
|
type: PropTypes.Requireable<string>;
|
|
939
945
|
tabProps: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -1052,6 +1058,8 @@ declare namespace BrandUpdate {
|
|
|
1052
1058
|
modified: PropTypes.Requireable<boolean>;
|
|
1053
1059
|
disabled: PropTypes.Requireable<boolean>;
|
|
1054
1060
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1061
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
1062
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
1055
1063
|
}> | PropTypes.InferProps<{
|
|
1056
1064
|
type: PropTypes.Requireable<string>;
|
|
1057
1065
|
title: PropTypes.Validator<string>;
|
|
@@ -1442,6 +1450,8 @@ declare namespace BrandUpdate {
|
|
|
1442
1450
|
modified: PropTypes.Requireable<boolean>;
|
|
1443
1451
|
disabled: PropTypes.Requireable<boolean>;
|
|
1444
1452
|
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1453
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
1454
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
1445
1455
|
}> | null | undefined)[]>;
|
|
1446
1456
|
'data-name': PropTypes.Requireable<string>;
|
|
1447
1457
|
}> | null | undefined>>;
|
|
@@ -1459,6 +1469,7 @@ declare namespace BrandUpdate {
|
|
|
1459
1469
|
}> | PropTypes.InferProps<{
|
|
1460
1470
|
key: PropTypes.Requireable<string>;
|
|
1461
1471
|
type: PropTypes.Requireable<string>;
|
|
1472
|
+
contentType: PropTypes.Requireable<string>;
|
|
1462
1473
|
'aria-label': PropTypes.Requireable<string>;
|
|
1463
1474
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1464
1475
|
type: PropTypes.Requireable<string>;
|
|
@@ -1510,6 +1521,7 @@ declare namespace BrandUpdate {
|
|
|
1510
1521
|
title: PropTypes.Validator<string>;
|
|
1511
1522
|
order: PropTypes.Requireable<number>;
|
|
1512
1523
|
'aria-label': PropTypes.Requireable<string>;
|
|
1524
|
+
contentType: PropTypes.Requireable<string>;
|
|
1513
1525
|
}> | null | undefined)[]>;
|
|
1514
1526
|
title: PropTypes.Requireable<string>;
|
|
1515
1527
|
}> | PropTypes.InferProps<{
|
|
@@ -304,7 +304,8 @@ BrandUpdate.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
304
304
|
type: _propTypes.default.oneOf(['wizard'])
|
|
305
305
|
})), _propTypes.default.shape(_extends({}, _listItems.default.propTypes, {
|
|
306
306
|
key: _propTypes.default.string,
|
|
307
|
-
type: _propTypes.default.oneOf(['list-content'])
|
|
307
|
+
type: _propTypes.default.oneOf(['list-content']),
|
|
308
|
+
contentType: _propTypes.default.string
|
|
308
309
|
})), _propTypes.default.shape(_extends({}, _emptyStateDashboard.default.propTypes, {
|
|
309
310
|
key: _propTypes.default.string,
|
|
310
311
|
type: _propTypes.default.oneOf(['empty-state-dashboard'])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getStyle","isSelected","style","selectedElement","unselectedElement","subTabsView","_subTabs","map","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","isEmpty","notificationsList","notification","buildHeader","header","buildPopin","popin","buildDocumentation","documentation","show","onClose","content","classNames","open","documentationContent","__html","closeButton","buildTabs","selectedTab","pipe","find","e","get","showTabs","subTabs","undefined","buildContentView","loaderContainer","loader","buildDetailsView","details","BrandUpdate","props","contentFixHeight","leftNavigation","notificationsView","documentationView","headerView","tabsView","contentView","detailsView","popinView","contentStyle","contentWithNotifications","container","left","contentWrapper","headerSticky","defaultProps","propTypes","PropTypes","arrayOf","shape","Banner","Header","string","isRequired","bool","oneOfType","BrandForm","oneOf","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","WizardContents","ListItems","EmptyStateDashboard","UploadingFileProgress","func","CmPopin"],"sources":["../../../../src/template/back-office/brand-update/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport WizardContents from '../../../organism/wizard-contents';\nimport ListItems from '../../../organism/list-items';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport CmPopin from '../../../molecule/cm-popin';\nimport ButtonLinkIconOnly from '../../../atom/button-link-icon-only';\nimport EmptyStateDashboard from '../../../molecule/empty-state-dashboard';\nimport UploadingFileProgress from '../../../molecule/uploading-file-progress';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem {...subTab} styles={getStyle(subTab.selected)} uppercase={false} />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={style.notification} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return <div className={style.notifications}>{notificationsList}</div>;\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildPopin = popin => {\n return popin ? (\n <div className={style.popin}>\n <CmPopin {...popin} />\n </div>\n ) : null;\n};\n\nconst buildDocumentation = documentation => {\n if (!documentation) return null;\n const {show = false, onClose, content = ''} = documentation;\n return (\n <div className={classNames(style.documentation, show && style.open)}>\n <div\n className={style.documentationContent}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n {onClose ? (\n <ButtonLinkIconOnly\n className={style.closeButton}\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </div>\n );\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab ? find(e => e.selected, selectedTab.subTabs) : undefined;\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'list-content':\n return <ListItems {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n case 'wizard':\n return <WizardContents {...content} />;\n case 'empty-state-dashboard':\n return <EmptyStateDashboard {...content} />;\n case 'uploading-file-progress':\n return <UploadingFileProgress {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {\n notifications,\n header,\n items,\n content,\n details,\n popin,\n onItemClick,\n documentation,\n contentFixHeight\n } = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const documentationView = buildDocumentation(documentation);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n const popinView = buildPopin(popin);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications,\n contentFixHeight && style.contentFixHeight\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n {documentationView}\n </div>\n </div>\n {popinView}\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\n }),\n PropTypes.shape({\n ...ListItems.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list-content'])\n }),\n PropTypes.shape({\n ...EmptyStateDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['empty-state-dashboard'])\n }),\n PropTypes.shape({\n ...UploadingFileProgress.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['uploading-file-progress'])\n })\n ]),\n documentation: PropTypes.shape({\n content: PropTypes.string,\n show: PropTypes.bool,\n onClose: PropTypes.func\n }),\n popin: PropTypes.shape({...CmPopin.propTypes}),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func,\n contentFixHeight: PropTypes.bool\n};\n\nexport default BrandUpdate;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAGC,UAAU,IAAKA,UAAU,GAAGC,cAAA,CAAMC,eAAT,GAA2BD,cAAA,CAAME,iBAA3E;;AAEA,MAAMC,WAAW,GAAG,CAACC,QAAQ,GAAG,EAAZ,KAClBC,YAAA,CAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,EAA0B,CAACC,MAAD,EAASC,MAAT,kBACxB;EAAK,GAAG,EAAED,MAAM,CAACE;AAAjB,GACGF,MAAM,CAACG,IAAP,KAAgB,UAAhB,gBACC,6BAAC,qBAAD,eACMH,MADN;EAEE,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAFlB;EAGE,SAAS,EAAE,KAHb;EAIE,MAAM,EAAE;AAJV,GADD,gBAQC,6BAAC,iBAAD,eAAcJ,MAAd;EAAsB,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAAtC;EAAyD,SAAS,EAAE;AAApE,GATJ,CADF,EAaGR,QAbH,CADF,C,CAgBA;;;AACA,MAAMS,mBAAmB,GAAG,CAACC,IAAD,EAAOC,KAAP,EAAcC,WAAd,KAA8B;EACxD,MAAMC,aAAa,GAAGF,KAAK,CAACV,GAAN,CAAU,CAAC;IAACa,GAAD;IAAMR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B;EAHC,GArFa;EA0FtBzE,WAAW,EAAE+D,kBAAA,CAAUmB,IA1FD;EA2FtBpC,gBAAgB,EAAEiB,kBAAA,CAAUO;AA3FN,CAAxB;eA8Fe1B,W"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["getStyle","isSelected","style","selectedElement","unselectedElement","subTabsView","_subTabs","map","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","isEmpty","notificationsList","notification","buildHeader","header","buildPopin","popin","buildDocumentation","documentation","show","onClose","content","classNames","open","documentationContent","__html","closeButton","buildTabs","selectedTab","pipe","find","e","get","showTabs","subTabs","undefined","buildContentView","loaderContainer","loader","buildDetailsView","details","BrandUpdate","props","contentFixHeight","leftNavigation","notificationsView","documentationView","headerView","tabsView","contentView","detailsView","popinView","contentStyle","contentWithNotifications","container","left","contentWrapper","headerSticky","defaultProps","propTypes","PropTypes","arrayOf","shape","Banner","Header","string","isRequired","bool","oneOfType","BrandForm","oneOf","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","WizardContents","ListItems","contentType","EmptyStateDashboard","UploadingFileProgress","func","CmPopin"],"sources":["../../../../src/template/back-office/brand-update/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport WizardContents from '../../../organism/wizard-contents';\nimport ListItems from '../../../organism/list-items';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport CmPopin from '../../../molecule/cm-popin';\nimport ButtonLinkIconOnly from '../../../atom/button-link-icon-only';\nimport EmptyStateDashboard from '../../../molecule/empty-state-dashboard';\nimport UploadingFileProgress from '../../../molecule/uploading-file-progress';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem {...subTab} styles={getStyle(subTab.selected)} uppercase={false} />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={style.notification} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return <div className={style.notifications}>{notificationsList}</div>;\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildPopin = popin => {\n return popin ? (\n <div className={style.popin}>\n <CmPopin {...popin} />\n </div>\n ) : null;\n};\n\nconst buildDocumentation = documentation => {\n if (!documentation) return null;\n const {show = false, onClose, content = ''} = documentation;\n return (\n <div className={classNames(style.documentation, show && style.open)}>\n <div\n className={style.documentationContent}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n {onClose ? (\n <ButtonLinkIconOnly\n className={style.closeButton}\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </div>\n );\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab ? find(e => e.selected, selectedTab.subTabs) : undefined;\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'list-content':\n return <ListItems {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n case 'wizard':\n return <WizardContents {...content} />;\n case 'empty-state-dashboard':\n return <EmptyStateDashboard {...content} />;\n case 'uploading-file-progress':\n return <UploadingFileProgress {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {\n notifications,\n header,\n items,\n content,\n details,\n popin,\n onItemClick,\n documentation,\n contentFixHeight\n } = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const documentationView = buildDocumentation(documentation);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n const popinView = buildPopin(popin);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications,\n contentFixHeight && style.contentFixHeight\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n {documentationView}\n </div>\n </div>\n {popinView}\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\n }),\n PropTypes.shape({\n ...ListItems.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list-content']),\n contentType: PropTypes.string\n }),\n PropTypes.shape({\n ...EmptyStateDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['empty-state-dashboard'])\n }),\n PropTypes.shape({\n ...UploadingFileProgress.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['uploading-file-progress'])\n })\n ]),\n documentation: PropTypes.shape({\n content: PropTypes.string,\n show: PropTypes.bool,\n onClose: PropTypes.func\n }),\n popin: PropTypes.shape({...CmPopin.propTypes}),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func,\n contentFixHeight: PropTypes.bool\n};\n\nexport default BrandUpdate;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAGC,UAAU,IAAKA,UAAU,GAAGC,cAAA,CAAMC,eAAT,GAA2BD,cAAA,CAAME,iBAA3E;;AAEA,MAAMC,WAAW,GAAG,CAACC,QAAQ,GAAG,EAAZ,KAClBC,YAAA,CAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,EAA0B,CAACC,MAAD,EAASC,MAAT,kBACxB;EAAK,GAAG,EAAED,MAAM,CAACE;AAAjB,GACGF,MAAM,CAACG,IAAP,KAAgB,UAAhB,gBACC,6BAAC,qBAAD,eACMH,MADN;EAEE,MAAM,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EAAE0C,kBAAA,CAAUE,KAAV,CAAgB;IAC7BzC,OAAO,EAAEuC,kBAAA,CAAUK,MADU;IAE7B9C,IAAI,EAAEyC,kBAAA,CAAUO,IAFa;IAG7B/C,OAAO,EAAEwC,kBAAA,CAAUoB;EAHU,CAAhB,CAhFO;EAqFtBhE,KAAK,EAAE4C,kBAAA,CAAUE,KAAV,cAAoBmB,gBAAA,CAAQtB,SAA5B,EArFe;EAsFtBnB,OAAO,EAAEoB,kBAAA,CAAUE,KAAV,cACJS,mBAAA,CAAWZ,SADP;IAEP5D,GAAG,EAAE6D,kBAAA,CAAUK,MAFR;IAGPzE,IAAI,EAAEoE,kBAAA,CAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;EAHC,GAtFa;EA2FtBzE,WAAW,EAAE+D,kBAAA,CAAUoB,IA3FD;EA4FtBrC,gBAAgB,EAAEiB,kBAAA,CAAUO;AA5FN,CAAxB;eA+Fe1B,W"}
|
|
@@ -35,6 +35,8 @@ declare namespace JwVideoUploader {
|
|
|
35
35
|
error: PropTypes.Requireable<string>;
|
|
36
36
|
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
37
37
|
errorButtonLabel: PropTypes.Requireable<string>;
|
|
38
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
39
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
38
40
|
};
|
|
39
41
|
}
|
|
40
42
|
import PropTypes from "prop-types";
|
|
@@ -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":"AAqBA;;;;;;;;;;;;;;;;;;;EAmBE"}
|
package/lib/util/button-icons.js
CHANGED
|
@@ -22,7 +22,8 @@ const ICONS = {
|
|
|
22
22
|
see: _novaIcons.NovaCompositionCoorpacademyEye,
|
|
23
23
|
folders: _novaIcons.NovaSolidFilesFoldersFolders,
|
|
24
24
|
upload: _novaIcons.NovaSolidFilesBasicFileUpload2,
|
|
25
|
-
down: _novaIcons.NovaCompositionNavigationArrowDown
|
|
25
|
+
down: _novaIcons.NovaCompositionNavigationArrowDown,
|
|
26
|
+
pdf: _novaIcons.NovaLineFilesOfficeFileOfficePdf
|
|
26
27
|
};
|
|
27
28
|
exports.ICONS = ICONS;
|
|
28
29
|
//# sourceMappingURL=button-icons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-icons.js","names":["ICONS","add","AddIcon","analytics","AnalyticsIcon","bin","BinIcon","BulletPointIcon","ChevronLeftIcon","ChevronRightIcon","close","CloseIcon","edit","EditIcon","key","KlfIcon","list","ListIcon","logout","LogoutIcon","publish","PublishIcon","save","SaveIcon","see","EyeIcon","folders","FoldersIcon","upload","UploadIcon","down","ArrowDown"],"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} 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};\n"],"mappings":";;;;;AAAA;;
|
|
1
|
+
{"version":3,"file":"button-icons.js","names":["ICONS","add","AddIcon","analytics","AnalyticsIcon","bin","BinIcon","BulletPointIcon","ChevronLeftIcon","ChevronRightIcon","close","CloseIcon","edit","EditIcon","key","KlfIcon","list","ListIcon","logout","LogoutIcon","publish","PublishIcon","save","SaveIcon","see","EyeIcon","folders","FoldersIcon","upload","UploadIcon","down","ArrowDown","pdf","PDF"],"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 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};\n"],"mappings":";;;;;AAAA;;AAqBO,MAAMA,KAAK,GAAG;EACnBC,GAAG,EAAEC,uCADc;EAEnBC,SAAS,EAAEC,+CAFQ;EAGnBC,GAAG,EAAEC,qCAHc;EAInB,gBAAgBC,iDAJG;EAKnB,gBAAgBC,6CALG;EAMnB,iBAAiBC,8CANE;EAOnBC,KAAK,EAAEC,+BAPY;EAQnBC,IAAI,EAAEC,6CARa;EASnBC,GAAG,EAAEC,4BATc;EAUnBC,IAAI,EAAEC,6CAVa;EAWnBC,MAAM,EAAEC,gCAXW;EAYnBC,OAAO,EAAEC,6CAZU;EAanBC,IAAI,EAAEC,mCAba;EAcnBC,GAAG,EAAEC,yCAdc;EAenBC,OAAO,EAAEC,uCAfU;EAgBnBC,MAAM,EAAEC,yCAhBW;EAiBnBC,IAAI,EAAEC,6CAjBa;EAkBnBC,GAAG,EAAEC;AAlBc,CAAd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proptypes.d.ts","sourceRoot":"","sources":["../../src/util/proptypes.js"],"names":[],"mappings":"AASA,8BAAsD;AAGtD,+BAAwD;AAExD,qDAA4E;AAErE,+
|
|
1
|
+
{"version":3,"file":"proptypes.d.ts","sourceRoot":"","sources":["../../src/util/proptypes.js"],"names":[],"mappings":"AASA,8BAAsD;AAGtD,+BAAwD;AAExD,qDAA4E;AAErE,+FAMN;AAED,gCAA4C;AAC5C,8BAAwC"}
|
package/lib/util/proptypes.js
CHANGED
|
@@ -27,8 +27,8 @@ const SrcPropType = _propTypes.default.oneOfType([UrlPropType, PathPropType]);
|
|
|
27
27
|
exports.SrcPropType = SrcPropType;
|
|
28
28
|
|
|
29
29
|
const ImagePropType = (propValue, key, componentName) => {
|
|
30
|
-
if ((0, _includes.default)(propValue[key], ['
|
|
31
|
-
return new Error(`Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type:
|
|
30
|
+
if ((0, _includes.default)(propValue[key], ['image/jpeg', 'image/png', 'image/svg+xml', 'application/pdf'])) return;
|
|
31
|
+
return new Error(`Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: image/jpeg, image/png, image/svg+xml or application/pdf.`);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
exports.ImagePropType = ImagePropType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proptypes.js","names":["URL_REGEXP","UrlPropType","stringMatching","PATH_REGEXP","PathPropType","SrcPropType","PropTypes","oneOfType","ImagePropType","propValue","key","componentName","includes","Error","ColorPropType","_ColorPropType","HexPropType","_HexPropType"],"sources":["../../src/util/proptypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport includes from 'lodash/fp/includes';\nimport stringMatching from 'extended-proptypes/lib/validators/stringMatching';\n\nimport _ColorPropType from 'extended-proptypes/lib/validators/color';\nimport _HexPropType from 'extended-proptypes/lib/validators/hex';\n\nconst URL_REGEXP =\n /^(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const UrlPropType = stringMatching(URL_REGEXP);\n\nconst PATH_REGEXP = /^\\/([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const PathPropType = stringMatching(PATH_REGEXP);\n\nexport const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);\n\nexport const ImagePropType = (propValue, key, componentName) => {\n if (includes(propValue[key], ['
|
|
1
|
+
{"version":3,"file":"proptypes.js","names":["URL_REGEXP","UrlPropType","stringMatching","PATH_REGEXP","PathPropType","SrcPropType","PropTypes","oneOfType","ImagePropType","propValue","key","componentName","includes","Error","ColorPropType","_ColorPropType","HexPropType","_HexPropType"],"sources":["../../src/util/proptypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport includes from 'lodash/fp/includes';\nimport stringMatching from 'extended-proptypes/lib/validators/stringMatching';\n\nimport _ColorPropType from 'extended-proptypes/lib/validators/color';\nimport _HexPropType from 'extended-proptypes/lib/validators/hex';\n\nconst URL_REGEXP =\n /^(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const UrlPropType = stringMatching(URL_REGEXP);\n\nconst PATH_REGEXP = /^\\/([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const PathPropType = stringMatching(PATH_REGEXP);\n\nexport const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);\n\nexport const ImagePropType = (propValue, key, componentName) => {\n if (includes(propValue[key], ['image/jpeg', 'image/png', 'image/svg+xml', 'application/pdf']))\n return;\n return new Error(\n `Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: image/jpeg, image/png, image/svg+xml or application/pdf.`\n );\n};\n\nexport const ColorPropType = _ColorPropType;\nexport const HexPropType = _HexPropType;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;AAEA,MAAMA,UAAU,GACd,8FADF;AAEO,MAAMC,WAAW,GAAG,IAAAC,uBAAA,EAAeF,UAAf,CAApB;;AAEP,MAAMG,WAAW,GAAG,oCAApB;AACO,MAAMC,YAAY,GAAG,IAAAF,uBAAA,EAAeC,WAAf,CAArB;;;AAEA,MAAME,WAAW,GAAGC,kBAAA,CAAUC,SAAV,CAAoB,CAACN,WAAD,EAAcG,YAAd,CAApB,CAApB;;;;AAEA,MAAMI,aAAa,GAAG,CAACC,SAAD,EAAYC,GAAZ,EAAiBC,aAAjB,KAAmC;EAC9D,IAAI,IAAAC,iBAAA,EAASH,SAAS,CAACC,GAAD,CAAlB,EAAyB,CAAC,YAAD,EAAe,WAAf,EAA4B,eAA5B,EAA6C,iBAA7C,CAAzB,CAAJ,EACE;EACF,OAAO,IAAIG,KAAJ,CACJ,uBAAsBJ,SAAS,CAACC,GAAD,CAAM,mBAAkBC,aAAc,yFADjE,CAAP;AAGD,CANM;;;AAQA,MAAMG,aAAa,GAAGC,cAAtB;;AACA,MAAMC,WAAW,GAAGC,YAApB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.12.
|
|
3
|
+
"version": "11.12.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -166,5 +166,5 @@
|
|
|
166
166
|
"last 2 versions",
|
|
167
167
|
"IE 11"
|
|
168
168
|
],
|
|
169
|
-
"gitHead": "
|
|
169
|
+
"gitHead": "92e0c84557fc2269b55eb0d886ddf8f28387a546"
|
|
170
170
|
}
|
package/locales/.mtslconfig.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ignore_dirs":[]}
|