@coorpacademy/components 11.14.14 → 11.14.15-alpha.26
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/course-section/style.css +4 -6
- package/es/molecule/draggable/style.css +9 -5
- package/es/molecule/draggable-list/index.d.ts +50 -2
- package/es/molecule/draggable-list/index.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.js +7 -4
- package/es/molecule/draggable-list/index.js.map +1 -1
- 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 +4 -3
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +6 -4
- package/es/organism/list-items/index.d.ts +3 -32
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +17 -5
- package/es/organism/list-items/index.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +3 -32
- package/lib/molecule/course-section/style.css +4 -6
- package/lib/molecule/draggable/style.css +9 -5
- package/lib/molecule/draggable-list/index.d.ts +50 -2
- package/lib/molecule/draggable-list/index.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.js +8 -4
- package/lib/molecule/draggable-list/index.js.map +1 -1
- 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 +4 -3
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +6 -4
- package/lib/organism/list-items/index.d.ts +3 -32
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +19 -5
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +3 -32
- package/package.json +2 -2
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
font-family: Gilroy;
|
|
34
34
|
font-size: 16px;
|
|
35
35
|
font-weight: bold;
|
|
36
|
-
overflow:hidden;
|
|
37
|
-
white-space:nowrap;
|
|
38
|
-
display:inline-block;
|
|
39
|
-
text-overflow:ellipsis;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
display: inline-block;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
40
|
width: 100%;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -59,5 +59,3 @@
|
|
|
59
59
|
min-height: 56px;
|
|
60
60
|
min-width: 56px;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
@@ -13,15 +13,18 @@
|
|
|
13
13
|
background: transparent;
|
|
14
14
|
margin: 8px 0;
|
|
15
15
|
border-radius: 7px;
|
|
16
|
-
transform:translate(0,0);
|
|
16
|
+
transform: translate(0, 0);
|
|
17
17
|
z-index: 0;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
.draggable:hover {
|
|
20
21
|
background: rgba(0, 0, 0, 0.3);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
.draggable:active {
|
|
23
25
|
background: transparent;
|
|
24
26
|
}
|
|
27
|
+
|
|
25
28
|
.draggable:before {
|
|
26
29
|
content: '.';
|
|
27
30
|
position: absolute;
|
|
@@ -32,9 +35,10 @@
|
|
|
32
35
|
font-size: 25px;
|
|
33
36
|
color: medium;
|
|
34
37
|
pointer-events: none;
|
|
35
|
-
text-shadow: 0 0 medium,
|
|
36
|
-
|
|
38
|
+
text-shadow: 0 0 medium, 0 5px medium, 0 10px medium, 0 15px medium,
|
|
39
|
+
5px 0 medium, 5px 5px medium, 5px 10px medium, 5px 15px medium;
|
|
37
40
|
}
|
|
41
|
+
|
|
38
42
|
.dragging {
|
|
39
43
|
background: rgba(0, 0, 0, 0.1);
|
|
40
44
|
}
|
|
@@ -6,7 +6,7 @@ declare function DraggableList({ items, onDrop, itemType }: {
|
|
|
6
6
|
}): JSX.Element;
|
|
7
7
|
declare namespace DraggableList {
|
|
8
8
|
namespace propTypes {
|
|
9
|
-
const items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
9
|
+
const items: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
10
10
|
title: PropTypes.Validator<string>;
|
|
11
11
|
onUp: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
12
|
onDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -43,7 +43,55 @@ declare namespace DraggableList {
|
|
|
43
43
|
}> | null | undefined)[]>;
|
|
44
44
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
45
|
}>>;
|
|
46
|
-
}> |
|
|
46
|
+
}> | PropTypes.InferProps<{
|
|
47
|
+
'aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
48
|
+
title: PropTypes.Requireable<string>;
|
|
49
|
+
author: PropTypes.Requireable<string>;
|
|
50
|
+
modules: PropTypes.Requireable<string>;
|
|
51
|
+
position: PropTypes.Requireable<string>;
|
|
52
|
+
}>>;
|
|
53
|
+
image: PropTypes.Requireable<string>;
|
|
54
|
+
badgeList: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
55
|
+
category: PropTypes.Requireable<string>;
|
|
56
|
+
label: PropTypes.Requireable<string>;
|
|
57
|
+
}> | null | undefined)[]>;
|
|
58
|
+
title: PropTypes.Requireable<string>;
|
|
59
|
+
author: PropTypes.Requireable<string>;
|
|
60
|
+
position: PropTypes.Requireable<number>;
|
|
61
|
+
id: PropTypes.Requireable<string>;
|
|
62
|
+
}> | PropTypes.InferProps<{
|
|
63
|
+
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
64
|
+
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
65
|
+
menuAriaLabel: PropTypes.Requireable<string>;
|
|
66
|
+
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
67
|
+
'data-name': PropTypes.Requireable<string>;
|
|
68
|
+
label: PropTypes.Requireable<string>;
|
|
69
|
+
type: PropTypes.Requireable<string>;
|
|
70
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
71
|
+
}> | null | undefined)[]>;
|
|
72
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
73
|
+
}>>;
|
|
74
|
+
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
75
|
+
type: PropTypes.Requireable<string>;
|
|
76
|
+
label: PropTypes.Requireable<string>;
|
|
77
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
78
|
+
dataName: PropTypes.Requireable<string>;
|
|
79
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
80
|
+
position: PropTypes.Requireable<string>;
|
|
81
|
+
type: PropTypes.Requireable<string>;
|
|
82
|
+
}>>;
|
|
83
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
+
}>>;
|
|
85
|
+
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
86
|
+
label: PropTypes.Requireable<string>;
|
|
87
|
+
type: PropTypes.Requireable<string>;
|
|
88
|
+
}> | null | undefined)[]>;
|
|
89
|
+
title: PropTypes.Validator<string>;
|
|
90
|
+
order: PropTypes.Requireable<number>;
|
|
91
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
92
|
+
contentType: PropTypes.Requireable<string>;
|
|
93
|
+
id: PropTypes.Requireable<string>;
|
|
94
|
+
}> | null | undefined> | null | undefined)[]>;
|
|
47
95
|
const onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
96
|
const itemType: PropTypes.Requireable<string>;
|
|
49
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";AAaA;;;;gBAmDC"}
|
|
@@ -5,9 +5,11 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import Draggable from '../draggable';
|
|
6
6
|
import SetupSection from '../setup-section';
|
|
7
7
|
import CourseSection from '../course-section';
|
|
8
|
+
import ListItem from '../../organism/list-item';
|
|
8
9
|
const ITEMS = {
|
|
9
10
|
'setup-section': SetupSection,
|
|
10
|
-
'course-section': CourseSection
|
|
11
|
+
'course-section': CourseSection,
|
|
12
|
+
'list-item': ListItem
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
const DraggableList = ({
|
|
@@ -33,7 +35,7 @@ const DraggableList = ({
|
|
|
33
35
|
setDragFrom(null);
|
|
34
36
|
}, [onDrop, setDragTo, setDragFrom, dragFrom]);
|
|
35
37
|
const Item = ITEMS[itemType];
|
|
36
|
-
const itemsView = items.map(item => /*#__PURE__*/React.createElement(Draggable, {
|
|
38
|
+
const itemsView = items.map((item, index) => /*#__PURE__*/React.createElement(Draggable, {
|
|
37
39
|
key: item.id,
|
|
38
40
|
id: item.id,
|
|
39
41
|
dragging: dragTo === item.id,
|
|
@@ -42,13 +44,14 @@ const DraggableList = ({
|
|
|
42
44
|
onDragLeave: dragLeaveHandler,
|
|
43
45
|
onDrop: dropHandler
|
|
44
46
|
}, /*#__PURE__*/React.createElement(Item, _extends({}, item, {
|
|
45
|
-
key: item.id
|
|
47
|
+
key: item.id,
|
|
48
|
+
order: index
|
|
46
49
|
}))));
|
|
47
50
|
return /*#__PURE__*/React.createElement("div", null, itemsView);
|
|
48
51
|
};
|
|
49
52
|
|
|
50
53
|
DraggableList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
51
|
-
items: PropTypes.arrayOf(PropTypes.shape(SetupSection.propTypes)),
|
|
54
|
+
items: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(SetupSection.propTypes), PropTypes.shape(CourseSection.propTypes), PropTypes.shape(ListItem.propTypes)])),
|
|
52
55
|
onDrop: PropTypes.func,
|
|
53
56
|
itemType: PropTypes.string
|
|
54
57
|
} : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Draggable","SetupSection","CourseSection","ITEMS","DraggableList","items","onDrop","itemType","dragTo","setDragTo","dragFrom","setDragFrom","dragStartHandler","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","propTypes","arrayOf","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\n\nconst ITEMS = {'setup-section': SetupSection
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Draggable","SetupSection","CourseSection","ListItem","ITEMS","DraggableList","items","onDrop","itemType","dragTo","setDragTo","dragFrom","setDragFrom","dragStartHandler","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","index","propTypes","arrayOf","oneOfType","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\nimport ListItem from '../../organism/list-item';\n\nconst ITEMS = {\n 'setup-section': SetupSection,\n 'course-section': CourseSection,\n 'list-item': ListItem\n};\n\nconst DraggableList = ({items, onDrop, itemType}) => {\n const [dragTo, setDragTo] = useState(null);\n const [dragFrom, setDragFrom] = useState(null);\n\n const dragStartHandler = useCallback(\n id => {\n setDragFrom(id);\n },\n [setDragFrom]\n );\n\n const dragOverHandler = useCallback(\n id => {\n if (dragTo === id) return;\n setDragTo(id);\n },\n [dragTo, setDragTo]\n );\n\n const dragLeaveHandler = useCallback(\n id => {\n setDragTo(null);\n },\n [setDragTo]\n );\n\n const dropHandler = useCallback(\n id => {\n if (onDrop && dragFrom) onDrop(dragFrom, id);\n\n setDragTo(null);\n setDragFrom(null);\n },\n [onDrop, setDragTo, setDragFrom, dragFrom]\n );\n\n const Item = ITEMS[itemType];\n const itemsView = items.map((item, index) => (\n <Draggable\n key={item.id}\n id={item.id}\n dragging={dragTo === item.id}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n >\n <Item {...item} key={item.id} order={index} />\n </Draggable>\n ));\n return <div>{itemsView}</div>;\n};\n\nDraggableList.propTypes = {\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(SetupSection.propTypes),\n PropTypes.shape(CourseSection.propTypes),\n PropTypes.shape(ListItem.propTypes)\n ])\n ),\n onDrop: PropTypes.func,\n itemType: PropTypes.string\n};\n\nexport default DraggableList;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,QAAP,MAAqB,0BAArB;AAEA,MAAMC,KAAK,GAAG;EACZ,iBAAiBH,YADL;EAEZ,kBAAkBC,aAFN;EAGZ,aAAaC;AAHD,CAAd;;AAMA,MAAME,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,MAAR;EAAgBC;AAAhB,CAAD,KAA+B;EACnD,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBb,QAAQ,CAAC,IAAD,CAApC;EACA,MAAM,CAACc,QAAD,EAAWC,WAAX,IAA0Bf,QAAQ,CAAC,IAAD,CAAxC;EAEA,MAAMgB,gBAAgB,GAAGf,WAAW,CAClCgB,EAAE,IAAI;IACJF,WAAW,CAACE,EAAD,CAAX;EACD,CAHiC,EAIlC,CAACF,WAAD,CAJkC,CAApC;EAOA,MAAMG,eAAe,GAAGjB,WAAW,CACjCgB,EAAE,IAAI;IACJ,IAAIL,MAAM,KAAKK,EAAf,EAAmB;IACnBJ,SAAS,CAACI,EAAD,CAAT;EACD,CAJgC,EAKjC,CAACL,MAAD,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AAS,CAAC2B,KAAV,CAAgBvB,QAAQ,CAACoB,SAAzB,CAHkB,CAApB,CADK,CADiB;EAQxBhB,MAAM,EAAER,SAAS,CAAC4B,IARM;EASxBnB,QAAQ,EAAET,SAAS,CAAC6B;AATI,CAA1B;AAYA,eAAevB,aAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,mDA8CC"}
|
|
@@ -32,10 +32,10 @@ const ListItem = props => {
|
|
|
32
32
|
className: style.wrapper
|
|
33
33
|
}, isPublished && contentType === 'certification' ? /*#__PURE__*/React.createElement("div", {
|
|
34
34
|
className: style.orderWrapper
|
|
35
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
}, order !== null && order !== undefined ? /*#__PURE__*/React.createElement("div", {
|
|
36
36
|
className: style.order,
|
|
37
37
|
"aria-label": ariaLabel
|
|
38
|
-
}, order + 1), /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
}, order + 1) : null, /*#__PURE__*/React.createElement("div", {
|
|
39
39
|
className: style.title,
|
|
40
40
|
title: title
|
|
41
41
|
}, title)) : /*#__PURE__*/React.createElement("div", {
|
|
@@ -78,7 +78,8 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
78
78
|
title: PropTypes.string.isRequired,
|
|
79
79
|
order: PropTypes.number,
|
|
80
80
|
'aria-label': PropTypes.string,
|
|
81
|
-
contentType: PropTypes.string
|
|
81
|
+
contentType: PropTypes.string,
|
|
82
|
+
id: PropTypes.string
|
|
82
83
|
} : {};
|
|
83
84
|
export default ListItem;
|
|
84
85
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Tag","ButtonLink","BulletPointMenuButton","style","ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","wrapper","orderWrapper","settings","edit","propTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Tag","ButtonLink","BulletPointMenuButton","style","ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","wrapper","orderWrapper","undefined","settings","edit","propTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number","id"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n {order !== null && order !== undefined ? (\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n ) : null}\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string,\n id: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,yCAAlC;AACA,OAAOC,KAAP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B5B,KAAK,EAAEZ,SAAS,CAACyC,MAhCE;EAiCnB,cAAczC,SAAS,CAAC6B,MAjCL;EAkCnBf,WAAW,EAAEd,SAAS,CAAC6B,MAlCJ;EAmCnBa,EAAE,EAAE1C,SAAS,CAAC6B;AAnCK,CAArB;AAsCA,eAAexB,QAAf"}
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
text-align: left;
|
|
34
34
|
text-overflow: ellipsis;
|
|
35
35
|
white-space: nowrap;
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.settings {
|
|
40
40
|
align-items: center;
|
|
41
41
|
display: flex;
|
|
42
|
-
height: 100%;
|
|
42
|
+
height: 100%;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.tag {
|
|
46
|
-
margin: 0 16px 0 0;
|
|
46
|
+
margin: 0 16px 0 0;
|
|
47
47
|
text-overflow: ellipsis;
|
|
48
48
|
white-space: nowrap;
|
|
49
49
|
}
|
|
@@ -64,8 +64,10 @@
|
|
|
64
64
|
color: cm_grey_400;
|
|
65
65
|
margin: 0 16px 0 0;
|
|
66
66
|
}
|
|
67
|
+
|
|
67
68
|
.orderWrapper {
|
|
68
69
|
align-items: center;
|
|
69
70
|
display: flex;
|
|
70
71
|
width: 100%;
|
|
71
|
-
|
|
72
|
+
margin-left: 24px;
|
|
73
|
+
}
|
|
@@ -47,38 +47,6 @@ declare namespace ListItems {
|
|
|
47
47
|
error: PropTypes.Requireable<string>;
|
|
48
48
|
theme: PropTypes.Requireable<string>;
|
|
49
49
|
}>>;
|
|
50
|
-
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
51
|
-
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
52
|
-
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
53
|
-
menuAriaLabel: PropTypes.Requireable<string>;
|
|
54
|
-
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
55
|
-
'data-name': PropTypes.Requireable<string>;
|
|
56
|
-
label: PropTypes.Requireable<string>;
|
|
57
|
-
type: PropTypes.Requireable<string>;
|
|
58
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
59
|
-
}> | null | undefined)[]>;
|
|
60
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
|
-
}>>;
|
|
62
|
-
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
63
|
-
type: PropTypes.Requireable<string>;
|
|
64
|
-
label: PropTypes.Requireable<string>;
|
|
65
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
66
|
-
dataName: PropTypes.Requireable<string>;
|
|
67
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
|
-
position: PropTypes.Requireable<string>;
|
|
69
|
-
type: PropTypes.Requireable<string>;
|
|
70
|
-
}>>;
|
|
71
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
72
|
-
}>>;
|
|
73
|
-
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
74
|
-
label: PropTypes.Requireable<string>;
|
|
75
|
-
type: PropTypes.Requireable<string>;
|
|
76
|
-
}> | null | undefined)[]>;
|
|
77
|
-
title: PropTypes.Validator<string>;
|
|
78
|
-
order: PropTypes.Requireable<number>;
|
|
79
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
80
|
-
contentType: PropTypes.Requireable<string>;
|
|
81
|
-
}> | null | undefined)[]>;
|
|
82
50
|
content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
83
51
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
84
52
|
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -111,9 +79,12 @@ declare namespace ListItems {
|
|
|
111
79
|
order: PropTypes.Requireable<number>;
|
|
112
80
|
'aria-label': PropTypes.Requireable<string>;
|
|
113
81
|
contentType: PropTypes.Requireable<string>;
|
|
82
|
+
id: PropTypes.Requireable<string>;
|
|
114
83
|
}> | null | undefined)[]>;
|
|
115
84
|
type: PropTypes.Requireable<string>;
|
|
116
85
|
itemType: PropTypes.Requireable<string>;
|
|
86
|
+
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
87
|
+
displayAll: PropTypes.Requireable<boolean>;
|
|
117
88
|
}> | PropTypes.InferProps<{
|
|
118
89
|
type: PropTypes.Requireable<string>;
|
|
119
90
|
columns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -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":";AAiDA;;;;;;gBAwBC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import findIndex from 'lodash/fp/findIndex';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
import ListItem from '../list-item';
|
|
7
|
+
import DraggableList from '../../molecule/draggable-list';
|
|
6
8
|
import Title from '../../atom/title';
|
|
7
9
|
import ButtonLink from '../../atom/button-link';
|
|
8
10
|
import SelectMultiple from '../../molecule/select-multiple';
|
|
@@ -12,14 +14,23 @@ import style from './style.css';
|
|
|
12
14
|
const buildListItemsView = (content, ariaLabel, selectMultiple) => {
|
|
13
15
|
const {
|
|
14
16
|
items,
|
|
15
|
-
itemType
|
|
17
|
+
itemType,
|
|
18
|
+
onDrop,
|
|
19
|
+
displayAll
|
|
16
20
|
} = content;
|
|
17
|
-
const itemsView =
|
|
21
|
+
const itemsView = findIndex({
|
|
22
|
+
type: 'published'
|
|
23
|
+
}, items[0]?.tags) !== -1 && itemType === 'certification' && !displayAll ? /*#__PURE__*/React.createElement(DraggableList, {
|
|
24
|
+
items: items.map(item => _extends({}, item, {
|
|
25
|
+
contentType: itemType
|
|
26
|
+
})),
|
|
27
|
+
itemType: "list-item",
|
|
28
|
+
onDrop: onDrop
|
|
29
|
+
}) : items.map((item, index) => /*#__PURE__*/React.createElement("li", {
|
|
18
30
|
key: item.id,
|
|
19
31
|
className: style.item,
|
|
20
32
|
"data-name": `content-${index}`
|
|
21
33
|
}, /*#__PURE__*/React.createElement(ListItem, _extends({}, item, {
|
|
22
|
-
order: index,
|
|
23
34
|
contentType: itemType
|
|
24
35
|
}))));
|
|
25
36
|
return /*#__PURE__*/React.createElement("ul", {
|
|
@@ -72,11 +83,12 @@ ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
72
83
|
'aria-label': PropTypes.string,
|
|
73
84
|
buttonLink: PropTypes.shape(ButtonLink.propTypes),
|
|
74
85
|
selectMultiple: PropTypes.shape(SelectMultiple.propTypes),
|
|
75
|
-
items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),
|
|
76
86
|
content: PropTypes.oneOfType([PropTypes.shape({
|
|
77
87
|
items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),
|
|
78
88
|
type: PropTypes.oneOf(['list']),
|
|
79
|
-
itemType: PropTypes.string
|
|
89
|
+
itemType: PropTypes.string,
|
|
90
|
+
onDrop: PropTypes.func,
|
|
91
|
+
displayAll: PropTypes.bool
|
|
80
92
|
}), PropTypes.shape(_extends({}, ExpandibleActionableTable.propTypes, {
|
|
81
93
|
type: PropTypes.oneOf(['expandible-actionable-table'])
|
|
82
94
|
}))]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","ListItem","Title","ButtonLink","SelectMultiple","ExpandibleActionableTable","style","buildListItemsView","content","ariaLabel","selectMultiple","items","itemType","itemsView","map","item","index","id","list","listWithSelectMultiple","buildContentView","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","findIndex","PropTypes","ListItem","DraggableList","Title","ButtonLink","SelectMultiple","ExpandibleActionableTable","style","buildListItemsView","content","ariaLabel","selectMultiple","items","itemType","onDrop","displayAll","itemsView","type","tags","map","item","contentType","index","id","list","listWithSelectMultiple","buildContentView","ListItems","title","buttonLink","contentView","header","actionsWrapper","buttonCreate","propTypes","string","shape","oneOfType","arrayOf","oneOf","func","bool"],"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 SelectMultiple from '../../molecule/select-multiple';\nimport ExpandibleActionableTable from '../../molecule/expandible-actionable-table';\nimport style from './style.css';\n\nconst buildListItemsView = (content, ariaLabel, selectMultiple) => {\n const {items, itemType, onDrop, displayAll} = content;\n const itemsView =\n findIndex({type: 'published'}, items[0]?.tags) !== -1 &&\n itemType === 'certification' &&\n !displayAll ? (\n <DraggableList\n items={items.map(item => ({...item, contentType: itemType}))}\n itemType=\"list-item\"\n onDrop={onDrop}\n />\n ) : (\n items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} contentType={itemType} />\n </li>\n ))\n );\n return (\n <ul\n className={!selectMultiple ? style.list : style.listWithSelectMultiple}\n aria-label={ariaLabel}\n data-name={'content-list'}\n >\n {itemsView}\n </ul>\n );\n};\nconst buildContentView = (content, ariaLabel, selectMultiple) => {\n const {type} = content;\n switch (type) {\n case 'list':\n return buildListItemsView(content, ariaLabel, selectMultiple);\n case 'expandible-actionable-table':\n return <ExpandibleActionableTable {...content} />;\n }\n};\n\nconst ListItems = ({title, buttonLink, selectMultiple, content, 'aria-label': ariaLabel}) => {\n const contentView = buildContentView(content, ariaLabel, selectMultiple);\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.actionsWrapper}>\n {selectMultiple ? (\n <div className={style.selectMultiple}>\n <SelectMultiple {...selectMultiple} />\n </div>\n ) : null}\n\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n </div>\n {contentView}\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n selectMultiple: PropTypes.shape(SelectMultiple.propTypes),\n content: PropTypes.oneOfType([\n PropTypes.shape({\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n type: PropTypes.oneOf(['list']),\n itemType: PropTypes.string,\n onDrop: PropTypes.func,\n displayAll: PropTypes.bool\n }),\n PropTypes.shape({\n ...ExpandibleActionableTable.propTypes,\n type: PropTypes.oneOf(['expandible-actionable-table'])\n })\n ]),\n title: PropTypes.string\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,cAAP,MAA2B,gCAA3B;AACA,OAAOC,yBAAP,MAAsC,4CAAtC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,kBAAkB,GAAG,CAACC,OAAD,EAAUC,SAAV,EAAqBC,cAArB,KAAwC;EACjE,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBC,MAAlB;IAA0BC;EAA1B,IAAwCN,OAA9C;EACA,MAAMO,SAAS,GACbjB,SAAS,CAAC;IAACkB,IAAI,EAAE;EAAP,CAAD,EAAsBL,KAAK,CAAC,CAAD,CAAL,EAAUM,IAAh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2B,CAApB,CAJW;EAiBpBX,KAAK,EAAE5B,SAAS,CAACmC;AAjBG,CAAtB;AAoBA,eAAeR,SAAf"}
|
|
@@ -795,38 +795,6 @@ declare namespace BrandUpdate {
|
|
|
795
795
|
error: PropTypes.Requireable<string>;
|
|
796
796
|
theme: PropTypes.Requireable<string>;
|
|
797
797
|
}>>;
|
|
798
|
-
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
799
|
-
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
800
|
-
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
801
|
-
menuAriaLabel: PropTypes.Requireable<string>;
|
|
802
|
-
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
803
|
-
'data-name': PropTypes.Requireable<string>;
|
|
804
|
-
label: PropTypes.Requireable<string>;
|
|
805
|
-
type: PropTypes.Requireable<string>;
|
|
806
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
807
|
-
}> | null | undefined)[]>;
|
|
808
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
809
|
-
}>>;
|
|
810
|
-
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
811
|
-
type: PropTypes.Requireable<string>;
|
|
812
|
-
label: PropTypes.Requireable<string>;
|
|
813
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
814
|
-
dataName: PropTypes.Requireable<string>;
|
|
815
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
816
|
-
position: PropTypes.Requireable<string>;
|
|
817
|
-
type: PropTypes.Requireable<string>;
|
|
818
|
-
}>>;
|
|
819
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
820
|
-
}>>;
|
|
821
|
-
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
822
|
-
label: PropTypes.Requireable<string>;
|
|
823
|
-
type: PropTypes.Requireable<string>;
|
|
824
|
-
}> | null | undefined)[]>;
|
|
825
|
-
title: PropTypes.Validator<string>;
|
|
826
|
-
order: PropTypes.Requireable<number>;
|
|
827
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
828
|
-
contentType: PropTypes.Requireable<string>;
|
|
829
|
-
}> | null | undefined)[]>;
|
|
830
798
|
content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
831
799
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
832
800
|
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -859,9 +827,12 @@ declare namespace BrandUpdate {
|
|
|
859
827
|
order: PropTypes.Requireable<number>;
|
|
860
828
|
'aria-label': PropTypes.Requireable<string>;
|
|
861
829
|
contentType: PropTypes.Requireable<string>;
|
|
830
|
+
id: PropTypes.Requireable<string>;
|
|
862
831
|
}> | null | undefined)[]>;
|
|
863
832
|
type: PropTypes.Requireable<string>;
|
|
864
833
|
itemType: PropTypes.Requireable<string>;
|
|
834
|
+
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
835
|
+
displayAll: PropTypes.Requireable<boolean>;
|
|
865
836
|
}> | PropTypes.InferProps<{
|
|
866
837
|
type: PropTypes.Requireable<string>;
|
|
867
838
|
columns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
font-family: Gilroy;
|
|
34
34
|
font-size: 16px;
|
|
35
35
|
font-weight: bold;
|
|
36
|
-
overflow:hidden;
|
|
37
|
-
white-space:nowrap;
|
|
38
|
-
display:inline-block;
|
|
39
|
-
text-overflow:ellipsis;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
display: inline-block;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
40
|
width: 100%;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -59,5 +59,3 @@
|
|
|
59
59
|
min-height: 56px;
|
|
60
60
|
min-width: 56px;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
@@ -13,15 +13,18 @@
|
|
|
13
13
|
background: transparent;
|
|
14
14
|
margin: 8px 0;
|
|
15
15
|
border-radius: 7px;
|
|
16
|
-
transform:translate(0,0);
|
|
16
|
+
transform: translate(0, 0);
|
|
17
17
|
z-index: 0;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
.draggable:hover {
|
|
20
21
|
background: rgba(0, 0, 0, 0.3);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
.draggable:active {
|
|
23
25
|
background: transparent;
|
|
24
26
|
}
|
|
27
|
+
|
|
25
28
|
.draggable:before {
|
|
26
29
|
content: '.';
|
|
27
30
|
position: absolute;
|
|
@@ -32,9 +35,10 @@
|
|
|
32
35
|
font-size: 25px;
|
|
33
36
|
color: medium;
|
|
34
37
|
pointer-events: none;
|
|
35
|
-
text-shadow: 0 0 medium,
|
|
36
|
-
|
|
38
|
+
text-shadow: 0 0 medium, 0 5px medium, 0 10px medium, 0 15px medium,
|
|
39
|
+
5px 0 medium, 5px 5px medium, 5px 10px medium, 5px 15px medium;
|
|
37
40
|
}
|
|
41
|
+
|
|
38
42
|
.dragging {
|
|
39
43
|
background: rgba(0, 0, 0, 0.1);
|
|
40
44
|
}
|
|
@@ -6,7 +6,7 @@ declare function DraggableList({ items, onDrop, itemType }: {
|
|
|
6
6
|
}): JSX.Element;
|
|
7
7
|
declare namespace DraggableList {
|
|
8
8
|
namespace propTypes {
|
|
9
|
-
const items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
9
|
+
const items: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
10
10
|
title: PropTypes.Validator<string>;
|
|
11
11
|
onUp: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
12
|
onDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -43,7 +43,55 @@ declare namespace DraggableList {
|
|
|
43
43
|
}> | null | undefined)[]>;
|
|
44
44
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
45
|
}>>;
|
|
46
|
-
}> |
|
|
46
|
+
}> | PropTypes.InferProps<{
|
|
47
|
+
'aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
48
|
+
title: PropTypes.Requireable<string>;
|
|
49
|
+
author: PropTypes.Requireable<string>;
|
|
50
|
+
modules: PropTypes.Requireable<string>;
|
|
51
|
+
position: PropTypes.Requireable<string>;
|
|
52
|
+
}>>;
|
|
53
|
+
image: PropTypes.Requireable<string>;
|
|
54
|
+
badgeList: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
55
|
+
category: PropTypes.Requireable<string>;
|
|
56
|
+
label: PropTypes.Requireable<string>;
|
|
57
|
+
}> | null | undefined)[]>;
|
|
58
|
+
title: PropTypes.Requireable<string>;
|
|
59
|
+
author: PropTypes.Requireable<string>;
|
|
60
|
+
position: PropTypes.Requireable<number>;
|
|
61
|
+
id: PropTypes.Requireable<string>;
|
|
62
|
+
}> | PropTypes.InferProps<{
|
|
63
|
+
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
64
|
+
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
65
|
+
menuAriaLabel: PropTypes.Requireable<string>;
|
|
66
|
+
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
67
|
+
'data-name': PropTypes.Requireable<string>;
|
|
68
|
+
label: PropTypes.Requireable<string>;
|
|
69
|
+
type: PropTypes.Requireable<string>;
|
|
70
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
71
|
+
}> | null | undefined)[]>;
|
|
72
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
73
|
+
}>>;
|
|
74
|
+
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
75
|
+
type: PropTypes.Requireable<string>;
|
|
76
|
+
label: PropTypes.Requireable<string>;
|
|
77
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
78
|
+
dataName: PropTypes.Requireable<string>;
|
|
79
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
80
|
+
position: PropTypes.Requireable<string>;
|
|
81
|
+
type: PropTypes.Requireable<string>;
|
|
82
|
+
}>>;
|
|
83
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
+
}>>;
|
|
85
|
+
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
86
|
+
label: PropTypes.Requireable<string>;
|
|
87
|
+
type: PropTypes.Requireable<string>;
|
|
88
|
+
}> | null | undefined)[]>;
|
|
89
|
+
title: PropTypes.Validator<string>;
|
|
90
|
+
order: PropTypes.Requireable<number>;
|
|
91
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
92
|
+
contentType: PropTypes.Requireable<string>;
|
|
93
|
+
id: PropTypes.Requireable<string>;
|
|
94
|
+
}> | null | undefined> | null | undefined)[]>;
|
|
47
95
|
const onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
96
|
const itemType: PropTypes.Requireable<string>;
|
|
49
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";AAaA;;;;gBAmDC"}
|
|
@@ -13,6 +13,8 @@ var _setupSection = _interopRequireDefault(require("../setup-section"));
|
|
|
13
13
|
|
|
14
14
|
var _courseSection = _interopRequireDefault(require("../course-section"));
|
|
15
15
|
|
|
16
|
+
var _listItem = _interopRequireDefault(require("../../organism/list-item"));
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -23,7 +25,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
23
25
|
|
|
24
26
|
const ITEMS = {
|
|
25
27
|
'setup-section': _setupSection.default,
|
|
26
|
-
'course-section': _courseSection.default
|
|
28
|
+
'course-section': _courseSection.default,
|
|
29
|
+
'list-item': _listItem.default
|
|
27
30
|
};
|
|
28
31
|
|
|
29
32
|
const DraggableList = ({
|
|
@@ -49,7 +52,7 @@ const DraggableList = ({
|
|
|
49
52
|
setDragFrom(null);
|
|
50
53
|
}, [onDrop, setDragTo, setDragFrom, dragFrom]);
|
|
51
54
|
const Item = ITEMS[itemType];
|
|
52
|
-
const itemsView = items.map(item => /*#__PURE__*/_react.default.createElement(_draggable.default, {
|
|
55
|
+
const itemsView = items.map((item, index) => /*#__PURE__*/_react.default.createElement(_draggable.default, {
|
|
53
56
|
key: item.id,
|
|
54
57
|
id: item.id,
|
|
55
58
|
dragging: dragTo === item.id,
|
|
@@ -58,13 +61,14 @@ const DraggableList = ({
|
|
|
58
61
|
onDragLeave: dragLeaveHandler,
|
|
59
62
|
onDrop: dropHandler
|
|
60
63
|
}, /*#__PURE__*/_react.default.createElement(Item, _extends({}, item, {
|
|
61
|
-
key: item.id
|
|
64
|
+
key: item.id,
|
|
65
|
+
order: index
|
|
62
66
|
}))));
|
|
63
67
|
return /*#__PURE__*/_react.default.createElement("div", null, itemsView);
|
|
64
68
|
};
|
|
65
69
|
|
|
66
70
|
DraggableList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
67
|
-
items: _propTypes.default.arrayOf(_propTypes.default.shape(_setupSection.default.propTypes)),
|
|
71
|
+
items: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape(_setupSection.default.propTypes), _propTypes.default.shape(_courseSection.default.propTypes), _propTypes.default.shape(_listItem.default.propTypes)])),
|
|
68
72
|
onDrop: _propTypes.default.func,
|
|
69
73
|
itemType: _propTypes.default.string
|
|
70
74
|
} : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ITEMS","SetupSection","CourseSection","DraggableList","items","onDrop","itemType","dragTo","setDragTo","useState","dragFrom","setDragFrom","dragStartHandler","useCallback","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","propTypes","PropTypes","arrayOf","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\n\nconst ITEMS = {'setup-section': SetupSection
|
|
1
|
+
{"version":3,"file":"index.js","names":["ITEMS","SetupSection","CourseSection","ListItem","DraggableList","items","onDrop","itemType","dragTo","setDragTo","useState","dragFrom","setDragFrom","dragStartHandler","useCallback","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","index","propTypes","PropTypes","arrayOf","oneOfType","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\nimport ListItem from '../../organism/list-item';\n\nconst ITEMS = {\n 'setup-section': SetupSection,\n 'course-section': CourseSection,\n 'list-item': ListItem\n};\n\nconst DraggableList = ({items, onDrop, itemType}) => {\n const [dragTo, setDragTo] = useState(null);\n const [dragFrom, setDragFrom] = useState(null);\n\n const dragStartHandler = useCallback(\n id => {\n setDragFrom(id);\n },\n [setDragFrom]\n );\n\n const dragOverHandler = useCallback(\n id => {\n if (dragTo === id) return;\n setDragTo(id);\n },\n [dragTo, setDragTo]\n );\n\n const dragLeaveHandler = useCallback(\n id => {\n setDragTo(null);\n },\n [setDragTo]\n );\n\n const dropHandler = useCallback(\n id => {\n if (onDrop && dragFrom) onDrop(dragFrom, id);\n\n setDragTo(null);\n setDragFrom(null);\n },\n [onDrop, setDragTo, setDragFrom, dragFrom]\n );\n\n const Item = ITEMS[itemType];\n const itemsView = items.map((item, index) => (\n <Draggable\n key={item.id}\n id={item.id}\n dragging={dragTo === item.id}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n >\n <Item {...item} key={item.id} order={index} />\n </Draggable>\n ));\n return <div>{itemsView}</div>;\n};\n\nDraggableList.propTypes = {\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(SetupSection.propTypes),\n PropTypes.shape(CourseSection.propTypes),\n PropTypes.shape(ListItem.propTypes)\n ])\n ),\n onDrop: PropTypes.func,\n itemType: PropTypes.string\n};\n\nexport default DraggableList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,KAAK,GAAG;EACZ,iBAAiBC,qBADL;EAEZ,kBAAkBC,sBAFN;EAGZ,aAAaC;AAHD,CAAd;;AAMA,MAAMC,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,MAAR;EAAgBC;AAAhB,CAAD,KAA+B;EACnD,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAAS,IAAT,CAA5B;EACA,MAAM,CAACC,QAAD,EAAWC,WAAX,IAA0B,IAAAF,eAAA,EAAS,IAAT,CAAhC;EAEA,MAAMG,gBAAgB,GAAG,IAAAC,kBAAA,EACvBC,EAAE,IAAI;IACJH,WAAW,CAACG,EAAD,CAAX;EACD,CAHsB,EAIvB,CAACH,WAAD,CAJuB,CAAzB;EAOA,MAAMI,eAAe,GAAG,IAAAF,kBAAA,EACtBC,EAAE,IAAI;IACJ,IAAIP,MAAM,KAAKO,EAAf,EAAmB;IACnBN,SAAS,CAACM,EAAD,CAAT;EACD,CAJqB,EAKtB,CAACP,MAAD,EAASC,SAAT,CALsB,CAAxB;EAQA,MAAMQ,gBAAgB,GAAG,IAAAH,kBAAA,EACvBC,EAAE,IAAI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iB;EAQxBlB,MAAM,EAAEmB,kBAAA,CAAUI,IARM;EASxBtB,QAAQ,EAAEkB,kBAAA,CAAUK;AATI,CAA1B;eAYe1B,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,mDA8CC"}
|
|
@@ -45,10 +45,10 @@ const ListItem = props => {
|
|
|
45
45
|
className: _style.default.wrapper
|
|
46
46
|
}, isPublished && contentType === 'certification' ? /*#__PURE__*/_react.default.createElement("div", {
|
|
47
47
|
className: _style.default.orderWrapper
|
|
48
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
+
}, order !== null && order !== undefined ? /*#__PURE__*/_react.default.createElement("div", {
|
|
49
49
|
className: _style.default.order,
|
|
50
50
|
"aria-label": ariaLabel
|
|
51
|
-
}, order + 1), /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
}, order + 1) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
52
52
|
className: _style.default.title,
|
|
53
53
|
title: title
|
|
54
54
|
}, title)) : /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -91,7 +91,8 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
91
91
|
title: _propTypes.default.string.isRequired,
|
|
92
92
|
order: _propTypes.default.number,
|
|
93
93
|
'aria-label': _propTypes.default.string,
|
|
94
|
-
contentType: _propTypes.default.string
|
|
94
|
+
contentType: _propTypes.default.string,
|
|
95
|
+
id: _propTypes.default.string
|
|
95
96
|
} : {};
|
|
96
97
|
var _default = ListItem;
|
|
97
98
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","style","wrapper","orderWrapper","settings","edit","propTypes","PropTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","style","wrapper","orderWrapper","undefined","settings","edit","propTypes","PropTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number","id"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n {order !== null && order !== undefined ? (\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n ) : null}\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string,\n id: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,IAAIC,WAAW,GAAG,KAAlB;EACA,MAAM;IACJC,qBADI;IAEJC,UAFI;IAGJC,IAHI;IAIJC,KAJI;IAKJC,KALI;IAMJ,cAAcC,SANV;IAOJC;EAPI,IAQFR,KARJ;;EASA,MAAMS,QAAQ,GAAG,cAAIC,O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|
34
34
|
text-overflow: ellipsis;
|
|
35
35
|
white-space: nowrap;
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.settings {
|
|
40
40
|
align-items: center;
|
|
41
41
|
display: flex;
|
|
42
|
-
height: 100%;
|
|
42
|
+
height: 100%;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.tag {
|
|
46
|
-
margin: 0 16px 0 0;
|
|
46
|
+
margin: 0 16px 0 0;
|
|
47
47
|
text-overflow: ellipsis;
|
|
48
48
|
white-space: nowrap;
|
|
49
49
|
}
|
|
@@ -64,8 +64,10 @@
|
|
|
64
64
|
color: cm_grey_400;
|
|
65
65
|
margin: 0 16px 0 0;
|
|
66
66
|
}
|
|
67
|
+
|
|
67
68
|
.orderWrapper {
|
|
68
69
|
align-items: center;
|
|
69
70
|
display: flex;
|
|
70
71
|
width: 100%;
|
|
71
|
-
|
|
72
|
+
margin-left: 24px;
|
|
73
|
+
}
|
|
@@ -47,38 +47,6 @@ declare namespace ListItems {
|
|
|
47
47
|
error: PropTypes.Requireable<string>;
|
|
48
48
|
theme: PropTypes.Requireable<string>;
|
|
49
49
|
}>>;
|
|
50
|
-
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
51
|
-
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
52
|
-
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
53
|
-
menuAriaLabel: PropTypes.Requireable<string>;
|
|
54
|
-
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
55
|
-
'data-name': PropTypes.Requireable<string>;
|
|
56
|
-
label: PropTypes.Requireable<string>;
|
|
57
|
-
type: PropTypes.Requireable<string>;
|
|
58
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
59
|
-
}> | null | undefined)[]>;
|
|
60
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
|
-
}>>;
|
|
62
|
-
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
63
|
-
type: PropTypes.Requireable<string>;
|
|
64
|
-
label: PropTypes.Requireable<string>;
|
|
65
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
66
|
-
dataName: PropTypes.Requireable<string>;
|
|
67
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
|
-
position: PropTypes.Requireable<string>;
|
|
69
|
-
type: PropTypes.Requireable<string>;
|
|
70
|
-
}>>;
|
|
71
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
72
|
-
}>>;
|
|
73
|
-
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
74
|
-
label: PropTypes.Requireable<string>;
|
|
75
|
-
type: PropTypes.Requireable<string>;
|
|
76
|
-
}> | null | undefined)[]>;
|
|
77
|
-
title: PropTypes.Validator<string>;
|
|
78
|
-
order: PropTypes.Requireable<number>;
|
|
79
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
80
|
-
contentType: PropTypes.Requireable<string>;
|
|
81
|
-
}> | null | undefined)[]>;
|
|
82
50
|
content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
83
51
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
84
52
|
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -111,9 +79,12 @@ declare namespace ListItems {
|
|
|
111
79
|
order: PropTypes.Requireable<number>;
|
|
112
80
|
'aria-label': PropTypes.Requireable<string>;
|
|
113
81
|
contentType: PropTypes.Requireable<string>;
|
|
82
|
+
id: PropTypes.Requireable<string>;
|
|
114
83
|
}> | null | undefined)[]>;
|
|
115
84
|
type: PropTypes.Requireable<string>;
|
|
116
85
|
itemType: PropTypes.Requireable<string>;
|
|
86
|
+
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
87
|
+
displayAll: PropTypes.Requireable<boolean>;
|
|
117
88
|
}> | PropTypes.InferProps<{
|
|
118
89
|
type: PropTypes.Requireable<string>;
|
|
119
90
|
columns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -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":";AAiDA;;;;;;gBAwBC"}
|
|
@@ -5,10 +5,14 @@ exports.default = void 0;
|
|
|
5
5
|
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
|
|
8
|
+
var _findIndex = _interopRequireDefault(require("lodash/fp/findIndex"));
|
|
9
|
+
|
|
8
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
11
|
|
|
10
12
|
var _listItem = _interopRequireDefault(require("../list-item"));
|
|
11
13
|
|
|
14
|
+
var _draggableList = _interopRequireDefault(require("../../molecule/draggable-list"));
|
|
15
|
+
|
|
12
16
|
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
13
17
|
|
|
14
18
|
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
@@ -26,14 +30,23 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
26
30
|
const buildListItemsView = (content, ariaLabel, selectMultiple) => {
|
|
27
31
|
const {
|
|
28
32
|
items,
|
|
29
|
-
itemType
|
|
33
|
+
itemType,
|
|
34
|
+
onDrop,
|
|
35
|
+
displayAll
|
|
30
36
|
} = content;
|
|
31
|
-
const itemsView =
|
|
37
|
+
const itemsView = (0, _findIndex.default)({
|
|
38
|
+
type: 'published'
|
|
39
|
+
}, items[0]?.tags) !== -1 && itemType === 'certification' && !displayAll ? /*#__PURE__*/_react.default.createElement(_draggableList.default, {
|
|
40
|
+
items: items.map(item => _extends({}, item, {
|
|
41
|
+
contentType: itemType
|
|
42
|
+
})),
|
|
43
|
+
itemType: "list-item",
|
|
44
|
+
onDrop: onDrop
|
|
45
|
+
}) : items.map((item, index) => /*#__PURE__*/_react.default.createElement("li", {
|
|
32
46
|
key: item.id,
|
|
33
47
|
className: _style.default.item,
|
|
34
48
|
"data-name": `content-${index}`
|
|
35
49
|
}, /*#__PURE__*/_react.default.createElement(_listItem.default, _extends({}, item, {
|
|
36
|
-
order: index,
|
|
37
50
|
contentType: itemType
|
|
38
51
|
}))));
|
|
39
52
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
@@ -86,11 +99,12 @@ ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
86
99
|
'aria-label': _propTypes.default.string,
|
|
87
100
|
buttonLink: _propTypes.default.shape(_buttonLink.default.propTypes),
|
|
88
101
|
selectMultiple: _propTypes.default.shape(_selectMultiple.default.propTypes),
|
|
89
|
-
items: _propTypes.default.arrayOf(_propTypes.default.shape(_listItem.default.propTypes)),
|
|
90
102
|
content: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
91
103
|
items: _propTypes.default.arrayOf(_propTypes.default.shape(_listItem.default.propTypes)),
|
|
92
104
|
type: _propTypes.default.oneOf(['list']),
|
|
93
|
-
itemType: _propTypes.default.string
|
|
105
|
+
itemType: _propTypes.default.string,
|
|
106
|
+
onDrop: _propTypes.default.func,
|
|
107
|
+
displayAll: _propTypes.default.bool
|
|
94
108
|
}), _propTypes.default.shape(_extends({}, _expandibleActionableTable.default.propTypes, {
|
|
95
109
|
type: _propTypes.default.oneOf(['expandible-actionable-table'])
|
|
96
110
|
}))]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["buildListItemsView","content","ariaLabel","selectMultiple","items","itemType","itemsView","map","item","index","id","style","list","listWithSelectMultiple","buildContentView","
|
|
1
|
+
{"version":3,"file":"index.js","names":["buildListItemsView","content","ariaLabel","selectMultiple","items","itemType","onDrop","displayAll","itemsView","findIndex","type","tags","map","item","contentType","index","id","style","list","listWithSelectMultiple","buildContentView","ListItems","title","buttonLink","contentView","header","actionsWrapper","buttonCreate","propTypes","PropTypes","string","shape","ButtonLink","SelectMultiple","oneOfType","arrayOf","ListItem","oneOf","func","bool","ExpandibleActionableTable"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport 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 SelectMultiple from '../../molecule/select-multiple';\nimport ExpandibleActionableTable from '../../molecule/expandible-actionable-table';\nimport style from './style.css';\n\nconst buildListItemsView = (content, ariaLabel, selectMultiple) => {\n const {items, itemType, onDrop, displayAll} = content;\n const itemsView =\n findIndex({type: 'published'}, items[0]?.tags) !== -1 &&\n itemType === 'certification' &&\n !displayAll ? (\n <DraggableList\n items={items.map(item => ({...item, contentType: itemType}))}\n itemType=\"list-item\"\n onDrop={onDrop}\n />\n ) : (\n items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} contentType={itemType} />\n </li>\n ))\n );\n return (\n <ul\n className={!selectMultiple ? style.list : style.listWithSelectMultiple}\n aria-label={ariaLabel}\n data-name={'content-list'}\n >\n {itemsView}\n </ul>\n );\n};\nconst buildContentView = (content, ariaLabel, selectMultiple) => {\n const {type} = content;\n switch (type) {\n case 'list':\n return buildListItemsView(content, ariaLabel, selectMultiple);\n case 'expandible-actionable-table':\n return <ExpandibleActionableTable {...content} />;\n }\n};\n\nconst ListItems = ({title, buttonLink, selectMultiple, content, 'aria-label': ariaLabel}) => {\n const contentView = buildContentView(content, ariaLabel, selectMultiple);\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.actionsWrapper}>\n {selectMultiple ? (\n <div className={style.selectMultiple}>\n <SelectMultiple {...selectMultiple} />\n </div>\n ) : null}\n\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n </div>\n {contentView}\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n selectMultiple: PropTypes.shape(SelectMultiple.propTypes),\n content: PropTypes.oneOfType([\n PropTypes.shape({\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n type: PropTypes.oneOf(['list']),\n itemType: PropTypes.string,\n onDrop: PropTypes.func,\n displayAll: PropTypes.bool\n }),\n PropTypes.shape({\n ...ExpandibleActionableTable.propTypes,\n type: PropTypes.oneOf(['expandible-actionable-table'])\n })\n ]),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,kBAAkB,GAAG,CAACC,OAAD,EAAUC,SAAV,EAAqBC,cAArB,KAAwC;EACjE,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBC,MAAlB;IAA0BC;EAA1B,IAAwCN,OAA9C;EACA,MAAMO,SAAS,GACb,IAAAC,kBAAA,EAAU;IAACC,IAAI,EAAE;EAAP,CAAV,EAA+BN,KAAK,CAAC,CAAD,CAAL,EAAUO,IAAzC,MAAmD,CAAC,CAApD,IACAN,QAAQ,KAAK,eADb,IAEA,CAACE,UAFD,gBAGE,6BAAC,sBAAD;IACE,KAAK,EAAEH,KAAK,CAACQ,GAAN,CAAUC,IAAI,iBAASA,IAAT;MAAeC,WAAW,EAAET;IAA5B,EAAd,CADT;IAEE,QAAQ,EAAC,WAFX;IAGE,MAAM,EAAEC;EAHV,EAHF,GASEF,KAAK,CAACQ,GAAN,CAAU,CAACC,IAAD,EAAOE,KAAP,kBACR;IAAI,GAAG,EAAEF,IAAI,CAACG,EAAd;IAAkB,SAAS,EAAEC,cAAA,CAAMJ,IAAnC;IAAyC,aAAY,WAAUE,KAAM;EAArE,gBACE,6BAAC,iBAAD,eAAcF,IAAd;IAAoB,WAAW,EAAER;EAAjC,GADF,CADF,CAV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cC,kBAAA,CAAUC,MADJ;EAEpBP,UAAU,EAAEM,kBAAA,CAAUE,KAAV,CAAgBC,mBAAA,CAAWJ,SAA3B,CAFQ;EAGpBzB,cAAc,EAAE0B,kBAAA,CAAUE,KAAV,CAAgBE,uBAAA,CAAeL,SAA/B,CAHI;EAIpB3B,OAAO,EAAE4B,kBAAA,CAAUK,SAAV,CAAoB,CAC3BL,kBAAA,CAAUE,KAAV,CAAgB;IACd3B,KAAK,EAAEyB,kBAAA,CAAUM,OAAV,CAAkBN,kBAAA,CAAUE,KAAV,CAAgBK,iBAAA,CAASR,SAAzB,CAAlB,CADO;IAEdlB,IAAI,EAAEmB,kBAAA,CAAUQ,KAAV,CAAgB,CAAC,MAAD,CAAhB,CAFQ;IAGdhC,QAAQ,EAAEwB,kBAAA,CAAUC,MAHN;IAIdxB,MAAM,EAAEuB,kBAAA,CAAUS,IAJJ;IAKd/B,UAAU,EAAEsB,kBAAA,CAAUU;EALR,CAAhB,CAD2B,EAQ3BV,kBAAA,CAAUE,KAAV,cACKS,kCAAA,CAA0BZ,SAD/B;IAEElB,IAAI,EAAEmB,kBAAA,CAAUQ,KAAV,CAAgB,CAAC,6BAAD,CAAhB;EAFR,GAR2B,CAApB,CAJW;EAiBpBf,KAAK,EAAEO,kBAAA,CAAUC;AAjBG,CAAtB;eAoBeT,S"}
|
|
@@ -795,38 +795,6 @@ declare namespace BrandUpdate {
|
|
|
795
795
|
error: PropTypes.Requireable<string>;
|
|
796
796
|
theme: PropTypes.Requireable<string>;
|
|
797
797
|
}>>;
|
|
798
|
-
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
799
|
-
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
800
|
-
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
801
|
-
menuAriaLabel: PropTypes.Requireable<string>;
|
|
802
|
-
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
803
|
-
'data-name': PropTypes.Requireable<string>;
|
|
804
|
-
label: PropTypes.Requireable<string>;
|
|
805
|
-
type: PropTypes.Requireable<string>;
|
|
806
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
807
|
-
}> | null | undefined)[]>;
|
|
808
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
809
|
-
}>>;
|
|
810
|
-
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
811
|
-
type: PropTypes.Requireable<string>;
|
|
812
|
-
label: PropTypes.Requireable<string>;
|
|
813
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
814
|
-
dataName: PropTypes.Requireable<string>;
|
|
815
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
816
|
-
position: PropTypes.Requireable<string>;
|
|
817
|
-
type: PropTypes.Requireable<string>;
|
|
818
|
-
}>>;
|
|
819
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
820
|
-
}>>;
|
|
821
|
-
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
822
|
-
label: PropTypes.Requireable<string>;
|
|
823
|
-
type: PropTypes.Requireable<string>;
|
|
824
|
-
}> | null | undefined)[]>;
|
|
825
|
-
title: PropTypes.Validator<string>;
|
|
826
|
-
order: PropTypes.Requireable<number>;
|
|
827
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
828
|
-
contentType: PropTypes.Requireable<string>;
|
|
829
|
-
}> | null | undefined)[]>;
|
|
830
798
|
content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
831
799
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
832
800
|
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -859,9 +827,12 @@ declare namespace BrandUpdate {
|
|
|
859
827
|
order: PropTypes.Requireable<number>;
|
|
860
828
|
'aria-label': PropTypes.Requireable<string>;
|
|
861
829
|
contentType: PropTypes.Requireable<string>;
|
|
830
|
+
id: PropTypes.Requireable<string>;
|
|
862
831
|
}> | null | undefined)[]>;
|
|
863
832
|
type: PropTypes.Requireable<string>;
|
|
864
833
|
itemType: PropTypes.Requireable<string>;
|
|
834
|
+
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
835
|
+
displayAll: PropTypes.Requireable<boolean>;
|
|
865
836
|
}> | PropTypes.InferProps<{
|
|
866
837
|
type: PropTypes.Requireable<string>;
|
|
867
838
|
columns: PropTypes.Requireable<(PropTypes.InferProps<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.14.
|
|
3
|
+
"version": "11.14.15-alpha.26+1469a38a3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"last 2 versions",
|
|
169
169
|
"IE 11"
|
|
170
170
|
],
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "1469a38a3d54229bc0d91ffeefb28020af4ce625"
|
|
172
172
|
}
|