@coorpacademy/components 10.23.8 → 10.24.1

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 (1015) hide show
  1. package/README.md +3 -0
  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.js +1 -1
  20. package/es/atom/choice/index.native.js.map +1 -1
  21. package/es/atom/clue/index.js +2 -6
  22. package/es/atom/clue/index.js.map +1 -1
  23. package/es/atom/content-badge/index.js.map +1 -1
  24. package/es/atom/cta/index.js +2 -6
  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 +1 -1
  31. package/es/atom/gradient/index.native.js.map +1 -1
  32. package/es/atom/header-back-button/index.native.js.map +1 -1
  33. package/es/atom/header-back-icon/index.native.js.map +1 -1
  34. package/es/atom/html/index.native.js +7 -7
  35. package/es/atom/html/index.native.js.map +1 -1
  36. package/es/atom/image-background/index.native.js +7 -4
  37. package/es/atom/image-background/index.native.js.map +1 -1
  38. package/es/atom/image-upload/index.js +2 -2
  39. package/es/atom/image-upload/index.js.map +1 -1
  40. package/es/atom/input-checkbox/index.js.map +1 -1
  41. package/es/atom/input-color/index.js.map +1 -1
  42. package/es/atom/input-doublestep/index.js +1 -1
  43. package/es/atom/input-doublestep/index.js.map +1 -1
  44. package/es/atom/input-html/index.js.map +1 -1
  45. package/es/atom/input-html/input-preview.js.map +1 -1
  46. package/es/atom/input-readonly/index.js.map +1 -1
  47. package/es/atom/input-search/index.js.map +1 -1
  48. package/es/atom/input-switch/index.js.map +1 -1
  49. package/es/atom/input-text/index.js.map +1 -1
  50. package/es/atom/input-text-with-title/index.js +2 -2
  51. package/es/atom/input-text-with-title/index.js.map +1 -1
  52. package/es/atom/input-textarea/index.js.map +1 -1
  53. package/es/atom/label/index.js.map +1 -1
  54. package/es/atom/life/index.js.map +1 -1
  55. package/es/atom/link/index.js +12 -14
  56. package/es/atom/link/index.js.map +1 -1
  57. package/es/atom/loader/index.js.map +1 -1
  58. package/es/atom/lottie-wrapper/index.js +4 -4
  59. package/es/atom/lottie-wrapper/index.js.map +1 -1
  60. package/es/atom/lottie-wrapper/prop-types.js.map +1 -1
  61. package/es/atom/notification/index.js.map +1 -1
  62. package/es/atom/picture/index.js +1 -1
  63. package/es/atom/picture/index.js.map +1 -1
  64. package/es/atom/picture-background/index.js.map +1 -1
  65. package/es/atom/promo-code/index.js.map +1 -1
  66. package/es/atom/provider/index.js +2 -6
  67. package/es/atom/provider/index.js.map +1 -1
  68. package/es/atom/provider/web-context.js +2 -2
  69. package/es/atom/provider/web-context.js.map +1 -1
  70. package/es/atom/radio-group/index.js +1 -1
  71. package/es/atom/radio-group/index.js.map +1 -1
  72. package/es/atom/radio-group/item.js.map +1 -1
  73. package/es/atom/range/handle.js.map +1 -1
  74. package/es/atom/range/index.js +2 -2
  75. package/es/atom/range/index.js.map +1 -1
  76. package/es/atom/resource-miniature/index.js.map +1 -1
  77. package/es/atom/review-background/index.js.map +1 -1
  78. package/es/atom/review-background/prop-types.js.map +1 -1
  79. package/es/atom/review-header-step-item/index.js +26 -28
  80. package/es/atom/review-header-step-item/index.js.map +1 -1
  81. package/es/atom/review-header-step-item/index.native.js +91 -0
  82. package/es/atom/review-header-step-item/index.native.js.map +1 -0
  83. package/es/atom/review-header-step-item/types.js +8 -0
  84. package/es/atom/review-header-step-item/types.js.map +1 -0
  85. package/es/atom/review-presentation/index.js.map +1 -1
  86. package/es/atom/review-presentation/prop-types.js.map +1 -1
  87. package/es/atom/select/index.js +1 -1
  88. package/es/atom/select/index.js.map +1 -1
  89. package/es/atom/select-modal/index.native.js +2 -2
  90. package/es/atom/select-modal/index.native.js.map +1 -1
  91. package/es/atom/slide/index.js +1 -1
  92. package/es/atom/slide/index.js.map +1 -1
  93. package/es/atom/social-link/index.js.map +1 -1
  94. package/es/atom/space/index.native.js.map +1 -1
  95. package/es/atom/spinner/index.js.map +1 -1
  96. package/es/atom/tab/index.js.map +1 -1
  97. package/es/atom/tab-content/index.js.map +1 -1
  98. package/es/atom/tag/index.js.map +1 -1
  99. package/es/atom/text/index.native.js +1 -1
  100. package/es/atom/text/index.native.js.map +1 -1
  101. package/es/atom/title/index.js.map +1 -1
  102. package/es/atom/video-upload/index.js +2 -2
  103. package/es/atom/video-upload/index.js.map +1 -1
  104. package/es/atom/wizard-steps/index.js.map +1 -1
  105. package/es/hoc/animation/index.js.map +1 -1
  106. package/es/hoc/animation-scheduler/index.js +3 -3
  107. package/es/hoc/animation-scheduler/index.js.map +1 -1
  108. package/es/hoc/modal/index.native.js.map +1 -1
  109. package/es/hoc/modal/select/index.native.js.map +1 -1
  110. package/es/hoc/modal/select-item/index.native.js.map +1 -1
  111. package/es/hoc/swapper/index.js +4 -2
  112. package/es/hoc/swapper/index.js.map +1 -1
  113. package/es/hoc/touchable/index.native.js +2 -2
  114. package/es/hoc/touchable/index.native.js.map +1 -1
  115. package/es/hoc/transition/index.js +1 -1
  116. package/es/hoc/transition/index.js.map +1 -1
  117. package/es/index.js.map +1 -1
  118. package/es/molecule/add-to-my-list/index.js +4 -3
  119. package/es/molecule/add-to-my-list/index.js.map +1 -1
  120. package/es/molecule/answer/index.js +3 -2
  121. package/es/molecule/answer/index.js.map +1 -1
  122. package/es/molecule/answer/index.native.js.map +1 -1
  123. package/es/molecule/answer/prop-types.js +2 -2
  124. package/es/molecule/answer/prop-types.js.map +1 -1
  125. package/es/molecule/audio/index.js +4 -8
  126. package/es/molecule/audio/index.js.map +1 -1
  127. package/es/molecule/banner/index.js.map +1 -1
  128. package/es/molecule/battle-request/index.js.map +1 -1
  129. package/es/molecule/brand-card/description.js.map +1 -1
  130. package/es/molecule/brand-card/index.js.map +1 -1
  131. package/es/molecule/brand-card-create/index.js.map +1 -1
  132. package/es/molecule/brand-create-form/index.js.map +1 -1
  133. package/es/molecule/brand-download-box/index.js.map +1 -1
  134. package/es/molecule/brand-form-group/index.js +20 -20
  135. package/es/molecule/brand-form-group/index.js.map +1 -1
  136. package/es/molecule/brand-logo/index.native.js +2 -2
  137. package/es/molecule/brand-logo/index.native.js.map +1 -1
  138. package/es/molecule/brand-tabs/index.js +22 -8
  139. package/es/molecule/brand-tabs/index.js.map +1 -1
  140. package/es/molecule/brand-upload-box/index.js.map +1 -1
  141. package/es/molecule/breadcrumbs/index.js.map +1 -1
  142. package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
  143. package/es/molecule/card/customer.js.map +1 -1
  144. package/es/molecule/card/favorite.js +2 -6
  145. package/es/molecule/card/favorite.js.map +1 -1
  146. package/es/molecule/card/index.js +2 -2
  147. package/es/molecule/card/index.js.map +1 -1
  148. package/es/molecule/card/notification.js.map +1 -1
  149. package/es/molecule/card/selectable.js.map +1 -1
  150. package/es/molecule/card-content/index.js.map +1 -1
  151. package/es/molecule/card-with-button/index.js.map +1 -1
  152. package/es/molecule/cm-popin/index.js +5 -5
  153. package/es/molecule/cm-popin/index.js.map +1 -1
  154. package/es/molecule/cookie-banner/index.js.map +1 -1
  155. package/es/molecule/coorp-manager-roles/index.js +2 -2
  156. package/es/molecule/coorp-manager-roles/index.js.map +1 -1
  157. package/es/molecule/course-section/index.js.map +1 -1
  158. package/es/molecule/course-sections/index.js +2 -2
  159. package/es/molecule/course-sections/index.js.map +1 -1
  160. package/es/molecule/dashboard/battle-request-list/index.js +1 -1
  161. package/es/molecule/dashboard/battle-request-list/index.js.map +1 -1
  162. package/es/molecule/dashboard/cards-list/index.js +3 -6
  163. package/es/molecule/dashboard/cards-list/index.js.map +1 -1
  164. package/es/molecule/dashboard/news-list/index.js +1 -1
  165. package/es/molecule/dashboard/news-list/index.js.map +1 -1
  166. package/es/molecule/dashboard/review-banner/index.js +3 -3
  167. package/es/molecule/dashboard/review-banner/index.js.map +1 -1
  168. package/es/molecule/dashboard/start-battle/index.js +1 -1
  169. package/es/molecule/dashboard/start-battle/index.js.map +1 -1
  170. package/es/molecule/discipline-cta/index.js.map +1 -1
  171. package/es/molecule/discipline-header/index.js +2 -5
  172. package/es/molecule/discipline-header/index.js.map +1 -1
  173. package/es/molecule/discipline-partners/index.js +1 -1
  174. package/es/molecule/discipline-partners/index.js.map +1 -1
  175. package/es/molecule/discipline-scope/index.js.map +1 -1
  176. package/es/molecule/drag-and-drop/index.js +2 -2
  177. package/es/molecule/drag-and-drop/index.js.map +1 -1
  178. package/es/molecule/drag-and-drop/overlay.js.map +1 -1
  179. package/es/molecule/drag-and-drop/placeholder.js.map +1 -1
  180. package/es/molecule/drag-and-drop/upload-report.js +45 -23
  181. package/es/molecule/drag-and-drop/upload-report.js.map +1 -1
  182. package/es/molecule/drag-and-drop-wrapper/index.js.map +1 -1
  183. package/es/molecule/draggable/index.js.map +1 -1
  184. package/es/molecule/draggable-list/index.js +1 -1
  185. package/es/molecule/draggable-list/index.js.map +1 -1
  186. package/es/molecule/external-content-button/index.js +4 -7
  187. package/es/molecule/external-content-button/index.js.map +1 -1
  188. package/es/molecule/external-content-viewer/index.js.map +1 -1
  189. package/es/molecule/feedback/index.js +4 -4
  190. package/es/molecule/feedback/index.js.map +1 -1
  191. package/es/molecule/filters/filters-wrapper.js +1 -1
  192. package/es/molecule/filters/filters-wrapper.js.map +1 -1
  193. package/es/molecule/filters/index.js +2 -6
  194. package/es/molecule/filters/index.js.map +1 -1
  195. package/es/molecule/forum/forum-comment/index.js.map +1 -1
  196. package/es/molecule/forum/forum-post/index.js.map +1 -1
  197. package/es/molecule/forum/forum-thread/index.js +1 -1
  198. package/es/molecule/forum/forum-thread/index.js.map +1 -1
  199. package/es/molecule/forum/post-conditions.js.map +1 -1
  200. package/es/molecule/go1-banner/index.js.map +1 -1
  201. package/es/molecule/hero/index.js.map +1 -1
  202. package/es/molecule/input-text-with-titled-checkbox/index.js.map +1 -1
  203. package/es/molecule/list-badges/index.js.map +1 -1
  204. package/es/molecule/login-alert/index.js.map +1 -1
  205. package/es/molecule/menu-list/index.js +2 -1
  206. package/es/molecule/menu-list/index.js.map +1 -1
  207. package/es/molecule/message-popin/index.js.map +1 -1
  208. package/es/molecule/modal/index.js.map +1 -1
  209. package/es/molecule/module-bubble/index.js.map +1 -1
  210. package/es/molecule/module-card/index.js +1 -1
  211. package/es/molecule/module-card/index.js.map +1 -1
  212. package/es/molecule/news/index.js +1 -1
  213. package/es/molecule/news/index.js.map +1 -1
  214. package/es/molecule/notification-banner/index.js.map +1 -1
  215. package/es/molecule/pagination/index.js.map +1 -1
  216. package/es/molecule/payment-form/index.js +2 -5
  217. package/es/molecule/payment-form/index.js.map +1 -1
  218. package/es/molecule/pdf/index.js.map +1 -1
  219. package/es/molecule/popin/index.js +2 -2
  220. package/es/molecule/popin/index.js.map +1 -1
  221. package/es/molecule/product-card/index.js.map +1 -1
  222. package/es/molecule/progress-bar/index.js +2 -2
  223. package/es/molecule/progress-bar/index.js.map +1 -1
  224. package/es/molecule/questions/drop-down/index.js.map +1 -1
  225. package/es/molecule/questions/free-text/index.js +3 -3
  226. package/es/molecule/questions/free-text/index.js.map +1 -1
  227. package/es/molecule/questions/free-text/index.native.js +12 -6
  228. package/es/molecule/questions/free-text/index.native.js.map +1 -1
  229. package/es/molecule/questions/mobile/draggable/index.native.js.map +1 -1
  230. package/es/molecule/questions/mobile/slider/index.native.js +2 -2
  231. package/es/molecule/questions/mobile/slider/index.native.js.map +1 -1
  232. package/es/molecule/questions/mobile/switch/index.native.js +2 -6
  233. package/es/molecule/questions/mobile/switch/index.native.js.map +1 -1
  234. package/es/molecule/questions/mobile/template/index.native.js +42 -68
  235. package/es/molecule/questions/mobile/template/index.native.js.map +1 -1
  236. package/es/molecule/questions/qcm/index.js +1 -1
  237. package/es/molecule/questions/qcm/index.js.map +1 -1
  238. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  239. package/es/molecule/questions/qcm-graphic/index.js +1 -1
  240. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  241. package/es/molecule/questions/question-range/index.js +4 -3
  242. package/es/molecule/questions/question-range/index.js.map +1 -1
  243. package/es/molecule/questions/template/index.js +4 -3
  244. package/es/molecule/questions/template/index.js.map +1 -1
  245. package/es/molecule/questions/types.js.map +1 -1
  246. package/es/molecule/quick-access-card/index.js.map +1 -1
  247. package/es/molecule/quick-access-cards-group/index.js.map +1 -1
  248. package/es/molecule/resource-player/index.js +3 -2
  249. package/es/molecule/resource-player/index.js.map +1 -1
  250. package/es/molecule/review-card-congrats/index.js +1 -1
  251. package/es/molecule/review-card-congrats/index.js.map +1 -1
  252. package/es/molecule/review-card-congrats/prop-types.js.map +1 -1
  253. package/es/molecule/review-correction-popin/index.js +3 -3
  254. package/es/molecule/review-correction-popin/index.js.map +1 -1
  255. package/es/molecule/review-correction-popin/prop-types.js.map +1 -1
  256. package/es/molecule/review-header-steps/index.js +1 -1
  257. package/es/molecule/review-header-steps/index.js.map +1 -1
  258. package/es/molecule/review-header-steps/prop-types.js +1 -1
  259. package/es/molecule/review-header-steps/prop-types.js.map +1 -1
  260. package/es/molecule/scope-content/index.js +1 -1
  261. package/es/molecule/scope-content/index.js.map +1 -1
  262. package/es/molecule/scope-tabs/index.js +1 -1
  263. package/es/molecule/scope-tabs/index.js.map +1 -1
  264. package/es/molecule/search-form/index.js +1 -1
  265. package/es/molecule/search-form/index.js.map +1 -1
  266. package/es/molecule/select-multiple/index.js +4 -4
  267. package/es/molecule/select-multiple/index.js.map +1 -1
  268. package/es/molecule/setup-cohort-item/index.js +1 -1
  269. package/es/molecule/setup-cohort-item/index.js.map +1 -1
  270. package/es/molecule/setup-section/index.js +2 -2
  271. package/es/molecule/setup-section/index.js.map +1 -1
  272. package/es/molecule/setup-sections/index.js.map +1 -1
  273. package/es/molecule/setup-slide/index.js +9 -9
  274. package/es/molecule/setup-slide/index.js.map +1 -1
  275. package/es/molecule/setup-slider/index.js +1 -1
  276. package/es/molecule/setup-slider/index.js.map +1 -1
  277. package/es/molecule/share/index.js +1 -1
  278. package/es/molecule/share/index.js.map +1 -1
  279. package/es/molecule/skill-card/index.js.map +1 -1
  280. package/es/molecule/skill-card/prop-types.js.map +1 -1
  281. package/es/molecule/ssmenu-list/index.js.map +1 -1
  282. package/es/molecule/subscription-freemium/index.js.map +1 -1
  283. package/es/molecule/subscription-premium/index.js.map +1 -1
  284. package/es/molecule/table/index.js.map +1 -1
  285. package/es/molecule/teams-popin/index.js.map +1 -1
  286. package/es/molecule/theme-image/index.js.map +1 -1
  287. package/es/molecule/title-and-checkbox-wrapper/index.js +3 -3
  288. package/es/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
  289. package/es/molecule/titled-checkbox/index.js.map +1 -1
  290. package/es/molecule/unsubscribe/index.js.map +1 -1
  291. package/es/molecule/vertical-tabs/index.js.map +1 -1
  292. package/es/molecule/video-iframe/index.js +4 -7
  293. package/es/molecule/video-iframe/index.js.map +1 -1
  294. package/es/molecule/video-player/index.js +8 -8
  295. package/es/molecule/video-player/index.js.map +1 -1
  296. package/es/molecule/video-player/jwplayer-prop-types.js +1 -1
  297. package/es/molecule/video-player/jwplayer-prop-types.js.map +1 -1
  298. package/es/molecule/video-player/jwplayer.js +3 -3
  299. package/es/molecule/video-player/jwplayer.js.map +1 -1
  300. package/es/molecule/video-player/prop-types.js +1 -1
  301. package/es/molecule/video-player/prop-types.js.map +1 -1
  302. package/es/molecule/video-player/vimeo.js +6 -10
  303. package/es/molecule/video-player/vimeo.js.map +1 -1
  304. package/es/molecule/wizard-summary/index.js.map +1 -1
  305. package/es/organism/accordion/container/index.js +1 -1
  306. package/es/organism/accordion/container/index.js.map +1 -1
  307. package/es/organism/accordion/coorp-manager/index.js +2 -2
  308. package/es/organism/accordion/coorp-manager/index.js.map +1 -1
  309. package/es/organism/accordion/coorp-manager/part/index.js +1 -1
  310. package/es/organism/accordion/coorp-manager/part/index.js.map +1 -1
  311. package/es/organism/accordion/part/index.js.map +1 -1
  312. package/es/organism/accordion/toggler/index.js +2 -2
  313. package/es/organism/accordion/toggler/index.js.map +1 -1
  314. package/es/organism/brand-analytics/analytics-popin.js.map +1 -1
  315. package/es/organism/brand-analytics/index.js.map +1 -1
  316. package/es/organism/brand-dashboard/index.js +1 -1
  317. package/es/organism/brand-dashboard/index.js.map +1 -1
  318. package/es/organism/brand-form/index.js.map +1 -1
  319. package/es/organism/brand-table/index.js.map +1 -1
  320. package/es/organism/brand-upload/index.js +1 -1
  321. package/es/organism/brand-upload/index.js.map +1 -1
  322. package/es/organism/cards-grid/index.js.map +1 -1
  323. package/es/organism/cart/index.js.map +1 -1
  324. package/es/organism/content-translation/index.js +3 -3
  325. package/es/organism/content-translation/index.js.map +1 -1
  326. package/es/organism/course-selection/index.js +1 -1
  327. package/es/organism/course-selection/index.js.map +1 -1
  328. package/es/organism/discussion/index.js +1 -1
  329. package/es/organism/discussion/index.js.map +1 -1
  330. package/es/organism/get-the-app/index.js +3 -3
  331. package/es/organism/get-the-app/index.js.map +1 -1
  332. package/es/organism/grid-list/index.js.map +1 -1
  333. package/es/organism/header/index.js.map +1 -1
  334. package/es/organism/header-v2/index.native.js.map +1 -1
  335. package/es/organism/hero/index.js.map +1 -1
  336. package/es/organism/list-item/index.js.map +1 -1
  337. package/es/organism/list-items/index.js.map +1 -1
  338. package/es/organism/mobile-navigation/index.native.js.map +1 -1
  339. package/es/organism/mooc/image-slider/index.js +1 -1
  340. package/es/organism/mooc/image-slider/index.js.map +1 -1
  341. package/es/organism/mooc-footer/index.js.map +1 -1
  342. package/es/organism/mooc-header/index.js +3 -6
  343. package/es/organism/mooc-header/index.js.map +1 -1
  344. package/es/organism/popin/index.js.map +1 -1
  345. package/es/organism/resource-browser/index.js +1 -1
  346. package/es/organism/resource-browser/index.js.map +1 -1
  347. package/es/organism/review-congrats/index.js +1 -1
  348. package/es/organism/review-congrats/index.js.map +1 -1
  349. package/es/organism/review-congrats/prop-types.js.map +1 -1
  350. package/es/organism/review-header/index.js +1 -1
  351. package/es/organism/review-header/index.js.map +1 -1
  352. package/es/organism/review-header/index.native.js +29 -0
  353. package/es/organism/review-header/index.native.js.map +1 -0
  354. package/es/organism/review-header/{prop-types.js → types.js} +3 -2
  355. package/es/organism/review-header/types.js.map +1 -0
  356. package/es/organism/review-skills/index.js.map +1 -1
  357. package/es/organism/review-skills/prop-types.js +3 -3
  358. package/es/organism/review-skills/prop-types.js.map +1 -1
  359. package/es/organism/review-slide/index.js +1 -1
  360. package/es/organism/review-slide/index.js.map +1 -1
  361. package/es/organism/review-slide/index.native.js +3 -8
  362. package/es/organism/review-slide/index.native.js.map +1 -1
  363. package/es/organism/review-slide/prop-types.js.map +1 -1
  364. package/es/organism/review-stacked-slides/index.js +3 -6
  365. package/es/organism/review-stacked-slides/index.js.map +1 -1
  366. package/es/organism/review-stacked-slides/index.native.js +14 -8
  367. package/es/organism/review-stacked-slides/index.native.js.map +1 -1
  368. package/es/organism/review-stacked-slides/prop-types.js +3 -3
  369. package/es/organism/review-stacked-slides/prop-types.js.map +1 -1
  370. package/es/organism/rewards-form/index.js +3 -1
  371. package/es/organism/rewards-form/index.js.map +1 -1
  372. package/es/organism/search-and-chips-results/index.js +1 -1
  373. package/es/organism/search-and-chips-results/index.js.map +1 -1
  374. package/es/organism/settings/index.js +4 -3
  375. package/es/organism/settings/index.js.map +1 -1
  376. package/es/organism/setup-header/index.js.map +1 -1
  377. package/es/organism/sidebar/index.js +12 -11
  378. package/es/organism/sidebar/index.js.map +1 -1
  379. package/es/organism/slider/index.js.map +1 -1
  380. package/es/organism/user-preferences/index.js +4 -3
  381. package/es/organism/user-preferences/index.js.map +1 -1
  382. package/es/organism/wizard-contents/index.js +8 -8
  383. package/es/organism/wizard-contents/index.js.map +1 -1
  384. package/es/template/activity/engine-stars.js +4 -8
  385. package/es/template/activity/engine-stars.js.map +1 -1
  386. package/es/template/activity/index.js +8 -11
  387. package/es/template/activity/index.js.map +1 -1
  388. package/es/template/activity/progression-item.js.map +1 -1
  389. package/es/template/activity/stars-summary.js +3 -6
  390. package/es/template/activity/stars-summary.js.map +1 -1
  391. package/es/template/app-player/loading/index.js.map +1 -1
  392. package/es/template/app-player/player/index.js +1 -1
  393. package/es/template/app-player/player/index.js.map +1 -1
  394. package/es/template/app-player/player/slides/footer/index.js +8 -11
  395. package/es/template/app-player/player/slides/footer/index.js.map +1 -1
  396. package/es/template/app-player/player/slides/header/index.js.map +1 -1
  397. package/es/template/app-player/player/slides/header/learner.js +1 -1
  398. package/es/template/app-player/player/slides/header/learner.js.map +1 -1
  399. package/es/template/app-player/player/slides/header/lives.js.map +1 -1
  400. package/es/template/app-player/player/slides/header/microlearning.js.map +1 -1
  401. package/es/template/app-player/player/slides/index.js +15 -12
  402. package/es/template/app-player/player/slides/index.js.map +1 -1
  403. package/es/template/app-player/popin-correction/index.js +6 -8
  404. package/es/template/app-player/popin-correction/index.js.map +1 -1
  405. package/es/template/app-player/popin-end/index.js +1 -1
  406. package/es/template/app-player/popin-end/index.js.map +1 -1
  407. package/es/template/app-player/popin-end/summary.js +16 -13
  408. package/es/template/app-player/popin-end/summary.js.map +1 -1
  409. package/es/template/app-player/popin-header/index.js +5 -4
  410. package/es/template/app-player/popin-header/index.js.map +1 -1
  411. package/es/template/app-player/popin-no-access/index.js.map +1 -1
  412. package/es/template/app-review/demo-ts/index.js.map +1 -1
  413. package/es/template/app-review/demo-ts/index.native.js.map +1 -1
  414. package/es/template/app-review/demo-ts/typings.js.map +1 -1
  415. package/es/template/app-review/index.js +5 -3
  416. package/es/template/app-review/index.js.map +1 -1
  417. package/es/template/app-review/index.native.js +5 -3
  418. package/es/template/app-review/index.native.js.map +1 -1
  419. package/es/template/app-review/onboarding/index.js.map +1 -1
  420. package/es/template/app-review/onboarding/index.native.js.map +1 -1
  421. package/es/template/app-review/player/index.js +2 -2
  422. package/es/template/app-review/player/index.js.map +1 -1
  423. package/es/template/app-review/player/index.native.js +7 -15
  424. package/es/template/app-review/player/index.native.js.map +1 -1
  425. package/es/template/app-review/player/prop-types.js +4 -3
  426. package/es/template/app-review/player/prop-types.js.map +1 -1
  427. package/es/template/app-review/prop-types.js +1 -1
  428. package/es/template/app-review/prop-types.js.map +1 -1
  429. package/es/template/app-review/skills/index.js.map +1 -1
  430. package/es/template/app-review/skills/index.native.js.map +1 -1
  431. package/es/template/app-review/skills/stories.js.map +1 -1
  432. package/es/template/app-review/template-context.js +2 -2
  433. package/es/template/app-review/template-context.js.map +1 -1
  434. package/es/template/back-office/brand-create/index.js.map +1 -1
  435. package/es/template/back-office/brand-list/index.js +4 -2
  436. package/es/template/back-office/brand-list/index.js.map +1 -1
  437. package/es/template/back-office/brand-update/index.js +9 -9
  438. package/es/template/back-office/brand-update/index.js.map +1 -1
  439. package/es/template/back-office/dashboard-preview/dashboard-popin.js.map +1 -1
  440. package/es/template/back-office/dashboard-preview/index.js.map +1 -1
  441. package/es/template/back-office/layout/index.js.map +1 -1
  442. package/es/template/battle-requests/index.js +2 -4
  443. package/es/template/battle-requests/index.js.map +1 -1
  444. package/es/template/cockpit/jw-uploader/index.js +2 -2
  445. package/es/template/cockpit/jw-uploader/index.js.map +1 -1
  446. package/es/template/common/authors/index.js +2 -6
  447. package/es/template/common/authors/index.js.map +1 -1
  448. package/es/template/common/coorp-header/content.js.map +1 -1
  449. package/es/template/common/coorp-header/index.js.map +1 -1
  450. package/es/template/common/dashboard/index.js +1 -1
  451. package/es/template/common/dashboard/index.js.map +1 -1
  452. package/es/template/common/discipline/index.js +1 -1
  453. package/es/template/common/discipline/index.js.map +1 -1
  454. package/es/template/common/search-page/index.js +1 -1
  455. package/es/template/common/search-page/index.js.map +1 -1
  456. package/es/template/external-course/index.js +4 -8
  457. package/es/template/external-course/index.js.map +1 -1
  458. package/es/template/review-dashboard-skills/index.js.map +1 -1
  459. package/es/template/teams-dashboard/index.js +1 -1
  460. package/es/template/teams-dashboard/index.js.map +1 -1
  461. package/es/types/translations.js.map +1 -1
  462. package/es/util/bubbling.js.map +1 -1
  463. package/es/util/build-query-string.js.map +1 -1
  464. package/es/util/button-icons.js.map +1 -1
  465. package/es/util/closest-step.js.map +1 -1
  466. package/es/util/constants.js.map +1 -1
  467. package/es/util/external-content.js.map +1 -1
  468. package/es/util/get-class-state.js.map +1 -1
  469. package/es/util/get-clean-uri.js.map +1 -1
  470. package/es/util/get-resized-image.js +3 -3
  471. package/es/util/get-resized-image.js.map +1 -1
  472. package/es/util/get-shadow-box-color-from-primary.js.map +1 -1
  473. package/es/util/image.js.map +1 -1
  474. package/es/util/navigation.js.map +1 -1
  475. package/es/util/parse-template-string.js.map +1 -1
  476. package/es/util/proptypes.js.map +1 -1
  477. package/es/util/render-with-context.js +7 -4
  478. package/es/util/render-with-context.js.map +1 -1
  479. package/es/util/shallow-compare.js.map +1 -1
  480. package/es/variables/analytics.js.map +1 -1
  481. package/es/variables/brand.native.js.map +1 -1
  482. package/es/variables/colors.js +6 -0
  483. package/es/variables/colors.js.map +1 -0
  484. package/es/variables/shadow.js.map +1 -1
  485. package/es/variables/theme.native.js +3 -2
  486. package/es/variables/theme.native.js.map +1 -1
  487. package/es/variables/vibration.js.map +1 -1
  488. package/lib/atom/autocomplete/index.js +2 -2
  489. package/lib/atom/autocomplete/index.js.map +1 -1
  490. package/lib/atom/avatar/index.js.map +1 -1
  491. package/lib/atom/button/index.js +1 -1
  492. package/lib/atom/button/index.js.map +1 -1
  493. package/lib/atom/button-link/index.js +3 -3
  494. package/lib/atom/button-link/index.js.map +1 -1
  495. package/lib/atom/button-link-icon-only/index.js +3 -3
  496. package/lib/atom/button-link-icon-only/index.js.map +1 -1
  497. package/lib/atom/button-menu/index.js +3 -3
  498. package/lib/atom/button-menu/index.js.map +1 -1
  499. package/lib/atom/card-image-preview/index.js.map +1 -1
  500. package/lib/atom/catalog-section/index.js.map +1 -1
  501. package/lib/atom/centered-text/index.js.map +1 -1
  502. package/lib/atom/checkbox/index.js +6 -4
  503. package/lib/atom/checkbox/index.js.map +1 -1
  504. package/lib/atom/checkbox-with-title/index.js +2 -2
  505. package/lib/atom/checkbox-with-title/index.js.map +1 -1
  506. package/lib/atom/chips/index.js +2 -2
  507. package/lib/atom/chips/index.js.map +1 -1
  508. package/lib/atom/choice/index.native.js +3 -3
  509. package/lib/atom/choice/index.native.js.map +1 -1
  510. package/lib/atom/clue/index.js +2 -5
  511. package/lib/atom/clue/index.js.map +1 -1
  512. package/lib/atom/content-badge/index.js.map +1 -1
  513. package/lib/atom/cta/index.js +2 -5
  514. package/lib/atom/cta/index.js.map +1 -1
  515. package/lib/atom/difficulty-level/index.js.map +1 -1
  516. package/lib/atom/drag-and-drop/index.js +1 -1
  517. package/lib/atom/drag-and-drop/index.js.map +1 -1
  518. package/lib/atom/empty-search-result/index.js.map +1 -1
  519. package/lib/atom/gradient/index.native.js +1 -1
  520. package/lib/atom/gradient/index.native.js.map +1 -1
  521. package/lib/atom/header-back-button/index.native.js +3 -3
  522. package/lib/atom/header-back-button/index.native.js.map +1 -1
  523. package/lib/atom/header-back-icon/index.native.js.map +1 -1
  524. package/lib/atom/html/index.native.js +9 -9
  525. package/lib/atom/html/index.native.js.map +1 -1
  526. package/lib/atom/image-background/index.native.js +7 -4
  527. package/lib/atom/image-background/index.native.js.map +1 -1
  528. package/lib/atom/image-upload/index.js +4 -4
  529. package/lib/atom/image-upload/index.js.map +1 -1
  530. package/lib/atom/input-checkbox/index.js +2 -2
  531. package/lib/atom/input-checkbox/index.js.map +1 -1
  532. package/lib/atom/input-color/index.js +2 -2
  533. package/lib/atom/input-color/index.js.map +1 -1
  534. package/lib/atom/input-doublestep/index.js +3 -3
  535. package/lib/atom/input-doublestep/index.js.map +1 -1
  536. package/lib/atom/input-html/index.js.map +1 -1
  537. package/lib/atom/input-html/input-preview.js.map +1 -1
  538. package/lib/atom/input-readonly/index.js.map +1 -1
  539. package/lib/atom/input-search/index.js +2 -2
  540. package/lib/atom/input-search/index.js.map +1 -1
  541. package/lib/atom/input-switch/index.js +2 -2
  542. package/lib/atom/input-switch/index.js.map +1 -1
  543. package/lib/atom/input-text/index.js +2 -2
  544. package/lib/atom/input-text/index.js.map +1 -1
  545. package/lib/atom/input-text-with-title/index.js +2 -2
  546. package/lib/atom/input-text-with-title/index.js.map +1 -1
  547. package/lib/atom/input-textarea/index.js +2 -2
  548. package/lib/atom/input-textarea/index.js.map +1 -1
  549. package/lib/atom/label/index.js.map +1 -1
  550. package/lib/atom/life/index.js.map +1 -1
  551. package/lib/atom/link/index.js +13 -14
  552. package/lib/atom/link/index.js.map +1 -1
  553. package/lib/atom/loader/index.js.map +1 -1
  554. package/lib/atom/lottie-wrapper/index.js +7 -7
  555. package/lib/atom/lottie-wrapper/index.js.map +1 -1
  556. package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
  557. package/lib/atom/notification/index.js.map +1 -1
  558. package/lib/atom/picture/index.js +1 -1
  559. package/lib/atom/picture/index.js.map +1 -1
  560. package/lib/atom/picture-background/index.js.map +1 -1
  561. package/lib/atom/promo-code/index.js.map +1 -1
  562. package/lib/atom/provider/index.js +4 -7
  563. package/lib/atom/provider/index.js.map +1 -1
  564. package/lib/atom/provider/web-context.js +5 -5
  565. package/lib/atom/provider/web-context.js.map +1 -1
  566. package/lib/atom/radio-group/index.js +1 -1
  567. package/lib/atom/radio-group/index.js.map +1 -1
  568. package/lib/atom/radio-group/item.js.map +1 -1
  569. package/lib/atom/range/handle.js +2 -2
  570. package/lib/atom/range/handle.js.map +1 -1
  571. package/lib/atom/range/index.js +2 -2
  572. package/lib/atom/range/index.js.map +1 -1
  573. package/lib/atom/resource-miniature/index.js.map +1 -1
  574. package/lib/atom/review-background/index.js.map +1 -1
  575. package/lib/atom/review-background/prop-types.js.map +1 -1
  576. package/lib/atom/review-header-step-item/index.js +28 -32
  577. package/lib/atom/review-header-step-item/index.js.map +1 -1
  578. package/lib/atom/review-header-step-item/index.native.js +104 -0
  579. package/lib/atom/review-header-step-item/index.native.js.map +1 -0
  580. package/lib/atom/review-header-step-item/{prop-types.js → types.js} +4 -3
  581. package/lib/atom/review-header-step-item/types.js.map +1 -0
  582. package/lib/atom/review-presentation/index.js.map +1 -1
  583. package/lib/atom/review-presentation/prop-types.js.map +1 -1
  584. package/lib/atom/select/index.js +3 -3
  585. package/lib/atom/select/index.js.map +1 -1
  586. package/lib/atom/select-modal/index.native.js +4 -4
  587. package/lib/atom/select-modal/index.native.js.map +1 -1
  588. package/lib/atom/slide/index.js +1 -1
  589. package/lib/atom/slide/index.js.map +1 -1
  590. package/lib/atom/social-link/index.js.map +1 -1
  591. package/lib/atom/space/index.native.js +2 -2
  592. package/lib/atom/space/index.native.js.map +1 -1
  593. package/lib/atom/spinner/index.js.map +1 -1
  594. package/lib/atom/tab/index.js +2 -2
  595. package/lib/atom/tab/index.js.map +1 -1
  596. package/lib/atom/tab-content/index.js.map +1 -1
  597. package/lib/atom/tag/index.js.map +1 -1
  598. package/lib/atom/text/index.native.js +3 -3
  599. package/lib/atom/text/index.native.js.map +1 -1
  600. package/lib/atom/title/index.js.map +1 -1
  601. package/lib/atom/video-upload/index.js +2 -2
  602. package/lib/atom/video-upload/index.js.map +1 -1
  603. package/lib/atom/wizard-steps/index.js.map +1 -1
  604. package/lib/hoc/animation/index.js +1 -1
  605. package/lib/hoc/animation/index.js.map +1 -1
  606. package/lib/hoc/animation-scheduler/index.js +4 -4
  607. package/lib/hoc/animation-scheduler/index.js.map +1 -1
  608. package/lib/hoc/modal/index.native.js +2 -2
  609. package/lib/hoc/modal/index.native.js.map +1 -1
  610. package/lib/hoc/modal/select/index.native.js +2 -2
  611. package/lib/hoc/modal/select/index.native.js.map +1 -1
  612. package/lib/hoc/modal/select-item/index.native.js +2 -2
  613. package/lib/hoc/modal/select-item/index.native.js.map +1 -1
  614. package/lib/hoc/swapper/index.js +5 -3
  615. package/lib/hoc/swapper/index.js.map +1 -1
  616. package/lib/hoc/touchable/index.native.js +4 -4
  617. package/lib/hoc/touchable/index.native.js.map +1 -1
  618. package/lib/hoc/transition/index.js +3 -3
  619. package/lib/hoc/transition/index.js.map +1 -1
  620. package/lib/index.js.map +1 -1
  621. package/lib/molecule/add-to-my-list/index.js +6 -5
  622. package/lib/molecule/add-to-my-list/index.js.map +1 -1
  623. package/lib/molecule/answer/index.js +6 -4
  624. package/lib/molecule/answer/index.js.map +1 -1
  625. package/lib/molecule/answer/index.native.js.map +1 -1
  626. package/lib/molecule/answer/prop-types.js +3 -3
  627. package/lib/molecule/answer/prop-types.js.map +1 -1
  628. package/lib/molecule/audio/index.js +4 -7
  629. package/lib/molecule/audio/index.js.map +1 -1
  630. package/lib/molecule/banner/index.js.map +1 -1
  631. package/lib/molecule/battle-request/index.js.map +1 -1
  632. package/lib/molecule/brand-card/description.js.map +1 -1
  633. package/lib/molecule/brand-card/index.js.map +1 -1
  634. package/lib/molecule/brand-card-create/index.js.map +1 -1
  635. package/lib/molecule/brand-create-form/index.js +2 -2
  636. package/lib/molecule/brand-create-form/index.js.map +1 -1
  637. package/lib/molecule/brand-download-box/index.js.map +1 -1
  638. package/lib/molecule/brand-form-group/index.js +20 -20
  639. package/lib/molecule/brand-form-group/index.js.map +1 -1
  640. package/lib/molecule/brand-logo/index.native.js +2 -2
  641. package/lib/molecule/brand-logo/index.native.js.map +1 -1
  642. package/lib/molecule/brand-tabs/index.js +22 -8
  643. package/lib/molecule/brand-tabs/index.js.map +1 -1
  644. package/lib/molecule/brand-upload-box/index.js.map +1 -1
  645. package/lib/molecule/breadcrumbs/index.js.map +1 -1
  646. package/lib/molecule/bullet-point-menu-button/index.js +2 -2
  647. package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
  648. package/lib/molecule/card/customer.js.map +1 -1
  649. package/lib/molecule/card/favorite.js +2 -5
  650. package/lib/molecule/card/favorite.js.map +1 -1
  651. package/lib/molecule/card/index.js +4 -4
  652. package/lib/molecule/card/index.js.map +1 -1
  653. package/lib/molecule/card/notification.js.map +1 -1
  654. package/lib/molecule/card/selectable.js.map +1 -1
  655. package/lib/molecule/card-content/index.js.map +1 -1
  656. package/lib/molecule/card-with-button/index.js.map +1 -1
  657. package/lib/molecule/cm-popin/index.js +5 -5
  658. package/lib/molecule/cm-popin/index.js.map +1 -1
  659. package/lib/molecule/cookie-banner/index.js.map +1 -1
  660. package/lib/molecule/coorp-manager-roles/index.js +2 -2
  661. package/lib/molecule/coorp-manager-roles/index.js.map +1 -1
  662. package/lib/molecule/course-section/index.js.map +1 -1
  663. package/lib/molecule/course-sections/index.js +2 -2
  664. package/lib/molecule/course-sections/index.js.map +1 -1
  665. package/lib/molecule/dashboard/battle-request-list/index.js +1 -1
  666. package/lib/molecule/dashboard/battle-request-list/index.js.map +1 -1
  667. package/lib/molecule/dashboard/cards-list/index.js +3 -6
  668. package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
  669. package/lib/molecule/dashboard/news-list/index.js +1 -1
  670. package/lib/molecule/dashboard/news-list/index.js.map +1 -1
  671. package/lib/molecule/dashboard/review-banner/index.js +3 -3
  672. package/lib/molecule/dashboard/review-banner/index.js.map +1 -1
  673. package/lib/molecule/dashboard/start-battle/index.js +1 -1
  674. package/lib/molecule/dashboard/start-battle/index.js.map +1 -1
  675. package/lib/molecule/discipline-cta/index.js.map +1 -1
  676. package/lib/molecule/discipline-header/index.js +2 -5
  677. package/lib/molecule/discipline-header/index.js.map +1 -1
  678. package/lib/molecule/discipline-partners/index.js +1 -1
  679. package/lib/molecule/discipline-partners/index.js.map +1 -1
  680. package/lib/molecule/discipline-scope/index.js.map +1 -1
  681. package/lib/molecule/drag-and-drop/index.js +4 -4
  682. package/lib/molecule/drag-and-drop/index.js.map +1 -1
  683. package/lib/molecule/drag-and-drop/overlay.js.map +1 -1
  684. package/lib/molecule/drag-and-drop/placeholder.js.map +1 -1
  685. package/lib/molecule/drag-and-drop/upload-report.js +47 -26
  686. package/lib/molecule/drag-and-drop/upload-report.js.map +1 -1
  687. package/lib/molecule/drag-and-drop-wrapper/index.js.map +1 -1
  688. package/lib/molecule/draggable/index.js +2 -2
  689. package/lib/molecule/draggable/index.js.map +1 -1
  690. package/lib/molecule/draggable-list/index.js +3 -3
  691. package/lib/molecule/draggable-list/index.js.map +1 -1
  692. package/lib/molecule/external-content-button/index.js +4 -7
  693. package/lib/molecule/external-content-button/index.js.map +1 -1
  694. package/lib/molecule/external-content-viewer/index.js.map +1 -1
  695. package/lib/molecule/feedback/index.js +6 -6
  696. package/lib/molecule/feedback/index.js.map +1 -1
  697. package/lib/molecule/filters/filters-wrapper.js +1 -1
  698. package/lib/molecule/filters/filters-wrapper.js.map +1 -1
  699. package/lib/molecule/filters/index.js +2 -5
  700. package/lib/molecule/filters/index.js.map +1 -1
  701. package/lib/molecule/forum/forum-comment/index.js.map +1 -1
  702. package/lib/molecule/forum/forum-post/index.js.map +1 -1
  703. package/lib/molecule/forum/forum-thread/index.js +1 -1
  704. package/lib/molecule/forum/forum-thread/index.js.map +1 -1
  705. package/lib/molecule/forum/post-conditions.js.map +1 -1
  706. package/lib/molecule/go1-banner/index.js.map +1 -1
  707. package/lib/molecule/hero/index.js +2 -2
  708. package/lib/molecule/hero/index.js.map +1 -1
  709. package/lib/molecule/input-text-with-titled-checkbox/index.js.map +1 -1
  710. package/lib/molecule/list-badges/index.js.map +1 -1
  711. package/lib/molecule/login-alert/index.js.map +1 -1
  712. package/lib/molecule/menu-list/index.js +2 -1
  713. package/lib/molecule/menu-list/index.js.map +1 -1
  714. package/lib/molecule/message-popin/index.js.map +1 -1
  715. package/lib/molecule/modal/index.js.map +1 -1
  716. package/lib/molecule/module-bubble/index.js.map +1 -1
  717. package/lib/molecule/module-card/index.js +1 -1
  718. package/lib/molecule/module-card/index.js.map +1 -1
  719. package/lib/molecule/news/index.js +1 -1
  720. package/lib/molecule/news/index.js.map +1 -1
  721. package/lib/molecule/notification-banner/index.js.map +1 -1
  722. package/lib/molecule/pagination/index.js.map +1 -1
  723. package/lib/molecule/payment-form/index.js +2 -5
  724. package/lib/molecule/payment-form/index.js.map +1 -1
  725. package/lib/molecule/pdf/index.js.map +1 -1
  726. package/lib/molecule/popin/index.js +4 -4
  727. package/lib/molecule/popin/index.js.map +1 -1
  728. package/lib/molecule/product-card/index.js.map +1 -1
  729. package/lib/molecule/progress-bar/index.js +2 -2
  730. package/lib/molecule/progress-bar/index.js.map +1 -1
  731. package/lib/molecule/questions/drop-down/index.js +2 -2
  732. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  733. package/lib/molecule/questions/free-text/index.js +5 -5
  734. package/lib/molecule/questions/free-text/index.js.map +1 -1
  735. package/lib/molecule/questions/free-text/index.native.js +15 -8
  736. package/lib/molecule/questions/free-text/index.native.js.map +1 -1
  737. package/lib/molecule/questions/mobile/draggable/index.native.js +2 -2
  738. package/lib/molecule/questions/mobile/draggable/index.native.js.map +1 -1
  739. package/lib/molecule/questions/mobile/slider/index.native.js +4 -4
  740. package/lib/molecule/questions/mobile/slider/index.native.js.map +1 -1
  741. package/lib/molecule/questions/mobile/switch/index.native.js +4 -8
  742. package/lib/molecule/questions/mobile/switch/index.native.js.map +1 -1
  743. package/lib/molecule/questions/mobile/template/index.native.js +45 -70
  744. package/lib/molecule/questions/mobile/template/index.native.js.map +1 -1
  745. package/lib/molecule/questions/qcm/index.js +3 -3
  746. package/lib/molecule/questions/qcm/index.js.map +1 -1
  747. package/lib/molecule/questions/qcm-drag/index.js +2 -2
  748. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  749. package/lib/molecule/questions/qcm-graphic/index.js +3 -3
  750. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  751. package/lib/molecule/questions/question-range/index.js +7 -5
  752. package/lib/molecule/questions/question-range/index.js.map +1 -1
  753. package/lib/molecule/questions/template/index.js +5 -3
  754. package/lib/molecule/questions/template/index.js.map +1 -1
  755. package/lib/molecule/questions/types.js.map +1 -1
  756. package/lib/molecule/quick-access-card/index.js.map +1 -1
  757. package/lib/molecule/quick-access-cards-group/index.js.map +1 -1
  758. package/lib/molecule/resource-player/index.js +5 -3
  759. package/lib/molecule/resource-player/index.js.map +1 -1
  760. package/lib/molecule/review-card-congrats/index.js +4 -4
  761. package/lib/molecule/review-card-congrats/index.js.map +1 -1
  762. package/lib/molecule/review-card-congrats/prop-types.js.map +1 -1
  763. package/lib/molecule/review-correction-popin/index.js +3 -3
  764. package/lib/molecule/review-correction-popin/index.js.map +1 -1
  765. package/lib/molecule/review-correction-popin/prop-types.js.map +1 -1
  766. package/lib/molecule/review-header-steps/index.js +1 -1
  767. package/lib/molecule/review-header-steps/index.js.map +1 -1
  768. package/lib/molecule/review-header-steps/prop-types.js +2 -2
  769. package/lib/molecule/review-header-steps/prop-types.js.map +1 -1
  770. package/lib/molecule/scope-content/index.js +1 -1
  771. package/lib/molecule/scope-content/index.js.map +1 -1
  772. package/lib/molecule/scope-tabs/index.js +3 -3
  773. package/lib/molecule/scope-tabs/index.js.map +1 -1
  774. package/lib/molecule/search-form/index.js +3 -3
  775. package/lib/molecule/search-form/index.js.map +1 -1
  776. package/lib/molecule/select-multiple/index.js +7 -7
  777. package/lib/molecule/select-multiple/index.js.map +1 -1
  778. package/lib/molecule/setup-cohort-item/index.js +1 -1
  779. package/lib/molecule/setup-cohort-item/index.js.map +1 -1
  780. package/lib/molecule/setup-section/index.js +2 -2
  781. package/lib/molecule/setup-section/index.js.map +1 -1
  782. package/lib/molecule/setup-sections/index.js.map +1 -1
  783. package/lib/molecule/setup-slide/index.js +9 -9
  784. package/lib/molecule/setup-slide/index.js.map +1 -1
  785. package/lib/molecule/setup-slider/index.js +1 -1
  786. package/lib/molecule/setup-slider/index.js.map +1 -1
  787. package/lib/molecule/share/index.js +4 -4
  788. package/lib/molecule/share/index.js.map +1 -1
  789. package/lib/molecule/skill-card/index.js +2 -2
  790. package/lib/molecule/skill-card/index.js.map +1 -1
  791. package/lib/molecule/skill-card/prop-types.js.map +1 -1
  792. package/lib/molecule/ssmenu-list/index.js.map +1 -1
  793. package/lib/molecule/subscription-freemium/index.js.map +1 -1
  794. package/lib/molecule/subscription-premium/index.js.map +1 -1
  795. package/lib/molecule/table/index.js.map +1 -1
  796. package/lib/molecule/teams-popin/index.js.map +1 -1
  797. package/lib/molecule/theme-image/index.js.map +1 -1
  798. package/lib/molecule/title-and-checkbox-wrapper/index.js +3 -3
  799. package/lib/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
  800. package/lib/molecule/titled-checkbox/index.js +2 -2
  801. package/lib/molecule/titled-checkbox/index.js.map +1 -1
  802. package/lib/molecule/unsubscribe/index.js.map +1 -1
  803. package/lib/molecule/vertical-tabs/index.js.map +1 -1
  804. package/lib/molecule/video-iframe/index.js +4 -7
  805. package/lib/molecule/video-iframe/index.js.map +1 -1
  806. package/lib/molecule/video-player/index.js +8 -8
  807. package/lib/molecule/video-player/index.js.map +1 -1
  808. package/lib/molecule/video-player/jwplayer-prop-types.js +1 -1
  809. package/lib/molecule/video-player/jwplayer-prop-types.js.map +1 -1
  810. package/lib/molecule/video-player/jwplayer.js +3 -3
  811. package/lib/molecule/video-player/jwplayer.js.map +1 -1
  812. package/lib/molecule/video-player/prop-types.js +1 -1
  813. package/lib/molecule/video-player/prop-types.js.map +1 -1
  814. package/lib/molecule/video-player/vimeo.js +6 -10
  815. package/lib/molecule/video-player/vimeo.js.map +1 -1
  816. package/lib/molecule/wizard-summary/index.js +2 -2
  817. package/lib/molecule/wizard-summary/index.js.map +1 -1
  818. package/lib/organism/accordion/container/index.js +3 -3
  819. package/lib/organism/accordion/container/index.js.map +1 -1
  820. package/lib/organism/accordion/coorp-manager/index.js +4 -4
  821. package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
  822. package/lib/organism/accordion/coorp-manager/part/index.js +1 -1
  823. package/lib/organism/accordion/coorp-manager/part/index.js.map +1 -1
  824. package/lib/organism/accordion/part/index.js.map +1 -1
  825. package/lib/organism/accordion/toggler/index.js +2 -2
  826. package/lib/organism/accordion/toggler/index.js.map +1 -1
  827. package/lib/organism/brand-analytics/analytics-popin.js.map +1 -1
  828. package/lib/organism/brand-analytics/index.js.map +1 -1
  829. package/lib/organism/brand-dashboard/index.js +1 -1
  830. package/lib/organism/brand-dashboard/index.js.map +1 -1
  831. package/lib/organism/brand-form/index.js +2 -2
  832. package/lib/organism/brand-form/index.js.map +1 -1
  833. package/lib/organism/brand-table/index.js.map +1 -1
  834. package/lib/organism/brand-upload/index.js +1 -1
  835. package/lib/organism/brand-upload/index.js.map +1 -1
  836. package/lib/organism/cards-grid/index.js.map +1 -1
  837. package/lib/organism/cart/index.js.map +1 -1
  838. package/lib/organism/content-translation/index.js +3 -3
  839. package/lib/organism/content-translation/index.js.map +1 -1
  840. package/lib/organism/course-selection/index.js +1 -1
  841. package/lib/organism/course-selection/index.js.map +1 -1
  842. package/lib/organism/discussion/index.js +1 -1
  843. package/lib/organism/discussion/index.js.map +1 -1
  844. package/lib/organism/get-the-app/index.js +3 -3
  845. package/lib/organism/get-the-app/index.js.map +1 -1
  846. package/lib/organism/grid-list/index.js.map +1 -1
  847. package/lib/organism/header/index.js.map +1 -1
  848. package/lib/organism/header-v2/index.native.js +2 -2
  849. package/lib/organism/header-v2/index.native.js.map +1 -1
  850. package/lib/organism/hero/index.js.map +1 -1
  851. package/lib/organism/list-item/index.js.map +1 -1
  852. package/lib/organism/list-items/index.js.map +1 -1
  853. package/lib/organism/mobile-navigation/index.native.js +2 -2
  854. package/lib/organism/mobile-navigation/index.native.js.map +1 -1
  855. package/lib/organism/mooc/image-slider/index.js +1 -1
  856. package/lib/organism/mooc/image-slider/index.js.map +1 -1
  857. package/lib/organism/mooc-footer/index.js.map +1 -1
  858. package/lib/organism/mooc-header/index.js +3 -6
  859. package/lib/organism/mooc-header/index.js.map +1 -1
  860. package/lib/organism/popin/index.js.map +1 -1
  861. package/lib/organism/resource-browser/index.js +1 -1
  862. package/lib/organism/resource-browser/index.js.map +1 -1
  863. package/lib/organism/review-congrats/index.js +4 -4
  864. package/lib/organism/review-congrats/index.js.map +1 -1
  865. package/lib/organism/review-congrats/prop-types.js.map +1 -1
  866. package/lib/organism/review-header/index.js +2 -2
  867. package/lib/organism/review-header/index.js.map +1 -1
  868. package/lib/organism/review-header/index.native.js +40 -0
  869. package/lib/organism/review-header/index.native.js.map +1 -0
  870. package/lib/organism/review-header/{prop-types.js → types.js} +3 -2
  871. package/lib/organism/review-header/types.js.map +1 -0
  872. package/lib/organism/review-skills/index.js +2 -2
  873. package/lib/organism/review-skills/index.js.map +1 -1
  874. package/lib/organism/review-skills/prop-types.js +3 -3
  875. package/lib/organism/review-skills/prop-types.js.map +1 -1
  876. package/lib/organism/review-slide/index.js +3 -3
  877. package/lib/organism/review-slide/index.js.map +1 -1
  878. package/lib/organism/review-slide/index.native.js +5 -10
  879. package/lib/organism/review-slide/index.native.js.map +1 -1
  880. package/lib/organism/review-slide/prop-types.js.map +1 -1
  881. package/lib/organism/review-stacked-slides/index.js +3 -6
  882. package/lib/organism/review-stacked-slides/index.js.map +1 -1
  883. package/lib/organism/review-stacked-slides/index.native.js +14 -7
  884. package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
  885. package/lib/organism/review-stacked-slides/prop-types.js +2 -2
  886. package/lib/organism/review-stacked-slides/prop-types.js.map +1 -1
  887. package/lib/organism/rewards-form/index.js +3 -1
  888. package/lib/organism/rewards-form/index.js.map +1 -1
  889. package/lib/organism/search-and-chips-results/index.js +1 -1
  890. package/lib/organism/search-and-chips-results/index.js.map +1 -1
  891. package/lib/organism/settings/index.js +5 -3
  892. package/lib/organism/settings/index.js.map +1 -1
  893. package/lib/organism/setup-header/index.js.map +1 -1
  894. package/lib/organism/sidebar/index.js +16 -14
  895. package/lib/organism/sidebar/index.js.map +1 -1
  896. package/lib/organism/slider/index.js.map +1 -1
  897. package/lib/organism/user-preferences/index.js +5 -3
  898. package/lib/organism/user-preferences/index.js.map +1 -1
  899. package/lib/organism/wizard-contents/index.js +8 -8
  900. package/lib/organism/wizard-contents/index.js.map +1 -1
  901. package/lib/template/activity/engine-stars.js +4 -7
  902. package/lib/template/activity/engine-stars.js.map +1 -1
  903. package/lib/template/activity/index.js +8 -11
  904. package/lib/template/activity/index.js.map +1 -1
  905. package/lib/template/activity/progression-item.js +2 -2
  906. package/lib/template/activity/progression-item.js.map +1 -1
  907. package/lib/template/activity/stars-summary.js +3 -6
  908. package/lib/template/activity/stars-summary.js.map +1 -1
  909. package/lib/template/app-player/loading/index.js.map +1 -1
  910. package/lib/template/app-player/player/index.js +1 -1
  911. package/lib/template/app-player/player/index.js.map +1 -1
  912. package/lib/template/app-player/player/slides/footer/index.js +8 -11
  913. package/lib/template/app-player/player/slides/footer/index.js.map +1 -1
  914. package/lib/template/app-player/player/slides/header/index.js.map +1 -1
  915. package/lib/template/app-player/player/slides/header/learner.js +1 -1
  916. package/lib/template/app-player/player/slides/header/learner.js.map +1 -1
  917. package/lib/template/app-player/player/slides/header/lives.js.map +1 -1
  918. package/lib/template/app-player/player/slides/header/microlearning.js.map +1 -1
  919. package/lib/template/app-player/player/slides/index.js +16 -12
  920. package/lib/template/app-player/player/slides/index.js.map +1 -1
  921. package/lib/template/app-player/popin-correction/index.js +9 -10
  922. package/lib/template/app-player/popin-correction/index.js.map +1 -1
  923. package/lib/template/app-player/popin-end/index.js +1 -1
  924. package/lib/template/app-player/popin-end/index.js.map +1 -1
  925. package/lib/template/app-player/popin-end/summary.js +17 -13
  926. package/lib/template/app-player/popin-end/summary.js.map +1 -1
  927. package/lib/template/app-player/popin-header/index.js +8 -6
  928. package/lib/template/app-player/popin-header/index.js.map +1 -1
  929. package/lib/template/app-player/popin-no-access/index.js.map +1 -1
  930. package/lib/template/app-review/demo-ts/index.js.map +1 -1
  931. package/lib/template/app-review/demo-ts/index.native.js.map +1 -1
  932. package/lib/template/app-review/demo-ts/typings.js.map +1 -1
  933. package/lib/template/app-review/index.js +7 -5
  934. package/lib/template/app-review/index.js.map +1 -1
  935. package/lib/template/app-review/index.native.js +7 -5
  936. package/lib/template/app-review/index.native.js.map +1 -1
  937. package/lib/template/app-review/onboarding/index.js.map +1 -1
  938. package/lib/template/app-review/onboarding/index.native.js +2 -2
  939. package/lib/template/app-review/onboarding/index.native.js.map +1 -1
  940. package/lib/template/app-review/player/index.js +2 -2
  941. package/lib/template/app-review/player/index.js.map +1 -1
  942. package/lib/template/app-review/player/index.native.js +9 -16
  943. package/lib/template/app-review/player/index.native.js.map +1 -1
  944. package/lib/template/app-review/player/prop-types.js +9 -8
  945. package/lib/template/app-review/player/prop-types.js.map +1 -1
  946. package/lib/template/app-review/prop-types.js +1 -1
  947. package/lib/template/app-review/prop-types.js.map +1 -1
  948. package/lib/template/app-review/skills/index.js.map +1 -1
  949. package/lib/template/app-review/skills/index.native.js +2 -2
  950. package/lib/template/app-review/skills/index.native.js.map +1 -1
  951. package/lib/template/app-review/skills/stories.js.map +1 -1
  952. package/lib/template/app-review/template-context.js +4 -4
  953. package/lib/template/app-review/template-context.js.map +1 -1
  954. package/lib/template/back-office/brand-create/index.js.map +1 -1
  955. package/lib/template/back-office/brand-list/index.js +4 -2
  956. package/lib/template/back-office/brand-list/index.js.map +1 -1
  957. package/lib/template/back-office/brand-update/index.js +9 -9
  958. package/lib/template/back-office/brand-update/index.js.map +1 -1
  959. package/lib/template/back-office/dashboard-preview/dashboard-popin.js.map +1 -1
  960. package/lib/template/back-office/dashboard-preview/index.js.map +1 -1
  961. package/lib/template/back-office/layout/index.js.map +1 -1
  962. package/lib/template/battle-requests/index.js +2 -4
  963. package/lib/template/battle-requests/index.js.map +1 -1
  964. package/lib/template/cockpit/jw-uploader/index.js +2 -2
  965. package/lib/template/cockpit/jw-uploader/index.js.map +1 -1
  966. package/lib/template/common/authors/index.js +2 -5
  967. package/lib/template/common/authors/index.js.map +1 -1
  968. package/lib/template/common/coorp-header/content.js.map +1 -1
  969. package/lib/template/common/coorp-header/index.js.map +1 -1
  970. package/lib/template/common/dashboard/index.js +1 -1
  971. package/lib/template/common/dashboard/index.js.map +1 -1
  972. package/lib/template/common/discipline/index.js +3 -3
  973. package/lib/template/common/discipline/index.js.map +1 -1
  974. package/lib/template/common/search-page/index.js +1 -1
  975. package/lib/template/common/search-page/index.js.map +1 -1
  976. package/lib/template/external-course/index.js +4 -7
  977. package/lib/template/external-course/index.js.map +1 -1
  978. package/lib/template/review-dashboard-skills/index.js.map +1 -1
  979. package/lib/template/teams-dashboard/index.js +3 -3
  980. package/lib/template/teams-dashboard/index.js.map +1 -1
  981. package/lib/types/translations.js.map +1 -1
  982. package/lib/util/bubbling.js.map +1 -1
  983. package/lib/util/build-query-string.js.map +1 -1
  984. package/lib/util/button-icons.js.map +1 -1
  985. package/lib/util/closest-step.js.map +1 -1
  986. package/lib/util/constants.js.map +1 -1
  987. package/lib/util/external-content.js +1 -1
  988. package/lib/util/external-content.js.map +1 -1
  989. package/lib/util/get-class-state.js.map +1 -1
  990. package/lib/util/get-clean-uri.js.map +1 -1
  991. package/lib/util/get-resized-image.js +3 -3
  992. package/lib/util/get-resized-image.js.map +1 -1
  993. package/lib/util/get-shadow-box-color-from-primary.js.map +1 -1
  994. package/lib/util/image.js.map +1 -1
  995. package/lib/util/navigation.js.map +1 -1
  996. package/lib/util/parse-template-string.js.map +1 -1
  997. package/lib/util/proptypes.js +1 -1
  998. package/lib/util/proptypes.js.map +1 -1
  999. package/lib/util/render-with-context.js +7 -4
  1000. package/lib/util/render-with-context.js.map +1 -1
  1001. package/lib/util/shallow-compare.js.map +1 -1
  1002. package/lib/variables/analytics.js.map +1 -1
  1003. package/lib/variables/brand.native.js.map +1 -1
  1004. package/lib/variables/colors.js +11 -0
  1005. package/lib/variables/colors.js.map +1 -0
  1006. package/lib/variables/shadow.js.map +1 -1
  1007. package/lib/variables/theme.native.js +5 -2
  1008. package/lib/variables/theme.native.js.map +1 -1
  1009. package/lib/variables/vibration.js.map +1 -1
  1010. package/package.json +63 -54
  1011. package/es/atom/review-header-step-item/prop-types.js +0 -7
  1012. package/es/atom/review-header-step-item/prop-types.js.map +0 -1
  1013. package/es/organism/review-header/prop-types.js.map +0 -1
  1014. package/lib/atom/review-header-step-item/prop-types.js.map +0 -1
  1015. package/lib/organism/review-header/prop-types.js.map +0 -1
@@ -17,11 +17,11 @@ var _shadow = require("../../../../variables/shadow");
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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
- 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); }
24
+ 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
25
 
26
26
  const createStyleSheet = theme => _reactNative.StyleSheet.create({
27
27
  container: {
@@ -57,7 +57,7 @@ const createStyleSheet = theme => _reactNative.StyleSheet.create({
57
57
  height: 10,
58
58
  borderRadius: theme.radius.button
59
59
  },
60
- thumb: _extends(_extends({}, _shadow.BOX_STYLE), {}, {
60
+ thumb: _extends({}, _shadow.BOX_STYLE, {
61
61
  width: 30,
62
62
  height: 30,
63
63
  borderRadius: 30 / 2,
@@ -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,IAAAA,UAAU,EAAEV,KAAK,CAACU,UAAN,CAAiBC,IAFvB;AAGNC,IAAAA,SAAS,EAAE;AAHL,GAPQ;AAYhBC,EAAAA,SAAS,EAAE;AACTJ,IAAAA,QAAQ,EAAE,EADD;AAETK,IAAAA,KAAK,EAAEd,KAAK,CAACe,MAAN,CAAaC,KAFX;AAGTN,IAAAA,UAAU,EAAEV,KAAK,CAACU,UAAN,CAAiBC,IAHpB;AAITC,IAAAA,SAAS,EAAE;AAJF,GAZK;AAkBhBK,EAAAA,eAAe,EAAE;AACfX,IAAAA,aAAa,EAAE,KADA;AAEfC,IAAAA,cAAc,EAAE;AAFD,GAlBD;AAsBhBW,EAAAA,SAAS,EAAE;AACTd,IAAAA,IAAI,EAAE,CADG;AAETe,IAAAA,UAAU,EAAE;AAFH,GAtBK;AA0BhBC,EAAAA,UAAU,EAAE;AACVhB,IAAAA,IAAI,EAAE,CADI;AAEVe,IAAAA,UAAU,EAAE;AAFF,GA1BI;AA8BhBE,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,EADH;AAELC,IAAAA,YAAY,EAAEvB,KAAK,CAACwB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B,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,CA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,EAAEyB,UAAU,CAAChC,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEuB,GAAI,IAAGC,IAAK,EADlB,CADF,CANF,CAhBF,CADF;AA+BD,CA5DD;;eA8DeN,c"}
@@ -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: {
@@ -35,8 +35,6 @@ const styleSheet = _reactNative.StyleSheet.create({
35
35
  card: {
36
36
  flex: 1
37
37
  },
38
- choices: {// backgroundColor: '#967' // flex-debug
39
- },
40
38
  choice: {
41
39
  paddingVertical: 5
42
40
  }
@@ -100,8 +98,7 @@ const Switch = props => {
100
98
  switch (type) {
101
99
  case 'qcm':
102
100
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
103
- testID: "question-choices",
104
- style: styleSheet.choices
101
+ testID: "question-choices"
105
102
  }, choices.map((choice, index) => /*#__PURE__*/_react.default.createElement(_index.default, {
106
103
  key: `question-choice-${choice._id}`,
107
104
  onPress: handleChoicePress(choice),
@@ -114,8 +111,7 @@ const Switch = props => {
114
111
 
115
112
  case 'qcmGraphic':
116
113
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
117
- testID: "question-choices",
118
- style: styleSheet.choices
114
+ testID: "question-choices"
119
115
  }, choices.map((choice, index) => /*#__PURE__*/_react.default.createElement(_index.default, {
120
116
  key: `question-choice-${choice._id}`,
121
117
  onPress: handleChoicePress(choice),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/questions/mobile/switch/index.native.tsx"],"names":["styleSheet","StyleSheet","create","cards","flexDirection","alignItems","card","flex","choices","choice","paddingVertical","Switch","props","templateContext","analytics","store","focusedSelectId","handleBlur","handleFocus","type","template","isDisabled","min","max","unit","value","step","onSliderChange","onItemPress","onItemInputChange","onInputValueChange","handleChoicePress","onPress","handleItemInputChange","_value","handleSlidingComplete","logEvent","ANALYTICS_EVENT_TYPE","SLIDE","id","questionType","map","index","_id","selected","label","media","undefined","console","warn"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA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iBAAD;AAAM,QAAA,MAAM,EAAC;AAAb,sBACE,6BAAC,eAAD;AACE,QAAA,UAAU,EAAE5B,UADd;AAEE,QAAA,QAAQ,EAAED,QAAQ,IAAI,EAFxB;AAGE,QAAA,OAAO,EAAEZ,OAHX;AAIE,QAAA,aAAa,EAAEyB,qBAJjB;AAKE,QAAA,UAAU,EAAEhB,UALd;AAME,QAAA,WAAW,EAAEC,WANf;AAOE,QAAA,eAAe,EAAEF;AAPnB,QADF,CADF;;AAaF,SAAK,SAAL;AACE,0BACE,6BAAC,iBAAD;AAAM,QAAA,MAAM,EAAC;AAAb,sBACE,6BAAC,eAAD;AAAmB,QAAA,OAAO,EAAER,OAA5B;AAA2D,QAAA,OAAO,EAAEuB;AAApE,QADF,CADF;;AAKF,SAAK,OAAL;AACE,UAAI,CAACD,kBAAL,EAAyB;AACvB,4BAAO,6BAAC,iBAAD,OAAP;AACD;;AAED,0BACE,6BAAC,eAAD;AACE,QAAA,SAAS,MADX;AAEE,QAAA,QAAQ,EAAEA,kBAFZ;AAGE,QAAA,MAAM,EAAC,qBAHT;AAIE,QAAA,YAAY,EAAC,OAJf;AAKE,QAAA,UAAU,EAAET;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} 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\nconst styleSheet = StyleSheet.create({\n cards: {\n flexDirection: 'row',\n alignItems: 'stretch'\n },\n card: {\n flex: 1\n },\n choices: {\n // backgroundColor: '#967' // flex-debug\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\" style={styleSheet.choices}>\n {(choices as SelectableChoice[]).map((choice, index) => (\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\" style={styleSheet.choices}>\n {(choices as SelectableChoice[]).map((choice, index) => (\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","index","_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, index) => (\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, index) => (\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,CAAWC,MAAX,CAAkB;EACnDC,KAAK,EAAE;IACLC,aAAa,EAAE,KADV;IAELC,UAAU,EAAE;EAFP,CAD4C;EAKnDC,IAAI,EAAE;IACJC,IAAI,EAAE;EADF,CAL6C;EAQnDC,MAAM,EAAE;IACNC,eAAe,EAAE;EADX;AAR2C,CAAlB,CAAnC;;AAaA,MAAMC,MAAM,GAAIC,KAAD,IAAkB;EAC/B,MAAMC,eAAe,GAAG,IAAAC,mCAAA,GAAxB;EACA,MAAM;IAACC,SAAD;IAAYC;EAAZ,IAAqBH,eAA3B;EACA,MAAM;IAACI,eAAD;IAAkBC,UAAlB;IAA8BC;EAA9B,IAA6CH,KAAnD;EAEA,MAAM;IACJI,IADI;IAEJC,QAFI;IAGJC,UAHI;IAIJC,OAAO,GAAG,EAJN;IAKJC,GALI;IAMJC,GANI;IAOJC,IAPI;IAQJC,KARI;IASJC,IAT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yDjC,eAAe,KAAKiC,SAAjF,EAA4F;QAC1F;QACAC,OAAO,CAACC,IAAR,CAAa,mEAAb;QACA,oBAAO,6BAAC,iBAAD,OAAP;MACD;;MAED,oBACE,6BAAC,iBAAD;QAAM,MAAM,EAAC;MAAb,gBACE,6BAAC,eAAD;QACE,UAAU,EAAE9B,UADd;QAEE,QAAQ,EAAED,QAAQ,IAAI,EAFxB;QAGE,OAAO,EAAEE,OAHX;QAIE,aAAa,EAAEa,qBAJjB;QAKE,UAAU,EAAElB,UALd;QAME,WAAW,EAAEC,WANf;QAOE,eAAe,EAAEF;MAPnB,EADF,CADF;;IAaF,KAAK,SAAL;MACE,oBACE,6BAAC,iBAAD;QAAM,MAAM,EAAC;MAAb,gBACE,6BAAC,eAAD;QAAmB,OAAO,EAAEM,OAA5B;QAA2D,OAAO,EAAEU;MAApE,EADF,CADF;;IAKF,KAAK,OAAL;MACE,IAAI,CAACD,kBAAL,EAAyB;QACvB,oBAAO,6BAAC,iBAAD,OAAP;MACD;;MAED,oBACE,6BAAC,eAAD;QACE,SAAS,MADX;QAEE,QAAQ,EAAEA,kBAFZ;QAGE,MAAM,EAAC,qBAHT;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"}
@@ -21,15 +21,18 @@ var _templateContext = require("../../../../template/app-review/template-context
21
21
 
22
22
  var _parseTemplateString = _interopRequireDefault(require("../../../../util/parse-template-string"));
23
23
 
24
+ var _shadow = require("../../../../variables/shadow");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
- 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
+
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; }
27
31
 
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; }
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); }
29
33
 
30
34
  const createStyleSheet = theme => ({
31
- section: {
32
- // backgroundColor: '#188', // flex-debug
35
+ container: {
33
36
  width: '100%',
34
37
  flexDirection: 'row',
35
38
  flexWrap: 'wrap',
@@ -39,21 +42,22 @@ const createStyleSheet = theme => ({
39
42
  spaced: {
40
43
  paddingVertical: theme.spacing.tiny
41
44
  },
42
- input: {
43
- padding: theme.spacing.tiny,
44
- borderWidth: 1,
45
- borderColor: theme.colors.gray.lightMedium,
46
- borderRadius: theme.radius.common,
47
- backgroundColor: theme.colors.white,
48
- minWidth: 175
49
- },
50
45
  htmlText: {
51
- padding: theme.spacing.tiny,
52
46
  color: theme.colors.black,
53
47
  fontWeight: theme.fontWeight.bold,
54
- lineHeight: 30
48
+ lineHeight: 25
55
49
  },
56
- text: {
50
+ // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread
51
+ selectInput: _extends({
52
+ padding: theme.spacing.tiny,
53
+ borderRadius: theme.radius.regular,
54
+ minWidth: 175,
55
+ marginHorizontal: 12,
56
+ paddingVertical: 16
57
+ }, _shadow.BOX_STYLE, {
58
+ backgroundColor: theme.colors.white
59
+ }),
60
+ selectText: {
57
61
  color: theme.colors.gray.medium,
58
62
  fontWeight: theme.fontWeight.bold,
59
63
  fontSize: theme.fontSize.regular,
@@ -61,49 +65,10 @@ const createStyleSheet = theme => ({
61
65
  }
62
66
  });
63
67
 
64
- const Section = ({
65
- section,
66
- choices,
67
- index,
68
- focusedSelectId,
69
- onInputChange,
70
- handleBlur,
71
- handleFocus,
72
- isDisabled,
73
- styles
74
- }) => {
75
- const prefix = `question-section-${index + 1}`;
76
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
77
- style: styles.section,
78
- key: `container-${prefix}`
79
- }, section.map((part, id) => {
80
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
81
- key: `${prefix}-${id}`,
82
- style: {
83
- flexDirection: 'row'
84
- }
85
- }, /*#__PURE__*/_react.default.createElement(Item, {
86
- prefix: prefix,
87
- part: part,
88
- choices: choices,
89
- index: id,
90
- focusedSelectId: focusedSelectId,
91
- isDisabled: isDisabled,
92
- handleBlur: handleBlur,
93
- handleFocus: handleFocus,
94
- onInputChange: onInputChange,
95
- styles: styles
96
- }), /*#__PURE__*/_react.default.createElement(_index3.default, {
97
- type: "micro"
98
- }));
99
- }));
100
- };
101
-
102
68
  const Item = props => {
103
69
  const {
104
70
  part,
105
71
  index,
106
- prefix,
107
72
  isDisabled = false,
108
73
  focusedSelectId,
109
74
  choices,
@@ -119,10 +84,9 @@ const Item = props => {
119
84
  translations
120
85
  } = templateContext;
121
86
  const inputNames = choices.map(choice => choice.name);
122
- const id = `${prefix}-part-${index + 1}`;
87
+ const id = `question-part-${index + 1}`;
123
88
  const isFocused = focusedSelectId === id;
124
- const selectedStyle = brandTheme && {
125
- borderColor: brandTheme.colors.primary,
89
+ const coloredText = brandTheme && {
126
90
  color: brandTheme.colors.primary
127
91
  };
128
92
 
@@ -156,10 +120,16 @@ const Item = props => {
156
120
  }));
157
121
  }
158
122
 
159
- const selectStyle = [styles.input];
123
+ const selectInputStyle = [styles.selectInput];
160
124
 
161
125
  if (value) {
162
- selectStyle.push(selectedStyle);
126
+ selectInputStyle.push(coloredText);
127
+ }
128
+
129
+ const selectTextStyle = [styles.selectText];
130
+
131
+ if (value) {
132
+ selectTextStyle.push(coloredText);
163
133
  }
164
134
 
165
135
  if (choice.type === 'select') {
@@ -176,8 +146,8 @@ const Item = props => {
176
146
  onBlur: handleBlur,
177
147
  onFocus: handleFocus(id),
178
148
  onChange: handleInputChange(choice),
179
- textStyle: styles.text,
180
- style: selectStyle,
149
+ textStyle: selectTextStyle,
150
+ style: selectInputStyle,
181
151
  analyticsID: `${id}-select${selectedSuffix}${disabledSuffix}`,
182
152
  testID: `${id}-select${selectedSuffix}${disabledSuffix}`
183
153
  }));
@@ -218,22 +188,27 @@ const QuestionTemplate = props => {
218
188
  }
219
189
 
220
190
  const parts = (0, _parseTemplateString.default)(template);
221
- const sections = [parts]; // @todo remove useless sections
222
-
223
191
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
192
+ style: styleSheet.container,
224
193
  testID: "question-template"
225
- }, sections.map((section, index) => /*#__PURE__*/_react.default.createElement(Section, {
226
- key: index,
227
- section: section,
194
+ }, parts.map((part, id) => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
195
+ key: `question-part-${id}`,
196
+ style: {
197
+ flexDirection: 'row'
198
+ }
199
+ }, /*#__PURE__*/_react.default.createElement(Item, {
200
+ part: part,
228
201
  choices: choices,
229
- index: index,
202
+ index: id,
203
+ focusedSelectId: focusedSelectId,
204
+ isDisabled: isDisabled,
230
205
  handleBlur: handleBlur,
231
206
  handleFocus: handleFocus,
232
- focusedSelectId: focusedSelectId,
233
207
  onInputChange: onInputChange,
234
- isDisabled: isDisabled,
235
208
  styles: styleSheet
236
- })));
209
+ }), /*#__PURE__*/_react.default.createElement(_index3.default, {
210
+ type: "micro"
211
+ }))));
237
212
  };
238
213
 
239
214
  var _default = QuestionTemplate;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":["createStyleSheet","theme","section","width","flexDirection","flexWrap","justifyContent","alignItems","spaced","paddingVertical","spacing","tiny","input","padding","borderWidth","borderColor","colors","gray","lightMedium","borderRadius","radius","common","backgroundColor","white","minWidth","htmlText","color","black","fontWeight","bold","lineHeight","text","medium","fontSize","regular","textAlign","Section","choices","index","focusedSelectId","onInputChange","handleBlur","handleFocus","isDisabled","styles","prefix","map","part","id","Item","props","templateContext","brandTheme","translations","inputNames","choice","name","isFocused","selectedStyle","primary","type","includes","value","choiceIndex","findIndex","disabledSuffix","selectedSuffix","handleInputChange","_item","_value","selectStyle","push","items","selectAnAnswer","QuestionTemplate","template","styleSheet","setStylesheet","_stylesheet","parts","sections"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAOA;;;;;;;;AAUA,MAAMA,gBAAgB,GAAIC,KAAD,KAAmC;AAC1DC,EAAAA,OAAO,EAAE;AACP;AACAC,IAAAA,KAAK,EAAE,MAFA;AAG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,IAAA,OAAO,EAAEmC,OAHX;AAIE,IAAA,KAAK,EAAEC,KAJT;AAKE,IAAA,UAAU,EAAEG,UALd;AAME,IAAA,WAAW,EAAEC,WANf;AAOE,IAAA,eAAe,EAAEH,eAPnB;AAQE,IAAA,aAAa,EAAEC,aARjB;AASE,IAAA,UAAU,EAAEG,UATd;AAUE,IAAA,MAAM,EAAEiC;AAVV,IADD,CADH,CADF;AAkBD,CA9CD;;eAgDeF,gB","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';\n\ntype StyleSheetType = {\n section: ViewStyle;\n spaced: ViewStyle;\n input: ViewStyle;\n htmlText: TextStyle;\n text: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType => ({\n section: {\n // backgroundColor: '#188', // flex-debug\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 input: {\n padding: theme.spacing.tiny,\n borderWidth: 1,\n borderColor: theme.colors.gray.lightMedium,\n borderRadius: theme.radius.common,\n backgroundColor: theme.colors.white,\n minWidth: 175\n },\n htmlText: {\n padding: theme.spacing.tiny,\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 30\n },\n text: {\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 SectionProps = {\n isDisabled: boolean;\n section: Array<TemplatePart>;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n index: number;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n styles: any;\n};\n\nconst Section = ({\n section,\n choices,\n index,\n focusedSelectId,\n onInputChange,\n handleBlur,\n handleFocus,\n isDisabled,\n styles\n}: SectionProps) => {\n const prefix = `question-section-${index + 1}`;\n\n return (\n <View style={styles.section} key={`container-${prefix}`}>\n {section.map((part, id) => {\n return (\n <View key={`${prefix}-${id}`} style={{flexDirection: 'row'}}>\n <Item\n prefix={prefix}\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={styles}\n />\n <Space type=\"micro\" />\n </View>\n );\n })}\n </View>\n );\n};\n\ntype ItemProps = {\n part: TemplatePart;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n index: number;\n prefix: string;\n isDisabled?: boolean;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n styles: any;\n};\n\nconst Item = (props: ItemProps) => {\n const {\n part,\n index,\n prefix,\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 = `${prefix}-part-${index + 1}`;\n const isFocused = focusedSelectId === id;\n\n const selectedStyle = brandTheme && {\n borderColor: brandTheme.colors.primary,\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 = (_item: TemplateTextChoice | TemplateListOfChoices) => (\n _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 selectStyle: ViewStyle[] = [styles.input];\n if (value) {\n selectStyle.push(selectedStyle);\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={styles.text}\n style={selectStyle}\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 const sections = [parts]; // @todo remove useless sections\n\n return (\n <View testID=\"question-template\">\n {sections.map((section, index) => (\n <Section\n key={index}\n section={section}\n choices={choices}\n index={index}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n focusedSelectId={focusedSelectId}\n onInputChange={onInputChange}\n isDisabled={isDisabled}\n styles={styleSheet}\n />\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 = (_item: TemplateTextChoice | TemplateListOfChoices) => (\n _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: ViewStyle[] = [styles.selectInput];\n if (value) {\n selectInputStyle.push(coloredText);\n }\n\n const selectTextStyle: ViewStyle[] = [styles.selectText];\n if (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;IAKTC,UAAU,EAAE;EALH,CAD+C;EAQ1DC,MAAM,EAAE;IACNC,eAAe,EAAER,KAAK,CAACS,OAAN,CAAcC;EADzB,CARkD;EAW1DC,QAAQ,EAAE;IACRC,KAAK,EAAEZ,KAAK,CAACa,MAAN,CAAaC,KADZ;IAERC,UAAU,EAAEf,KAAK,CAACe,UAAN,CAAiBC,IAFrB;IAGRC,UAAU,EAAE;EAHJ,CAXgD;EAgB1D;EACAC,WAAW;IACTC,OAAO,EAAEnB,KAAK,CAACS,OAAN,CAAcC,IADd;IAETU,YAAY,EAAEpB,KAAK,CAACqB,MAAN,CAAaC,OAFlB;IAGTC,QAAQ,EAAE,GAHD;IAITC,gBAAgB,EAAE,EAJT;IAKThB,eAAe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CAACyE,QAAD,IAAa,CAACC,UAAlB,EAA8B;IAC5B,OAAO,IAAP;EACD;;EAED,MAAMK,KAAqB,GAAG,IAAAC,4BAAA,EAAoBP,QAApB,CAA9B;EAEA,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEC,UAAU,CAACzE,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACG8E,KAAK,CAAC9B,GAAN,CAAU,CAACd,IAAD,EAAOiB,EAAP,kBACT,6BAAC,iBAAD;IAAM,GAAG,EAAG,iBAAgBA,EAAG,EAA/B;IAAkC,KAAK,EAAE;MAACjD,aAAa,EAAE;IAAhB;EAAzC,gBACE,6BAAC,IAAD;IACE,IAAI,EAAEgC,IADR;IAEE,OAAO,EAAEI,OAFX;IAGE,KAAK,EAAEa,EAHT;IAIE,eAAe,EAAEd,eAJnB;IAKE,UAAU,EAAED,UALd;IAME,UAAU,EAAEI,UANd;IAOE,WAAW,EAAEC,WAPf;IAQE,aAAa,EAAEF,aARjB;IASE,MAAM,EAAEkC;EATV,EADF,eAYE,6BAAC,eAAD;IAAO,IAAI,EAAC;EAAZ,EAZF,CADD,CADH,CADF;AAoBD,CA/CD;;eAiDeF,gB"}
@@ -21,11 +21,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;AACA,UAAMK,eAAe,GAAGZ,aAAa,CAACC,KAAd,KAAwBA,KAAxB,GAAgCY,eAAMb,aAAtC,GAAsDa,eAAMN,MAApF;AACA,UAAMO,mBAAmB,GAAGJ,QAAQ,GAAGG,eAAME,cAAT,GAA0BF,eAAMG,gBAApE;AAEA,wBACE;AACE,mBAAU,QADZ;AAEE,oBAAYL,SAAS,IAAIV,KAF3B;AAGE,MAAA,SAAS,EAAE,yBAAWW,eAAX,EAA4BC,eAAMI,SAAlC,EAA6CH,mBAA7C,CAHb;AAIE,MAAA,OAAO,EAAEL,OAJX;AAKE,MAAA,KAAK,eACCC,QAAQ,IAAI;AACdQ,QAAAA,SAAS,EAAG,cAAa,gEAA6Bd,gBAA7B,CAA+C;AAD1D,OADb,CALP;AAUE,uBAAeM,QAVjB;AAWE,MAAA,GAAG,EAAEF;AAXP,oBAaE;AACE,mBAAU,mBADZ;AAEE,MAAA,KAAK,EAAE;AAACW,QAAAA,eAAe,EAAET,QAAQ,GAAGN,gBAAH,GAAsB;AAAU;;AAA1D,OAFT;AAGE,MAAA,SAAS,EAAES,eAAMO;AAHnB,MAbF,eAkBE;AACE,mBAAU,cADZ;AAEE,MAAA,SAAS,EAAEP,eAAMQ,UAFnB,CAGE;AAHF;AAIE,MAAA,uBAAuB,EAAE;AAACC,QAAAA,MAAM,EAAErB;AAAT;AAJ3B,MAlBF,CADF;AA2BD,GAhCD,CAFiB,EAmCnB,CAACF,OAAD,EAAUC,aAAV,EAAyBI,gBAAzB,CAnCmB,CAArB;AAsCA,sBACE;AAAK,iBAAU,KAAf;AAAqB,IAAA,SAAS,EAAES,eAAMU;AAAtC,KACGlB,YADH,CADF;AAKD,CAjDD;;AAmDAT,GAAG,CAAC4B,YAAJ,GAAmB;AACjBrB,EAAAA,IAAI,EAAEsB,kBAASC,iBAAT,CAA2BvB;AADhB,CAAnB;AAIAP,GAAG,CAAC+B,SAAJ,2CAAgB;AACd5B,EAAAA,OAAO,EAAE6B,mBAAUC,OAAV,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"],"m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;QAACa,eAAe,EAAEX,QAAQ,GAAGR,gBAAH,GAAsB;QAAU;;MAA1D,CAFT;MAGE,SAAS,EAAEW,cAAA,CAAMS;IAHnB,EAbF,eAkBE;MACE,aAAU,cADZ;MAEE,SAAS,EAAET,cAAA,CAAMU,UAFnB,CAGE;MAHF;MAIE,uBAAuB,EAAE;QAACC,MAAM,EAAE1B;MAAT;IAJ3B,EAlBF,CADF;EA2BD,CAhCD,CAFiB,EAmCnB,CAACH,OAAD,EAAUC,aAAV,EAAyBM,gBAAzB,CAnCmB,CAArB;EAsCA,oBACE;IAAK,aAAU,KAAf;IAAqB,SAAS,EAAEW,cAAA,CAAMY;EAAtC,GACGrB,YADH,CADF;AAKD,CAjDD;;AAmDAZ,GAAG,CAACkC,YAAJ,GAAmB;EACjB1B,IAAI,EAAE2B,iBAAA,CAASC,iBAAT,CAA2B5B;AADhB,CAAnB;AAIAR,GAAG,CAACqC,SAAJ,2CAAgB;EACdlC,OAAO,EAAEmC,kBAAA,CAAUC,OAAV,CACPD,kBAAA,CAAUE,KAAV,CAAgB;IACdlC,KAAK,EAAEgC,kBAAA,CAAUG,MADH;IAEdvB,QAAQ,EAAEoB,kBAAA,CAAUI,IAFN;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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e, 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,CAAUU;AADI,CAAtB;;AAIA,MAAMM,OAAO,GAAG,CAAC;EAACC;AAAD,CAAD,KAAe;EAC7B,MAAMC,YAAY,GAAGD,OAAO,CAACE,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;IAChD,MAAM;MAAClB,OAAD;MAAUM,KAAV;MAAiBF;IAAjB,IAA6Ba,MAAnC;IACA,oBACE;MACE,SAAS,EAAE,IAAAE,mBAAA,EAAWf,QAAQ,GAAGM,cAAA,CAAMU,eAAT,GAA2BV,cAAA,CAAMW,UAApD,EAAgEX,cAAA,CAAMY,SAAtE,CADb;MAEE,aAAU,QAFZ;MAGE,OAAO,EAAEtB,OAHX;MAIE,GAAG,EAAEkB,GAJP,CAKE;MALF;MAME,uBAAuB,EAAE;QAACK,MAAM,E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../../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,QAAM;AAACC,IAAAA;AAAD,MAAYF,KAAlB;AACA,QAAMG,IAAI,GAAG,kCAAmBF,aAAnB,CAAb;AACA,QAAMG,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAAzB;AAEA,QAAME,YAAY,GAAGH,OAAO,CAACI,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;AAChD,UAAM;AAACC,MAAAA,OAAD;AAAUC,MAAAA,KAAV;AAAiBC,MAAAA,QAAjB;AAA2BC,MAAAA,KAA3B;AAAkCC,MAAAA;AAAlC,QAA+CN,MAArD;AAEA,wBACE;AACE,MAAA,OAAO,EAAEE,OADX;AAEE,uBAAeE,QAFjB;AAGE,mBAAU,eAHZ;AAIE,MAAA,KAAK,eACC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AAAA,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;IAChD,MAAM;MAACC,OAAD;MAAUC,KAAV;MAAiBC,QAAjB;MAA2BC,KAA3B;MAAkCC;IAAlC,IAA+CN,MAArD;IAEA,oBACE;MACE,OAAO,EAAEE,OADX;MAEE,iBAAeE,QAFjB;MAGE,aAAU,eAHZ;MAIE,KAAK,eACCA,QAAQ,IAAI;QACdG,SAAS,EAAG,cAAa,IAAAC,0DAAA,EAA6BX,gBAA7B,CAA+C;MAD1D,CADb,CAJP;MASE,SAAS,EAAEO,QAAQ,GAAGK,cAAA,CAAML,QAAT,GAAoBK,cAAA,CAAMT,MAT/C;MAUE,GAAG,EAAEC;IAVP,gBAYE;MACE,aAAU,kBADZ;MAEE,KAAK,EAAE;QACLS,eAAe,EAAEN,QAAQ,GAAGP,gBAAH,GAAsB;MAD1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