@pie-element/multiple-choice 13.2.1 → 13.2.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/defaults.d.ts +205 -0
  4. package/dist/author/defaults.js +151 -0
  5. package/dist/author/index.d.ts +26 -0
  6. package/dist/author/index.js +119 -0
  7. package/dist/author/main.d.ts +34 -0
  8. package/dist/author/main.js +287 -0
  9. package/dist/author/utils.d.ts +9 -0
  10. package/dist/author/utils.js +7 -0
  11. package/dist/browser/_Uint8Array-CUOjhemR.js +396 -0
  12. package/dist/browser/_Uint8Array-CUOjhemR.js.map +1 -0
  13. package/dist/browser/_baseClone-fFvdZAu5.js +245 -0
  14. package/dist/browser/_baseClone-fFvdZAu5.js.map +1 -0
  15. package/dist/browser/author/index.js +40187 -0
  16. package/dist/browser/author/index.js.map +1 -0
  17. package/dist/browser/controller/index.js +199 -0
  18. package/dist/browser/controller/index.js.map +1 -0
  19. package/dist/browser/debounce-PkR6OuzU.js +9669 -0
  20. package/dist/browser/debounce-PkR6OuzU.js.map +1 -0
  21. package/dist/browser/delivery/index.js +250 -0
  22. package/dist/browser/delivery/index.js.map +1 -0
  23. package/dist/browser/isEqual-CnAlrBXo.js +182 -0
  24. package/dist/browser/isEqual-CnAlrBXo.js.map +1 -0
  25. package/dist/browser/isObject-B-uKF3Sg.js +38 -0
  26. package/dist/browser/isObject-B-uKF3Sg.js.map +1 -0
  27. package/dist/browser/main-CmP4Uwst.js +2440 -0
  28. package/dist/browser/main-CmP4Uwst.js.map +1 -0
  29. package/dist/browser/multiple-choice.css +2 -0
  30. package/dist/browser/print/index.js +48 -0
  31. package/dist/browser/print/index.js.map +1 -0
  32. package/dist/controller/defaults.d.ts +35 -0
  33. package/dist/controller/defaults.js +29 -0
  34. package/dist/controller/index.d.ts +65 -0
  35. package/dist/controller/index.js +124 -0
  36. package/dist/controller/utils.d.ts +10 -0
  37. package/dist/controller/utils.js +8 -0
  38. package/dist/delivery/choice-input.d.ts +44 -0
  39. package/dist/delivery/choice-input.js +272 -0
  40. package/dist/delivery/choice.d.ts +20 -0
  41. package/dist/delivery/choice.js +105 -0
  42. package/dist/delivery/feedback-tick.d.ts +20 -0
  43. package/dist/delivery/feedback-tick.js +104 -0
  44. package/dist/delivery/index.d.ts +37 -0
  45. package/dist/delivery/index.js +214 -0
  46. package/dist/delivery/main.d.ts +31 -0
  47. package/dist/delivery/main.js +51 -0
  48. package/dist/delivery/multiple-choice.d.ts +61 -0
  49. package/dist/delivery/multiple-choice.js +244 -0
  50. package/dist/delivery/session-updater.d.ts +10 -0
  51. package/dist/delivery/session-updater.js +9 -0
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.iife.d.ts +8 -0
  54. package/dist/index.iife.js +148 -0
  55. package/dist/index.js +2 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +8 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +19 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +6 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +14 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +8 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +8 -0
  205. package/dist/print/index.d.ts +15 -0
  206. package/dist/print/index.js +44 -0
  207. package/package.json +82 -25
  208. package/CHANGELOG.json +0 -1972
  209. package/CHANGELOG.md +0 -2720
  210. package/LICENSE.md +0 -5
  211. package/PRINT.md +0 -35
  212. package/README.md +0 -56
  213. package/choice.png +0 -0
  214. package/configure/CHANGELOG.json +0 -1387
  215. package/configure/CHANGELOG.md +0 -2068
  216. package/configure/lib/defaults.js +0 -203
  217. package/configure/lib/defaults.js.map +0 -1
  218. package/configure/lib/index.js +0 -202
  219. package/configure/lib/index.js.map +0 -1
  220. package/configure/lib/main.js +0 -484
  221. package/configure/lib/main.js.map +0 -1
  222. package/configure/lib/utils.js +0 -18
  223. package/configure/lib/utils.js.map +0 -1
  224. package/configure/package.json +0 -22
  225. package/controller/CHANGELOG.json +0 -527
  226. package/controller/CHANGELOG.md +0 -1405
  227. package/controller/lib/defaults.js +0 -33
  228. package/controller/lib/defaults.js.map +0 -1
  229. package/controller/lib/index.js +0 -288
  230. package/controller/lib/index.js.map +0 -1
  231. package/controller/lib/utils.js +0 -15
  232. package/controller/lib/utils.js.map +0 -1
  233. package/controller/package.json +0 -15
  234. package/docs/config-schema.json +0 -2993
  235. package/docs/config-schema.json.md +0 -2217
  236. package/docs/demo/config.js +0 -8
  237. package/docs/demo/generate.js +0 -61
  238. package/docs/demo/index.html +0 -1
  239. package/docs/demo/session.js +0 -7
  240. package/docs/pie-schema.json +0 -1332
  241. package/docs/pie-schema.json.md +0 -1015
  242. package/lib/choice-input.js +0 -374
  243. package/lib/choice-input.js.map +0 -1
  244. package/lib/choice.js +0 -192
  245. package/lib/choice.js.map +0 -1
  246. package/lib/feedback-tick.js +0 -134
  247. package/lib/feedback-tick.js.map +0 -1
  248. package/lib/index.js +0 -402
  249. package/lib/index.js.map +0 -1
  250. package/lib/main.js +0 -63
  251. package/lib/main.js.map +0 -1
  252. package/lib/multiple-choice.js +0 -397
  253. package/lib/multiple-choice.js.map +0 -1
  254. package/lib/print.js +0 -94
  255. package/lib/print.js.map +0 -1
  256. package/lib/session-updater.js +0 -37
  257. package/lib/session-updater.js.map +0 -1
  258. package/module/configure.js +0 -1
  259. package/module/controller.js +0 -3045
  260. package/module/demo.js +0 -86
  261. package/module/element.js +0 -1
  262. package/module/index.html +0 -21
  263. package/module/manifest.json +0 -14
  264. package/module/print-demo.js +0 -124
  265. package/module/print.html +0 -18
  266. package/module/print.js +0 -1
@@ -0,0 +1,287 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js";
2
+ import { generateValidationMessage as t } from "./utils.js";
3
+ import n from "react";
4
+ import r from "prop-types";
5
+ import { color as i } from "@pie-lib/render-ui";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ import { styled as s } from "@mui/material/styles";
8
+ import c from "@mui/material/Box";
9
+ import l from "@pie-lib/editable-html-tip-tap";
10
+ import { AlertDialog as u, ChoiceConfiguration as ee, InputContainer as d, choiceUtils as f, layout as te, settings as p } from "@pie-lib/config-ui";
11
+ import m from "@mui/material/Button";
12
+ import h from "@mui/material/Tooltip";
13
+ import g from "@mui/material/Typography";
14
+ import ne from "@mui/icons-material/Info";
15
+ //#region src/author/main.tsx
16
+ var { Panel: re, toggle: _, radio: v, dropdown: y } = p, b = 9, ie = s(d)(({ theme: e }) => ({
17
+ width: "100%",
18
+ paddingTop: e.spacing(2),
19
+ marginBottom: e.spacing(2)
20
+ })), ae = s(d)(({ theme: e }) => ({
21
+ flex: 1,
22
+ marginTop: e.spacing(1.5),
23
+ paddingTop: e.spacing(2),
24
+ marginLeft: e.spacing(3.5)
25
+ })), oe = s(d)(({ theme: e }) => ({
26
+ display: "flex",
27
+ flexDirection: "column",
28
+ marginBottom: e.spacing(1),
29
+ width: "100%"
30
+ })), x = s(m)(({ theme: e }) => ({
31
+ marginTop: e.spacing(1),
32
+ float: "right"
33
+ })), se = s(x)({
34
+ cursor: "not-allowed",
35
+ pointerEvents: "all",
36
+ backgroundColor: i.disabled(),
37
+ "&:hover": { backgroundColor: i.disabled() },
38
+ "&:focus": { backgroundColor: i.disabled() }
39
+ }), ce = s(c)({
40
+ display: "flex",
41
+ alignItems: "center"
42
+ }), le = s(g)(({ theme: e }) => ({
43
+ fontSize: e.typography.fontSize + 2,
44
+ marginRight: e.spacing(1)
45
+ })), S = s(h)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
46
+ fontSize: e.typography.fontSize - 2,
47
+ whiteSpace: "pre",
48
+ maxWidth: "500px"
49
+ } })), C = s("div")(({ theme: e }) => ({
50
+ fontSize: e.typography.fontSize - 2,
51
+ color: e.palette.error.main,
52
+ paddingTop: e.spacing(1)
53
+ })), w = (e) => {
54
+ let { model: n, configuration: r, onPromptChanged: i, onChoiceChanged: s, onRemoveChoice: c, onAddChoice: u, imageSupport: d, uploadSoundSupport: f, onChangeModel: p, onConfigurationChanged: m, onTeacherInstructionsChanged: h } = e, { addChoiceButton: g = {}, contentDimensions: w = {}, feedback: T = {}, deleteChoice: ue = {}, choiceMode: de = {}, choicePrefix: fe = {}, partialScoring: E = {}, lockChoiceOrder: D = {}, teacherInstructions: O = {}, studentInstructions: k = {}, rationale: A = {}, scoringType: j = {}, sequentialChoiceLabels: M = {}, settingsPanelDisabled: pe, choicesLayout: N, spellCheck: P = {}, gridColumns: me, maxImageWidth: F = {}, maxImageHeight: I = {}, prompt: L = {}, withRubric: R = {}, mathMlOptions: z = {}, language: B = {}, languageChoices: V = {} } = r || {}, { maxAnswerChoices: H } = r || {}, { limitChoicesNumber: he, teacherInstructionsEnabled: ge, rationaleEnabled: _e, feedbackEnabled: ve, promptEnabled: ye, spellCheckEnabled: U, choices: W, errors: be, toolbarEditorPosition: xe, extraCSSRules: Se } = n || {}, { answerChoices: G, choices: Ce, correctResponse: K, prompt: q, rationale: J, teacherInstructions: Y } = be || {}, we = W?.length ? Array.from({ length: W.length }, (e, t) => `${t + 1}`) : [], { baseInputConfiguration: Te = {} } = r, X = { position: xe === "top" ? "top" : "bottom" };
55
+ he && (H = b);
56
+ let Z = (e = {}) => ({
57
+ ...Te,
58
+ ...e
59
+ }), Ee = t(r), Q = F && F.prompt, $ = I && I.prompt, De = H && W?.length >= H ? `Only ${H} allowed maximum` : "", Oe = {
60
+ choiceMode: de.settings && v(de.label, ["checkbox", "radio"]),
61
+ "sequentialChoiceLabels.enabled": M.settings && _(M.label, !0),
62
+ choicePrefix: fe.settings && v(fe.label, ["numbers", "letters"]),
63
+ partialScoring: E.settings && _(E.label),
64
+ lockChoiceOrder: D.settings && _(D.label),
65
+ feedbackEnabled: T.settings && _(T.label),
66
+ choicesLayout: N.settings && y(N.label, [
67
+ "vertical",
68
+ "grid",
69
+ "horizontal"
70
+ ]),
71
+ gridColumns: N.settings && n.choicesLayout === "grid" && we.length > 0 && y(me.label, we),
72
+ "language.enabled": B.settings && _(B.label, !0),
73
+ language: B.settings && B.enabled && y(V.label, V.options)
74
+ }, ke = {
75
+ teacherInstructionsEnabled: O.settings && _(O.label),
76
+ studentInstructionsEnabled: k.settings && _(k.label),
77
+ promptEnabled: L.settings && _(L.label),
78
+ rationaleEnabled: A.settings && _(A.label),
79
+ spellCheckEnabled: P.settings && _(P.label),
80
+ scoringType: j.settings && v(j.label, ["auto", "rubric"]),
81
+ rubricEnabled: R?.settings && _(R?.label)
82
+ };
83
+ return /* @__PURE__ */ o(te.ConfigLayout, {
84
+ dimensions: w,
85
+ hideSettings: pe,
86
+ extraCSSRules: Se,
87
+ classes: {},
88
+ settings: /* @__PURE__ */ a(re, {
89
+ model: n,
90
+ onChangeModel: p,
91
+ configuration: r,
92
+ onChangeConfiguration: m,
93
+ groups: {
94
+ Settings: Oe,
95
+ Properties: ke
96
+ }
97
+ }),
98
+ children: [
99
+ ge && /* @__PURE__ */ o(ie, {
100
+ label: O.label,
101
+ children: [/* @__PURE__ */ a(l, {
102
+ markup: n.teacherInstructions || "",
103
+ onChange: h,
104
+ imageSupport: d,
105
+ nonEmpty: !1,
106
+ disableUnderline: !0,
107
+ error: Y,
108
+ toolbarOpts: X,
109
+ pluginProps: Z(r?.teacherInstructions?.inputConfiguration),
110
+ spellCheck: U,
111
+ maxImageWidth: F && F.teacherInstructions || Q,
112
+ maxImageHeight: I && I.teacherInstructions || $,
113
+ uploadSoundSupport: f,
114
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
115
+ mathMlOptions: z
116
+ }), Y && /* @__PURE__ */ a(C, { children: Y })]
117
+ }),
118
+ ye && /* @__PURE__ */ o(ie, {
119
+ label: L.label,
120
+ children: [/* @__PURE__ */ a(l, {
121
+ markup: n.prompt,
122
+ onChange: i,
123
+ imageSupport: d,
124
+ nonEmpty: !1,
125
+ disableUnderline: !0,
126
+ error: q,
127
+ toolbarOpts: X,
128
+ pluginProps: Z(r?.prompt?.inputConfiguration),
129
+ spellCheck: U,
130
+ maxImageWidth: F && F.prompt,
131
+ maxImageHeight: I && I.prompt,
132
+ uploadSoundSupport: f,
133
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
134
+ mathMlOptions: z
135
+ }), q && /* @__PURE__ */ a(C, { children: q })]
136
+ }),
137
+ /* @__PURE__ */ o(ce, { children: [/* @__PURE__ */ a(le, {
138
+ component: "div",
139
+ children: "Choices"
140
+ }), /* @__PURE__ */ a(S, {
141
+ disableFocusListener: !0,
142
+ disableTouchListener: !0,
143
+ placement: "right",
144
+ title: Ee,
145
+ children: /* @__PURE__ */ a(ne, {
146
+ fontSize: "small",
147
+ color: "primary"
148
+ })
149
+ })] }),
150
+ W.map((e, t) => /* @__PURE__ */ o(oe, { children: [/* @__PURE__ */ a(ee, {
151
+ index: t + 1,
152
+ useLetterOrdering: n.choicePrefix === "letters",
153
+ mode: n.choiceMode,
154
+ data: e,
155
+ defaultFeedback: {},
156
+ imageSupport: d,
157
+ disableImageAlignmentButtons: !0,
158
+ onDelete: () => c(t),
159
+ onChange: (e) => s(t, e),
160
+ allowFeedBack: ve,
161
+ allowDelete: ue.settings,
162
+ noLabels: !0,
163
+ pluginOpts: Z(r?.choices?.inputConfiguration),
164
+ toolbarOpts: X,
165
+ spellCheck: U,
166
+ error: Ce?.[e.value] || null,
167
+ noCorrectAnswerError: K,
168
+ maxImageWidth: F && F.choices || Q,
169
+ maxImageHeight: I && I.choices || $,
170
+ uploadSoundSupport: f,
171
+ mathMlOptions: z
172
+ }, t), _e && /* @__PURE__ */ o(ae, {
173
+ label: A.label,
174
+ children: [/* @__PURE__ */ a(l, {
175
+ markup: e.rationale || "",
176
+ onChange: (n) => s(t, {
177
+ ...e,
178
+ rationale: n
179
+ }),
180
+ imageSupport: d,
181
+ error: J?.[e.value] || null,
182
+ toolbarOpts: X,
183
+ pluginProps: Z(r?.rationale?.inputConfiguration),
184
+ spellCheck: U,
185
+ maxImageWidth: F && F.rationale || Q,
186
+ maxImageHeight: I && I.rationale || $,
187
+ uploadSoundSupport: f,
188
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
189
+ mathMlOptions: z
190
+ }), J?.[e.value] && /* @__PURE__ */ a(C, { children: J?.[e.value] })]
191
+ }, `rationale-${t}`)] }, `choice-${t}`)),
192
+ K && /* @__PURE__ */ a(C, { children: K }),
193
+ G && /* @__PURE__ */ a(C, { children: G }),
194
+ g.settings && /* @__PURE__ */ a(S, {
195
+ title: De,
196
+ children: H && W?.length >= H ? /* @__PURE__ */ a(se, {
197
+ variant: "contained",
198
+ color: "primary",
199
+ onClick: u,
200
+ disabled: !0,
201
+ children: g.label
202
+ }) : /* @__PURE__ */ a(x, {
203
+ variant: "contained",
204
+ color: "primary",
205
+ onClick: u,
206
+ children: g.label
207
+ })
208
+ })
209
+ ]
210
+ });
211
+ }, T = class extends n.Component {
212
+ static propTypes = {
213
+ model: r.object.isRequired,
214
+ configuration: r.object.isRequired,
215
+ disableSidePanel: r.bool,
216
+ onModelChanged: r.func.isRequired,
217
+ onConfigurationChanged: r.func.isRequired,
218
+ imageSupport: r.shape({
219
+ add: r.func.isRequired,
220
+ delete: r.func.isRequired
221
+ })
222
+ };
223
+ state = { showWarning: !1 };
224
+ onRemoveChoice = (e) => {
225
+ let { model: t, configuration: n, onModelChanged: r } = this.props, { minAnswerChoices: i } = n || {};
226
+ if (i && t.choices.length === i) {
227
+ this.setState({ showWarning: !0 });
228
+ return;
229
+ }
230
+ t.choices.splice(e, 1), r({ choices: t.choices });
231
+ };
232
+ onAddChoice = () => {
233
+ let { model: e, configuration: t, onModelChanged: n } = this.props, { maxAnswerChoices: r } = t || {}, { limitChoicesNumber: i } = e || {};
234
+ i && (r = b), !(r && e.choices.length >= r) && (e.choices.push({
235
+ label: "",
236
+ value: f.firstAvailableIndex(e.choices.map((e) => e.value), 0),
237
+ feedback: { type: "none" }
238
+ }), n({ choices: e.choices }));
239
+ };
240
+ onChoiceChanged = (t, n) => {
241
+ let { model: r, onModelChanged: i } = this.props;
242
+ n.correct && r.choiceMode === "radio" && (r.choices = r.choices.map((t) => e({}, t, { correct: !1 }))), r.choices.splice(t, 1, n), i({ choices: r.choices });
243
+ };
244
+ onPromptChanged = (e) => {
245
+ this.props.onModelChanged({ prompt: e });
246
+ };
247
+ onTeacherInstructionsChanged = (e) => {
248
+ this.props.onModelChanged({ teacherInstructions: e });
249
+ };
250
+ onModelChanged = (e, t) => {
251
+ let { onModelChanged: n } = this.props;
252
+ switch (t) {
253
+ case "choiceMode":
254
+ if (e.choiceMode === "radio") {
255
+ let t = !1;
256
+ e.choices = e.choices.map((e) => t ? (e.correct = !1, e) : (e.correct && (t = !0), e));
257
+ }
258
+ n({
259
+ choiceMode: e.choiceMode,
260
+ choices: e.choices
261
+ }, !0);
262
+ break;
263
+ default:
264
+ n(e);
265
+ break;
266
+ }
267
+ };
268
+ render() {
269
+ let { configuration: { minAnswerChoices: e } = {} } = this.props, { showWarning: t } = this.state;
270
+ return /* @__PURE__ */ o(n.Fragment, { children: [/* @__PURE__ */ a(u, {
271
+ open: t,
272
+ title: "Warning",
273
+ text: `There can't be less than ${e || 0} choices.`,
274
+ onConfirm: () => this.setState({ showWarning: !1 })
275
+ }), /* @__PURE__ */ a(w, {
276
+ ...this.props,
277
+ onChangeModel: this.onModelChanged,
278
+ onRemoveChoice: this.onRemoveChoice,
279
+ onChoiceChanged: this.onChoiceChanged,
280
+ onAddChoice: this.onAddChoice,
281
+ onPromptChanged: this.onPromptChanged,
282
+ onTeacherInstructionsChanged: this.onTeacherInstructionsChanged
283
+ })] });
284
+ }
285
+ };
286
+ //#endregion
287
+ export { T as default };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/multiple-choice/configure/src/utils.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ export declare const generateValidationMessage: (config: any) => string;
@@ -0,0 +1,7 @@
1
+ //#region src/author/utils.ts
2
+ var e = (e) => {
3
+ let { minAnswerChoices: t, maxAnswerChoices: n } = e;
4
+ return "Validation requirements:" + (`\nThere should be at least ${t} ` + (n ? `and at most ${n} ` : "") + "answer choices defined.\nEvery answer choice should be non-blank and unique.") + "\nA correct answer must be defined.";
5
+ };
6
+ //#endregion
7
+ export { e as generateValidationMessage };