@coorpacademy/components 11.12.3-alpha.3 → 11.12.3-alpha.4
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/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +3 -1
- package/es/organism/list-items/index.js.map +1 -1
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +3 -1
- package/lib/organism/list-items/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";AAkCA;;;;;;;gBAcC"}
|
|
@@ -14,7 +14,9 @@ const buildItemsView = (items, contentType, onDrop, ariaLabel) => {
|
|
|
14
14
|
type: 'published'
|
|
15
15
|
}, items[0]?.tags) !== -1;
|
|
16
16
|
if (isPublished && contentType === 'certification') return /*#__PURE__*/React.createElement(DraggableList, {
|
|
17
|
-
items: items,
|
|
17
|
+
items: items.map(item => _extends({}, item, {
|
|
18
|
+
contentType
|
|
19
|
+
})),
|
|
18
20
|
itemType: "list-item",
|
|
19
21
|
onDrop: onDrop
|
|
20
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","findIndex","PropTypes","ListItem","DraggableList","Title","ButtonLink","style","buildItemsView","items","contentType","onDrop","ariaLabel","isPublished","type","tags","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","findIndex","PropTypes","ListItem","DraggableList","Title","ButtonLink","style","buildItemsView","items","contentType","onDrop","ariaLabel","isPublished","type","tags","map","item","itemsView","index","id","list","ListItems","title","buttonLink","header","buttonCreate","propTypes","string","shape","arrayOf","func"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport findIndex from 'lodash/fp/findIndex';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport DraggableList from '../../molecule/draggable-list';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildItemsView = (items, contentType, onDrop, ariaLabel) => {\n const isPublished = findIndex({type: 'published'}, items[0]?.tags) !== -1;\n\n if (isPublished && contentType === 'certification')\n return (\n <DraggableList\n items={items.map(item => ({...item, contentType}))}\n itemType=\"list-item\"\n onDrop={onDrop}\n />\n );\n\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 <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n );\n};\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType, onDrop}) => {\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 {buildItemsView(items, contentType, onDrop, ariaLabel)}\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 onDrop: PropTypes.func\n};\n\nexport default ListItems;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,qBAAtB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CAACC,KAAD,EAAQC,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F,UAAhB,CADF,CAJF,CADF,EASGhB,cAAc,CAACC,KAAD,EAAQC,WAAR,EAAqBC,MAArB,EAA6BC,SAA7B,CATjB,CADF;AAaD,CAdD;;AAgBAU,SAAS,CAACK,SAAV,2CAAsB;EACpB,cAAczB,SAAS,CAAC0B,MADJ;EAEpBJ,UAAU,EAAEtB,SAAS,CAAC2B,KAAV,CAAgBvB,UAAU,CAACqB,SAA3B,CAFQ;EAGpBlB,KAAK,EAAEP,SAAS,CAAC4B,OAAV,CAAkB5B,SAAS,CAAC2B,KAAV,CAAgB1B,QAAQ,CAACwB,SAAzB,CAAlB,CAHa;EAIpBJ,KAAK,EAAErB,SAAS,CAAC0B,MAJG;EAKpBlB,WAAW,EAAER,SAAS,CAAC0B,MALH;EAMpBjB,MAAM,EAAET,SAAS,CAAC6B;AANE,CAAtB;AASA,eAAeT,SAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";AAkCA;;;;;;;gBAcC"}
|
|
@@ -28,7 +28,9 @@ const buildItemsView = (items, contentType, onDrop, ariaLabel) => {
|
|
|
28
28
|
type: 'published'
|
|
29
29
|
}, items[0]?.tags) !== -1;
|
|
30
30
|
if (isPublished && contentType === 'certification') return /*#__PURE__*/_react.default.createElement(_draggableList.default, {
|
|
31
|
-
items: items,
|
|
31
|
+
items: items.map(item => _extends({}, item, {
|
|
32
|
+
contentType
|
|
33
|
+
})),
|
|
32
34
|
itemType: "list-item",
|
|
33
35
|
onDrop: onDrop
|
|
34
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["buildItemsView","items","contentType","onDrop","ariaLabel","isPublished","findIndex","type","tags","
|
|
1
|
+
{"version":3,"file":"index.js","names":["buildItemsView","items","contentType","onDrop","ariaLabel","isPublished","findIndex","type","tags","map","item","itemsView","index","id","style","list","ListItems","title","buttonLink","header","buttonCreate","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem","func"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport findIndex from 'lodash/fp/findIndex';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport DraggableList from '../../molecule/draggable-list';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildItemsView = (items, contentType, onDrop, ariaLabel) => {\n const isPublished = findIndex({type: 'published'}, items[0]?.tags) !== -1;\n\n if (isPublished && contentType === 'certification')\n return (\n <DraggableList\n items={items.map(item => ({...item, contentType}))}\n itemType=\"list-item\"\n onDrop={onDrop}\n />\n );\n\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 <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n );\n};\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType, onDrop}) => {\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 {buildItemsView(items, contentType, onDrop, ariaLabel)}\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 onDrop: PropTypes.func\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,cAAc,GAAG,CAACC,KAAD,EAAQC,WAAR,EAAqBC,MAArB,EAA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,CAJF,CADF,EASGlB,cAAc,CAACC,KAAD,EAAQC,WAAR,EAAqBC,MAArB,EAA6BC,SAA7B,CATjB,CADF;AAaD,CAdD;;AAgBAY,SAAS,CAACK,SAAV,2CAAsB;EACpB,cAAcC,kBAAA,CAAUC,MADJ;EAEpBL,UAAU,EAAEI,kBAAA,CAAUE,KAAV,CAAgBC,mBAAA,CAAWJ,SAA3B,CAFQ;EAGpBpB,KAAK,EAAEqB,kBAAA,CAAUI,OAAV,CAAkBJ,kBAAA,CAAUE,KAAV,CAAgBG,iBAAA,CAASN,SAAzB,CAAlB,CAHa;EAIpBJ,KAAK,EAAEK,kBAAA,CAAUC,MAJG;EAKpBrB,WAAW,EAAEoB,kBAAA,CAAUC,MALH;EAMpBpB,MAAM,EAAEmB,kBAAA,CAAUM;AANE,CAAtB;eASeZ,S"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.12.3-alpha.
|
|
3
|
+
"version": "11.12.3-alpha.4+b41e0efb8",
|
|
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": "b41e0efb80954dd2ccf1be446af707fdbc255266"
|
|
170
170
|
}
|