@pie-element/multiple-choice 13.1.1-next.0 → 13.2.0-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 (271) hide show
  1. package/CHANGELOG.json +1972 -0
  2. package/CHANGELOG.md +2704 -0
  3. package/LICENSE.md +5 -0
  4. package/PRINT.md +35 -0
  5. package/README.md +56 -0
  6. package/choice.png +0 -0
  7. package/configure/CHANGELOG.json +1387 -0
  8. package/configure/CHANGELOG.md +2054 -0
  9. package/{src/author/defaults.ts → configure/lib/defaults.js} +90 -55
  10. package/configure/lib/defaults.js.map +1 -0
  11. package/{src/author/index.ts → configure/lib/index.js} +55 -99
  12. package/configure/lib/index.js.map +1 -0
  13. package/configure/lib/main.js +483 -0
  14. package/configure/lib/main.js.map +1 -0
  15. package/configure/lib/utils.js +18 -0
  16. package/configure/lib/utils.js.map +1 -0
  17. package/configure/package.json +22 -0
  18. package/controller/CHANGELOG.json +527 -0
  19. package/controller/CHANGELOG.md +1394 -0
  20. package/{src/controller/defaults.ts → controller/lib/defaults.js} +8 -11
  21. package/controller/lib/defaults.js.map +1 -0
  22. package/{src/controller/index.ts → controller/lib/index.js} +109 -123
  23. package/controller/lib/index.js.map +1 -0
  24. package/controller/lib/utils.js +15 -0
  25. package/controller/lib/utils.js.map +1 -0
  26. package/controller/package.json +15 -0
  27. package/docs/config-schema.json +2993 -0
  28. package/docs/config-schema.json.md +2217 -0
  29. package/docs/demo/config.js +8 -0
  30. package/docs/demo/generate.js +61 -0
  31. package/docs/demo/index.html +1 -0
  32. package/docs/demo/session.js +7 -0
  33. package/docs/pie-schema.json +1332 -0
  34. package/docs/pie-schema.json.md +1015 -0
  35. package/lib/choice-input.js +380 -0
  36. package/lib/choice-input.js.map +1 -0
  37. package/lib/choice.js +197 -0
  38. package/lib/choice.js.map +1 -0
  39. package/lib/feedback-tick.js +134 -0
  40. package/lib/feedback-tick.js.map +1 -0
  41. package/{src/delivery/index.ts → lib/index.js} +129 -211
  42. package/lib/index.js.map +1 -0
  43. package/lib/main.js +63 -0
  44. package/lib/main.js.map +1 -0
  45. package/lib/multiple-choice.js +412 -0
  46. package/lib/multiple-choice.js.map +1 -0
  47. package/lib/print.js +94 -0
  48. package/lib/print.js.map +1 -0
  49. package/{src/delivery/session-updater.ts → lib/session-updater.js} +13 -17
  50. package/lib/session-updater.js.map +1 -0
  51. package/module/configure.js +1 -0
  52. package/module/controller.js +3045 -0
  53. package/module/demo.js +86 -0
  54. package/module/element.js +1 -0
  55. package/module/index.html +21 -0
  56. package/module/manifest.json +14 -0
  57. package/module/print-demo.js +124 -0
  58. package/module/print.html +18 -0
  59. package/module/print.js +1 -0
  60. package/package.json +26 -58
  61. package/dist/author/defaults.d.ts +0 -206
  62. package/dist/author/defaults.d.ts.map +0 -1
  63. package/dist/author/defaults.js +0 -151
  64. package/dist/author/index.d.ts +0 -27
  65. package/dist/author/index.d.ts.map +0 -1
  66. package/dist/author/index.js +0 -116
  67. package/dist/author/main.d.ts +0 -35
  68. package/dist/author/main.d.ts.map +0 -1
  69. package/dist/author/main.js +0 -290
  70. package/dist/author/utils.d.ts +0 -10
  71. package/dist/author/utils.d.ts.map +0 -1
  72. package/dist/author/utils.js +0 -7
  73. package/dist/controller/defaults.d.ts +0 -36
  74. package/dist/controller/defaults.d.ts.map +0 -1
  75. package/dist/controller/defaults.js +0 -29
  76. package/dist/controller/index.d.ts +0 -66
  77. package/dist/controller/index.d.ts.map +0 -1
  78. package/dist/controller/index.js +0 -124
  79. package/dist/controller/utils.d.ts +0 -11
  80. package/dist/controller/utils.d.ts.map +0 -1
  81. package/dist/controller/utils.js +0 -8
  82. package/dist/delivery/choice-input.d.ts +0 -45
  83. package/dist/delivery/choice-input.d.ts.map +0 -1
  84. package/dist/delivery/choice-input.js +0 -274
  85. package/dist/delivery/choice.d.ts +0 -21
  86. package/dist/delivery/choice.d.ts.map +0 -1
  87. package/dist/delivery/choice.js +0 -109
  88. package/dist/delivery/feedback-tick.d.ts +0 -21
  89. package/dist/delivery/feedback-tick.d.ts.map +0 -1
  90. package/dist/delivery/feedback-tick.js +0 -104
  91. package/dist/delivery/index.d.ts +0 -38
  92. package/dist/delivery/index.d.ts.map +0 -1
  93. package/dist/delivery/index.js +0 -217
  94. package/dist/delivery/main.d.ts +0 -32
  95. package/dist/delivery/main.d.ts.map +0 -1
  96. package/dist/delivery/main.js +0 -51
  97. package/dist/delivery/multiple-choice.d.ts +0 -63
  98. package/dist/delivery/multiple-choice.d.ts.map +0 -1
  99. package/dist/delivery/multiple-choice.js +0 -252
  100. package/dist/delivery/session-updater.d.ts +0 -11
  101. package/dist/delivery/session-updater.d.ts.map +0 -1
  102. package/dist/delivery/session-updater.js +0 -9
  103. package/dist/index.d.ts +0 -2
  104. package/dist/index.d.ts.map +0 -1
  105. package/dist/index.iife.d.ts +0 -9
  106. package/dist/index.iife.d.ts.map +0 -1
  107. package/dist/index.iife.js +0 -148
  108. package/dist/index.js +0 -2
  109. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +0 -6
  110. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +0 -16
  111. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +0 -16
  112. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +0 -6
  113. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +0 -16
  114. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +0 -6
  115. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +0 -6
  116. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +0 -11
  117. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +0 -13
  118. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +0 -5
  119. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +0 -5
  120. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +0 -6
  121. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +0 -12
  122. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +0 -7
  123. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +0 -10
  124. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  125. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +0 -7
  126. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +0 -7
  127. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignMergeValue.js +0 -8
  128. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +0 -10
  129. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +0 -8
  130. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +0 -8
  131. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +0 -8
  132. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +0 -12
  133. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +0 -57
  134. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +0 -14
  135. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js +0 -5
  136. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  137. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +0 -10
  138. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +0 -9
  139. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +0 -8
  140. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  141. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +0 -9
  142. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +0 -11
  143. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +0 -9
  144. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  145. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +0 -12
  146. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +0 -13
  147. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMerge.js +0 -19
  148. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  149. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +0 -9
  150. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +0 -14
  151. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +0 -7
  152. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js +0 -8
  153. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +0 -8
  154. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +0 -6
  155. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  156. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +0 -10
  157. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +0 -8
  158. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +0 -8
  159. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +0 -8
  160. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  161. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +0 -8
  162. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +0 -14
  163. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +0 -8
  164. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  165. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +0 -5
  166. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createAssigner.js +0 -15
  167. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +0 -12
  168. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +0 -10
  169. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +0 -35
  170. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +0 -35
  171. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +0 -32
  172. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +0 -4
  173. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +0 -9
  174. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  175. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +0 -8
  176. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +0 -9
  177. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +0 -5
  178. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +0 -14
  179. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +0 -10
  180. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  181. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +0 -23
  182. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +0 -6
  183. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +0 -7
  184. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +0 -7
  185. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +0 -13
  186. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +0 -9
  187. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +0 -9
  188. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +0 -8
  189. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +0 -33
  190. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +0 -9
  191. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +0 -8
  192. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +0 -12
  193. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +0 -7
  194. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +0 -11
  195. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +0 -8
  196. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +0 -6
  197. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +0 -9
  198. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +0 -8
  199. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +0 -7
  200. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +0 -8
  201. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +0 -13
  202. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  203. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +0 -7
  204. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +0 -7
  205. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +0 -8
  206. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +0 -9
  207. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +0 -5
  208. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +0 -5
  209. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  210. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +0 -9
  211. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +0 -7
  212. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +0 -8
  213. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +0 -13
  214. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +0 -5
  215. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_safeGet.js +0 -6
  216. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +0 -7
  217. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +0 -6
  218. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +0 -9
  219. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +0 -6
  220. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +0 -14
  221. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +0 -7
  222. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +0 -7
  223. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +0 -6
  224. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +0 -6
  225. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +0 -16
  226. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +0 -15
  227. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
  228. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +0 -8
  229. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +0 -8
  230. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/debounce.js +0 -50
  231. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +0 -16
  232. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +0 -6
  233. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +0 -6
  234. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +0 -10
  235. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +0 -4
  236. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +0 -8
  237. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  238. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +0 -6
  239. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +0 -21
  240. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +0 -7
  241. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +0 -11
  242. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +0 -7
  243. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +0 -7
  244. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +0 -7
  245. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +0 -6
  246. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +0 -14
  247. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +0 -7
  248. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +0 -9
  249. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +0 -7
  250. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +0 -9
  251. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +0 -9
  252. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/merge.js +0 -8
  253. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/now.js +0 -7
  254. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +0 -6
  255. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +0 -6
  256. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js +0 -19
  257. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toPlainObject.js +0 -8
  258. package/dist/print/index.d.ts +0 -16
  259. package/dist/print/index.d.ts.map +0 -1
  260. package/dist/print/index.js +0 -44
  261. package/src/author/main.tsx +0 -509
  262. package/src/author/utils.ts +0 -25
  263. package/src/controller/utils.ts +0 -22
  264. package/src/delivery/choice-input.tsx +0 -413
  265. package/src/delivery/choice.tsx +0 -203
  266. package/src/delivery/feedback-tick.tsx +0 -156
  267. package/src/delivery/main.tsx +0 -85
  268. package/src/delivery/multiple-choice.tsx +0 -485
  269. package/src/index.iife.ts +0 -16
  270. package/src/index.ts +0 -1
  271. package/src/print/index.tsx +0 -112
@@ -1,18 +1,14 @@
1
- // @ts-nocheck
2
- /**
3
- * @synced-from pie-elements/packages/multiple-choice/configure/src/defaults.js
4
- * @auto-generated
5
- *
6
- * This file is automatically synced from pie-elements and converted to TypeScript.
7
- * Manual edits will be overwritten on next sync.
8
- * To make changes, edit the upstream JavaScript file and run sync again.
9
- */
1
+ "use strict";
10
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
11
7
  /** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
12
8
  * functionalities are not defined yet - the value for those can belong to
13
9
  * model or to configure
14
10
  */
15
- export default {
11
+ var _default = exports.default = {
16
12
  model: {
17
13
  choiceMode: 'checkbox',
18
14
  choicePrefix: 'letters',
@@ -32,106 +28,144 @@ export default {
32
28
  teacherInstructionsEnabled: true,
33
29
  toolbarEditorPosition: 'bottom',
34
30
  selectedAnswerBackgroundColor: 'initial',
35
- keyboardEventsEnabled: false,
31
+ keyboardEventsEnabled: false
36
32
  },
37
33
  configuration: {
38
34
  baseInputConfiguration: {
39
- h3: { disabled: true },
40
- audio: { disabled: false },
41
- video: { disabled: false },
42
- image: { disabled: false },
43
- textAlign: { disabled: true },
44
- showParagraphs: { disabled: false },
45
- separateParagraphs: { disabled: true },
35
+ h3: {
36
+ disabled: true
37
+ },
38
+ audio: {
39
+ disabled: false
40
+ },
41
+ video: {
42
+ disabled: false
43
+ },
44
+ image: {
45
+ disabled: false
46
+ },
47
+ textAlign: {
48
+ disabled: true
49
+ },
50
+ showParagraphs: {
51
+ disabled: false
52
+ },
53
+ separateParagraphs: {
54
+ disabled: true
55
+ }
46
56
  },
47
57
  choices: {
48
58
  inputConfiguration: {
49
- audio: { disabled: false },
50
- video: { disabled: false },
51
- image: { disabled: false },
52
- },
59
+ audio: {
60
+ disabled: false
61
+ },
62
+ video: {
63
+ disabled: false
64
+ },
65
+ image: {
66
+ disabled: false
67
+ }
68
+ }
53
69
  },
54
70
  spellCheck: {
55
71
  label: 'Spellcheck',
56
72
  settings: false,
57
- enabled: true,
73
+ enabled: true
58
74
  },
59
75
  choicesLayout: {
60
76
  settings: false,
61
- label: 'Choices Layout',
77
+ label: 'Choices Layout'
62
78
  },
63
79
  gridColumns: {
64
- label: 'Grid columns',
80
+ label: 'Grid columns'
65
81
  },
66
82
  answerChoiceCount: 0,
67
83
  addChoiceButton: {
68
84
  settings: true,
69
- label: 'Add a Choice',
85
+ label: 'Add a Choice'
70
86
  },
71
87
  choiceMode: {
72
88
  settings: true,
73
- label: 'Response Type',
89
+ label: 'Response Type'
74
90
  },
75
91
  choicePrefix: {
76
92
  settings: true,
77
- label: 'Choice Labels',
93
+ label: 'Choice Labels'
78
94
  },
79
95
  deleteChoice: {
80
- settings: true,
96
+ settings: true
81
97
  },
82
98
  feedback: {
83
99
  settings: true,
84
- label: 'Feedback',
100
+ label: 'Feedback'
85
101
  },
86
102
  prompt: {
87
103
  settings: true,
88
104
  label: 'Prompt',
89
105
  inputConfiguration: {
90
- audio: { disabled: false },
91
- video: { disabled: false },
92
- image: { disabled: false },
106
+ audio: {
107
+ disabled: false
108
+ },
109
+ video: {
110
+ disabled: false
111
+ },
112
+ image: {
113
+ disabled: false
114
+ }
93
115
  },
94
- required: false,
116
+ required: false
95
117
  },
96
118
  lockChoiceOrder: {
97
119
  settings: true,
98
- label: 'Lock Choice Order',
120
+ label: 'Lock Choice Order'
99
121
  },
100
122
  partialScoring: {
101
123
  settings: false,
102
- label: 'Allow Partial Scoring',
124
+ label: 'Allow Partial Scoring'
103
125
  },
104
126
  rationale: {
105
127
  settings: true,
106
128
  label: 'Rationale',
107
129
  inputConfiguration: {
108
- audio: { disabled: true },
109
- video: { disabled: true },
110
- image: { disabled: false },
130
+ audio: {
131
+ disabled: true
132
+ },
133
+ video: {
134
+ disabled: true
135
+ },
136
+ image: {
137
+ disabled: false
138
+ }
111
139
  },
112
- required: false,
140
+ required: false
113
141
  },
114
142
  scoringType: {
115
143
  settings: false,
116
- label: 'Scoring Type',
144
+ label: 'Scoring Type'
117
145
  },
118
146
  studentInstructions: {
119
147
  settings: false,
120
- label: 'Student Instructions',
148
+ label: 'Student Instructions'
121
149
  },
122
150
  teacherInstructions: {
123
151
  settings: true,
124
152
  label: 'Teacher Instructions',
125
153
  inputConfiguration: {
126
- audio: { disabled: false },
127
- video: { disabled: false },
128
- image: { disabled: false },
154
+ audio: {
155
+ disabled: false
156
+ },
157
+ video: {
158
+ disabled: false
159
+ },
160
+ image: {
161
+ disabled: false
162
+ }
129
163
  },
130
- required: false,
164
+ required: false
131
165
  },
132
166
  toolbarEditorPosition: {
133
167
  settings: false,
134
- label: 'Toolbar Editor Position',
168
+ label: 'Toolbar Editor Position'
135
169
  },
136
170
  minAnswerChoices: 2,
137
171
  maxAnswerChoices: 5,
@@ -139,30 +173,31 @@ export default {
139
173
  teacherInstructions: 300,
140
174
  prompt: 300,
141
175
  rationale: 636,
142
- choices: 900,
176
+ choices: 900
143
177
  },
144
178
  maxImageHeight: {
145
179
  teacherInstructions: 300,
146
180
  prompt: 300,
147
181
  rationale: 300,
148
- choices: 300,
182
+ choices: 300
149
183
  },
150
184
  withRubric: {
151
185
  settings: false,
152
- label: 'Add Rubric',
186
+ label: 'Add Rubric'
153
187
  },
154
188
  mathMlOptions: {
155
189
  mmlOutput: false,
156
- mmlEditing: false,
190
+ mmlEditing: false
157
191
  },
158
192
  language: {
159
193
  settings: false,
160
194
  label: 'Specify Language',
161
- enabled: false,
195
+ enabled: false
162
196
  },
163
197
  languageChoices: {
164
198
  label: 'Language Choices',
165
- options: [],
166
- },
167
- },
199
+ options: []
200
+ }
201
+ }
168
202
  };
203
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","names":["_default","exports","default","model","choiceMode","choicePrefix","choices","choicesLayout","feedbackEnabled","gridColumns","lockChoiceOrder","partialScoring","prompt","promptEnabled","rationale","rationaleEnabled","scoringType","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","toolbarEditorPosition","selectedAnswerBackgroundColor","keyboardEventsEnabled","configuration","baseInputConfiguration","h3","disabled","audio","video","image","textAlign","showParagraphs","separateParagraphs","inputConfiguration","spellCheck","label","settings","enabled","answerChoiceCount","addChoiceButton","deleteChoice","feedback","required","studentInstructions","minAnswerChoices","maxAnswerChoices","maxImageWidth","maxImageHeight","withRubric","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"sources":["../src/defaults.js"],"sourcesContent":["/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType\n * functionalities are not defined yet - the value for those can belong to\n * model or to configure\n */\nexport default {\n model: {\n choiceMode: 'checkbox',\n choicePrefix: 'letters',\n choices: [],\n choicesLayout: 'vertical',\n feedbackEnabled: false,\n gridColumns: 2,\n lockChoiceOrder: true,\n partialScoring: true,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n scoringType: 'auto',\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n selectedAnswerBackgroundColor: 'initial',\n keyboardEventsEnabled: false,\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n choices: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n choicesLayout: {\n settings: false,\n label: 'Choices Layout',\n },\n gridColumns: {\n label: 'Grid columns',\n },\n answerChoiceCount: 0,\n addChoiceButton: {\n settings: true,\n label: 'Add a Choice',\n },\n choiceMode: {\n settings: true,\n label: 'Response Type',\n },\n choicePrefix: {\n settings: true,\n label: 'Choice Labels',\n },\n deleteChoice: {\n settings: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n lockChoiceOrder: {\n settings: true,\n label: 'Lock Choice Order',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n inputConfiguration: {\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: false },\n },\n required: false,\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n toolbarEditorPosition: {\n settings: false,\n label: 'Toolbar Editor Position',\n },\n minAnswerChoices: 2,\n maxAnswerChoices: 5,\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 636,\n choices: 900,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n choices: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAHA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAIe;EACbC,KAAK,EAAE;IACLC,UAAU,EAAE,UAAU;IACtBC,YAAY,EAAE,SAAS;IACvBC,OAAO,EAAE,EAAE;IACXC,aAAa,EAAE,UAAU;IACzBC,eAAe,EAAE,KAAK;IACtBC,WAAW,EAAE,CAAC;IACdC,eAAe,EAAE,IAAI;IACrBC,cAAc,EAAE,IAAI;IACpBC,MAAM,EAAE,EAAE;IACVC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE,EAAE;IACbC,gBAAgB,EAAE,IAAI;IACtBC,WAAW,EAAE,MAAM;IACnBC,0BAA0B,EAAE,IAAI;IAChCC,mBAAmB,EAAE,EAAE;IACvBC,0BAA0B,EAAE,IAAI;IAChCC,qBAAqB,EAAE,QAAQ;IAC/BC,6BAA6B,EAAE,SAAS;IACxCC,qBAAqB,EAAE;EACzB,CAAC;EACDC,aAAa,EAAE;IACbC,sBAAsB,EAAE;MACtBC,EAAE,EAAE;QAAEC,QAAQ,EAAE;MAAK,CAAC;MACtBC,KAAK,EAAE;QAAED,QAAQ,EAAE;MAAM,CAAC;MAC1BE,KAAK,EAAE;QAAEF,QAAQ,EAAE;MAAM,CAAC;MAC1BG,KAAK,EAAE;QAAEH,QAAQ,EAAE;MAAM,CAAC;MAC1BI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MACXE,SAAS,EAAE,GAAG;MACdR,OAAO,EAAE;IACX,CAAC;IACD0C,UAAU,EAAE;MACVZ,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE;IACT,CAAC;IACDc,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRhB,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE,kBAAkB;MACzBE,OAAO,EAAE;IACX,CAAC;IACDgB,eAAe,EAAE;MACflB,KAAK,EAAE,kBAAkB;MACzBmB,OAAO,EAAE;IACX;EACF;AACF,CAAC","ignoreList":[]}
@@ -1,107 +1,67 @@
1
- // @ts-nocheck
2
- /**
3
- * @synced-from pie-elements/packages/multiple-choice/configure/src/index.js
4
- * @auto-generated
5
- *
6
- * This file is automatically synced from pie-elements and converted to TypeScript.
7
- * Manual edits will be overwritten on next sync.
8
- * To make changes, edit the upstream JavaScript file and run sync again.
9
- */
10
-
11
- import React from 'react';
12
- import { createRoot } from 'react-dom/client';
13
- import debug from 'debug';
14
- import {
15
- DeleteImageEvent,
16
- InsertImageEvent,
17
- ModelUpdatedEvent,
18
- InsertSoundEvent,
19
- DeleteSoundEvent,
20
- } from '@pie-element/shared-configure-events';
21
-
22
- import Main from './main.js';
23
- import { choiceUtils as utils } from '@pie-lib/config-ui';
24
- import { defaults } from 'lodash-es';
25
-
26
- import sensibleDefaults from './defaults.js';
27
-
28
- const log = debug('multiple-choice:configure');
29
-
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 _debug = _interopRequireDefault(require("debug"));
12
+ var _pieConfigureEvents = require("@pie-framework/pie-configure-events");
13
+ var _main = _interopRequireDefault(require("./main"));
14
+ var _configUi = require("@pie-lib/config-ui");
15
+ var _lodashEs = require("lodash-es");
16
+ var _defaults = _interopRequireDefault(require("./defaults"));
17
+ const log = (0, _debug.default)('multiple-choice:configure');
30
18
  const generateFormattedChoices = (choices, choiceCount = 0) => {
31
19
  if (!choices || choices.length === 0) {
32
20
  let formattedChoices = [];
33
-
34
21
  for (let i = 0; i < choiceCount; i++) {
35
22
  formattedChoices.push({
36
23
  value: `${i}`,
37
24
  label: '',
38
25
  feedback: {
39
26
  type: 'none',
40
- value: '',
41
- },
27
+ value: ''
28
+ }
42
29
  });
43
30
  }
44
-
45
31
  return formattedChoices;
46
32
  }
47
-
48
33
  return choices;
49
34
  };
50
-
51
35
  const prepareCustomizationObject = (config, model) => {
52
- const configuration = defaults(config, sensibleDefaults.configuration);
53
-
36
+ const configuration = (0, _lodashEs.defaults)(config, _defaults.default.configuration);
54
37
  return {
55
38
  configuration,
56
39
  model: {
57
40
  ...model,
58
- choices: generateFormattedChoices(
59
- (model && model.choices) || [],
60
- configuration && configuration.answerChoiceCount,
61
- ),
62
- },
41
+ choices: generateFormattedChoices(model && model.choices || [], configuration && configuration.answerChoiceCount)
42
+ }
63
43
  };
64
44
  };
65
-
66
- export default class MultipleChoice extends HTMLElement {
67
- static createDefaultModel = (model = {}) => {
68
- const normalizedModel = utils.normalizeChoices({
69
- ...sensibleDefaults.model,
70
- ...model,
71
- choices: generateFormattedChoices((model && model.choices) || []),
72
- });
73
-
74
- // This is used for offering support for old models which have the property "verticalMode"
75
- normalizedModel.choicesLayout =
76
- model.choicesLayout || (model.verticalMode === false && 'horizontal') || sensibleDefaults.model.choicesLayout;
77
-
78
- return normalizedModel;
79
- };
80
-
45
+ class MultipleChoice extends HTMLElement {
81
46
  constructor() {
82
47
  super();
83
48
  this._root = null;
84
49
  this._reactContainer = null;
85
50
  this._model = MultipleChoice.createDefaultModel();
86
- this._configuration = sensibleDefaults.configuration;
51
+ this._configuration = _defaults.default.configuration;
87
52
  this.onModelChanged = this.onModelChanged.bind(this);
88
53
  this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
89
54
  }
90
-
91
55
  set model(s) {
92
56
  this._model = MultipleChoice.createDefaultModel(s);
93
-
94
57
  this._render();
95
58
  }
96
-
97
59
  set configuration(c) {
98
60
  const info = prepareCustomizationObject(c, this._model);
99
-
100
61
  this.onModelChanged(info.model);
101
-
102
62
  const newConfiguration = {
103
- ...sensibleDefaults.configuration,
104
- ...info.configuration,
63
+ ..._defaults.default.configuration,
64
+ ...info.configuration
105
65
  };
106
66
  this._configuration = newConfiguration;
107
67
 
@@ -115,79 +75,67 @@ export default class MultipleChoice extends HTMLElement {
115
75
  }
116
76
  } else if (newConfiguration.language.settings && this._model.language) {
117
77
  this._configuration.language.enabled = true;
118
-
119
78
  if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {
120
79
  this._configuration.languageChoices.options = [];
121
80
  }
122
81
 
123
82
  // check if the language is already included in the languageChoices.options array
124
83
  // and if not, then add it.
125
- if (!this._configuration.languageChoices.options.find((option) => option.value === this._model.language)) {
84
+ if (!this._configuration.languageChoices.options.find(option => option.value === this._model.language)) {
126
85
  this._configuration.languageChoices.options.push({
127
86
  value: this._model.language,
128
- label: this._model.language,
87
+ label: this._model.language
129
88
  });
130
89
  }
131
90
  } else {
132
91
  delete this._model.language;
133
92
  }
134
-
135
93
  this._render();
136
94
  }
137
-
138
95
  set disableSidePanel(s) {
139
96
  this._disableSidePanel = s;
140
97
  this._render();
141
98
  }
142
-
143
99
  dispatchModelUpdated(reset) {
144
100
  const resetValue = !!reset;
145
-
146
- this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));
101
+ this.dispatchEvent(new _pieConfigureEvents.ModelUpdatedEvent(this._model, resetValue));
147
102
  }
148
-
149
103
  onModelChanged(m, reset) {
150
- this._model = m;
104
+ this._model = {
105
+ ...this._model,
106
+ ...m
107
+ };
151
108
  this._render();
152
-
153
109
  this.dispatchModelUpdated(reset);
154
110
  }
155
-
156
111
  onConfigurationChanged(c) {
157
112
  this._configuration = prepareCustomizationObject(c, this._model).configuration;
158
-
159
113
  if (this._model) {
160
114
  this.onModelChanged(this._model);
161
115
  }
162
-
163
116
  this._render();
164
117
  }
165
118
 
166
119
  /** @param {done, progress, file} handler */
167
120
  insertImage(handler) {
168
- this.dispatchEvent(new InsertImageEvent(handler));
121
+ this.dispatchEvent(new _pieConfigureEvents.InsertImageEvent(handler));
169
122
  }
170
-
171
123
  onDeleteImage(src, done) {
172
- this.dispatchEvent(new DeleteImageEvent(src, done));
124
+ this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
173
125
  }
174
-
175
126
  insertSound(handler) {
176
- this.dispatchEvent(new InsertSoundEvent(handler));
127
+ this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
177
128
  }
178
-
179
129
  onDeleteSound(src, done) {
180
- this.dispatchEvent(new DeleteSoundEvent(src, done));
130
+ this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
181
131
  }
182
-
183
132
  _render() {
184
133
  log('_render - Starting render');
185
134
  log('_render - Model:', this._model ? 'present' : 'missing');
186
135
  log('_render - Configuration:', this._configuration ? 'present' : 'missing');
187
136
  log('_render - Root exists:', !!this._root);
188
-
189
137
  try {
190
- let element = React.createElement(Main, {
138
+ let element = /*#__PURE__*/_react.default.createElement(_main.default, {
191
139
  model: this._model,
192
140
  configuration: this._configuration,
193
141
  onModelChanged: this.onModelChanged,
@@ -195,14 +143,13 @@ export default class MultipleChoice extends HTMLElement {
195
143
  disableSidePanel: this._disableSidePanel,
196
144
  imageSupport: {
197
145
  add: this.insertImage.bind(this),
198
- delete: this.onDeleteImage.bind(this),
146
+ delete: this.onDeleteImage.bind(this)
199
147
  },
200
148
  uploadSoundSupport: {
201
149
  add: this.insertSound.bind(this),
202
- delete: this.onDeleteSound.bind(this),
203
- },
150
+ delete: this.onDeleteSound.bind(this)
151
+ }
204
152
  });
205
-
206
153
  if (!this._root) {
207
154
  log('_render - Creating React container');
208
155
 
@@ -210,12 +157,10 @@ export default class MultipleChoice extends HTMLElement {
210
157
  this._reactContainer = document.createElement('div');
211
158
  this._reactContainer.className = 'pie-configure-wrapper';
212
159
  this.appendChild(this._reactContainer);
213
-
214
160
  log('_render - Creating new React root');
215
- this._root = createRoot(this._reactContainer);
161
+ this._root = (0, _client.createRoot)(this._reactContainer);
216
162
  log('_render - React root created successfully');
217
163
  }
218
-
219
164
  log('_render - Calling root.render()');
220
165
  this._root.render(element);
221
166
  log('_render - Render completed successfully');
@@ -225,13 +170,11 @@ export default class MultipleChoice extends HTMLElement {
225
170
  throw error;
226
171
  }
227
172
  }
228
-
229
173
  connectedCallback() {
230
174
  log('connectedCallback - Component connected to DOM');
231
175
  log('connectedCallback - Model:', this._model ? 'present' : 'missing');
232
176
  log('connectedCallback - Configuration:', this._configuration ? 'present' : 'missing');
233
177
  }
234
-
235
178
  disconnectedCallback() {
236
179
  log('disconnectedCallback - Component disconnected from DOM');
237
180
  if (this._root) {
@@ -244,3 +187,16 @@ export default class MultipleChoice extends HTMLElement {
244
187
  }
245
188
  }
246
189
  }
190
+ exports.default = MultipleChoice;
191
+ (0, _defineProperty2.default)(MultipleChoice, "createDefaultModel", (model = {}) => {
192
+ const normalizedModel = _configUi.choiceUtils.normalizeChoices({
193
+ ..._defaults.default.model,
194
+ ...model,
195
+ choices: generateFormattedChoices(model && model.choices || [])
196
+ });
197
+
198
+ // This is used for offering support for old models which have the property "verticalMode"
199
+ normalizedModel.choicesLayout = model.choicesLayout || model.verticalMode === false && 'horizontal' || _defaults.default.model.choicesLayout;
200
+ return normalizedModel;
201
+ });
202
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_client","_debug","_pieConfigureEvents","_main","_configUi","_lodashEs","_defaults","log","debug","generateFormattedChoices","choices","choiceCount","length","formattedChoices","i","push","value","label","feedback","type","prepareCustomizationObject","config","model","configuration","defaults","sensibleDefaults","answerChoiceCount","MultipleChoice","HTMLElement","constructor","_root","_reactContainer","_model","createDefaultModel","_configuration","onModelChanged","bind","onConfigurationChanged","s","_render","c","info","newConfiguration","language","enabled","languageChoices","options","settings","find","option","disableSidePanel","_disableSidePanel","dispatchModelUpdated","reset","resetValue","dispatchEvent","ModelUpdatedEvent","m","insertImage","handler","InsertImageEvent","onDeleteImage","src","done","DeleteImageEvent","insertSound","InsertSoundEvent","onDeleteSound","DeleteSoundEvent","element","React","createElement","Main","imageSupport","add","delete","uploadSoundSupport","document","className","appendChild","createRoot","render","error","console","stack","connectedCallback","disconnectedCallback","unmount","exports","default","_defineProperty2","normalizedModel","utils","normalizeChoices","choicesLayout","verticalMode"],"sources":["../src/index.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport debug from 'debug';\nimport {\n DeleteImageEvent,\n InsertImageEvent,\n ModelUpdatedEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-framework/pie-configure-events';\n\nimport Main from './main';\nimport { choiceUtils as utils } from '@pie-lib/config-ui';\nimport { defaults } from 'lodash-es';\n\nimport sensibleDefaults from './defaults';\n\nconst log = debug('multiple-choice:configure');\n\nconst generateFormattedChoices = (choices, choiceCount = 0) => {\n if (!choices || choices.length === 0) {\n let formattedChoices = [];\n\n for (let i = 0; i < choiceCount; i++) {\n formattedChoices.push({\n value: `${i}`,\n label: '',\n feedback: {\n type: 'none',\n value: '',\n },\n });\n }\n\n return formattedChoices;\n }\n\n return choices;\n};\n\nconst prepareCustomizationObject = (config, model) => {\n const configuration = defaults(config, sensibleDefaults.configuration);\n\n return {\n configuration,\n model: {\n ...model,\n choices: generateFormattedChoices(\n (model && model.choices) || [],\n configuration && configuration.answerChoiceCount,\n ),\n },\n };\n};\n\nexport default class MultipleChoice extends HTMLElement {\n static createDefaultModel = (model = {}) => {\n const normalizedModel = utils.normalizeChoices({\n ...sensibleDefaults.model,\n ...model,\n choices: generateFormattedChoices((model && model.choices) || []),\n });\n\n // This is used for offering support for old models which have the property \"verticalMode\"\n normalizedModel.choicesLayout =\n model.choicesLayout || (model.verticalMode === false && 'horizontal') || sensibleDefaults.model.choicesLayout;\n\n return normalizedModel;\n };\n\n constructor() {\n super();\n this._root = null;\n this._reactContainer = null;\n this._model = MultipleChoice.createDefaultModel();\n this._configuration = sensibleDefaults.configuration;\n this.onModelChanged = this.onModelChanged.bind(this);\n this.onConfigurationChanged = this.onConfigurationChanged.bind(this);\n }\n\n set model(s) {\n this._model = MultipleChoice.createDefaultModel(s);\n\n this._render();\n }\n\n set configuration(c) {\n const info = prepareCustomizationObject(c, this._model);\n\n this.onModelChanged(info.model);\n\n const newConfiguration = {\n ...sensibleDefaults.configuration,\n ...info.configuration,\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 set disableSidePanel(s) {\n this._disableSidePanel = s;\n this._render();\n }\n\n dispatchModelUpdated(reset) {\n const resetValue = !!reset;\n\n this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));\n }\n\n onModelChanged(m, reset) {\n this._model = {\n ...this._model,\n ...m,\n };\n this._render();\n\n this.dispatchModelUpdated(reset);\n }\n\n onConfigurationChanged(c) {\n this._configuration = prepareCustomizationObject(c, this._model).configuration;\n\n if (this._model) {\n this.onModelChanged(this._model);\n }\n\n this._render();\n }\n\n /** @param {done, progress, file} handler */\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 log('_render - Starting render');\n log('_render - Model:', this._model ? 'present' : 'missing');\n log('_render - Configuration:', this._configuration ? 'present' : 'missing');\n log('_render - Root exists:', !!this._root);\n\n try {\n let element = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n disableSidePanel: this._disableSidePanel,\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 log('_render - Creating React container');\n\n // Create a container div for React to render into\n this._reactContainer = document.createElement('div');\n this._reactContainer.className = 'pie-configure-wrapper';\n this.appendChild(this._reactContainer);\n\n log('_render - Creating new React root');\n this._root = createRoot(this._reactContainer);\n log('_render - React root created successfully');\n }\n\n log('_render - Calling root.render()');\n this._root.render(element);\n log('_render - Render completed successfully');\n } catch (error) {\n console.error('❌ [multiple-choice-configure] Render error:', error);\n console.error('Error stack:', error.stack);\n throw error;\n }\n }\n\n connectedCallback() {\n log('connectedCallback - Component connected to DOM');\n log('connectedCallback - Model:', this._model ? 'present' : 'missing');\n log('connectedCallback - Configuration:', this._configuration ? 'present' : 'missing');\n }\n\n disconnectedCallback() {\n log('disconnectedCallback - Component disconnected from DOM');\n if (this._root) {\n log('disconnectedCallback - Unmounting React root');\n this._root.unmount();\n this._root = null;\n }\n if (this._reactContainer) {\n this._reactContainer = null;\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAQA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAEA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEA,MAAMQ,GAAG,GAAG,IAAAC,cAAK,EAAC,2BAA2B,CAAC;AAE9C,MAAMC,wBAAwB,GAAGA,CAACC,OAAO,EAAEC,WAAW,GAAG,CAAC,KAAK;EAC7D,IAAI,CAACD,OAAO,IAAIA,OAAO,CAACE,MAAM,KAAK,CAAC,EAAE;IACpC,IAAIC,gBAAgB,GAAG,EAAE;IAEzB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,WAAW,EAAEG,CAAC,EAAE,EAAE;MACpCD,gBAAgB,CAACE,IAAI,CAAC;QACpBC,KAAK,EAAE,GAAGF,CAAC,EAAE;QACbG,KAAK,EAAE,EAAE;QACTC,QAAQ,EAAE;UACRC,IAAI,EAAE,MAAM;UACZH,KAAK,EAAE;QACT;MACF,CAAC,CAAC;IACJ;IAEA,OAAOH,gBAAgB;EACzB;EAEA,OAAOH,OAAO;AAChB,CAAC;AAED,MAAMU,0BAA0B,GAAGA,CAACC,MAAM,EAAEC,KAAK,KAAK;EACpD,MAAMC,aAAa,GAAG,IAAAC,kBAAQ,EAACH,MAAM,EAAEI,iBAAgB,CAACF,aAAa,CAAC;EAEtE,OAAO;IACLA,aAAa;IACbD,KAAK,EAAE;MACL,GAAGA,KAAK;MACRZ,OAAO,EAAED,wBAAwB,CAC9Ba,KA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