@pie-element/ebsr 6.6.3-next.884 → 6.6.3-next.968

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 (709) hide show
  1. package/configure/lib/main.js +6 -4
  2. package/configure/lib/main.js.map +1 -1
  3. package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +1972 -0
  4. package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +1793 -0
  5. package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +5 -0
  6. package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +35 -0
  7. package/configure/node_modules/@pie-element/multiple-choice/README.md +56 -0
  8. package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
  9. package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +1387 -0
  10. package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +1334 -0
  11. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +104 -0
  12. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +1 -0
  13. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +198 -0
  14. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +1 -0
  15. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +599 -0
  16. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +1 -0
  17. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +18 -0
  18. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +1 -0
  19. package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +20 -0
  20. package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +527 -0
  21. package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +768 -0
  22. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +18 -0
  23. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +1 -0
  24. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +305 -0
  25. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +1 -0
  26. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +36 -0
  27. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +1 -0
  28. package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +15 -0
  29. package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +353 -0
  30. package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +277 -0
  31. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +8 -0
  32. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +52 -0
  33. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +1 -0
  34. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +7 -0
  35. package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +338 -0
  36. package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +274 -0
  37. package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +298 -0
  38. package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +1 -0
  39. package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +157 -0
  40. package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +1 -0
  41. package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +174 -0
  42. package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +1 -0
  43. package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +151 -0
  44. package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +1 -0
  45. package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +97 -0
  46. package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +1 -0
  47. package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +254 -0
  48. package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +1 -0
  49. package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +129 -0
  50. package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +1 -0
  51. package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +35 -0
  52. package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +1 -0
  53. package/configure/node_modules/@pie-element/multiple-choice/module/configure.js +843 -0
  54. package/{module → configure/node_modules/@pie-element/multiple-choice/module}/controller.js +17304 -17374
  55. package/configure/node_modules/@pie-element/multiple-choice/module/demo.js +77 -0
  56. package/{module → configure/node_modules/@pie-element/multiple-choice/module}/element.js +5 -150
  57. package/{module → configure/node_modules/@pie-element/multiple-choice/module}/index.html +1 -1
  58. package/{module → configure/node_modules/@pie-element/multiple-choice/module}/manifest.json +2 -2
  59. package/{module → configure/node_modules/@pie-element/multiple-choice/module}/print-demo.js +46 -46
  60. package/{module → configure/node_modules/@pie-element/multiple-choice/module}/print.html +1 -1
  61. package/{module → configure/node_modules/@pie-element/multiple-choice/module}/print.js +33 -238
  62. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +1677 -0
  63. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +1645 -0
  64. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +5 -0
  65. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +12 -0
  66. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +44 -0
  67. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +1 -0
  68. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +86 -0
  69. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +1 -0
  70. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +180 -0
  71. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +1 -0
  72. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +409 -0
  73. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +1 -0
  74. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +54 -0
  75. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +1 -0
  76. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +196 -0
  77. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +1 -0
  78. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +75 -0
  79. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +1 -0
  80. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +189 -0
  81. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +1 -0
  82. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +46 -0
  83. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +1 -0
  84. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +156 -0
  85. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +1 -0
  86. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +216 -0
  87. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +1 -0
  88. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +152 -0
  89. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +1 -0
  90. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +131 -0
  91. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +1 -0
  92. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +191 -0
  93. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +1 -0
  94. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +113 -0
  95. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +1 -0
  96. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +24 -0
  97. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +1 -0
  98. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +115 -0
  99. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +1 -0
  100. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +99 -0
  101. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +1 -0
  102. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +79 -0
  103. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +1 -0
  104. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +370 -0
  105. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +1 -0
  106. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +278 -0
  107. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +1 -0
  108. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +41 -0
  109. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +1 -0
  110. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +77 -0
  111. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +1 -0
  112. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +140 -0
  113. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +1 -0
  114. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +426 -0
  115. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +1 -0
  116. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +43 -0
  117. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +1 -0
  118. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +56 -0
  119. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +1 -0
  120. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +117 -0
  121. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +1 -0
  122. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +210 -0
  123. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +1 -0
  124. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +192 -0
  125. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +1 -0
  126. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +95 -0
  127. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +1 -0
  128. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
  129. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
  130. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
  131. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
  132. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
  133. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
  134. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
  135. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
  136. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
  137. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
  138. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
  139. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
  140. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
  141. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
  142. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
  143. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/package.json +19 -0
  144. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
  145. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
  146. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
  147. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
  148. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
  149. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
  150. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
  151. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
  152. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
  153. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
  154. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
  155. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
  156. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
  157. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
  158. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/README.md +33 -0
  159. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
  160. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
  161. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
  162. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
  163. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
  164. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
  165. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
  166. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
  167. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
  168. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
  169. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
  170. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
  171. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
  172. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
  173. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
  174. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
  175. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
  176. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
  177. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
  178. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
  179. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
  180. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
  181. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
  182. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
  183. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
  184. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
  185. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/package.json +30 -0
  186. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
  187. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/color.js +48 -0
  188. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
  189. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
  190. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
  191. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/index.js +27 -0
  192. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
  193. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
  194. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
  195. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
  196. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
  197. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
  198. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
  199. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +30 -0
  200. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +43 -0
  201. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +63 -0
  202. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +103 -0
  203. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +315 -0
  204. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +30 -0
  205. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +116 -0
  206. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +54 -0
  207. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +98 -0
  208. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +23 -0
  209. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +88 -0
  210. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +58 -0
  211. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +72 -0
  212. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +96 -0
  213. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +122 -0
  214. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +64 -0
  215. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +4 -0
  216. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +60 -0
  217. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +31 -0
  218. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +64 -0
  219. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +279 -0
  220. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +196 -0
  221. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +18 -0
  222. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +52 -0
  223. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +75 -0
  224. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +297 -0
  225. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +20 -0
  226. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +31 -0
  227. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +51 -0
  228. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +121 -0
  229. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +94 -0
  230. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +36 -0
  231. package/configure/node_modules/@pie-element/multiple-choice/package.json +34 -0
  232. package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +547 -0
  233. package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +516 -0
  234. package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +5 -0
  235. package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +64 -0
  236. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +86 -0
  237. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +1 -0
  238. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +155 -0
  239. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +1 -0
  240. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +65 -0
  241. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +1 -0
  242. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
  243. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
  244. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
  245. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
  246. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
  247. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
  248. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
  249. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
  250. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
  251. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
  252. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
  253. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
  254. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
  255. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
  256. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
  257. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/package.json +19 -0
  258. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
  259. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
  260. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
  261. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
  262. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
  263. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
  264. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
  265. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
  266. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
  267. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
  268. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
  269. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
  270. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
  271. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
  272. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/README.md +33 -0
  273. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
  274. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
  275. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
  276. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
  277. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
  278. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
  279. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
  280. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
  281. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
  282. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
  283. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
  284. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
  285. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
  286. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
  287. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
  288. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
  289. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
  290. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
  291. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
  292. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
  293. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
  294. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
  295. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
  296. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
  297. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
  298. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
  299. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/package.json +30 -0
  300. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
  301. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/color.js +48 -0
  302. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
  303. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
  304. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
  305. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/index.js +27 -0
  306. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
  307. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
  308. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
  309. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
  310. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
  311. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
  312. package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
  313. package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +36 -0
  314. package/configure/node_modules/@pie-lib/correct-answer-toggle/preview.png +0 -0
  315. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +65 -0
  316. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +75 -0
  317. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +60 -0
  318. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +3327 -0
  319. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +1616 -0
  320. package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +5 -0
  321. package/configure/node_modules/@pie-lib/editable-html/README.md +45 -0
  322. package/configure/node_modules/@pie-lib/editable-html/deploy.sh +16 -0
  323. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +752 -0
  324. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +1 -0
  325. package/configure/node_modules/@pie-lib/editable-html/lib/index.js +236 -0
  326. package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +1 -0
  327. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +16 -0
  328. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +1 -0
  329. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +250 -0
  330. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +1 -0
  331. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +143 -0
  332. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +1 -0
  333. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +219 -0
  334. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +1 -0
  335. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +139 -0
  336. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +1 -0
  337. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +135 -0
  338. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +1 -0
  339. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +204 -0
  340. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +1 -0
  341. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +347 -0
  342. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +1 -0
  343. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +344 -0
  344. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +1 -0
  345. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +449 -0
  346. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +1 -0
  347. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +109 -0
  348. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +1 -0
  349. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +106 -0
  350. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +1 -0
  351. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +264 -0
  352. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +1 -0
  353. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +97 -0
  354. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +1 -0
  355. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +54 -0
  356. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +1 -0
  357. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +93 -0
  358. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +1 -0
  359. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +288 -0
  360. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +1 -0
  361. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +70 -0
  362. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +1 -0
  363. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +110 -0
  364. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +1 -0
  365. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +69 -0
  366. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +1 -0
  367. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +497 -0
  368. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +1 -0
  369. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +169 -0
  370. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +1 -0
  371. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +132 -0
  372. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +1 -0
  373. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +50 -0
  374. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +1 -0
  375. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +275 -0
  376. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +1 -0
  377. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +32 -0
  378. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +1 -0
  379. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +179 -0
  380. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +1 -0
  381. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +358 -0
  382. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +1 -0
  383. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +62 -0
  384. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +1 -0
  385. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +411 -0
  386. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +1 -0
  387. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +9 -0
  388. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +1 -0
  389. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
  390. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
  391. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
  392. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
  393. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
  394. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
  395. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
  396. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
  397. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
  398. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
  399. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
  400. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
  401. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
  402. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
  403. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
  404. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/package.json +19 -0
  405. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
  406. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
  407. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
  408. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
  409. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
  410. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
  411. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
  412. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
  413. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
  414. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
  415. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
  416. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
  417. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
  418. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
  419. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/README.md +33 -0
  420. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
  421. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
  422. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
  423. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
  424. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
  425. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
  426. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
  427. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
  428. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
  429. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
  430. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
  431. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
  432. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
  433. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
  434. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
  435. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
  436. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
  437. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
  438. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
  439. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
  440. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
  441. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
  442. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
  443. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
  444. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
  445. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
  446. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/package.json +30 -0
  447. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
  448. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/color.js +48 -0
  449. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
  450. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
  451. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
  452. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/index.js +27 -0
  453. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
  454. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
  455. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
  456. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
  457. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
  458. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
  459. package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
  460. package/configure/node_modules/@pie-lib/editable-html/package.json +51 -0
  461. package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +59 -0
  462. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +24 -0
  463. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +83 -0
  464. package/configure/node_modules/@pie-lib/editable-html/playground/index.html +27 -0
  465. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +25 -0
  466. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +151 -0
  467. package/configure/node_modules/@pie-lib/editable-html/playground/package.json +15 -0
  468. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +26 -0
  469. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +30 -0
  470. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +29 -0
  471. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +40 -0
  472. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +23 -0
  473. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +96 -0
  474. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +29 -0
  475. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +40 -0
  476. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +24 -0
  477. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +12 -0
  478. package/configure/node_modules/@pie-lib/editable-html/playground/static.json +3 -0
  479. package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +67 -0
  480. package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +42 -0
  481. package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +641 -0
  482. package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +145 -0
  483. package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +8 -0
  484. package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +27 -0
  485. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +166 -0
  486. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +62 -0
  487. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +180 -0
  488. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +93 -0
  489. package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +112 -0
  490. package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +175 -0
  491. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +283 -0
  492. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +284 -0
  493. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +372 -0
  494. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +53 -0
  495. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +43 -0
  496. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +187 -0
  497. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +78 -0
  498. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +45 -0
  499. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +68 -0
  500. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +259 -0
  501. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +63 -0
  502. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +77 -0
  503. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +59 -0
  504. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +437 -0
  505. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +104 -0
  506. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +111 -0
  507. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +36 -0
  508. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +225 -0
  509. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +21 -0
  510. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +97 -0
  511. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +316 -0
  512. package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +32 -0
  513. package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +376 -0
  514. package/configure/node_modules/@pie-lib/editable-html/src/theme.js +1 -0
  515. package/configure/node_modules/@pie-lib/editable-html/static.json +1 -0
  516. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +1547 -0
  517. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +757 -0
  518. package/configure/node_modules/@pie-lib/math-input/LICENSE.md +5 -0
  519. package/configure/node_modules/@pie-lib/math-input/README.md +27 -0
  520. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +126 -0
  521. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +1 -0
  522. package/configure/node_modules/@pie-lib/math-input/lib/index.js +80 -0
  523. package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +1 -0
  524. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +417 -0
  525. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +1 -0
  526. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +34 -0
  527. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +1 -0
  528. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +41 -0
  529. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +1 -0
  530. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +17 -0
  531. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +1 -0
  532. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +46 -0
  533. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +1 -0
  534. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +43 -0
  535. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +1 -0
  536. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +53 -0
  537. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +1 -0
  538. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +16 -0
  539. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +1 -0
  540. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +35 -0
  541. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +1 -0
  542. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +31 -0
  543. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +1 -0
  544. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +165 -0
  545. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +1 -0
  546. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +295 -0
  547. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +1 -0
  548. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +54 -0
  549. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +1 -0
  550. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +32 -0
  551. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +1 -0
  552. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +23 -0
  553. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +1 -0
  554. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +23 -0
  555. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +1 -0
  556. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +69 -0
  557. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +1 -0
  558. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +23 -0
  559. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +1 -0
  560. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +17 -0
  561. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +1 -0
  562. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +45 -0
  563. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +1 -0
  564. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +23 -0
  565. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +1 -0
  566. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +53 -0
  567. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +1 -0
  568. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +130 -0
  569. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +1 -0
  570. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +29 -0
  571. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +1 -0
  572. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +206 -0
  573. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +1 -0
  574. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +23 -0
  575. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +1 -0
  576. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +24 -0
  577. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +1 -0
  578. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +257 -0
  579. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +1 -0
  580. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +224 -0
  581. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +1 -0
  582. package/configure/node_modules/@pie-lib/math-input/package.json +26 -0
  583. package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +54 -0
  584. package/configure/node_modules/@pie-lib/math-input/src/index.jsx +27 -0
  585. package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +335 -0
  586. package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +17 -0
  587. package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +32 -0
  588. package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +5 -0
  589. package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +27 -0
  590. package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +35 -0
  591. package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +40 -0
  592. package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +3 -0
  593. package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +27 -0
  594. package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +23 -0
  595. package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +140 -0
  596. package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +379 -0
  597. package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +21 -0
  598. package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +22 -0
  599. package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +15 -0
  600. package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +15 -0
  601. package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +60 -0
  602. package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +8 -0
  603. package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +9 -0
  604. package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +36 -0
  605. package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +15 -0
  606. package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +15 -0
  607. package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +71 -0
  608. package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +19 -0
  609. package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +128 -0
  610. package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +11 -0
  611. package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +4 -0
  612. package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +163 -0
  613. package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +145 -0
  614. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
  615. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +427 -0
  616. package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
  617. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
  618. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
  619. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
  620. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
  621. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
  622. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
  623. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
  624. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
  625. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
  626. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
  627. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +275 -0
  628. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
  629. package/configure/node_modules/@pie-lib/math-rendering/package.json +19 -0
  630. package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
  631. package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
  632. package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
  633. package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
  634. package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
  635. package/configure/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
  636. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
  637. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
  638. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
  639. package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
  640. package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +234 -0
  641. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +862 -0
  642. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +631 -0
  643. package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +5 -0
  644. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +53 -0
  645. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +1 -0
  646. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +463 -0
  647. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +1 -0
  648. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +271 -0
  649. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +1 -0
  650. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +173 -0
  651. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +1 -0
  652. package/configure/node_modules/@pie-lib/math-toolbar/package.json +37 -0
  653. package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +39 -0
  654. package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +373 -0
  655. package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +193 -0
  656. package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +107 -0
  657. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
  658. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +602 -0
  659. package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
  660. package/configure/node_modules/@pie-lib/render-ui/README.md +33 -0
  661. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
  662. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
  663. package/configure/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
  664. package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
  665. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
  666. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
  667. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
  668. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
  669. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
  670. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
  671. package/configure/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
  672. package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
  673. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
  674. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
  675. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
  676. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
  677. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
  678. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
  679. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
  680. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
  681. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
  682. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
  683. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
  684. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
  685. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
  686. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
  687. package/configure/node_modules/@pie-lib/render-ui/package.json +30 -0
  688. package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
  689. package/configure/node_modules/@pie-lib/render-ui/src/color.js +48 -0
  690. package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
  691. package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
  692. package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
  693. package/configure/node_modules/@pie-lib/render-ui/src/index.js +27 -0
  694. package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
  695. package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
  696. package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
  697. package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
  698. package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
  699. package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
  700. package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
  701. package/configure/package.json +2 -2
  702. package/configure/src/__tests__/index.test.js +4 -2
  703. package/configure/src/main.jsx +8 -3
  704. package/controller/lib/index.js +79 -3
  705. package/controller/lib/index.js.map +1 -1
  706. package/controller/src/index.js +55 -0
  707. package/package.json +3 -3
  708. package/module/configure.js +0 -472
  709. package/module/demo.js +0 -77
@@ -9,9 +9,12 @@ exports.createDefaultModel = exports.createCorrectResponseSession = void 0;
9
9
  exports.model = model;
10
10
  exports.normalize = void 0;
11
11
  exports.outcome = outcome;
12
+ exports.validate = void 0;
12
13
 
13
14
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
14
15
 
16
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
17
+
15
18
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
16
19
 
17
20
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
@@ -132,7 +135,7 @@ function model(_x, _x2, _x3, _x4) {
132
135
 
133
136
  function _model() {
134
137
  _model = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(question, session, env, updateSession) {
135
- var normalizedQuestion, partA, partB, shuffledValues, us, partASession, partALockChoiceOrder, _ref6, partAChoices, _ref7, partBChoices, partBSession, partBLockChoiceOrder;
138
+ var normalizedQuestion, partA, partB, shuffledValues, us, partASession, partALockChoiceOrder, _ref8, partAChoices, _ref9, partBChoices, partBSession, partBLockChoiceOrder;
136
139
 
137
140
  return _regenerator["default"].wrap(function _callee$(_context) {
138
141
  while (1) {
@@ -154,8 +157,8 @@ function _model() {
154
157
 
155
158
  partASession = (0, _get["default"])(session, 'value.partA');
156
159
  partALockChoiceOrder = (0, _controllerUtils.lockChoices)(normalizedQuestion.partA, partASession, env);
157
- _ref6 = partA || {}, partAChoices = _ref6.choices;
158
- _ref7 = partB || {}, partBChoices = _ref7.choices;
160
+ _ref8 = partA || {}, partAChoices = _ref8.choices;
161
+ _ref9 = partB || {}, partBChoices = _ref9.choices;
159
162
 
160
163
  if (!(!partALockChoiceOrder && partAChoices && partAChoices.length)) {
161
164
  _context.next = 13;
@@ -392,4 +395,77 @@ var createCorrectResponseSession = function createCorrectResponseSession(questio
392
395
  };
393
396
 
394
397
  exports.createCorrectResponseSession = createCorrectResponseSession;
398
+
399
+ var validatePart = function validatePart() {
400
+ var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
401
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
402
+ var choices = model.choices;
403
+ var _config$minAnswerChoi = config.minAnswerChoices,
404
+ minAnswerChoices = _config$minAnswerChoi === void 0 ? 2 : _config$minAnswerChoi,
405
+ maxAnswerChoices = config.maxAnswerChoices;
406
+ var reversedChoices = (0, _toConsumableArray2["default"])(choices || []).reverse();
407
+ var choicesErrors = {};
408
+ var hasCorrectResponse = false;
409
+ reversedChoices.forEach(function (choice, index) {
410
+ var correct = choice.correct,
411
+ value = choice.value,
412
+ label = choice.label;
413
+
414
+ if (correct) {
415
+ hasCorrectResponse = true;
416
+ }
417
+
418
+ if (label === '' || label === '<div></div>') {
419
+ choicesErrors[value] = 'Content should not be empty.';
420
+ } else {
421
+ var identicalAnswer = reversedChoices.slice(index + 1).some(function (c) {
422
+ return c.label === label;
423
+ });
424
+
425
+ if (identicalAnswer) {
426
+ choicesErrors[value] = 'Content should be unique.';
427
+ }
428
+ }
429
+ });
430
+ var errors = {};
431
+ var nbOfChoices = (choices || []).length;
432
+
433
+ if (nbOfChoices < minAnswerChoices) {
434
+ errors.answerChoicesError = "There should be at least ".concat(minAnswerChoices, " choices defined.");
435
+ } else if (nbOfChoices > maxAnswerChoices) {
436
+ errors.answerChoicesError = "No more than ".concat(maxAnswerChoices, " choices should be defined.");
437
+ }
438
+
439
+ if (!hasCorrectResponse) {
440
+ errors.correctResponseError = 'No correct response defined.';
441
+ }
442
+
443
+ if (!(0, _isEmpty["default"])(choicesErrors)) {
444
+ errors.choicesErrors = choicesErrors;
445
+ }
446
+
447
+ return errors;
448
+ };
449
+
450
+ var validate = function validate() {
451
+ var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
452
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
453
+
454
+ var _ref6 = model || {},
455
+ partA = _ref6.partA,
456
+ partB = _ref6.partB;
457
+
458
+ var _ref7 = config || {},
459
+ partAConfig = _ref7.partA,
460
+ partBConfig = _ref7.partB;
461
+
462
+ var partAErrors = validatePart(partA, partAConfig);
463
+ var partBErrors = validatePart(partB, partBConfig);
464
+ return {
465
+ partA: partAErrors,
466
+ partB: partBErrors
467
+ };
468
+ };
469
+
470
+ exports.validate = validate;
395
471
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["prepareChoice","model","env","defaultFeedback","choice","out","label","value","role","mode","rationale","rationaleEnabled","correct","feedbackEnabled","feedbackType","feedback","type","parsePart","part","key","session","Object","assign","incorrect","choices","map","disabled","complete","min","filter","c","length","responseCorrect","undefined","normalize","partA","partB","question","partLabels","partLabelType","defaults","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","gridColumns","choicesLayout","verticalMode","updateSession","normalizedQuestion","shuffledValues","us","id","element","update","Promise","resolve","partASession","partALockChoiceOrder","partAChoices","partBChoices","partBSession","partBLockChoiceOrder","e","console","error","partLabel","teacherInstructions","prompt","createDefaultModel","isCorrect","getScore","config","sessionPart","maxScore","sessionPartValue","chosen","find","v","correctAndNotChosen","incorrectAndChosen","correctChoices","reduce","total","partialScoring","parseFloat","toFixed","outcome","score","scoreA","scoreB","empty","max","returnPartCorrect","answers","forEach","i","push","createCorrectResponseSession","partACorrect","partBCorrect"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAQC,GAAR,EAAaC,eAAb;AAAA,SAAiC,UAAAC,MAAM,EAAI;AAC/D,QAAMC,GAAG,GAAG;AACVC,MAAAA,KAAK,EAAEF,MAAM,CAACE,KADJ;AAEVC,MAAAA,KAAK,EAAEH,MAAM,CAACG;AAFJ,KAAZ;;AAKA,QACEL,GAAG,CAACM,IAAJ,KAAa,YAAb,KACCN,GAAG,CAACO,IAAJ,KAAa,MAAb,IAAuBP,GAAG,CAACO,IAAJ,KAAa,UADrC,CADF,EAGE;AACAJ,MAAAA,GAAG,CAACK,SAAJ,GAAgBT,KAAK,CAACU,gBAAN,GAAyBP,MAAM,CAACM,SAAhC,GAA4C,IAA5D;AACD,KALD,MAKO;AACLL,MAAAA,GAAG,CAACK,SAAJ,GAAgB,IAAhB;AACD;;AAED,QAAIR,GAAG,CAACO,IAAJ,KAAa,UAAjB,EAA6B;AAC3BJ,MAAAA,GAAG,CAACO,OAAJ,GAAc,CAAC,CAACR,MAAM,C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mF,CAA3B,CAAQnF,OAAR;AAAA,QAAiBL,KAAjB,GAA2BwF,CAA3B,CAAiBxF,KAAjB;;AACA,QAAIK,OAAJ,EAAa;AACXiF,MAAAA,OAAO,CAACG,IAAR,CAAazF,KAAb;AACD;AACF,GALD;AAMA,SAAOsF,OAAP;AACD,CAVD;;AAYO,IAAMI,4BAA4B,GAAG,SAA/BA,4BAA+B,CAAC5D,QAAD,EAAWnC,GAAX,EAAmB;AAC7D,SAAO,IAAIoD,OAAJ,CAAY,UAAAC,OAAO,EAAI;AAC5B,QAAIrD,GAAG,CAACO,IAAJ,KAAa,UAAb,IAA2BP,GAAG,CAACM,IAAJ,KAAa,YAA5C,EAA0D;AACxD,UAAQ2B,KAAR,GAAyBE,QAAzB,CAAQF,KAAR;AAAA,UAAeC,KAAf,GAAyBC,QAAzB,CAAeD,KAAf;AAEA,UAAM8D,YAAY,GAAGN,iBAAiB,CAACzD,KAAK,CAACX,OAAP,CAAtC;AACA,UAAM2E,YAAY,GAAGP,iBAAiB,CAACxD,KAAK,CAACZ,OAAP,CAAtC;AAEA+B,MAAAA,OAAO,CAAC;AACNhD,QAAAA,KAAK,EAAE;AACL4B,UAAAA,KAAK,EAAE;AACLgB,YAAAA,EAAE,EAAE,OADC;AAEL5C,YAAAA,KAAK,EAAE2F;AAFF,WADF;AAKL9D,UAAAA,KAAK,EAAE;AACLe,YAAAA,EAAE,EAAE,OADC;AAEL5C,YAAAA,KAAK,EAAE4F;AAFF;AALF,SADD;AAWNhD,QAAAA,EAAE,EAAE;AAXE,OAAD,CAAP;AAaD,KAnBD,MAmBO;AACLI,MAAAA,OAAO,CAAC,IAAD,CAAP;AACD;AACF,GAvBM,CAAP;AAwBD,CAzBM","sourcesContent":["import defaults from './defaults';\nimport { lockChoices, getShuffledChoices } from '@pie-lib/controller-utils';\nimport { isResponseCorrect } from './utils';\nimport get from 'lodash/get';\nimport isEmpty from 'lodash/isEmpty';\n\nconst prepareChoice = (model, env, defaultFeedback) => choice => {\n const out = {\n label: choice.label,\n value: choice.value\n };\n\n if (\n env.role === 'instructor' &&\n (env.mode === 'view' || env.mode === 'evaluate')\n ) {\n out.rationale = model.rationaleEnabled ? choice.rationale : null;\n } else {\n out.rationale = null;\n }\n\n if (env.mode === 'evaluate') {\n out.correct = !!choice.correct;\n\n if (model.feedbackEnabled) {\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback[choice.correct ? 'correct' : 'incorrect'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n }\n\n return out;\n};\n\nconst parsePart = (part, key, session, env) => {\n const defaultFeedback = Object.assign(\n { correct: 'Correct', incorrect: 'Incorrect' },\n part.defaultFeedback\n );\n\n let choices = part.choices\n ? part.choices.map(prepareChoice(part, env, defaultFeedback))\n : [];\n\n return {\n ...part,\n choices,\n disabled: env.mode !== 'gather',\n complete: {\n min: part.choices.filter(c => c.correct).length\n },\n responseCorrect:\n env.mode === 'evaluate'\n ? isResponseCorrect(part, key, session)\n : undefined\n };\n};\n\nexport const normalize = ({ partA = {}, partB = {}, ...question }) => ({\n partLabels: true,\n partLabelType: 'Letters',\n ...question,\n partA: {\n ...defaults.partA,\n rationaleEnabled: true,\n feedbackEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n gridColumns: '2',\n ...partA,\n choicesLayout: partA.choicesLayout || (partA.verticalMode === false && 'horizontal') || 'vertical'\n },\n partB: {\n ...defaults.partB,\n rationaleEnabled: true,\n promptEnabled: true,\n feedbackEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n gridColumns: '2',\n ...partB,\n choicesLayout: partB.choicesLayout || (partB.verticalMode === false && 'horizontal') || 'vertical'\n }\n});\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n const normalizedQuestion = normalize(question);\n const partA = parsePart(normalizedQuestion.partA, 'partA', session, env);\n const partB = parsePart(normalizedQuestion.partB, 'partB', session, env);\n\n const shuffledValues = {};\n\n const us = part => (id, element, update) =>\n new Promise(resolve => {\n shuffledValues[part] = update.shuffledValues;\n resolve();\n });\n\n const partASession = get(session, 'value.partA');\n const partALockChoiceOrder = lockChoices(normalizedQuestion.partA, partASession, env);\n\n const { choices: partAChoices } = partA || {};\n const { choices: partBChoices } = partB || {};\n\n if (!partALockChoiceOrder && partAChoices && partAChoices.length) {\n partA.choices = await getShuffledChoices(\n partAChoices,\n { shuffledValues: (session.shuffledValues || {}).partA },\n us('partA'),\n 'value'\n );\n }\n\n const partBSession = get(session, 'value.partB');\n const partBLockChoiceOrder = lockChoices(normalizedQuestion.partB, partBSession, env);\n\n if (!partBLockChoiceOrder && partBChoices && partBChoices.length) {\n partB.choices = await getShuffledChoices(\n partBChoices,\n { shuffledValues: (session.shuffledValues || {}).partB },\n us('partB'),\n 'value'\n );\n }\n\n if (!isEmpty(shuffledValues)) {\n if (updateSession && typeof updateSession === 'function') {\n updateSession(session.id, session.element, {\n shuffledValues\n }).catch(e => {\n console.error('update session failed', e);\n });\n }\n }\n\n if (normalizedQuestion.partLabels) {\n partA.partLabel =\n normalizedQuestion.partLabelType === 'Letters' ? 'Part A' : 'Part 1';\n partB.partLabel =\n normalizedQuestion.partLabelType === 'Letters' ? 'Part B' : 'Part 2';\n } else {\n partA.partLabel = undefined;\n partB.partLabel = undefined;\n }\n\n if (\n env.role === 'instructor' &&\n (env.mode === 'view' || env.mode === 'evaluate')\n ) {\n partA.teacherInstructions = normalizedQuestion.partA\n .teacherInstructionsEnabled\n ? normalizedQuestion.partA.teacherInstructions\n : null;\n partB.teacherInstructions = normalizedQuestion.partB\n .teacherInstructionsEnabled\n ? normalizedQuestion.partB.teacherInstructions\n : null;\n } else {\n partA.teacherInstructions = null;\n partB.teacherInstructions = null;\n }\n\n partA.prompt = normalizedQuestion.partA.promptEnabled\n ? normalizedQuestion.partA.prompt\n : null;\n partB.prompt = normalizedQuestion.partB.promptEnabled\n ? normalizedQuestion.partB.prompt\n : null;\n\n return new Promise(resolve => {\n resolve({\n disabled: env.mode !== 'gather',\n mode: env.mode,\n partA,\n partB\n });\n });\n}\n\nexport const createDefaultModel = (model = {}) =>\n new Promise(resolve => {\n resolve({\n ...defaults,\n ...model\n });\n });\n\nconst isCorrect = c => c.correct === true;\n\nconst getScore = (config, sessionPart, key) => {\n const { choices = [] } = (config && config[key]) || {};\n const maxScore = choices.length;\n const { value: sessionPartValue } = sessionPart || {};\n\n const chosen = c => !!(sessionPartValue || []).find(v => v === c.value);\n const correctAndNotChosen = c => isCorrect(c) && !chosen(c);\n const incorrectAndChosen = c => !isCorrect(c) && chosen(c);\n const correctChoices = choices.reduce((total, choice) => {\n if (correctAndNotChosen(choice) || incorrectAndChosen(choice)) {\n return total - 1;\n } else {\n return total;\n }\n }, choices.length);\n\n // determine score for a part\n if (!config.partialScoring && correctChoices < maxScore) {\n return 0;\n }\n\n return parseFloat(maxScore ? (correctChoices / maxScore).toFixed(2) : 0);\n};\n\nexport function outcome(config, session) {\n return new Promise(resolve => {\n const { value } = session || {};\n\n if (!session || !value) {\n resolve({ score: 0, scoreA: 0, scoreB: 0, empty: true });\n }\n\n if (value) {\n const { partA, partB } = value || {};\n\n const scoreA = getScore(config, partA, 'partA');\n const scoreB = getScore(config, partB, 'partB');\n\n if (!config.partialScoring) {\n // The EBSR item is worth 1 point\n // That point is awarded if and only if both parts are fully correct, otherwise no points are awarded\n resolve({ score: (scoreA === 1 && scoreB === 1) ? 1 : 0, scoreA, scoreB, max: 1 });\n } else {\n // The EBSR item is worth 2 points\n if (scoreA === 1) {\n if (scoreB === 1) {\n // If Part A and Part B are both correct, 2 points are awarded\n resolve({ score: 2, scoreA, scoreB, max: 2 });\n } else {\n // If Part A is correct and part B is incorrect, 1 point is awarded\n resolve({ score: 1, scoreA, scoreB, max: 2 });\n }\n } else {\n // For all other combinations, no points are awarded\n resolve({ score: 0, scoreA, scoreB, max: 2 });\n }\n }\n }\n });\n}\n\nconst returnPartCorrect = choices => {\n let answers = [];\n\n choices.forEach(i => {\n const { correct, value } = i;\n if (correct) {\n answers.push(value);\n }\n });\n return answers;\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise(resolve => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { partA, partB } = question;\n\n const partACorrect = returnPartCorrect(partA.choices);\n const partBCorrect = returnPartCorrect(partB.choices);\n\n resolve({\n value: {\n partA: {\n id: 'partA',\n value: partACorrect\n },\n partB: {\n id: 'partB',\n value: partBCorrect\n }\n },\n id: '1'\n });\n } else {\n resolve(null);\n }\n });\n};\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["prepareChoice","model","env","defaultFeedback","choice","out","label","value","role","mode","rationale","rationaleEnabled","correct","feedbackEnabled","feedbackType","feedback","type","parsePart","part","key","session","Object","assign","incorrect","choices","map","disabled","complete","min","filter","c","length","responseCorrect","undefined","normalize","partA","partB","question","partLabels","partLabelType","defaults","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","gridColumns","choicesLayout","verticalMode","updateSession","normalizedQuestion","shuffledValues","us","id","element","update","Promise","resolve","partASession","partALockChoiceOrder","partAChoices","partBChoices","partBSession","partBLockChoiceOrder","e","console","error","partLabel","teacherInstructions","prompt","createDefaultModel","isCorrect","getScore","config","sessionPart","maxScore","sessionPartValue","chosen","find","v","correctAndNotChosen","incorrectAndChosen","correctChoices","reduce","total","partialScoring","parseFloat","toFixed","outcome","score","scoreA","scoreB","empty","max","returnPartCorrect","answers","forEach","i","push","createCorrectResponseSession","partACorrect","partBCorrect","validatePart","minAnswerChoices","maxAnswerChoices","reversedChoices","reverse","choicesErrors","hasCorrectResponse","index","identicalAnswer","slice","some","errors","nbOfChoices","answerChoicesError","correctResponseError","validate","partAConfig","partBConfig","partAErrors","partBErrors"],"mappings":";;;;;;;;;;;;;;;;;;;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AmDmC,MAAM,IAAI,EAA7D;AAAA,MAAe6C,WAAf,SAAQjF,KAAR;AAAA,MAAmCkF,WAAnC,SAA4BjF,KAA5B;;AAEA,MAAMkF,WAAW,GAAGlB,YAAY,CAACjE,KAAD,EAAQiF,WAAR,CAAhC;AACA,MAAMG,WAAW,GAAGnB,YAAY,CAAChE,KAAD,EAAQiF,WAAR,CAAhC;AAEA,SAAO;AAAElF,IAAAA,KAAK,EAAEmF,WAAT;AAAsBlF,IAAAA,KAAK,EAAEmF;AAA7B,GAAP;AACD,CARM","sourcesContent":["import defaults from './defaults';\nimport { lockChoices, getShuffledChoices } from '@pie-lib/controller-utils';\nimport { isResponseCorrect } from './utils';\nimport get from 'lodash/get';\nimport isEmpty from 'lodash/isEmpty';\n\nconst prepareChoice = (model, env, defaultFeedback) => choice => {\n const out = {\n label: choice.label,\n value: choice.value\n };\n\n if (\n env.role === 'instructor' &&\n (env.mode === 'view' || env.mode === 'evaluate')\n ) {\n out.rationale = model.rationaleEnabled ? choice.rationale : null;\n } else {\n out.rationale = null;\n }\n\n if (env.mode === 'evaluate') {\n out.correct = !!choice.correct;\n\n if (model.feedbackEnabled) {\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback[choice.correct ? 'correct' : 'incorrect'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n }\n\n return out;\n};\n\nconst parsePart = (part, key, session, env) => {\n const defaultFeedback = Object.assign(\n { correct: 'Correct', incorrect: 'Incorrect' },\n part.defaultFeedback\n );\n\n let choices = part.choices\n ? part.choices.map(prepareChoice(part, env, defaultFeedback))\n : [];\n\n return {\n ...part,\n choices,\n disabled: env.mode !== 'gather',\n complete: {\n min: part.choices.filter(c => c.correct).length\n },\n responseCorrect:\n env.mode === 'evaluate'\n ? isResponseCorrect(part, key, session)\n : undefined\n };\n};\n\nexport const normalize = ({ partA = {}, partB = {}, ...question }) => ({\n partLabels: true,\n partLabelType: 'Letters',\n ...question,\n partA: {\n ...defaults.partA,\n rationaleEnabled: true,\n feedbackEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n gridColumns: '2',\n ...partA,\n choicesLayout: partA.choicesLayout || (partA.verticalMode === false && 'horizontal') || 'vertical'\n },\n partB: {\n ...defaults.partB,\n rationaleEnabled: true,\n promptEnabled: true,\n feedbackEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n gridColumns: '2',\n ...partB,\n choicesLayout: partB.choicesLayout || (partB.verticalMode === false && 'horizontal') || 'vertical'\n }\n});\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n const normalizedQuestion = normalize(question);\n const partA = parsePart(normalizedQuestion.partA, 'partA', session, env);\n const partB = parsePart(normalizedQuestion.partB, 'partB', session, env);\n\n const shuffledValues = {};\n\n const us = part => (id, element, update) =>\n new Promise(resolve => {\n shuffledValues[part] = update.shuffledValues;\n resolve();\n });\n\n const partASession = get(session, 'value.partA');\n const partALockChoiceOrder = lockChoices(normalizedQuestion.partA, partASession, env);\n\n const { choices: partAChoices } = partA || {};\n const { choices: partBChoices } = partB || {};\n\n if (!partALockChoiceOrder && partAChoices && partAChoices.length) {\n partA.choices = await getShuffledChoices(\n partAChoices,\n { shuffledValues: (session.shuffledValues || {}).partA },\n us('partA'),\n 'value'\n );\n }\n\n const partBSession = get(session, 'value.partB');\n const partBLockChoiceOrder = lockChoices(normalizedQuestion.partB, partBSession, env);\n\n if (!partBLockChoiceOrder && partBChoices && partBChoices.length) {\n partB.choices = await getShuffledChoices(\n partBChoices,\n { shuffledValues: (session.shuffledValues || {}).partB },\n us('partB'),\n 'value'\n );\n }\n\n if (!isEmpty(shuffledValues)) {\n if (updateSession && typeof updateSession === 'function') {\n updateSession(session.id, session.element, {\n shuffledValues\n }).catch(e => {\n console.error('update session failed', e);\n });\n }\n }\n\n if (normalizedQuestion.partLabels) {\n partA.partLabel =\n normalizedQuestion.partLabelType === 'Letters' ? 'Part A' : 'Part 1';\n partB.partLabel =\n normalizedQuestion.partLabelType === 'Letters' ? 'Part B' : 'Part 2';\n } else {\n partA.partLabel = undefined;\n partB.partLabel = undefined;\n }\n\n if (\n env.role === 'instructor' &&\n (env.mode === 'view' || env.mode === 'evaluate')\n ) {\n partA.teacherInstructions = normalizedQuestion.partA\n .teacherInstructionsEnabled\n ? normalizedQuestion.partA.teacherInstructions\n : null;\n partB.teacherInstructions = normalizedQuestion.partB\n .teacherInstructionsEnabled\n ? normalizedQuestion.partB.teacherInstructions\n : null;\n } else {\n partA.teacherInstructions = null;\n partB.teacherInstructions = null;\n }\n\n partA.prompt = normalizedQuestion.partA.promptEnabled\n ? normalizedQuestion.partA.prompt\n : null;\n partB.prompt = normalizedQuestion.partB.promptEnabled\n ? normalizedQuestion.partB.prompt\n : null;\n\n return new Promise(resolve => {\n resolve({\n disabled: env.mode !== 'gather',\n mode: env.mode,\n partA,\n partB\n });\n });\n}\n\nexport const createDefaultModel = (model = {}) =>\n new Promise(resolve => {\n resolve({\n ...defaults,\n ...model\n });\n });\n\nconst isCorrect = c => c.correct === true;\n\nconst getScore = (config, sessionPart, key) => {\n const { choices = [] } = (config && config[key]) || {};\n const maxScore = choices.length;\n const { value: sessionPartValue } = sessionPart || {};\n\n const chosen = c => !!(sessionPartValue || []).find(v => v === c.value);\n const correctAndNotChosen = c => isCorrect(c) && !chosen(c);\n const incorrectAndChosen = c => !isCorrect(c) && chosen(c);\n const correctChoices = choices.reduce((total, choice) => {\n if (correctAndNotChosen(choice) || incorrectAndChosen(choice)) {\n return total - 1;\n } else {\n return total;\n }\n }, choices.length);\n\n // determine score for a part\n if (!config.partialScoring && correctChoices < maxScore) {\n return 0;\n }\n\n return parseFloat(maxScore ? (correctChoices / maxScore).toFixed(2) : 0);\n};\n\nexport function outcome(config, session) {\n return new Promise(resolve => {\n const { value } = session || {};\n\n if (!session || !value) {\n resolve({ score: 0, scoreA: 0, scoreB: 0, empty: true });\n }\n\n if (value) {\n const { partA, partB } = value || {};\n\n const scoreA = getScore(config, partA, 'partA');\n const scoreB = getScore(config, partB, 'partB');\n\n if (!config.partialScoring) {\n // The EBSR item is worth 1 point\n // That point is awarded if and only if both parts are fully correct, otherwise no points are awarded\n resolve({ score: (scoreA === 1 && scoreB === 1) ? 1 : 0, scoreA, scoreB, max: 1 });\n } else {\n // The EBSR item is worth 2 points\n if (scoreA === 1) {\n if (scoreB === 1) {\n // If Part A and Part B are both correct, 2 points are awarded\n resolve({ score: 2, scoreA, scoreB, max: 2 });\n } else {\n // If Part A is correct and part B is incorrect, 1 point is awarded\n resolve({ score: 1, scoreA, scoreB, max: 2 });\n }\n } else {\n // For all other combinations, no points are awarded\n resolve({ score: 0, scoreA, scoreB, max: 2 });\n }\n }\n }\n });\n}\n\nconst returnPartCorrect = choices => {\n let answers = [];\n\n choices.forEach(i => {\n const { correct, value } = i;\n if (correct) {\n answers.push(value);\n }\n });\n return answers;\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise(resolve => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { partA, partB } = question;\n\n const partACorrect = returnPartCorrect(partA.choices);\n const partBCorrect = returnPartCorrect(partB.choices);\n\n resolve({\n value: {\n partA: {\n id: 'partA',\n value: partACorrect\n },\n partB: {\n id: 'partB',\n value: partBCorrect\n }\n },\n id: '1'\n });\n } else {\n resolve(null);\n }\n });\n};\n\nconst validatePart = (model = {}, config = {}) => {\n const { choices } = model;\n const { minAnswerChoices = 2, maxAnswerChoices } = config;\n const reversedChoices = [...choices || []].reverse();\n const choicesErrors = {};\n let hasCorrectResponse = false;\n\n reversedChoices.forEach((choice, index) => {\n const { correct, value, label } = choice;\n\n if (correct) {\n hasCorrectResponse = true;\n }\n\n if (label === '' || label === '<div></div>') {\n choicesErrors[value] = 'Content should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some(c => c.label === label);\n\n if (identicalAnswer) {\n choicesErrors[value] = 'Content should be unique.';\n }\n }\n });\n\n const errors = {};\n const nbOfChoices = (choices || []).length;\n\n if (nbOfChoices < minAnswerChoices) {\n errors.answerChoicesError = `There should be at least ${minAnswerChoices} choices defined.`;\n } else if (nbOfChoices > maxAnswerChoices) {\n errors.answerChoicesError = `No more than ${maxAnswerChoices} choices should be defined.`;\n }\n\n if (!hasCorrectResponse) {\n errors.correctResponseError = 'No correct response defined.';\n }\n\n if (!isEmpty(choicesErrors)) {\n errors.choicesErrors = choicesErrors;\n }\n\n return errors;\n};\n\nexport const validate = (model = {}, config = {}) => {\n const { partA, partB } = model || {};\n const { partA: partAConfig, partB: partBConfig } = config || {};\n\n const partAErrors = validatePart(partA, partAConfig);\n const partBErrors = validatePart(partB, partBConfig);\n\n return { partA: partAErrors, partB: partBErrors };\n};\n"],"file":"index.js"}
@@ -298,3 +298,58 @@ export const createCorrectResponseSession = (question, env) => {
298
298
  }
299
299
  });
300
300
  };
301
+
302
+ const validatePart = (model = {}, config = {}) => {
303
+ const { choices } = model;
304
+ const { minAnswerChoices = 2, maxAnswerChoices } = config;
305
+ const reversedChoices = [...choices || []].reverse();
306
+ const choicesErrors = {};
307
+ let hasCorrectResponse = false;
308
+
309
+ reversedChoices.forEach((choice, index) => {
310
+ const { correct, value, label } = choice;
311
+
312
+ if (correct) {
313
+ hasCorrectResponse = true;
314
+ }
315
+
316
+ if (label === '' || label === '<div></div>') {
317
+ choicesErrors[value] = 'Content should not be empty.';
318
+ } else {
319
+ const identicalAnswer = reversedChoices.slice(index + 1).some(c => c.label === label);
320
+
321
+ if (identicalAnswer) {
322
+ choicesErrors[value] = 'Content should be unique.';
323
+ }
324
+ }
325
+ });
326
+
327
+ const errors = {};
328
+ const nbOfChoices = (choices || []).length;
329
+
330
+ if (nbOfChoices < minAnswerChoices) {
331
+ errors.answerChoicesError = `There should be at least ${minAnswerChoices} choices defined.`;
332
+ } else if (nbOfChoices > maxAnswerChoices) {
333
+ errors.answerChoicesError = `No more than ${maxAnswerChoices} choices should be defined.`;
334
+ }
335
+
336
+ if (!hasCorrectResponse) {
337
+ errors.correctResponseError = 'No correct response defined.';
338
+ }
339
+
340
+ if (!isEmpty(choicesErrors)) {
341
+ errors.choicesErrors = choicesErrors;
342
+ }
343
+
344
+ return errors;
345
+ };
346
+
347
+ export const validate = (model = {}, config = {}) => {
348
+ const { partA, partB } = model || {};
349
+ const { partA: partAConfig, partB: partBConfig } = config || {};
350
+
351
+ const partAErrors = validatePart(partA, partAConfig);
352
+ const partBErrors = validatePart(partB, partBConfig);
353
+
354
+ return { partA: partAErrors, partB: partBErrors };
355
+ };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@pie-element/ebsr",
3
- "version": "6.6.3-next.884+78a777cb1",
3
+ "version": "6.6.3-next.968+6e3bc7158",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "dependencies": {
10
- "@pie-element/multiple-choice": "^5.9.3-next.884+78a777cb1",
10
+ "@pie-element/multiple-choice": "^6.3.2",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
12
  "classnames": "^2.2.5",
13
13
  "debug": "^4.1.1",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "author": "pie framework developers",
17
17
  "license": "ISC",
18
- "gitHead": "78a777cb177a8c54a4b243aac4cba7f61fed8f87",
18
+ "gitHead": "6e3bc71587825ca01c15d6edb7a478988f8be439",
19
19
  "scripts": {
20
20
  "postpublish": "../../scripts/postpublish"
21
21
  },