@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.
Files changed (263) hide show
  1. package/es/atom/button-link/index.js +1 -1
  2. package/es/atom/button-link/index.js.map +1 -1
  3. package/es/atom/button-link/style.css +2 -2
  4. package/es/atom/icon/index.d.ts +17 -35
  5. package/es/atom/icon/index.d.ts.map +1 -1
  6. package/es/atom/icon/index.js +15 -32
  7. package/es/atom/icon/index.js.map +1 -1
  8. package/es/atom/radio-with-title/index.d.ts +3 -13
  9. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  10. package/es/atom/radio-with-title/types.d.ts +2 -13
  11. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  12. package/es/atom/status-item/index.native.js +1 -1
  13. package/es/atom/status-item/index.native.js.map +1 -1
  14. package/es/atom/tag/index.d.ts +1 -12
  15. package/es/atom/tag/style.css +0 -1
  16. package/es/atom/title/index.d.ts +2 -13
  17. package/es/molecule/banner/style.css +0 -1
  18. package/es/molecule/base-modal/style.css +1 -0
  19. package/es/molecule/bulk-progress-bar/index.js +2 -2
  20. package/es/molecule/bulk-progress-bar/index.js.map +1 -1
  21. package/es/molecule/certification-card/index.js +1 -1
  22. package/es/molecule/certification-card/index.js.map +1 -1
  23. package/es/molecule/cm-popin/types.d.ts +7 -28
  24. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  25. package/es/molecule/cm-popin/types.js +1 -1
  26. package/es/molecule/cm-popin/types.js.map +1 -1
  27. package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  28. package/es/molecule/dashboard/cards-list/index.js +0 -2
  29. package/es/molecule/dashboard/cards-list/index.js.map +1 -1
  30. package/es/molecule/learner-skill-card/index.js +8 -10
  31. package/es/molecule/learner-skill-card/index.js.map +1 -1
  32. package/es/molecule/learner-skill-card/style.css +0 -1
  33. package/es/molecule/learning-priority-modal/style.css +2 -3
  34. package/es/molecule/progress-wrapper/index.js +1 -1
  35. package/es/molecule/progress-wrapper/index.js.map +1 -1
  36. package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  37. package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  38. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +2 -13
  39. package/es/molecule/title-radio-wrapper/index.d.ts +3 -13
  40. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  41. package/es/molecule/title-radio-wrapper/types.d.ts +2 -13
  42. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  43. package/es/molecule/translation-modal/index.d.ts +1 -0
  44. package/es/molecule/translation-modal/index.d.ts.map +1 -1
  45. package/es/molecule/translation-modal/index.js +7 -24
  46. package/es/molecule/translation-modal/index.js.map +1 -1
  47. package/es/organism/cards-grid/index.d.ts +10 -48
  48. package/es/organism/cards-grid/index.d.ts.map +1 -1
  49. package/es/organism/cards-grid/index.js +2 -3
  50. package/es/organism/cards-grid/index.js.map +1 -1
  51. package/es/organism/content-skill-modal/index.d.ts +3 -13
  52. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  53. package/es/organism/content-skill-modal/types.d.ts +2 -12
  54. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  55. package/es/organism/list-item/index.js +5 -5
  56. package/es/organism/list-item/index.js.map +1 -1
  57. package/es/organism/list-item/style.css +17 -23
  58. package/es/organism/list-items/index.d.ts +2 -13
  59. package/es/organism/list-items/style.css +0 -1
  60. package/es/organism/rewards-form/index.d.ts +2 -13
  61. package/es/organism/select-opponents/index.d.ts +3 -13
  62. package/es/organism/select-opponents/index.d.ts.map +1 -1
  63. package/es/organism/select-opponents/types.d.ts +2 -13
  64. package/es/organism/select-opponents/types.d.ts.map +1 -1
  65. package/es/organism/sidebar/index.d.ts +2 -2
  66. package/es/organism/skill-edition/index.d.ts +52 -1261
  67. package/es/organism/skill-edition/index.d.ts.map +1 -1
  68. package/es/organism/skill-edition/index.js +224 -3
  69. package/es/organism/skill-edition/index.js.map +1 -1
  70. package/es/organism/skill-edition/types.d.ts +117 -1268
  71. package/es/organism/skill-edition/types.d.ts.map +1 -1
  72. package/es/organism/skill-edition/types.js +59 -7
  73. package/es/organism/skill-edition/types.js.map +1 -1
  74. package/es/organism/title-and-input/index.d.ts +5 -25
  75. package/es/organism/title-and-input/index.d.ts.map +1 -1
  76. package/es/organism/title-and-input/types.d.ts +4 -24
  77. package/es/organism/title-and-input/types.d.ts.map +1 -1
  78. package/es/organism/wizard-contents/index.d.ts +2 -13
  79. package/es/template/app-player/loading/index.d.ts +6 -27
  80. package/es/template/app-player/player/index.d.ts +12 -53
  81. package/es/template/app-player/player/slides/index.d.ts +6 -27
  82. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  83. package/es/template/app-player/popin-correction/index.d.ts +6 -26
  84. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  85. package/es/template/app-player/popin-end/index.d.ts +6 -27
  86. package/es/template/app-review/index.d.ts +7 -27
  87. package/es/template/app-review/index.d.ts.map +1 -1
  88. package/es/template/app-review/player/prop-types.d.ts +6 -27
  89. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  90. package/es/template/app-review/prop-types.d.ts +6 -27
  91. package/es/template/app-review/prop-types.d.ts.map +1 -1
  92. package/es/template/back-office/brand-update/index.d.ts +1113 -1713
  93. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  94. package/es/template/back-office/brand-update/index.js +12 -0
  95. package/es/template/back-office/brand-update/index.js.map +1 -1
  96. package/es/template/back-office/brand-update/utils.d.ts +1 -1
  97. package/es/template/common/dashboard/index.d.ts +12 -53
  98. package/es/template/common/search-page/index.d.ts +6 -27
  99. package/es/template/external-course/index.d.ts +6 -27
  100. package/es/template/skill-detail/all-courses.css +2 -3
  101. package/es/template/skill-detail/all-courses.d.ts +17 -52
  102. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  103. package/es/template/skill-detail/all-courses.js +11 -12
  104. package/es/template/skill-detail/all-courses.js.map +1 -1
  105. package/es/template/skill-detail/continue-learning.css +2 -7
  106. package/es/template/skill-detail/continue-learning.d.ts +12 -25
  107. package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
  108. package/es/template/skill-detail/continue-learning.js.map +1 -1
  109. package/es/template/skill-detail/index.d.ts +71 -81
  110. package/es/template/skill-detail/index.d.ts.map +1 -1
  111. package/es/template/skill-detail/index.js +55 -87
  112. package/es/template/skill-detail/index.js.map +1 -1
  113. package/es/template/skill-detail/style.css +39 -97
  114. package/es/variables/colors.css +0 -2
  115. package/es/variables/colors.d.ts +2 -3
  116. package/es/variables/colors.d.ts.map +1 -1
  117. package/es/variables/colors.js +3 -4
  118. package/es/variables/colors.js.map +1 -1
  119. package/es/variables/theme.native.js +1 -1
  120. package/es/variables/theme.native.js.map +1 -1
  121. package/lib/atom/button-link/index.js +1 -1
  122. package/lib/atom/button-link/index.js.map +1 -1
  123. package/lib/atom/button-link/style.css +2 -2
  124. package/lib/atom/icon/index.d.ts +17 -35
  125. package/lib/atom/icon/index.d.ts.map +1 -1
  126. package/lib/atom/icon/index.js +18 -34
  127. package/lib/atom/icon/index.js.map +1 -1
  128. package/lib/atom/radio-with-title/index.d.ts +3 -13
  129. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  130. package/lib/atom/radio-with-title/types.d.ts +2 -13
  131. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  132. package/lib/atom/status-item/index.native.js +1 -1
  133. package/lib/atom/status-item/index.native.js.map +1 -1
  134. package/lib/atom/tag/index.d.ts +1 -12
  135. package/lib/atom/tag/style.css +0 -1
  136. package/lib/atom/title/index.d.ts +2 -13
  137. package/lib/molecule/banner/style.css +0 -1
  138. package/lib/molecule/base-modal/style.css +1 -0
  139. package/lib/molecule/bulk-progress-bar/index.js +2 -2
  140. package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
  141. package/lib/molecule/certification-card/index.js +1 -1
  142. package/lib/molecule/certification-card/index.js.map +1 -1
  143. package/lib/molecule/cm-popin/types.d.ts +7 -28
  144. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  145. package/lib/molecule/cm-popin/types.js +1 -1
  146. package/lib/molecule/cm-popin/types.js.map +1 -1
  147. package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  148. package/lib/molecule/dashboard/cards-list/index.js +0 -2
  149. package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
  150. package/lib/molecule/learner-skill-card/index.js +8 -10
  151. package/lib/molecule/learner-skill-card/index.js.map +1 -1
  152. package/lib/molecule/learner-skill-card/style.css +0 -1
  153. package/lib/molecule/learning-priority-modal/style.css +2 -3
  154. package/lib/molecule/progress-wrapper/index.js +1 -1
  155. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  156. package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  157. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  158. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -13
  159. package/lib/molecule/title-radio-wrapper/index.d.ts +3 -13
  160. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  161. package/lib/molecule/title-radio-wrapper/types.d.ts +2 -13
  162. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  163. package/lib/molecule/translation-modal/index.d.ts +1 -0
  164. package/lib/molecule/translation-modal/index.d.ts.map +1 -1
  165. package/lib/molecule/translation-modal/index.js +6 -23
  166. package/lib/molecule/translation-modal/index.js.map +1 -1
  167. package/lib/organism/cards-grid/index.d.ts +10 -48
  168. package/lib/organism/cards-grid/index.d.ts.map +1 -1
  169. package/lib/organism/cards-grid/index.js +2 -3
  170. package/lib/organism/cards-grid/index.js.map +1 -1
  171. package/lib/organism/content-skill-modal/index.d.ts +3 -13
  172. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  173. package/lib/organism/content-skill-modal/types.d.ts +2 -12
  174. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  175. package/lib/organism/list-item/index.js +5 -5
  176. package/lib/organism/list-item/index.js.map +1 -1
  177. package/lib/organism/list-item/style.css +17 -23
  178. package/lib/organism/list-items/index.d.ts +2 -13
  179. package/lib/organism/list-items/style.css +0 -1
  180. package/lib/organism/rewards-form/index.d.ts +2 -13
  181. package/lib/organism/select-opponents/index.d.ts +3 -13
  182. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  183. package/lib/organism/select-opponents/types.d.ts +2 -13
  184. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  185. package/lib/organism/sidebar/index.d.ts +2 -2
  186. package/lib/organism/skill-edition/index.d.ts +52 -1261
  187. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  188. package/lib/organism/skill-edition/index.js +224 -3
  189. package/lib/organism/skill-edition/index.js.map +1 -1
  190. package/lib/organism/skill-edition/types.d.ts +117 -1268
  191. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  192. package/lib/organism/skill-edition/types.js +59 -7
  193. package/lib/organism/skill-edition/types.js.map +1 -1
  194. package/lib/organism/title-and-input/index.d.ts +5 -25
  195. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  196. package/lib/organism/title-and-input/types.d.ts +4 -24
  197. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  198. package/lib/organism/wizard-contents/index.d.ts +2 -13
  199. package/lib/template/app-player/loading/index.d.ts +6 -27
  200. package/lib/template/app-player/player/index.d.ts +12 -53
  201. package/lib/template/app-player/player/slides/index.d.ts +6 -27
  202. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  203. package/lib/template/app-player/popin-correction/index.d.ts +6 -26
  204. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  205. package/lib/template/app-player/popin-end/index.d.ts +6 -27
  206. package/lib/template/app-review/index.d.ts +7 -27
  207. package/lib/template/app-review/index.d.ts.map +1 -1
  208. package/lib/template/app-review/player/prop-types.d.ts +6 -27
  209. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  210. package/lib/template/app-review/prop-types.d.ts +6 -27
  211. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  212. package/lib/template/back-office/brand-update/index.d.ts +1113 -1713
  213. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  214. package/lib/template/back-office/brand-update/index.js +12 -0
  215. package/lib/template/back-office/brand-update/index.js.map +1 -1
  216. package/lib/template/back-office/brand-update/utils.d.ts +1 -1
  217. package/lib/template/common/dashboard/index.d.ts +12 -53
  218. package/lib/template/common/search-page/index.d.ts +6 -27
  219. package/lib/template/external-course/index.d.ts +6 -27
  220. package/lib/template/skill-detail/all-courses.css +2 -3
  221. package/lib/template/skill-detail/all-courses.d.ts +17 -52
  222. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  223. package/lib/template/skill-detail/all-courses.js +11 -11
  224. package/lib/template/skill-detail/all-courses.js.map +1 -1
  225. package/lib/template/skill-detail/continue-learning.css +2 -7
  226. package/lib/template/skill-detail/continue-learning.d.ts +12 -25
  227. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
  228. package/lib/template/skill-detail/continue-learning.js.map +1 -1
  229. package/lib/template/skill-detail/index.d.ts +71 -81
  230. package/lib/template/skill-detail/index.d.ts.map +1 -1
  231. package/lib/template/skill-detail/index.js +55 -87
  232. package/lib/template/skill-detail/index.js.map +1 -1
  233. package/lib/template/skill-detail/style.css +39 -97
  234. package/lib/variables/colors.css +0 -2
  235. package/lib/variables/colors.d.ts +2 -3
  236. package/lib/variables/colors.d.ts.map +1 -1
  237. package/lib/variables/colors.js +3 -4
  238. package/lib/variables/colors.js.map +1 -1
  239. package/lib/variables/theme.native.js +1 -1
  240. package/lib/variables/theme.native.js.map +1 -1
  241. package/locales/bs/global.json +1 -0
  242. package/locales/de/global.json +1 -0
  243. package/locales/es/global.json +1 -0
  244. package/locales/et/global.json +1 -0
  245. package/locales/fi/global.json +1 -0
  246. package/locales/fr/global.json +1 -0
  247. package/locales/hu/global.json +1 -0
  248. package/locales/hy/global.json +1 -0
  249. package/locales/ja/global.json +1 -0
  250. package/locales/nl/global.json +1 -0
  251. package/locales/pl/global.json +1 -0
  252. package/locales/pt/global.json +1 -0
  253. package/locales/ro/global.json +1 -0
  254. package/locales/sk/global.json +1 -0
  255. package/locales/sl/global.json +1 -0
  256. package/locales/sv/global.json +1 -0
  257. package/locales/tl/global.json +1 -0
  258. package/locales/tr/global.json +1 -0
  259. package/locales/uk/global.json +1 -0
  260. package/locales/vi/global.json +1 -0
  261. package/locales/zh/global.json +1 -0
  262. package/locales/zh_TW/global.json +1 -0
  263. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAkB,EAChB,iBAAiB,EAIlB,MAAM,SAAS,CAAC;AAoIjB,QAAA,MAAM,YAAY;YAAW,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjD,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -2,11 +2,16 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
+ var _map2 = _interopRequireDefault(require("lodash/fp/map"));
6
+ var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
7
+ var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
8
+ var _includes2 = _interopRequireDefault(require("lodash/fp/includes"));
5
9
  var _react = _interopRequireDefault(require("react"));
6
10
  var _brandFormGroup = _interopRequireDefault(require("../../molecule/brand-form-group"));
7
11
  var _listItems = _interopRequireDefault(require("../list-items"));
8
12
  var _title = _interopRequireDefault(require("../../atom/title"));
9
13
  var _titleAndInput = _interopRequireDefault(require("../title-and-input"));
14
+ var _colors = require("../../variables/colors");
10
15
  var _types = _interopRequireDefault(require("./types"));
11
16
  var _style = _interopRequireDefault(require("./style.css"));
12
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -124,6 +129,224 @@ const SkillInformations = skillInformations => {
124
129
  className: _style.default.iconEditor
125
130
  }, /*#__PURE__*/_react.default.createElement(_titleAndInput.default, iconEditorProps)));
126
131
  };
132
+
133
+ // @ts-expect-error convert is not recognized by the types
134
+ const uncappedMap = _map2.default.convert({
135
+ cap: false
136
+ });
137
+ const buildButtonProps = button => ({
138
+ ...button,
139
+ type: 'primary',
140
+ 'aria-label': button.label,
141
+ 'data-name': `button-${button.label}`,
142
+ hoverBackgroundColor: _colors.COLORS.primary_100,
143
+ hoverColor: _colors.COLORS.cm_primary_blue,
144
+ icon: {
145
+ position: 'left',
146
+ faIcon: {
147
+ name: 'plus',
148
+ color: _colors.COLORS.cm_primary_blue,
149
+ size: 14,
150
+ customStyle: {
151
+ padding: 0
152
+ }
153
+ }
154
+ },
155
+ customStyle: {
156
+ width: 'fit-content',
157
+ backgroundColor: _colors.COLORS.cm_blue_50,
158
+ color: _colors.COLORS.cm_primary_blue,
159
+ borderRadius: '12px',
160
+ paddingRight: '8px',
161
+ paddingleft: '16px',
162
+ fontWeight: 600
163
+ }
164
+ });
165
+ const buildTranslationItems = ({
166
+ title: itemTitle,
167
+ onEditClick,
168
+ onDeleteClick
169
+ }, index) => ({
170
+ id: index,
171
+ title: itemTitle,
172
+ buttonLink: {
173
+ 'aria-label': 'Edit',
174
+ type: 'primary',
175
+ customStyle: {
176
+ width: 'fit-content',
177
+ backgroundColor: 'transparent'
178
+ },
179
+ hoverBackgroundColor: _colors.COLORS.gray,
180
+ icon: {
181
+ position: 'left',
182
+ faIcon: {
183
+ name: 'edit',
184
+ color: _colors.COLORS.cm_grey_500,
185
+ size: 16
186
+ }
187
+ },
188
+ onClick: onEditClick
189
+ },
190
+ secondButtonLink: {
191
+ 'aria-label': 'Delete',
192
+ type: 'primary',
193
+ customStyle: {
194
+ width: 'fit-content',
195
+ backgroundColor: 'transparent'
196
+ },
197
+ hoverBackgroundColor: _colors.COLORS.gray,
198
+ icon: {
199
+ position: 'left',
200
+ faIcon: {
201
+ name: 'trash',
202
+ color: _colors.COLORS.cm_grey_500,
203
+ size: 16
204
+ }
205
+ },
206
+ onClick: onDeleteClick
207
+ }
208
+ });
209
+ const Translations = ({
210
+ title,
211
+ subtitle,
212
+ items,
213
+ button,
214
+ localesOptions,
215
+ emptyResult
216
+ }) => {
217
+ const buttonProps = buildButtonProps(button);
218
+ const translationMenuAction = {
219
+ button: buttonProps,
220
+ menu: {
221
+ buttons: (0, _map2.default)(({
222
+ label: optionLabel,
223
+ ref: optionRef,
224
+ onClick: optionOnClick
225
+ }) => ({
226
+ type: 'defaultLeft',
227
+ onClick: optionOnClick,
228
+ customStyle: {
229
+ width: '238px'
230
+ },
231
+ label: optionLabel,
232
+ 'data-name': optionLabel,
233
+ // disable if current locale option is already in items list
234
+ disabled: (0, _includes2.default)(optionRef, (0, _keys2.default)(items))
235
+ }), localesOptions)
236
+ },
237
+ menuWrapper: {
238
+ customStyle: {
239
+ maxHeight: '252px'
240
+ }
241
+ }
242
+ };
243
+ const translationProps = {
244
+ title: {
245
+ title,
246
+ type: 'form-group',
247
+ subtitle,
248
+ titleSize: 'xl-strong',
249
+ subtitleSize: 'medium'
250
+ },
251
+ 'aria-label': title,
252
+ content: {
253
+ ...(!(0, _isEmpty2.default)(emptyResult) && {
254
+ emptyResult: {
255
+ ...emptyResult,
256
+ button: translationMenuAction
257
+ }
258
+ }),
259
+ items: uncappedMap(buildTranslationItems, items),
260
+ type: 'list'
261
+ },
262
+ buttonMenuAction: translationMenuAction
263
+ };
264
+ return /*#__PURE__*/_react.default.createElement(_listItems.default, translationProps);
265
+ };
266
+ const buildContentItem = ({
267
+ ref,
268
+ title,
269
+ subtitle,
270
+ image,
271
+ tags: {
272
+ label,
273
+ iconName
274
+ },
275
+ checkbox
276
+ }) => ({
277
+ id: ref,
278
+ title,
279
+ subtitle,
280
+ image,
281
+ tags: [{
282
+ label,
283
+ type: 'default',
284
+ icon: {
285
+ iconName,
286
+ preset: 's',
287
+ customStyle: {
288
+ padding: 0
289
+ },
290
+ position: 'left'
291
+ }
292
+ }],
293
+ checkbox
294
+ });
295
+ const Content = ({
296
+ title,
297
+ subtitle,
298
+ button,
299
+ list: {
300
+ title: listTitle,
301
+ checkbox,
302
+ items,
303
+ search,
304
+ emptyResult
305
+ }
306
+ }) => {
307
+ const buttonProps = buildButtonProps(button);
308
+ const titleProps = {
309
+ type: 'form-group',
310
+ title,
311
+ subtitle,
312
+ button: buttonProps,
313
+ required: true
314
+ };
315
+ const listProps = {
316
+ ...(!(0, _isEmpty2.default)(checkbox) && {
317
+ ...checkbox,
318
+ icon: {
319
+ iconName: 'minus',
320
+ iconColor: _colors.COLORS.white,
321
+ preset: 's'
322
+ },
323
+ customStyle: {
324
+ fontWeight: 600,
325
+ color: _colors.COLORS.cm_grey_500,
326
+ fontSize: '16px'
327
+ }
328
+ }),
329
+ title: listTitle,
330
+ 'aria-label': 'content list items',
331
+ content: {
332
+ ...(!(0, _isEmpty2.default)(emptyResult) && {
333
+ emptyResult: {
334
+ ...emptyResult,
335
+ button: buttonProps
336
+ }
337
+ }),
338
+ items: (0, _map2.default)(buildContentItem, items),
339
+ type: 'list'
340
+ },
341
+ search: {
342
+ ...search,
343
+ theme: 'coorpmanager'
344
+ }
345
+ };
346
+ return /*#__PURE__*/_react.default.createElement("div", {
347
+ className: _style.default.contentContainer
348
+ }, /*#__PURE__*/_react.default.createElement(_title.default, titleProps), /*#__PURE__*/_react.default.createElement(_listItems.default, listProps));
349
+ };
127
350
  const SkillEdition = props => {
128
351
  const {
129
352
  skillInformations,
@@ -132,9 +355,7 @@ const SkillEdition = props => {
132
355
  } = props;
133
356
  return /*#__PURE__*/_react.default.createElement("div", {
134
357
  className: _style.default.container
135
- }, /*#__PURE__*/_react.default.createElement(SkillInformations, skillInformations), /*#__PURE__*/_react.default.createElement(_listItems.default, translations), /*#__PURE__*/_react.default.createElement("div", {
136
- className: _style.default.contentContainer
137
- }, /*#__PURE__*/_react.default.createElement(_title.default, content.title), /*#__PURE__*/_react.default.createElement(_listItems.default, content.listContent)));
358
+ }, /*#__PURE__*/_react.default.createElement(SkillInformations, skillInformations), /*#__PURE__*/_react.default.createElement(Translations, translations), /*#__PURE__*/_react.default.createElement(Content, content));
138
359
  };
139
360
  SkillEdition.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
140
361
  var _default = exports.default = SkillEdition;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_brandFormGroup","_listItems","_title","_titleAndInput","_types","_style","e","__esModule","default","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","style","skillInformationsContainer","SkillEdition","props","translations","content","container","contentContainer","listContent","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/organism/skill-edition/index.tsx"],"sourcesContent":["import React from 'react';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport TitleAndInput from '../title-and-input';\nimport propTypes, {\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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,MAAA,GAAAN,sBAAA,CAAAC,OAAA;AAMA,IAAAM,MAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,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;AAEDN,YAAY,CAACO,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAxD,OAAA,GAEpB4C,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_brandFormGroup","_listItems","_title","_titleAndInput","_colors","_types","_style","e","__esModule","default","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","style","skillInformationsContainer","uncappedMap","_map2","convert","cap","buildButtonProps","button","hoverBackgroundColor","COLORS","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","_includes2","_keys2","menuWrapper","maxHeight","translationProps","content","_isEmpty2","buttonMenuAction","buildContentItem","image","tags","iconName","checkbox","preset","Content","list","listTitle","search","titleProps","listProps","iconColor","white","fontSize","contentContainer","SkillEdition","props","translations","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} 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,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,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAP,sBAAA,CAAAC,OAAA;AASA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,cAAc,GAAGA,CAACC,KAA0C,EAAEC,IAAyB,KAAK;EAChG,OAAO;IACL,GAAGD,KAAK;IACRC,IAAI;IACJC,KAAK,EAAE,cAAc;IACrBC,IAAI,EAAE;EACR,CAAC;AACH,CAAC;AAED,MAAMC,uBAAuB,GAAGA,CAAC;EAC/BC,KAAK;EACLC,QAAQ;EACRC,QAAQ,GAAG,KAAK;EAChBC,QAAQ;EACRC;AAOF,CAAC,KAAK;EACJ,OAAO;IACLJ,KAAK,EAAE;MACLJ,IAAI,EAAE,YAAY;MAClBI,KAAK;MACLC,QAAQ;MACRI,SAAS,EAAE,iBAAiB;MAC5BC,YAAY,EAAEL,QAAQ,GAAG,yBAAyB,GAA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