@coorpacademy/components 11.35.2-forcedeploy.13 → 11.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-link/index.js +1 -1
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/style.css +2 -2
- package/es/atom/icon/index.d.ts +17 -35
- package/es/atom/icon/index.d.ts.map +1 -1
- package/es/atom/icon/index.js +15 -32
- package/es/atom/icon/index.js.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +3 -13
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +2 -13
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/status-item/index.native.js +1 -1
- package/es/atom/status-item/index.native.js.map +1 -1
- package/es/atom/tag/index.d.ts +1 -12
- package/es/atom/tag/style.css +0 -1
- package/es/atom/title/index.d.ts +2 -13
- package/es/molecule/banner/style.css +0 -1
- package/es/molecule/base-modal/style.css +1 -0
- package/es/molecule/bulk-progress-bar/index.js +2 -2
- package/es/molecule/bulk-progress-bar/index.js.map +1 -1
- package/es/molecule/certification-card/index.js +1 -1
- package/es/molecule/certification-card/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +7 -28
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +1 -1
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.js +0 -2
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/learner-skill-card/index.js +8 -10
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/molecule/learner-skill-card/style.css +0 -1
- package/es/molecule/learning-priority-modal/style.css +2 -3
- package/es/molecule/progress-wrapper/index.js +1 -1
- package/es/molecule/progress-wrapper/index.js.map +1 -1
- package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
- package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +2 -13
- package/es/molecule/title-radio-wrapper/index.d.ts +3 -13
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +2 -13
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/molecule/translation-modal/index.d.ts +1 -0
- package/es/molecule/translation-modal/index.d.ts.map +1 -1
- package/es/molecule/translation-modal/index.js +7 -24
- package/es/molecule/translation-modal/index.js.map +1 -1
- package/es/organism/cards-grid/index.d.ts +10 -48
- package/es/organism/cards-grid/index.d.ts.map +1 -1
- package/es/organism/cards-grid/index.js +2 -3
- package/es/organism/cards-grid/index.js.map +1 -1
- package/es/organism/content-skill-modal/index.d.ts +3 -13
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +2 -12
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/list-item/index.js +5 -5
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +17 -23
- package/es/organism/list-items/index.d.ts +2 -13
- package/es/organism/list-items/style.css +0 -1
- package/es/organism/rewards-form/index.d.ts +2 -13
- package/es/organism/select-opponents/index.d.ts +3 -13
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +2 -13
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/sidebar/index.d.ts +2 -2
- package/es/organism/skill-edition/index.d.ts +52 -1261
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/index.js +224 -3
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/types.d.ts +117 -1268
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/skill-edition/types.js +59 -7
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/organism/title-and-input/index.d.ts +5 -25
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +4 -24
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +2 -13
- package/es/template/app-player/loading/index.d.ts +6 -27
- package/es/template/app-player/player/index.d.ts +12 -53
- package/es/template/app-player/player/slides/index.d.ts +6 -27
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +6 -26
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +6 -27
- package/es/template/app-review/index.d.ts +7 -27
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +6 -27
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +6 -27
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +1113 -1713
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +12 -0
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/utils.d.ts +1 -1
- package/es/template/common/dashboard/index.d.ts +12 -53
- package/es/template/common/search-page/index.d.ts +6 -27
- package/es/template/external-course/index.d.ts +6 -27
- package/es/template/skill-detail/all-courses.css +2 -3
- package/es/template/skill-detail/all-courses.d.ts +17 -52
- package/es/template/skill-detail/all-courses.d.ts.map +1 -1
- package/es/template/skill-detail/all-courses.js +11 -12
- package/es/template/skill-detail/all-courses.js.map +1 -1
- package/es/template/skill-detail/continue-learning.css +2 -7
- package/es/template/skill-detail/continue-learning.d.ts +12 -25
- package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
- package/es/template/skill-detail/continue-learning.js.map +1 -1
- package/es/template/skill-detail/index.d.ts +71 -81
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +55 -87
- package/es/template/skill-detail/index.js.map +1 -1
- package/es/template/skill-detail/style.css +39 -97
- package/es/variables/colors.css +0 -2
- package/es/variables/colors.d.ts +2 -3
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +3 -4
- package/es/variables/colors.js.map +1 -1
- package/es/variables/theme.native.js +1 -1
- package/es/variables/theme.native.js.map +1 -1
- package/lib/atom/button-link/index.js +1 -1
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/style.css +2 -2
- package/lib/atom/icon/index.d.ts +17 -35
- package/lib/atom/icon/index.d.ts.map +1 -1
- package/lib/atom/icon/index.js +18 -34
- package/lib/atom/icon/index.js.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +3 -13
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +2 -13
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/status-item/index.native.js +1 -1
- package/lib/atom/status-item/index.native.js.map +1 -1
- package/lib/atom/tag/index.d.ts +1 -12
- package/lib/atom/tag/style.css +0 -1
- package/lib/atom/title/index.d.ts +2 -13
- package/lib/molecule/banner/style.css +0 -1
- package/lib/molecule/base-modal/style.css +1 -0
- package/lib/molecule/bulk-progress-bar/index.js +2 -2
- package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
- package/lib/molecule/certification-card/index.js +1 -1
- package/lib/molecule/certification-card/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +7 -28
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +1 -1
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.js +0 -2
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/learner-skill-card/index.js +8 -10
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/molecule/learner-skill-card/style.css +0 -1
- package/lib/molecule/learning-priority-modal/style.css +2 -3
- package/lib/molecule/progress-wrapper/index.js +1 -1
- package/lib/molecule/progress-wrapper/index.js.map +1 -1
- package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
- package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -13
- package/lib/molecule/title-radio-wrapper/index.d.ts +3 -13
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +2 -13
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/molecule/translation-modal/index.d.ts +1 -0
- package/lib/molecule/translation-modal/index.d.ts.map +1 -1
- package/lib/molecule/translation-modal/index.js +6 -23
- package/lib/molecule/translation-modal/index.js.map +1 -1
- package/lib/organism/cards-grid/index.d.ts +10 -48
- package/lib/organism/cards-grid/index.d.ts.map +1 -1
- package/lib/organism/cards-grid/index.js +2 -3
- package/lib/organism/cards-grid/index.js.map +1 -1
- package/lib/organism/content-skill-modal/index.d.ts +3 -13
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +2 -12
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +5 -5
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +17 -23
- package/lib/organism/list-items/index.d.ts +2 -13
- package/lib/organism/list-items/style.css +0 -1
- package/lib/organism/rewards-form/index.d.ts +2 -13
- package/lib/organism/select-opponents/index.d.ts +3 -13
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +2 -13
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/sidebar/index.d.ts +2 -2
- package/lib/organism/skill-edition/index.d.ts +52 -1261
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.js +224 -3
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/types.d.ts +117 -1268
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.js +59 -7
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +5 -25
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +4 -24
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +2 -13
- package/lib/template/app-player/loading/index.d.ts +6 -27
- package/lib/template/app-player/player/index.d.ts +12 -53
- package/lib/template/app-player/player/slides/index.d.ts +6 -27
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +6 -26
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +6 -27
- package/lib/template/app-review/index.d.ts +7 -27
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +6 -27
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +6 -27
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +1113 -1713
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +12 -0
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/utils.d.ts +1 -1
- package/lib/template/common/dashboard/index.d.ts +12 -53
- package/lib/template/common/search-page/index.d.ts +6 -27
- package/lib/template/external-course/index.d.ts +6 -27
- package/lib/template/skill-detail/all-courses.css +2 -3
- package/lib/template/skill-detail/all-courses.d.ts +17 -52
- package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
- package/lib/template/skill-detail/all-courses.js +11 -11
- package/lib/template/skill-detail/all-courses.js.map +1 -1
- package/lib/template/skill-detail/continue-learning.css +2 -7
- package/lib/template/skill-detail/continue-learning.d.ts +12 -25
- package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
- package/lib/template/skill-detail/continue-learning.js.map +1 -1
- package/lib/template/skill-detail/index.d.ts +71 -81
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +55 -87
- package/lib/template/skill-detail/index.js.map +1 -1
- package/lib/template/skill-detail/style.css +39 -97
- package/lib/variables/colors.css +0 -2
- package/lib/variables/colors.d.ts +2 -3
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +3 -4
- package/lib/variables/colors.js.map +1 -1
- package/lib/variables/theme.native.js +1 -1
- package/lib/variables/theme.native.js.map +1 -1
- package/locales/bs/global.json +1 -0
- package/locales/de/global.json +1 -0
- package/locales/es/global.json +1 -0
- package/locales/et/global.json +1 -0
- package/locales/fi/global.json +1 -0
- package/locales/fr/global.json +1 -0
- package/locales/hu/global.json +1 -0
- package/locales/hy/global.json +1 -0
- package/locales/ja/global.json +1 -0
- package/locales/nl/global.json +1 -0
- package/locales/pl/global.json +1 -0
- package/locales/pt/global.json +1 -0
- package/locales/ro/global.json +1 -0
- package/locales/sk/global.json +1 -0
- package/locales/sl/global.json +1 -0
- package/locales/sv/global.json +1 -0
- package/locales/tl/global.json +1 -0
- package/locales/tr/global.json +1 -0
- package/locales/uk/global.json +1 -0
- package/locales/vi/global.json +1 -0
- package/locales/zh/global.json +1 -0
- package/locales/zh_TW/global.json +1 -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":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAEhB,qBAAqB,EAMtB,MAAM,SAAS,CAAC;AAqVjB,QAAA,MAAM,YAAY;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjD,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import _map from "lodash/fp/map";
|
|
2
|
+
import _keys from "lodash/fp/keys";
|
|
3
|
+
import _isEmpty from "lodash/fp/isEmpty";
|
|
4
|
+
import _includes from "lodash/fp/includes";
|
|
1
5
|
import React from 'react';
|
|
2
6
|
import BrandFormGroup from '../../molecule/brand-form-group';
|
|
3
7
|
import ListItems from '../list-items';
|
|
4
8
|
import Title from '../../atom/title';
|
|
5
9
|
import TitleAndInput from '../title-and-input';
|
|
10
|
+
import { COLORS } from '../../variables/colors';
|
|
6
11
|
import propTypes from './types';
|
|
7
12
|
import style from './style.css';
|
|
8
13
|
const buildFormField = (field, type) => {
|
|
@@ -119,6 +124,224 @@ const SkillInformations = skillInformations => {
|
|
|
119
124
|
className: style.iconEditor
|
|
120
125
|
}, /*#__PURE__*/React.createElement(TitleAndInput, iconEditorProps)));
|
|
121
126
|
};
|
|
127
|
+
|
|
128
|
+
// @ts-expect-error convert is not recognized by the types
|
|
129
|
+
const uncappedMap = _map.convert({
|
|
130
|
+
cap: false
|
|
131
|
+
});
|
|
132
|
+
const buildButtonProps = button => ({
|
|
133
|
+
...button,
|
|
134
|
+
type: 'primary',
|
|
135
|
+
'aria-label': button.label,
|
|
136
|
+
'data-name': `button-${button.label}`,
|
|
137
|
+
hoverBackgroundColor: COLORS.primary_100,
|
|
138
|
+
hoverColor: COLORS.cm_primary_blue,
|
|
139
|
+
icon: {
|
|
140
|
+
position: 'left',
|
|
141
|
+
faIcon: {
|
|
142
|
+
name: 'plus',
|
|
143
|
+
color: COLORS.cm_primary_blue,
|
|
144
|
+
size: 14,
|
|
145
|
+
customStyle: {
|
|
146
|
+
padding: 0
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
customStyle: {
|
|
151
|
+
width: 'fit-content',
|
|
152
|
+
backgroundColor: COLORS.cm_blue_50,
|
|
153
|
+
color: COLORS.cm_primary_blue,
|
|
154
|
+
borderRadius: '12px',
|
|
155
|
+
paddingRight: '8px',
|
|
156
|
+
paddingleft: '16px',
|
|
157
|
+
fontWeight: 600
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
const buildTranslationItems = ({
|
|
161
|
+
title: itemTitle,
|
|
162
|
+
onEditClick,
|
|
163
|
+
onDeleteClick
|
|
164
|
+
}, index) => ({
|
|
165
|
+
id: index,
|
|
166
|
+
title: itemTitle,
|
|
167
|
+
buttonLink: {
|
|
168
|
+
'aria-label': 'Edit',
|
|
169
|
+
type: 'primary',
|
|
170
|
+
customStyle: {
|
|
171
|
+
width: 'fit-content',
|
|
172
|
+
backgroundColor: 'transparent'
|
|
173
|
+
},
|
|
174
|
+
hoverBackgroundColor: COLORS.gray,
|
|
175
|
+
icon: {
|
|
176
|
+
position: 'left',
|
|
177
|
+
faIcon: {
|
|
178
|
+
name: 'edit',
|
|
179
|
+
color: COLORS.cm_grey_500,
|
|
180
|
+
size: 16
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
onClick: onEditClick
|
|
184
|
+
},
|
|
185
|
+
secondButtonLink: {
|
|
186
|
+
'aria-label': 'Delete',
|
|
187
|
+
type: 'primary',
|
|
188
|
+
customStyle: {
|
|
189
|
+
width: 'fit-content',
|
|
190
|
+
backgroundColor: 'transparent'
|
|
191
|
+
},
|
|
192
|
+
hoverBackgroundColor: COLORS.gray,
|
|
193
|
+
icon: {
|
|
194
|
+
position: 'left',
|
|
195
|
+
faIcon: {
|
|
196
|
+
name: 'trash',
|
|
197
|
+
color: COLORS.cm_grey_500,
|
|
198
|
+
size: 16
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
onClick: onDeleteClick
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
const Translations = ({
|
|
205
|
+
title,
|
|
206
|
+
subtitle,
|
|
207
|
+
items,
|
|
208
|
+
button,
|
|
209
|
+
localesOptions,
|
|
210
|
+
emptyResult
|
|
211
|
+
}) => {
|
|
212
|
+
const buttonProps = buildButtonProps(button);
|
|
213
|
+
const translationMenuAction = {
|
|
214
|
+
button: buttonProps,
|
|
215
|
+
menu: {
|
|
216
|
+
buttons: _map(({
|
|
217
|
+
label: optionLabel,
|
|
218
|
+
ref: optionRef,
|
|
219
|
+
onClick: optionOnClick
|
|
220
|
+
}) => ({
|
|
221
|
+
type: 'defaultLeft',
|
|
222
|
+
onClick: optionOnClick,
|
|
223
|
+
customStyle: {
|
|
224
|
+
width: '238px'
|
|
225
|
+
},
|
|
226
|
+
label: optionLabel,
|
|
227
|
+
'data-name': optionLabel,
|
|
228
|
+
// disable if current locale option is already in items list
|
|
229
|
+
disabled: _includes(optionRef, _keys(items))
|
|
230
|
+
}), localesOptions)
|
|
231
|
+
},
|
|
232
|
+
menuWrapper: {
|
|
233
|
+
customStyle: {
|
|
234
|
+
maxHeight: '252px'
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
const translationProps = {
|
|
239
|
+
title: {
|
|
240
|
+
title,
|
|
241
|
+
type: 'form-group',
|
|
242
|
+
subtitle,
|
|
243
|
+
titleSize: 'xl-strong',
|
|
244
|
+
subtitleSize: 'medium'
|
|
245
|
+
},
|
|
246
|
+
'aria-label': title,
|
|
247
|
+
content: {
|
|
248
|
+
...(!_isEmpty(emptyResult) && {
|
|
249
|
+
emptyResult: {
|
|
250
|
+
...emptyResult,
|
|
251
|
+
button: translationMenuAction
|
|
252
|
+
}
|
|
253
|
+
}),
|
|
254
|
+
items: uncappedMap(buildTranslationItems, items),
|
|
255
|
+
type: 'list'
|
|
256
|
+
},
|
|
257
|
+
buttonMenuAction: translationMenuAction
|
|
258
|
+
};
|
|
259
|
+
return /*#__PURE__*/React.createElement(ListItems, translationProps);
|
|
260
|
+
};
|
|
261
|
+
const buildContentItem = ({
|
|
262
|
+
ref,
|
|
263
|
+
title,
|
|
264
|
+
subtitle,
|
|
265
|
+
image,
|
|
266
|
+
tags: {
|
|
267
|
+
label,
|
|
268
|
+
iconName
|
|
269
|
+
},
|
|
270
|
+
checkbox
|
|
271
|
+
}) => ({
|
|
272
|
+
id: ref,
|
|
273
|
+
title,
|
|
274
|
+
subtitle,
|
|
275
|
+
image,
|
|
276
|
+
tags: [{
|
|
277
|
+
label,
|
|
278
|
+
type: 'default',
|
|
279
|
+
icon: {
|
|
280
|
+
iconName,
|
|
281
|
+
preset: 's',
|
|
282
|
+
customStyle: {
|
|
283
|
+
padding: 0
|
|
284
|
+
},
|
|
285
|
+
position: 'left'
|
|
286
|
+
}
|
|
287
|
+
}],
|
|
288
|
+
checkbox
|
|
289
|
+
});
|
|
290
|
+
const Content = ({
|
|
291
|
+
title,
|
|
292
|
+
subtitle,
|
|
293
|
+
button,
|
|
294
|
+
list: {
|
|
295
|
+
title: listTitle,
|
|
296
|
+
checkbox,
|
|
297
|
+
items,
|
|
298
|
+
search,
|
|
299
|
+
emptyResult
|
|
300
|
+
}
|
|
301
|
+
}) => {
|
|
302
|
+
const buttonProps = buildButtonProps(button);
|
|
303
|
+
const titleProps = {
|
|
304
|
+
type: 'form-group',
|
|
305
|
+
title,
|
|
306
|
+
subtitle,
|
|
307
|
+
button: buttonProps,
|
|
308
|
+
required: true
|
|
309
|
+
};
|
|
310
|
+
const listProps = {
|
|
311
|
+
...(!_isEmpty(checkbox) && {
|
|
312
|
+
...checkbox,
|
|
313
|
+
icon: {
|
|
314
|
+
iconName: 'minus',
|
|
315
|
+
iconColor: COLORS.white,
|
|
316
|
+
preset: 's'
|
|
317
|
+
},
|
|
318
|
+
customStyle: {
|
|
319
|
+
fontWeight: 600,
|
|
320
|
+
color: COLORS.cm_grey_500,
|
|
321
|
+
fontSize: '16px'
|
|
322
|
+
}
|
|
323
|
+
}),
|
|
324
|
+
title: listTitle,
|
|
325
|
+
'aria-label': 'content list items',
|
|
326
|
+
content: {
|
|
327
|
+
...(!_isEmpty(emptyResult) && {
|
|
328
|
+
emptyResult: {
|
|
329
|
+
...emptyResult,
|
|
330
|
+
button: buttonProps
|
|
331
|
+
}
|
|
332
|
+
}),
|
|
333
|
+
items: _map(buildContentItem, items),
|
|
334
|
+
type: 'list'
|
|
335
|
+
},
|
|
336
|
+
search: {
|
|
337
|
+
...search,
|
|
338
|
+
theme: 'coorpmanager'
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
342
|
+
className: style.contentContainer
|
|
343
|
+
}, /*#__PURE__*/React.createElement(Title, titleProps), /*#__PURE__*/React.createElement(ListItems, listProps));
|
|
344
|
+
};
|
|
122
345
|
const SkillEdition = props => {
|
|
123
346
|
const {
|
|
124
347
|
skillInformations,
|
|
@@ -127,9 +350,7 @@ const SkillEdition = props => {
|
|
|
127
350
|
} = props;
|
|
128
351
|
return /*#__PURE__*/React.createElement("div", {
|
|
129
352
|
className: style.container
|
|
130
|
-
}, /*#__PURE__*/React.createElement(SkillInformations, skillInformations), /*#__PURE__*/React.createElement(
|
|
131
|
-
className: style.contentContainer
|
|
132
|
-
}, /*#__PURE__*/React.createElement(Title, content.title), /*#__PURE__*/React.createElement(ListItems, content.listContent)));
|
|
353
|
+
}, /*#__PURE__*/React.createElement(SkillInformations, skillInformations), /*#__PURE__*/React.createElement(Translations, translations), /*#__PURE__*/React.createElement(Content, content));
|
|
133
354
|
};
|
|
134
355
|
SkillEdition.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
135
356
|
export default SkillEdition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","BrandFormGroup","ListItems","Title","TitleAndInput","propTypes","style","buildFormField","field","type","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","padding","fontWeight","fields","options","onChange","formProps","createElement","className","skillInformationsContainer","SkillEdition","props","translations","content","container","contentContainer","listContent","process","env","NODE_ENV"],"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, {\n SkillEditionProps,\n SkillInformationsProps,\n InputTextareaProps,\n InputTextProps\n} from './types';\nimport style from './style.css';\n\nconst buildFormField = (field: InputTextareaProps | InputTextProps, type: 'text' | 'textarea') => {\n return {\n ...field,\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) => {\n const {form, iconEditor} = 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,\n buttonLink: iconEditor.buttonLink\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 padding: '0 8px 0 16px',\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 }\n },\n {\n ...buildTitleAndInputField({\n title: inputText.title,\n required: true,\n childType: 'inputText'\n }),\n field: buildFormField(inputText.field, 'text')\n },\n {\n ...buildTitleAndInputField({\n title: inputTextArea.title,\n childType: 'inputTextArea'\n }),\n field: buildFormField(inputTextArea.field, 'textarea')\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\nconst SkillEdition = (props: SkillEditionProps) => {\n const {skillInformations, translations, content} = props;\n\n return (\n <div className={style.container}>\n <SkillInformations {...skillInformations} />\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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,aAAa,MAAM,oBAAoB;AAC9C,OAAOC,SAAS,MAKT,SAAS;AAChB,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,cAAc,GAAGA,CAACC,KAA0C,EAAEC,IAAyB,KAAK;EAChG,OAAO;IACL,GAAGD,KAAK;IACRC,IAAI;IACJC,KAAK,EAAE,cAAc;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;IACtBuB;EACF,CAAC;EAED,oBACE1C,KAAA,CAAA8C,aAAA;IAAKC,SAAS,EAAEzC,KAAK,CAAC0C;EAA2B,gBAC/ChD,KAAA,CAAA8C,aAAA,CAAC7C,cAAc,EAAK4C,SAAY,CAAC,eACjC7C,KAAA,CAAA8C,aAAA;IAAKC,SAAS,EAAEzC,KAAK,CAACkB;EAAW,gBAC/BxB,KAAA,CAAA8C,aAAA,CAAC1C,aAAa,EAAKwB,eAAkB,CAClC,CACF,CAAC;AAEV,CAAC;AAED,MAAMqB,YAAY,GAAIC,KAAwB,IAAK;EACjD,MAAM;IAAC5B,iBAAiB;IAAE6B,YAAY;IAAEC;EAAO,CAAC,GAAGF,KAAK;EAExD,oBACElD,KAAA,CAAA8C,aAAA;IAAKC,SAAS,EAAEzC,KAAK,CAAC+C;EAAU,gBAC9BrD,KAAA,CAAA8C,aAAA,CAACzB,iBAAiB,EAAKC,iBAAoB,CAAC,eAC5CtB,KAAA,CAAA8C,aAAA,CAAC5C,SAAS,EAAKiD,YAAe,CAAC,eAC/BnD,KAAA,CAAA8C,aAAA;IAAKC,SAAS,EAAEzC,KAAK,CAACgD;EAAiB,gBACrCtD,KAAA,CAAA8C,aAAA,CAAC3C,KAAK,EAAKiD,OAAO,CAACvC,KAAQ,CAAC,eAC5Bb,KAAA,CAAA8C,aAAA,CAAC5C,SAAS,EAAKkD,OAAO,CAACG,WAAc,CAClC,CACF,CAAC;AAEV,CAAC;AAEDN,YAAY,CAAC5C,SAAS,GAAAmD,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGrD,SAAS;AAElC,eAAe4C,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","BrandFormGroup","ListItems","Title","TitleAndInput","COLORS","propTypes","style","buildFormField","field","type","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","padding","fontWeight","fields","options","onChange","formProps","createElement","className","skillInformationsContainer","uncappedMap","_map","convert","cap","buildButtonProps","button","hoverBackgroundColor","primary_100","hoverColor","cm_primary_blue","color","width","backgroundColor","cm_blue_50","paddingRight","paddingleft","buildTranslationItems","itemTitle","onEditClick","onDeleteClick","index","id","gray","cm_grey_500","secondButtonLink","Translations","items","localesOptions","emptyResult","buttonProps","translationMenuAction","menu","buttons","optionLabel","ref","optionRef","optionOnClick","disabled","_includes","_keys","menuWrapper","maxHeight","translationProps","content","_isEmpty","buttonMenuAction","buildContentItem","image","tags","iconName","checkbox","preset","Content","list","listTitle","search","titleProps","listProps","iconColor","white","fontSize","contentContainer","SkillEdition","props","translations","container","process","env","NODE_ENV"],"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 TranslationPropsType,\n SkillEditionPropsType,\n SkillInformationsProps,\n InputTextareaProps,\n InputTextProps,\n ContentPropsType,\n ContentListItemType\n} from './types';\nimport style from './style.css';\n\nconst buildFormField = (field: InputTextareaProps | InputTextProps, type: 'text' | 'textarea') => {\n return {\n ...field,\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) => {\n const {form, iconEditor} = 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,\n buttonLink: iconEditor.buttonLink\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 padding: '0 8px 0 16px',\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 }\n },\n {\n ...buildTitleAndInputField({\n title: inputText.title,\n required: true,\n childType: 'inputText'\n }),\n field: buildFormField(inputText.field, 'text')\n },\n {\n ...buildTitleAndInputField({\n title: inputTextArea.title,\n childType: 'inputTextArea'\n }),\n field: buildFormField(inputTextArea.field, 'textarea')\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 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,\n localesOptions,\n emptyResult\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(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,\n list: {title: listTitle, checkbox, items, search, emptyResult}\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps(button);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: buttonProps,\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, 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 <SkillInformations {...skillInformations} />\n <Translations {...translations} />\n <Content {...content} />\n </div>\n );\n};\n\nSkillEdition.propTypes = propTypes;\n\nexport default SkillEdition;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,OAAOC,SAAS,MAAM,eAAe;A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