@coorpacademy/components 10.27.5-alpha.31 → 10.28.1-alpha.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 (1169) hide show
  1. package/es/atom/autocomplete/index.d.ts +1 -1
  2. package/es/atom/autocomplete/index.js.map +1 -1
  3. package/es/atom/avatar/index.js.map +1 -1
  4. package/es/atom/button/index.js +1 -1
  5. package/es/atom/button/index.js.map +1 -1
  6. package/es/atom/button-link/index.js +1 -1
  7. package/es/atom/button-link/index.js.map +1 -1
  8. package/es/atom/button-link-icon-only/index.js +1 -1
  9. package/es/atom/button-link-icon-only/index.js.map +1 -1
  10. package/es/atom/button-menu/index.js +1 -1
  11. package/es/atom/button-menu/index.js.map +1 -1
  12. package/es/atom/card-image-preview/index.js.map +1 -1
  13. package/es/atom/catalog-section/index.js.map +1 -1
  14. package/es/atom/centered-text/index.js.map +1 -1
  15. package/es/atom/checkbox/index.js +3 -2
  16. package/es/atom/checkbox/index.js.map +1 -1
  17. package/es/atom/checkbox-with-title/index.js.map +1 -1
  18. package/es/atom/chips/index.js.map +1 -1
  19. package/es/atom/choice/index.native.d.ts +1 -0
  20. package/es/atom/choice/index.native.d.ts.map +1 -1
  21. package/es/atom/choice/index.native.js +1 -1
  22. package/es/atom/choice/index.native.js.map +1 -1
  23. package/es/atom/clue/index.js.map +1 -1
  24. package/es/atom/content-badge/index.js.map +1 -1
  25. package/es/atom/cta/index.js.map +1 -1
  26. package/es/atom/difficulty-level/index.js.map +1 -1
  27. package/es/atom/drag-and-drop/index.js +1 -1
  28. package/es/atom/drag-and-drop/index.js.map +1 -1
  29. package/es/atom/empty-search-result/index.js.map +1 -1
  30. package/es/atom/gradient/index.native.js.map +1 -1
  31. package/es/atom/header-back-button/index.native.d.ts +1 -0
  32. package/es/atom/header-back-button/index.native.d.ts.map +1 -1
  33. package/es/atom/header-back-button/index.native.js.map +1 -1
  34. package/es/atom/header-back-icon/index.native.d.ts +1 -0
  35. package/es/atom/header-back-icon/index.native.d.ts.map +1 -1
  36. package/es/atom/header-back-icon/index.native.js.map +1 -1
  37. package/es/atom/html/index.native.d.ts +1 -0
  38. package/es/atom/html/index.native.d.ts.map +1 -1
  39. package/es/atom/html/index.native.js +6 -6
  40. package/es/atom/html/index.native.js.map +1 -1
  41. package/es/atom/image-background/index.native.js +7 -4
  42. package/es/atom/image-background/index.native.js.map +1 -1
  43. package/es/atom/image-upload/index.js +2 -2
  44. package/es/atom/image-upload/index.js.map +1 -1
  45. package/es/atom/input-checkbox/index.js.map +1 -1
  46. package/es/atom/input-color/index.js.map +1 -1
  47. package/es/atom/input-doublestep/index.js +1 -1
  48. package/es/atom/input-doublestep/index.js.map +1 -1
  49. package/es/atom/input-html/index.js.map +1 -1
  50. package/es/atom/input-html/input-preview.js.map +1 -1
  51. package/es/atom/input-readonly/index.js.map +1 -1
  52. package/es/atom/input-search/index.js.map +1 -1
  53. package/es/atom/input-switch/index.js.map +1 -1
  54. package/es/atom/input-text/index.js.map +1 -1
  55. package/es/atom/input-text-with-title/index.js +2 -2
  56. package/es/atom/input-text-with-title/index.js.map +1 -1
  57. package/es/atom/input-textarea/index.js.map +1 -1
  58. package/es/atom/label/index.js.map +1 -1
  59. package/es/atom/life/index.js.map +1 -1
  60. package/es/atom/link/index.js +4 -3
  61. package/es/atom/link/index.js.map +1 -1
  62. package/es/atom/loader/index.js.map +1 -1
  63. package/es/atom/lottie-wrapper/index.js +4 -4
  64. package/es/atom/lottie-wrapper/index.js.map +1 -1
  65. package/es/atom/lottie-wrapper/prop-types.js.map +1 -1
  66. package/es/atom/notification/index.js.map +1 -1
  67. package/es/atom/picture/index.js +1 -1
  68. package/es/atom/picture/index.js.map +1 -1
  69. package/es/atom/picture-background/index.d.ts +3 -3
  70. package/es/atom/picture-background/index.js.map +1 -1
  71. package/es/atom/promo-code/index.js.map +1 -1
  72. package/es/atom/provider/index.d.ts +1 -1
  73. package/es/atom/provider/index.js.map +1 -1
  74. package/es/atom/provider/web-context.js +5 -3
  75. package/es/atom/provider/web-context.js.map +1 -1
  76. package/es/atom/radio-group/index.js +1 -1
  77. package/es/atom/radio-group/index.js.map +1 -1
  78. package/es/atom/radio-group/item.js.map +1 -1
  79. package/es/atom/range/handle.js.map +1 -1
  80. package/es/atom/range/index.d.ts +1 -1
  81. package/es/atom/range/index.js +2 -2
  82. package/es/atom/range/index.js.map +1 -1
  83. package/es/atom/resource-miniature/index.js.map +1 -1
  84. package/es/atom/review-background/index.js.map +1 -1
  85. package/es/atom/review-background/prop-types.js.map +1 -1
  86. package/es/atom/review-header-step-item/index.d.ts +1 -0
  87. package/es/atom/review-header-step-item/index.d.ts.map +1 -1
  88. package/es/atom/review-header-step-item/index.js.map +1 -1
  89. package/es/atom/review-header-step-item/index.native.d.ts +1 -0
  90. package/es/atom/review-header-step-item/index.native.d.ts.map +1 -1
  91. package/es/atom/review-header-step-item/index.native.js.map +1 -1
  92. package/es/atom/review-header-step-item/types.js.map +1 -1
  93. package/es/atom/review-presentation/index.js.map +1 -1
  94. package/es/atom/review-presentation/index.native.d.ts +1 -0
  95. package/es/atom/review-presentation/index.native.d.ts.map +1 -1
  96. package/es/atom/review-presentation/index.native.js.map +1 -1
  97. package/es/atom/review-presentation/prop-types.js.map +1 -1
  98. package/es/atom/select/index.d.ts +2 -2
  99. package/es/atom/select/index.js +1 -1
  100. package/es/atom/select/index.js.map +1 -1
  101. package/es/atom/select-modal/index.native.d.ts +1 -0
  102. package/es/atom/select-modal/index.native.d.ts.map +1 -1
  103. package/es/atom/select-modal/index.native.js.map +1 -1
  104. package/es/atom/slide/index.js +1 -1
  105. package/es/atom/slide/index.js.map +1 -1
  106. package/es/atom/social-link/index.js.map +1 -1
  107. package/es/atom/space/index.native.d.ts +1 -0
  108. package/es/atom/space/index.native.d.ts.map +1 -1
  109. package/es/atom/space/index.native.js.map +1 -1
  110. package/es/atom/spinner/index.js.map +1 -1
  111. package/es/atom/tab/index.js.map +1 -1
  112. package/es/atom/tab-content/index.js.map +1 -1
  113. package/es/atom/tag/index.js.map +1 -1
  114. package/es/atom/text/index.native.js +1 -1
  115. package/es/atom/text/index.native.js.map +1 -1
  116. package/es/atom/title/index.js.map +1 -1
  117. package/es/atom/video-upload/index.js +2 -2
  118. package/es/atom/video-upload/index.js.map +1 -1
  119. package/es/atom/wizard-steps/index.js.map +1 -1
  120. package/es/globals.d.js.map +1 -1
  121. package/es/hoc/animation/index.js.map +1 -1
  122. package/es/hoc/animation-scheduler/index.js +3 -3
  123. package/es/hoc/animation-scheduler/index.js.map +1 -1
  124. package/es/hoc/modal/index.native.js.map +1 -1
  125. package/es/hoc/modal/select/index.native.d.ts +1 -0
  126. package/es/hoc/modal/select/index.native.d.ts.map +1 -1
  127. package/es/hoc/modal/select/index.native.js.map +1 -1
  128. package/es/hoc/modal/select-item/index.native.d.ts +1 -0
  129. package/es/hoc/modal/select-item/index.native.d.ts.map +1 -1
  130. package/es/hoc/modal/select-item/index.native.js.map +1 -1
  131. package/es/hoc/swapper/index.js +4 -2
  132. package/es/hoc/swapper/index.js.map +1 -1
  133. package/es/hoc/touchable/index.native.js +2 -2
  134. package/es/hoc/touchable/index.native.js.map +1 -1
  135. package/es/hoc/transition/index.js +1 -1
  136. package/es/hoc/transition/index.js.map +1 -1
  137. package/es/index.js.map +1 -1
  138. package/es/molecule/add-to-my-list/index.js +1 -1
  139. package/es/molecule/add-to-my-list/index.js.map +1 -1
  140. package/es/molecule/answer/index.js +3 -2
  141. package/es/molecule/answer/index.js.map +1 -1
  142. package/es/molecule/answer/index.native.d.ts +1 -0
  143. package/es/molecule/answer/index.native.d.ts.map +1 -1
  144. package/es/molecule/answer/index.native.js.map +1 -1
  145. package/es/molecule/answer/prop-types.d.ts +6 -6
  146. package/es/molecule/answer/prop-types.js +2 -2
  147. package/es/molecule/answer/prop-types.js.map +1 -1
  148. package/es/molecule/audio/index.js.map +1 -1
  149. package/es/molecule/banner/index.js.map +1 -1
  150. package/es/molecule/battle-request/index.js.map +1 -1
  151. package/es/molecule/brand-card/description.js.map +1 -1
  152. package/es/molecule/brand-card/index.js.map +1 -1
  153. package/es/molecule/brand-card-create/index.js.map +1 -1
  154. package/es/molecule/brand-create-form/index.d.ts +2 -2
  155. package/es/molecule/brand-create-form/index.js.map +1 -1
  156. package/es/molecule/brand-download-box/index.js.map +1 -1
  157. package/es/molecule/brand-form-group/index.d.ts +9 -9
  158. package/es/molecule/brand-form-group/index.js +20 -20
  159. package/es/molecule/brand-form-group/index.js.map +1 -1
  160. package/es/molecule/brand-logo/index.native.d.ts +1 -0
  161. package/es/molecule/brand-logo/index.native.d.ts.map +1 -1
  162. package/es/molecule/brand-logo/index.native.js +2 -2
  163. package/es/molecule/brand-logo/index.native.js.map +1 -1
  164. package/es/molecule/brand-tabs/index.js.map +1 -1
  165. package/es/molecule/brand-upload-box/index.js.map +1 -1
  166. package/es/molecule/breadcrumbs/index.js.map +1 -1
  167. package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
  168. package/es/molecule/card/customer.js.map +1 -1
  169. package/es/molecule/card/favorite.js.map +1 -1
  170. package/es/molecule/card/index.js +2 -2
  171. package/es/molecule/card/index.js.map +1 -1
  172. package/es/molecule/card/notification.js.map +1 -1
  173. package/es/molecule/card/selectable.js.map +1 -1
  174. package/es/molecule/card-content/index.js.map +1 -1
  175. package/es/molecule/card-with-button/index.d.ts +1 -1
  176. package/es/molecule/card-with-button/index.js.map +1 -1
  177. package/es/molecule/cm-popin/index.js.map +1 -1
  178. package/es/molecule/cm-popin/types.js.map +1 -1
  179. package/es/molecule/cookie-banner/index.js.map +1 -1
  180. package/es/molecule/coorp-manager-roles/index.js +2 -2
  181. package/es/molecule/coorp-manager-roles/index.js.map +1 -1
  182. package/es/molecule/course-section/index.js.map +1 -1
  183. package/es/molecule/course-sections/index.js +2 -2
  184. package/es/molecule/course-sections/index.js.map +1 -1
  185. package/es/molecule/dashboard/battle-request-list/index.js +1 -1
  186. package/es/molecule/dashboard/battle-request-list/index.js.map +1 -1
  187. package/es/molecule/dashboard/cards-list/index.js +1 -1
  188. package/es/molecule/dashboard/cards-list/index.js.map +1 -1
  189. package/es/molecule/dashboard/news-list/index.js +1 -1
  190. package/es/molecule/dashboard/news-list/index.js.map +1 -1
  191. package/es/molecule/dashboard/review-banner/index.js +3 -3
  192. package/es/molecule/dashboard/review-banner/index.js.map +1 -1
  193. package/es/molecule/dashboard/start-battle/index.js +1 -1
  194. package/es/molecule/dashboard/start-battle/index.js.map +1 -1
  195. package/es/molecule/discipline-cta/index.js.map +1 -1
  196. package/es/molecule/discipline-header/index.js.map +1 -1
  197. package/es/molecule/discipline-partners/index.js.map +1 -1
  198. package/es/molecule/discipline-scope/index.js.map +1 -1
  199. package/es/molecule/drag-and-drop/index.js +2 -2
  200. package/es/molecule/drag-and-drop/index.js.map +1 -1
  201. package/es/molecule/drag-and-drop/overlay.js.map +1 -1
  202. package/es/molecule/drag-and-drop/placeholder.js.map +1 -1
  203. package/es/molecule/drag-and-drop/upload-report.js +2 -2
  204. package/es/molecule/drag-and-drop/upload-report.js.map +1 -1
  205. package/es/molecule/drag-and-drop-wrapper/index.js.map +1 -1
  206. package/es/molecule/draggable/index.js.map +1 -1
  207. package/es/molecule/draggable-list/index.js +1 -1
  208. package/es/molecule/draggable-list/index.js.map +1 -1
  209. package/es/molecule/external-content-button/index.js.map +1 -1
  210. package/es/molecule/external-content-viewer/index.js.map +1 -1
  211. package/es/molecule/feedback/index.js +2 -2
  212. package/es/molecule/feedback/index.js.map +1 -1
  213. package/es/molecule/filters/filters-wrapper.js +1 -1
  214. package/es/molecule/filters/filters-wrapper.js.map +1 -1
  215. package/es/molecule/filters/index.d.ts +1 -1
  216. package/es/molecule/filters/index.js.map +1 -1
  217. package/es/molecule/forum/forum-comment/index.js.map +1 -1
  218. package/es/molecule/forum/forum-post/index.js.map +1 -1
  219. package/es/molecule/forum/forum-thread/index.js +1 -1
  220. package/es/molecule/forum/forum-thread/index.js.map +1 -1
  221. package/es/molecule/forum/post-conditions.js.map +1 -1
  222. package/es/molecule/go1-banner/index.js.map +1 -1
  223. package/es/molecule/hero/index.js.map +1 -1
  224. package/es/molecule/input-text-with-titled-checkbox/index.js.map +1 -1
  225. package/es/molecule/list-badges/index.js.map +1 -1
  226. package/es/molecule/login-alert/index.js.map +1 -1
  227. package/es/molecule/menu-list/index.js.map +1 -1
  228. package/es/molecule/message-popin/index.js.map +1 -1
  229. package/es/molecule/modal/index.js.map +1 -1
  230. package/es/molecule/module-bubble/index.js.map +1 -1
  231. package/es/molecule/module-card/index.js +1 -1
  232. package/es/molecule/module-card/index.js.map +1 -1
  233. package/es/molecule/news/index.js +1 -1
  234. package/es/molecule/news/index.js.map +1 -1
  235. package/es/molecule/notification-banner/index.js.map +1 -1
  236. package/es/molecule/pagination/index.js.map +1 -1
  237. package/es/molecule/payment-form/index.js.map +1 -1
  238. package/es/molecule/pdf/index.js.map +1 -1
  239. package/es/molecule/popin/index.js +2 -2
  240. package/es/molecule/popin/index.js.map +1 -1
  241. package/es/molecule/product-card/index.js.map +1 -1
  242. package/es/molecule/progress-bar/index.d.ts +1 -1
  243. package/es/molecule/progress-bar/index.js +2 -2
  244. package/es/molecule/progress-bar/index.js.map +1 -1
  245. package/es/molecule/questions/drop-down/index.d.ts +1 -1
  246. package/es/molecule/questions/drop-down/index.js.map +1 -1
  247. package/es/molecule/questions/free-text/index.js +3 -3
  248. package/es/molecule/questions/free-text/index.js.map +1 -1
  249. package/es/molecule/questions/free-text/index.native.d.ts +1 -0
  250. package/es/molecule/questions/free-text/index.native.d.ts.map +1 -1
  251. package/es/molecule/questions/free-text/index.native.js +3 -3
  252. package/es/molecule/questions/free-text/index.native.js.map +1 -1
  253. package/es/molecule/questions/mobile/draggable/index.native.d.ts +1 -0
  254. package/es/molecule/questions/mobile/draggable/index.native.d.ts.map +1 -1
  255. package/es/molecule/questions/mobile/draggable/index.native.js.map +1 -1
  256. package/es/molecule/questions/mobile/slider/index.native.d.ts +1 -0
  257. package/es/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
  258. package/es/molecule/questions/mobile/slider/index.native.js +2 -2
  259. package/es/molecule/questions/mobile/slider/index.native.js.map +1 -1
  260. package/es/molecule/questions/mobile/switch/index.native.d.ts +1 -0
  261. package/es/molecule/questions/mobile/switch/index.native.d.ts.map +1 -1
  262. package/es/molecule/questions/mobile/switch/index.native.js.map +1 -1
  263. package/es/molecule/questions/mobile/template/index.native.d.ts +1 -0
  264. package/es/molecule/questions/mobile/template/index.native.d.ts.map +1 -1
  265. package/es/molecule/questions/mobile/template/index.native.js +3 -3
  266. package/es/molecule/questions/mobile/template/index.native.js.map +1 -1
  267. package/es/molecule/questions/qcm/index.js +1 -1
  268. package/es/molecule/questions/qcm/index.js.map +1 -1
  269. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  270. package/es/molecule/questions/qcm-graphic/index.js +1 -1
  271. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  272. package/es/molecule/questions/question-range/index.d.ts +1 -1
  273. package/es/molecule/questions/question-range/index.js +4 -3
  274. package/es/molecule/questions/question-range/index.js.map +1 -1
  275. package/es/molecule/questions/template/index.d.ts +12 -3
  276. package/es/molecule/questions/template/index.js +4 -3
  277. package/es/molecule/questions/template/index.js.map +1 -1
  278. package/es/molecule/questions/types.js.map +1 -1
  279. package/es/molecule/quick-access-card/index.js.map +1 -1
  280. package/es/molecule/quick-access-cards-group/index.js.map +1 -1
  281. package/es/molecule/resource-player/index.d.ts +2 -2
  282. package/es/molecule/resource-player/index.js +3 -2
  283. package/es/molecule/resource-player/index.js.map +1 -1
  284. package/es/molecule/review-card-congrats/index.js +1 -1
  285. package/es/molecule/review-card-congrats/index.js.map +1 -1
  286. package/es/molecule/review-card-congrats/prop-types.js.map +1 -1
  287. package/es/molecule/review-correction-popin/index.js +3 -3
  288. package/es/molecule/review-correction-popin/index.js.map +1 -1
  289. package/es/molecule/review-correction-popin/prop-types.js.map +1 -1
  290. package/es/molecule/review-header-steps/index.js +1 -1
  291. package/es/molecule/review-header-steps/index.js.map +1 -1
  292. package/es/molecule/review-header-steps/prop-types.js.map +1 -1
  293. package/es/molecule/scope-content/index.js +1 -1
  294. package/es/molecule/scope-content/index.js.map +1 -1
  295. package/es/molecule/scope-tabs/index.js +1 -1
  296. package/es/molecule/scope-tabs/index.js.map +1 -1
  297. package/es/molecule/search-form/index.js +1 -1
  298. package/es/molecule/search-form/index.js.map +1 -1
  299. package/es/molecule/select-multiple/index.d.ts +2 -2
  300. package/es/molecule/select-multiple/index.js +4 -4
  301. package/es/molecule/select-multiple/index.js.map +1 -1
  302. package/es/molecule/setup-cohort-item/index.js +1 -1
  303. package/es/molecule/setup-cohort-item/index.js.map +1 -1
  304. package/es/molecule/setup-section/index.js +2 -2
  305. package/es/molecule/setup-section/index.js.map +1 -1
  306. package/es/molecule/setup-sections/index.js.map +1 -1
  307. package/es/molecule/setup-slide/index.d.ts +3 -3
  308. package/es/molecule/setup-slide/index.js +9 -9
  309. package/es/molecule/setup-slide/index.js.map +1 -1
  310. package/es/molecule/setup-slider/index.d.ts +3 -3
  311. package/es/molecule/setup-slider/index.js +1 -1
  312. package/es/molecule/setup-slider/index.js.map +1 -1
  313. package/es/molecule/share/index.js +1 -1
  314. package/es/molecule/share/index.js.map +1 -1
  315. package/es/molecule/skill-card/index.js.map +1 -1
  316. package/es/molecule/skill-card/prop-types.js.map +1 -1
  317. package/es/molecule/ssmenu-list/index.js.map +1 -1
  318. package/es/molecule/subscription-freemium/index.js.map +1 -1
  319. package/es/molecule/subscription-premium/index.js.map +1 -1
  320. package/es/molecule/table/index.d.ts +2 -2
  321. package/es/molecule/table/index.js.map +1 -1
  322. package/es/molecule/teams-popin/index.js.map +1 -1
  323. package/es/molecule/theme-image/index.js.map +1 -1
  324. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +2 -2
  325. package/es/molecule/title-and-checkbox-wrapper/index.js +3 -3
  326. package/es/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
  327. package/es/molecule/titled-checkbox/index.d.ts +2 -2
  328. package/es/molecule/titled-checkbox/index.js.map +1 -1
  329. package/es/molecule/unsubscribe/index.js.map +1 -1
  330. package/es/molecule/vertical-tabs/index.js.map +1 -1
  331. package/es/molecule/video-iframe/index.d.ts.map +1 -1
  332. package/es/molecule/video-iframe/index.js +2 -2
  333. package/es/molecule/video-iframe/index.js.map +1 -1
  334. package/es/molecule/video-player/index.js +4 -2
  335. package/es/molecule/video-player/index.js.map +1 -1
  336. package/es/molecule/video-player/jwplayer-prop-types.js.map +1 -1
  337. package/es/molecule/video-player/jwplayer.js +3 -3
  338. package/es/molecule/video-player/jwplayer.js.map +1 -1
  339. package/es/molecule/video-player/prop-types.js.map +1 -1
  340. package/es/molecule/video-player/vimeo.d.ts +3 -3
  341. package/es/molecule/video-player/vimeo.js +2 -2
  342. package/es/molecule/video-player/vimeo.js.map +1 -1
  343. package/es/molecule/wizard-summary/index.d.ts +2 -2
  344. package/es/molecule/wizard-summary/index.js.map +1 -1
  345. package/es/organism/accordion/container/index.js +1 -1
  346. package/es/organism/accordion/container/index.js.map +1 -1
  347. package/es/organism/accordion/coorp-manager/index.js +2 -2
  348. package/es/organism/accordion/coorp-manager/index.js.map +1 -1
  349. package/es/organism/accordion/coorp-manager/part/index.js +1 -1
  350. package/es/organism/accordion/coorp-manager/part/index.js.map +1 -1
  351. package/es/organism/accordion/part/index.js.map +1 -1
  352. package/es/organism/accordion/toggler/index.js +2 -2
  353. package/es/organism/accordion/toggler/index.js.map +1 -1
  354. package/es/organism/brand-analytics/analytics-popin.js.map +1 -1
  355. package/es/organism/brand-analytics/index.d.ts +3 -3
  356. package/es/organism/brand-analytics/index.js.map +1 -1
  357. package/es/organism/brand-dashboard/index.js +1 -1
  358. package/es/organism/brand-dashboard/index.js.map +1 -1
  359. package/es/organism/brand-form/index.d.ts +9 -9
  360. package/es/organism/brand-form/index.js.map +1 -1
  361. package/es/organism/brand-table/index.d.ts +2 -2
  362. package/es/organism/brand-table/index.js.map +1 -1
  363. package/es/organism/brand-upload/index.d.ts +2 -2
  364. package/es/organism/brand-upload/index.js +1 -1
  365. package/es/organism/brand-upload/index.js.map +1 -1
  366. package/es/organism/cards-grid/index.js.map +1 -1
  367. package/es/organism/cart/index.js.map +1 -1
  368. package/es/organism/content-translation/index.js +3 -3
  369. package/es/organism/content-translation/index.js.map +1 -1
  370. package/es/organism/course-selection/index.js +1 -1
  371. package/es/organism/course-selection/index.js.map +1 -1
  372. package/es/organism/discussion/index.js +1 -1
  373. package/es/organism/discussion/index.js.map +1 -1
  374. package/es/organism/get-the-app/index.js +3 -3
  375. package/es/organism/get-the-app/index.js.map +1 -1
  376. package/es/organism/grid-list/index.js.map +1 -1
  377. package/es/organism/header/index.d.ts +2 -2
  378. package/es/organism/header/index.js.map +1 -1
  379. package/es/organism/header-v2/index.native.d.ts +1 -0
  380. package/es/organism/header-v2/index.native.d.ts.map +1 -1
  381. package/es/organism/header-v2/index.native.js.map +1 -1
  382. package/es/organism/hero/index.js.map +1 -1
  383. package/es/organism/list-item/index.js.map +1 -1
  384. package/es/organism/list-items/index.js.map +1 -1
  385. package/es/organism/mobile-navigation/index.native.js.map +1 -1
  386. package/es/organism/mooc/image-slider/index.js +1 -1
  387. package/es/organism/mooc/image-slider/index.js.map +1 -1
  388. package/es/organism/mooc-footer/index.js.map +1 -1
  389. package/es/organism/mooc-header/index.js +1 -1
  390. package/es/organism/mooc-header/index.js.map +1 -1
  391. package/es/organism/podcast-popin-intro/index.native.d.ts +1 -0
  392. package/es/organism/podcast-popin-intro/index.native.d.ts.map +1 -1
  393. package/es/organism/podcast-popin-intro/index.native.js.map +1 -1
  394. package/es/organism/popin/index.js.map +1 -1
  395. package/es/organism/resource-browser/index.js +1 -1
  396. package/es/organism/resource-browser/index.js.map +1 -1
  397. package/es/organism/review-congrats/index.js +1 -1
  398. package/es/organism/review-congrats/index.js.map +1 -1
  399. package/es/organism/review-congrats/prop-types.js.map +1 -1
  400. package/es/organism/review-header/index.js.map +1 -1
  401. package/es/organism/review-header/index.native.d.ts +1 -0
  402. package/es/organism/review-header/index.native.d.ts.map +1 -1
  403. package/es/organism/review-header/index.native.js +1 -1
  404. package/es/organism/review-header/index.native.js.map +1 -1
  405. package/es/organism/review-header/types.js.map +1 -1
  406. package/es/organism/review-skills/index.js.map +1 -1
  407. package/es/organism/review-skills/prop-types.js +3 -3
  408. package/es/organism/review-skills/prop-types.js.map +1 -1
  409. package/es/organism/review-slide/index.js +1 -1
  410. package/es/organism/review-slide/index.js.map +1 -1
  411. package/es/organism/review-slide/index.native.d.ts +1 -0
  412. package/es/organism/review-slide/index.native.d.ts.map +1 -1
  413. package/es/organism/review-slide/index.native.js.map +1 -1
  414. package/es/organism/review-slide/prop-types.d.ts +8 -8
  415. package/es/organism/review-slide/prop-types.js.map +1 -1
  416. package/es/organism/review-stacked-slides/index.d.ts.map +1 -1
  417. package/es/organism/review-stacked-slides/index.js +13 -9
  418. package/es/organism/review-stacked-slides/index.js.map +1 -1
  419. package/es/organism/review-stacked-slides/index.native.d.ts +1 -0
  420. package/es/organism/review-stacked-slides/index.native.d.ts.map +1 -1
  421. package/es/organism/review-stacked-slides/index.native.js +3 -6
  422. package/es/organism/review-stacked-slides/index.native.js.map +1 -1
  423. package/es/organism/review-stacked-slides/prop-types.d.ts +22 -22
  424. package/es/organism/review-stacked-slides/prop-types.js.map +1 -1
  425. package/es/organism/review-stacked-slides/style.css +120 -8
  426. package/es/organism/rewards-form/index.d.ts +2 -2
  427. package/es/organism/rewards-form/index.js +3 -1
  428. package/es/organism/rewards-form/index.js.map +1 -1
  429. package/es/organism/search-and-chips-results/index.js +1 -1
  430. package/es/organism/search-and-chips-results/index.js.map +1 -1
  431. package/es/organism/settings/index.js +4 -3
  432. package/es/organism/settings/index.js.map +1 -1
  433. package/es/organism/setup-header/index.js.map +1 -1
  434. package/es/organism/sidebar/index.d.ts +29 -5
  435. package/es/organism/sidebar/index.js +12 -11
  436. package/es/organism/sidebar/index.js.map +1 -1
  437. package/es/organism/slider/index.d.ts +1 -1
  438. package/es/organism/slider/index.d.ts.map +1 -1
  439. package/es/organism/slider/index.js.map +1 -1
  440. package/es/organism/user-preferences/index.js +4 -3
  441. package/es/organism/user-preferences/index.js.map +1 -1
  442. package/es/organism/wizard-contents/index.d.ts +19 -19
  443. package/es/organism/wizard-contents/index.js +8 -8
  444. package/es/organism/wizard-contents/index.js.map +1 -1
  445. package/es/template/activity/engine-stars.js.map +1 -1
  446. package/es/template/activity/index.d.ts +3 -3
  447. package/es/template/activity/index.js +2 -2
  448. package/es/template/activity/index.js.map +1 -1
  449. package/es/template/activity/progression-item.js.map +1 -1
  450. package/es/template/activity/stars-summary.d.ts +2 -2
  451. package/es/template/activity/stars-summary.js +1 -1
  452. package/es/template/activity/stars-summary.js.map +1 -1
  453. package/es/template/app-player/loading/index.js.map +1 -1
  454. package/es/template/app-player/player/index.js +1 -1
  455. package/es/template/app-player/player/index.js.map +1 -1
  456. package/es/template/app-player/player/slides/footer/index.js +2 -2
  457. package/es/template/app-player/player/slides/footer/index.js.map +1 -1
  458. package/es/template/app-player/player/slides/header/index.js.map +1 -1
  459. package/es/template/app-player/player/slides/header/learner.d.ts +4 -4
  460. package/es/template/app-player/player/slides/header/learner.js +1 -1
  461. package/es/template/app-player/player/slides/header/learner.js.map +1 -1
  462. package/es/template/app-player/player/slides/header/lives.js.map +1 -1
  463. package/es/template/app-player/player/slides/header/microlearning.js.map +1 -1
  464. package/es/template/app-player/player/slides/index.d.ts +6 -6
  465. package/es/template/app-player/player/slides/index.js +15 -12
  466. package/es/template/app-player/player/slides/index.js.map +1 -1
  467. package/es/template/app-player/popin-correction/index.js +4 -3
  468. package/es/template/app-player/popin-correction/index.js.map +1 -1
  469. package/es/template/app-player/popin-end/index.js +1 -1
  470. package/es/template/app-player/popin-end/index.js.map +1 -1
  471. package/es/template/app-player/popin-end/summary.js +15 -12
  472. package/es/template/app-player/popin-end/summary.js.map +1 -1
  473. package/es/template/app-player/popin-header/index.js +5 -4
  474. package/es/template/app-player/popin-header/index.js.map +1 -1
  475. package/es/template/app-player/popin-no-access/index.js.map +1 -1
  476. package/es/template/app-review/demo-ts/index.js.map +1 -1
  477. package/es/template/app-review/demo-ts/index.native.d.ts +1 -0
  478. package/es/template/app-review/demo-ts/index.native.d.ts.map +1 -1
  479. package/es/template/app-review/demo-ts/index.native.js.map +1 -1
  480. package/es/template/app-review/demo-ts/typings.js.map +1 -1
  481. package/es/template/app-review/index.d.ts +23 -22
  482. package/es/template/app-review/index.d.ts.map +1 -1
  483. package/es/template/app-review/index.js +1 -1
  484. package/es/template/app-review/index.js.map +1 -1
  485. package/es/template/app-review/index.native.d.ts +1 -0
  486. package/es/template/app-review/index.native.d.ts.map +1 -1
  487. package/es/template/app-review/index.native.js.map +1 -1
  488. package/es/template/app-review/onboarding/index.js.map +1 -1
  489. package/es/template/app-review/onboarding/index.native.js.map +1 -1
  490. package/es/template/app-review/player/index.js.map +1 -1
  491. package/es/template/app-review/player/index.native.d.ts +1 -0
  492. package/es/template/app-review/player/index.native.d.ts.map +1 -1
  493. package/es/template/app-review/player/index.native.js.map +1 -1
  494. package/es/template/app-review/player/prop-types.d.ts +22 -22
  495. package/es/template/app-review/player/prop-types.js +1 -1
  496. package/es/template/app-review/player/prop-types.js.map +1 -1
  497. package/es/template/app-review/prop-types.d.ts +22 -22
  498. package/es/template/app-review/prop-types.js +1 -1
  499. package/es/template/app-review/prop-types.js.map +1 -1
  500. package/es/template/app-review/skills/index.js.map +1 -1
  501. package/es/template/app-review/skills/index.native.d.ts +1 -0
  502. package/es/template/app-review/skills/index.native.d.ts.map +1 -1
  503. package/es/template/app-review/skills/index.native.js.map +1 -1
  504. package/es/template/app-review/skills/prop-types.js.map +1 -1
  505. package/es/template/app-review/skills/stories.js.map +1 -1
  506. package/es/template/app-review/template-context.js +1 -1
  507. package/es/template/app-review/template-context.js.map +1 -1
  508. package/es/template/back-office/brand-create/index.js.map +1 -1
  509. package/es/template/back-office/brand-list/index.js +4 -2
  510. package/es/template/back-office/brand-list/index.js.map +1 -1
  511. package/es/template/back-office/brand-update/index.d.ts +39 -39
  512. package/es/template/back-office/brand-update/index.js +9 -9
  513. package/es/template/back-office/brand-update/index.js.map +1 -1
  514. package/es/template/back-office/dashboard-preview/dashboard-popin.js.map +1 -1
  515. package/es/template/back-office/dashboard-preview/index.js.map +1 -1
  516. package/es/template/back-office/layout/index.js.map +1 -1
  517. package/es/template/battle-requests/index.d.ts +2 -2
  518. package/es/template/battle-requests/index.js.map +1 -1
  519. package/es/template/cockpit/jw-uploader/index.js +2 -2
  520. package/es/template/cockpit/jw-uploader/index.js.map +1 -1
  521. package/es/template/common/authors/index.js.map +1 -1
  522. package/es/template/common/coorp-header/content.js.map +1 -1
  523. package/es/template/common/coorp-header/index.js.map +1 -1
  524. package/es/template/common/dashboard/index.d.ts +1 -1
  525. package/es/template/common/dashboard/index.js +1 -1
  526. package/es/template/common/dashboard/index.js.map +1 -1
  527. package/es/template/common/discipline/index.js.map +1 -1
  528. package/es/template/common/search-page/index.d.ts +1 -1
  529. package/es/template/common/search-page/index.js +1 -1
  530. package/es/template/common/search-page/index.js.map +1 -1
  531. package/es/template/external-course/index.d.ts.map +1 -1
  532. package/es/template/external-course/index.js.map +1 -1
  533. package/es/template/review-dashboard-skills/index.js.map +1 -1
  534. package/es/template/teams-dashboard/index.js +1 -1
  535. package/es/template/teams-dashboard/index.js.map +1 -1
  536. package/es/util/bubbling.js.map +1 -1
  537. package/es/util/build-query-string.js.map +1 -1
  538. package/es/util/button-icons.js.map +1 -1
  539. package/es/util/closest-step.js.map +1 -1
  540. package/es/util/constants.js.map +1 -1
  541. package/es/util/external-content.js.map +1 -1
  542. package/es/util/get-class-state.js.map +1 -1
  543. package/es/util/get-clean-uri.js.map +1 -1
  544. package/es/util/get-resized-image.js +3 -3
  545. package/es/util/get-resized-image.js.map +1 -1
  546. package/es/util/get-shadow-box-color-from-primary.js.map +1 -1
  547. package/es/util/image.js.map +1 -1
  548. package/es/util/navigation.js.map +1 -1
  549. package/es/util/parse-template-string.js.map +1 -1
  550. package/es/util/proptypes.js.map +1 -1
  551. package/es/util/render-with-context.js +7 -4
  552. package/es/util/render-with-context.js.map +1 -1
  553. package/es/util/shallow-compare.js.map +1 -1
  554. package/es/variables/analytics.js.map +1 -1
  555. package/es/variables/brand.native.js.map +1 -1
  556. package/es/variables/colors.js.map +1 -1
  557. package/es/variables/default-mobile-translations.js.map +1 -1
  558. package/es/variables/shadow.js.map +1 -1
  559. package/es/variables/theme.native.js.map +1 -1
  560. package/es/variables/vibration.js.map +1 -1
  561. package/lib/atom/autocomplete/index.d.ts +1 -1
  562. package/lib/atom/autocomplete/index.js +2 -2
  563. package/lib/atom/autocomplete/index.js.map +1 -1
  564. package/lib/atom/avatar/index.js.map +1 -1
  565. package/lib/atom/button/index.js +1 -1
  566. package/lib/atom/button/index.js.map +1 -1
  567. package/lib/atom/button-link/index.js +3 -3
  568. package/lib/atom/button-link/index.js.map +1 -1
  569. package/lib/atom/button-link-icon-only/index.js +3 -3
  570. package/lib/atom/button-link-icon-only/index.js.map +1 -1
  571. package/lib/atom/button-menu/index.js +3 -3
  572. package/lib/atom/button-menu/index.js.map +1 -1
  573. package/lib/atom/card-image-preview/index.js.map +1 -1
  574. package/lib/atom/catalog-section/index.js.map +1 -1
  575. package/lib/atom/centered-text/index.js.map +1 -1
  576. package/lib/atom/checkbox/index.js +6 -4
  577. package/lib/atom/checkbox/index.js.map +1 -1
  578. package/lib/atom/checkbox-with-title/index.js +2 -2
  579. package/lib/atom/checkbox-with-title/index.js.map +1 -1
  580. package/lib/atom/chips/index.js +2 -2
  581. package/lib/atom/chips/index.js.map +1 -1
  582. package/lib/atom/choice/index.native.d.ts +1 -0
  583. package/lib/atom/choice/index.native.d.ts.map +1 -1
  584. package/lib/atom/choice/index.native.js +3 -3
  585. package/lib/atom/choice/index.native.js.map +1 -1
  586. package/lib/atom/clue/index.js.map +1 -1
  587. package/lib/atom/content-badge/index.js.map +1 -1
  588. package/lib/atom/cta/index.js.map +1 -1
  589. package/lib/atom/difficulty-level/index.js.map +1 -1
  590. package/lib/atom/drag-and-drop/index.js +1 -1
  591. package/lib/atom/drag-and-drop/index.js.map +1 -1
  592. package/lib/atom/empty-search-result/index.js.map +1 -1
  593. package/lib/atom/gradient/index.native.js.map +1 -1
  594. package/lib/atom/header-back-button/index.native.d.ts +1 -0
  595. package/lib/atom/header-back-button/index.native.d.ts.map +1 -1
  596. package/lib/atom/header-back-button/index.native.js +3 -3
  597. package/lib/atom/header-back-button/index.native.js.map +1 -1
  598. package/lib/atom/header-back-icon/index.native.d.ts +1 -0
  599. package/lib/atom/header-back-icon/index.native.d.ts.map +1 -1
  600. package/lib/atom/header-back-icon/index.native.js.map +1 -1
  601. package/lib/atom/html/index.native.d.ts +1 -0
  602. package/lib/atom/html/index.native.d.ts.map +1 -1
  603. package/lib/atom/html/index.native.js +8 -8
  604. package/lib/atom/html/index.native.js.map +1 -1
  605. package/lib/atom/image-background/index.native.js +7 -4
  606. package/lib/atom/image-background/index.native.js.map +1 -1
  607. package/lib/atom/image-upload/index.js +4 -4
  608. package/lib/atom/image-upload/index.js.map +1 -1
  609. package/lib/atom/input-checkbox/index.js +2 -2
  610. package/lib/atom/input-checkbox/index.js.map +1 -1
  611. package/lib/atom/input-color/index.js +2 -2
  612. package/lib/atom/input-color/index.js.map +1 -1
  613. package/lib/atom/input-doublestep/index.js +3 -3
  614. package/lib/atom/input-doublestep/index.js.map +1 -1
  615. package/lib/atom/input-html/index.js.map +1 -1
  616. package/lib/atom/input-html/input-preview.js.map +1 -1
  617. package/lib/atom/input-readonly/index.js.map +1 -1
  618. package/lib/atom/input-search/index.js +2 -2
  619. package/lib/atom/input-search/index.js.map +1 -1
  620. package/lib/atom/input-switch/index.js +2 -2
  621. package/lib/atom/input-switch/index.js.map +1 -1
  622. package/lib/atom/input-text/index.js +2 -2
  623. package/lib/atom/input-text/index.js.map +1 -1
  624. package/lib/atom/input-text-with-title/index.js +2 -2
  625. package/lib/atom/input-text-with-title/index.js.map +1 -1
  626. package/lib/atom/input-textarea/index.js +2 -2
  627. package/lib/atom/input-textarea/index.js.map +1 -1
  628. package/lib/atom/label/index.js.map +1 -1
  629. package/lib/atom/life/index.js.map +1 -1
  630. package/lib/atom/link/index.js +5 -3
  631. package/lib/atom/link/index.js.map +1 -1
  632. package/lib/atom/loader/index.js.map +1 -1
  633. package/lib/atom/lottie-wrapper/index.js +7 -7
  634. package/lib/atom/lottie-wrapper/index.js.map +1 -1
  635. package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
  636. package/lib/atom/notification/index.js.map +1 -1
  637. package/lib/atom/picture/index.js +1 -1
  638. package/lib/atom/picture/index.js.map +1 -1
  639. package/lib/atom/picture-background/index.d.ts +3 -3
  640. package/lib/atom/picture-background/index.js.map +1 -1
  641. package/lib/atom/promo-code/index.js.map +1 -1
  642. package/lib/atom/provider/index.d.ts +1 -1
  643. package/lib/atom/provider/index.js +2 -2
  644. package/lib/atom/provider/index.js.map +1 -1
  645. package/lib/atom/provider/web-context.js +8 -6
  646. package/lib/atom/provider/web-context.js.map +1 -1
  647. package/lib/atom/radio-group/index.js +1 -1
  648. package/lib/atom/radio-group/index.js.map +1 -1
  649. package/lib/atom/radio-group/item.js.map +1 -1
  650. package/lib/atom/range/handle.js +2 -2
  651. package/lib/atom/range/handle.js.map +1 -1
  652. package/lib/atom/range/index.d.ts +1 -1
  653. package/lib/atom/range/index.js +2 -2
  654. package/lib/atom/range/index.js.map +1 -1
  655. package/lib/atom/resource-miniature/index.js.map +1 -1
  656. package/lib/atom/review-background/index.js.map +1 -1
  657. package/lib/atom/review-background/prop-types.js.map +1 -1
  658. package/lib/atom/review-header-step-item/index.d.ts +1 -0
  659. package/lib/atom/review-header-step-item/index.d.ts.map +1 -1
  660. package/lib/atom/review-header-step-item/index.js.map +1 -1
  661. package/lib/atom/review-header-step-item/index.native.d.ts +1 -0
  662. package/lib/atom/review-header-step-item/index.native.d.ts.map +1 -1
  663. package/lib/atom/review-header-step-item/index.native.js +2 -2
  664. package/lib/atom/review-header-step-item/index.native.js.map +1 -1
  665. package/lib/atom/review-header-step-item/types.js.map +1 -1
  666. package/lib/atom/review-presentation/index.js.map +1 -1
  667. package/lib/atom/review-presentation/index.native.d.ts +1 -0
  668. package/lib/atom/review-presentation/index.native.d.ts.map +1 -1
  669. package/lib/atom/review-presentation/index.native.js +2 -2
  670. package/lib/atom/review-presentation/index.native.js.map +1 -1
  671. package/lib/atom/review-presentation/prop-types.js +1 -1
  672. package/lib/atom/review-presentation/prop-types.js.map +1 -1
  673. package/lib/atom/select/index.d.ts +2 -2
  674. package/lib/atom/select/index.js +3 -3
  675. package/lib/atom/select/index.js.map +1 -1
  676. package/lib/atom/select-modal/index.native.d.ts +1 -0
  677. package/lib/atom/select-modal/index.native.d.ts.map +1 -1
  678. package/lib/atom/select-modal/index.native.js +2 -2
  679. package/lib/atom/select-modal/index.native.js.map +1 -1
  680. package/lib/atom/slide/index.js +1 -1
  681. package/lib/atom/slide/index.js.map +1 -1
  682. package/lib/atom/social-link/index.js.map +1 -1
  683. package/lib/atom/space/index.native.d.ts +1 -0
  684. package/lib/atom/space/index.native.d.ts.map +1 -1
  685. package/lib/atom/space/index.native.js +2 -2
  686. package/lib/atom/space/index.native.js.map +1 -1
  687. package/lib/atom/spinner/index.js.map +1 -1
  688. package/lib/atom/tab/index.js +2 -2
  689. package/lib/atom/tab/index.js.map +1 -1
  690. package/lib/atom/tab-content/index.js.map +1 -1
  691. package/lib/atom/tag/index.js.map +1 -1
  692. package/lib/atom/text/index.native.js +3 -3
  693. package/lib/atom/text/index.native.js.map +1 -1
  694. package/lib/atom/title/index.js.map +1 -1
  695. package/lib/atom/video-upload/index.js +2 -2
  696. package/lib/atom/video-upload/index.js.map +1 -1
  697. package/lib/atom/wizard-steps/index.js.map +1 -1
  698. package/lib/globals.d.js.map +1 -1
  699. package/lib/hoc/animation/index.js +1 -1
  700. package/lib/hoc/animation/index.js.map +1 -1
  701. package/lib/hoc/animation-scheduler/index.js +4 -4
  702. package/lib/hoc/animation-scheduler/index.js.map +1 -1
  703. package/lib/hoc/modal/index.native.js +2 -2
  704. package/lib/hoc/modal/index.native.js.map +1 -1
  705. package/lib/hoc/modal/select/index.native.d.ts +1 -0
  706. package/lib/hoc/modal/select/index.native.d.ts.map +1 -1
  707. package/lib/hoc/modal/select/index.native.js +2 -2
  708. package/lib/hoc/modal/select/index.native.js.map +1 -1
  709. package/lib/hoc/modal/select-item/index.native.d.ts +1 -0
  710. package/lib/hoc/modal/select-item/index.native.d.ts.map +1 -1
  711. package/lib/hoc/modal/select-item/index.native.js +2 -2
  712. package/lib/hoc/modal/select-item/index.native.js.map +1 -1
  713. package/lib/hoc/swapper/index.js +5 -3
  714. package/lib/hoc/swapper/index.js.map +1 -1
  715. package/lib/hoc/touchable/index.native.js +4 -4
  716. package/lib/hoc/touchable/index.native.js.map +1 -1
  717. package/lib/hoc/transition/index.js +3 -3
  718. package/lib/hoc/transition/index.js.map +1 -1
  719. package/lib/index.js.map +1 -1
  720. package/lib/molecule/add-to-my-list/index.js +4 -4
  721. package/lib/molecule/add-to-my-list/index.js.map +1 -1
  722. package/lib/molecule/answer/index.js +6 -4
  723. package/lib/molecule/answer/index.js.map +1 -1
  724. package/lib/molecule/answer/index.native.d.ts +1 -0
  725. package/lib/molecule/answer/index.native.d.ts.map +1 -1
  726. package/lib/molecule/answer/index.native.js.map +1 -1
  727. package/lib/molecule/answer/prop-types.d.ts +6 -6
  728. package/lib/molecule/answer/prop-types.js +3 -3
  729. package/lib/molecule/answer/prop-types.js.map +1 -1
  730. package/lib/molecule/audio/index.js.map +1 -1
  731. package/lib/molecule/banner/index.js.map +1 -1
  732. package/lib/molecule/battle-request/index.js.map +1 -1
  733. package/lib/molecule/brand-card/description.js.map +1 -1
  734. package/lib/molecule/brand-card/index.js.map +1 -1
  735. package/lib/molecule/brand-card-create/index.js.map +1 -1
  736. package/lib/molecule/brand-create-form/index.d.ts +2 -2
  737. package/lib/molecule/brand-create-form/index.js +2 -2
  738. package/lib/molecule/brand-create-form/index.js.map +1 -1
  739. package/lib/molecule/brand-download-box/index.js.map +1 -1
  740. package/lib/molecule/brand-form-group/index.d.ts +9 -9
  741. package/lib/molecule/brand-form-group/index.js +20 -20
  742. package/lib/molecule/brand-form-group/index.js.map +1 -1
  743. package/lib/molecule/brand-logo/index.native.d.ts +1 -0
  744. package/lib/molecule/brand-logo/index.native.d.ts.map +1 -1
  745. package/lib/molecule/brand-logo/index.native.js +2 -2
  746. package/lib/molecule/brand-logo/index.native.js.map +1 -1
  747. package/lib/molecule/brand-tabs/index.js.map +1 -1
  748. package/lib/molecule/brand-upload-box/index.js.map +1 -1
  749. package/lib/molecule/breadcrumbs/index.js.map +1 -1
  750. package/lib/molecule/bullet-point-menu-button/index.js +2 -2
  751. package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
  752. package/lib/molecule/card/customer.js.map +1 -1
  753. package/lib/molecule/card/favorite.js.map +1 -1
  754. package/lib/molecule/card/index.js +4 -4
  755. package/lib/molecule/card/index.js.map +1 -1
  756. package/lib/molecule/card/notification.js.map +1 -1
  757. package/lib/molecule/card/selectable.js.map +1 -1
  758. package/lib/molecule/card-content/index.js.map +1 -1
  759. package/lib/molecule/card-with-button/index.d.ts +1 -1
  760. package/lib/molecule/card-with-button/index.js.map +1 -1
  761. package/lib/molecule/cm-popin/index.js.map +1 -1
  762. package/lib/molecule/cm-popin/types.js.map +1 -1
  763. package/lib/molecule/cookie-banner/index.js.map +1 -1
  764. package/lib/molecule/coorp-manager-roles/index.js +2 -2
  765. package/lib/molecule/coorp-manager-roles/index.js.map +1 -1
  766. package/lib/molecule/course-section/index.js.map +1 -1
  767. package/lib/molecule/course-sections/index.js +2 -2
  768. package/lib/molecule/course-sections/index.js.map +1 -1
  769. package/lib/molecule/dashboard/battle-request-list/index.js +1 -1
  770. package/lib/molecule/dashboard/battle-request-list/index.js.map +1 -1
  771. package/lib/molecule/dashboard/cards-list/index.js +1 -1
  772. package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
  773. package/lib/molecule/dashboard/news-list/index.js +1 -1
  774. package/lib/molecule/dashboard/news-list/index.js.map +1 -1
  775. package/lib/molecule/dashboard/review-banner/index.js +3 -3
  776. package/lib/molecule/dashboard/review-banner/index.js.map +1 -1
  777. package/lib/molecule/dashboard/start-battle/index.js +1 -1
  778. package/lib/molecule/dashboard/start-battle/index.js.map +1 -1
  779. package/lib/molecule/discipline-cta/index.js.map +1 -1
  780. package/lib/molecule/discipline-header/index.js.map +1 -1
  781. package/lib/molecule/discipline-partners/index.js.map +1 -1
  782. package/lib/molecule/discipline-scope/index.js.map +1 -1
  783. package/lib/molecule/drag-and-drop/index.js +4 -4
  784. package/lib/molecule/drag-and-drop/index.js.map +1 -1
  785. package/lib/molecule/drag-and-drop/overlay.js.map +1 -1
  786. package/lib/molecule/drag-and-drop/placeholder.js.map +1 -1
  787. package/lib/molecule/drag-and-drop/upload-report.js +4 -4
  788. package/lib/molecule/drag-and-drop/upload-report.js.map +1 -1
  789. package/lib/molecule/drag-and-drop-wrapper/index.js.map +1 -1
  790. package/lib/molecule/draggable/index.js +2 -2
  791. package/lib/molecule/draggable/index.js.map +1 -1
  792. package/lib/molecule/draggable-list/index.js +3 -3
  793. package/lib/molecule/draggable-list/index.js.map +1 -1
  794. package/lib/molecule/external-content-button/index.js.map +1 -1
  795. package/lib/molecule/external-content-viewer/index.js.map +1 -1
  796. package/lib/molecule/feedback/index.js +4 -4
  797. package/lib/molecule/feedback/index.js.map +1 -1
  798. package/lib/molecule/filters/filters-wrapper.js +1 -1
  799. package/lib/molecule/filters/filters-wrapper.js.map +1 -1
  800. package/lib/molecule/filters/index.d.ts +1 -1
  801. package/lib/molecule/filters/index.js.map +1 -1
  802. package/lib/molecule/forum/forum-comment/index.js.map +1 -1
  803. package/lib/molecule/forum/forum-post/index.js.map +1 -1
  804. package/lib/molecule/forum/forum-thread/index.js +1 -1
  805. package/lib/molecule/forum/forum-thread/index.js.map +1 -1
  806. package/lib/molecule/forum/post-conditions.js.map +1 -1
  807. package/lib/molecule/go1-banner/index.js.map +1 -1
  808. package/lib/molecule/hero/index.js +2 -2
  809. package/lib/molecule/hero/index.js.map +1 -1
  810. package/lib/molecule/input-text-with-titled-checkbox/index.js.map +1 -1
  811. package/lib/molecule/list-badges/index.js.map +1 -1
  812. package/lib/molecule/login-alert/index.js.map +1 -1
  813. package/lib/molecule/menu-list/index.js.map +1 -1
  814. package/lib/molecule/message-popin/index.js.map +1 -1
  815. package/lib/molecule/modal/index.js.map +1 -1
  816. package/lib/molecule/module-bubble/index.js.map +1 -1
  817. package/lib/molecule/module-card/index.js +1 -1
  818. package/lib/molecule/module-card/index.js.map +1 -1
  819. package/lib/molecule/news/index.js +1 -1
  820. package/lib/molecule/news/index.js.map +1 -1
  821. package/lib/molecule/notification-banner/index.js.map +1 -1
  822. package/lib/molecule/pagination/index.js.map +1 -1
  823. package/lib/molecule/payment-form/index.js.map +1 -1
  824. package/lib/molecule/pdf/index.js.map +1 -1
  825. package/lib/molecule/popin/index.js +4 -4
  826. package/lib/molecule/popin/index.js.map +1 -1
  827. package/lib/molecule/product-card/index.js.map +1 -1
  828. package/lib/molecule/progress-bar/index.d.ts +1 -1
  829. package/lib/molecule/progress-bar/index.js +2 -2
  830. package/lib/molecule/progress-bar/index.js.map +1 -1
  831. package/lib/molecule/questions/drop-down/index.d.ts +1 -1
  832. package/lib/molecule/questions/drop-down/index.js +2 -2
  833. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  834. package/lib/molecule/questions/free-text/index.js +5 -5
  835. package/lib/molecule/questions/free-text/index.js.map +1 -1
  836. package/lib/molecule/questions/free-text/index.native.d.ts +1 -0
  837. package/lib/molecule/questions/free-text/index.native.d.ts.map +1 -1
  838. package/lib/molecule/questions/free-text/index.native.js +5 -5
  839. package/lib/molecule/questions/free-text/index.native.js.map +1 -1
  840. package/lib/molecule/questions/mobile/draggable/index.native.d.ts +1 -0
  841. package/lib/molecule/questions/mobile/draggable/index.native.d.ts.map +1 -1
  842. package/lib/molecule/questions/mobile/draggable/index.native.js +2 -2
  843. package/lib/molecule/questions/mobile/draggable/index.native.js.map +1 -1
  844. package/lib/molecule/questions/mobile/slider/index.native.d.ts +1 -0
  845. package/lib/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
  846. package/lib/molecule/questions/mobile/slider/index.native.js +4 -4
  847. package/lib/molecule/questions/mobile/slider/index.native.js.map +1 -1
  848. package/lib/molecule/questions/mobile/switch/index.native.d.ts +1 -0
  849. package/lib/molecule/questions/mobile/switch/index.native.d.ts.map +1 -1
  850. package/lib/molecule/questions/mobile/switch/index.native.js +2 -2
  851. package/lib/molecule/questions/mobile/switch/index.native.js.map +1 -1
  852. package/lib/molecule/questions/mobile/template/index.native.d.ts +1 -0
  853. package/lib/molecule/questions/mobile/template/index.native.d.ts.map +1 -1
  854. package/lib/molecule/questions/mobile/template/index.native.js +5 -5
  855. package/lib/molecule/questions/mobile/template/index.native.js.map +1 -1
  856. package/lib/molecule/questions/qcm/index.js +3 -3
  857. package/lib/molecule/questions/qcm/index.js.map +1 -1
  858. package/lib/molecule/questions/qcm-drag/index.js +2 -2
  859. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  860. package/lib/molecule/questions/qcm-graphic/index.js +3 -3
  861. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  862. package/lib/molecule/questions/question-range/index.d.ts +1 -1
  863. package/lib/molecule/questions/question-range/index.js +7 -5
  864. package/lib/molecule/questions/question-range/index.js.map +1 -1
  865. package/lib/molecule/questions/template/index.d.ts +12 -3
  866. package/lib/molecule/questions/template/index.js +5 -3
  867. package/lib/molecule/questions/template/index.js.map +1 -1
  868. package/lib/molecule/questions/types.js.map +1 -1
  869. package/lib/molecule/quick-access-card/index.js.map +1 -1
  870. package/lib/molecule/quick-access-cards-group/index.js.map +1 -1
  871. package/lib/molecule/resource-player/index.d.ts +2 -2
  872. package/lib/molecule/resource-player/index.js +5 -3
  873. package/lib/molecule/resource-player/index.js.map +1 -1
  874. package/lib/molecule/review-card-congrats/index.js +4 -4
  875. package/lib/molecule/review-card-congrats/index.js.map +1 -1
  876. package/lib/molecule/review-card-congrats/prop-types.js.map +1 -1
  877. package/lib/molecule/review-correction-popin/index.js +3 -3
  878. package/lib/molecule/review-correction-popin/index.js.map +1 -1
  879. package/lib/molecule/review-correction-popin/prop-types.js.map +1 -1
  880. package/lib/molecule/review-header-steps/index.js +1 -1
  881. package/lib/molecule/review-header-steps/index.js.map +1 -1
  882. package/lib/molecule/review-header-steps/prop-types.js.map +1 -1
  883. package/lib/molecule/scope-content/index.js +1 -1
  884. package/lib/molecule/scope-content/index.js.map +1 -1
  885. package/lib/molecule/scope-tabs/index.js +3 -3
  886. package/lib/molecule/scope-tabs/index.js.map +1 -1
  887. package/lib/molecule/search-form/index.js +3 -3
  888. package/lib/molecule/search-form/index.js.map +1 -1
  889. package/lib/molecule/select-multiple/index.d.ts +2 -2
  890. package/lib/molecule/select-multiple/index.js +7 -7
  891. package/lib/molecule/select-multiple/index.js.map +1 -1
  892. package/lib/molecule/setup-cohort-item/index.js +1 -1
  893. package/lib/molecule/setup-cohort-item/index.js.map +1 -1
  894. package/lib/molecule/setup-section/index.js +2 -2
  895. package/lib/molecule/setup-section/index.js.map +1 -1
  896. package/lib/molecule/setup-sections/index.js.map +1 -1
  897. package/lib/molecule/setup-slide/index.d.ts +3 -3
  898. package/lib/molecule/setup-slide/index.js +9 -9
  899. package/lib/molecule/setup-slide/index.js.map +1 -1
  900. package/lib/molecule/setup-slider/index.d.ts +3 -3
  901. package/lib/molecule/setup-slider/index.js +1 -1
  902. package/lib/molecule/setup-slider/index.js.map +1 -1
  903. package/lib/molecule/share/index.js +4 -4
  904. package/lib/molecule/share/index.js.map +1 -1
  905. package/lib/molecule/skill-card/index.js +2 -2
  906. package/lib/molecule/skill-card/index.js.map +1 -1
  907. package/lib/molecule/skill-card/prop-types.js.map +1 -1
  908. package/lib/molecule/ssmenu-list/index.js.map +1 -1
  909. package/lib/molecule/subscription-freemium/index.js.map +1 -1
  910. package/lib/molecule/subscription-premium/index.js.map +1 -1
  911. package/lib/molecule/table/index.d.ts +2 -2
  912. package/lib/molecule/table/index.js.map +1 -1
  913. package/lib/molecule/teams-popin/index.js.map +1 -1
  914. package/lib/molecule/theme-image/index.js.map +1 -1
  915. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -2
  916. package/lib/molecule/title-and-checkbox-wrapper/index.js +3 -3
  917. package/lib/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
  918. package/lib/molecule/titled-checkbox/index.d.ts +2 -2
  919. package/lib/molecule/titled-checkbox/index.js +2 -2
  920. package/lib/molecule/titled-checkbox/index.js.map +1 -1
  921. package/lib/molecule/unsubscribe/index.js.map +1 -1
  922. package/lib/molecule/vertical-tabs/index.js.map +1 -1
  923. package/lib/molecule/video-iframe/index.d.ts.map +1 -1
  924. package/lib/molecule/video-iframe/index.js +2 -2
  925. package/lib/molecule/video-iframe/index.js.map +1 -1
  926. package/lib/molecule/video-player/index.js +4 -2
  927. package/lib/molecule/video-player/index.js.map +1 -1
  928. package/lib/molecule/video-player/jwplayer-prop-types.js.map +1 -1
  929. package/lib/molecule/video-player/jwplayer.js +3 -3
  930. package/lib/molecule/video-player/jwplayer.js.map +1 -1
  931. package/lib/molecule/video-player/prop-types.js.map +1 -1
  932. package/lib/molecule/video-player/vimeo.d.ts +3 -3
  933. package/lib/molecule/video-player/vimeo.js +2 -2
  934. package/lib/molecule/video-player/vimeo.js.map +1 -1
  935. package/lib/molecule/wizard-summary/index.d.ts +2 -2
  936. package/lib/molecule/wizard-summary/index.js +2 -2
  937. package/lib/molecule/wizard-summary/index.js.map +1 -1
  938. package/lib/organism/accordion/container/index.js +3 -3
  939. package/lib/organism/accordion/container/index.js.map +1 -1
  940. package/lib/organism/accordion/coorp-manager/index.js +4 -4
  941. package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
  942. package/lib/organism/accordion/coorp-manager/part/index.js +1 -1
  943. package/lib/organism/accordion/coorp-manager/part/index.js.map +1 -1
  944. package/lib/organism/accordion/part/index.js.map +1 -1
  945. package/lib/organism/accordion/toggler/index.js +2 -2
  946. package/lib/organism/accordion/toggler/index.js.map +1 -1
  947. package/lib/organism/brand-analytics/analytics-popin.js.map +1 -1
  948. package/lib/organism/brand-analytics/index.d.ts +3 -3
  949. package/lib/organism/brand-analytics/index.js.map +1 -1
  950. package/lib/organism/brand-dashboard/index.js +1 -1
  951. package/lib/organism/brand-dashboard/index.js.map +1 -1
  952. package/lib/organism/brand-form/index.d.ts +9 -9
  953. package/lib/organism/brand-form/index.js +2 -2
  954. package/lib/organism/brand-form/index.js.map +1 -1
  955. package/lib/organism/brand-table/index.d.ts +2 -2
  956. package/lib/organism/brand-table/index.js.map +1 -1
  957. package/lib/organism/brand-upload/index.d.ts +2 -2
  958. package/lib/organism/brand-upload/index.js +1 -1
  959. package/lib/organism/brand-upload/index.js.map +1 -1
  960. package/lib/organism/cards-grid/index.js.map +1 -1
  961. package/lib/organism/cart/index.js.map +1 -1
  962. package/lib/organism/content-translation/index.js +3 -3
  963. package/lib/organism/content-translation/index.js.map +1 -1
  964. package/lib/organism/course-selection/index.js +1 -1
  965. package/lib/organism/course-selection/index.js.map +1 -1
  966. package/lib/organism/discussion/index.js +1 -1
  967. package/lib/organism/discussion/index.js.map +1 -1
  968. package/lib/organism/get-the-app/index.js +3 -3
  969. package/lib/organism/get-the-app/index.js.map +1 -1
  970. package/lib/organism/grid-list/index.js.map +1 -1
  971. package/lib/organism/header/index.d.ts +2 -2
  972. package/lib/organism/header/index.js.map +1 -1
  973. package/lib/organism/header-v2/index.native.d.ts +1 -0
  974. package/lib/organism/header-v2/index.native.d.ts.map +1 -1
  975. package/lib/organism/header-v2/index.native.js +2 -2
  976. package/lib/organism/header-v2/index.native.js.map +1 -1
  977. package/lib/organism/hero/index.js.map +1 -1
  978. package/lib/organism/list-item/index.js.map +1 -1
  979. package/lib/organism/list-items/index.js.map +1 -1
  980. package/lib/organism/mobile-navigation/index.native.js +2 -2
  981. package/lib/organism/mobile-navigation/index.native.js.map +1 -1
  982. package/lib/organism/mooc/image-slider/index.js +1 -1
  983. package/lib/organism/mooc/image-slider/index.js.map +1 -1
  984. package/lib/organism/mooc-footer/index.js.map +1 -1
  985. package/lib/organism/mooc-header/index.js +1 -1
  986. package/lib/organism/mooc-header/index.js.map +1 -1
  987. package/lib/organism/podcast-popin-intro/index.native.d.ts +1 -0
  988. package/lib/organism/podcast-popin-intro/index.native.d.ts.map +1 -1
  989. package/lib/organism/podcast-popin-intro/index.native.js +2 -2
  990. package/lib/organism/podcast-popin-intro/index.native.js.map +1 -1
  991. package/lib/organism/popin/index.js.map +1 -1
  992. package/lib/organism/resource-browser/index.js +1 -1
  993. package/lib/organism/resource-browser/index.js.map +1 -1
  994. package/lib/organism/review-congrats/index.js +4 -4
  995. package/lib/organism/review-congrats/index.js.map +1 -1
  996. package/lib/organism/review-congrats/prop-types.js.map +1 -1
  997. package/lib/organism/review-header/index.js.map +1 -1
  998. package/lib/organism/review-header/index.native.d.ts +1 -0
  999. package/lib/organism/review-header/index.native.d.ts.map +1 -1
  1000. package/lib/organism/review-header/index.native.js +1 -1
  1001. package/lib/organism/review-header/index.native.js.map +1 -1
  1002. package/lib/organism/review-header/types.js.map +1 -1
  1003. package/lib/organism/review-skills/index.js +2 -2
  1004. package/lib/organism/review-skills/index.js.map +1 -1
  1005. package/lib/organism/review-skills/prop-types.js +3 -3
  1006. package/lib/organism/review-skills/prop-types.js.map +1 -1
  1007. package/lib/organism/review-slide/index.js +3 -3
  1008. package/lib/organism/review-slide/index.js.map +1 -1
  1009. package/lib/organism/review-slide/index.native.d.ts +1 -0
  1010. package/lib/organism/review-slide/index.native.d.ts.map +1 -1
  1011. package/lib/organism/review-slide/index.native.js +2 -2
  1012. package/lib/organism/review-slide/index.native.js.map +1 -1
  1013. package/lib/organism/review-slide/prop-types.d.ts +8 -8
  1014. package/lib/organism/review-slide/prop-types.js.map +1 -1
  1015. package/lib/organism/review-stacked-slides/index.d.ts.map +1 -1
  1016. package/lib/organism/review-stacked-slides/index.js +13 -9
  1017. package/lib/organism/review-stacked-slides/index.js.map +1 -1
  1018. package/lib/organism/review-stacked-slides/index.native.d.ts +1 -0
  1019. package/lib/organism/review-stacked-slides/index.native.d.ts.map +1 -1
  1020. package/lib/organism/review-stacked-slides/index.native.js +3 -6
  1021. package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
  1022. package/lib/organism/review-stacked-slides/prop-types.d.ts +22 -22
  1023. package/lib/organism/review-stacked-slides/prop-types.js +2 -2
  1024. package/lib/organism/review-stacked-slides/prop-types.js.map +1 -1
  1025. package/lib/organism/review-stacked-slides/style.css +120 -8
  1026. package/lib/organism/rewards-form/index.d.ts +2 -2
  1027. package/lib/organism/rewards-form/index.js +3 -1
  1028. package/lib/organism/rewards-form/index.js.map +1 -1
  1029. package/lib/organism/search-and-chips-results/index.js +1 -1
  1030. package/lib/organism/search-and-chips-results/index.js.map +1 -1
  1031. package/lib/organism/settings/index.js +5 -3
  1032. package/lib/organism/settings/index.js.map +1 -1
  1033. package/lib/organism/setup-header/index.js.map +1 -1
  1034. package/lib/organism/sidebar/index.d.ts +29 -5
  1035. package/lib/organism/sidebar/index.js +16 -14
  1036. package/lib/organism/sidebar/index.js.map +1 -1
  1037. package/lib/organism/slider/index.d.ts +1 -1
  1038. package/lib/organism/slider/index.d.ts.map +1 -1
  1039. package/lib/organism/slider/index.js.map +1 -1
  1040. package/lib/organism/user-preferences/index.js +5 -3
  1041. package/lib/organism/user-preferences/index.js.map +1 -1
  1042. package/lib/organism/wizard-contents/index.d.ts +19 -19
  1043. package/lib/organism/wizard-contents/index.js +8 -8
  1044. package/lib/organism/wizard-contents/index.js.map +1 -1
  1045. package/lib/template/activity/engine-stars.js.map +1 -1
  1046. package/lib/template/activity/index.d.ts +3 -3
  1047. package/lib/template/activity/index.js +2 -2
  1048. package/lib/template/activity/index.js.map +1 -1
  1049. package/lib/template/activity/progression-item.js +2 -2
  1050. package/lib/template/activity/progression-item.js.map +1 -1
  1051. package/lib/template/activity/stars-summary.d.ts +2 -2
  1052. package/lib/template/activity/stars-summary.js +1 -1
  1053. package/lib/template/activity/stars-summary.js.map +1 -1
  1054. package/lib/template/app-player/loading/index.js.map +1 -1
  1055. package/lib/template/app-player/player/index.js +1 -1
  1056. package/lib/template/app-player/player/index.js.map +1 -1
  1057. package/lib/template/app-player/player/slides/footer/index.js +2 -2
  1058. package/lib/template/app-player/player/slides/footer/index.js.map +1 -1
  1059. package/lib/template/app-player/player/slides/header/index.js.map +1 -1
  1060. package/lib/template/app-player/player/slides/header/learner.d.ts +4 -4
  1061. package/lib/template/app-player/player/slides/header/learner.js +1 -1
  1062. package/lib/template/app-player/player/slides/header/learner.js.map +1 -1
  1063. package/lib/template/app-player/player/slides/header/lives.js.map +1 -1
  1064. package/lib/template/app-player/player/slides/header/microlearning.js.map +1 -1
  1065. package/lib/template/app-player/player/slides/index.d.ts +6 -6
  1066. package/lib/template/app-player/player/slides/index.js +16 -12
  1067. package/lib/template/app-player/player/slides/index.js.map +1 -1
  1068. package/lib/template/app-player/popin-correction/index.js +7 -5
  1069. package/lib/template/app-player/popin-correction/index.js.map +1 -1
  1070. package/lib/template/app-player/popin-end/index.js +1 -1
  1071. package/lib/template/app-player/popin-end/index.js.map +1 -1
  1072. package/lib/template/app-player/popin-end/summary.js +16 -12
  1073. package/lib/template/app-player/popin-end/summary.js.map +1 -1
  1074. package/lib/template/app-player/popin-header/index.js +8 -6
  1075. package/lib/template/app-player/popin-header/index.js.map +1 -1
  1076. package/lib/template/app-player/popin-no-access/index.js.map +1 -1
  1077. package/lib/template/app-review/demo-ts/index.js.map +1 -1
  1078. package/lib/template/app-review/demo-ts/index.native.d.ts +1 -0
  1079. package/lib/template/app-review/demo-ts/index.native.d.ts.map +1 -1
  1080. package/lib/template/app-review/demo-ts/index.native.js.map +1 -1
  1081. package/lib/template/app-review/demo-ts/typings.js.map +1 -1
  1082. package/lib/template/app-review/index.d.ts +23 -22
  1083. package/lib/template/app-review/index.d.ts.map +1 -1
  1084. package/lib/template/app-review/index.js +1 -1
  1085. package/lib/template/app-review/index.js.map +1 -1
  1086. package/lib/template/app-review/index.native.d.ts +1 -0
  1087. package/lib/template/app-review/index.native.d.ts.map +1 -1
  1088. package/lib/template/app-review/index.native.js +2 -2
  1089. package/lib/template/app-review/index.native.js.map +1 -1
  1090. package/lib/template/app-review/onboarding/index.js.map +1 -1
  1091. package/lib/template/app-review/onboarding/index.native.js.map +1 -1
  1092. package/lib/template/app-review/player/index.js.map +1 -1
  1093. package/lib/template/app-review/player/index.native.d.ts +1 -0
  1094. package/lib/template/app-review/player/index.native.d.ts.map +1 -1
  1095. package/lib/template/app-review/player/index.native.js +2 -2
  1096. package/lib/template/app-review/player/index.native.js.map +1 -1
  1097. package/lib/template/app-review/player/prop-types.d.ts +22 -22
  1098. package/lib/template/app-review/player/prop-types.js +1 -1
  1099. package/lib/template/app-review/player/prop-types.js.map +1 -1
  1100. package/lib/template/app-review/prop-types.d.ts +22 -22
  1101. package/lib/template/app-review/prop-types.js +1 -1
  1102. package/lib/template/app-review/prop-types.js.map +1 -1
  1103. package/lib/template/app-review/skills/index.js.map +1 -1
  1104. package/lib/template/app-review/skills/index.native.d.ts +1 -0
  1105. package/lib/template/app-review/skills/index.native.d.ts.map +1 -1
  1106. package/lib/template/app-review/skills/index.native.js +2 -2
  1107. package/lib/template/app-review/skills/index.native.js.map +1 -1
  1108. package/lib/template/app-review/skills/prop-types.js +1 -1
  1109. package/lib/template/app-review/skills/prop-types.js.map +1 -1
  1110. package/lib/template/app-review/skills/stories.js.map +1 -1
  1111. package/lib/template/app-review/template-context.js +3 -3
  1112. package/lib/template/app-review/template-context.js.map +1 -1
  1113. package/lib/template/back-office/brand-create/index.js.map +1 -1
  1114. package/lib/template/back-office/brand-list/index.js +4 -2
  1115. package/lib/template/back-office/brand-list/index.js.map +1 -1
  1116. package/lib/template/back-office/brand-update/index.d.ts +39 -39
  1117. package/lib/template/back-office/brand-update/index.js +9 -9
  1118. package/lib/template/back-office/brand-update/index.js.map +1 -1
  1119. package/lib/template/back-office/dashboard-preview/dashboard-popin.js.map +1 -1
  1120. package/lib/template/back-office/dashboard-preview/index.js.map +1 -1
  1121. package/lib/template/back-office/layout/index.js.map +1 -1
  1122. package/lib/template/battle-requests/index.d.ts +2 -2
  1123. package/lib/template/battle-requests/index.js.map +1 -1
  1124. package/lib/template/cockpit/jw-uploader/index.js +2 -2
  1125. package/lib/template/cockpit/jw-uploader/index.js.map +1 -1
  1126. package/lib/template/common/authors/index.js.map +1 -1
  1127. package/lib/template/common/coorp-header/content.js.map +1 -1
  1128. package/lib/template/common/coorp-header/index.js.map +1 -1
  1129. package/lib/template/common/dashboard/index.d.ts +1 -1
  1130. package/lib/template/common/dashboard/index.js +1 -1
  1131. package/lib/template/common/dashboard/index.js.map +1 -1
  1132. package/lib/template/common/discipline/index.js +2 -2
  1133. package/lib/template/common/discipline/index.js.map +1 -1
  1134. package/lib/template/common/search-page/index.d.ts +1 -1
  1135. package/lib/template/common/search-page/index.js +1 -1
  1136. package/lib/template/common/search-page/index.js.map +1 -1
  1137. package/lib/template/external-course/index.d.ts.map +1 -1
  1138. package/lib/template/external-course/index.js.map +1 -1
  1139. package/lib/template/review-dashboard-skills/index.js.map +1 -1
  1140. package/lib/template/teams-dashboard/index.js +3 -3
  1141. package/lib/template/teams-dashboard/index.js.map +1 -1
  1142. package/lib/util/bubbling.js.map +1 -1
  1143. package/lib/util/build-query-string.js.map +1 -1
  1144. package/lib/util/button-icons.js.map +1 -1
  1145. package/lib/util/closest-step.js.map +1 -1
  1146. package/lib/util/constants.js.map +1 -1
  1147. package/lib/util/external-content.js +1 -1
  1148. package/lib/util/external-content.js.map +1 -1
  1149. package/lib/util/get-class-state.js.map +1 -1
  1150. package/lib/util/get-clean-uri.js.map +1 -1
  1151. package/lib/util/get-resized-image.js +3 -3
  1152. package/lib/util/get-resized-image.js.map +1 -1
  1153. package/lib/util/get-shadow-box-color-from-primary.js.map +1 -1
  1154. package/lib/util/image.js.map +1 -1
  1155. package/lib/util/navigation.js.map +1 -1
  1156. package/lib/util/parse-template-string.js.map +1 -1
  1157. package/lib/util/proptypes.js +1 -1
  1158. package/lib/util/proptypes.js.map +1 -1
  1159. package/lib/util/render-with-context.js +7 -4
  1160. package/lib/util/render-with-context.js.map +1 -1
  1161. package/lib/util/shallow-compare.js.map +1 -1
  1162. package/lib/variables/analytics.js.map +1 -1
  1163. package/lib/variables/brand.native.js.map +1 -1
  1164. package/lib/variables/colors.js.map +1 -1
  1165. package/lib/variables/default-mobile-translations.js.map +1 -1
  1166. package/lib/variables/shadow.js.map +1 -1
  1167. package/lib/variables/theme.native.js.map +1 -1
  1168. package/lib/variables/vibration.js.map +1 -1
  1169. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"names":["createStyleSheet","theme","StyleSheet","create","container","flex","paddingHorizontal","flexDirection","justifyContent","header","fontSize","fontWeight","bold","textAlign","textValue","color","colors","black","valuesContainer","leftValue","alignItems","rightValue","track","height","borderRadius","radius","button","thumb","BOX_STYLE","width","backgroundColor","borderWidth","QuestionSlider","props","step","style","min","max","unit","value","storeValue","onSlidingComplete","testID","templateContext","brandTheme","styleSheet","setStylesheet","setValue","handleSlidingComplete","_stylesheet","primary","borderColor"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAGA;;AACA;;AACA;;;;;;;;;;AA0BA,MAAMA,gBAAgB,GAAIC,KAAD,IACvBC,wBAAWC,MAAX,CAAkB;AAChBC,EAAAA,SAAS,EAAE;AACTC,IAAAA,IAAI,EAAE,CADG;AAETC,IAAAA,iBAAiB,EAAE,EAFV;AAGTC,IAAAA,aAAa,EAAE,QAHN;AAITC,IAAAA,cAAc,EAAE;AAJP,GADK;AAOhBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,QAAQ,EAAE,EADJ;AAENC,I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CAACvB,KARzB;AASE,IAAA,UAAU,EAAE,CAACuB,UAAU,CAAClB,KAAZ,EAAmB;AAACwB,MAAAA,WAAW,EAAEP,UAAU,EAAE5B,MAAZ,EAAoBkC;AAAlC,KAAnB,CATd;AAUE,IAAA,MAAM,EAAC;AAVT,IAJF,eAgBE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEL,UAAU,CAAC3B,eAAxB;AAAyC,IAAA,MAAM,EAAC;AAAhD,kBACE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAE2B,UAAU,CAAC1B;AAAxB,kBACE,6BAAC,cAAD;AAAM,IAAA,KAAK,EAAE0B,UAAU,CAAC/B,SAAxB;AAAmC,IAAA,MAAM,EAAC;AAA1C,KACI,GAAEsB,GAAI,IAAGE,IAAK,EADlB,CADF,CADF,eAME,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEO,UAAU,CAACxB;AAAxB,kBACE,6BAAC,cAAD;AAAM,IAAA,KAAK,EAAEwB,UAAU,CAAC/B,SAAxB;AAAmC,IAAA,MAAM,EAAC;AAA1C,KACI,GAAEuB,GAAI,IAAGC,IAAK,EADlB,CADF,CANF,CAhBF,CADF;AA+BD,CA5DD;;eA8DeN,c","sourcesContent":["import React, {useState, useEffect, useCallback} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport Slider from '@coorpacademy/react-native-slider';\n\nimport {Theme} from '../../../../variables/theme.native';\nimport Text from '../../../../atom/text/index.native';\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\nexport type OnSlidingCompleteFunction = (value: number) => void;\n\nexport type Props = {\n min: number;\n max: number;\n value?: number;\n unit?: string;\n onSlidingComplete: OnSlidingCompleteFunction;\n style?: ViewStyle;\n step?: number;\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n header: TextStyle;\n textValue: TextStyle;\n valuesContainer: ViewStyle;\n leftValue: ViewStyle;\n rightValue: ViewStyle;\n track: ViewStyle;\n thumb: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n paddingHorizontal: 20,\n flexDirection: 'column',\n justifyContent: 'center'\n },\n header: {\n fontSize: 25,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n textValue: {\n fontSize: 15,\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n valuesContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around'\n },\n leftValue: {\n flex: 1,\n alignItems: 'flex-start'\n },\n rightValue: {\n flex: 1,\n alignItems: 'flex-end'\n },\n track: {\n height: 10,\n borderRadius: theme.radius.button\n },\n thumb: {\n ...BOX_STYLE,\n width: 30,\n height: 30,\n borderRadius: 30 / 2,\n backgroundColor: 'white',\n borderWidth: 1\n }\n });\n\nconst QuestionSlider = (props: Props) => {\n const {\n step,\n style,\n min,\n max,\n unit = '',\n value: storeValue = 0,\n onSlidingComplete,\n testID\n } = props;\n const templateContext = useTemplateContext();\n const {brandTheme, theme} = templateContext;\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [value, setValue] = useState<number>(storeValue);\n\n const handleSlidingComplete = useCallback(() => {\n onSlidingComplete(value);\n }, [onSlidingComplete, value]);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={[styleSheet.container, style]} testID={testID}>\n <Text style={[styleSheet.header, {color: brandTheme?.colors?.primary}]} testID=\"slider-value\">\n {value}\n </Text>\n <Slider\n step={step || 1}\n value={value}\n onValueChange={setValue}\n maximumValue={max}\n minimumValue={min}\n onSlidingComplete={handleSlidingComplete}\n minimumTrackTintColor={brandTheme?.colors?.primary}\n trackStyle={styleSheet.track}\n thumbStyle={[styleSheet.thumb, {borderColor: brandTheme?.colors?.primary}]}\n testID=\"slider\"\n />\n <View style={styleSheet.valuesContainer} testID=\"slider-values-container\">\n <View style={styleSheet.leftValue}>\n <Text style={styleSheet.textValue} testID=\"slider-min-value\">\n {`${min} ${unit}`}\n </Text>\n </View>\n <View style={styleSheet.rightValue}>\n <Text style={styleSheet.textValue} testID=\"slider-max-value\">\n {`${max} ${unit}`}\n </Text>\n </View>\n </View>\n </View>\n );\n};\n\nexport default QuestionSlider;\n"],"file":"index.native.js"}
1
+ {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","StyleSheet","create","container","flex","paddingHorizontal","flexDirection","justifyContent","header","fontSize","fontWeight","bold","textAlign","textValue","color","colors","black","valuesContainer","leftValue","alignItems","rightValue","track","height","borderRadius","radius","button","thumb","BOX_STYLE","width","backgroundColor","borderWidth","QuestionSlider","props","step","style","min","max","unit","value","storeValue","onSlidingComplete","testID","templateContext","useTemplateContext","brandTheme","styleSheet","setStylesheet","useState","setValue","handleSlidingComplete","useCallback","useEffect","_stylesheet","primary","borderColor"],"sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport Slider from '@coorpacademy/react-native-slider';\n\nimport {Theme} from '../../../../variables/theme.native';\nimport Text from '../../../../atom/text/index.native';\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\nexport type OnSlidingCompleteFunction = (value: number) => void;\n\nexport type Props = {\n min: number;\n max: number;\n value?: number;\n unit?: string;\n onSlidingComplete: OnSlidingCompleteFunction;\n style?: ViewStyle;\n step?: number;\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n header: TextStyle;\n textValue: TextStyle;\n valuesContainer: ViewStyle;\n leftValue: ViewStyle;\n rightValue: ViewStyle;\n track: ViewStyle;\n thumb: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n paddingHorizontal: 20,\n flexDirection: 'column',\n justifyContent: 'center'\n },\n header: {\n fontSize: 25,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n textValue: {\n fontSize: 15,\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n valuesContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around'\n },\n leftValue: {\n flex: 1,\n alignItems: 'flex-start'\n },\n rightValue: {\n flex: 1,\n alignItems: 'flex-end'\n },\n track: {\n height: 10,\n borderRadius: theme.radius.button\n },\n thumb: {\n ...BOX_STYLE,\n width: 30,\n height: 30,\n borderRadius: 30 / 2,\n backgroundColor: 'white',\n borderWidth: 1\n }\n });\n\nconst QuestionSlider = (props: Props) => {\n const {\n step,\n style,\n min,\n max,\n unit = '',\n value: storeValue = 0,\n onSlidingComplete,\n testID\n } = props;\n const templateContext = useTemplateContext();\n const {brandTheme, theme} = templateContext;\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [value, setValue] = useState<number>(storeValue);\n\n const handleSlidingComplete = useCallback(() => {\n onSlidingComplete(value);\n }, [onSlidingComplete, value]);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={[styleSheet.container, style]} testID={testID}>\n <Text style={[styleSheet.header, {color: brandTheme?.colors?.primary}]} testID=\"slider-value\">\n {value}\n </Text>\n <Slider\n step={step || 1}\n value={value}\n onValueChange={setValue}\n maximumValue={max}\n minimumValue={min}\n onSlidingComplete={handleSlidingComplete}\n minimumTrackTintColor={brandTheme?.colors?.primary}\n trackStyle={styleSheet.track}\n thumbStyle={[styleSheet.thumb, {borderColor: brandTheme?.colors?.primary}]}\n testID=\"slider\"\n />\n <View style={styleSheet.valuesContainer} testID=\"slider-values-container\">\n <View style={styleSheet.leftValue}>\n <Text style={styleSheet.textValue} testID=\"slider-min-value\">\n {`${min} ${unit}`}\n </Text>\n </View>\n <View style={styleSheet.rightValue}>\n <Text style={styleSheet.textValue} testID=\"slider-max-value\">\n {`${max} ${unit}`}\n </Text>\n </View>\n </View>\n </View>\n );\n};\n\nexport default QuestionSlider;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAGA;;AACA;;AACA;;;;;;;;;;AA0BA,MAAMA,gBAAgB,GAAIC,KAAD,IACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,IAAI,EAAE,CADG;IAETC,iBAAiB,EAAE,EAFV;IAGTC,aAAa,EAAE,QAHN;IAITC,cAAc,EAAE;EAJP,CADK;EAOhBC,MAAM,EAAE;IACNC,QAAQ,EAAE,EADJ;IAENC,UAAU,EAAEV,KAAK,CAACU,UAAN,CAAiBC,IAFvB;IAGNC,SAAS,EAAE;EAHL,CAPQ;EAYhBC,SAAS,EAAE;IACTJ,QAAQ,EAAE,EADD;IAETK,KAAK,EAAEd,KAAK,CAACe,MAAN,CAAaC,KAFX;IAGTN,UAAU,EAAEV,KAAK,CAACU,UAAN,CAAiBC,IAHpB;IAITC,SAAS,EAAE;EAJF,CAZK;EAkBhBK,eAAe,EAAE;IACfX,aAAa,EAAE,KADA;IAEfC,cAAc,EAAE;EAFD,CAlBD;EAsBhBW,SAAS,EAAE;IACTd,IAAI,EAAE,CADG;IAETe,UAAU,EAAE;EAFH,CAtBK;EA0BhBC,UAAU,EAAE;IACVhB,IAAI,EAAE,CADI;IAEVe,UAAU,EAAE;EAFF,CA1BI;EA8BhBE,KAAK,EAAE;IACLC,MAAM,EAAE,EADH;IAELC,YAAY,EAAEvB,KAAK,CAACwB,MAAN,CAAaC;EAFtB,CA9BS;EAkChBC,KAAK,eACAC,iBADA;IAEHC,KAAK,EAAE,EAFJ;IAGHN,MAAM,EAAE,EAHL;IAIHC,YAAY,EAAE,KAAK,CAJhB;IAKHM,eAAe,EAAE,OALd;IAMHC,WAAW,EAAE;EANV;AAlCW,CAAlB,CADF;;A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HjB;IAIE,YAAY,EAAEZ,GAJhB;IAKE,YAAY,EAAED,GALhB;IAME,iBAAiB,EAAEc,qBANrB;IAOE,qBAAqB,EAAEL,UAAU,EAAE7B,MAAZ,EAAoBsC,OAP7C;IAQE,UAAU,EAAER,UAAU,CAACxB,KARzB;IASE,UAAU,EAAE,CAACwB,UAAU,CAACnB,KAAZ,EAAmB;MAAC4B,WAAW,EAAEV,UAAU,EAAE7B,MAAZ,EAAoBsC;IAAlC,CAAnB,CATd;IAUE,MAAM,EAAC;EAVT,EAJF,eAgBE,6BAAC,iBAAD;IAAM,KAAK,EAAER,UAAU,CAAC5B,eAAxB;IAAyC,MAAM,EAAC;EAAhD,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAE4B,UAAU,CAAC3B;EAAxB,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAE2B,UAAU,CAAChC,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEsB,GAAI,IAAGE,IAAK,EADlB,CADF,CADF,eAME,6BAAC,iBAAD;IAAM,KAAK,EAAEQ,UAAU,CAACzB;EAAxB,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAEyB,UAAU,CAAChC,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEuB,GAAI,IAAGC,IAAK,EADlB,CADF,CANF,CAhBF,CADF;AA+BD,CA5DD;;eA8DeN,c"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { QuestionType, Choice } from '../../types';
2
3
  export declare type Props = {
3
4
  type: QuestionType;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EAIP,MAAM,aAAa,CAAC;AAErB,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAqBF,QAAA,MAAM,MAAM,UAAW,KAAK,gBAoK3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"names":[],"mappings":";AAYA,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EAIP,MAAM,aAAa,CAAC;AAErB,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAqBF,QAAA,MAAM,MAAM,UAAW,KAAK,gBAoK3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -23,9 +23,9 @@ var _analytics = require("../../../../variables/analytics");
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
27
 
28
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
28
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
29
 
30
30
  const styleSheet = _reactNative.StyleSheet.create({
31
31
  cards: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"names":["styleSheet","StyleSheet","create","cards","flexDirection","alignItems","card","flex","choice","paddingVertical","Switch","props","templateContext","analytics","store","focusedSelectId","handleBlur","handleFocus","type","template","isDisabled","choices","min","max","unit","value","step","onSliderChange","onItemPress","onItemInputChange","onInputValueChange","handleChoicePress","onPress","handleItemInputChange","_value","handleSlidingComplete","logEvent","ANALYTICS_EVENT_TYPE","SLIDE","id","questionType","map","_id","selected","label","media","undefined","console","warn"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;AAiCA,MAAMA,UAA0B,GAAGC,wBAAWC,MAAX,CAAkB;AACnDC,EAAAA,KAAK,EAAE;AACLC,IAAAA,aAAa,EAAE,KADV;AAELC,IAAAA,UAAU,EAAE;AAFP,GAD4C;AAKnDC,EAAAA,IAAI,EAAE;AACJC,IAAAA,IAAI,EAAE;AADF,GAL6C;AAQnDC,EAAAA,MAAM,EAAE;AACNC,IAAAA,eAAe,EAAE;AADX;AAR2C,CAAlB,CAAnC;;AAaA,MAAMC,MAAM,GAAIC,KAAD,IAAkB;AAC/B,QAAMC,eAAe,GAAG,0CAAxB;AACA,QAAM;AAACC,IAAAA,SAAD;AAAYC,IAAAA;AAAZ,MAAqBF,eAA3B;AACA,QAAM;AAACG,IAAAA,e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A,YAAY,EAAC,OAJf;AAKE,QAAA,UAAU,EAAEV;AALd,QADF;;AASF;AACE,0BACE,6BAAC,iBAAD,qBACE,6BAAC,iBAAD,4BAAuBF,IAAvB,CADF,CADF;AAhGJ;AAsGD,CApKD;;eAsKeR,M","sourcesContent":["import React, {useCallback} from 'react';\nimport {View, StyleSheet, Text, ViewStyle} from 'react-native';\n\nimport QuestionChoice from '../../../../atom/choice/index.native';\nimport QuestionDraggable from '../draggable/index.native';\nimport QuestionTemplate from '../template/index.native';\nimport QuestionSlider from '../slider/index.native';\nimport FreeText from '../../free-text/index.native';\n\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {ANALYTICS_EVENT_TYPE} from '../../../../variables/analytics';\n\nimport type {\n QuestionType,\n Choice,\n TemplateListOfChoices,\n TemplateTextChoice,\n SelectableChoice\n} from '../../types';\n\nexport type Props = {\n type: QuestionType;\n isDisabled?: boolean;\n template?: string;\n choices?: Array<Choice>;\n min?: number;\n max?: number;\n unit?: string;\n step?: number;\n value?: number;\n onInputValueChange?: (value: string) => void;\n onSliderChange?: (value: number) => void;\n // --- mobile learner only\n onItemInputChange?: (item: Choice, value: string) => void;\n onItemPress?: (item: Choice) => void;\n};\n\ntype StyleSheetType = {\n cards: ViewStyle;\n card: ViewStyle;\n choice: ViewStyle;\n};\n\nconst styleSheet: StyleSheetType = StyleSheet.create({\n cards: {\n flexDirection: 'row',\n alignItems: 'stretch'\n },\n card: {\n flex: 1\n },\n choice: {\n paddingVertical: 5\n }\n});\n\nconst Switch = (props: Props) => {\n const templateContext = useTemplateContext();\n const {analytics, store} = templateContext;\n const {focusedSelectId, handleBlur, handleFocus} = store;\n\n const {\n type,\n template,\n isDisabled,\n choices = [],\n min,\n max,\n unit,\n value,\n step,\n onSliderChange,\n onItemPress,\n onItemInputChange,\n onInputValueChange\n } = props;\n\n const handleChoicePress = useCallback(\n (choice: Choice) => () => {\n if ((choice as SelectableChoice).onPress) {\n // e.g. app-review\n (choice as SelectableChoice).onPress();\n } else if (onItemPress) {\n // e.g. learner\n onItemPress(choice);\n }\n },\n [onItemPress]\n );\n\n const handleItemInputChange = useCallback(\n (choice: Choice, _value: string) => {\n if ((choice as SelectableChoice).onPress) {\n // e.g. app-review\n (choice as SelectableChoice).onPress(_value);\n } else if (onItemInputChange) {\n // e.g. learner\n onItemInputChange(choice, _value);\n }\n },\n [onItemInputChange]\n );\n\n const handleSlidingComplete = useCallback(\n _value => {\n analytics &&\n analytics.logEvent(ANALYTICS_EVENT_TYPE.SLIDE, {\n id: 'slider',\n questionType: 'slider'\n });\n\n if (onSliderChange) {\n onSliderChange(_value);\n }\n },\n [analytics, onSliderChange]\n );\n\n switch (type) {\n case 'qcm':\n return (\n <View testID=\"question-choices\">\n {(choices as SelectableChoice[]).map(choice => (\n <QuestionChoice\n key={`question-choice-${choice._id}`}\n onPress={handleChoicePress(choice)}\n isDisabled={isDisabled}\n isSelected={choice.selected}\n testID={`question-choice-${choice._id}`}\n style={styleSheet.choice}\n questionType={type}\n >\n {choice.label}\n </QuestionChoice>\n ))}\n </View>\n );\n case 'qcmGraphic':\n return (\n <View testID=\"question-choices\">\n {(choices as SelectableChoice[]).map(choice => (\n <QuestionChoice\n key={`question-choice-${choice._id}`}\n onPress={handleChoicePress(choice)}\n media={choice.media}\n isDisabled={isDisabled}\n isSelected={choice.selected}\n testID={`question-choice-${choice._id}`}\n style={styleSheet.choice}\n questionType={type}\n >\n {choice.label}\n </QuestionChoice>\n ))}\n </View>\n );\n case 'slider': {\n if (min === undefined || max === undefined) {\n return <View />;\n }\n\n return (\n <QuestionSlider\n min={min}\n max={max}\n unit={unit}\n value={value}\n step={step}\n onSlidingComplete={handleSlidingComplete}\n testID=\"question-slider\"\n />\n );\n }\n case 'template':\n if (handleBlur === undefined || handleFocus === undefined || focusedSelectId === undefined) {\n // eslint-disable-next-line no-console\n console.warn('type template must implement handleFocus etc within Context.store');\n return <View />;\n }\n\n return (\n <View testID=\"question-choices\">\n <QuestionTemplate\n isDisabled={isDisabled}\n template={template || ''}\n choices={choices as (TemplateListOfChoices | TemplateTextChoice)[]}\n onInputChange={handleItemInputChange}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n focusedSelectId={focusedSelectId}\n />\n </View>\n );\n case 'qcmDrag':\n return (\n <View testID=\"question-draggable\">\n <QuestionDraggable choices={choices as SelectableChoice[]} onPress={handleChoicePress} />\n </View>\n );\n case 'basic':\n if (!onInputValueChange) {\n return <View />;\n }\n\n return (\n <FreeText\n fullWidth\n onChange={onInputValueChange}\n testID=\"question-input-text\"\n questionType=\"basic\"\n isDisabled={isDisabled}\n />\n );\n default:\n return (\n <View>\n <Text>Unhandled type: {type}</Text>\n </View>\n );\n }\n};\n\nexport default Switch;\n"],"file":"index.native.js"}
1
+ {"version":3,"file":"index.native.js","names":["styleSheet","StyleSheet","create","cards","flexDirection","alignItems","card","flex","choice","paddingVertical","Switch","props","templateContext","useTemplateContext","analytics","store","focusedSelectId","handleBlur","handleFocus","type","template","isDisabled","choices","min","max","unit","value","step","onSliderChange","onItemPress","onItemInputChange","onInputValueChange","handleChoicePress","useCallback","onPress","handleItemInputChange","_value","handleSlidingComplete","logEvent","ANALYTICS_EVENT_TYPE","SLIDE","id","questionType","map","_id","selected","label","media","undefined","console","warn"],"sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {View, StyleSheet, Text, ViewStyle} from 'react-native';\n\nimport QuestionChoice from '../../../../atom/choice/index.native';\nimport QuestionDraggable from '../draggable/index.native';\nimport QuestionTemplate from '../template/index.native';\nimport QuestionSlider from '../slider/index.native';\nimport FreeText from '../../free-text/index.native';\n\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {ANALYTICS_EVENT_TYPE} from '../../../../variables/analytics';\n\nimport type {\n QuestionType,\n Choice,\n TemplateListOfChoices,\n TemplateTextChoice,\n SelectableChoice\n} from '../../types';\n\nexport type Props = {\n type: QuestionType;\n isDisabled?: boolean;\n template?: string;\n choices?: Array<Choice>;\n min?: number;\n max?: number;\n unit?: string;\n step?: number;\n value?: number;\n onInputValueChange?: (value: string) => void;\n onSliderChange?: (value: number) => void;\n // --- mobile learner only\n onItemInputChange?: (item: Choice, value: string) => void;\n onItemPress?: (item: Choice) => void;\n};\n\ntype StyleSheetType = {\n cards: ViewStyle;\n card: ViewStyle;\n choice: ViewStyle;\n};\n\nconst styleSheet: StyleSheetType = StyleSheet.create({\n cards: {\n flexDirection: 'row',\n alignItems: 'stretch'\n },\n card: {\n flex: 1\n },\n choice: {\n paddingVertical: 5\n }\n});\n\nconst Switch = (props: Props) => {\n const templateContext = useTemplateContext();\n const {analytics, store} = templateContext;\n const {focusedSelectId, handleBlur, handleFocus} = store;\n\n const {\n type,\n template,\n isDisabled,\n choices = [],\n min,\n max,\n unit,\n value,\n step,\n onSliderChange,\n onItemPress,\n onItemInputChange,\n onInputValueChange\n } = props;\n\n const handleChoicePress = useCallback(\n (choice: Choice) => () => {\n if ((choice as SelectableChoice).onPress) {\n // e.g. app-review\n (choice as SelectableChoice).onPress();\n } else if (onItemPress) {\n // e.g. learner\n onItemPress(choice);\n }\n },\n [onItemPress]\n );\n\n const handleItemInputChange = useCallback(\n (choice: Choice, _value: string) => {\n if ((choice as SelectableChoice).onPress) {\n // e.g. app-review\n (choice as SelectableChoice).onPress(_value);\n } else if (onItemInputChange) {\n // e.g. learner\n onItemInputChange(choice, _value);\n }\n },\n [onItemInputChange]\n );\n\n const handleSlidingComplete = useCallback(\n _value => {\n analytics &&\n analytics.logEvent(ANALYTICS_EVENT_TYPE.SLIDE, {\n id: 'slider',\n questionType: 'slider'\n });\n\n if (onSliderChange) {\n onSliderChange(_value);\n }\n },\n [analytics, onSliderChange]\n );\n\n switch (type) {\n case 'qcm':\n return (\n <View testID=\"question-choices\">\n {(choices as SelectableChoice[]).map(choice => (\n <QuestionChoice\n key={`question-choice-${choice._id}`}\n onPress={handleChoicePress(choice)}\n isDisabled={isDisabled}\n isSelected={choice.selected}\n testID={`question-choice-${choice._id}`}\n style={styleSheet.choice}\n questionType={type}\n >\n {choice.label}\n </QuestionChoice>\n ))}\n </View>\n );\n case 'qcmGraphic':\n return (\n <View testID=\"question-choices\">\n {(choices as SelectableChoice[]).map(choice => (\n <QuestionChoice\n key={`question-choice-${choice._id}`}\n onPress={handleChoicePress(choice)}\n media={choice.media}\n isDisabled={isDisabled}\n isSelected={choice.selected}\n testID={`question-choice-${choice._id}`}\n style={styleSheet.choice}\n questionType={type}\n >\n {choice.label}\n </QuestionChoice>\n ))}\n </View>\n );\n case 'slider': {\n if (min === undefined || max === undefined) {\n return <View />;\n }\n\n return (\n <QuestionSlider\n min={min}\n max={max}\n unit={unit}\n value={value}\n step={step}\n onSlidingComplete={handleSlidingComplete}\n testID=\"question-slider\"\n />\n );\n }\n case 'template':\n if (handleBlur === undefined || handleFocus === undefined || focusedSelectId === undefined) {\n // eslint-disable-next-line no-console\n console.warn('type template must implement handleFocus etc within Context.store');\n return <View />;\n }\n\n return (\n <View testID=\"question-choices\">\n <QuestionTemplate\n isDisabled={isDisabled}\n template={template || ''}\n choices={choices as (TemplateListOfChoices | TemplateTextChoice)[]}\n onInputChange={handleItemInputChange}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n focusedSelectId={focusedSelectId}\n />\n </View>\n );\n case 'qcmDrag':\n return (\n <View testID=\"question-draggable\">\n <QuestionDraggable choices={choices as SelectableChoice[]} onPress={handleChoicePress} />\n </View>\n );\n case 'basic':\n if (!onInputValueChange) {\n return <View />;\n }\n\n return (\n <FreeText\n fullWidth\n onChange={onInputValueChange}\n testID=\"question-input-text\"\n questionType=\"basic\"\n isDisabled={isDisabled}\n />\n );\n default:\n return (\n <View>\n <Text>Unhandled type: {type}</Text>\n </View>\n );\n }\n};\n\nexport default Switch;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;AAiCA,MAAMA,UAA0B,GAAGC,uBAAA,CA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AHT;QAIE,YAAY,EAAC,OAJf;QAKE,UAAU,EAAEV;MALd,EADF;;IASF;MACE,oBACE,6BAAC,iBAAD,qBACE,6BAAC,iBAAD,4BAAuBF,IAAvB,CADF,CADF;EAhGJ;AAsGD,CApKD;;eAsKeT,M"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { TemplateListOfChoices, TemplateTextChoice } from '../../types';
2
3
  import { FocusedSelectId, HandleBlur, HandleFocus } from '../../../../template/app-review/template-context';
3
4
  export declare type Props = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE3E,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,kDAAkD,CAAC;AA+J1D,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;IAC3D,aAAa,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,UAAW,KAAK,uBA+CrC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE3E,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,kDAAkD,CAAC;AA+J1D,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;IAC3D,aAAa,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,UAAW,KAAK,uBA+CrC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -25,11 +25,11 @@ var _shadow = require("../../../../variables/shadow");
25
25
 
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
27
 
28
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
28
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
29
 
30
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
31
 
32
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
32
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
33
33
 
34
34
  const createStyleSheet = theme => ({
35
35
  container: {
@@ -48,13 +48,13 @@ const createStyleSheet = theme => ({
48
48
  lineHeight: 25
49
49
  },
50
50
  // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread
51
- selectInput: _extends(_extends({
51
+ selectInput: _extends({
52
52
  padding: theme.spacing.tiny,
53
53
  borderRadius: theme.radius.regular,
54
54
  minWidth: 175,
55
55
  marginHorizontal: 12,
56
56
  paddingVertical: 16
57
- }, _shadow.BOX_STYLE), {}, {
57
+ }, _shadow.BOX_STYLE, {
58
58
  backgroundColor: theme.colors.white
59
59
  }),
60
60
  selectText: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":["createStyleSheet","theme","container","width","flexDirection","flexWrap","justifyContent","alignItems","spaced","paddingVertical","spacing","tiny","htmlText","color","colors","black","fontWeight","bold","lineHeight","selectInput","padding","borderRadius","radius","regular","minWidth","marginHorizontal","BOX_STYLE","backgroundColor","white","selectText","gray","medium","fontSize","textAlign","Item","props","part","index","isDisabled","focusedSelectId","choices","onInputChange","handleBlur","handleFocus","styles","templateContext","brandTheme","translations","inputNames","map","choice","name","id","isFocused","coloredText","primary","type","includes","value","choiceIndex","findIndex","disabledSuffix","selectedSuffix","handleInputChange","_item","_value","selectInputStyle","push","selectTextStyle","items","selectAnAnswer","QuestionTemplate","template","styleSheet","setStylesheet","_stylesheet","parts"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAOA;;AACA;;;;;;;;;;AAUA,MAAMA,gBAAgB,GAAIC,KAAD,KAAmC;AAC1DC,EAAAA,SAAS,EAAE;AACTC,IAAAA,KAAK,EAAE,MADE;AAETC,IAAAA,aAAa,EAAE,KAFN;AAGTC,IAAAA,QAAQ,EAAE,MAHD;AAITC,IAAAA,cAAc,EAAE,QAJP;AAKTC,IAAAA,UAAU,EAAE;AALH,GAD+C;AAQ1DC,EAAAA,MAAM,EAAE;AACNC,IAAAA,eAAe,EAAER,KAAK,CAACS,OAAN,CAAcC;AADzB,GARkD;AAW1DC,EAAAA,QAAQ,EAAE;AACRC,IAAAA,KAAK,EAAEZ,KAAK,CAACa,MAAN,CAAaC,KADZ;AAERC,IAAAA,UAAU,EAAEf,KAAK,CAACe,UAAN,CAAiBC,IAFrB;AAGRC,IAAAA,UAAU,EAAE;AAHJ,GAXgD;AAgB1D;AACAC,EAAAA,WAAW;AACTC,IAAAA,OAAO,EAAEnB,KAAK,CAACS,OAAN,CAAcC,IADd;AAETU,IAAAA,YAAY,EAAEpB,KAAK,CAACqB,MAAN,CAAaC,OAFlB;AAGTC,IAAAA,QAAQ,EAAE,GAHD;AAITC,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'react';\nimport {TextStyle, View, ViewStyle} from 'react-native';\n\nimport trim from 'lodash/fp/trim';\n\nimport Html from '../../../../atom/html/index.native';\nimport Select from '../../../../atom/select-modal/index.native';\nimport Space from '../../../../atom/space/index.native';\nimport type {TemplateListOfChoices, TemplateTextChoice} from '../../types';\nimport FreeText from '../../free-text/index.native';\nimport {\n FocusedSelectId,\n HandleBlur,\n HandleFocus,\n useTemplateContext\n} from '../../../../template/app-review/template-context';\nimport {Theme} from '../../../../variables/theme.native';\nimport parseTemplateString from '../../../../util/parse-template-string';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\ntype StyleSheetType = {\n container: ViewStyle;\n spaced: ViewStyle;\n htmlText: TextStyle;\n selectInput: ViewStyle;\n selectText: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType => ({\n container: {\n width: '100%',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignItems: 'center'\n },\n spaced: {\n paddingVertical: theme.spacing.tiny\n },\n htmlText: {\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 25\n },\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n selectInput: {\n padding: theme.spacing.tiny,\n borderRadius: theme.radius.regular,\n minWidth: 175,\n marginHorizontal: 12,\n paddingVertical: 16,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n selectText: {\n color: theme.colors.gray.medium,\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.regular,\n textAlign: 'center'\n }\n});\n\ntype TemplatePart = {\n type: 'string' | 'answerField';\n value: string;\n};\n\ntype ItemProps = {\n part: TemplatePart;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n index: number;\n isDisabled?: boolean;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n styles: StyleSheetType;\n};\n\nconst Item = (props: ItemProps) => {\n const {\n part,\n index,\n isDisabled = false,\n focusedSelectId,\n choices,\n onInputChange,\n handleBlur,\n handleFocus,\n styles\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme, brandTheme, translations} = templateContext;\n\n const inputNames = choices.map(choice => choice.name);\n const id = `question-part-${index + 1}`;\n const isFocused = focusedSelectId === id;\n\n const coloredText = brandTheme && {\n color: brandTheme.colors?.primary\n };\n\n if (part.type === 'answerField' && inputNames.includes(part.value)) {\n const choiceIndex = choices.findIndex(choice => choice.name === part.value);\n const choice = choices[choiceIndex];\n const {value} = choice;\n\n if (!choice || !choice.type || !choice.name) {\n return null;\n }\n\n const disabledSuffix = isDisabled ? '-disabled' : '';\n const selectedSuffix = value ? '-selected' : '';\n\n const handleInputChange =\n (_item: TemplateTextChoice | TemplateListOfChoices) => (_value: string) =>\n onInputChange(_item, _value);\n\n if (choice.type === 'text') {\n return (\n <View style={styles.spaced} testID={id}>\n <FreeText\n key={id}\n isDisabled={isDisabled}\n onChange={handleInputChange(choice)}\n value={value}\n testID={`${id}-text${selectedSuffix}${disabledSuffix}`}\n questionType=\"template\"\n />\n </View>\n );\n }\n\n const selectInputStyle: TextStyle[] = [styles.selectInput];\n if (coloredText && value) {\n selectInputStyle.push(coloredText);\n }\n\n const selectTextStyle: TextStyle[] = [styles.selectText];\n if (coloredText && value) {\n selectTextStyle.push(coloredText);\n }\n\n if (choice.type === 'select') {\n return (\n <View style={styles.spaced} testID={id}>\n <Select\n isDisabled={isDisabled}\n questionType=\"template\"\n values={choice.items}\n value={value}\n placeholder={translations.selectAnAnswer}\n isFocused={isFocused}\n onBlur={handleBlur}\n onFocus={handleFocus(id)}\n onChange={handleInputChange(choice)}\n textStyle={selectTextStyle}\n style={selectInputStyle}\n analyticsID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n testID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n />\n </View>\n );\n }\n }\n\n return (\n <Html key={id} fontSize={theme.fontSize.regular} testID={id} style={styles.htmlText}>\n {trim(part.value || '')}\n </Html>\n );\n};\n\nexport type Props = {\n isDisabled?: boolean;\n template: string;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n};\n\nconst QuestionTemplate = (props: Props) => {\n const {\n template,\n onInputChange,\n choices,\n handleBlur,\n handleFocus,\n focusedSelectId,\n isDisabled = false\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!template || !styleSheet) {\n return null;\n }\n\n const parts: TemplatePart[] = parseTemplateString(template);\n\n return (\n <View style={styleSheet.container} testID=\"question-template\">\n {parts.map((part, id) => (\n <View key={`question-part-${id}`} style={{flexDirection: 'row'}}>\n <Item\n part={part}\n choices={choices}\n index={id}\n focusedSelectId={focusedSelectId}\n isDisabled={isDisabled}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n onInputChange={onInputChange}\n styles={styleSheet}\n />\n <Space type=\"micro\" />\n </View>\n ))}\n </View>\n );\n};\n\nexport default QuestionTemplate;\n"],"file":"index.native.js"}
1
+ {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","container","width","flexDirection","flexWrap","justifyContent","alignItems","spaced","paddingVertical","spacing","tiny","htmlText","color","colors","black","fontWeight","bold","lineHeight","selectInput","padding","borderRadius","radius","regular","minWidth","marginHorizontal","BOX_STYLE","backgroundColor","white","selectText","gray","medium","fontSize","textAlign","Item","props","part","index","isDisabled","focusedSelectId","choices","onInputChange","handleBlur","handleFocus","styles","templateContext","useTemplateContext","brandTheme","translations","inputNames","map","choice","name","id","isFocused","coloredText","primary","type","includes","value","choiceIndex","findIndex","disabledSuffix","selectedSuffix","handleInputChange","_item","_value","selectInputStyle","push","selectTextStyle","items","selectAnAnswer","trim","QuestionTemplate","template","styleSheet","setStylesheet","useState","useEffect","_stylesheet","parts","parseTemplateString"],"sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {TextStyle, View, ViewStyle} from 'react-native';\n\nimport trim from 'lodash/fp/trim';\n\nimport Html from '../../../../atom/html/index.native';\nimport Select from '../../../../atom/select-modal/index.native';\nimport Space from '../../../../atom/space/index.native';\nimport type {TemplateListOfChoices, TemplateTextChoice} from '../../types';\nimport FreeText from '../../free-text/index.native';\nimport {\n FocusedSelectId,\n HandleBlur,\n HandleFocus,\n useTemplateContext\n} from '../../../../template/app-review/template-context';\nimport {Theme} from '../../../../variables/theme.native';\nimport parseTemplateString from '../../../../util/parse-template-string';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\ntype StyleSheetType = {\n container: ViewStyle;\n spaced: ViewStyle;\n htmlText: TextStyle;\n selectInput: ViewStyle;\n selectText: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType => ({\n container: {\n width: '100%',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignItems: 'center'\n },\n spaced: {\n paddingVertical: theme.spacing.tiny\n },\n htmlText: {\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 25\n },\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n selectInput: {\n padding: theme.spacing.tiny,\n borderRadius: theme.radius.regular,\n minWidth: 175,\n marginHorizontal: 12,\n paddingVertical: 16,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n selectText: {\n color: theme.colors.gray.medium,\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.regular,\n textAlign: 'center'\n }\n});\n\ntype TemplatePart = {\n type: 'string' | 'answerField';\n value: string;\n};\n\ntype ItemProps = {\n part: TemplatePart;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n index: number;\n isDisabled?: boolean;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n styles: StyleSheetType;\n};\n\nconst Item = (props: ItemProps) => {\n const {\n part,\n index,\n isDisabled = false,\n focusedSelectId,\n choices,\n onInputChange,\n handleBlur,\n handleFocus,\n styles\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme, brandTheme, translations} = templateContext;\n\n const inputNames = choices.map(choice => choice.name);\n const id = `question-part-${index + 1}`;\n const isFocused = focusedSelectId === id;\n\n const coloredText = brandTheme && {\n color: brandTheme.colors?.primary\n };\n\n if (part.type === 'answerField' && inputNames.includes(part.value)) {\n const choiceIndex = choices.findIndex(choice => choice.name === part.value);\n const choice = choices[choiceIndex];\n const {value} = choice;\n\n if (!choice || !choice.type || !choice.name) {\n return null;\n }\n\n const disabledSuffix = isDisabled ? '-disabled' : '';\n const selectedSuffix = value ? '-selected' : '';\n\n const handleInputChange =\n (_item: TemplateTextChoice | TemplateListOfChoices) => (_value: string) =>\n onInputChange(_item, _value);\n\n if (choice.type === 'text') {\n return (\n <View style={styles.spaced} testID={id}>\n <FreeText\n key={id}\n isDisabled={isDisabled}\n onChange={handleInputChange(choice)}\n value={value}\n testID={`${id}-text${selectedSuffix}${disabledSuffix}`}\n questionType=\"template\"\n />\n </View>\n );\n }\n\n const selectInputStyle: TextStyle[] = [styles.selectInput];\n if (coloredText && value) {\n selectInputStyle.push(coloredText);\n }\n\n const selectTextStyle: TextStyle[] = [styles.selectText];\n if (coloredText && value) {\n selectTextStyle.push(coloredText);\n }\n\n if (choice.type === 'select') {\n return (\n <View style={styles.spaced} testID={id}>\n <Select\n isDisabled={isDisabled}\n questionType=\"template\"\n values={choice.items}\n value={value}\n placeholder={translations.selectAnAnswer}\n isFocused={isFocused}\n onBlur={handleBlur}\n onFocus={handleFocus(id)}\n onChange={handleInputChange(choice)}\n textStyle={selectTextStyle}\n style={selectInputStyle}\n analyticsID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n testID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n />\n </View>\n );\n }\n }\n\n return (\n <Html key={id} fontSize={theme.fontSize.regular} testID={id} style={styles.htmlText}>\n {trim(part.value || '')}\n </Html>\n );\n};\n\nexport type Props = {\n isDisabled?: boolean;\n template: string;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n};\n\nconst QuestionTemplate = (props: Props) => {\n const {\n template,\n onInputChange,\n choices,\n handleBlur,\n handleFocus,\n focusedSelectId,\n isDisabled = false\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!template || !styleSheet) {\n return null;\n }\n\n const parts: TemplatePart[] = parseTemplateString(template);\n\n return (\n <View style={styleSheet.container} testID=\"question-template\">\n {parts.map((part, id) => (\n <View key={`question-part-${id}`} style={{flexDirection: 'row'}}>\n <Item\n part={part}\n choices={choices}\n index={id}\n focusedSelectId={focusedSelectId}\n isDisabled={isDisabled}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n onInputChange={onInputChange}\n styles={styleSheet}\n />\n <Space type=\"micro\" />\n </View>\n ))}\n </View>\n );\n};\n\nexport default QuestionTemplate;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAOA;;AACA;;;;;;;;;;AAUA,MAAMA,gBAAgB,GAAIC,KAAD,KAAmC;EAC1DC,SAAS,EAAE;IACTC,KAAK,EAAE,MADE;IAETC,aAAa,EAAE,KAFN;IAGTC,QAAQ,EAAE,MAHD;IAITC,cAAc,EAAE,QAJP;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,11 @@ var _style = _interopRequireDefault(require("./style.css"));
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
25
 
26
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
27
 
28
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
28
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
29
29
 
30
30
  const QCM = (props, legacyContext) => {
31
31
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/qcm/index.js"],"names":["QCM","props","legacyContext","answers","longestAnswer","title","length","skin","primarySkinColor","answersViews","map","answer","key","onClick","selected","ariaLabel","longAnswerClass","style","selectedAnswerClass","selectedAnswer","unselectedAnswer","innerHTML","boxShadow","backgroundColor","background","answerText","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,GAAG,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;AACpC,QAAM;AAACC,IAAAA;AAAD,MAAYF,KAAlB;AACA,QAAMG,aAAa,GAAG,oBAAM,CAAC;AAACC,IAAAA;AAAD,GAAD,KAAaA,KAAK,CAACC,MAAzB,EAAiCH,OAAjC,CAAtB;AACA,QAAMI,IAAI,GAAG,kCAAmBL,aAAnB,CAAb;AACA,QAAMM,gBAAgB,GAAG,oBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAAzB;AAEA,QAAME,YAAY,GAAG,oBACnB,MACEN,OAAO,CAACO,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;AAC3B,UAAM;AAACC,MAAAA,OAAD;AAAUR,MAAAA,KAAV;AAAiBS,MAAAA,QAAjB;AAA2B,oBAAcC;AAAzC,QAAsDJ,MAA5D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,CACPD,mBAAUE,KAAV,CAAgB;AACd7B,IAAAA,KAAK,EAAE2B,mBAAUG,MADH;AAEdrB,IAAAA,QAAQ,EAAEkB,mBAAUI,IAFN;AAGdvB,IAAAA,OAAO,EAAEmB,mBAAUK,IAHL;AAId,kBAAcL,mBAAUG;AAJV,GAAhB,CADO;AADK,CAAhB;eAWenC,G","sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport maxBy from 'lodash/fp/maxBy';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCM = (props, legacyContext) => {\n const {answers} = props;\n const longestAnswer = maxBy(({title}) => title.length, answers);\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = useMemo(\n () =>\n answers.map((answer, key) => {\n const {onClick, title, selected, 'aria-label': ariaLabel} = answer;\n const longAnswerClass = longestAnswer.title === title ? style.longestAnswer : style.answer;\n const selectedAnswerClass = selected ? style.selectedAnswer : style.unselectedAnswer;\n\n return (\n <div\n data-name=\"answer\"\n aria-label={ariaLabel || title}\n className={classnames(longAnswerClass, style.innerHTML, selectedAnswerClass)}\n onClick={onClick}\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n data-selected={selected}\n key={key}\n >\n <div\n data-name=\"answer-background\"\n style={{backgroundColor: selected ? primarySkinColor : '#F4F4F5' /* cm_grey_75 */}}\n className={style.background}\n />\n <span\n data-name=\"answer-label\"\n className={style.answerText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n );\n }),\n [answers, longestAnswer, primarySkinColor]\n );\n\n return (\n <div data-name=\"qcm\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCM.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCM.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n )\n};\n\nexport default QCM;\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["QCM","props","legacyContext","answers","longestAnswer","maxBy","title","length","skin","GetSkinFromContext","primarySkinColor","getOr","answersViews","useMemo","map","answer","key","onClick","selected","ariaLabel","longAnswerClass","style","selectedAnswerClass","selectedAnswer","unselectedAnswer","classnames","innerHTML","boxShadow","getShadowBoxColorFromPrimary","backgroundColor","background","answerText","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport maxBy from 'lodash/fp/maxBy';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCM = (props, legacyContext) => {\n const {answers} = props;\n const longestAnswer = maxBy(({title}) => title.length, answers);\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = useMemo(\n () =>\n answers.map((answer, key) => {\n const {onClick, title, selected, 'aria-label': ariaLabel} = answer;\n const longAnswerClass = longestAnswer.title === title ? style.longestAnswer : style.answer;\n const selectedAnswerClass = selected ? style.selectedAnswer : style.unselectedAnswer;\n\n return (\n <div\n data-name=\"answer\"\n aria-label={ariaLabel || title}\n className={classnames(longAnswerClass, style.innerHTML, selectedAnswerClass)}\n onClick={onClick}\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n data-selected={selected}\n key={key}\n >\n <div\n data-name=\"answer-background\"\n style={{backgroundColor: selected ? primarySkinColor : '#F4F4F5' /* cm_grey_75 */}}\n className={style.background}\n />\n <span\n data-name=\"answer-label\"\n className={style.answerText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n );\n }),\n [answers, longestAnswer, primarySkinColor]\n );\n\n return (\n <div data-name=\"qcm\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCM.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCM.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n )\n};\n\nexport default QCM;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,GAAG,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACpC,MAAM;IAACC;EAAD,IAAYF,KAAlB;EACA,MAAMG,aAAa,GAAG,IAAAC,cAAA,EAAM,CAAC;IAACC;EAAD,CAAD,KAAaA,KAAK,CAACC,MAAzB,EAAiCJ,OAAjC,CAAtB;EACA,MAAMK,IAAI,GAAG,IAAAC,4BAAA,EAAmBP,aAAnB,CAAb;EACA,MAAMQ,gBAAgB,GAAG,IAAAC,cAAA,EAAM,SAAN,EAAiB,gBAAjB,EAAmCH,IAAnC,CAAzB;EAEA,MAAMI,YAAY,GAAG,IAAAC,cAAA,EACnB,MACEV,OAAO,CAACW,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;IAC3B,MAAM;MAACC,OAAD;MAAUX,KAAV;MAAiBY,QAAjB;MAA2B,cAAcC;IAAzC,IAAsDJ,MAA5D;IACA,MAAMK,eAAe,GAAGhB,aAAa,CAACE,KAAd,KAAwBA,KAAxB,GAAgCe,cAAA,CAAMjB,aAAtC,GAAsDiB,cAAA,CAAMN,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N;IAGdzB,OAAO,EAAEqB,kBAAA,CAAUK,IAHL;IAId,cAAcL,kBAAA,CAAUG;EAJV,CAAhB,CADO;AADK,CAAhB;eAWezC,G"}
@@ -23,9 +23,9 @@ var _getShadowBoxColorFromPrimary = require("../../../util/get-shadow-box-color-
23
23
 
24
24
  var _style = _interopRequireDefault(require("./style.css"));
25
25
 
26
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
27
 
28
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
28
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
29
 
30
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
31
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/qcm-drag/index.js"],"names":["AnswersPropTypes","PropTypes","arrayOf","shape","onClick","func","order","number","selected","bool","title","string","help","EmptyView","style","emptySpan","propTypes","Choices","answers","answersViews","map","answer","key","invisibleAnswer","unselected","innerHTML","__html","choices","SelectedAnswerSections","backgroundColor","selectedAnswers","selectedAnswersViews","boxShadow","background","content","selectedAnswerText","length","emptyAnswers","QcmDrag","legacyContext","skin","primarySkinColor","wrapper","contextTypes","Provider","childContextTypes"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAN,2CAAyBC,mBAAUC,OAAV,CACvBD,mBAAUE,KAAV,CAAgB;AACdC,EAAAA,OAAO,EAAEH,mBAAUI,IADL;AAEdC,EAAAA,KAAK,EAAEL,mBAAUM,MAFH;AAGdC,EAAAA,QAAQ,EAAEP,mBAAUQ,IAHN;AAIdC,EAAAA,KAAK,EAAET,mBAAUU,MAJH;AAKdC,EAAAA,IAAI,EAAEX,mBAAUU;AALF,CAAhB,CADuB,CAAzB;;AAUA,MAAME,SAAS,GAAG,CAAC;AAACD,EAAAA;AAAD,CAAD,kBAAY;AAAM,EAAA,SAAS,EAAEE,eAAMC;AAAvB,GAAmCH,IAAnC,CAA9B;;AAEAC,SAAS,CAACG,SAAV,2CAAsB;AACpBJ,EAAAA,IAAI,EAAEX,mBAAUU;AADI,CAAtB;;AAIA,MAAMM,OAAO,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAe;AAC7B,QAAMC,YAAY,GAAGD,OAAO,CAACE,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;AACh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AAsD,IAAA,eAAe,EAAE6B;AAAvE,IADF,eAEE;AAAK,iBAAU,kBAAf;AAAkC,IAAA,SAAS,EAAE3B,eAAMI;AAAnD,kBACE,6BAAC,OAAD;AAAS,IAAA,OAAO,EAAEA;AAAlB,IADF,CAFF,CADF;AAQD,CAZD;;AAcAoB,OAAO,CAACtB,SAAR,2CAAoB;AAClBE,EAAAA,OAAO,EAAElB,gBADS;AAElBY,EAAAA,IAAI,EAAEgB,sBAAsB,CAACZ,SAAvB,CAAiCJ;AAFrB,CAApB;AAKA0B,OAAO,CAACK,YAAR,GAAuB;AACrBH,EAAAA,IAAI,EAAEI,kBAASC,iBAAT,CAA2BL;AADZ,CAAvB;eAIeF,O","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {pipe, filter, orderBy, getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst AnswersPropTypes = PropTypes.arrayOf(\n PropTypes.shape({\n onClick: PropTypes.func,\n order: PropTypes.number,\n selected: PropTypes.bool,\n title: PropTypes.string,\n help: PropTypes.string\n })\n);\n\nconst EmptyView = ({help}) => <span className={style.emptySpan}>{help}</span>;\n\nEmptyView.propTypes = {\n help: PropTypes.string\n};\n\nconst Choices = ({answers}) => {\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected} = answer;\n return (\n <div\n className={classnames(selected ? style.invisibleAnswer : style.unselected, style.innerHTML)}\n data-name=\"answer\"\n onClick={onClick}\n key={key}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n });\n\n return <div className={style.choices}>{answersViews}</div>;\n};\n\nChoices.propTypes = {\n answers: AnswersPropTypes\n};\n\nconst SelectedAnswerSections = ({answers, help, backgroundColor}) => {\n const selectedAnswers = pipe(filter('selected'), orderBy('order', 'asc'))(answers);\n const selectedAnswersViews = selectedAnswers.map((answer, key) => {\n const {onClick, title} = answer;\n return (\n <div\n data-selected=\"true\"\n onClick={onClick}\n key={key}\n data-name=\"selectedAnswer\"\n className={style.selected}\n style={{\n boxShadow: `0px 4px 16px ${getShadowBoxColorFromPrimary(backgroundColor)}`\n }}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor\n }}\n className={style.background}\n />\n <div className={style.content}>\n <span\n data-name=\"answerContent\"\n className={classnames(style.selectedAnswerText, style.innerHTML)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n );\n });\n\n if (selectedAnswersViews.length > 0) {\n return <div className={style.selectedAnswers}>{selectedAnswersViews}</div>;\n } else {\n return (\n <div className={style.emptyAnswers}>\n <EmptyView help={help} />\n </div>\n );\n }\n};\n\nSelectedAnswerSections.propTypes = {\n answers: AnswersPropTypes,\n help: EmptyView.propTypes.help,\n backgroundColor: PropTypes.string\n};\n\nconst QcmDrag = ({answers, help}, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n return (\n <div className={style.wrapper}>\n <SelectedAnswerSections answers={answers} help={help} backgroundColor={primarySkinColor} />\n <div data-name=\"qcm-drag-answers\" className={style.answers}>\n <Choices answers={answers} />\n </div>\n </div>\n );\n};\n\nQcmDrag.propTypes = {\n answers: AnswersPropTypes,\n help: SelectedAnswerSections.propTypes.help\n};\n\nQcmDrag.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default QcmDrag;\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["AnswersPropTypes","PropTypes","arrayOf","shape","onClick","func","order","number","selected","bool","title","string","help","EmptyView","style","emptySpan","propTypes","Choices","answers","answersViews","map","answer","key","classnames","invisibleAnswer","unselected","innerHTML","__html","choices","SelectedAnswerSections","backgroundColor","selectedAnswers","selectedAnswersViews","boxShadow","getShadowBoxColorFromPrimary","background","content","selectedAnswerText","length","emptyAnswers","QcmDrag","legacyContext","skin","GetSkinFromContext","primarySkinColor","wrapper","contextTypes","Provider","childContextTypes"],"sources":["../../../../src/molecule/questions/qcm-drag/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {pipe, filter, orderBy, getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst AnswersPropTypes = PropTypes.arrayOf(\n PropTypes.shape({\n onClick: PropTypes.func,\n order: PropTypes.number,\n selected: PropTypes.bool,\n title: PropTypes.string,\n help: PropTypes.string\n })\n);\n\nconst EmptyView = ({help}) => <span className={style.emptySpan}>{help}</span>;\n\nEmptyView.propTypes = {\n help: PropTypes.string\n};\n\nconst Choices = ({answers}) => {\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected} = answer;\n return (\n <div\n className={classnames(selected ? style.invisibleAnswer : style.unselected, style.innerHTML)}\n data-name=\"answer\"\n onClick={onClick}\n key={key}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n });\n\n return <div className={style.choices}>{answersViews}</div>;\n};\n\nChoices.propTypes = {\n answers: AnswersPropTypes\n};\n\nconst SelectedAnswerSections = ({answers, help, backgroundColor}) => {\n const selectedAnswers = pipe(filter('selected'), orderBy('order', 'asc'))(answers);\n const selectedAnswersViews = selectedAnswers.map((answer, key) => {\n const {onClick, title} = answer;\n return (\n <div\n data-selected=\"true\"\n onClick={onClick}\n key={key}\n data-name=\"selectedAnswer\"\n className={style.selected}\n style={{\n boxShadow: `0px 4px 16px ${getShadowBoxColorFromPrimary(backgroundColor)}`\n }}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor\n }}\n className={style.background}\n />\n <div className={style.content}>\n <span\n data-name=\"answerContent\"\n className={classnames(style.selectedAnswerText, style.innerHTML)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n );\n });\n\n if (selectedAnswersViews.length > 0) {\n return <div className={style.selectedAnswers}>{selectedAnswersViews}</div>;\n } else {\n return (\n <div className={style.emptyAnswers}>\n <EmptyView help={help} />\n </div>\n );\n }\n};\n\nSelectedAnswerSections.propTypes = {\n answers: AnswersPropTypes,\n help: EmptyView.propTypes.help,\n backgroundColor: PropTypes.string\n};\n\nconst QcmDrag = ({answers, help}, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n return (\n <div className={style.wrapper}>\n <SelectedAnswerSections answers={answers} help={help} backgroundColor={primarySkinColor} />\n <div data-name=\"qcm-drag-answers\" className={style.answers}>\n <Choices answers={answers} />\n </div>\n </div>\n );\n};\n\nQcmDrag.propTypes = {\n answers: AnswersPropTypes,\n help: SelectedAnswerSections.propTypes.help\n};\n\nQcmDrag.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default QcmDrag;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAN,2CAAyBC,kBAAA,CAAUC,OAAV,CACvBD,kBAAA,CAAUE,KAAV,CAAgB;EACdC,OAAO,EAAEH,kBAAA,CAAUI,IADL;EAEdC,KAAK,EAAEL,kBAAA,CAAUM,MAFH;EAGdC,QAAQ,EAAEP,kBAAA,CAAUQ,IAHN;EAIdC,KAAK,EAAET,kBAAA,CAAUU,MAJH;EAKdC,IAAI,EAAEX,kBAAA,CAAUU;AALF,CAAhB,CADuB,CAAzB;;AAUA,MAAME,SAAS,GAAG,CAAC;EAACD;AAAD,CAAD,kBAAY;EAAM,SAAS,EAAEE,cAAA,CAAMC;AAAvB,GAAmCH,IAAnC,CAA9B;;AAEAC,SAAS,CAACG,SAAV,2CAAsB;EACpBJ,IAAI,EAAEX,kBAAA,CAA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IAA0C,IAAI,EAAEN,IAAhD;IAAsD,eAAe,EAAEgC;EAAvE,EADF,eAEE;IAAK,aAAU,kBAAf;IAAkC,SAAS,EAAE9B,cAAA,CAAMI;EAAnD,gBACE,6BAAC,OAAD;IAAS,OAAO,EAAEA;EAAlB,EADF,CAFF,CADF;AAQD,CAZD;;AAcAsB,OAAO,CAACxB,SAAR,2CAAoB;EAClBE,OAAO,EAAElB,gBADS;EAElBY,IAAI,EAAEiB,sBAAsB,CAACb,SAAvB,CAAiCJ;AAFrB,CAApB;AAKA4B,OAAO,CAACM,YAAR,GAAuB;EACrBJ,IAAI,EAAEK,iBAAA,CAASC,iBAAT,CAA2BN;AADZ,CAAvB;eAIeF,O"}
@@ -17,13 +17,13 @@ var _getShadowBoxColorFromPrimary = require("../../../util/get-shadow-box-color-
17
17
 
18
18
  var _style = _interopRequireDefault(require("./style.css"));
19
19
 
20
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
21
 
22
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
26
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
27
 
28
28
  const QCMImage = (props, legacyContext) => {
29
29
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"names":["QCMImage","props","legacyContext","answers","skin","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","style","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","innerHTML","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;AACzC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AAjB,EAAwBK,eAAMO,SAA9B,CAFb,CAGE;AAHF;AAIE,MAAA,uBAAuB,EAAE;AAACC,QAAAA,MAAM,EAAEb;AAAT;AAJ3B,MADF,CATF,CAnBF,CADF;AAwCD,GA3CoB,CAArB;AA6CA,sBACE;AAAK,iBAAU,qBAAf;AAAqC,IAAA,SAAS,EAAEK,eAAMS;AAAtD,KACGnB,YADH,CADF;AAKD,CAvDD;;AAyDAN,QAAQ,CAAC0B,YAAT,GAAwB;AACtBtB,EAAAA,IAAI,EAAEuB,kBAASC,iBAAT,CAA2BxB;AADX,CAAxB;AAIAJ,QAAQ,CAAC6B,SAAT,2CAAqB;AACnB1B,EAAAA,OAAO,EAAE2B,mBAAUC,OAAV,CACPD,mBAAUE,KAAV,CAAgB;AACdrB,IAAAA,KAAK,EAAEmB,mBAAUG,MADH;AAEdrB,IAAAA,QAAQ,EAAEkB,mBAAUI,IAFN;AAGdxB,IAAAA,OAAO,EAAEoB,mBAAUK,IAHL;AAIdtB,IAAAA,KAAK,EAAEiB,mBAAUG,MAJH;AAKdnB,IAAAA,SAAS,EAAEgB,mBAAUG;AALP,GAAhB,CADO;AADU,CAArB;eAYejC,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, legacyContext) => {\n const {answers} = props;\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n title={title}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div data-name=\"qcm-graphic-wrapper\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n )\n};\n\nexport default QCMImage;\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["QCMImage","props","legacyContext","answers","skin","GetSkinFromContext","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","getShadowBoxColorFromPrimary","style","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","classnames","innerHTML","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, legacyContext) => {\n const {answers} = props;\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n title={title}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div data-name=\"qcm-graphic-wrapper\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n )\n};\n\nexport default QCMImage;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACzC,MAAM;IAACC;EAAD,IAAYF,KAAlB;EACA,MAAMG,IAAI,GAAG,IAAAC,4BAAA,EAAmBH,aAAnB,CAAb;EACA,MAAMI,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCF,IAAnC,CAAzB;EAEA,MAAMG,YAAY,GAAGJ,OAAO,CAACK,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;I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BAAA,CAASC,iBAAT,CAA2B3B;AADX,CAAxB;AAIAJ,QAAQ,CAACgC,SAAT,2CAAqB;EACnB7B,OAAO,EAAE8B,kBAAA,CAAUC,OAAV,CACPD,kBAAA,CAAUE,KAAV,CAAgB;IACdvB,KAAK,EAAEqB,kBAAA,CAAUG,MADH;IAEdvB,QAAQ,EAAEoB,kBAAA,CAAUI,IAFN;IAGd1B,OAAO,EAAEsB,kBAAA,CAAUK,IAHL;IAIdxB,KAAK,EAAEmB,kBAAA,CAAUG,MAJH;IAKdrB,SAAS,EAAEkB,kBAAA,CAAUG;EALP,CAAhB,CADO;AADU,CAArB;eAYepC,Q"}
@@ -31,7 +31,7 @@ declare namespace QuestionRange {
31
31
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
32
32
  onChangeEnd: PropTypes.Requireable<(...args: any[]) => any>;
33
33
  multi: PropTypes.Requireable<boolean>;
34
- value: PropTypes.Requireable<number | (number | null | undefined)[]>;
34
+ value: PropTypes.Requireable<NonNullable<number | (number | null | undefined)[] | null | undefined>>;
35
35
  };
36
36
  }
37
37
  import PropTypes from "prop-types";
@@ -17,13 +17,15 @@ var _range = _interopRequireDefault(require("../../../atom/range"));
17
17
 
18
18
  var _style = _interopRequireDefault(require("./style.css"));
19
19
 
20
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
20
+ const _excluded = ["title", "minLabel", "maxLabel"];
21
21
 
22
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
25
 
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
28
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
29
 
28
30
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
29
31
 
@@ -33,7 +35,7 @@ const QuestionRange = (props, legacyContext) => {
33
35
  minLabel,
34
36
  maxLabel
35
37
  } = props,
36
- rangeProps = _objectWithoutPropertiesLoose(props, ["title", "minLabel", "maxLabel"]);
38
+ rangeProps = _objectWithoutPropertiesLoose(props, _excluded);
37
39
 
38
40
  const skin = (0, _provider.GetSkinFromContext)(legacyContext);
39
41
  const defaultColor = (0, _getOr2.default)('#00B0FF', 'common.primary', skin);
@@ -69,7 +71,7 @@ const QuestionRange = (props, legacyContext) => {
69
71
  QuestionRange.contextTypes = {
70
72
  skin: _provider.default.childContextTypes.skin
71
73
  };
72
- QuestionRange.propTypes = process.env.NODE_ENV !== "production" ? _extends(_extends({}, _range.default.propTypes), {}, {
74
+ QuestionRange.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _range.default.propTypes, {
73
75
  title: _propTypes.default.string,
74
76
  minLabel: _propTypes.default.string,
75
77
  maxLabel: _propTypes.default.string
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/question-range/index.js"],"names":["QuestionRange","props","legacyContext","title","minLabel","maxLabel","rangeProps","skin","defaultColor","titleStyle","color","style","wrapper","innerHTML","__html","labelWrapper","label","contextTypes","Provider","childContextTypes","propTypes","Range","PropTypes","string"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,MAAMA,aAAa,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;AAC9C,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,QAAR;AAAkBC,IAAAA;AAAlB,MAA6CJ,KAAnD;AAAA,QAAqCK,UAArC,iCAAmDL,KAAnD;;AAEA,QAAMM,IAAI,GAAG,kCAAmBL,aAAnB,CAAb;AACA,QAAMM,YAAY,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;AAEA,QAAME,UAAU,GAAG;AACjBC,IAAAA,KAAK,EAAEF;AADU,GAAnB;AAIA,sBACE;AAAK,IAAA,SAAS,EAAEG,eAAMC;AAAtB,kBACE;AACE,IAAA,KAAK,EAAEH,UADT;AAEE,IAAA,SAAS,EAAE,yBAAWE,eAAMR,KAAjB,EAAwBQ,eAAME,SAA9B,CAFb,CAGE;AAHF;AAIE,IAAA,uBAAuB,EAAE;AAACC,MAAAA,MAAM,EAAEX;AAAT;AAJ3B,IADF,eAOE,6BAAC,cAAD,EAAWG,UAAX,CAPF,eAQE;AAAK,IAAA,SAAS,EAAEK,eAAMI;AAAtB,kBACE;AACE,IAAA,SAAS,EAAE,yBAAWJ,eAAMK,KAAjB,EAAwBL,eAAME,SAA9B,CADb,CAEE;AAFF;AAGE,IAAA,uBAAuB,EAAE;AAACC,MAAAA,MAAM,EAAEV;AAAT;AAH3B,IADF,eAME;AACE,IAAA,SAAS,EAAE,yBAAWO,eAAMK,KAAjB,EAAwBL,eAAME,SAA9B,CADb,CAEE;AAFF;AAGE,IAAA,uBAAuB,EAAE;AAACC,MAAAA,MAAM,EAAET;AAAT;AAH3B,IANF,CARF,CADF;AAuBD,CAjCD;;AAmCAL,aAAa,CAACiB,YAAd,GAA6B;AAC3BV,EAAAA,IAAI,EAAEW,kBAASC,iBAAT,CAA2BZ;AADN,CAA7B;AAIAP,aAAa,CAACoB,SAAd,iEACKC,eAAMD,SADX;AAEEjB,EAAAA,KAAK,EAAEmB,mBAAUC,MAFnB;AAGEnB,EAAAA,QAAQ,EAAEkB,mBAAUC,MAHtB;AAIElB,EAAAA,QAAQ,EAAEiB,mBAAUC;AAJtB;eAOevB,a","sourcesContent":["import React from 'react';\nimport {getOr} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport Range from '../../../atom/range';\nimport style from './style.css';\n\nconst QuestionRange = (props, legacyContext) => {\n const {title, minLabel, maxLabel, ...rangeProps} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const titleStyle = {\n color: defaultColor\n };\n\n return (\n <div className={style.wrapper}>\n <span\n style={titleStyle}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <Range {...rangeProps} />\n <div className={style.labelWrapper}>\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: minLabel}}\n />\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: maxLabel}}\n />\n </div>\n </div>\n );\n};\n\nQuestionRange.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQuestionRange.propTypes = {\n ...Range.propTypes,\n title: PropTypes.string,\n minLabel: PropTypes.string,\n maxLabel: PropTypes.string\n};\n\nexport default QuestionRange;\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["QuestionRange","props","legacyContext","title","minLabel","maxLabel","rangeProps","skin","GetSkinFromContext","defaultColor","titleStyle","color","style","wrapper","classnames","innerHTML","__html","labelWrapper","label","contextTypes","Provider","childContextTypes","propTypes","Range","PropTypes","string"],"sources":["../../../../src/molecule/questions/question-range/index.js"],"sourcesContent":["import React from 'react';\nimport {getOr} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport Range from '../../../atom/range';\nimport style from './style.css';\n\nconst QuestionRange = (props, legacyContext) => {\n const {title, minLabel, maxLabel, ...rangeProps} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const titleStyle = {\n color: defaultColor\n };\n\n return (\n <div className={style.wrapper}>\n <span\n style={titleStyle}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <Range {...rangeProps} />\n <div className={style.labelWrapper}>\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: minLabel}}\n />\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: maxLabel}}\n />\n </div>\n </div>\n );\n};\n\nQuestionRange.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQuestionRange.propTypes = {\n ...Range.propTypes,\n title: PropTypes.string,\n minLabel: PropTypes.string,\n maxLabel: PropTypes.string\n};\n\nexport default QuestionRange;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,aAAa,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EAC9C,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBC;EAAlB,IAA6CJ,KAAnD;EAAA,MAAqCK,UAArC,iCAAmDL,KAAnD;;EAEA,MAAMM,IAAI,GAAG,IAAAC,4BAAA,EAAmBN,aAAnB,CAAb;EACA,MAAMO,YAAY,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCF,IAAnC,CAArB;EAEA,MAAMG,UAAU,GAAG;IACjBC,KAAK,EAAEF;EADU,CAAnB;EAIA,oBACE;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,gBACE;IACE,KAAK,EAAEH,UADT;IAEE,SAAS,EAAE,IAAAI,mBAAA,EAAWF,cAAA,CAAMT,KAAjB,EAAwBS,cAAA,CAAMG,SAA9B,CAFb,CAGE;IAHF;IAIE,uBAAuB,EAAE;MAACC,MAAM,EAAEb;IAAT;EAJ3B,EADF,eAOE,6BAAC,cAAD,EAAWG,UAAX,CAPF,eAQE;IAAK,SAAS,EAAEM,cAAA,CAAMK;EAAtB,gBACE;IACE,SAAS,EAAE,IAAAH,mBAAA,EAAWF,cAAA,CAAMM,KAAjB,EAAwBN,cAAA,CAAMG,SAA9B,CADb,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACC,MAAM,EAAEZ;IAAT;EAH3B,EADF,eAME;IACE,SAAS,EAAE,IAAAU,mBAAA,EAAWF,cAAA,CAAMM,KAAjB,EAAwBN,cAAA,CAAMG,SAA9B,CADb,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACC,MAAM,EAAEX;IAAT;EAH3B,EANF,CARF,CADF;AAuBD,CAjCD;;AAmCAL,aAAa,CAACmB,YAAd,GAA6B;EAC3BZ,IAAI,EAAEa,iBAAA,CAASC,iBAAT,CAA2Bd;AADN,CAA7B;AAIAP,aAAa,CAACsB,SAAd,wDACKC,cAAA,CAAMD,SADX;EAEEnB,KAAK,EAAEqB,kBAAA,CAAUC,MAFnB;EAGErB,QAAQ,EAAEoB,kBAAA,CAAUC,MAHtB;EAIEpB,QAAQ,EAAEmB,kBAAA,CAAUC;AAJtB;eAOezB,a"}
@@ -6,16 +6,25 @@ declare function Template({ template, answers }: {
6
6
  declare namespace Template {
7
7
  namespace propTypes {
8
8
  const template: PropTypes.Requireable<string>;
9
- const answers: PropTypes.Requireable<(PropTypes.InferProps<{
9
+ const answers: PropTypes.Requireable<((PropTypes.InferPropsInner<Pick<{
10
10
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
11
11
  options: PropTypes.Requireable<(PropTypes.InferProps<{
12
12
  name: PropTypes.Validator<string>;
13
- value: PropTypes.Requireable<string | number>;
13
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
14
14
  selected: PropTypes.Requireable<boolean>;
15
15
  validOption: PropTypes.Requireable<boolean>;
16
16
  }> | null | undefined)[]>;
17
17
  theme: PropTypes.Requireable<string>;
18
- }> | null | undefined)[]>;
18
+ }, never>> & Partial<PropTypes.InferPropsInner<Pick<{
19
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
20
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
21
+ name: PropTypes.Validator<string>;
22
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
23
+ selected: PropTypes.Requireable<boolean>;
24
+ validOption: PropTypes.Requireable<boolean>;
25
+ }> | null | undefined)[]>;
26
+ theme: PropTypes.Requireable<string>;
27
+ }, "onChange" | "theme" | "options">>>) | null | undefined)[]>;
19
28
  }
20
29
  }
21
30
  import PropTypes from "prop-types";
@@ -19,9 +19,11 @@ var _freeText = _interopRequireDefault(require("../free-text"));
19
19
 
20
20
  var _style = _interopRequireDefault(require("./style.css"));
21
21
 
22
+ const _excluded = ["type"];
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
26
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
27
 
26
28
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
29
 
@@ -56,7 +58,7 @@ const Template = ({
56
58
  const {
57
59
  type: fieldType
58
60
  } = field,
59
- fieldProps = _objectWithoutPropertiesLoose(field, ["type"]);
61
+ fieldProps = _objectWithoutPropertiesLoose(field, _excluded);
60
62
 
61
63
  const fieldView = fieldType === 'text' ? /*#__PURE__*/_react.default.createElement(_freeText.default, _extends({}, fieldProps, {
62
64
  className: _style.default.text
@@ -76,7 +78,7 @@ const Template = ({
76
78
  }, templateCompose);
77
79
  };
78
80
 
79
- const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends(_extends({}, _dropDown.default.propTypes), {}, {
81
+ const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends({}, _dropDown.default.propTypes, {
80
82
  type: _propTypes.default.string
81
83
  }) : {};
82
84
  Template.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/template/index.js"],"names":["Template","template","answers","totalTemplate","templateCompose","convert","cap","part","key","type","style","textPart","__html","value","field","name","fieldType","fieldProps","fieldView","text","answerType","wrapper","TextPropTypes","DropDown","propTypes","PropTypes","string","arrayOf","oneOfType","shape"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWC,EAAAA;AAAX,CAAD,KAAyB;AACxC,QAAMC,aAAa,GAAG,kCAAoBF,QAApB,CAAtB;;AACA,QAAMG,eAAe,GAAG,cAAIC,OAAJ,CAAY;AAACC,IAAAA,GAAG,EAAE;AAAN,GAAZ,EAA0B,CAACC,IAAD,EAAOC,GAAP,KAAe;AAC/D,UAAMC,IAAI,GAAGF,IAAI,CAACE,IAAlB;;AACA,QAAIA,IAAI,KAAK,QAAb,EAAuB;AACrB,0BACE;AACE,QAAA,GAAG,EAAED,GADP;AAEE,QAAA,SAAS,EAAEE,eAAMC,QAFnB,CAGE;AAHF;AAIE,QAAA,uBAAuB,EAAE;AAACC,UAAAA,MAAM,EAAEL,IAAI,CAACM;AAAd;AAJ3B,QADF;AAQD;;AACD,QAAIJ,IAAI,KAAK,aAAb,EAA4B;AAC1B,YAAMK,KAAK,GAAG,oBAAK;AAACC,QAAAA,IAAI,EAAER,IAAI,CAACM;AAAZ,OAAL,EAAyBX,OAAzB,CAAd;AACA,UAAI,CAACY,KAAL,EAAY,OAAO,IAAP;;AACZ,YAAM;AAACL,QAAAA,IAAI,EAAEO;AAAP,UAAmCF,KAAzC;AAAA,YAA2BG,UAA3B,iCAAyCH,KAAzC;;AACA,YAAMI,SAAS,GACbF,SAAS,KAAK,MAAd,gBACE,6BAAC,iBAAD,eAAcC,UAAd;AAA0B,QAAA,SAAS,EAAEP,eAAMS;AAA3C,SADF,gBAGE,6BAAC,iBAAD,eAAcF,UAAd;AAA0B,QAAA,KAAK,EAAC;AAAhC,SAJJ;AAOA,0BACE;AAAK,QAAA,SAAS,EAAEP,eAAMU,UAAtB;AAAkC,QAAA,GAAG,EAAEb,IAAI,CAACM;AAA5C,SACGK,SADH,CADF;AAKD;AACF,GA7BuB,EA6BrBf,aA7BqB,CAAxB;;AA+BA,sBACE;AAAK,iBAAU,kBAAf;AAAkC,IAAA,SAAS,EAAEO,eAAMW;AAAnD,KACGjB,eADH,CADF;AAKD,CAtCD;;AAwCA,MAAMkB,aAAN,iEACKC,kBAASC,SADd;AAEEf,EAAAA,IAAI,EAAEgB,mBAAUC;AAFlB;AAKA1B,QAAQ,CAACwB,SAAT,2CAAqB;AACnBvB,EAAAA,QAAQ,EAAEwB,mBAAUC,MADD;AAEnBxB,EAAAA,OAAO,EAAEuB,mBAAUE,OAAV,CACPF,mBAAUG,SAAV,CAAoB,CAACH,mBAAUI,KAAV,CAAgBN,kBAASC,SAAzB,CAAD,EAAsCC,mBAAUI,KAAV,CAAgBP,aAAhB,CAAtC,CAApB,CADO;AAFU,CAArB;eAOetB,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n className={style.textPart}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const {type: fieldType, ...fieldProps} = field;\n const fieldView =\n fieldType === 'text' ? (\n <FreeText {...fieldProps} className={style.text} />\n ) : (\n <DropDown {...fieldProps} theme=\"player\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <div data-name=\"template-wrapper\" className={style.wrapper}>\n {templateCompose}\n </div>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)])\n )\n};\n\nexport default Template;\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["Template","template","answers","totalTemplate","parseTemplateString","templateCompose","convert","cap","part","key","type","style","textPart","__html","value","field","name","fieldType","fieldProps","fieldView","text","answerType","wrapper","TextPropTypes","DropDown","propTypes","PropTypes","string","arrayOf","oneOfType","shape"],"sources":["../../../../src/molecule/questions/template/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n className={style.textPart}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const {type: fieldType, ...fieldProps} = field;\n const fieldView =\n fieldType === 'text' ? (\n <FreeText {...fieldProps} className={style.text} />\n ) : (\n <DropDown {...fieldProps} theme=\"player\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <div data-name=\"template-wrapper\" className={style.wrapper}>\n {templateCompose}\n </div>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)])\n )\n};\n\nexport default Template;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAAC;EAACC,QAAD;EAAWC;AAAX,CAAD,KAAyB;EACxC,MAAMC,aAAa,GAAG,IAAAC,4BAAA,EAAoBH,QAApB,CAAtB;;EACA,MAAMI,eAAe,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,IAAD,EAAOC,GAAP,KAAe;IAC/D,MAAMC,IAAI,GAAGF,IAAI,CAACE,IAAlB;;IACA,IAAIA,IAAI,KAAK,QAAb,EAAuB;MACrB,oBACE;QACE,GAAG,EAAED,GADP;QAEE,SAAS,EAAEE,cAAA,CAAMC,QAFnB,CAGE;QAHF;QAIE,uBAAuB,EAAE;UAACC,MAAM,EAAEL,IAAI,CAACM;QAAd;MAJ3B,EADF;IAQD;;IACD,IAAIJ,IAAI,KAAK,aAAb,EAA4B;MAC1B,MAAMK,KAAK,GAAG,oBAAK;QAACC,IAAI,EAAER,IAAI,CAACM;MAAZ,CAAL,EAAyBZ,OAAzB,CAAd;MACA,IAAI,CAACa,KAAL,EAAY,OAAO,IAAP;;MACZ,MAAM;QAACL,IAAI,EAAEO;MAAP,IAAmCF,KAAzC;MAAA,MAA2BG,UAA3B,iCAAyCH,KAAzC;;MACA,MAAMI,SAAS,GACbF,SAAS,KAAK,MAAd,gBACE,6BAAC,iBAAD,eAAcC,UAAd;QAA0B,SAAS,EAAEP,cAAA,CAAMS;MAA3C,GADF,gBAGE,6BAAC,iBAAD,eAAcF,UAAd;QAA0B,KAAK,EAAC;MAAhC,GAJJ;MAOA,oBACE;QAAK,SAAS,EAAEP,cAAA,CAAMU,UAAtB;QAAkC,GAAG,EAAEb,IAAI,CAACM;MAA5C,GACGK,SADH,CADF;IAKD;EACF,CA7BuB,EA6BrBhB,aA7BqB,CAAxB;;EA+BA,oBACE;IAAK,aAAU,kBAAf;IAAkC,SAAS,EAAEQ,cAAA,CAAMW;EAAnD,GACGjB,eADH,CADF;AAKD,CAtCD;;AAwCA,MAAMkB,aAAN,wDACKC,iBAAA,CAASC,SADd;EAEEf,IAAI,EAAEgB,kBAAA,CAAUC;AAFlB;AAKA3B,QAAQ,CAACyB,SAAT,2CAAqB;EACnBxB,QAAQ,EAAEyB,kBAAA,CAAUC,MADD;EAEnBzB,OAAO,EAAEwB,kBAAA,CAAUE,OAAV,CACPF,kBAAA,CAAUG,SAAV,CAAoB,CAACH,kBAAA,CAAUI,KAAV,CAAgBN,iBAAA,CAASC,SAAzB,CAAD,EAAsCC,kBAAA,CAAUI,KAAV,CAAgBP,aAAhB,CAAtC,CAApB,CADO;AAFU,CAArB;eAOevB,Q"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"types.js"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/molecule/questions/types.ts"],"sourcesContent":["import {ChoiceItem} from '../../atom/select-modal/index.native';\n\ntype Url = string;\n\ntype VideoMimeType =\n | 'application/kontiki'\n | 'application/jwplayer'\n | 'application/youtube'\n | 'application/omniPlayer'\n | 'application/vimeo';\n\ntype ResourceMimeType =\n | 'video/mp4'\n | 'audio/acc'\n | 'image/jpeg'\n | 'image/png'\n | 'application/pdf'\n | VideoMimeType;\n\nexport type Source = {\n _id?: string;\n mimeType?: ResourceMimeType;\n url: Url;\n videoId?: string;\n};\n\nexport type MediaType = 'img' | 'audio' | 'video' | 'pdf';\n\nexport type Media = {\n type?: MediaType;\n description?: string;\n mimeType?: ResourceMimeType;\n _id?: string;\n mediaUrl?: Url;\n url?: Url;\n subtitles?: Array<string>;\n posters?: Array<Url>;\n src?: Array<Source>;\n poster?: string;\n videoId?: string;\n onClick?: () => void;\n onPlay?: () => void;\n onPause?: () => void;\n onResume?: () => void;\n onEnded?: () => void;\n};\n\nexport type QuestionType = 'qcm' | 'qcmGraphic' | 'slider' | 'qcmDrag' | 'basic' | 'template';\n\ntype ChoiceBase = {\n _id: string;\n value?: string;\n name?: string;\n label?: string;\n};\n\nexport type SelectableChoice = {\n _id: string;\n label: string;\n selected: boolean;\n onPress: (value?: string) => void;\n media?: Media;\n};\n\nexport type TemplateTextChoice = {\n type: 'text';\n _id: string;\n name: string;\n value: string;\n label: string;\n selected: boolean;\n};\n\nexport type TemplateListOfChoices = {\n type: 'select';\n _id: string;\n name: string;\n value: string;\n label: string;\n items: Array<ChoiceItem>;\n};\n\nexport type Choice = ChoiceBase | SelectableChoice | TemplateListOfChoices | TemplateTextChoice;\n"],"mappings":""}