@coorpacademy/components 11.42.1 → 11.42.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/checkbox-with-title/index.d.ts +1 -0
- package/es/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/es/atom/checkbox-with-title/index.js +6 -3
- package/es/atom/checkbox-with-title/index.js.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +3 -0
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/index.js +23 -5
- package/es/atom/radio-with-title/index.js.map +1 -1
- package/es/atom/radio-with-title/style.css +27 -0
- package/es/atom/radio-with-title/types.d.ts +6 -0
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.js +3 -0
- package/es/atom/radio-with-title/types.js.map +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +20 -3
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +17 -0
- package/es/molecule/cm-popin/types.d.ts +36 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +3 -0
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +6 -0
- package/es/molecule/progress-bar/index.d.ts +16 -7
- package/es/molecule/progress-bar/index.d.ts.map +1 -1
- package/es/molecule/progress-bar/index.js +61 -4
- package/es/molecule/progress-bar/index.js.map +1 -1
- package/es/molecule/progress-bar/style.css +56 -0
- package/es/molecule/table/index.d.ts +8 -0
- package/es/molecule/table/index.d.ts.map +1 -1
- package/es/molecule/table/index.js +43 -5
- package/es/molecule/table/index.js.map +1 -1
- package/es/molecule/table/style.css +24 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/es/molecule/title-radio-wrapper/index.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/molecule/wizard-summary/index.d.ts +3 -0
- package/es/molecule/wizard-summary/index.d.ts.map +1 -1
- package/es/molecule/wizard-summary/index.js +35 -3
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +54 -1
- package/es/organism/brand-learning-priorities/index.d.ts +6 -0
- package/es/organism/brand-table/index.d.ts +8 -0
- package/es/organism/content-selection-list/index.d.ts +95 -0
- package/es/organism/content-selection-list/index.d.ts.map +1 -0
- package/es/organism/content-selection-list/index.js +175 -0
- package/es/organism/content-selection-list/index.js.map +1 -0
- package/es/organism/content-selection-list/style.css +8 -0
- package/es/organism/content-selection-list/types.d.ts +113 -0
- package/es/organism/content-selection-list/types.d.ts.map +1 -0
- package/es/organism/content-selection-list/types.js +58 -0
- package/es/organism/content-selection-list/types.js.map +1 -0
- package/es/organism/content-skill-modal/index.d.ts +7 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +7 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/list-item/index.d.ts +9 -1
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +16 -3
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +15 -0
- package/es/organism/list-items/index.d.ts +7 -0
- package/es/organism/rewards-form/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +1 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/skill-edition/index.d.ts +8 -3
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/index.js +3 -168
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/styles.d.ts +10 -0
- package/es/organism/skill-edition/styles.d.ts.map +1 -0
- package/es/organism/skill-edition/styles.js +10 -0
- package/es/organism/skill-edition/styles.js.map +1 -0
- package/es/organism/skill-edition/types.d.ts +10 -54
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/skill-edition/types.js +3 -52
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/organism/title-and-input/index.d.ts +1 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +1 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +4 -0
- package/es/template/app-player/loading/index.d.ts +33 -0
- package/es/template/app-player/player/index.d.ts +66 -0
- package/es/template/app-player/player/slides/index.d.ts +33 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +33 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +33 -0
- package/es/template/app-review/index.d.ts +33 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +33 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +33 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +80 -3
- package/es/template/certification-detail/index.d.ts +33 -0
- package/es/template/common/dashboard/index.d.ts +66 -0
- package/es/template/common/search-page/index.d.ts +33 -0
- package/es/template/external-course/index.d.ts +33 -0
- package/es/template/playlist-detail/index.d.ts +33 -0
- package/lib/atom/checkbox-with-title/index.d.ts +1 -0
- package/lib/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/lib/atom/checkbox-with-title/index.js +6 -3
- package/lib/atom/checkbox-with-title/index.js.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +3 -0
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/index.js +23 -5
- package/lib/atom/radio-with-title/index.js.map +1 -1
- package/lib/atom/radio-with-title/style.css +27 -0
- package/lib/atom/radio-with-title/types.d.ts +6 -0
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.js +3 -0
- package/lib/atom/radio-with-title/types.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +20 -3
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +17 -0
- package/lib/molecule/cm-popin/types.d.ts +36 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +3 -0
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +6 -0
- package/lib/molecule/progress-bar/index.d.ts +16 -7
- package/lib/molecule/progress-bar/index.d.ts.map +1 -1
- package/lib/molecule/progress-bar/index.js +61 -4
- package/lib/molecule/progress-bar/index.js.map +1 -1
- package/lib/molecule/progress-bar/style.css +56 -0
- package/lib/molecule/table/index.d.ts +8 -0
- package/lib/molecule/table/index.d.ts.map +1 -1
- package/lib/molecule/table/index.js +43 -5
- package/lib/molecule/table/index.js.map +1 -1
- package/lib/molecule/table/style.css +24 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/molecule/wizard-summary/index.d.ts +3 -0
- package/lib/molecule/wizard-summary/index.d.ts.map +1 -1
- package/lib/molecule/wizard-summary/index.js +35 -3
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +54 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +6 -0
- package/lib/organism/brand-table/index.d.ts +8 -0
- package/lib/organism/content-selection-list/index.d.ts +95 -0
- package/lib/organism/content-selection-list/index.d.ts.map +1 -0
- package/lib/organism/content-selection-list/index.js +181 -0
- package/lib/organism/content-selection-list/index.js.map +1 -0
- package/lib/organism/content-selection-list/style.css +8 -0
- package/lib/organism/content-selection-list/types.d.ts +113 -0
- package/lib/organism/content-selection-list/types.d.ts.map +1 -0
- package/lib/organism/content-selection-list/types.js +63 -0
- package/lib/organism/content-selection-list/types.js.map +1 -0
- package/lib/organism/content-skill-modal/index.d.ts +7 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +7 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/list-item/index.d.ts +9 -1
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +16 -3
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +15 -0
- package/lib/organism/list-items/index.d.ts +7 -0
- package/lib/organism/rewards-form/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +1 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.d.ts +8 -3
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.js +11 -174
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/styles.d.ts +10 -0
- package/lib/organism/skill-edition/styles.d.ts.map +1 -0
- package/lib/organism/skill-edition/styles.js +15 -0
- package/lib/organism/skill-edition/styles.js.map +1 -0
- package/lib/organism/skill-edition/types.d.ts +10 -54
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.js +6 -53
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +1 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +1 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +4 -0
- package/lib/template/app-player/loading/index.d.ts +33 -0
- package/lib/template/app-player/player/index.d.ts +66 -0
- package/lib/template/app-player/player/slides/index.d.ts +33 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +33 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +33 -0
- package/lib/template/app-review/index.d.ts +33 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +33 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +33 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +80 -3
- package/lib/template/certification-detail/index.d.ts +33 -0
- package/lib/template/common/dashboard/index.d.ts +66 -0
- package/lib/template/common/search-page/index.d.ts +33 -0
- package/lib/template/external-course/index.d.ts +33 -0
- package/lib/template/playlist-detail/index.d.ts +33 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AAQA,OAAkB,EAEhB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AAQA,OAAkB,EAEhB,qBAAqB,EAItB,MAAM,SAAS,CAAC;AAuQjB,QAAA,MAAM,YAAY;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcjD,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -10,12 +10,14 @@ var _includes2 = _interopRequireDefault(require("lodash/fp/includes"));
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _brandFormGroup = _interopRequireDefault(require("../../molecule/brand-form-group"));
|
|
12
12
|
var _listItems = _interopRequireDefault(require("../list-items"));
|
|
13
|
-
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
14
13
|
var _titleAndInput = _interopRequireDefault(require("../title-and-input"));
|
|
15
14
|
var _colors = require("../../variables/colors");
|
|
16
15
|
var _loader = _interopRequireDefault(require("../../atom/loader"));
|
|
16
|
+
var _contentSelectionList = _interopRequireWildcard(require("../content-selection-list"));
|
|
17
17
|
var _types = _interopRequireDefault(require("./types"));
|
|
18
|
-
var
|
|
18
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
22
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
21
23
|
const buildFormField = (field, type, readOnly) => {
|
|
@@ -133,9 +135,9 @@ const SkillInformations = skillInformations => {
|
|
|
133
135
|
fields
|
|
134
136
|
};
|
|
135
137
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
136
|
-
className:
|
|
138
|
+
className: _styles.default.skillInformationsContainer
|
|
137
139
|
}, /*#__PURE__*/_react.default.createElement(_brandFormGroup.default, formProps), /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
-
className:
|
|
140
|
+
className: _styles.default.iconEditor
|
|
139
141
|
}, /*#__PURE__*/_react.default.createElement(_titleAndInput.default, iconEditorProps)));
|
|
140
142
|
};
|
|
141
143
|
|
|
@@ -143,32 +145,6 @@ const SkillInformations = skillInformations => {
|
|
|
143
145
|
const uncappedMap = _map2.default.convert({
|
|
144
146
|
cap: false
|
|
145
147
|
});
|
|
146
|
-
const buildButtonProps = button => ({
|
|
147
|
-
...button,
|
|
148
|
-
type: 'primary',
|
|
149
|
-
'aria-label': button.label,
|
|
150
|
-
'data-name': `button-${button.label}`,
|
|
151
|
-
hoverBackgroundColor: _colors.COLORS.primary_100,
|
|
152
|
-
hoverColor: _colors.COLORS.cm_primary_blue,
|
|
153
|
-
icon: {
|
|
154
|
-
position: 'left',
|
|
155
|
-
faIcon: {
|
|
156
|
-
name: 'plus',
|
|
157
|
-
color: _colors.COLORS.cm_primary_blue,
|
|
158
|
-
size: 14,
|
|
159
|
-
customStyle: {
|
|
160
|
-
padding: 0
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
customStyle: {
|
|
165
|
-
width: 'fit-content',
|
|
166
|
-
backgroundColor: _colors.COLORS.cm_blue_50,
|
|
167
|
-
color: _colors.COLORS.cm_primary_blue,
|
|
168
|
-
borderRadius: '12px',
|
|
169
|
-
fontWeight: 600
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
148
|
const buildTranslationItems = ({
|
|
173
149
|
title: itemTitle,
|
|
174
150
|
onEditClick,
|
|
@@ -227,7 +203,7 @@ const Translations = ({
|
|
|
227
203
|
emptyResult,
|
|
228
204
|
readOnly = false
|
|
229
205
|
}) => {
|
|
230
|
-
const buttonProps = buildButtonProps(button);
|
|
206
|
+
const buttonProps = (0, _contentSelectionList.buildButtonProps)(button);
|
|
231
207
|
const translationMenuAction = {
|
|
232
208
|
button: buttonProps,
|
|
233
209
|
menu: {
|
|
@@ -279,145 +255,6 @@ const Translations = ({
|
|
|
279
255
|
};
|
|
280
256
|
return /*#__PURE__*/_react.default.createElement(_listItems.default, translationProps);
|
|
281
257
|
};
|
|
282
|
-
const buildContentItem = readOnly => ({
|
|
283
|
-
ref,
|
|
284
|
-
title,
|
|
285
|
-
subtitle,
|
|
286
|
-
image,
|
|
287
|
-
tags: {
|
|
288
|
-
label,
|
|
289
|
-
iconName
|
|
290
|
-
},
|
|
291
|
-
checkbox,
|
|
292
|
-
deleteButton
|
|
293
|
-
}) => {
|
|
294
|
-
return {
|
|
295
|
-
...(readOnly ? {} : {
|
|
296
|
-
secondButtonLink: {
|
|
297
|
-
...deleteButton,
|
|
298
|
-
'data-name': `button-${deleteButton?.label}`,
|
|
299
|
-
'aria-label': 'Delete',
|
|
300
|
-
type: 'primary',
|
|
301
|
-
customStyle: {
|
|
302
|
-
width: 'fit-content',
|
|
303
|
-
backgroundColor: 'transparent'
|
|
304
|
-
},
|
|
305
|
-
hoverBackgroundColor: _colors.COLORS.cm_grey_100,
|
|
306
|
-
icon: {
|
|
307
|
-
position: 'left',
|
|
308
|
-
faIcon: {
|
|
309
|
-
name: 'trash',
|
|
310
|
-
color: _colors.COLORS.neutral_500,
|
|
311
|
-
size: 16
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}),
|
|
316
|
-
id: ref,
|
|
317
|
-
title,
|
|
318
|
-
subtitle,
|
|
319
|
-
image,
|
|
320
|
-
tags: [{
|
|
321
|
-
label,
|
|
322
|
-
type: 'default',
|
|
323
|
-
icon: {
|
|
324
|
-
iconName,
|
|
325
|
-
preset: 's',
|
|
326
|
-
customStyle: {
|
|
327
|
-
padding: 0
|
|
328
|
-
},
|
|
329
|
-
position: 'left'
|
|
330
|
-
}
|
|
331
|
-
}],
|
|
332
|
-
checkbox: readOnly ? undefined : checkbox
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
|
-
const Content = ({
|
|
336
|
-
title,
|
|
337
|
-
subtitle,
|
|
338
|
-
button,
|
|
339
|
-
list: {
|
|
340
|
-
title: listTitle,
|
|
341
|
-
checkbox,
|
|
342
|
-
items,
|
|
343
|
-
search,
|
|
344
|
-
emptyResult
|
|
345
|
-
},
|
|
346
|
-
actionButtons,
|
|
347
|
-
checkboxWithTitle: checkboxWithTitleProps,
|
|
348
|
-
readOnly = false,
|
|
349
|
-
isFetching = false
|
|
350
|
-
}) => {
|
|
351
|
-
const buttonProps = buildButtonProps(button);
|
|
352
|
-
const titleProps = {
|
|
353
|
-
type: 'form-group',
|
|
354
|
-
title,
|
|
355
|
-
subtitle,
|
|
356
|
-
button: !readOnly ? buttonProps : undefined,
|
|
357
|
-
required: true
|
|
358
|
-
};
|
|
359
|
-
const listProps = {
|
|
360
|
-
...(!(0, _isEmpty2.default)(checkbox) && {
|
|
361
|
-
...checkbox,
|
|
362
|
-
icon: {
|
|
363
|
-
iconName: 'minus',
|
|
364
|
-
iconColor: _colors.COLORS.white,
|
|
365
|
-
preset: 's'
|
|
366
|
-
},
|
|
367
|
-
customStyle: {
|
|
368
|
-
fontWeight: 600,
|
|
369
|
-
color: _colors.COLORS.cm_grey_500,
|
|
370
|
-
fontSize: '16px'
|
|
371
|
-
}
|
|
372
|
-
}),
|
|
373
|
-
title: listTitle,
|
|
374
|
-
'aria-label': 'content list items',
|
|
375
|
-
content: {
|
|
376
|
-
...(!(0, _isEmpty2.default)(emptyResult) && {
|
|
377
|
-
emptyResult: {
|
|
378
|
-
...emptyResult,
|
|
379
|
-
button: buttonProps
|
|
380
|
-
}
|
|
381
|
-
}),
|
|
382
|
-
items: (0, _map2.default)(buildContentItem(readOnly), items),
|
|
383
|
-
type: 'list'
|
|
384
|
-
},
|
|
385
|
-
search: {
|
|
386
|
-
...search,
|
|
387
|
-
theme: 'coorpmanager',
|
|
388
|
-
// Keep search interactive even in readOnly mode
|
|
389
|
-
disabled: false
|
|
390
|
-
},
|
|
391
|
-
actionButtons: readOnly ? [] : (0, _map2.default)(actionButton => ({
|
|
392
|
-
...actionButton,
|
|
393
|
-
customStyle: {
|
|
394
|
-
fontWeight: '600',
|
|
395
|
-
borderRadius: '12px',
|
|
396
|
-
width: 'auto'
|
|
397
|
-
}
|
|
398
|
-
}), actionButtons),
|
|
399
|
-
checkboxWithTitle: readOnly ? undefined : {
|
|
400
|
-
...checkboxWithTitleProps,
|
|
401
|
-
name: checkboxWithTitleProps?.title,
|
|
402
|
-
'aria-label': checkboxWithTitleProps?.title,
|
|
403
|
-
'data-name': checkboxWithTitleProps?.title,
|
|
404
|
-
customStyle: {
|
|
405
|
-
fontWeight: 600,
|
|
406
|
-
color: _colors.COLORS.neutral_500,
|
|
407
|
-
fontSize: '16px'
|
|
408
|
-
},
|
|
409
|
-
icon: {
|
|
410
|
-
iconName: 'minus',
|
|
411
|
-
iconColor: 'white',
|
|
412
|
-
preset: 's'
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
|
-
isFetching
|
|
416
|
-
};
|
|
417
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
418
|
-
className: _style.default.contentContainer
|
|
419
|
-
}, /*#__PURE__*/_react.default.createElement(_title.default, titleProps), /*#__PURE__*/_react.default.createElement(_listItems.default, listProps));
|
|
420
|
-
};
|
|
421
258
|
const SkillEdition = props => {
|
|
422
259
|
const {
|
|
423
260
|
skillInformations,
|
|
@@ -427,17 +264,17 @@ const SkillEdition = props => {
|
|
|
427
264
|
readOnly
|
|
428
265
|
} = props;
|
|
429
266
|
return isFetching ? /*#__PURE__*/_react.default.createElement("div", {
|
|
430
|
-
className:
|
|
267
|
+
className: _styles.default.loaderContainer
|
|
431
268
|
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
432
|
-
className:
|
|
269
|
+
className: _styles.default.loader,
|
|
433
270
|
theme: "coorpmanager"
|
|
434
271
|
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
435
|
-
className:
|
|
272
|
+
className: _styles.default.container
|
|
436
273
|
}, /*#__PURE__*/_react.default.createElement(SkillInformations, _extends({}, skillInformations, {
|
|
437
274
|
readOnly: readOnly
|
|
438
275
|
})), /*#__PURE__*/_react.default.createElement(Translations, _extends({}, translations, {
|
|
439
276
|
readOnly: readOnly
|
|
440
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
277
|
+
})), /*#__PURE__*/_react.default.createElement(_contentSelectionList.default, _extends({}, content, {
|
|
441
278
|
readOnly: readOnly
|
|
442
279
|
})));
|
|
443
280
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_brandFormGroup","_listItems","_title","_titleAndInput","_colors","_loader","_types","_style","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","buildFormField","field","type","readOnly","fieldWithoutOverrides","_omit2","theme","size","buildTitleAndInputField","title","subtitle","required","dataName","childType","titleSize","subtitleSize","undefined","SkillInformations","skillInformations","form","iconEditor","select","inputTextArea","inputText","iconEditorProps","iconPreview","buttonLink","label","ariaLabel","icon","position","faIcon","name","onClick","customStyle","borderRadius","fontWeight","fields","options","onChange","formProps","createElement","className","style","skillInformationsContainer","uncappedMap","_map2","convert","cap","buildButtonProps","button","hoverBackgroundColor","COLORS","primary_100","hoverColor","cm_primary_blue","color","padding","width","backgroundColor","cm_blue_50","buildTranslationItems","itemTitle","onEditClick","onDeleteClick","index","secondButtonLink","cm_grey_100","neutral_500","id","Translations","items","localesOptions","emptyResult","buttonProps","translationMenuAction","menu","buttons","optionLabel","ref","optionRef","optionOnClick","disabled","_includes2","_keys2","menuWrapper","maxHeight","translationProps","content","_isEmpty2","item","buttonMenuAction","buildContentItem","image","tags","iconName","checkbox","deleteButton","preset","Content","list","listTitle","search","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","titleProps","listProps","iconColor","white","cm_grey_500","fontSize","actionButton","contentContainer","SkillEdition","props","translations","loaderContainer","loader","container","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/organism/skill-edition/index.tsx"],"sourcesContent":["import React from 'react';\nimport {includes, isEmpty, keys, map, omit} 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 Loader from '../../atom/loader';\nimport propTypes, {\n TranslationPropsType,\n SkillEditionPropsType,\n SkillInformationsProps,\n InputTextareaProps,\n InputTextProps,\n ContentPropsType,\n ContentListItemType\n} from './types';\nimport style from './style.css';\n\nconst buildFormField = (\n field: InputTextareaProps | InputTextProps,\n type: 'text' | 'textarea',\n readOnly?: boolean\n) => {\n const fieldWithoutOverrides = omit(['type', 'theme', 'size', 'readOnly'], field);\n return {\n ...fieldWithoutOverrides,\n readOnly,\n type,\n theme: 'coorpmanager',\n size: 'large'\n };\n};\n\nconst buildTitleAndInputField = ({\n title,\n subtitle,\n required = false,\n dataName,\n childType\n}: {\n title: string;\n subtitle?: string;\n required?: boolean;\n dataName?: string;\n childType?: string;\n}) => {\n return {\n title: {\n type: 'form-group',\n title,\n subtitle,\n titleSize: 'small-and-light',\n subtitleSize: subtitle ? 'standard-without-margin' : undefined,\n required,\n 'data-name': dataName\n },\n childType,\n type: 'titleAndInput'\n };\n};\n\nconst SkillInformations = (skillInformations: SkillInformationsProps & {readOnly?: boolean}) => {\n const {form, iconEditor, readOnly} = skillInformations;\n const {select, inputTextArea, inputText} = form;\n\n const iconEditorProps = {\n title: {\n type: 'form-group',\n title: iconEditor.title,\n titleSize: 'small-and-light',\n required: true\n },\n field: {\n iconPreview: iconEditor.iconPreview,\n inputText: {...iconEditor.inputText, readOnly},\n buttonLink:\n iconEditor.buttonLink && !readOnly\n ? {\n type: 'secondary',\n label: iconEditor.buttonLink.label,\n ariaLabel: iconEditor.buttonLink.ariaLabel,\n dataName: 'open-icon-modal-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'arrows-rotate',\n size: 16\n }\n },\n onClick: iconEditor.buttonLink.onClick,\n customStyle: {\n borderRadius: '12px',\n fontWeight: '500'\n }\n }\n : undefined,\n size: 'large'\n },\n childType: 'iconEditor'\n };\n\n const fields = [\n {\n ...buildTitleAndInputField({\n title: select.title,\n subtitle: select.subtitle,\n required: true,\n dataName: select['data-name'],\n childType: 'select'\n }),\n field: {\n options: select.field.options,\n 'aria-label': select.field['aria-label'],\n onChange: select.field.onChange,\n theme: 'skillDetail',\n size: 'large',\n readOnly\n }\n },\n {\n ...buildTitleAndInputField({\n title: inputText.title,\n required: true,\n childType: 'inputText'\n }),\n field: buildFormField(inputText.field, 'text', readOnly)\n },\n {\n ...buildTitleAndInputField({\n title: inputTextArea.title,\n childType: 'inputTextArea'\n }),\n field: buildFormField(inputTextArea.field, 'textarea', readOnly)\n }\n ];\n\n const formProps = {\n title: form.title,\n subtitle: form.subtitle,\n titleSize: 'xl-strong',\n subtitleSize: 'medium',\n fields\n };\n\n return (\n <div className={style.skillInformationsContainer}>\n <BrandFormGroup {...formProps} />\n <div className={style.iconEditor}>\n <TitleAndInput {...iconEditorProps} />\n </div>\n </div>\n );\n};\n\n// @ts-expect-error convert is not recognized by the types\nconst uncappedMap = map.convert({cap: false});\n\nconst buildButtonProps = (button: TranslationPropsType['button']) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\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 fontWeight: 600\n }\n});\n\nconst buildTranslationItems = (\n {\n title: itemTitle,\n onEditClick,\n onDeleteClick,\n readOnly = false\n }: {title: string; onEditClick: () => void; onDeleteClick?: () => void; readOnly?: boolean},\n index: number\n) => {\n return {\n ...(!readOnly && onDeleteClick\n ? {\n secondButtonLink: {\n 'aria-label': 'Delete',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n },\n onClick: onDeleteClick\n }\n }\n : {}),\n id: index,\n title: itemTitle,\n buttonLink: {\n 'aria-label': readOnly ? 'View Custom SKill' : 'Edit Custom Skill',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: readOnly ? 'eye' : 'edit',\n color: COLORS.neutral_500,\n size: 16\n }\n },\n onClick: onEditClick\n }\n };\n};\n\nconst Translations = ({\n title,\n subtitle,\n items,\n button,\n localesOptions,\n emptyResult,\n readOnly = false\n}: TranslationPropsType) => {\n const buttonProps = buildButtonProps(button);\n\n const translationMenuAction = {\n button: buttonProps,\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(\n (\n item: {title: string; onEditClick: () => void; onDeleteClick?: () => void},\n index: number\n ) => buildTranslationItems({...item, readOnly}, index),\n items\n ),\n type: 'list'\n },\n buttonMenuAction: readOnly ? undefined : translationMenuAction\n };\n\n return <ListItems {...translationProps} />;\n};\n\nconst buildContentItem =\n (readOnly: boolean) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox,\n deleteButton\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n 'data-name': `button-${deleteButton?.label}`,\n 'aria-label': 'Delete',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\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: readOnly ? undefined : checkbox\n };\n };\n\nconst Content = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, checkbox, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n isFetching = false\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps(button);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\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: buttonProps}}),\n items: map(buildContentItem(readOnly), items),\n type: 'list'\n },\n search: {\n ...search,\n theme: 'coorpmanager',\n // Keep search interactive even in readOnly mode\n disabled: false\n },\n actionButtons: readOnly\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle: readOnly\n ? undefined\n : {\n ...checkboxWithTitleProps,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n customStyle: {fontWeight: 600, color: COLORS.neutral_500, fontSize: '16px'},\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\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, isFetching = false, readOnly} = props;\n\n return isFetching ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <div className={style.container}>\n <SkillInformations {...skillInformations} readOnly={readOnly} />\n <Translations {...translations} readOnly={readOnly} />\n <Content {...content} readOnly={readOnly} />\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,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,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AAa,OAAA,CAAAsD,aAAA,CAAC3D,OAAA,CAAAK,OAAM;IAACuD,SAAS,EAAEC,cAAK,CAAC4E,MAAO;IAACjH,KAAK,EAAC;EAAc,CAAE,CACpD,CAAC,gBAENhC,MAAA,CAAAa,OAAA,CAAAsD,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAAC6E;EAAU,gBAC9BlJ,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAACxB,iBAAiB,EAAA7B,QAAA,KAAK8B,iBAAiB;IAAEf,QAAQ,EAAEA;EAAS,EAAE,CAAC,eAChE7B,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAAC6B,YAAY,EAAAlF,QAAA,KAAKiI,YAAY;IAAElH,QAAQ,EAAEA;EAAS,EAAE,CAAC,eACtD7B,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAAC0D,OAAO,EAAA/G,QAAA,KAAKoG,OAAO;IAAErF,QAAQ,EAAEA;EAAS,EAAE,CACxC,CACN;AACH,CAAC;AAEDgH,YAAY,CAACM,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAA3I,OAAA,GAEpBgI,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_brandFormGroup","_listItems","_titleAndInput","_colors","_loader","_contentSelectionList","_interopRequireWildcard","_types","_styles","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","buildFormField","field","type","readOnly","fieldWithoutOverrides","_omit2","theme","size","buildTitleAndInputField","title","subtitle","required","dataName","childType","titleSize","subtitleSize","undefined","SkillInformations","skillInformations","form","iconEditor","select","inputTextArea","inputText","iconEditorProps","iconPreview","buttonLink","label","ariaLabel","icon","position","faIcon","name","onClick","customStyle","borderRadius","fontWeight","fields","options","onChange","formProps","createElement","className","style","skillInformationsContainer","uncappedMap","_map2","convert","cap","buildTranslationItems","itemTitle","onEditClick","onDeleteClick","index","secondButtonLink","width","backgroundColor","hoverBackgroundColor","COLORS","cm_grey_100","color","neutral_500","id","Translations","items","button","localesOptions","emptyResult","buttonProps","buildButtonProps","translationMenuAction","menu","buttons","optionLabel","ref","optionRef","optionOnClick","disabled","_includes2","_keys2","menuWrapper","maxHeight","translationProps","content","_isEmpty2","item","buttonMenuAction","SkillEdition","props","translations","isFetching","loaderContainer","loader","container","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/organism/skill-edition/index.tsx"],"sourcesContent":["import React from 'react';\nimport {includes, isEmpty, keys, map, omit} from 'lodash/fp';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport ListItems from '../list-items';\nimport TitleAndInput from '../title-and-input';\nimport {COLORS} from '../../variables/colors';\nimport Loader from '../../atom/loader';\nimport ContentSelectionList, {buildButtonProps} from '../content-selection-list';\nimport propTypes, {\n TranslationPropsType,\n SkillEditionPropsType,\n SkillInformationsProps,\n InputTextareaProps,\n InputTextProps\n} from './types';\nimport style from './styles';\n\nconst buildFormField = (\n field: InputTextareaProps | InputTextProps,\n type: 'text' | 'textarea',\n readOnly?: boolean\n) => {\n const fieldWithoutOverrides = omit(['type', 'theme', 'size', 'readOnly'], field);\n return {\n ...fieldWithoutOverrides,\n readOnly,\n type,\n theme: 'coorpmanager',\n size: 'large'\n };\n};\n\nconst buildTitleAndInputField = ({\n title,\n subtitle,\n required = false,\n dataName,\n childType\n}: {\n title: string;\n subtitle?: string;\n required?: boolean;\n dataName?: string;\n childType?: string;\n}) => {\n return {\n title: {\n type: 'form-group',\n title,\n subtitle,\n titleSize: 'small-and-light',\n subtitleSize: subtitle ? 'standard-without-margin' : undefined,\n required,\n 'data-name': dataName\n },\n childType,\n type: 'titleAndInput'\n };\n};\n\nconst SkillInformations = (skillInformations: SkillInformationsProps & {readOnly?: boolean}) => {\n const {form, iconEditor, readOnly} = skillInformations;\n const {select, inputTextArea, inputText} = form;\n\n const iconEditorProps = {\n title: {\n type: 'form-group',\n title: iconEditor.title,\n titleSize: 'small-and-light',\n required: true\n },\n field: {\n iconPreview: iconEditor.iconPreview,\n inputText: {...iconEditor.inputText, readOnly},\n buttonLink:\n iconEditor.buttonLink && !readOnly\n ? {\n type: 'secondary',\n label: iconEditor.buttonLink.label,\n ariaLabel: iconEditor.buttonLink.ariaLabel,\n dataName: 'open-icon-modal-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'arrows-rotate',\n size: 16\n }\n },\n onClick: iconEditor.buttonLink.onClick,\n customStyle: {\n borderRadius: '12px',\n fontWeight: '500'\n }\n }\n : undefined,\n size: 'large'\n },\n childType: 'iconEditor'\n };\n\n const fields = [\n {\n ...buildTitleAndInputField({\n title: select.title,\n subtitle: select.subtitle,\n required: true,\n dataName: select['data-name'],\n childType: 'select'\n }),\n field: {\n options: select.field.options,\n 'aria-label': select.field['aria-label'],\n onChange: select.field.onChange,\n theme: 'skillDetail',\n size: 'large',\n readOnly\n }\n },\n {\n ...buildTitleAndInputField({\n title: inputText.title,\n required: true,\n childType: 'inputText'\n }),\n field: buildFormField(inputText.field, 'text', readOnly)\n },\n {\n ...buildTitleAndInputField({\n title: inputTextArea.title,\n childType: 'inputTextArea'\n }),\n field: buildFormField(inputTextArea.field, 'textarea', readOnly)\n }\n ];\n\n const formProps = {\n title: form.title,\n subtitle: form.subtitle,\n titleSize: 'xl-strong',\n subtitleSize: 'medium',\n fields\n };\n\n return (\n <div className={style.skillInformationsContainer}>\n <BrandFormGroup {...formProps} />\n <div className={style.iconEditor}>\n <TitleAndInput {...iconEditorProps} />\n </div>\n </div>\n );\n};\n\n// @ts-expect-error convert is not recognized by the types\nconst uncappedMap = map.convert({cap: false});\n\nconst buildTranslationItems = (\n {\n title: itemTitle,\n onEditClick,\n onDeleteClick,\n readOnly = false\n }: {title: string; onEditClick: () => void; onDeleteClick?: () => void; readOnly?: boolean},\n index: number\n) => {\n return {\n ...(!readOnly && onDeleteClick\n ? {\n secondButtonLink: {\n 'aria-label': 'Delete',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n },\n onClick: onDeleteClick\n }\n }\n : {}),\n id: index,\n title: itemTitle,\n buttonLink: {\n 'aria-label': readOnly ? 'View Custom SKill' : 'Edit Custom Skill',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: readOnly ? 'eye' : 'edit',\n color: COLORS.neutral_500,\n size: 16\n }\n },\n onClick: onEditClick\n }\n };\n};\n\nconst Translations = ({\n title,\n subtitle,\n items,\n button,\n localesOptions,\n emptyResult,\n readOnly = false\n}: TranslationPropsType) => {\n const buttonProps = buildButtonProps(button);\n\n const translationMenuAction = {\n button: buttonProps,\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(\n (\n item: {title: string; onEditClick: () => void; onDeleteClick?: () => void},\n index: number\n ) => buildTranslationItems({...item, readOnly}, index),\n items\n ),\n type: 'list'\n },\n buttonMenuAction: readOnly ? undefined : translationMenuAction\n };\n\n return <ListItems {...translationProps} />;\n};\n\nconst SkillEdition = (props: SkillEditionPropsType) => {\n const {skillInformations, translations, content, isFetching = false, readOnly} = props;\n\n return isFetching ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <div className={style.container}>\n <SkillInformations {...skillInformations} readOnly={readOnly} />\n <Translations {...translations} readOnly={readOnly} />\n <ContentSelectionList {...content} readOnly={readOnly} />\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,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,cAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,qBAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAT,sBAAA,CAAAC,OAAA;AAOA,IAAAS,OAAA,GAAAV,sBAAA,CAAAC,OAAA;AAA6B,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAA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B,OAAA,CAAA6D,aAAA;IAAKC,SAAS,EAAEC,eAAK,CAACgD;EAAgB,gBACpCjI,MAAA,CAAAkB,OAAA,CAAA6D,aAAA,CAACxE,OAAA,CAAAW,OAAM;IAAC8D,SAAS,EAAEC,eAAK,CAACiD,MAAO;IAACtF,KAAK,EAAC;EAAc,CAAE,CACpD,CAAC,gBAEN5C,MAAA,CAAAkB,OAAA,CAAA6D,aAAA;IAAKC,SAAS,EAAEC,eAAK,CAACkD;EAAU,gBAC9BnI,MAAA,CAAAkB,OAAA,CAAA6D,aAAA,CAACxB,iBAAiB,EAAAvB,QAAA,KAAKwB,iBAAiB;IAAEf,QAAQ,EAAEA;EAAS,EAAE,CAAC,eAChEzC,MAAA,CAAAkB,OAAA,CAAA6D,aAAA,CAACsB,YAAY,EAAArE,QAAA,KAAK+F,YAAY;IAAEtF,QAAQ,EAAEA;EAAS,EAAE,CAAC,eACtDzC,MAAA,CAAAkB,OAAA,CAAA6D,aAAA,CAACvE,qBAAA,CAAAU,OAAoB,EAAAc,QAAA,KAAKyF,OAAO;IAAEhF,QAAQ,EAAEA;EAAS,EAAE,CACrD,CACN;AACH,CAAC;AAEDoF,YAAY,CAACO,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAvH,OAAA,GAEpB2G,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,KAAyB,CAAC;;;;;;;;AAEvD,wBAME"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports.contentContainer = void 0;
|
|
5
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
const contentContainer = exports.contentContainer = _style.default.contentContainer;
|
|
8
|
+
var _default = exports.default = {
|
|
9
|
+
container: _style.default.container,
|
|
10
|
+
skillInformationsContainer: _style.default.skillInformationsContainer,
|
|
11
|
+
iconEditor: _style.default.iconEditor,
|
|
12
|
+
loaderContainer: _style.default.loaderContainer,
|
|
13
|
+
loader: _style.default.loader
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["_style","_interopRequireDefault","require","e","__esModule","default","contentContainer","exports","style","_default","container","skillInformationsContainer","iconEditor","loaderContainer","loader"],"sources":["../../../src/organism/skill-edition/styles.ts"],"sourcesContent":["import style from './style.css';\n\nexport const contentContainer = style.contentContainer;\n\nexport default {\n container: style.container,\n skillInformationsContainer: style.skillInformationsContainer,\n iconEditor: style.iconEditor,\n loaderContainer: style.loaderContainer,\n loader: style.loader\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzB,MAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,cAAK,CAACF,gBAAgB;AAAC,IAAAG,QAAA,GAAAF,OAAA,CAAAF,OAAA,GAExC;EACbK,SAAS,EAAEF,cAAK,CAACE,SAAS;EAC1BC,0BAA0B,EAAEH,cAAK,CAACG,0BAA0B;EAC5DC,UAAU,EAAEJ,cAAK,CAACI,UAAU;EAC5BC,eAAe,EAAEL,cAAK,CAACK,eAAe;EACtCC,MAAM,EAAEN,cAAK,CAACM;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { IconPreviewProps } from '../../molecule/icon-preview/types';
|
|
3
|
-
import {
|
|
3
|
+
import { ContentPropsType } from '../content-selection-list/types';
|
|
4
|
+
export { ContentListItemType, CheckboxWithTitleProps, ContentPropsType } from '../content-selection-list/types';
|
|
4
5
|
declare const SkillEditionPropTypes: {
|
|
5
6
|
skillInformations: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
6
7
|
form: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
@@ -129,7 +130,7 @@ declare const SkillEditionPropTypes: {
|
|
|
129
130
|
}>>>;
|
|
130
131
|
content: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
131
132
|
title: PropTypes.Validator<string>;
|
|
132
|
-
subtitle: PropTypes.
|
|
133
|
+
subtitle: PropTypes.Requireable<string>;
|
|
133
134
|
button: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
134
135
|
label: PropTypes.Validator<string>;
|
|
135
136
|
onClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
@@ -137,6 +138,8 @@ declare const SkillEditionPropTypes: {
|
|
|
137
138
|
list: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
138
139
|
title: PropTypes.Requireable<string>;
|
|
139
140
|
items: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
141
|
+
hidden: PropTypes.Requireable<boolean>;
|
|
142
|
+
hint: PropTypes.Requireable<string>;
|
|
140
143
|
ref: PropTypes.Validator<string>;
|
|
141
144
|
title: PropTypes.Validator<string>;
|
|
142
145
|
subtitle: PropTypes.Validator<string>;
|
|
@@ -151,14 +154,15 @@ declare const SkillEditionPropTypes: {
|
|
|
151
154
|
}>>>;
|
|
152
155
|
deleteButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
153
156
|
label: PropTypes.Requireable<string>;
|
|
157
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
154
158
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
155
159
|
}>>;
|
|
156
160
|
}>>[]>;
|
|
157
|
-
search: PropTypes.
|
|
161
|
+
search: PropTypes.Requireable<PropTypes.InferProps<{
|
|
158
162
|
value: PropTypes.Validator<string>;
|
|
159
163
|
placeholder: PropTypes.Validator<string>;
|
|
160
164
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
161
|
-
}
|
|
165
|
+
}>>;
|
|
162
166
|
emptyResult: PropTypes.Requireable<PropTypes.InferProps<{
|
|
163
167
|
title: PropTypes.Validator<string>;
|
|
164
168
|
description: PropTypes.Validator<string>;
|
|
@@ -169,6 +173,8 @@ declare const SkillEditionPropTypes: {
|
|
|
169
173
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
170
174
|
}>>;
|
|
171
175
|
}>>>;
|
|
176
|
+
error: PropTypes.Requireable<string>;
|
|
177
|
+
hiddenLabel: PropTypes.Requireable<string>;
|
|
172
178
|
isFetching: PropTypes.Requireable<boolean>;
|
|
173
179
|
actionButtons: PropTypes.Requireable<(object | null | undefined)[]>;
|
|
174
180
|
checkboxWithTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -258,56 +264,6 @@ export declare type TranslationPropsType = {
|
|
|
258
264
|
};
|
|
259
265
|
readOnly?: boolean;
|
|
260
266
|
};
|
|
261
|
-
export declare type ContentListItemType = {
|
|
262
|
-
ref: string;
|
|
263
|
-
title: string;
|
|
264
|
-
subtitle: string;
|
|
265
|
-
image: string;
|
|
266
|
-
tags: {
|
|
267
|
-
label: string;
|
|
268
|
-
iconName: string;
|
|
269
|
-
};
|
|
270
|
-
checkbox: {
|
|
271
|
-
checked: boolean;
|
|
272
|
-
onChange: (value: boolean) => void;
|
|
273
|
-
};
|
|
274
|
-
deleteButton?: ButtonLinkProps;
|
|
275
|
-
};
|
|
276
|
-
export declare type CheckboxWithTitleProps = {
|
|
277
|
-
title?: string;
|
|
278
|
-
checked?: boolean;
|
|
279
|
-
onChange?: (value: boolean) => void;
|
|
280
|
-
};
|
|
281
|
-
export declare type ContentPropsType = {
|
|
282
|
-
title: string;
|
|
283
|
-
subtitle: string;
|
|
284
|
-
button: {
|
|
285
|
-
label: string;
|
|
286
|
-
onClick: () => void;
|
|
287
|
-
};
|
|
288
|
-
list: {
|
|
289
|
-
title?: string;
|
|
290
|
-
items?: ContentListItemType[];
|
|
291
|
-
search: {
|
|
292
|
-
value: string;
|
|
293
|
-
placeholder: string;
|
|
294
|
-
onChange: (value: string) => void;
|
|
295
|
-
};
|
|
296
|
-
emptyResult?: {
|
|
297
|
-
title: string;
|
|
298
|
-
description: string;
|
|
299
|
-
};
|
|
300
|
-
checkbox?: {
|
|
301
|
-
title: string;
|
|
302
|
-
checked: boolean;
|
|
303
|
-
onChange: (value: boolean) => void;
|
|
304
|
-
};
|
|
305
|
-
};
|
|
306
|
-
actionButtons?: ButtonLinkProps[];
|
|
307
|
-
checkboxWithTitle?: CheckboxWithTitleProps;
|
|
308
|
-
isFetching?: boolean;
|
|
309
|
-
readOnly?: boolean;
|
|
310
|
-
};
|
|
311
267
|
export declare type SkillEditionPropsType = {
|
|
312
268
|
skillInformations: SkillInformationsProps;
|
|
313
269
|
translations: TranslationPropsType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAC,gBAAgB,EAAgC,MAAM,iCAAiC,CAAC;AAEhG,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AAmEzC,QAAA,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true;
|
|
4
|
-
exports.themeStyle = exports.default = void 0;
|
|
4
|
+
exports.themeStyle = exports.default = exports.ContentPropsType = exports.ContentListItemType = exports.CheckboxWithTitleProps = void 0;
|
|
5
5
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
6
|
var _inputText = _interopRequireDefault(require("../../atom/input-text"));
|
|
7
7
|
var _inputTextarea = _interopRequireDefault(require("../../atom/input-textarea"));
|
|
8
8
|
var _iconPreview = _interopRequireDefault(require("../../molecule/icon-preview"));
|
|
9
9
|
var _select = require("../../atom/select");
|
|
10
|
+
var _types = require("../content-selection-list/types");
|
|
11
|
+
exports.ContentListItemType = _types.ContentListItemType;
|
|
12
|
+
exports.CheckboxWithTitleProps = _types.CheckboxWithTitleProps;
|
|
13
|
+
exports.ContentPropsType = _types.ContentPropsType;
|
|
10
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
15
|
const FormPropTypes = {
|
|
12
16
|
title: _propTypes.default.string,
|
|
@@ -66,64 +70,13 @@ const translationPropTypes = _propTypes.default.shape({
|
|
|
66
70
|
}),
|
|
67
71
|
readOnly: _propTypes.default.bool
|
|
68
72
|
});
|
|
69
|
-
const contentPropTypes = _propTypes.default.shape({
|
|
70
|
-
title: _propTypes.default.string.isRequired,
|
|
71
|
-
subtitle: _propTypes.default.string.isRequired,
|
|
72
|
-
button: _propTypes.default.shape({
|
|
73
|
-
label: _propTypes.default.string.isRequired,
|
|
74
|
-
onClick: _propTypes.default.func.isRequired
|
|
75
|
-
}).isRequired,
|
|
76
|
-
list: _propTypes.default.shape({
|
|
77
|
-
title: _propTypes.default.string,
|
|
78
|
-
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
79
|
-
ref: _propTypes.default.string.isRequired,
|
|
80
|
-
title: _propTypes.default.string.isRequired,
|
|
81
|
-
subtitle: _propTypes.default.string.isRequired,
|
|
82
|
-
image: _propTypes.default.string.isRequired,
|
|
83
|
-
tags: _propTypes.default.shape({
|
|
84
|
-
label: _propTypes.default.string.isRequired,
|
|
85
|
-
iconName: _propTypes.default.string.isRequired
|
|
86
|
-
}).isRequired,
|
|
87
|
-
checkbox: _propTypes.default.shape({
|
|
88
|
-
checked: _propTypes.default.bool.isRequired,
|
|
89
|
-
onChange: _propTypes.default.func.isRequired
|
|
90
|
-
}).isRequired,
|
|
91
|
-
deleteButton: _propTypes.default.shape({
|
|
92
|
-
label: _propTypes.default.string,
|
|
93
|
-
onClick: _propTypes.default.func
|
|
94
|
-
})
|
|
95
|
-
}).isRequired),
|
|
96
|
-
search: _propTypes.default.shape({
|
|
97
|
-
value: _propTypes.default.string.isRequired,
|
|
98
|
-
placeholder: _propTypes.default.string.isRequired,
|
|
99
|
-
onChange: _propTypes.default.func.isRequired
|
|
100
|
-
}).isRequired,
|
|
101
|
-
emptyResult: _propTypes.default.shape({
|
|
102
|
-
title: _propTypes.default.string.isRequired,
|
|
103
|
-
description: _propTypes.default.string.isRequired
|
|
104
|
-
}),
|
|
105
|
-
checkbox: _propTypes.default.shape({
|
|
106
|
-
title: _propTypes.default.string.isRequired,
|
|
107
|
-
checked: _propTypes.default.bool.isRequired,
|
|
108
|
-
onChange: _propTypes.default.func.isRequired
|
|
109
|
-
})
|
|
110
|
-
}).isRequired,
|
|
111
|
-
isFetching: _propTypes.default.bool,
|
|
112
|
-
actionButtons: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
113
|
-
checkboxWithTitle: _propTypes.default.shape({
|
|
114
|
-
title: _propTypes.default.string,
|
|
115
|
-
checked: _propTypes.default.bool,
|
|
116
|
-
onChange: _propTypes.default.func
|
|
117
|
-
}),
|
|
118
|
-
readOnly: _propTypes.default.bool
|
|
119
|
-
});
|
|
120
73
|
const SkillEditionPropTypes = {
|
|
121
74
|
skillInformations: _propTypes.default.shape({
|
|
122
75
|
form: _propTypes.default.shape(FormPropTypes).isRequired,
|
|
123
76
|
iconEditor: _propTypes.default.shape(IconEditorPropTypes).isRequired
|
|
124
77
|
}).isRequired,
|
|
125
78
|
translations: translationPropTypes.isRequired,
|
|
126
|
-
content:
|
|
79
|
+
content: _propTypes.default.shape(_types.ContentSelectionListPropTypes).isRequired,
|
|
127
80
|
isFetching: _propTypes.default.bool,
|
|
128
81
|
readOnly: _propTypes.default.bool
|
|
129
82
|
};
|