@pie-element/categorize 13.1.0-next.19 → 13.1.1-next.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 (252) hide show
  1. package/dist/author/defaults.d.ts +223 -0
  2. package/dist/author/defaults.js +170 -0
  3. package/dist/author/design/builder.d.ts +10 -0
  4. package/dist/author/design/builder.js +24 -0
  5. package/dist/author/design/buttons.d.ts +28 -0
  6. package/dist/author/design/buttons.js +36 -0
  7. package/dist/author/design/categories/RowLabel.d.ts +23 -0
  8. package/dist/author/design/categories/RowLabel.js +47 -0
  9. package/dist/author/design/categories/alternateResponses.d.ts +31 -0
  10. package/dist/author/design/categories/alternateResponses.js +62 -0
  11. package/dist/author/design/categories/category.d.ts +44 -0
  12. package/dist/author/design/categories/category.js +98 -0
  13. package/dist/author/design/categories/choice-preview.d.ts +25 -0
  14. package/dist/author/design/categories/choice-preview.js +60 -0
  15. package/dist/author/design/categories/droppable-placeholder.d.ts +11 -0
  16. package/dist/author/design/categories/droppable-placeholder.js +71 -0
  17. package/dist/author/design/categories/index.d.ts +41 -0
  18. package/dist/author/design/categories/index.js +146 -0
  19. package/dist/author/design/choices/choice.d.ts +11 -0
  20. package/dist/author/design/choices/choice.js +129 -0
  21. package/dist/author/design/choices/config.d.ts +21 -0
  22. package/dist/author/design/choices/config.js +33 -0
  23. package/dist/author/design/choices/index.d.ts +41 -0
  24. package/dist/author/design/choices/index.js +110 -0
  25. package/dist/author/design/header.d.ts +24 -0
  26. package/dist/author/design/header.js +49 -0
  27. package/dist/author/design/index.d.ts +52 -0
  28. package/dist/author/design/index.js +417 -0
  29. package/dist/author/design/input-header.d.ts +39 -0
  30. package/dist/author/design/input-header.js +69 -0
  31. package/dist/author/design/utils.d.ts +9 -0
  32. package/dist/author/design/utils.js +7 -0
  33. package/dist/author/index.d.ts +51 -0
  34. package/dist/author/index.js +87 -0
  35. package/dist/author/main.d.ts +23 -0
  36. package/dist/author/main.js +30 -0
  37. package/dist/author/utils.d.ts +16 -0
  38. package/dist/author/utils.js +17 -0
  39. package/dist/controller/defaults.d.ts +34 -0
  40. package/dist/controller/defaults.js +29 -0
  41. package/dist/controller/index.d.ts +61 -0
  42. package/dist/controller/index.js +155 -0
  43. package/dist/controller/utils.d.ts +20 -0
  44. package/dist/controller/utils.js +35 -0
  45. package/dist/delivery/categorize/categories.d.ts +34 -0
  46. package/dist/delivery/categorize/categories.js +66 -0
  47. package/dist/delivery/categorize/category.d.ts +28 -0
  48. package/dist/delivery/categorize/category.js +48 -0
  49. package/dist/delivery/categorize/choice.d.ts +27 -0
  50. package/dist/delivery/categorize/choice.js +94 -0
  51. package/dist/delivery/categorize/choices.d.ts +39 -0
  52. package/dist/delivery/categorize/choices.js +51 -0
  53. package/dist/delivery/categorize/droppable-placeholder.d.ts +32 -0
  54. package/dist/delivery/categorize/droppable-placeholder.js +64 -0
  55. package/dist/delivery/categorize/grid-content.d.ts +25 -0
  56. package/dist/delivery/categorize/grid-content.js +39 -0
  57. package/dist/delivery/categorize/index.d.ts +57 -0
  58. package/dist/delivery/categorize/index.js +260 -0
  59. package/dist/delivery/index.d.ts +27 -0
  60. package/dist/delivery/index.js +152 -0
  61. package/dist/index.d.ts +1 -0
  62. package/dist/index.iife.d.ts +8 -0
  63. package/dist/index.iife.js +152 -0
  64. package/dist/index.js +2 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  174. package/package.json +53 -17
  175. package/CHANGELOG.json +0 -1637
  176. package/CHANGELOG.md +0 -2524
  177. package/LICENSE.md +0 -5
  178. package/README.md +0 -5
  179. package/configure/CHANGELOG.json +0 -1202
  180. package/configure/CHANGELOG.md +0 -2107
  181. package/configure/lib/defaults.js +0 -222
  182. package/configure/lib/defaults.js.map +0 -1
  183. package/configure/lib/design/builder.js +0 -55
  184. package/configure/lib/design/builder.js.map +0 -1
  185. package/configure/lib/design/buttons.js +0 -59
  186. package/configure/lib/design/buttons.js.map +0 -1
  187. package/configure/lib/design/categories/RowLabel.js +0 -66
  188. package/configure/lib/design/categories/RowLabel.js.map +0 -1
  189. package/configure/lib/design/categories/alternateResponses.js +0 -116
  190. package/configure/lib/design/categories/alternateResponses.js.map +0 -1
  191. package/configure/lib/design/categories/category.js +0 -153
  192. package/configure/lib/design/categories/category.js.map +0 -1
  193. package/configure/lib/design/categories/choice-preview.js +0 -79
  194. package/configure/lib/design/categories/choice-preview.js.map +0 -1
  195. package/configure/lib/design/categories/droppable-placeholder.js +0 -93
  196. package/configure/lib/design/categories/droppable-placeholder.js.map +0 -1
  197. package/configure/lib/design/categories/index.js +0 -256
  198. package/configure/lib/design/categories/index.js.map +0 -1
  199. package/configure/lib/design/choices/choice.js +0 -187
  200. package/configure/lib/design/choices/choice.js.map +0 -1
  201. package/configure/lib/design/choices/config.js +0 -58
  202. package/configure/lib/design/choices/config.js.map +0 -1
  203. package/configure/lib/design/choices/index.js +0 -197
  204. package/configure/lib/design/choices/index.js.map +0 -1
  205. package/configure/lib/design/header.js +0 -71
  206. package/configure/lib/design/header.js.map +0 -1
  207. package/configure/lib/design/index.js +0 -727
  208. package/configure/lib/design/index.js.map +0 -1
  209. package/configure/lib/design/input-header.js +0 -105
  210. package/configure/lib/design/input-header.js.map +0 -1
  211. package/configure/lib/design/utils.js +0 -12
  212. package/configure/lib/design/utils.js.map +0 -1
  213. package/configure/lib/index.js +0 -147
  214. package/configure/lib/index.js.map +0 -1
  215. package/configure/lib/main.js +0 -44
  216. package/configure/lib/main.js.map +0 -1
  217. package/configure/lib/utils.js +0 -43
  218. package/configure/lib/utils.js.map +0 -1
  219. package/configure/package.json +0 -32
  220. package/controller/CHANGELOG.json +0 -452
  221. package/controller/CHANGELOG.md +0 -1366
  222. package/controller/lib/defaults.js +0 -33
  223. package/controller/lib/defaults.js.map +0 -1
  224. package/controller/lib/index.js +0 -479
  225. package/controller/lib/index.js.map +0 -1
  226. package/controller/lib/utils.js +0 -69
  227. package/controller/lib/utils.js.map +0 -1
  228. package/controller/package.json +0 -18
  229. package/docs/config-schema.json +0 -2897
  230. package/docs/config-schema.json.md +0 -2138
  231. package/docs/demo/config.js +0 -8
  232. package/docs/demo/generate.js +0 -357
  233. package/docs/demo/index.html +0 -1
  234. package/docs/demo/session.js +0 -12
  235. package/docs/pie-schema.json +0 -1784
  236. package/docs/pie-schema.json.md +0 -1046
  237. package/lib/categorize/categories.js +0 -135
  238. package/lib/categorize/categories.js.map +0 -1
  239. package/lib/categorize/category.js +0 -67
  240. package/lib/categorize/category.js.map +0 -1
  241. package/lib/categorize/choice.js +0 -140
  242. package/lib/categorize/choice.js.map +0 -1
  243. package/lib/categorize/choices.js +0 -99
  244. package/lib/categorize/choices.js.map +0 -1
  245. package/lib/categorize/droppable-placeholder.js +0 -84
  246. package/lib/categorize/droppable-placeholder.js.map +0 -1
  247. package/lib/categorize/grid-content.js +0 -55
  248. package/lib/categorize/grid-content.js.map +0 -1
  249. package/lib/categorize/index.js +0 -450
  250. package/lib/categorize/index.js.map +0 -1
  251. package/lib/index.js +0 -316
  252. package/lib/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_utils","require","_react","_interopRequireDefault","_propTypes","_styles","_core","_configUi","_categorize","_editableHtmlTipTap","_drag","_mathRendering","_categories","_alternateResponses","_choices","_choice","_choicePreview","_builder","_header","_utils2","_translator","translator","Translator","dropdown","Panel","toggle","radio","numberField","settings","Provider","IdProvider","uid","DragPreviewWrapper","React","Component","constructor","args","_defineProperty2","default","createRef","componentDidMount","containerRef","current","setTimeout","renderMath","render","createElement","ref","props","children","StyledHeader","styled","Header","theme","marginBottom","spacing","StyledInputContainer","InputContainer","width","paddingTop","marginTop","ErrorText","fontSize","typography","color","palette","error","main","Design","model","onChange","updatedModel","choices","map","c","categoryCount","checkAllowMultiplePlacements","allowMultiplePlacementsEnabled","correctResponse","ensureNoExtraChoicesInAnswer","ensureNoExtraChoicesInAlternate","categories","id","label","h","content","maxChoicesPerCategory","allowMaxChoicesPerCategory","rationale","teacherInstructions","feedback","updateModel","cr","alternateResponses","prompt","index","filter","alt","altIndex","choice","countInAnswer","allowMultiplePlacements","multiplePlacements","enabled","disabled","maxChoices","getMaxCategoryChoices","event","active","draggedItem","data","setState","activeDragItem","over","scrollX","window","scrollY","requestAnimationFrame","scrollTo","allowAlternateEnabled","activeData","overData","choiceIndex","overType","type","isPreview","isNewChoice","choiceId","split","removeChoiceFromSource","moveChoice","categoryId","addChoiceToCategory","moveChoiceInAlternate","alternateResponseIndex","addChoiceToAlternateCategory","isAlternateSource","undefined","deleteChoiceFromCategory","category","find","deleteChoiceFromAlternateCategory","addedChoice","newCorrectResponse","moveChoiceToCategory","verifyAllowMultiplePlacements","maxCategoryChoices","removeChoiceFromCategory","from","to","forEach","a","push","reduce","acc","currentValue","foundIndex","findIndex","alternateIndex","moveChoiceToAlternate","removeChoiceFromAlternate","state","configuration","generateId","imageSupport","uploadSoundSupport","onConfigurationChanged","allowAlternate","baseInputConfiguration","categoriesPerRow","choicesPosition","contentDimensions","lockChoiceOrder","maxImageHeight","maxImageWidth","maxPlacements","minCategoriesPerRow","partialScoring","scoringType","settingsPanelDisabled","spellCheck","studentInstructions","withRubric","mathMlOptions","language","languageChoices","allowMaxAnswerChoices","errors","feedbackEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","extraCSSRules","promptError","rationaleError","teacherInstructionsError","toolbarOpts","position","config","columns","buildCategories","buildAlternateResponses","correctResponseCount","countChoiceInCorrectResponse","defaultImageMaxWidth","defaultImageMaxHeight","panelSettings","min","max","perChoice","maxAnswerChoices","length","options","panelProperties","studentInstructionsEnabled","rubricEnabled","isOpened","isAlertModalOpened","alertMaxChoicesMsg","t","lng","DragProvider","onDragStart","onDragEnd","value","layout","ConfigLayout","dimensions","hideSettings","onChangeModel","onChangeConfiguration","groups","Settings","Properties","modal","AlertDialog","title","text","open","onClose","onAlertModalCancel","markup","changeTeacherInstructions","nonEmpty","pluginProps","getPluginProps","inputConfiguration","languageCharactersProps","onPromptChanged","disableUnderline","onModelChanged","buttonLabel","onAdd","onAddAlternateResponse","categoriesList","Fragment","key","variant","onRemoveAlternateResponse","changeRationale","FeedbackConfig","changeFeedback","DragOverlay","renderDragOverlay","exports","PropTypes","object","className","string","func","isRequired","shape","add","delete","_default"],"sources":["../../src/design/index.jsx"],"sourcesContent":["import { getPluginProps } from './utils';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { DragOverlay } from '@dnd-kit/core';\nimport { FeedbackConfig, InputContainer, layout, settings } from '@pie-lib/config-ui';\nimport {\n countInAnswer,\n ensureNoExtraChoicesInAnswer,\n ensureNoExtraChoicesInAlternate,\n moveChoiceToCategory,\n moveChoiceToAlternate,\n removeChoiceFromCategory,\n removeChoiceFromAlternate,\n verifyAllowMultiplePlacements,\n} from '@pie-lib/categorize';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { DragProvider, uid } from '@pie-lib/drag';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nimport Categories from './categories';\nimport AlternateResponses from './categories/alternateResponses';\nimport Choices from './choices';\nimport Choice from './choices/choice';\nimport ChoicePreview from './categories/choice-preview';\nimport { buildAlternateResponses, buildCategories } from './builder';\nimport Header from './header';\nimport { getMaxCategoryChoices, multiplePlacements } from '../utils';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\nconst { dropdown, Panel, toggle, radio, numberField } = settings;\nconst { Provider: IdProvider } = uid;\n\n// Simple wrapper to render math in DragOverlay portal\nclass DragPreviewWrapper extends React.Component {\n containerRef = React.createRef();\n\n componentDidMount() {\n if (this.containerRef.current) {\n setTimeout(() => renderMath(this.containerRef.current), 0);\n }\n }\n\n render() {\n return <div ref={this.containerRef}>{this.props.children}</div>;\n }\n}\n\nconst StyledHeader = styled(Header)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst StyledInputContainer = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(2),\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nexport class Design extends React.Component {\n static propTypes = {\n configuration: PropTypes.object,\n className: PropTypes.string,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n uid: PropTypes.string,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n constructor(props) {\n super(props);\n this.uid = props.uid || uid.generateId();\n this.state = {\n activeDragItem: null,\n };\n }\n\n updateModel = (props) => {\n const { model, onChange } = this.props;\n\n const updatedModel = {\n ...model,\n ...props,\n };\n\n updatedModel.choices = updatedModel.choices.map((c) => ({\n ...c,\n categoryCount: this.checkAllowMultiplePlacements(updatedModel.allowMultiplePlacementsEnabled, c),\n }));\n\n //Ensure that there are no extra choices in correctResponse, if the user has decided that only one choice may be used.\n updatedModel.correctResponse = ensureNoExtraChoicesInAnswer(\n updatedModel.correctResponse || [],\n updatedModel.choices,\n );\n\n //Ensure that there are no extra choices in alternate responses, if the user has decided that only one choice may be used.\n updatedModel.correctResponse = ensureNoExtraChoicesInAlternate(\n updatedModel.correctResponse || [],\n updatedModel.choices,\n );\n\n //clean categories\n updatedModel.categories = updatedModel.categories.map((c) => ({\n id: c.id,\n label: c.label,\n }));\n\n updatedModel.choices = updatedModel.choices.map((h) => ({\n id: h.id,\n content: h.content,\n categoryCount: h.categoryCount,\n }));\n\n // ensure that maxChoicesPerCategory is reset if author switch back the corresponding switch (allowMaxChoicesPerCategory)\n updatedModel.maxChoicesPerCategory = updatedModel.allowMaxChoicesPerCategory\n ? updatedModel.maxChoicesPerCategory\n : 0;\n\n onChange(updatedModel);\n };\n\n changeRationale = (rationale) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n rationale,\n });\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n teacherInstructions,\n });\n };\n\n changeFeedback = (feedback) => {\n this.updateModel({ feedback });\n };\n\n onAddAlternateResponse = () => {\n const {\n model: { correctResponse },\n } = this.props;\n\n this.updateModel({\n correctResponse: (correctResponse || []).map((cr) => ({\n ...cr,\n alternateResponses: [...(cr.alternateResponses || []), []],\n })),\n });\n };\n\n onPromptChanged = (prompt) => this.updateModel({ prompt });\n\n onRemoveAlternateResponse = (index) => {\n const {\n model: { correctResponse },\n } = this.props;\n\n this.updateModel({\n correctResponse: (correctResponse || []).map((cr) => ({\n ...cr,\n alternateResponses: (cr.alternateResponses || []).filter((alt, altIndex) => altIndex !== index),\n })),\n });\n };\n\n countChoiceInCorrectResponse = (choice) => {\n const { model } = this.props;\n\n return countInAnswer(choice.id, model.correctResponse);\n };\n\n checkAllowMultiplePlacements = (allowMultiplePlacements, c) => {\n if (allowMultiplePlacements === multiplePlacements.enabled) {\n return 0;\n }\n\n if (allowMultiplePlacements === multiplePlacements.disabled) {\n return 1;\n }\n\n return c.categoryCount || 0;\n };\n\n isAlertModalOpened = () => {\n const { model } = this.props;\n const { maxChoicesPerCategory = 0 } = model || {};\n const maxChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so modal should not be opened\n return maxChoicesPerCategory !== 0 ? maxChoices > maxChoicesPerCategory : false;\n };\n\n onAlertModalCancel = () => {\n const { model } = this.props;\n const maxChoices = getMaxCategoryChoices(model);\n this.updateModel({ maxChoicesPerCategory: maxChoices });\n };\n\n onDragStart = (event) => {\n const { active } = event;\n const draggedItem = active.data.current;\n\n this.setState({\n activeDragItem: draggedItem,\n });\n };\n\n onDragEnd = ({ active, over }) => {\n // scrolls back to the original draggable element (scrollIntoViewIfNeeded).\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n\n this.setState({ activeDragItem: null });\n if (!active) {\n return;\n }\n\n // Restore scroll position after dnd-kit's drop animation fires scrollIntoViewIfNeeded.\n // Two rAF frames are needed: dnd-kit uses one rAF internally for focus/scroll restoration.\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n });\n });\n\n const { model } = this.props;\n const { allowAlternateEnabled, categories = [], choices = [] } = model;\n\n const activeData = active?.data?.current;\n const overData = over?.data?.current;\n\n if (!activeData) return;\n\n const choiceIndex = activeData.choiceIndex || 0;\n const overType = overData?.type;\n const isPreview = activeData.type === 'choice-preview';\n const isNewChoice = activeData.type === 'choice';\n\n const choiceId =\n activeData.choice?.id || (typeof activeData.id === 'string' ? activeData.id.split('-')[0] : activeData.id);\n\n if (isPreview && (!overData || overType === 'choice')) {\n this.removeChoiceFromSource(activeData, choiceIndex, { allowAlternateEnabled, categories, choices });\n return;\n }\n\n if (isPreview && overType === 'category') {\n return this.moveChoice(choiceId, activeData.categoryId, overData.id, choiceIndex);\n }\n\n if (isNewChoice && overType === 'category') {\n return this.addChoiceToCategory({ id: activeData.id }, overData.id);\n }\n\n if (isPreview && overType === 'category-alternate') {\n return this.moveChoiceInAlternate(\n choiceId,\n activeData.categoryId,\n overData.id,\n choiceIndex,\n overData.alternateResponseIndex,\n );\n }\n\n if (allowAlternateEnabled && isNewChoice && overType === 'category-alternate') {\n return this.addChoiceToAlternateCategory({ id: activeData.id }, overData.id, overData.alternateResponseIndex);\n }\n };\n\n removeChoiceFromSource = (activeData, choiceIndex, { allowAlternateEnabled, categories, choices }) => {\n const isAlternateSource = activeData.alternateResponseIndex !== undefined;\n\n if (!isAlternateSource) {\n this.deleteChoiceFromCategory(activeData.categoryId, activeData.choiceId, choiceIndex);\n return;\n }\n\n if (!allowAlternateEnabled) return;\n\n const category = categories?.find((c) => c.id === activeData.categoryId);\n const choice = choices?.find((c) => c.id === activeData.choiceId);\n\n if (category && choice) {\n this.deleteChoiceFromAlternateCategory(category, choice, choiceIndex, activeData.alternateResponseIndex);\n }\n };\n\n addChoiceToCategory = (addedChoice, categoryId) => {\n const { model } = this.props;\n let { choices = [], correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === addedChoice.id);\n\n let newCorrectResponse = moveChoiceToCategory(addedChoice.id, undefined, categoryId, 0, correctResponse);\n\n if (choice.categoryCount !== 0) {\n newCorrectResponse = verifyAllowMultiplePlacements(addedChoice, categoryId, newCorrectResponse);\n }\n const maxCategoryChoices = getMaxCategoryChoices(model);\n\n this.updateModel({\n correctResponse: newCorrectResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n deleteChoiceFromCategory = (categoryId, choiceId, choiceIndex) => {\n const { model } = this.props;\n const correctResponse = removeChoiceFromCategory(choiceId, categoryId, choiceIndex, model.correctResponse);\n\n this.updateModel({ correctResponse });\n };\n\n moveChoice = (choiceId, from, to, choiceIndex) => {\n const { model } = this.props;\n let { choices, correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === choiceId);\n if (to === from || !choice) {\n return;\n }\n if (choice.categoryCount !== 0) {\n correctResponse = moveChoiceToCategory(choice.id, from, to, choiceIndex, correctResponse);\n correctResponse = verifyAllowMultiplePlacements(choice, to, correctResponse);\n } else if (choice.categoryCount === 0) {\n correctResponse = moveChoiceToCategory(choice.id, undefined, to, 0, correctResponse);\n }\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n // methods for alternate responses\n addChoiceToAlternateCategory = (addedChoice, categoryId, altIndex) => {\n const { model } = this.props;\n const { correctResponse, choices, maxChoicesPerCategory = 0 } = model;\n\n const choice = choices.find((c) => c.id === addedChoice.id);\n\n correctResponse.forEach((a) => {\n if (a.category === categoryId) {\n a.alternateResponses = a.alternateResponses || [];\n\n if (a.alternateResponses[altIndex] === undefined) {\n a.alternateResponses[altIndex] = [];\n }\n\n a.alternateResponses[altIndex].push(addedChoice.id);\n if (choice.categoryCount && choice.categoryCount !== 0) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].reduce((acc, currentValue) => {\n if (currentValue === choice.id) {\n const foundIndex = acc.findIndex((c) => c === choice.id);\n if (foundIndex === -1) {\n acc.push(currentValue);\n }\n } else {\n acc.push(currentValue);\n }\n\n return acc;\n }, []);\n }\n\n return a;\n } else {\n if (a.alternateResponses[altIndex] && choice.categoryCount !== 0) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].filter((c) => c !== addedChoice.id);\n return a;\n }\n }\n\n return a;\n });\n\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n moveChoiceInAlternate = (choiceId, from, to, choiceIndex, alternateIndex) => {\n const { model } = this.props;\n let { choices, correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === choiceId);\n correctResponse = moveChoiceToAlternate(\n choiceId,\n from,\n to,\n choiceIndex,\n correctResponse,\n alternateIndex,\n choice?.categoryCount,\n );\n\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n deleteChoiceFromAlternateCategory = (category, choice, choiceIndex, altIndex) => {\n const { model } = this.props;\n\n const correctResponse = removeChoiceFromAlternate(\n choice.id,\n category.id,\n choiceIndex,\n altIndex,\n model.correctResponse,\n );\n\n this.updateModel({ correctResponse });\n };\n\n renderDragOverlay = () => {\n const { activeDragItem } = this.state;\n const { model, configuration } = this.props;\n\n if (!activeDragItem) return null;\n\n if (activeDragItem.type === 'choice') {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n\n return <Choice choice={choice} configuration={configuration} />;\n } else if (activeDragItem.type === 'choice-preview' && activeDragItem.alternateResponseIndex === undefined) {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n return <ChoicePreview choice={choice} />;\n } else if (activeDragItem.type === 'choice-preview' && activeDragItem.alternateResponseIndex !== undefined) {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n return <ChoicePreview choice={choice} alternateResponseIndex={activeDragItem.alternateResponseIndex} />;\n }\n\n return null;\n };\n\n render() {\n const { configuration, imageSupport, model, uploadSoundSupport, onConfigurationChanged } = this.props;\n const {\n allowAlternate = {},\n allowMultiplePlacements = {},\n baseInputConfiguration = {},\n categoriesPerRow = {},\n choicesPosition = {},\n contentDimensions = {},\n feedback = {},\n lockChoiceOrder = {},\n maxImageHeight = {},\n maxImageWidth = {},\n maxPlacements = {},\n minCategoriesPerRow = 1,\n partialScoring = {},\n prompt = {},\n rationale = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n allowMaxAnswerChoices = {},\n } = configuration || {};\n const {\n allowAlternateEnabled,\n allowMaxChoicesPerCategory,\n errors,\n feedbackEnabled,\n maxChoicesPerCategory,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n extraCSSRules,\n } = model || {};\n const {\n prompt: promptError,\n rationale: rationaleError,\n teacherInstructions: teacherInstructionsError,\n } = errors || {};\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const config = model.config || {};\n config.choices = config.choices || { label: '', columns: 2 };\n\n const categories = buildCategories(model.categories || [], model.choices || [], model.correctResponse || []);\n\n const alternateResponses = buildAlternateResponses(\n model.categories || [],\n model.choices || [],\n model.correctResponse || [],\n );\n\n const choices = model.choices.map((c) => {\n c.correctResponseCount = this.countChoiceInCorrectResponse(c);\n // ensure categoryCount is set even though updatedModel hasn't been called\n c.categoryCount = this.checkAllowMultiplePlacements(model.allowMultiplePlacementsEnabled, c);\n return c;\n });\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const panelSettings = {\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),\n categoriesPerRow:\n categoriesPerRow.settings &&\n numberField(categoriesPerRow.label, {\n label: categoriesPerRow.label,\n min: minCategoriesPerRow,\n max: 6,\n }),\n choicesPosition: choicesPosition.settings && radio(choicesPosition.label, ['below', 'above', 'left', 'right']),\n allowMultiplePlacementsEnabled:\n allowMultiplePlacements.settings &&\n dropdown(allowMultiplePlacements.label, [\n multiplePlacements.enabled,\n multiplePlacements.disabled,\n multiplePlacements.perChoice,\n ]),\n maxAnswerChoices:\n allowMaxAnswerChoices.settings &&\n numberField(allowMaxAnswerChoices.label, {\n label: '',\n min: choices?.length || 0,\n max: 30,\n }),\n allowMaxChoicesPerCategory: maxPlacements.settings && toggle(maxPlacements.label),\n maxChoicesPerCategory:\n allowMaxChoicesPerCategory === true &&\n numberField(maxPlacements.label, {\n label: '',\n min: 0,\n max: 30,\n }),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n allowAlternateEnabled: allowAlternate.settings && toggle(allowAlternate.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const isOpened = this.isAlertModalOpened();\n const alertMaxChoicesMsg = translator.t('translation:categorize:maxChoicesPerCategoryRestriction', {\n lng: model.language,\n maxChoicesPerCategory,\n });\n\n return (\n <DragProvider onDragStart={this.onDragStart} onDragEnd={this.onDragEnd}>\n <IdProvider value={this.uid}>\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={this.updateModel}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n modal={\n <AlertDialog\n title={'Warning'}\n text={alertMaxChoicesMsg}\n open={isOpened}\n onClose={this.onAlertModalCancel}\n />\n }\n />\n }\n >\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n error={teacherInstructionsError}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {promptEnabled && (\n <StyledInputContainer label={prompt.label}>\n <EditableHtml\n markup={model.prompt || ''}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n error={promptError}\n nonEmpty={false}\n disableUnderline\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.prompt}\n maxImageHeight={maxImageHeight && maxImageHeight.prompt}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n <Categories\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n model={model}\n categories={categories || []}\n onModelChanged={this.updateModel}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n configuration={configuration}\n defaultImageMaxWidth={defaultImageMaxWidth}\n defaultImageMaxHeight={defaultImageMaxHeight}\n mathMlOptions={mathMlOptions}\n />\n\n <Choices\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n choices={choices}\n model={model}\n onModelChanged={this.updateModel}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n configuration={configuration}\n defaultImageMaxWidth={defaultImageMaxWidth}\n defaultImageMaxHeight={defaultImageMaxHeight}\n />\n\n {allowAlternateEnabled && (\n <StyledHeader\n label=\"Alternate Responses\"\n buttonLabel=\"ADD AN ALTERNATE RESPONSE\"\n onAdd={this.onAddAlternateResponse}\n />\n )}\n {allowAlternateEnabled &&\n alternateResponses.map((categoriesList, index) => {\n return (\n <React.Fragment key={index}>\n <StyledHeader\n variant={'subtitle1'}\n label=\"Alternate Response\"\n buttonLabel=\"REMOVE ALTERNATE RESPONSE\"\n onAdd={() => this.onRemoveAlternateResponse(index)}\n />\n <AlternateResponses\n altIndex={index}\n imageSupport={imageSupport}\n model={model}\n configuration={configuration}\n categories={categoriesList}\n onModelChanged={this.updateModel}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n />\n </React.Fragment>\n );\n })}\n\n {rationaleEnabled && (\n <StyledInputContainer label={rationale.label}>\n <EditableHtml\n markup={model.rationale || ''}\n onChange={this.changeRationale}\n imageSupport={imageSupport}\n error={rationaleError}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {rationaleError && <ErrorText>{rationaleError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {feedbackEnabled && (\n <FeedbackConfig feedback={model.feedback} onChange={this.changeFeedback} toolbarOpts={toolbarOpts} />\n )}\n </layout.ConfigLayout>\n <DragOverlay>\n <DragPreviewWrapper>{this.renderDragOverlay()}</DragPreviewWrapper>\n </DragOverlay>\n </IdProvider>\n </DragProvider>\n );\n }\n}\n\nexport default Design;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAUA,IAAAQ,mBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AAEA,IAAAW,WAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,mBAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,QAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,OAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,I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AACd,kBAAkB,QAAE,IAAI,CAACyO,iBAAiB,CAAC,CAAsB,CACvD,CACH,CACA,CAAC;EAEnB;AACF;AAACC,OAAA,CAAAtM,MAAA,GAAAA,MAAA;AAAA,IAAA/B,gBAAA,CAAAC,OAAA,EA3rBY8B,MAAM,eACE;EACjB8F,aAAa,EAAEyG,kBAAS,CAACC,MAAM;EAC/BC,SAAS,EAAEF,kBAAS,CAACG,MAAM;EAC3BxG,sBAAsB,EAAEqG,kBAAS,CAACI,IAAI;EACtC1M,KAAK,EAAEsM,kBAAS,CAACC,MAAM,CAACI,UAAU;EAClC1M,QAAQ,EAAEqM,kBAAS,CAACI,IAAI,CAACC,UAAU;EACnCjP,GAAG,EAAE4O,kBAAS,CAACG,MAAM;EACrB1G,YAAY,EAAEuG,kBAAS,CAACM,KAAK,CAAC;IAC5BC,GAAG,EAAEP,kBAAS,CAACI,IAAI,CAACC,UAAU;IAC9BG,MAAM,EAAER,kBAAS,CAACI,IAAI,CAACC;EACzB,CAAC,CAAC;EACF3G,kBAAkB,EAAEsG,kBAAS,CAACM,KAAK,CAAC;IAClCC,GAAG,EAAEP,kBAAS,CAACI,IAAI,CAACC,UAAU;IAC9BG,MAAM,EAAER,kBAAS,CAACI,IAAI,CAACC;EACzB,CAAC;AACH,CAAC;AAAA,IAAAI,QAAA,GAAAV,OAAA,CAAApO,OAAA,GA6qBY8B,MAAM","ignoreList":[]}
@@ -1,105 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.InputHeader = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _utils = require("./utils");
10
- var _react = _interopRequireDefault(require("react"));
11
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
- var _styles = require("@mui/material/styles");
13
- var _editableHtmlTipTap = _interopRequireDefault(require("@pie-lib/editable-html-tip-tap"));
14
- const StyledEditableHtml = (0, _styles.styled)(_editableHtmlTipTap.default)({
15
- flex: '1',
16
- maxWidth: '100%'
17
- });
18
- const InputHeaderContainer = (0, _styles.styled)('div')(({
19
- theme
20
- }) => ({
21
- display: 'flex',
22
- justifyContent: 'space-between',
23
- paddingBottom: theme.spacing(1)
24
- }));
25
- class InputHeader extends _react.default.Component {
26
- constructor(props) {
27
- super(props);
28
- }
29
- render() {
30
- const {
31
- onChange,
32
- configuration,
33
- label,
34
- deleteFocusedEl,
35
- disabled,
36
- imageSupport,
37
- toolbarOpts,
38
- spellCheck,
39
- error,
40
- maxImageWidth,
41
- maxImageHeight,
42
- uploadSoundSupport,
43
- mathMlOptions = {},
44
- focusedEl,
45
- index
46
- } = this.props;
47
- const {
48
- headers,
49
- baseInputConfiguration
50
- } = configuration;
51
- const shouldAutoFocus = focusedEl !== null && focusedEl !== undefined && focusedEl === index;
52
- return /*#__PURE__*/_react.default.createElement(InputHeaderContainer, null, /*#__PURE__*/_react.default.createElement(StyledEditableHtml, {
53
- imageSupport: imageSupport,
54
- disabled: disabled,
55
- autoFocus: shouldAutoFocus,
56
- autoWidthToolbar: true,
57
- label: 'label',
58
- markup: label,
59
- onChange: onChange,
60
- pluginProps: (0, _utils.getPluginProps)(headers?.inputConfiguration, baseInputConfiguration),
61
- toolbarOpts: toolbarOpts,
62
- spellCheck: spellCheck,
63
- error: error,
64
- maxImageWidth: maxImageWidth,
65
- maxImageHeight: maxImageHeight,
66
- uploadSoundSupport: uploadSoundSupport,
67
- languageCharactersProps: [{
68
- language: 'spanish'
69
- }, {
70
- language: 'special'
71
- }],
72
- onDone: () => {
73
- deleteFocusedEl && deleteFocusedEl();
74
- },
75
- mathMlOptions: mathMlOptions
76
- }));
77
- }
78
- }
79
- exports.InputHeader = InputHeader;
80
- (0, _defineProperty2.default)(InputHeader, "propTypes", {
81
- configuration: _propTypes.default.object.isRequired,
82
- deleteFocusedEl: _propTypes.default.func,
83
- disabled: _propTypes.default.bool,
84
- focusedEl: _propTypes.default.number,
85
- index: _propTypes.default.number,
86
- label: _propTypes.default.string,
87
- maxImageWidth: _propTypes.default.object,
88
- maxImageHeight: _propTypes.default.object,
89
- onChange: _propTypes.default.func,
90
- onDelete: _propTypes.default.func,
91
- imageSupport: _propTypes.default.shape({
92
- add: _propTypes.default.func.isRequired,
93
- delete: _propTypes.default.func.isRequired
94
- }),
95
- uploadSoundSupport: _propTypes.default.shape({
96
- add: _propTypes.default.func.isRequired,
97
- delete: _propTypes.default.func.isRequired
98
- }),
99
- toolbarOpts: _propTypes.default.object,
100
- error: _propTypes.default.string,
101
- spellCheck: _propTypes.default.bool
102
- });
103
- (0, _defineProperty2.default)(InputHeader, "defaultProps", {});
104
- var _default = exports.default = InputHeader;
105
- //# sourceMappingURL=input-header.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-header.js","names":["_utils","require","_react","_interopRequireDefault","_propTypes","_styles","_editableHtmlTipTap","StyledEditableHtml","styled","EditableHtml","flex","maxWidth","InputHeaderContainer","theme","display","justifyContent","paddingBottom","spacing","InputHeader","React","Component","constructor","props","render","onChange","configuration","label","deleteFocusedEl","disabled","imageSupport","toolbarOpts","spellCheck","error","maxImageWidth","maxImageHeight","uploadSoundSupport","mathMlOptions","focusedEl","index","headers","baseInputConfiguration","shouldAutoFocus","undefined","default","createElement","autoFocus","autoWidthToolbar","markup","pluginProps","getPluginProps","inputConfiguration","languageCharactersProps","language","onDone","exports","_defineProperty2","PropTypes","object","isRequired","func","bool","number","string","onDelete","shape","add","delete","_default"],"sources":["../../src/design/input-header.jsx"],"sourcesContent":["import { getPluginProps } from './utils';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\n\nconst StyledEditableHtml = styled(EditableHtml)({\n flex: '1',\n maxWidth: '100%',\n});\n\nconst InputHeaderContainer = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'space-between',\n paddingBottom: theme.spacing(1),\n}));\n\nexport class InputHeader extends React.Component {\n static propTypes = {\n configuration: PropTypes.object.isRequired,\n deleteFocusedEl: PropTypes.func,\n disabled: PropTypes.bool,\n focusedEl: PropTypes.number,\n index: PropTypes.number,\n label: PropTypes.string,\n maxImageWidth: PropTypes.object,\n maxImageHeight: PropTypes.object,\n onChange: PropTypes.func,\n onDelete: PropTypes.func,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n toolbarOpts: PropTypes.object,\n error: PropTypes.string,\n spellCheck: PropTypes.bool,\n };\n\n static defaultProps = {};\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const {\n onChange,\n configuration,\n label,\n deleteFocusedEl,\n disabled,\n imageSupport,\n toolbarOpts,\n spellCheck,\n error,\n maxImageWidth,\n maxImageHeight,\n uploadSoundSupport,\n mathMlOptions = {},\n focusedEl,\n index,\n } = this.props;\n\n const { headers, baseInputConfiguration } = configuration;\n const shouldAutoFocus = focusedEl !== null && focusedEl !== undefined && focusedEl === index;\n\n return (\n <InputHeaderContainer>\n <StyledEditableHtml\n imageSupport={imageSupport}\n disabled={disabled}\n autoFocus={shouldAutoFocus}\n autoWidthToolbar\n label={'label'}\n markup={label}\n onChange={onChange}\n pluginProps={getPluginProps(headers?.inputConfiguration, baseInputConfiguration)}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheck}\n error={error}\n maxImageWidth={maxImageWidth}\n maxImageHeight={maxImageHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n onDone={() => {\n deleteFocusedEl && deleteFocusedEl();\n }}\n mathMlOptions={mathMlOptions}\n />\n </InputHeaderContainer>\n );\n }\n}\n\nexport default InputHeader;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,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C,GAAG,EAAET,kBAAS,CAACG,IAAI,CAACD,UAAU;IAC9BQ,MAAM,EAAEV,kBAAS,CAACG,IAAI,CAACD;EACzB,CAAC,CAAC;EACFvB,kBAAkB,EAAEqB,kBAAS,CAACQ,KAAK,CAAC;IAClCC,GAAG,EAAET,kBAAS,CAACG,IAAI,CAACD,UAAU;IAC9BQ,MAAM,EAAEV,kBAAS,CAACG,IAAI,CAACD;EACzB,CAAC,CAAC;EACF5B,WAAW,EAAE0B,kBAAS,CAACC,MAAM;EAC7BzB,KAAK,EAAEwB,kBAAS,CAACM,MAAM;EACvB/B,UAAU,EAAEyB,kBAAS,CAACI;AACxB,CAAC;AAAA,IAAAL,gBAAA,CAAAZ,OAAA,EAvBUzB,WAAW,kBAyBA,CAAC,CAAC;AAAA,IAAAiD,QAAA,GAAAb,OAAA,CAAAX,OAAA,GAwDXzB,WAAW","ignoreList":[]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getPluginProps = void 0;
7
- const getPluginProps = (props = {}, baseInputConfiguration = {}) => ({
8
- ...baseInputConfiguration,
9
- ...props
10
- });
11
- exports.getPluginProps = getPluginProps;
12
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","names":["getPluginProps","props","baseInputConfiguration","exports"],"sources":["../../src/design/utils.js"],"sourcesContent":["export const getPluginProps = (props = {}, baseInputConfiguration = {}) => ({\n ...baseInputConfiguration,\n ...props,\n});\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAGA,CAACC,KAAK,GAAG,CAAC,CAAC,EAAEC,sBAAsB,GAAG,CAAC,CAAC,MAAM;EAC1E,GAAGA,sBAAsB;EACzB,GAAGD;AACL,CAAC,CAAC;AAACE,OAAA,CAAAH,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -1,147 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _client = require("react-dom/client");
11
- var _pieConfigureEvents = require("@pie-framework/pie-configure-events");
12
- var _mathRendering = require("@pie-lib/math-rendering");
13
- var _main = _interopRequireDefault(require("./main"));
14
- var _defaults = _interopRequireDefault(require("./defaults"));
15
- class CategorizeConfigure extends HTMLElement {
16
- constructor() {
17
- super();
18
- this._root = null;
19
- this._model = CategorizeConfigure.createDefaultModel();
20
- this._configuration = _defaults.default.configuration;
21
- }
22
- set model(m) {
23
- this._model = CategorizeConfigure.createDefaultModel(m);
24
- if (m.choices && m.choices.length >= m.maxAnswerChoices) {
25
- this._model.maxAnswerChoices = m.choices.length;
26
- console.warn("Max Answer Choices can't be less than choices length!");
27
- }
28
- this.render();
29
- }
30
- set configuration(c) {
31
- const newConfiguration = {
32
- ..._defaults.default.configuration,
33
- ...c
34
- };
35
- this._configuration = newConfiguration;
36
-
37
- // if language:enabled is true, then the corresponding default item model should include a language value;
38
- // if it is false, then the language field should be omitted from the item model.
39
- // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,
40
- // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).
41
- if (newConfiguration?.language?.enabled) {
42
- if (newConfiguration?.languageChoices?.options?.length) {
43
- this._model.language = newConfiguration?.languageChoices.options[0].value;
44
- }
45
- } else if (newConfiguration.language.settings && this._model.language) {
46
- this._configuration.language.enabled = true;
47
- if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {
48
- this._configuration.languageChoices.options = [];
49
- }
50
-
51
- // check if the language is already included in the languageChoices.options array
52
- // and if not, then add it.
53
- if (!this._configuration.languageChoices.options.find(option => option.value === this._model.language)) {
54
- this._configuration.languageChoices.options.push({
55
- value: this._model.language,
56
- label: this._model.language
57
- });
58
- }
59
- } else {
60
- delete this._model.language;
61
- }
62
- this.render();
63
- }
64
- onModelChanged(m) {
65
- this._model = m;
66
- this.render();
67
- this.dispatchEvent(new _pieConfigureEvents.ModelUpdatedEvent(this._model, false));
68
- }
69
- onConfigurationChanged(c) {
70
- this._configuration = c;
71
- this.render();
72
- }
73
- connectedCallback() {
74
- this.render();
75
- }
76
-
77
- /**
78
- *
79
- * @param {done, progress, file} handler
80
- */
81
- insertImage(handler) {
82
- this.dispatchEvent(new _pieConfigureEvents.InsertImageEvent(handler));
83
- }
84
- onDeleteImage(src, done) {
85
- this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
86
- }
87
- insertSound(handler) {
88
- this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
89
- }
90
- onDeleteSound(src, done) {
91
- this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
92
- }
93
- render() {
94
- const el = /*#__PURE__*/_react.default.createElement(_main.default, {
95
- model: this._model,
96
- configuration: this._configuration,
97
- onModelChanged: this.onModelChanged.bind(this),
98
- onConfigurationChanged: this.onConfigurationChanged.bind(this),
99
- imageSupport: {
100
- add: this.insertImage.bind(this),
101
- delete: this.onDeleteImage.bind(this)
102
- },
103
- uploadSoundSupport: {
104
- add: this.insertSound.bind(this),
105
- delete: this.onDeleteSound.bind(this)
106
- }
107
- });
108
- if (!this._root) {
109
- this._root = (0, _client.createRoot)(this);
110
- }
111
- this._root.render(el);
112
- setTimeout(() => {
113
- (0, _mathRendering.renderMath)(this);
114
- }, 0);
115
- }
116
- disconnectedCallback() {
117
- if (this._root) {
118
- this._root.unmount();
119
- }
120
- }
121
- }
122
- exports.default = CategorizeConfigure;
123
- (0, _defineProperty2.default)(CategorizeConfigure, "createDefaultModel", (model = {}) => ({
124
- ..._defaults.default.model,
125
- ...model
126
- }));
127
- // PD-2960: make sure we don't have alternates in model or possibility to add them (temporary solution)
128
- // this function is used in controller, too
129
- (0, _defineProperty2.default)(CategorizeConfigure, "disableAlternateResponses", m => {
130
- let {
131
- correctResponse
132
- } = m || {};
133
- correctResponse = correctResponse || [];
134
- const mappedCorrectResponse = correctResponse.map(cr => {
135
- const {
136
- alternateResponses,
137
- ...response
138
- } = cr;
139
- return response;
140
- });
141
- return {
142
- ...m,
143
- correctResponse: mappedCorrectResponse,
144
- allowAlternateEnabled: false
145
- };
146
- });
147
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_client","_pieConfigureEvents","_mathRendering","_main","_defaults","CategorizeConfigure","HTMLElement","constructor","_root","_model","createDefaultModel","_configuration","defaults","configuration","model","m","choices","length","maxAnswerChoices","console","warn","render","c","newConfiguration","language","enabled","languageChoices","options","value","settings","find","option","push","label","onModelChanged","dispatchEvent","ModelUpdatedEvent","onConfigurationChanged","connectedCallback","insertImage","handler","InsertImageEvent","onDeleteImage","src","done","DeleteImageEvent","insertSound","InsertSoundEvent","onDeleteSound","DeleteSoundEvent","el","React","createElement","Main","bind","imageSupport","add","delete","uploadSoundSupport","createRoot","setTimeout","renderMath","disconnectedCallback","unmount","exports","default","_defineProperty2","correctResponse","mappedCorrectResponse","map","cr","alternateResponses","response","allowAlternateEnabled"],"sources":["../src/index.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport {\n ModelUpdatedEvent,\n DeleteImageEvent,\n InsertImageEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-framework/pie-configure-events';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nimport Main from './main';\n\nimport defaults from './defaults';\n\nexport default class CategorizeConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => ({\n ...defaults.model,\n ...model,\n });\n\n // PD-2960: make sure we don't have alternates in model or possibility to add them (temporary solution)\n // this function is used in controller, too\n static disableAlternateResponses = (m) => {\n let { correctResponse } = m || {};\n correctResponse = correctResponse || [];\n const mappedCorrectResponse = correctResponse.map((cr) => {\n const { alternateResponses, ...response } = cr;\n return response;\n });\n return {\n ...m,\n correctResponse: mappedCorrectResponse,\n allowAlternateEnabled: false,\n };\n };\n\n constructor() {\n super();\n this._root = null;\n this._model = CategorizeConfigure.createDefaultModel();\n this._configuration = defaults.configuration;\n }\n\n set model(m) {\n this._model = CategorizeConfigure.createDefaultModel(m);\n\n if (m.choices && m.choices.length >= m.maxAnswerChoices) {\n this._model.maxAnswerChoices = m.choices.length;\n console.warn(\"Max Answer Choices can't be less than choices length!\");\n }\n\n this.render();\n }\n\n set configuration(c) {\n const newConfiguration = {\n ...defaults.configuration,\n ...c,\n };\n\n this._configuration = newConfiguration;\n\n // if language:enabled is true, then the corresponding default item model should include a language value;\n // if it is false, then the language field should be omitted from the item model.\n // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,\n // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).\n if (newConfiguration?.language?.enabled) {\n if (newConfiguration?.languageChoices?.options?.length) {\n this._model.language = newConfiguration?.languageChoices.options[0].value;\n }\n } else if (newConfiguration.language.settings && this._model.language) {\n this._configuration.language.enabled = true;\n\n if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {\n this._configuration.languageChoices.options = [];\n }\n\n // check if the language is already included in the languageChoices.options array\n // and if not, then add it.\n if (!this._configuration.languageChoices.options.find((option) => option.value === this._model.language)) {\n this._configuration.languageChoices.options.push({\n value: this._model.language,\n label: this._model.language,\n });\n }\n } else {\n delete this._model.language;\n }\n\n this.render();\n }\n\n onModelChanged(m) {\n this._model = m;\n\n this.render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged(c) {\n this._configuration = c;\n this.render();\n }\n\n connectedCallback() {\n this.render();\n }\n\n /**\n *\n * @param {done, progress, file} handler\n */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n render() {\n const el = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n\n setTimeout(() => {\n renderMath(this);\n }, 0);\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEe,MAAMM,mBAAmB,SAASC,WAAW,CAAC;EAsB3DC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,KAAK,GAAG,IAAI;IACjB,IAAI,CAACC,MAAM,GAAGJ,mBAAmB,CAACK,kBAAkB,CAAC,CAAC;IACtD,IAAI,CAACC,cAAc,GAAGC,iBAAQ,CAACC,aAAa;EAC9C;EAEA,IAAIC,KAAKA,CAACC,CAAC,EAAE;IACX,IAAI,CAACN,MAAM,GAAGJ,mBAAmB,CAACK,kBAAkB,CAACK,CAAC,CAAC;IAEvD,IAAIA,CAAC,CAACC,OAAO,IAAID,CAAC,CAACC,OAAO,CAACC,MAAM,IAAIF,CAAC,CAACG,gBAAgB,EAAE;MACvD,IAAI,CAACT,MAAM,CAACS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CAAC;EACjCoD,eAAe,GAAGA,eAAe,IAAI,EAAE;EACvC,MAAMC,qBAAqB,GAAGD,eAAe,CAACE,GAAG,CAAEC,EAAE,IAAK;IACxD,MAAM;MAAEC,kBAAkB;MAAE,GAAGC;IAAS,CAAC,GAAGF,EAAE;IAC9C,OAAOE,QAAQ;EACjB,CAAC,CAAC;EACF,OAAO;IACL,GAAGzD,CAAC;IACJoD,eAAe,EAAEC,qBAAqB;IACtCK,qBAAqB,EAAE;EACzB,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,44 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.Main = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
- var _design = _interopRequireDefault(require("./design"));
12
- class Main extends _react.default.Component {
13
- render() {
14
- const {
15
- model,
16
- onModelChanged,
17
- configuration,
18
- onConfigurationChanged,
19
- imageSupport,
20
- uploadSoundSupport
21
- } = this.props;
22
- return /*#__PURE__*/_react.default.createElement(_design.default, {
23
- imageSupport: imageSupport,
24
- uploadSoundSupport: uploadSoundSupport,
25
- title: "Design",
26
- model: model,
27
- configuration: configuration,
28
- onChange: onModelChanged,
29
- onConfigurationChanged: onConfigurationChanged
30
- });
31
- }
32
- }
33
- exports.Main = Main;
34
- (0, _defineProperty2.default)(Main, "propTypes", {
35
- configuration: _propTypes.default.object,
36
- onConfigurationChanged: _propTypes.default.func,
37
- model: _propTypes.default.object.isRequired,
38
- onModelChanged: _propTypes.default.func.isRequired,
39
- imageSupport: _propTypes.default.object,
40
- uploadSoundSupport: _propTypes.default.object
41
- });
42
- (0, _defineProperty2.default)(Main, "defaultProps", {});
43
- var _default = exports.default = Main;
44
- //# sourceMappingURL=main.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.js","names":["_react","_interopRequireDefault","require","_propTypes","_design","Main","React","Component","render","model","onModelChanged","configuration","onConfigurationChanged","imageSupport","uploadSoundSupport","props","default","createElement","title","onChange","exports","_defineProperty2","PropTypes","object","func","isRequired","_default"],"sources":["../src/main.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Design from './design';\n\nexport class Main extends React.Component {\n static propTypes = {\n configuration: PropTypes.object,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func.isRequired,\n imageSupport: PropTypes.object,\n uploadSoundSupport: PropTypes.object,\n };\n\n static defaultProps = {};\n\n render() {\n const { model, onModelChanged, configuration, onConfigurationChanged, imageSupport, uploadSoundSupport } =\n this.props;\n\n return (\n <Design\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n title=\"Design\"\n model={model}\n configuration={configuration}\n onChange={onModelChanged}\n onConfigurationChanged={onConfigurationChanged}\n />\n );\n }\n}\n\nexport default Main;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEO,MAAMG,IAAI,SAASC,cAAK,CAACC,SAAS,CAAC;EAYxCC,MAAMA,CAAA,EAAG;IACP,MAAM;MAAEC,KAAK;MAAEC,cAAc;MAAEC,aAAa;MAAEC,sBAAsB;MAAEC,YAAY;MAAEC;IAAmB,CAAC,GACtG,IAAI,CAACC,KAAK;IAEZ,oBACEf,MAAA,CAAAgB,OAAA,CAAAC,aAAA,CAACb,OAAA,CAAAY,OAAM;MACLH,YAAY,EAAEA,YAAa;MAC3BC,kBAAkB,EAAEA,kBAAmB;MACvCI,KAAK,EAAC,QAAQ;MACdT,KAAK,EAAEA,KAAM;MACbE,aAAa,EAAEA,aAAc;MAC7BQ,QAAQ,EAAET,cAAe;MACzBE,sBAAsB,EAAEA;IAAuB,CAChD,CAAC;EAEN;AACF;AAACQ,OAAA,CAAAf,IAAA,GAAAA,IAAA;AAAA,IAAAgB,gBAAA,CAAAL,OAAA,EA5BYX,IAAI,eACI;EACjBM,aAAa,EAAEW,kBAAS,CAACC,MAAM;EAC/BX,sBAAsB,EAAEU,kBAAS,CAACE,IAAI;EACtCf,KAAK,EAAEa,kBAAS,CAACC,MAAM,CAACE,UAAU;EAClCf,cAAc,EAAEY,kBAAS,CAACE,IAAI,CAACC,UAAU;EACzCZ,YAAY,EAAES,kBAAS,CAACC,MAAM;EAC9BT,kBAAkB,EAAEQ,kBAAS,CAACC;AAChC,CAAC;AAAA,IAAAF,gBAAA,CAAAL,OAAA,EARUX,IAAI,kBAUO,CAAC,CAAC;AAAA,IAAAqB,QAAA,GAAAN,OAAA,CAAAJ,OAAA,GAoBXX,IAAI","ignoreList":[]}
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.multiplePlacements = exports.maxLength = exports.getMaxCategoryChoices = exports.generateValidationMessage = void 0;
7
- const generateValidationMessage = config => {
8
- let {
9
- minChoices,
10
- maxChoices,
11
- maxCategories
12
- } = config || {};
13
- minChoices = minChoices || 1;
14
- const validationMessage = '\nThe choices content should ' + 'not be empty and should be unique.\nThere should be at least 1 ' + (maxCategories ? `and at most ${maxCategories} ` : '') + 'category' + (maxCategories ? 's' : '') + ' defined.' + (minChoices ? `\nThere should be at least ${minChoices} choices defined.` : '') + (maxChoices ? `\nNo more than ${maxChoices} choices should be defined.` : '') + '\nAt least one token should be assigned to at least one category.';
15
- return 'Validation requirements:' + validationMessage;
16
- };
17
-
18
- // used in controller too, for consistency modify it there too
19
- exports.generateValidationMessage = generateValidationMessage;
20
- const multiplePlacements = exports.multiplePlacements = {
21
- enabled: 'Yes',
22
- disabled: 'No',
23
- perChoice: 'Set Per Choice'
24
- };
25
-
26
- // Find the length of the largest array from an array
27
- const maxLength = array => (array || []).reduce((max, arr) => {
28
- return Math.max(max, arr.length);
29
- }, 0);
30
- exports.maxLength = maxLength;
31
- const getMaxCategoryChoices = model => {
32
- const {
33
- correctResponse = []
34
- } = model || {};
35
- return correctResponse.reduce((max, correctRes) => {
36
- const correctRespLength = correctRes?.choices?.length || 0;
37
- const alternates = correctRes?.alternateResponses || [];
38
- const maxChoices = Math.max(correctRespLength, maxLength(alternates));
39
- return maxChoices > max ? maxChoices : max;
40
- }, 0);
41
- };
42
- exports.getMaxCategoryChoices = getMaxCategoryChoices;
43
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","names":["generateValidationMessage","config","minChoices","maxChoices","maxCategories","validationMessage","exports","multiplePlacements","enabled","disabled","perChoice","maxLength","array","reduce","max","arr","Math","length","getMaxCategoryChoices","model","correctResponse","correctRes","correctRespLength","choices","alternates","alternateResponses"],"sources":["../src/utils.js"],"sourcesContent":["export const generateValidationMessage = (config) => {\n let { minChoices, maxChoices, maxCategories } = config || {};\n minChoices = minChoices || 1;\n\n const validationMessage =\n '\\nThe choices content should ' +\n 'not be empty and should be unique.\\nThere should be at least 1 ' +\n (maxCategories ? `and at most ${maxCategories} ` : '') +\n 'category' +\n (maxCategories ? 's' : '') +\n ' defined.' +\n (minChoices ? `\\nThere should be at least ${minChoices} choices defined.` : '') +\n (maxChoices ? `\\nNo more than ${maxChoices} choices should be defined.` : '') +\n '\\nAt least one token should be assigned to at least one category.';\n\n return 'Validation requirements:' + validationMessage;\n};\n\n// used in controller too, for consistency modify it there too\nexport const multiplePlacements = { enabled: 'Yes', disabled: 'No', perChoice: 'Set Per Choice' };\n\n// Find the length of the largest array from an array\nexport const maxLength = (array) =>\n (array || []).reduce((max, arr) => {\n return Math.max(max, arr.length);\n }, 0);\n\nexport const getMaxCategoryChoices = (model) => {\n const { correctResponse = [] } = model || {};\n return correctResponse.reduce((max, correctRes) => {\n const correctRespLength = correctRes?.choices?.length || 0;\n const alternates = correctRes?.alternateResponses || [];\n const maxChoices = Math.max(correctRespLength, maxLength(alternates));\n return maxChoices > max ? maxChoices : max;\n }, 0);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,yBAAyB,GAAIC,MAAM,IAAK;EACnD,IAAI;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAc,CAAC,GAAGH,MAAM,IAAI,CAAC,CAAC;EAC5DC,UAAU,GAAGA,UAAU,IAAI,CAAC;EAE5B,MAAMG,iBAAiB,GACrB,+BAA+B,GAC/B,iEAAiE,IAChED,aAAa,GAAG,eAAeA,aAAa,GAAG,GAAG,EAAE,CAAC,GACtD,UAAU,IACTA,aAAa,GAAG,GAAG,GAAG,EAAE,CAAC,GAC1B,WAAW,IACVF,UAAU,GAAG,8BAA8BA,UAAU,mBAAmB,GAAG,EAAE,CAAC,IAC9EC,UAAU,GAAG,kBAAkBA,UAAU,6BAA6B,GAAG,EAAE,CAAC,GAC7E,mEAAmE;EAErE,OAAO,0BAA0B,GAAGE,iBAAiB;AACvD,CAAC;;AAED;AAAAC,OAAA,CAAAN,yBAAA,GAAAA,yBAAA;AACO,MAAMO,kBAAkB,GAAAD,OAAA,CAAAC,kBAAA,GAAG;EAAEC,OAAO,EAAE,KAAK;EAAEC,QAAQ,EAAE,IAAI;EAAEC,SAAS,EAAE;AAAiB,CAAC;;AAEjG;AACO,MAAMC,SAAS,GAAIC,KAAK,IAC7B,CAACA,KAAK,IAAI,EAAE,EAAEC,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAK;EACjC,OAAOC,IAAI,CAACF,GAAG,CAACA,GAAG,EAAEC,GAAG,CAACE,MAAM,CAAC;AAClC,CAAC,EAAE,CAAC,CAAC;AAACX,OAAA,CAAAK,SAAA,GAAAA,SAAA;AAED,MAAMO,qBAAqB,GAAIC,KAAK,IAAK;EAC9C,MAAM;IAAEC,eAAe,GAAG;EAAG,CAAC,GAAGD,KAAK,IAAI,CAAC,CAAC;EAC5C,OAAOC,eAAe,CAACP,MAAM,CAAC,CAACC,GAAG,EAAEO,UAAU,KAAK;IACjD,MAAMC,iBAAiB,GAAGD,UAAU,EAAEE,OAAO,EAAEN,MAAM,IAAI,CAAC;IAC1D,MAAMO,UAAU,GAAGH,UAAU,EAAEI,kBAAkB,IAAI,EAAE;IACvD,MAAMtB,UAAU,GAAGa,IAAI,CAACF,GAAG,CAACQ,iBAAiB,EAAEX,SAAS,CAACa,UAAU,CAAC,CAAC;IACrE,OAAOrB,UAAU,GAAGW,GAAG,GAAGX,UAAU,GAAGW,GAAG;EAC5C,CAAC,EAAE,CAAC,CAAC;AACP,CAAC;AAACR,OAAA,CAAAY,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1,32 +0,0 @@
1
- {
2
- "name": "@pie-element/categorize-configure",
3
- "private": true,
4
- "main": "lib/index.js",
5
- "module": "src/index.js",
6
- "version": "11.1.0-next.1",
7
- "description": "",
8
- "scripts": {},
9
- "author": "pie framework developers",
10
- "license": "ISC",
11
- "dependencies": {
12
- "@dnd-kit/core": "6.3.1",
13
- "@emotion/react": "^11.14.0",
14
- "@emotion/style": "^0.8.0",
15
- "@mui/icons-material": "^7.3.4",
16
- "@mui/material": "^7.3.4",
17
- "@pie-framework/pie-configure-events": "^1.3.0",
18
- "@pie-lib/categorize": "2.0.2",
19
- "@pie-lib/config-ui": "13.0.3",
20
- "@pie-lib/drag": "4.0.2",
21
- "@pie-lib/editable-html-tip-tap": "2.1.1",
22
- "@pie-lib/math-rendering": "5.0.2",
23
- "@pie-lib/render-ui": "6.1.0",
24
- "@pie-lib/translator": "4.0.2",
25
- "debug": "^4.1.1",
26
- "lodash-es": "^4.17.23",
27
- "prop-types": "^15.6.2",
28
- "react": "18.3.1",
29
- "react-dom": "18.3.1"
30
- },
31
- "gitHead": "a53e5e851a76da9c1d1a919b277ca0c4c8a8bff2"
32
- }