@coorpacademy/components 11.40.26 → 11.41.0

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 (315) hide show
  1. package/es/atom/chip/index.d.ts +1 -0
  2. package/es/atom/chip/index.d.ts.map +1 -1
  3. package/es/atom/chip/index.js +6 -3
  4. package/es/atom/chip/index.js.map +1 -1
  5. package/es/atom/drag-and-drop/index.d.ts +2 -0
  6. package/es/atom/drag-and-drop/index.d.ts.map +1 -1
  7. package/es/atom/drag-and-drop/index.js +9 -4
  8. package/es/atom/drag-and-drop/index.js.map +1 -1
  9. package/es/atom/input-date/index.d.ts +21 -0
  10. package/es/atom/input-date/index.d.ts.map +1 -0
  11. package/es/atom/input-date/index.js +73 -0
  12. package/es/atom/input-date/index.js.map +1 -0
  13. package/es/atom/input-date/style.css +88 -0
  14. package/es/atom/input-file-draggable/index.d.ts +10 -2
  15. package/es/atom/input-file-draggable/index.d.ts.map +1 -1
  16. package/es/atom/input-file-draggable/index.js +12 -4
  17. package/es/atom/input-file-draggable/index.js.map +1 -1
  18. package/es/atom/radio-with-title/index.d.ts +1 -0
  19. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  20. package/es/atom/radio-with-title/types.d.ts +1 -0
  21. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  22. package/es/atom/title/index.d.ts +1 -0
  23. package/es/atom/title/index.d.ts.map +1 -1
  24. package/es/atom/title/index.js +16 -6
  25. package/es/atom/title/index.js.map +1 -1
  26. package/es/atom/title/style.css +4 -0
  27. package/es/atom/video-upload/index.d.ts +2 -0
  28. package/es/molecule/assignment-card/index.d.ts +62 -0
  29. package/es/molecule/assignment-card/index.d.ts.map +1 -0
  30. package/es/molecule/assignment-card/index.js +91 -0
  31. package/es/molecule/assignment-card/index.js.map +1 -0
  32. package/es/molecule/assignment-card/style.css +98 -0
  33. package/es/molecule/assignment-status-tag/index.d.ts +13 -0
  34. package/es/molecule/assignment-status-tag/index.d.ts.map +1 -0
  35. package/es/molecule/assignment-status-tag/index.js +42 -0
  36. package/es/molecule/assignment-status-tag/index.js.map +1 -0
  37. package/es/molecule/assignment-status-tag/types.d.ts +15 -0
  38. package/es/molecule/assignment-status-tag/types.d.ts.map +1 -0
  39. package/es/molecule/assignment-status-tag/types.js +8 -0
  40. package/es/molecule/assignment-status-tag/types.js.map +1 -0
  41. package/es/molecule/brand-form-group/index.d.ts.map +1 -1
  42. package/es/molecule/brand-form-group/index.js +7 -0
  43. package/es/molecule/brand-form-group/index.js.map +1 -1
  44. package/es/molecule/card/index.d.ts +1 -0
  45. package/es/molecule/card/index.d.ts.map +1 -1
  46. package/es/molecule/card/index.js +3 -0
  47. package/es/molecule/card/index.js.map +1 -1
  48. package/es/molecule/card-content/index.d.ts +3 -1
  49. package/es/molecule/card-content/index.d.ts.map +1 -1
  50. package/es/molecule/card-content/index.js +7 -1
  51. package/es/molecule/card-content/index.js.map +1 -1
  52. package/es/molecule/cm-popin/types.d.ts +11 -0
  53. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  54. package/es/molecule/dashboard/cards-list/index.d.ts +3 -0
  55. package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  56. package/es/molecule/dashboard/cards-list/index.js +11 -5
  57. package/es/molecule/dashboard/cards-list/index.js.map +1 -1
  58. package/es/molecule/dashboard/cards-list/prop-types.d.ts +1 -0
  59. package/es/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
  60. package/es/molecule/dashboard/cards-list/prop-types.js.map +1 -1
  61. package/es/molecule/drag-and-drop-wrapper/index.d.ts +6 -0
  62. package/es/molecule/draggable-list/index.d.ts +63 -54
  63. package/es/molecule/tabs/index.d.ts +1 -0
  64. package/es/molecule/tabs/index.d.ts.map +1 -1
  65. package/es/molecule/tabs/index.js +7 -3
  66. package/es/molecule/tabs/index.js.map +1 -1
  67. package/es/molecule/tabs/style.css +4 -0
  68. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +13 -0
  69. package/es/molecule/title-radio-wrapper/index.d.ts +7 -0
  70. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  71. package/es/molecule/title-radio-wrapper/types.d.ts +7 -0
  72. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  73. package/es/organism/assignment-audience/index.d.ts +92 -0
  74. package/es/organism/assignment-audience/index.d.ts.map +1 -0
  75. package/es/organism/assignment-audience/index.js +236 -0
  76. package/es/organism/assignment-audience/index.js.map +1 -0
  77. package/es/organism/assignment-audience/style.css +115 -0
  78. package/es/organism/assignment-audience/types.d.ts +193 -0
  79. package/es/organism/assignment-audience/types.d.ts.map +1 -0
  80. package/es/organism/assignment-audience/types.js +108 -0
  81. package/es/organism/assignment-audience/types.js.map +1 -0
  82. package/es/organism/assignment-audience/upload-result.css +47 -0
  83. package/es/organism/assignment-audience/upload-result.d.ts +26 -0
  84. package/es/organism/assignment-audience/upload-result.d.ts.map +1 -0
  85. package/es/organism/assignment-audience/upload-result.js +89 -0
  86. package/es/organism/assignment-audience/upload-result.js.map +1 -0
  87. package/es/organism/assignment-row/index.d.ts +55 -0
  88. package/es/organism/assignment-row/index.d.ts.map +1 -0
  89. package/es/organism/assignment-row/index.js +38 -0
  90. package/es/organism/assignment-row/index.js.map +1 -0
  91. package/es/organism/assignment-row/types.d.ts +83 -0
  92. package/es/organism/assignment-row/types.d.ts.map +1 -0
  93. package/es/organism/assignment-row/types.js +29 -0
  94. package/es/organism/assignment-row/types.js.map +1 -0
  95. package/es/organism/brand-learning-priorities/index.d.ts +63 -54
  96. package/es/organism/content-skill-modal/index.d.ts +10 -0
  97. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  98. package/es/organism/content-skill-modal/types.d.ts +10 -0
  99. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  100. package/es/organism/list-item/index.d.ts +13 -1
  101. package/es/organism/list-item/index.d.ts.map +1 -1
  102. package/es/organism/list-item/index.js +45 -3
  103. package/es/organism/list-item/index.js.map +1 -1
  104. package/es/organism/list-item/style.css +36 -0
  105. package/es/organism/list-items/index.d.ts +10 -0
  106. package/es/organism/list-items/index.d.ts.map +1 -1
  107. package/es/organism/list-items/index.js +4 -1
  108. package/es/organism/list-items/index.js.map +1 -1
  109. package/es/organism/mooc-header/index.d.ts +7 -0
  110. package/es/organism/mooc-header/index.d.ts.map +1 -1
  111. package/es/organism/mooc-header/index.js +30 -1
  112. package/es/organism/mooc-header/index.js.map +1 -1
  113. package/es/organism/mooc-header/style.css +11 -0
  114. package/es/organism/rewards-form/index.d.ts +13 -0
  115. package/es/organism/select-opponents/index.d.ts +13 -0
  116. package/es/organism/select-opponents/index.d.ts.map +1 -1
  117. package/es/organism/select-opponents/types.d.ts +13 -0
  118. package/es/organism/select-opponents/types.d.ts.map +1 -1
  119. package/es/organism/title-and-input/index.d.ts +14 -0
  120. package/es/organism/title-and-input/index.d.ts.map +1 -1
  121. package/es/organism/title-and-input/types.d.ts +14 -0
  122. package/es/organism/title-and-input/types.d.ts.map +1 -1
  123. package/es/organism/wizard-contents/index.d.ts +13 -0
  124. package/es/template/app-player/loading/index.d.ts +11 -0
  125. package/es/template/app-player/player/index.d.ts +22 -0
  126. package/es/template/app-player/player/slides/index.d.ts +11 -0
  127. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  128. package/es/template/app-player/popin-correction/index.d.ts +11 -0
  129. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  130. package/es/template/app-player/popin-end/index.d.ts +14 -0
  131. package/es/template/app-player/popin-end/summary.d.ts +3 -0
  132. package/es/template/app-review/index.d.ts +11 -0
  133. package/es/template/app-review/index.d.ts.map +1 -1
  134. package/es/template/app-review/player/prop-types.d.ts +11 -0
  135. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  136. package/es/template/app-review/prop-types.d.ts +11 -0
  137. package/es/template/app-review/prop-types.d.ts.map +1 -1
  138. package/es/template/back-office/brand-update/index.d.ts +95 -54
  139. package/es/template/certification-detail/index.d.ts +11 -0
  140. package/es/template/cockpit/jw-uploader/index.d.ts +2 -0
  141. package/es/template/common/dashboard/index.d.ts +22 -0
  142. package/es/template/common/dashboard/index.d.ts.map +1 -1
  143. package/es/template/common/dashboard/index.js +37 -1
  144. package/es/template/common/dashboard/index.js.map +1 -1
  145. package/es/template/common/search-page/index.d.ts +17 -0
  146. package/es/template/external-course/index.d.ts +11 -0
  147. package/es/template/my-assignments/index.d.ts +167 -0
  148. package/es/template/my-assignments/index.d.ts.map +1 -0
  149. package/es/template/my-assignments/index.js +221 -0
  150. package/es/template/my-assignments/index.js.map +1 -0
  151. package/es/template/my-assignments/style.css +84 -0
  152. package/es/template/my-learning/index.d.ts +3 -0
  153. package/es/template/playlist-detail/index.d.ts +11 -0
  154. package/es/template/teams-dashboard/index.d.ts +3 -0
  155. package/es/util/proptypes.d.ts.map +1 -1
  156. package/es/util/proptypes.js +2 -2
  157. package/es/util/proptypes.js.map +1 -1
  158. package/lib/atom/chip/index.d.ts +1 -0
  159. package/lib/atom/chip/index.d.ts.map +1 -1
  160. package/lib/atom/chip/index.js +6 -3
  161. package/lib/atom/chip/index.js.map +1 -1
  162. package/lib/atom/drag-and-drop/index.d.ts +2 -0
  163. package/lib/atom/drag-and-drop/index.d.ts.map +1 -1
  164. package/lib/atom/drag-and-drop/index.js +9 -4
  165. package/lib/atom/drag-and-drop/index.js.map +1 -1
  166. package/lib/atom/input-date/index.d.ts +21 -0
  167. package/lib/atom/input-date/index.d.ts.map +1 -0
  168. package/lib/atom/input-date/index.js +80 -0
  169. package/lib/atom/input-date/index.js.map +1 -0
  170. package/lib/atom/input-date/style.css +88 -0
  171. package/lib/atom/input-file-draggable/index.d.ts +10 -2
  172. package/lib/atom/input-file-draggable/index.d.ts.map +1 -1
  173. package/lib/atom/input-file-draggable/index.js +12 -4
  174. package/lib/atom/input-file-draggable/index.js.map +1 -1
  175. package/lib/atom/radio-with-title/index.d.ts +1 -0
  176. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  177. package/lib/atom/radio-with-title/types.d.ts +1 -0
  178. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  179. package/lib/atom/title/index.d.ts +1 -0
  180. package/lib/atom/title/index.d.ts.map +1 -1
  181. package/lib/atom/title/index.js +16 -6
  182. package/lib/atom/title/index.js.map +1 -1
  183. package/lib/atom/title/style.css +4 -0
  184. package/lib/atom/video-upload/index.d.ts +2 -0
  185. package/lib/molecule/assignment-card/index.d.ts +62 -0
  186. package/lib/molecule/assignment-card/index.d.ts.map +1 -0
  187. package/lib/molecule/assignment-card/index.js +97 -0
  188. package/lib/molecule/assignment-card/index.js.map +1 -0
  189. package/lib/molecule/assignment-card/style.css +98 -0
  190. package/lib/molecule/assignment-status-tag/index.d.ts +13 -0
  191. package/lib/molecule/assignment-status-tag/index.d.ts.map +1 -0
  192. package/lib/molecule/assignment-status-tag/index.js +47 -0
  193. package/lib/molecule/assignment-status-tag/index.js.map +1 -0
  194. package/lib/molecule/assignment-status-tag/types.d.ts +15 -0
  195. package/lib/molecule/assignment-status-tag/types.d.ts.map +1 -0
  196. package/lib/molecule/assignment-status-tag/types.js +13 -0
  197. package/lib/molecule/assignment-status-tag/types.js.map +1 -0
  198. package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
  199. package/lib/molecule/brand-form-group/index.js +7 -0
  200. package/lib/molecule/brand-form-group/index.js.map +1 -1
  201. package/lib/molecule/card/index.d.ts +1 -0
  202. package/lib/molecule/card/index.d.ts.map +1 -1
  203. package/lib/molecule/card/index.js +3 -0
  204. package/lib/molecule/card/index.js.map +1 -1
  205. package/lib/molecule/card-content/index.d.ts +3 -1
  206. package/lib/molecule/card-content/index.d.ts.map +1 -1
  207. package/lib/molecule/card-content/index.js +7 -1
  208. package/lib/molecule/card-content/index.js.map +1 -1
  209. package/lib/molecule/cm-popin/types.d.ts +11 -0
  210. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  211. package/lib/molecule/dashboard/cards-list/index.d.ts +3 -0
  212. package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  213. package/lib/molecule/dashboard/cards-list/index.js +11 -5
  214. package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
  215. package/lib/molecule/dashboard/cards-list/prop-types.d.ts +1 -0
  216. package/lib/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
  217. package/lib/molecule/dashboard/cards-list/prop-types.js.map +1 -1
  218. package/lib/molecule/drag-and-drop-wrapper/index.d.ts +6 -0
  219. package/lib/molecule/draggable-list/index.d.ts +63 -54
  220. package/lib/molecule/tabs/index.d.ts +1 -0
  221. package/lib/molecule/tabs/index.d.ts.map +1 -1
  222. package/lib/molecule/tabs/index.js +7 -3
  223. package/lib/molecule/tabs/index.js.map +1 -1
  224. package/lib/molecule/tabs/style.css +4 -0
  225. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +13 -0
  226. package/lib/molecule/title-radio-wrapper/index.d.ts +7 -0
  227. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  228. package/lib/molecule/title-radio-wrapper/types.d.ts +7 -0
  229. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  230. package/lib/organism/assignment-audience/index.d.ts +92 -0
  231. package/lib/organism/assignment-audience/index.d.ts.map +1 -0
  232. package/lib/organism/assignment-audience/index.js +242 -0
  233. package/lib/organism/assignment-audience/index.js.map +1 -0
  234. package/lib/organism/assignment-audience/style.css +115 -0
  235. package/lib/organism/assignment-audience/types.d.ts +193 -0
  236. package/lib/organism/assignment-audience/types.d.ts.map +1 -0
  237. package/lib/organism/assignment-audience/types.js +112 -0
  238. package/lib/organism/assignment-audience/types.js.map +1 -0
  239. package/lib/organism/assignment-audience/upload-result.css +47 -0
  240. package/lib/organism/assignment-audience/upload-result.d.ts +26 -0
  241. package/lib/organism/assignment-audience/upload-result.d.ts.map +1 -0
  242. package/lib/organism/assignment-audience/upload-result.js +94 -0
  243. package/lib/organism/assignment-audience/upload-result.js.map +1 -0
  244. package/lib/organism/assignment-row/index.d.ts +55 -0
  245. package/lib/organism/assignment-row/index.d.ts.map +1 -0
  246. package/lib/organism/assignment-row/index.js +45 -0
  247. package/lib/organism/assignment-row/index.js.map +1 -0
  248. package/lib/organism/assignment-row/types.d.ts +83 -0
  249. package/lib/organism/assignment-row/types.d.ts.map +1 -0
  250. package/lib/organism/assignment-row/types.js +34 -0
  251. package/lib/organism/assignment-row/types.js.map +1 -0
  252. package/lib/organism/brand-learning-priorities/index.d.ts +63 -54
  253. package/lib/organism/content-skill-modal/index.d.ts +10 -0
  254. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  255. package/lib/organism/content-skill-modal/types.d.ts +10 -0
  256. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  257. package/lib/organism/list-item/index.d.ts +13 -1
  258. package/lib/organism/list-item/index.d.ts.map +1 -1
  259. package/lib/organism/list-item/index.js +44 -3
  260. package/lib/organism/list-item/index.js.map +1 -1
  261. package/lib/organism/list-item/style.css +36 -0
  262. package/lib/organism/list-items/index.d.ts +10 -0
  263. package/lib/organism/list-items/index.d.ts.map +1 -1
  264. package/lib/organism/list-items/index.js +4 -1
  265. package/lib/organism/list-items/index.js.map +1 -1
  266. package/lib/organism/mooc-header/index.d.ts +7 -0
  267. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  268. package/lib/organism/mooc-header/index.js +30 -1
  269. package/lib/organism/mooc-header/index.js.map +1 -1
  270. package/lib/organism/mooc-header/style.css +11 -0
  271. package/lib/organism/rewards-form/index.d.ts +13 -0
  272. package/lib/organism/select-opponents/index.d.ts +13 -0
  273. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  274. package/lib/organism/select-opponents/types.d.ts +13 -0
  275. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  276. package/lib/organism/title-and-input/index.d.ts +14 -0
  277. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  278. package/lib/organism/title-and-input/types.d.ts +14 -0
  279. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  280. package/lib/organism/wizard-contents/index.d.ts +13 -0
  281. package/lib/template/app-player/loading/index.d.ts +11 -0
  282. package/lib/template/app-player/player/index.d.ts +22 -0
  283. package/lib/template/app-player/player/slides/index.d.ts +11 -0
  284. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  285. package/lib/template/app-player/popin-correction/index.d.ts +11 -0
  286. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  287. package/lib/template/app-player/popin-end/index.d.ts +14 -0
  288. package/lib/template/app-player/popin-end/summary.d.ts +3 -0
  289. package/lib/template/app-review/index.d.ts +11 -0
  290. package/lib/template/app-review/index.d.ts.map +1 -1
  291. package/lib/template/app-review/player/prop-types.d.ts +11 -0
  292. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  293. package/lib/template/app-review/prop-types.d.ts +11 -0
  294. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  295. package/lib/template/back-office/brand-update/index.d.ts +95 -54
  296. package/lib/template/certification-detail/index.d.ts +11 -0
  297. package/lib/template/cockpit/jw-uploader/index.d.ts +2 -0
  298. package/lib/template/common/dashboard/index.d.ts +22 -0
  299. package/lib/template/common/dashboard/index.d.ts.map +1 -1
  300. package/lib/template/common/dashboard/index.js +37 -1
  301. package/lib/template/common/dashboard/index.js.map +1 -1
  302. package/lib/template/common/search-page/index.d.ts +17 -0
  303. package/lib/template/external-course/index.d.ts +11 -0
  304. package/lib/template/my-assignments/index.d.ts +167 -0
  305. package/lib/template/my-assignments/index.d.ts.map +1 -0
  306. package/lib/template/my-assignments/index.js +227 -0
  307. package/lib/template/my-assignments/index.js.map +1 -0
  308. package/lib/template/my-assignments/style.css +84 -0
  309. package/lib/template/my-learning/index.d.ts +3 -0
  310. package/lib/template/playlist-detail/index.d.ts +11 -0
  311. package/lib/template/teams-dashboard/index.d.ts +3 -0
  312. package/lib/util/proptypes.d.ts.map +1 -1
  313. package/lib/util/proptypes.js +2 -2
  314. package/lib/util/proptypes.js.map +1 -1
  315. package/package.json +2 -2
@@ -0,0 +1,193 @@
1
+ import PropTypes from 'prop-types';
2
+ export declare const STATUSES: readonly ["valid", "unknown", "ambiguous", "inactive"];
3
+ export declare type UploadRowStatus = typeof STATUSES[number];
4
+ export declare const UploadResultPropTypes: {
5
+ file: PropTypes.Requireable<PropTypes.InferProps<{
6
+ name: PropTypes.Requireable<string>;
7
+ detail: PropTypes.Requireable<string>;
8
+ }>>;
9
+ summary: PropTypes.Requireable<PropTypes.InferProps<{
10
+ valid: PropTypes.Requireable<string>;
11
+ unknown: PropTypes.Requireable<string>;
12
+ ambiguous: PropTypes.Requireable<string>;
13
+ inactive: PropTypes.Requireable<string>;
14
+ }>>;
15
+ keptLabel: PropTypes.Requireable<string>;
16
+ report: PropTypes.Requireable<PropTypes.InferProps<{
17
+ label: PropTypes.Validator<string>;
18
+ onDownload: PropTypes.Validator<(...args: any[]) => any>;
19
+ }>>;
20
+ removeLabel: PropTypes.Requireable<string>;
21
+ onRemove: PropTypes.Requireable<(...args: any[]) => any>;
22
+ };
23
+ declare const AssignmentAudiencePropTypes: {
24
+ title: PropTypes.Validator<string>;
25
+ subtitle: PropTypes.Requireable<string>;
26
+ disabledExplanation: PropTypes.Requireable<string>;
27
+ everyone: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
28
+ title: PropTypes.Requireable<string>;
29
+ label: PropTypes.Validator<string>;
30
+ value: PropTypes.Validator<boolean>;
31
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
32
+ }>>>;
33
+ populations: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
34
+ title: PropTypes.Requireable<string>;
35
+ subtitle: PropTypes.Requireable<string>;
36
+ label: PropTypes.Requireable<string>;
37
+ options: PropTypes.Validator<(PropTypes.InferProps<{
38
+ name: PropTypes.Validator<string>;
39
+ value: PropTypes.Validator<string>;
40
+ selected: PropTypes.Validator<boolean>;
41
+ count: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
42
+ }> | null | undefined)[]>;
43
+ removeLabel: PropTypes.Requireable<string>;
44
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
45
+ }>>>;
46
+ upload: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
47
+ title: PropTypes.Requireable<string>;
48
+ subtitle: PropTypes.Requireable<string>;
49
+ templateLink: PropTypes.Requireable<PropTypes.InferProps<{
50
+ label: PropTypes.Requireable<string>;
51
+ href: PropTypes.Requireable<string>;
52
+ }>>;
53
+ templatePreview: PropTypes.Requireable<PropTypes.InferProps<{
54
+ header: PropTypes.Validator<string>;
55
+ rows: PropTypes.Requireable<(string | null | undefined)[]>;
56
+ }>>;
57
+ dropzone: PropTypes.Requireable<PropTypes.InferProps<{
58
+ description: PropTypes.Requireable<string>;
59
+ browse: PropTypes.Requireable<string>;
60
+ dropLabel: PropTypes.Requireable<string>;
61
+ loadingLabel: PropTypes.Requireable<string>;
62
+ }>>;
63
+ status: PropTypes.Validator<string>;
64
+ error: PropTypes.Requireable<string>;
65
+ onUpload: PropTypes.Validator<(...args: any[]) => any>;
66
+ file: PropTypes.Requireable<PropTypes.InferProps<{
67
+ name: PropTypes.Requireable<string>;
68
+ detail: PropTypes.Requireable<string>;
69
+ }>>;
70
+ summary: PropTypes.Requireable<PropTypes.InferProps<{
71
+ valid: PropTypes.Requireable<string>;
72
+ unknown: PropTypes.Requireable<string>;
73
+ ambiguous: PropTypes.Requireable<string>;
74
+ inactive: PropTypes.Requireable<string>;
75
+ }>>;
76
+ keptLabel: PropTypes.Requireable<string>;
77
+ report: PropTypes.Requireable<PropTypes.InferProps<{
78
+ label: PropTypes.Validator<string>;
79
+ onDownload: PropTypes.Validator<(...args: any[]) => any>;
80
+ }>>;
81
+ removeLabel: PropTypes.Requireable<string>;
82
+ onRemove: PropTypes.Requireable<(...args: any[]) => any>;
83
+ }>>>;
84
+ individuals: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
85
+ title: PropTypes.Requireable<string>;
86
+ placeholder: PropTypes.Requireable<string>;
87
+ value: PropTypes.Requireable<string>;
88
+ suggestions: PropTypes.Requireable<(PropTypes.InferProps<{
89
+ id: PropTypes.Validator<string>;
90
+ label: PropTypes.Validator<string>;
91
+ login: PropTypes.Validator<string>;
92
+ }> | null | undefined)[]>;
93
+ selected: PropTypes.Requireable<(PropTypes.InferProps<{
94
+ id: PropTypes.Validator<string>;
95
+ label: PropTypes.Validator<string>;
96
+ login: PropTypes.Validator<string>;
97
+ }> | null | undefined)[]>;
98
+ removeLabel: PropTypes.Requireable<string>;
99
+ onSearch: PropTypes.Validator<(...args: any[]) => any>;
100
+ onAdd: PropTypes.Validator<(...args: any[]) => any>;
101
+ onRemove: PropTypes.Validator<(...args: any[]) => any>;
102
+ }>>>;
103
+ total: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
104
+ label: PropTypes.Validator<string>;
105
+ detail: PropTypes.Requireable<string>;
106
+ }>>>;
107
+ };
108
+ export default AssignmentAudiencePropTypes;
109
+ declare type LabelsByStatus = Partial<Record<UploadRowStatus, string>>;
110
+ export declare type UploadResultProps = {
111
+ file?: {
112
+ name?: string;
113
+ detail?: string;
114
+ };
115
+ summary?: LabelsByStatus;
116
+ keptLabel?: string;
117
+ report?: {
118
+ label: string;
119
+ onDownload: () => void;
120
+ };
121
+ removeLabel?: string;
122
+ onRemove?: () => void;
123
+ };
124
+ export declare type PopulationOption = {
125
+ name: string;
126
+ value: string;
127
+ selected: boolean;
128
+ count?: string | number;
129
+ };
130
+ export declare type Learner = {
131
+ id: string;
132
+ label: string;
133
+ login: string;
134
+ };
135
+ export declare type AssignmentAudienceProps = {
136
+ title: string;
137
+ subtitle?: string;
138
+ disabledExplanation?: string;
139
+ everyone: {
140
+ title?: string;
141
+ label: string;
142
+ value: boolean;
143
+ onChange: (value: boolean) => void;
144
+ };
145
+ populations: {
146
+ title?: string;
147
+ subtitle?: string;
148
+ label?: string;
149
+ options: PopulationOption[];
150
+ removeLabel?: string;
151
+ onChange: (selected: PopulationOption[]) => void;
152
+ };
153
+ upload: UploadResultProps & {
154
+ title?: string;
155
+ subtitle?: string;
156
+ templateLink?: {
157
+ label?: string;
158
+ href?: string;
159
+ };
160
+ templatePreview?: {
161
+ header: string;
162
+ rows?: string[];
163
+ };
164
+ dropzone?: {
165
+ description?: string;
166
+ browse?: string;
167
+ dropLabel?: string;
168
+ loadingLabel?: string;
169
+ };
170
+ status: 'idle' | 'loading' | 'done' | 'error';
171
+ error?: string;
172
+ onUpload: (file: File) => void;
173
+ };
174
+ individuals: {
175
+ title?: string;
176
+ placeholder?: string;
177
+ value?: string;
178
+ suggestions?: Learner[];
179
+ selected?: Learner[];
180
+ removeLabel?: string;
181
+ onSearch: (query: string) => void;
182
+ onAdd: (learner: Learner) => void;
183
+ onRemove: (id: string) => void;
184
+ };
185
+ total: {
186
+ label: string;
187
+ detail?: string;
188
+ };
189
+ };
190
+ export declare type AssignmentAudiencePropsFixture = {
191
+ props: AssignmentAudienceProps;
192
+ };
193
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-audience/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,eAAO,MAAM,QAAQ,wDAAyD,CAAC;AAC/E,oBAAY,eAAe,GAAG,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAWtD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;CAYjC,CAAC;AAQF,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EhC,CAAC;AAEF,eAAe,2BAA2B,CAAC;AAE3C,aAAK,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;AAE/D,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KA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,CAAC"}
@@ -0,0 +1,108 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ // Each file row resolves to one of four statuses. A never-connected account is `valid` and added
4
+ // with no warning; a deactivated account is `inactive`, skipped and reported.
5
+ export const STATUSES = ['valid', 'unknown', 'ambiguous', 'inactive'];
6
+ const labelsByStatus = PropTypes.shape({
7
+ valid: PropTypes.string,
8
+ unknown: PropTypes.string,
9
+ ambiguous: PropTypes.string,
10
+ inactive: PropTypes.string
11
+ });
12
+ const fileType = PropTypes.shape({
13
+ name: PropTypes.string,
14
+ detail: PropTypes.string
15
+ });
16
+ export const UploadResultPropTypes = {
17
+ file: fileType,
18
+ // The four count labels, formatted by the app, e.g. {valid: '201 valid', unknown: '6 unknown'}
19
+ summary: labelsByStatus,
20
+ keptLabel: PropTypes.string,
21
+ // The logins not kept, with their reason, as a file the app builds: offered only when some are
22
+ report: PropTypes.shape({
23
+ label: PropTypes.string.isRequired,
24
+ onDownload: PropTypes.func.isRequired
25
+ }),
26
+ removeLabel: PropTypes.string,
27
+ onRemove: PropTypes.func
28
+ };
29
+ const learnerType = PropTypes.shape({
30
+ id: PropTypes.string.isRequired,
31
+ label: PropTypes.string.isRequired,
32
+ login: PropTypes.string.isRequired
33
+ });
34
+ const AssignmentAudiencePropTypes = {
35
+ title: PropTypes.string.isRequired,
36
+ subtitle: PropTypes.string,
37
+ disabledExplanation: PropTypes.string,
38
+ everyone: PropTypes.shape({
39
+ title: PropTypes.string,
40
+ label: PropTypes.string.isRequired,
41
+ value: PropTypes.bool.isRequired,
42
+ // Receives the new boolean
43
+ onChange: PropTypes.func.isRequired
44
+ }).isRequired,
45
+ populations: PropTypes.shape({
46
+ title: PropTypes.string,
47
+ subtitle: PropTypes.string,
48
+ label: PropTypes.string,
49
+ options: PropTypes.arrayOf(PropTypes.shape({
50
+ name: PropTypes.string.isRequired,
51
+ value: PropTypes.string.isRequired,
52
+ selected: PropTypes.bool.isRequired,
53
+ // The population's learner count, formatted by the app, shown on its chip
54
+ count: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
55
+ })).isRequired,
56
+ // Prefixes a removable chip's accessible name, e.g. 'Remove' → « Remove Managers FR »
57
+ removeLabel: PropTypes.string,
58
+ // Receives the selected options, with selected: true
59
+ onChange: PropTypes.func.isRequired
60
+ }).isRequired,
61
+ upload: PropTypes.shape({
62
+ // The file line and the result, once the file is checked
63
+ ...UploadResultPropTypes,
64
+ title: PropTypes.string,
65
+ subtitle: PropTypes.string,
66
+ templateLink: PropTypes.shape({
67
+ label: PropTypes.string,
68
+ href: PropTypes.string
69
+ }),
70
+ // A sample of the expected file, shown left of the upload: a header and example values
71
+ templatePreview: PropTypes.shape({
72
+ header: PropTypes.string.isRequired,
73
+ rows: PropTypes.arrayOf(PropTypes.string)
74
+ }),
75
+ // The Coorpmanager uploader's texts: the hint, the button, the drop text, the loader text
76
+ dropzone: PropTypes.shape({
77
+ description: PropTypes.string,
78
+ browse: PropTypes.string,
79
+ dropLabel: PropTypes.string,
80
+ loadingLabel: PropTypes.string
81
+ }),
82
+ status: PropTypes.oneOf(['idle', 'loading', 'done', 'error']).isRequired,
83
+ error: PropTypes.string,
84
+ // Receives the first File. Parsing and login resolution belong to the consumer.
85
+ onUpload: PropTypes.func.isRequired
86
+ }).isRequired,
87
+ individuals: PropTypes.shape({
88
+ title: PropTypes.string,
89
+ placeholder: PropTypes.string,
90
+ value: PropTypes.string,
91
+ suggestions: PropTypes.arrayOf(learnerType),
92
+ selected: PropTypes.arrayOf(learnerType),
93
+ // Prefixes a removable chip's accessible name, e.g. 'Remove' → « Remove Camille Durand »
94
+ removeLabel: PropTypes.string,
95
+ // Receives the query, searched by name or login
96
+ onSearch: PropTypes.func.isRequired,
97
+ // Receives the original {id, label, login} suggestion
98
+ onAdd: PropTypes.func.isRequired,
99
+ // Receives the learner id
100
+ onRemove: PropTypes.func.isRequired
101
+ }).isRequired,
102
+ total: PropTypes.shape({
103
+ label: PropTypes.string.isRequired,
104
+ detail: PropTypes.string
105
+ }).isRequired
106
+ };
107
+ export default AssignmentAudiencePropTypes;
108
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["PropTypes","STATUSES","labelsByStatus","shape","valid","string","unknown","ambiguous","inactive","fileType","name","detail","UploadResultPropTypes","file","summary","keptLabel","report","label","isRequired","onDownload","func","removeLabel","onRemove","learnerType","id","login","AssignmentAudiencePropTypes","title","subtitle","disabledExplanation","everyone","value","bool","onChange","populations","options","arrayOf","selected","count","oneOfType","number","upload","templateLink","href","templatePreview","header","rows","dropzone","description","browse","dropLabel","loadingLabel","status","oneOf","error","onUpload","individuals","placeholder","suggestions","onSearch","onAdd","total"],"sources":["../../../src/organism/assignment-audience/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\n// Each file row resolves to one of four statuses. A never-connected account is `valid` and added\n// with no warning; a deactivated account is `inactive`, skipped and reported.\nexport const STATUSES = ['valid', 'unknown', 'ambiguous', 'inactive'] as const;\nexport type UploadRowStatus = typeof STATUSES[number];\n\nconst labelsByStatus = PropTypes.shape({\n valid: PropTypes.string,\n unknown: PropTypes.string,\n ambiguous: PropTypes.string,\n inactive: PropTypes.string\n});\n\nconst fileType = PropTypes.shape({name: PropTypes.string, detail: PropTypes.string});\n\nexport const UploadResultPropTypes = {\n file: fileType,\n // The four count labels, formatted by the app, e.g. {valid: '201 valid', unknown: '6 unknown'}\n summary: labelsByStatus,\n keptLabel: PropTypes.string,\n // The logins not kept, with their reason, as a file the app builds: offered only when some are\n report: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onDownload: PropTypes.func.isRequired\n }),\n removeLabel: PropTypes.string,\n onRemove: PropTypes.func\n};\n\nconst learnerType = PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n login: PropTypes.string.isRequired\n});\n\nconst AssignmentAudiencePropTypes = {\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n disabledExplanation: PropTypes.string,\n everyone: PropTypes.shape({\n title: PropTypes.string,\n label: PropTypes.string.isRequired,\n value: PropTypes.bool.isRequired,\n // Receives the new boolean\n onChange: PropTypes.func.isRequired\n }).isRequired,\n populations: PropTypes.shape({\n title: PropTypes.string,\n subtitle: PropTypes.string,\n label: PropTypes.string,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n // The population's learner count, formatted by the app, shown on its chip\n count: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n })\n ).isRequired,\n // Prefixes a removable chip's accessible name, e.g. 'Remove' → « Remove Managers FR »\n removeLabel: PropTypes.string,\n // Receives the selected options, with selected: true\n onChange: PropTypes.func.isRequired\n }).isRequired,\n upload: PropTypes.shape({\n // The file line and the result, once the file is checked\n ...UploadResultPropTypes,\n title: PropTypes.string,\n subtitle: PropTypes.string,\n templateLink: PropTypes.shape({\n label: PropTypes.string,\n href: PropTypes.string\n }),\n // A sample of the expected file, shown left of the upload: a header and example values\n templatePreview: PropTypes.shape({\n header: PropTypes.string.isRequired,\n rows: PropTypes.arrayOf(PropTypes.string)\n }),\n // The Coorpmanager uploader's texts: the hint, the button, the drop text, the loader text\n dropzone: PropTypes.shape({\n description: PropTypes.string,\n browse: PropTypes.string,\n dropLabel: PropTypes.string,\n loadingLabel: PropTypes.string\n }),\n status: PropTypes.oneOf(['idle', 'loading', 'done', 'error']).isRequired,\n error: PropTypes.string,\n // Receives the first File. Parsing and login resolution belong to the consumer.\n onUpload: PropTypes.func.isRequired\n }).isRequired,\n individuals: PropTypes.shape({\n title: PropTypes.string,\n placeholder: PropTypes.string,\n value: PropTypes.string,\n suggestions: PropTypes.arrayOf(learnerType),\n selected: PropTypes.arrayOf(learnerType),\n // Prefixes a removable chip's accessible name, e.g. 'Remove' → « Remove Camille Durand »\n removeLabel: PropTypes.string,\n // Receives the query, searched by name or login\n onSearch: PropTypes.func.isRequired,\n // Receives the original {id, label, login} suggestion\n onAdd: PropTypes.func.isRequired,\n // Receives the learner id\n onRemove: PropTypes.func.isRequired\n }).isRequired,\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n detail: PropTypes.string\n }).isRequired\n};\n\nexport default AssignmentAudiencePropTypes;\n\ntype LabelsByStatus = Partial<Record<UploadRowStatus, string>>;\n\nexport type UploadResultProps = {\n file?: {name?: string; detail?: string};\n summary?: LabelsByStatus;\n keptLabel?: string;\n report?: {label: string; onDownload: () => void};\n removeLabel?: string;\n onRemove?: () => void;\n};\n\nexport type PopulationOption = {\n name: string;\n value: string;\n selected: boolean;\n count?: string | number;\n};\n\nexport type Learner = {\n id: string;\n label: string;\n login: string;\n};\n\nexport type AssignmentAudienceProps = {\n title: string;\n subtitle?: string;\n disabledExplanation?: string;\n everyone: {\n title?: string;\n label: string;\n value: boolean;\n onChange: (value: boolean) => void;\n };\n populations: {\n title?: string;\n subtitle?: string;\n label?: string;\n options: PopulationOption[];\n removeLabel?: string;\n onChange: (selected: PopulationOption[]) => void;\n };\n upload: UploadResultProps & {\n title?: string;\n subtitle?: string;\n templateLink?: {label?: string; href?: string};\n templatePreview?: {header: string; rows?: string[]};\n dropzone?: {\n description?: string;\n browse?: string;\n dropLabel?: string;\n loadingLabel?: string;\n };\n status: 'idle' | 'loading' | 'done' | 'error';\n error?: string;\n onUpload: (file: File) => void;\n };\n individuals: {\n title?: string;\n placeholder?: string;\n value?: string;\n suggestions?: Learner[];\n selected?: Learner[];\n removeLabel?: string;\n onSearch: (query: string) => void;\n onAdd: (learner: Learner) => void;\n onRemove: (id: string) => void;\n };\n total: {label: string; detail?: string};\n};\n\nexport type AssignmentAudiencePropsFixture = {props: AssignmentAudienceProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;;AAElC;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAU;AAG9E,MAAMC,cAAc,GAAGF,SAAS,CAACG,KAAK,CAAC;EACrCC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CAAC;AAED,eAAeQ,2BAA2B","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value cm_grey_300, cm_grey_700 from colors;
3
+
4
+ .muted {
5
+ composes: muted from "./style.css";
6
+ }
7
+
8
+ .result {
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 12px;
12
+ }
13
+
14
+ .file {
15
+ display: flex;
16
+ align-items: center;
17
+ gap: 12px;
18
+ padding: 12px 16px;
19
+ border: 1px dashed cm_grey_300;
20
+ border-radius: 12px;
21
+ font-size: 14px;
22
+ font-weight: 500;
23
+ }
24
+
25
+ .fileName {
26
+ font-size: 14px;
27
+ font-weight: 700;
28
+ color: cm_grey_700;
29
+ }
30
+
31
+ /* The file name takes the free width; the actions sit at the right edge. */
32
+ .fileText {
33
+ min-width: 0;
34
+ }
35
+
36
+ .fileActions {
37
+ display: flex;
38
+ gap: 8px;
39
+ margin-left: auto;
40
+ }
41
+
42
+ .summary {
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+ align-items: center;
46
+ gap: 8px;
47
+ }
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import { UploadResultProps } from './types';
3
+ declare const UploadResult: {
4
+ ({ file, summary, keptLabel, report, removeLabel, onRemove }: UploadResultProps): JSX.Element;
5
+ propTypes: {
6
+ file: import("prop-types").Requireable<import("prop-types").InferProps<{
7
+ name: import("prop-types").Requireable<string>;
8
+ detail: import("prop-types").Requireable<string>;
9
+ }>>;
10
+ summary: import("prop-types").Requireable<import("prop-types").InferProps<{
11
+ valid: import("prop-types").Requireable<string>;
12
+ unknown: import("prop-types").Requireable<string>;
13
+ ambiguous: import("prop-types").Requireable<string>;
14
+ inactive: import("prop-types").Requireable<string>;
15
+ }>>;
16
+ keptLabel: import("prop-types").Requireable<string>;
17
+ report: import("prop-types").Requireable<import("prop-types").InferProps<{
18
+ label: import("prop-types").Validator<string>;
19
+ onDownload: import("prop-types").Validator<(...args: any[]) => any>;
20
+ }>>;
21
+ removeLabel: import("prop-types").Requireable<string>;
22
+ onRemove: import("prop-types").Requireable<(...args: any[]) => any>;
23
+ };
24
+ };
25
+ export default UploadResult;
26
+ //# sourceMappingURL=upload-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-result.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-audience/upload-result.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAW,iBAAiB,EAAyC,MAAM,SAAS,CAAC;AA4B5F,QAAA,MAAM,YAAY;kEAOf,iBAAiB;;;;;;;;;;;;;;;;;;;;CAsBnB,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,89 @@
1
+ import React from 'react';
2
+ import ButtonLink from '../../atom/button-link';
3
+ import Tag from '../../atom/tag';
4
+ import FaIcon from '../../atom/icon';
5
+ import { COLORS } from '../../variables/colors';
6
+ import { STATUSES, UploadResultPropTypes } from './types';
7
+ import style from './upload-result.css';
8
+ const STATUS_TAG_TYPES = {
9
+ valid: 'success',
10
+ unknown: 'failure',
11
+ ambiguous: 'warning',
12
+ inactive: 'warning'
13
+ };
14
+ // ButtonLink's text type sets its own colour; customStyle is the prop it lets win over it.
15
+ const REMOVE_STYLE = {
16
+ color: COLORS.cm_negative_200
17
+ };
18
+ // ButtonLink is full width by default, which centres the link under the file card.
19
+ const FIT_CONTENT = {
20
+ width: 'fit-content'
21
+ };
22
+ const FILE_ICON_SIZE = {
23
+ faSize: 22,
24
+ wrapperSize: 22
25
+ };
26
+
27
+ // Up to 5,000 rows: the logins not kept go to a file the admin can fix and upload again.
28
+ const Report = ({
29
+ label,
30
+ onDownload
31
+ }) => /*#__PURE__*/React.createElement("div", {
32
+ "data-name": "upload-report"
33
+ }, /*#__PURE__*/React.createElement(ButtonLink, {
34
+ type: "text",
35
+ label: label,
36
+ onClick: onDownload,
37
+ icon: {
38
+ position: 'left',
39
+ faIcon: {
40
+ name: 'download',
41
+ size: 14
42
+ }
43
+ },
44
+ customStyle: FIT_CONTENT
45
+ }));
46
+ const UploadResult = ({
47
+ file,
48
+ summary = {},
49
+ keptLabel,
50
+ report,
51
+ removeLabel,
52
+ onRemove
53
+ }) => /*#__PURE__*/React.createElement("div", {
54
+ className: style.result,
55
+ "data-name": "upload-result"
56
+ }, /*#__PURE__*/React.createElement("div", {
57
+ className: style.file,
58
+ "data-name": "upload-file"
59
+ }, /*#__PURE__*/React.createElement(FaIcon, {
60
+ iconName: "file-excel",
61
+ iconColor: COLORS.cm_positive_200,
62
+ size: FILE_ICON_SIZE
63
+ }), /*#__PURE__*/React.createElement("div", {
64
+ className: style.fileText
65
+ }, /*#__PURE__*/React.createElement("div", {
66
+ className: style.fileName
67
+ }, file?.name), file?.detail ? /*#__PURE__*/React.createElement("div", {
68
+ className: style.muted
69
+ }, file.detail) : null), /*#__PURE__*/React.createElement("div", {
70
+ className: style.fileActions
71
+ }, /*#__PURE__*/React.createElement(ButtonLink, {
72
+ type: "text",
73
+ label: removeLabel,
74
+ onClick: onRemove,
75
+ customStyle: REMOVE_STYLE
76
+ }))), /*#__PURE__*/React.createElement("div", {
77
+ className: style.summary,
78
+ "data-name": "upload-summary"
79
+ }, STATUSES.filter(status => summary[status]).map(status => /*#__PURE__*/React.createElement("div", {
80
+ key: status
81
+ }, /*#__PURE__*/React.createElement(Tag, {
82
+ type: STATUS_TAG_TYPES[status],
83
+ label: summary[status]
84
+ }))), keptLabel ? /*#__PURE__*/React.createElement("span", {
85
+ className: style.muted
86
+ }, keptLabel) : null), report ? /*#__PURE__*/React.createElement(Report, report) : null);
87
+ UploadResult.propTypes = process.env.NODE_ENV !== "production" ? UploadResultPropTypes : {};
88
+ export default UploadResult;
89
+ //# sourceMappingURL=upload-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-result.js","names":["React","ButtonLink","Tag","FaIcon","COLORS","STATUSES","UploadResultPropTypes","style","STATUS_TAG_TYPES","valid","unknown","ambiguous","inactive","REMOVE_STYLE","color","cm_negative_200","FIT_CONTENT","width","FILE_ICON_SIZE","faSize","wrapperSize","Report","label","onDownload","createElement","type","onClick","icon","position","faIcon","name","size","customStyle","UploadResult","file","summary","keptLabel","report","removeLabel","onRemove","className","result","iconName","iconColor","cm_positive_200","fileText","fileName","detail","muted","fileActions","filter","status","map","key","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/assignment-audience/upload-result.tsx"],"sourcesContent":["import React from 'react';\nimport ButtonLink from '../../atom/button-link';\nimport Tag from '../../atom/tag';\nimport FaIcon from '../../atom/icon';\nimport {COLORS} from '../../variables/colors';\nimport {STATUSES, UploadResultProps, UploadResultPropTypes, UploadRowStatus} from './types';\nimport style from './upload-result.css';\n\nconst STATUS_TAG_TYPES: Record<UploadRowStatus, 'success' | 'failure' | 'warning'> = {\n valid: 'success',\n unknown: 'failure',\n ambiguous: 'warning',\n inactive: 'warning'\n};\n// ButtonLink's text type sets its own colour; customStyle is the prop it lets win over it.\nconst REMOVE_STYLE = {color: COLORS.cm_negative_200};\n// ButtonLink is full width by default, which centres the link under the file card.\nconst FIT_CONTENT = {width: 'fit-content'};\nconst FILE_ICON_SIZE = {faSize: 22, wrapperSize: 22};\n\n// Up to 5,000 rows: the logins not kept go to a file the admin can fix and upload again.\nconst Report = ({label, onDownload}: NonNullable<UploadResultProps['report']>) => (\n <div data-name=\"upload-report\">\n <ButtonLink\n type=\"text\"\n label={label}\n onClick={onDownload}\n icon={{position: 'left', faIcon: {name: 'download', size: 14}}}\n customStyle={FIT_CONTENT}\n />\n </div>\n);\n\nconst UploadResult = ({\n file,\n summary = {},\n keptLabel,\n report,\n removeLabel,\n onRemove\n}: UploadResultProps) => (\n <div className={style.result} data-name=\"upload-result\">\n <div className={style.file} data-name=\"upload-file\">\n <FaIcon iconName=\"file-excel\" iconColor={COLORS.cm_positive_200} size={FILE_ICON_SIZE} />\n <div className={style.fileText}>\n <div className={style.fileName}>{file?.name}</div>\n {file?.detail ? <div className={style.muted}>{file.detail}</div> : null}\n </div>\n <div className={style.fileActions}>\n <ButtonLink type=\"text\" label={removeLabel} onClick={onRemove} customStyle={REMOVE_STYLE} />\n </div>\n </div>\n <div className={style.summary} data-name=\"upload-summary\">\n {STATUSES.filter(status => summary[status]).map(status => (\n <div key={status}>\n <Tag type={STATUS_TAG_TYPES[status]} label={summary[status]} />\n </div>\n ))}\n {keptLabel ? <span className={style.muted}>{keptLabel}</span> : null}\n </div>\n {report ? <Report {...report} /> : null}\n </div>\n);\n\nUploadResult.propTypes = UploadResultPropTypes;\n\nexport default UploadResult;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,SAAQC,QAAQ,EAAqBC,qBAAqB,QAAwB,SAAS;AAC3F,OAAOC,KAAK,MAAM,qBAAqB;AAEvC,MAAMC,gBAA4E,GAAG;EACnFC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,SAAS;EACpBC,QAAQ,EAAE;AACZ,CAAC;AACD;AACA,MAAMC,YAAY,GAAG;EAACC,KAAK,EAAEV,MAAM,CAACW;AAAe,CAAC;AACpD;AACA,MAAMC,WAAW,GAAG;EAACC,KAAK,EAAE;AAAa,CAAC;AAC1C,MAAMC,cAAc,GAAG;EAACC,MAAM,EAAE,EAAE;EAAEC,WAAW,EAAE;AAAE,CAAC;;AAEpD;AACA,MAAMC,MAAM,GAAGA,CAAC;EAACC,KAAK;EAAEC;AAAoD,CAAC,kBAC3EvB,KAAA,CAAAwB,aAAA;EAAK,aAAU;AAAe,gBAC5BxB,KAAA,CAAAwB,aAAA,CAACvB,UAAU;EACTwB,IAAI,EAAC,MAAM;EACXH,KAAK,EAAEA,KAAM;EACbI,OAAO,EAAEH,UAAW;EACpBI,IAAI,EAAE;IAACC,QAAQ,EAAE,MAAM;IAAEC,MAA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B,GACtD9B,QAAQ,CAAC6C,MAAM,CAACC,MAAM,IAAIhB,OAAO,CAACgB,MAAM,CAAC,CAAC,CAACC,GAAG,CAACD,MAAM,iBACpDnD,KAAA,CAAAwB,aAAA;EAAK6B,GAAG,EAAEF;AAAO,gBACfnD,KAAA,CAAAwB,aAAA,CAACtB,GAAG;EAACuB,IAAI,EAAEjB,gBAAgB,CAAC2C,MAAM,CAAE;EAAC7B,KAAK,EAAEa,OAAO,CAACgB,MAAM;AAAE,CAAE,CAC3D,CACN,CAAC,EACDf,SAAS,gBAAGpC,KAAA,CAAAwB,aAAA;EAAMgB,SAAS,EAAEjC,KAAK,CAACyC;AAAM,GAAEZ,SAAgB,CAAC,GAAG,IAC7D,CAAC,EACLC,MAAM,gBAAGrC,KAAA,CAAAwB,aAAA,CAACH,MAAM,EAAKgB,MAAS,CAAC,GAAG,IAChC,CACN;AAEDJ,YAAY,CAACqB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGnD,qBAAqB;AAE9C,eAAe2B,YAAY","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ /// <reference types="react" />
2
+ import { AssignmentRowProps } from './types';
3
+ declare const AssignmentRow: {
4
+ (props: AssignmentRowProps): JSX.Element;
5
+ propTypes: {
6
+ title: import("prop-types").Validator<string>;
7
+ subtitle: import("prop-types").Requireable<string>;
8
+ details: import("prop-types").Requireable<string>;
9
+ progress: import("prop-types").Requireable<import("prop-types").InferProps<{
10
+ value: import("prop-types").Validator<number>;
11
+ label: import("prop-types").Validator<string>;
12
+ }>>;
13
+ infoTags: import("prop-types").Requireable<(import("prop-types").InferProps<{
14
+ key: import("prop-types").Validator<NonNullable<"ongoingChanges" | "unavailable" | "processing" | "syncError">>;
15
+ label: import("prop-types").Validator<string>;
16
+ }> | null | undefined)[]>;
17
+ leftIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
18
+ iconName: import("prop-types").Requireable<string>;
19
+ iconColor: import("prop-types").Requireable<string>;
20
+ backgroundColor: import("prop-types").Requireable<string>;
21
+ borderRadius: import("prop-types").Requireable<string>;
22
+ preset: import("prop-types").Requireable<string>;
23
+ gradientBackground: import("prop-types").Requireable<boolean>;
24
+ size: import("prop-types").Requireable<number>;
25
+ wrapperSize: import("prop-types").Requireable<number>;
26
+ }>>;
27
+ buttonLink: import("prop-types").Requireable<import("prop-types").InferProps<{
28
+ type: import("prop-types").Requireable<string>;
29
+ label: import("prop-types").Requireable<string>;
30
+ ariaLabel: import("prop-types").Requireable<string>;
31
+ dataName: import("prop-types").Requireable<string>;
32
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
33
+ position: import("prop-types").Requireable<string>;
34
+ type: import("prop-types").Requireable<string>;
35
+ }>>;
36
+ onClick: import("prop-types").Requireable<(...args: any[]) => any>;
37
+ }>>;
38
+ bulletPointMenuButton: import("prop-types").Requireable<import("prop-types").InferProps<{
39
+ buttonAriaLabel: import("prop-types").Requireable<string>;
40
+ menuAriaLabel: import("prop-types").Requireable<string>;
41
+ buttons: import("prop-types").Requireable<(import("prop-types").InferProps<{
42
+ 'data-name': import("prop-types").Requireable<string>;
43
+ label: import("prop-types").Requireable<string>;
44
+ type: import("prop-types").Requireable<string>;
45
+ onClick: import("prop-types").Requireable<(...args: any[]) => any>;
46
+ }> | null | undefined)[]>;
47
+ onClick: import("prop-types").Requireable<(...args: any[]) => any>;
48
+ }>>;
49
+ onClick: import("prop-types").Requireable<(...args: any[]) => any>;
50
+ id: import("prop-types").Requireable<string>;
51
+ 'data-name': import("prop-types").Requireable<string>;
52
+ };
53
+ };
54
+ export default AssignmentRow;
55
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-row/index.tsx"],"names":[],"mappings":";AAIA,OAAkB,EAAC,kBAAkB,EAAwB,MAAM,SAAS,CAAC;AA6B7E,QAAA,MAAM,aAAa;YAAW,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA6C,CAAC;AAI9F,eAAe,aAAa,CAAC"}
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import find from 'lodash/fp/find';
3
+ import ListItem from '../list-item';
4
+ import { getAssignmentTagType } from '../../molecule/assignment-status-tag';
5
+ import propTypes, { ROW_TAG_KEYS } from './types';
6
+ const toTitleTags = (tags = []) => ROW_TAG_KEYS.map(key => find({
7
+ key
8
+ }, tags)).filter(tag => Boolean(tag)).map(({
9
+ key,
10
+ label
11
+ }) => ({
12
+ label,
13
+ type: getAssignmentTagType(key)
14
+ }));
15
+
16
+ // A click on one of the row's own controls (the Tracking button or link, the "…" menu and its
17
+ // items) is not a row click.
18
+ const ignoringControls = onClick => onClick ? event => event.target.closest('button, a') ? undefined : onClick(event) : undefined;
19
+ const toListItemProps = ({
20
+ infoTags,
21
+ onClick,
22
+ leftIcon = {
23
+ iconName: 'calendar-check'
24
+ },
25
+ ...props
26
+ }) => ({
27
+ ...props,
28
+ leftIcon,
29
+ titleTags: toTitleTags(infoTags),
30
+ onClick: ignoringControls(onClick)
31
+ });
32
+
33
+ // The Coorpmanager assignment list row: the Skills list row (organism/list-item) with
34
+ // the information tags beside the title, a contents line and a thin progress bar.
35
+ const AssignmentRow = props => /*#__PURE__*/React.createElement(ListItem, toListItemProps(props));
36
+ AssignmentRow.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
37
+ export default AssignmentRow;
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["React","find","ListItem","getAssignmentTagType","propTypes","ROW_TAG_KEYS","toTitleTags","tags","map","key","filter","tag","Boolean","label","type","ignoringControls","onClick","event","target","closest","undefined","toListItemProps","infoTags","leftIcon","iconName","props","titleTags","AssignmentRow","createElement","process","env","NODE_ENV"],"sources":["../../../src/organism/assignment-row/index.tsx"],"sourcesContent":["import React from 'react';\nimport find from 'lodash/fp/find';\nimport ListItem from '../list-item';\nimport {getAssignmentTagType} from '../../molecule/assignment-status-tag';\nimport propTypes, {AssignmentRowProps, InfoTag, ROW_TAG_KEYS} from './types';\n\nconst toTitleTags = (tags: InfoTag[] = []) =>\n ROW_TAG_KEYS.map(key => find({key}, tags))\n .filter((tag): tag is InfoTag => Boolean(tag))\n .map(({key, label}) => ({label, type: getAssignmentTagType(key)}));\n\n// A click on one of the row's own controls (the Tracking button or link, the \"…\" menu and its\n// items) is not a row click.\nconst ignoringControls = (onClick?: AssignmentRowProps['onClick']) =>\n onClick\n ? (event: React.MouseEvent<HTMLElement>) =>\n (event.target as Element).closest('button, a') ? undefined : onClick(event)\n : undefined;\n\nconst toListItemProps = ({\n infoTags,\n onClick,\n leftIcon = {iconName: 'calendar-check'},\n ...props\n}: AssignmentRowProps) => ({\n ...props,\n leftIcon,\n titleTags: toTitleTags(infoTags),\n onClick: ignoringControls(onClick)\n});\n\n// The Coorpmanager assignment list row: the Skills list row (organism/list-item) with\n// the information tags beside the title, a contents line and a thin progress bar.\nconst AssignmentRow = (props: AssignmentRowProps) => <ListItem {...toListItemProps(props)} />;\n\nAssignmentRow.propTypes = propTypes;\n\nexport default AssignmentRow;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,IAAI,MAAM,gBAAgB;AACjC,OAAOC,QAAQ,MAAM,cAAc;AACnC,SAAQC,oBAAoB,QAAO,sCAAsC;AACzE,OAAOC,SAAS,IAAgCC,YAAY,QAAO,SAAS;AAE5E,MAAMC,WAAW,GAAGA,CAACC,IAAe,GAAG,EAAE,KACvCF,YAAY,CAACG,GAAG,CAACC,GAAG,IAAIR,IAAI,CAAC;EAACQ;AAAG,CAAC,EAAEF,IAAI,CAAC,CAAC,CACvCG,MAAM,CAAEC,GAAG,IAAqBC,OAAO,CAACD,GAAG,CAAC,CAAC,CAC7CH,GAAG,CAAC,CAAC;EAACC,GAAG;EAAEI;AAAK,CAAC,MAAM;EAACA,KAAK;EAAEC,IAAI,EAAE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