@coorpacademy/components 11.34.1 → 11.34.2-alpha.74
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/progress-wrapper/index.d.ts.map +1 -1
- package/es/molecule/progress-wrapper/index.js +10 -5
- package/es/molecule/progress-wrapper/index.js.map +1 -1
- package/es/organism/skill-edition/index.d.ts +52 -1232
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/index.js +231 -3
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/types.d.ts +119 -1241
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/skill-edition/types.js +58 -7
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +52 -1232
- package/es/template/certification-detail/index.js +3 -2
- package/es/template/certification-detail/index.js.map +1 -1
- package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/progress-wrapper/index.js +10 -5
- package/lib/molecule/progress-wrapper/index.js.map +1 -1
- package/lib/organism/skill-edition/index.d.ts +52 -1232
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.js +230 -3
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/types.d.ts +119 -1241
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.js +58 -7
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +52 -1232
- package/lib/template/certification-detail/index.js +3 -2
- package/lib/template/certification-detail/index.js.map +1 -1
- package/locales/bs/global.json +13 -11
- package/locales/cs/global.json +8 -6
- package/locales/de/global.json +8 -6
- package/locales/en/global.json +8 -6
- package/locales/es/global.json +8 -6
- package/locales/et/global.json +8 -6
- package/locales/fi/global.json +8 -6
- package/locales/fr/global.json +8 -6
- package/locales/hr/global.json +8 -6
- package/locales/hu/global.json +8 -6
- package/locales/hy/global.json +13 -11
- package/locales/it/global.json +8 -6
- package/locales/ja/global.json +8 -6
- package/locales/ko/global.json +8 -6
- package/locales/nl/global.json +8 -6
- package/locales/pl/global.json +8 -6
- package/locales/pt/global.json +8 -6
- package/locales/ro/global.json +8 -6
- package/locales/ru/global.json +8 -6
- package/locales/sk/global.json +8 -6
- package/locales/sl/global.json +8 -6
- package/locales/sv/global.json +8 -6
- package/locales/tl/global.json +8 -6
- package/locales/tr/global.json +8 -6
- package/locales/uk/global.json +8 -6
- package/locales/vi/global.json +8 -6
- package/locales/zh/global.json +13 -11
- package/locales/zh_TW/global.json +10 -8
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAGhB,qBAAqB,EAEtB,MAAM,SAAS,CAAC;AAqNjB,QAAA,MAAM,YAAY;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAejD,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -2,14 +2,243 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
+
var _map2 = _interopRequireDefault(require("lodash/fp/map"));
|
|
6
|
+
var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
|
|
7
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
8
|
+
var _includes2 = _interopRequireDefault(require("lodash/fp/includes"));
|
|
5
9
|
var _react = _interopRequireDefault(require("react"));
|
|
6
10
|
var _brandFormGroup = _interopRequireDefault(require("../../molecule/brand-form-group"));
|
|
7
11
|
var _listItems = _interopRequireDefault(require("../list-items"));
|
|
8
12
|
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
9
13
|
var _titleAndInput = _interopRequireDefault(require("../title-and-input"));
|
|
14
|
+
var _colors = require("../../variables/colors");
|
|
10
15
|
var _types = _interopRequireDefault(require("./types"));
|
|
11
16
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
12
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
// @ts-expect-error convert is not recognized by the types
|
|
19
|
+
const uncappedMap = _map2.default.convert({
|
|
20
|
+
cap: false
|
|
21
|
+
});
|
|
22
|
+
const builTitleButton = (label, onClick) => ({
|
|
23
|
+
type: 'primary',
|
|
24
|
+
label,
|
|
25
|
+
'aria-label': label,
|
|
26
|
+
'data-name': `button-${label}`,
|
|
27
|
+
onClick,
|
|
28
|
+
hoverBackgroundColor: _colors.COLORS.primary_100,
|
|
29
|
+
hoverColor: _colors.COLORS.cm_primary_blue,
|
|
30
|
+
icon: {
|
|
31
|
+
position: 'left',
|
|
32
|
+
faIcon: {
|
|
33
|
+
name: 'plus',
|
|
34
|
+
color: _colors.COLORS.cm_primary_blue,
|
|
35
|
+
size: 14,
|
|
36
|
+
customStyle: {
|
|
37
|
+
padding: 0
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
customStyle: {
|
|
42
|
+
width: 'fit-content',
|
|
43
|
+
backgroundColor: _colors.COLORS.cm_blue_50,
|
|
44
|
+
color: _colors.COLORS.cm_primary_blue,
|
|
45
|
+
borderRadius: '12px',
|
|
46
|
+
paddingRight: '8px',
|
|
47
|
+
paddingleft: '16px',
|
|
48
|
+
fontWeight: 600
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const buildTranslationItems = ({
|
|
52
|
+
title: itemTitle,
|
|
53
|
+
onEditClick,
|
|
54
|
+
onDeleteClick
|
|
55
|
+
}, index) => ({
|
|
56
|
+
id: index,
|
|
57
|
+
title: itemTitle,
|
|
58
|
+
buttonLink: {
|
|
59
|
+
'aria-label': 'Edit',
|
|
60
|
+
type: 'primary',
|
|
61
|
+
customStyle: {
|
|
62
|
+
width: 'fit-content',
|
|
63
|
+
backgroundColor: 'transparent'
|
|
64
|
+
},
|
|
65
|
+
hoverBackgroundColor: _colors.COLORS.gray,
|
|
66
|
+
icon: {
|
|
67
|
+
position: 'left',
|
|
68
|
+
faIcon: {
|
|
69
|
+
name: 'edit',
|
|
70
|
+
color: _colors.COLORS.cm_grey_500,
|
|
71
|
+
size: 16
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
onClick: onEditClick
|
|
75
|
+
},
|
|
76
|
+
secondButtonLink: {
|
|
77
|
+
'aria-label': 'Delete',
|
|
78
|
+
type: 'primary',
|
|
79
|
+
customStyle: {
|
|
80
|
+
width: 'fit-content',
|
|
81
|
+
backgroundColor: 'transparent'
|
|
82
|
+
},
|
|
83
|
+
hoverBackgroundColor: _colors.COLORS.gray,
|
|
84
|
+
icon: {
|
|
85
|
+
position: 'left',
|
|
86
|
+
faIcon: {
|
|
87
|
+
name: 'trash',
|
|
88
|
+
color: _colors.COLORS.cm_grey_500,
|
|
89
|
+
size: 16
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
onClick: onDeleteClick
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const Translations = ({
|
|
96
|
+
title,
|
|
97
|
+
subtitle,
|
|
98
|
+
items,
|
|
99
|
+
button: {
|
|
100
|
+
label,
|
|
101
|
+
onClick
|
|
102
|
+
},
|
|
103
|
+
localesOptions,
|
|
104
|
+
emptyResult
|
|
105
|
+
}) => {
|
|
106
|
+
const button = builTitleButton(label, onClick);
|
|
107
|
+
const translationMenuAction = {
|
|
108
|
+
button,
|
|
109
|
+
menu: {
|
|
110
|
+
buttons: (0, _map2.default)(({
|
|
111
|
+
label: optionLabel,
|
|
112
|
+
ref: optionRef,
|
|
113
|
+
onClick: optionOnClick
|
|
114
|
+
}) => ({
|
|
115
|
+
type: 'defaultLeft',
|
|
116
|
+
onClick: optionOnClick,
|
|
117
|
+
customStyle: {
|
|
118
|
+
width: '238px'
|
|
119
|
+
},
|
|
120
|
+
label: optionLabel,
|
|
121
|
+
'data-name': optionLabel,
|
|
122
|
+
// disable if current locale option is already in items list
|
|
123
|
+
disabled: (0, _includes2.default)(optionRef, (0, _keys2.default)(items))
|
|
124
|
+
}), localesOptions)
|
|
125
|
+
},
|
|
126
|
+
menuWrapper: {
|
|
127
|
+
customStyle: {
|
|
128
|
+
maxHeight: '252px'
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
const translationProps = {
|
|
133
|
+
title: {
|
|
134
|
+
title,
|
|
135
|
+
type: 'form-group',
|
|
136
|
+
subtitle,
|
|
137
|
+
titleSize: 'xl-strong',
|
|
138
|
+
subtitleSize: 'medium'
|
|
139
|
+
},
|
|
140
|
+
'aria-label': title,
|
|
141
|
+
content: {
|
|
142
|
+
...(!(0, _isEmpty2.default)(emptyResult) && {
|
|
143
|
+
emptyResult: {
|
|
144
|
+
...emptyResult,
|
|
145
|
+
button: translationMenuAction
|
|
146
|
+
}
|
|
147
|
+
}),
|
|
148
|
+
items: uncappedMap(buildTranslationItems, items),
|
|
149
|
+
type: 'list'
|
|
150
|
+
},
|
|
151
|
+
buttonMenuAction: translationMenuAction
|
|
152
|
+
};
|
|
153
|
+
return /*#__PURE__*/_react.default.createElement(_listItems.default, translationProps);
|
|
154
|
+
};
|
|
155
|
+
const buildContentItem = ({
|
|
156
|
+
ref,
|
|
157
|
+
title,
|
|
158
|
+
subtitle,
|
|
159
|
+
image,
|
|
160
|
+
tags: {
|
|
161
|
+
label,
|
|
162
|
+
iconName
|
|
163
|
+
},
|
|
164
|
+
checkbox
|
|
165
|
+
}) => ({
|
|
166
|
+
id: ref,
|
|
167
|
+
title,
|
|
168
|
+
subtitle,
|
|
169
|
+
image,
|
|
170
|
+
tags: [{
|
|
171
|
+
label,
|
|
172
|
+
type: 'default',
|
|
173
|
+
icon: {
|
|
174
|
+
iconName,
|
|
175
|
+
preset: 's',
|
|
176
|
+
customStyle: {
|
|
177
|
+
padding: 0
|
|
178
|
+
},
|
|
179
|
+
position: 'left'
|
|
180
|
+
}
|
|
181
|
+
}],
|
|
182
|
+
checkbox
|
|
183
|
+
});
|
|
184
|
+
const Content = ({
|
|
185
|
+
title,
|
|
186
|
+
subtitle,
|
|
187
|
+
button: {
|
|
188
|
+
label: buttonLabel,
|
|
189
|
+
onClick
|
|
190
|
+
},
|
|
191
|
+
list: {
|
|
192
|
+
title: listTitle,
|
|
193
|
+
checkbox,
|
|
194
|
+
items,
|
|
195
|
+
search,
|
|
196
|
+
emptyResult
|
|
197
|
+
}
|
|
198
|
+
}) => {
|
|
199
|
+
const button = builTitleButton(buttonLabel, onClick);
|
|
200
|
+
const titleProps = {
|
|
201
|
+
type: 'form-group',
|
|
202
|
+
title,
|
|
203
|
+
subtitle,
|
|
204
|
+
button,
|
|
205
|
+
required: true
|
|
206
|
+
};
|
|
207
|
+
const listProps = {
|
|
208
|
+
...(!(0, _isEmpty2.default)(checkbox) && {
|
|
209
|
+
...checkbox,
|
|
210
|
+
icon: {
|
|
211
|
+
iconName: 'minus',
|
|
212
|
+
iconColor: _colors.COLORS.white,
|
|
213
|
+
preset: 's'
|
|
214
|
+
},
|
|
215
|
+
customStyle: {
|
|
216
|
+
fontWeight: 600,
|
|
217
|
+
color: _colors.COLORS.cm_grey_500,
|
|
218
|
+
fontSize: '16px'
|
|
219
|
+
}
|
|
220
|
+
}),
|
|
221
|
+
title: listTitle,
|
|
222
|
+
'aria-label': 'content list items',
|
|
223
|
+
content: {
|
|
224
|
+
...(!(0, _isEmpty2.default)(emptyResult) && {
|
|
225
|
+
emptyResult: {
|
|
226
|
+
...emptyResult,
|
|
227
|
+
button
|
|
228
|
+
}
|
|
229
|
+
}),
|
|
230
|
+
items: (0, _map2.default)(buildContentItem, items),
|
|
231
|
+
type: 'list'
|
|
232
|
+
},
|
|
233
|
+
search: {
|
|
234
|
+
...search,
|
|
235
|
+
theme: 'coorpmanager'
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
239
|
+
className: _style.default.contentContainer
|
|
240
|
+
}, /*#__PURE__*/_react.default.createElement(_title.default, titleProps), /*#__PURE__*/_react.default.createElement(_listItems.default, listProps));
|
|
241
|
+
};
|
|
13
242
|
const SkillEdition = props => {
|
|
14
243
|
const {
|
|
15
244
|
skillInformations,
|
|
@@ -22,9 +251,7 @@ const SkillEdition = props => {
|
|
|
22
251
|
className: _style.default.skillInformationsContainer
|
|
23
252
|
}, /*#__PURE__*/_react.default.createElement(_brandFormGroup.default, skillInformations.form), /*#__PURE__*/_react.default.createElement("div", {
|
|
24
253
|
className: _style.default.iconEditor
|
|
25
|
-
}, /*#__PURE__*/_react.default.createElement(_titleAndInput.default, skillInformations.iconEditor))), /*#__PURE__*/_react.default.createElement(
|
|
26
|
-
className: _style.default.contentContainer
|
|
27
|
-
}, /*#__PURE__*/_react.default.createElement(_title.default, content.title), /*#__PURE__*/_react.default.createElement(_listItems.default, content.listContent)));
|
|
254
|
+
}, /*#__PURE__*/_react.default.createElement(_titleAndInput.default, skillInformations.iconEditor))), /*#__PURE__*/_react.default.createElement(Translations, translations), /*#__PURE__*/_react.default.createElement(Content, content));
|
|
28
255
|
};
|
|
29
256
|
SkillEdition.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
|
|
30
257
|
var _default = exports.default = SkillEdition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_brandFormGroup","_listItems","_title","_titleAndInput","_types","_style","e","__esModule","default","SkillEdition","props","skillInformations","translations","content","createElement","className","style","container","skillInformationsContainer","form","iconEditor","contentContainer","title","listContent","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/organism/skill-edition/index.tsx"],"sourcesContent":["import React from 'react';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport TitleAndInput from '../title-and-input';\nimport propTypes, {SkillEditionProps} from './types';\nimport style from './style.css';\n\nconst SkillEdition = (props: SkillEditionProps) => {\n const {skillInformations, translations, content} = props;\n\n return (\n <div className={style.container}>\n <div className={style.skillInformationsContainer}>\n <BrandFormGroup {...skillInformations.form} />\n <div className={style.iconEditor}>\n <TitleAndInput {...skillInformations.iconEditor} />\n </div>\n </div>\n <ListItems {...translations} />\n <div className={style.contentContainer}>\n <Title {...content.title} />\n <ListItems {...content.listContent} />\n </div>\n </div>\n );\n};\n\nSkillEdition.propTypes = propTypes;\n\nexport default SkillEdition;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,MAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,MAAA,GAAAP,sBAAA,CA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reList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_brandFormGroup","_listItems","_title","_titleAndInput","_colors","_types","_style","e","__esModule","default","uncappedMap","_map2","convert","cap","builTitleButton","label","onClick","type","hoverBackgroundColor","COLORS","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","paddingRight","paddingleft","fontWeight","buildTranslationItems","title","itemTitle","onEditClick","onDeleteClick","index","id","buttonLink","gray","cm_grey_500","secondButtonLink","Translations","subtitle","items","button","localesOptions","emptyResult","translationMenuAction","menu","buttons","optionLabel","ref","optionRef","optionOnClick","disabled","_includes2","_keys2","menuWrapper","maxHeight","translationProps","titleSize","subtitleSize","content","_isEmpty2","buttonMenuAction","createElement","buildContentItem","image","tags","iconName","checkbox","preset","Content","buttonLabel","list","listTitle","search","titleProps","required","listProps","iconColor","white","fontSize","theme","className","style","contentContainer","SkillEdition","props","skillInformations","translations","container","skillInformationsContainer","form","iconEditor","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/organism/skill-edition/index.tsx"],"sourcesContent":["import React from 'react';\nimport {includes, isEmpty, keys, map} from 'lodash/fp';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport TitleAndInput from '../title-and-input';\nimport {COLORS} from '../../variables/colors';\nimport propTypes, {\n ContentPropsType,\n ContentListItemType,\n SkillEditionPropsType,\n TranslationPropsType\n} from './types';\nimport style from './style.css';\n\n// @ts-expect-error convert is not recognized by the types\nconst uncappedMap = map.convert({cap: false});\n\nconst builTitleButton = (label: string, onClick: () => void) => ({\n type: 'primary',\n label,\n 'aria-label': label,\n 'data-name': `button-${label}`,\n onClick,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n paddingRight: '8px',\n paddingleft: '16px',\n fontWeight: 600\n }\n});\n\nconst buildTranslationItems = (\n {\n title: itemTitle,\n onEditClick,\n onDeleteClick\n }: {title: string; onEditClick: () => void; onDeleteClick: () => void},\n index: number\n) => ({\n id: index,\n title: itemTitle,\n buttonLink: {\n 'aria-label': 'Edit',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.gray,\n icon: {\n position: 'left',\n faIcon: {\n name: 'edit',\n color: COLORS.cm_grey_500,\n size: 16\n }\n },\n onClick: onEditClick\n },\n secondButtonLink: {\n 'aria-label': 'Delete',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.gray,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.cm_grey_500,\n size: 16\n }\n },\n onClick: onDeleteClick\n }\n});\n\nconst Translations = ({\n title,\n subtitle,\n items,\n button: {label, onClick},\n localesOptions,\n emptyResult\n}: TranslationPropsType) => {\n const button = builTitleButton(label, onClick);\n\n const translationMenuAction = {\n button,\n menu: {\n buttons: map(\n ({\n label: optionLabel,\n ref: optionRef,\n onClick: optionOnClick\n }: {\n label: string;\n ref: string;\n onClick: () => void;\n }) => ({\n type: 'defaultLeft',\n onClick: optionOnClick,\n customStyle: {width: '238px'},\n label: optionLabel,\n 'data-name': optionLabel,\n // disable if current locale option is already in items list\n disabled: includes(optionRef, keys(items))\n }),\n localesOptions\n )\n },\n menuWrapper: {\n customStyle: {maxHeight: '252px'}\n }\n };\n\n const translationProps = {\n title: {\n title,\n type: 'form-group',\n subtitle,\n titleSize: 'xl-strong',\n subtitleSize: 'medium'\n },\n 'aria-label': title,\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: translationMenuAction}}),\n items: uncappedMap(buildTranslationItems, items),\n type: 'list'\n },\n buttonMenuAction: translationMenuAction\n };\n\n return <ListItems {...translationProps} />;\n};\n\nconst buildContentItem = ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox\n}: ContentListItemType) => ({\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: 'default',\n icon: {\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox\n});\n\nconst Content = ({\n title,\n subtitle,\n button: {label: buttonLabel, onClick},\n list: {title: listTitle, checkbox, items, search, emptyResult}\n}: ContentPropsType) => {\n const button = builTitleButton(buttonLabel, onClick);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button,\n required: true\n };\n\n const listProps = {\n ...(!isEmpty(checkbox) && {\n ...checkbox,\n icon: {iconName: 'minus', iconColor: COLORS.white, preset: 's'},\n customStyle: {fontWeight: 600, color: COLORS.cm_grey_500, fontSize: '16px'}\n }),\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button}}),\n items: map(buildContentItem, items),\n type: 'list'\n },\n search: {\n ...search,\n theme: 'coorpmanager'\n }\n };\n\n return (\n <div className={style.contentContainer}>\n <Title {...titleProps} />\n <ListItems {...listProps} />\n </div>\n );\n};\n\nconst SkillEdition = (props: SkillEditionPropsType) => {\n const {skillInformations, translations, content} = props;\n\n return (\n <div className={style.container}>\n <div className={style.skillInformationsContainer}>\n <BrandFormGroup {...skillInformations.form} />\n <div className={style.iconEditor}>\n <TitleAndInput {...skillInformations.iconEditor} />\n </div>\n </div>\n <Translations {...translations} />\n <Content {...content} />\n </div>\n );\n};\n\nSkillEdition.propTypes = propTypes;\n\nexport default SkillEdition;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,O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