@pie-element/ebsr 6.6.3-next.1075 → 6.6.3-next.1082

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 (442) hide show
  1. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +1677 -0
  2. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +1695 -0
  3. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +5 -0
  4. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +12 -0
  5. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +44 -0
  6. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +1 -0
  7. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +86 -0
  8. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +1 -0
  9. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +164 -0
  10. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +1 -0
  11. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +398 -0
  12. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +1 -0
  13. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +54 -0
  14. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +1 -0
  15. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +185 -0
  16. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +1 -0
  17. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +75 -0
  18. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +1 -0
  19. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +178 -0
  20. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +1 -0
  21. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +46 -0
  22. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +1 -0
  23. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +145 -0
  24. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +1 -0
  25. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +216 -0
  26. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +1 -0
  27. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +139 -0
  28. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +1 -0
  29. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +131 -0
  30. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +1 -0
  31. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +179 -0
  32. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +1 -0
  33. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +101 -0
  34. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +1 -0
  35. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +24 -0
  36. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +1 -0
  37. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +105 -0
  38. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +1 -0
  39. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +87 -0
  40. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +1 -0
  41. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +79 -0
  42. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +1 -0
  43. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +364 -0
  44. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +1 -0
  45. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +265 -0
  46. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +1 -0
  47. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +41 -0
  48. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +1 -0
  49. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +77 -0
  50. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +1 -0
  51. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +130 -0
  52. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +1 -0
  53. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +412 -0
  54. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +1 -0
  55. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +43 -0
  56. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +1 -0
  57. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +56 -0
  58. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +1 -0
  59. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +106 -0
  60. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +1 -0
  61. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +198 -0
  62. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +1 -0
  63. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +180 -0
  64. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +1 -0
  65. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +84 -0
  66. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +1 -0
  67. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +30 -0
  68. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +43 -0
  69. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +63 -0
  70. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +103 -0
  71. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +319 -0
  72. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +30 -0
  73. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +116 -0
  74. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +54 -0
  75. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +98 -0
  76. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +23 -0
  77. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +88 -0
  78. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +58 -0
  79. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +72 -0
  80. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +96 -0
  81. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +122 -0
  82. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +64 -0
  83. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +4 -0
  84. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +60 -0
  85. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +31 -0
  86. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +64 -0
  87. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +276 -0
  88. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +196 -0
  89. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +18 -0
  90. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +52 -0
  91. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +75 -0
  92. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +297 -0
  93. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +20 -0
  94. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +31 -0
  95. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +51 -0
  96. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +121 -0
  97. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +94 -0
  98. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +36 -0
  99. package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +547 -0
  100. package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +524 -0
  101. package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +5 -0
  102. package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +64 -0
  103. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +86 -0
  104. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +1 -0
  105. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +155 -0
  106. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +1 -0
  107. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +65 -0
  108. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +1 -0
  109. package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +36 -0
  110. package/configure/node_modules/@pie-lib/correct-answer-toggle/preview.png +0 -0
  111. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +65 -0
  112. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +75 -0
  113. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +60 -0
  114. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +3327 -0
  115. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +1676 -0
  116. package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +5 -0
  117. package/configure/node_modules/@pie-lib/editable-html/README.md +45 -0
  118. package/configure/node_modules/@pie-lib/editable-html/deploy.sh +16 -0
  119. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +837 -0
  120. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +1 -0
  121. package/configure/node_modules/@pie-lib/editable-html/lib/index.js +224 -0
  122. package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +1 -0
  123. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +16 -0
  124. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +1 -0
  125. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js +70 -0
  126. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js.map +1 -0
  127. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js +261 -0
  128. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js.map +1 -0
  129. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js +362 -0
  130. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js.map +1 -0
  131. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +393 -0
  132. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +1 -0
  133. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +78 -0
  134. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +1 -0
  135. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +221 -0
  136. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +1 -0
  137. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +135 -0
  138. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +1 -0
  139. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +141 -0
  140. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +1 -0
  141. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +204 -0
  142. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +1 -0
  143. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +347 -0
  144. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +1 -0
  145. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +339 -0
  146. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +1 -0
  147. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +434 -0
  148. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +1 -0
  149. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +99 -0
  150. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +1 -0
  151. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +93 -0
  152. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +1 -0
  153. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +251 -0
  154. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +1 -0
  155. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +97 -0
  156. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +1 -0
  157. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +54 -0
  158. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +1 -0
  159. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +93 -0
  160. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +1 -0
  161. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +288 -0
  162. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +1 -0
  163. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +70 -0
  164. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +1 -0
  165. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +110 -0
  166. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +1 -0
  167. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +69 -0
  168. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +1 -0
  169. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +497 -0
  170. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +1 -0
  171. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +158 -0
  172. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +1 -0
  173. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +132 -0
  174. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +1 -0
  175. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +50 -0
  176. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +1 -0
  177. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +263 -0
  178. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +1 -0
  179. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +32 -0
  180. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +1 -0
  181. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +161 -0
  182. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +1 -0
  183. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +346 -0
  184. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +1 -0
  185. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +62 -0
  186. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +1 -0
  187. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +428 -0
  188. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +1 -0
  189. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +9 -0
  190. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +1 -0
  191. package/configure/node_modules/@pie-lib/editable-html/package.json +51 -0
  192. package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +59 -0
  193. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +24 -0
  194. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +83 -0
  195. package/configure/node_modules/@pie-lib/editable-html/playground/index.html +27 -0
  196. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +25 -0
  197. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +151 -0
  198. package/configure/node_modules/@pie-lib/editable-html/playground/package.json +15 -0
  199. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +26 -0
  200. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +30 -0
  201. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +29 -0
  202. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +40 -0
  203. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +23 -0
  204. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +96 -0
  205. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +29 -0
  206. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +40 -0
  207. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +24 -0
  208. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +12 -0
  209. package/configure/node_modules/@pie-lib/editable-html/playground/static.json +3 -0
  210. package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +67 -0
  211. package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +42 -0
  212. package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +724 -0
  213. package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +145 -0
  214. package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +8 -0
  215. package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +27 -0
  216. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/custom-popover.js +45 -0
  217. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/index.jsx +237 -0
  218. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/utils.js +444 -0
  219. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +318 -0
  220. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +32 -0
  221. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +182 -0
  222. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +93 -0
  223. package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +115 -0
  224. package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +175 -0
  225. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +283 -0
  226. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +284 -0
  227. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +372 -0
  228. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +53 -0
  229. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +43 -0
  230. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +187 -0
  231. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +78 -0
  232. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +45 -0
  233. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +68 -0
  234. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +259 -0
  235. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +63 -0
  236. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +77 -0
  237. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +59 -0
  238. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +437 -0
  239. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +104 -0
  240. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +111 -0
  241. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +36 -0
  242. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +225 -0
  243. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +21 -0
  244. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +97 -0
  245. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +323 -0
  246. package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +32 -0
  247. package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +385 -0
  248. package/configure/node_modules/@pie-lib/editable-html/src/theme.js +1 -0
  249. package/configure/node_modules/@pie-lib/editable-html/static.json +1 -0
  250. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +1547 -0
  251. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +765 -0
  252. package/configure/node_modules/@pie-lib/math-input/LICENSE.md +5 -0
  253. package/configure/node_modules/@pie-lib/math-input/README.md +27 -0
  254. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +129 -0
  255. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +1 -0
  256. package/configure/node_modules/@pie-lib/math-input/lib/index.js +80 -0
  257. package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +1 -0
  258. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +440 -0
  259. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +1 -0
  260. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +34 -0
  261. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +1 -0
  262. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +41 -0
  263. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +1 -0
  264. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +17 -0
  265. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +1 -0
  266. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +46 -0
  267. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +1 -0
  268. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +43 -0
  269. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +1 -0
  270. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +53 -0
  271. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +1 -0
  272. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +16 -0
  273. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +1 -0
  274. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +35 -0
  275. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +1 -0
  276. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +31 -0
  277. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +1 -0
  278. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +165 -0
  279. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +1 -0
  280. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +295 -0
  281. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +1 -0
  282. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +54 -0
  283. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +1 -0
  284. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +32 -0
  285. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +1 -0
  286. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +23 -0
  287. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +1 -0
  288. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +23 -0
  289. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +1 -0
  290. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +69 -0
  291. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +1 -0
  292. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +23 -0
  293. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +1 -0
  294. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +17 -0
  295. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +1 -0
  296. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +45 -0
  297. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +1 -0
  298. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +23 -0
  299. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +1 -0
  300. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +53 -0
  301. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +1 -0
  302. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +130 -0
  303. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +1 -0
  304. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +29 -0
  305. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +1 -0
  306. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +206 -0
  307. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +1 -0
  308. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +23 -0
  309. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +1 -0
  310. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +24 -0
  311. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +1 -0
  312. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +257 -0
  313. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +1 -0
  314. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +224 -0
  315. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +1 -0
  316. package/configure/node_modules/@pie-lib/math-input/package.json +26 -0
  317. package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +56 -0
  318. package/configure/node_modules/@pie-lib/math-input/src/index.jsx +27 -0
  319. package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +367 -0
  320. package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +17 -0
  321. package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +32 -0
  322. package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +5 -0
  323. package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +27 -0
  324. package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +35 -0
  325. package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +40 -0
  326. package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +3 -0
  327. package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +27 -0
  328. package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +23 -0
  329. package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +140 -0
  330. package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +379 -0
  331. package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +21 -0
  332. package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +22 -0
  333. package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +15 -0
  334. package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +15 -0
  335. package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +60 -0
  336. package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +8 -0
  337. package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +9 -0
  338. package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +36 -0
  339. package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +15 -0
  340. package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +15 -0
  341. package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +71 -0
  342. package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +19 -0
  343. package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +128 -0
  344. package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +11 -0
  345. package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +4 -0
  346. package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +163 -0
  347. package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +145 -0
  348. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
  349. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +457 -0
  350. package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
  351. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
  352. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
  353. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
  354. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
  355. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
  356. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
  357. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
  358. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
  359. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
  360. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
  361. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +281 -0
  362. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
  363. package/configure/node_modules/@pie-lib/math-rendering/package.json +19 -0
  364. package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
  365. package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
  366. package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
  367. package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
  368. package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
  369. package/configure/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
  370. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
  371. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
  372. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
  373. package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
  374. package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +235 -0
  375. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +862 -0
  376. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +639 -0
  377. package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +5 -0
  378. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +53 -0
  379. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +1 -0
  380. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +483 -0
  381. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +1 -0
  382. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +280 -0
  383. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +1 -0
  384. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +173 -0
  385. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +1 -0
  386. package/configure/node_modules/@pie-lib/math-toolbar/package.json +37 -0
  387. package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +39 -0
  388. package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +388 -0
  389. package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +202 -0
  390. package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +107 -0
  391. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
  392. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +626 -0
  393. package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
  394. package/configure/node_modules/@pie-lib/render-ui/README.md +33 -0
  395. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
  396. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
  397. package/configure/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
  398. package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
  399. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
  400. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
  401. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
  402. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
  403. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
  404. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
  405. package/configure/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
  406. package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
  407. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
  408. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
  409. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
  410. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
  411. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
  412. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
  413. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
  414. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
  415. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
  416. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
  417. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
  418. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
  419. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
  420. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
  421. package/configure/node_modules/@pie-lib/render-ui/package.json +30 -0
  422. package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
  423. package/configure/node_modules/@pie-lib/render-ui/src/color.js +48 -0
  424. package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
  425. package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
  426. package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
  427. package/configure/node_modules/@pie-lib/render-ui/src/index.js +27 -0
  428. package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
  429. package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
  430. package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
  431. package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
  432. package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
  433. package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
  434. package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
  435. package/configure/package.json +1 -1
  436. package/lib/index.js +2 -2
  437. package/lib/index.js.map +1 -1
  438. package/lib/print.js +2 -2
  439. package/lib/print.js.map +1 -1
  440. package/package.json +2 -2
  441. package/src/index.js +2 -2
  442. package/src/print.js +2 -2
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { renderMath } from '@pie-lib/math-rendering';
3
+ import PropTypes from 'prop-types';
4
+
5
+ export default class HtmlAndMath extends React.Component {
6
+ static propTypes = {
7
+ tag: PropTypes.string,
8
+ className: PropTypes.string,
9
+ html: PropTypes.string
10
+ };
11
+
12
+ static defaultProps = {
13
+ tag: 'div',
14
+ html: ''
15
+ };
16
+
17
+ componentDidMount() {
18
+ if (this.node) {
19
+ renderMath(this.node);
20
+ }
21
+ }
22
+
23
+ componentDidUpdate() {
24
+ if (this.node) {
25
+ renderMath(this.node);
26
+ }
27
+ }
28
+
29
+ render() {
30
+ const { tag, className, html } = this.props;
31
+ const Tag = tag || 'div';
32
+ return (
33
+ <Tag
34
+ ref={r => (this.node = r)}
35
+ className={className}
36
+ dangerouslySetInnerHTML={{ __html: html }}
37
+ />
38
+ );
39
+ }
40
+ }
@@ -0,0 +1,27 @@
1
+ import * as indicators from './response-indicators';
2
+ import Feedback from './feedback';
3
+ import Collapsible from './collapsible';
4
+ import withUndoReset from './withUndoReset';
5
+ import PreviewLayout from './preview-layout';
6
+ import HtmlAndMath from './html-and-math';
7
+ import InputContainer from './input-container';
8
+ import PreviewPrompt from './preview-prompt';
9
+ import Readable from './readable';
10
+ import Purpose from './purpose';
11
+ import * as color from './color';
12
+ import { hasText } from './has-text';
13
+
14
+ export {
15
+ HtmlAndMath,
16
+ indicators,
17
+ withUndoReset,
18
+ Feedback,
19
+ PreviewLayout,
20
+ Collapsible,
21
+ InputContainer,
22
+ PreviewPrompt,
23
+ color,
24
+ Readable,
25
+ Purpose,
26
+ hasText
27
+ };
@@ -0,0 +1,41 @@
1
+ import InputLabel from '@material-ui/core/InputLabel';
2
+ import PropTypes from 'prop-types';
3
+ import React from 'react';
4
+ import classNames from 'classnames';
5
+ import { withStyles } from '@material-ui/core/styles';
6
+ import FormControl from '@material-ui/core/FormControl';
7
+
8
+ const RawInputContainer = props => {
9
+ const { label, className, children, classes } = props;
10
+ const names = classNames(classes.formControl, className);
11
+
12
+ return (
13
+ <FormControl className={names}>
14
+ <InputLabel className={classes.label} shrink={true}>
15
+ {label}
16
+ </InputLabel>
17
+ {children}
18
+ </FormControl>
19
+ );
20
+ };
21
+
22
+ RawInputContainer.propTypes = {
23
+ label: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
24
+ className: PropTypes.string,
25
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
26
+ classes: PropTypes.object.isRequired
27
+ };
28
+
29
+ export default withStyles(theme => ({
30
+ formControl: {
31
+ marginLeft: 0,
32
+ marginRight: theme.spacing.unit,
33
+ paddingBottom: theme.spacing.unit,
34
+ flex: '1 0 auto',
35
+ minWidth: theme.spacing.unit * 4
36
+ },
37
+ label: {
38
+ fontSize: 'inherit',
39
+ whiteSpace: 'nowrap'
40
+ }
41
+ }))(RawInputContainer);
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import { withStyles, createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
3
+ import PropTypes from 'prop-types';
4
+
5
+ class PreviewLayout extends React.Component {
6
+ static propTypes = {
7
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
8
+ classes: PropTypes.object
9
+ };
10
+
11
+ render() {
12
+ const { children, classes } = this.props;
13
+
14
+ return <div className={classes.container}>{children}</div>;
15
+ }
16
+ }
17
+
18
+ const styles = () => ({
19
+ container: {
20
+ display: 'flex',
21
+ flexDirection: 'column',
22
+ position: 'relative'
23
+ }
24
+ });
25
+
26
+ const theme = createMuiTheme({
27
+ typography: {
28
+ useNextVariants: true
29
+ },
30
+ palette: {
31
+ action: {
32
+ disabled: 'rgba(0, 0, 0, 0.54);'
33
+ }
34
+ },
35
+ overrides: {
36
+ MuiRadio: {
37
+ root: {
38
+ '&$checked': {
39
+ color: '#3f51b5 !important'
40
+ }
41
+ }
42
+ },
43
+ MuiCheckbox: {
44
+ root: {
45
+ '&$checked': {
46
+ color: '#3f51b5 !important'
47
+ }
48
+ }
49
+ },
50
+ MuiTabs: {
51
+ root: {
52
+ borderBottom: '1px solid #eee'
53
+ }
54
+ },
55
+ MuiSwitch: {
56
+ root: {
57
+ '&$checked': {
58
+ color: '#3f51b5 !important',
59
+ '& + $bar': {
60
+ backgroundColor: '#3f51b5 !important',
61
+ opacity: 0.5
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ });
68
+
69
+ const Styled = withStyles(styles)(PreviewLayout);
70
+
71
+ const RootElem = props => (
72
+ <MuiThemeProvider theme={theme}>
73
+ <Styled {...props} />
74
+ </MuiThemeProvider>
75
+ );
76
+
77
+ export default RootElem;
@@ -0,0 +1,90 @@
1
+ import React, { Component } from 'react';
2
+ import { withStyles } from '@material-ui/core/styles';
3
+ import PropTypes from 'prop-types';
4
+ import * as color from './color';
5
+
6
+ //Used these below to replace \\embed{newLine} with \\newline from prompt which will get parsed in MathJax
7
+ const NEWLINE_BLOCK_REGEX = /\\embed\{newLine\}\[\]/g;
8
+ const NEWLINE_LATEX = '\\newline ';
9
+
10
+ export class PreviewPrompt extends Component {
11
+ static propTypes = {
12
+ classes: PropTypes.object,
13
+ prompt: PropTypes.string,
14
+ tagName: PropTypes.string,
15
+ className: PropTypes.string,
16
+ onClick: PropTypes.func,
17
+ defaultClassName: PropTypes.string
18
+ };
19
+
20
+ static defaultProps = {
21
+ onClick: () => {}
22
+ };
23
+
24
+ parsedText = text => {
25
+ // fix imported audio content for Safari PD-1419
26
+ const div = document.createElement('div');
27
+ div.innerHTML = text;
28
+
29
+ const audio = div.querySelector('audio');
30
+ if (audio) {
31
+ const source = document.createElement('source');
32
+
33
+ source.setAttribute('type', 'audio/mp3');
34
+ source.setAttribute('src', audio.getAttribute('src'));
35
+
36
+ audio.removeAttribute('src');
37
+ audio.appendChild(source);
38
+ }
39
+
40
+ return div.innerHTML;
41
+ };
42
+
43
+ render() {
44
+ const { prompt, classes, tagName, className, onClick, defaultClassName } = this.props;
45
+ const CustomTag = tagName || 'div';
46
+ const customClasses = `${classes.promptTable} ${classes[className] || ''} ${defaultClassName ||
47
+ ''}`;
48
+
49
+ return (
50
+ <CustomTag
51
+ onClick={onClick}
52
+ className={customClasses}
53
+ dangerouslySetInnerHTML={{
54
+ __html: this.parsedText(prompt || '').replace(NEWLINE_BLOCK_REGEX, NEWLINE_LATEX)
55
+ }}
56
+ />
57
+ );
58
+ }
59
+ }
60
+
61
+ const styles = theme => ({
62
+ prompt: {
63
+ verticalAlign: 'middle',
64
+ color: color.text()
65
+ },
66
+ rationale: {
67
+ paddingLeft: theme.spacing.unit * 16
68
+ },
69
+ label: {
70
+ color: `${color.text()} !important`, //'var(--choice-input-color, black)',
71
+ display: 'inline-block',
72
+ verticalAlign: 'middle',
73
+ cursor: 'pointer'
74
+ },
75
+ promptTable: {
76
+ '&:not(.MathJax) > table': {
77
+ borderCollapse: 'collapse'
78
+ },
79
+ '&:not(.MathJax) > table tr': {
80
+ '&:nth-child(2n)': {
81
+ backgroundColor: '#f6f8fa'
82
+ }
83
+ },
84
+ '&:not(.MathJax) > table td, &:not(.MathJax) > table th': {
85
+ padding: '.6em 1em',
86
+ textAlign: 'center'
87
+ }
88
+ }
89
+ });
90
+ export default withStyles(styles)(PreviewPrompt);
@@ -0,0 +1,19 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+
4
+ const Purpose = props => {
5
+ return (
6
+ <>
7
+ {React.Children.map(props.children, child =>
8
+ React.cloneElement(child, { 'data-pie-purpose': props.purpose })
9
+ )}
10
+ </>
11
+ );
12
+ };
13
+
14
+ Purpose.propTypes = {
15
+ children: PropTypes.node,
16
+ purpose: PropTypes.string
17
+ };
18
+
19
+ export default Purpose;
@@ -0,0 +1,19 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+
4
+ const Readable = props => {
5
+ return (
6
+ <>
7
+ {React.Children.map(props.children, child =>
8
+ React.cloneElement(child, { 'data-pie-readable': props.false === undefined })
9
+ )}
10
+ </>
11
+ );
12
+ };
13
+
14
+ Readable.propTypes = {
15
+ children: PropTypes.node,
16
+ false: PropTypes.bool
17
+ };
18
+
19
+ export default Readable;
@@ -0,0 +1,89 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import * as icons from '@pie-lib/icons';
4
+ import Popover from '@material-ui/core/Popover';
5
+ import { withStyles } from '@material-ui/core/styles';
6
+ import Feedback from './feedback';
7
+ import debug from 'debug';
8
+
9
+ const log = debug('pie-libs:render-ui:response-indicators');
10
+
11
+ const styles = () => ({
12
+ responseIndicator: {
13
+ cursor: 'pointer'
14
+ },
15
+ paper: {
16
+ padding: '0',
17
+ borderRadius: '4px'
18
+ },
19
+ popover: {
20
+ cursor: 'pointer'
21
+ },
22
+ popperClose: {
23
+ cursor: 'pointer'
24
+ }
25
+ });
26
+
27
+ const BuildIndicator = (Icon, correctness) => {
28
+ class RawIndicator extends React.Component {
29
+ constructor(props) {
30
+ super(props);
31
+ this.state = {};
32
+ }
33
+
34
+ handlePopoverOpen = event => {
35
+ log('[handlePopoverOpen]', event.target);
36
+ this.setState({ anchorEl: event.target });
37
+ };
38
+
39
+ handlePopoverClose = () => {
40
+ this.setState({ anchorEl: null });
41
+ };
42
+
43
+ render() {
44
+ const { feedback, classes } = this.props;
45
+ const { anchorEl } = this.state;
46
+ return (
47
+ <div className={feedback && classes.responseIndicator}>
48
+ <span ref={r => (this.icon = r)} onClick={this.handlePopoverOpen}>
49
+ <Icon />
50
+ </span>
51
+
52
+ {feedback && (
53
+ <Popover
54
+ className={classes.popover}
55
+ classes={{
56
+ paper: classes.paper
57
+ }}
58
+ open={!!anchorEl}
59
+ anchorEl={anchorEl}
60
+ anchorOrigin={{
61
+ vertical: 'bottom',
62
+ horizontal: 'left'
63
+ }}
64
+ transformOrigin={{
65
+ vertical: 'top',
66
+ horizontal: 'left'
67
+ }}
68
+ onClose={this.handlePopoverClose}
69
+ >
70
+ <Feedback feedback={feedback} correctness={correctness} />
71
+ </Popover>
72
+ )}
73
+ </div>
74
+ );
75
+ }
76
+ }
77
+
78
+ RawIndicator.propTypes = {
79
+ feedback: PropTypes.string,
80
+ classes: PropTypes.object.isRequired
81
+ };
82
+
83
+ return withStyles(styles)(RawIndicator);
84
+ };
85
+
86
+ export const Correct = BuildIndicator(icons.Correct, 'correct');
87
+ export const Incorrect = BuildIndicator(icons.Incorrect, 'incorrect');
88
+ export const PartiallyCorrect = BuildIndicator(icons.PartiallyCorrect, 'partially-correct');
89
+ export const NothingSubmitted = BuildIndicator(icons.NothingSubmitted, 'nothing-submitted');
@@ -0,0 +1,118 @@
1
+ import * as React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Button from '@material-ui/core/Button';
4
+ import { withStyles } from '@material-ui/core/styles';
5
+ import Restore from '@material-ui/icons/Restore';
6
+ import Undo from '@material-ui/icons/Undo';
7
+
8
+ const styles = theme => ({
9
+ wrapper: {
10
+ display: 'flex',
11
+ flexDirection: 'column'
12
+ },
13
+ resetUndoContainer: {
14
+ display: 'flex',
15
+ alignItems: 'center',
16
+ justifyContent: 'center'
17
+ },
18
+ icon: {
19
+ width: '24px',
20
+ height: '24px',
21
+ color: 'gray',
22
+ marginRight: theme.spacing.unit
23
+ },
24
+ buttonContainer: {
25
+ display: 'flex',
26
+ alignItems: 'center',
27
+ marginLeft: theme.spacing.unit * 3,
28
+ marginRight: theme.spacing.unit * 3
29
+ }
30
+ });
31
+
32
+ /**
33
+ * HOC that adds undo and reset functionality for session values
34
+ */
35
+ const withUndoReset = WrappedComponent => {
36
+ class WithUndoReset extends React.Component {
37
+ static propTypes = {
38
+ classes: PropTypes.object,
39
+ session: PropTypes.object,
40
+ onSessionChange: PropTypes.func
41
+ };
42
+
43
+ constructor(props) {
44
+ super(props);
45
+
46
+ this.state = {
47
+ sessionInitialValues: JSON.parse(JSON.stringify(props.session)),
48
+ session: props.session,
49
+ changes: []
50
+ };
51
+ }
52
+
53
+ onSessionChange = session => {
54
+ this.setState(
55
+ state => ({ session, changes: [...state.changes, session] }),
56
+ () => this.props.onSessionChange(session)
57
+ );
58
+ };
59
+
60
+ onUndo = () => {
61
+ this.setState(
62
+ state => {
63
+ const newChanges = [...state.changes];
64
+
65
+ newChanges.pop();
66
+
67
+ return {
68
+ changes: newChanges,
69
+ session: newChanges.length
70
+ ? newChanges[newChanges.length - 1]
71
+ : state.sessionInitialValues
72
+ };
73
+ },
74
+ () => this.props.onSessionChange(this.state.session)
75
+ );
76
+ };
77
+
78
+ onReset = () => {
79
+ this.setState(
80
+ state => ({ session: state.sessionInitialValues, changes: [] }),
81
+ () => this.props.onSessionChange(this.state.sessionInitialValues)
82
+ );
83
+ };
84
+
85
+ render() {
86
+ const { classes, ...rest } = this.props;
87
+ const { changes, session } = this.state;
88
+
89
+ return (
90
+ <div className={classes.wrapper}>
91
+ <div className={classes.resetUndoContainer}>
92
+ <Button
93
+ className={classes.buttonContainer}
94
+ color="primary"
95
+ disabled={changes.length === 0}
96
+ onClick={this.onUndo}
97
+ >
98
+ <Undo className={classes.icon} /> Undo
99
+ </Button>
100
+ <Button
101
+ className={classes.buttonContainer}
102
+ color="primary"
103
+ disabled={changes.length === 0}
104
+ onClick={this.onReset}
105
+ >
106
+ <Restore className={classes.icon} /> Start Over
107
+ </Button>
108
+ </div>
109
+ <WrappedComponent {...rest} session={session} onSessionChange={this.onSessionChange} />
110
+ </div>
111
+ );
112
+ }
113
+ }
114
+
115
+ return withStyles(styles)(WithUndoReset);
116
+ };
117
+
118
+ export default withUndoReset;
@@ -10,7 +10,7 @@
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-element/multiple-choice": "^7.0.0",
12
12
  "@pie-framework/pie-configure-events": "^1.2.0",
13
- "@pie-lib/config-ui": "^11.0.3",
13
+ "@pie-lib/config-ui": "^11.0.4",
14
14
  "lodash": "^4.17.15",
15
15
  "prop-types": "^15.6.2",
16
16
  "react": "^16.8.1",
package/lib/index.js CHANGED
@@ -141,7 +141,7 @@ var Ebsr = /*#__PURE__*/function (_HTMLElement) {
141
141
  }, {
142
142
  key: "setPartModel",
143
143
  value: function setPartModel(part, key) {
144
- if (this._model && this._model[key]) {
144
+ if (this._model && this._model[key] && part) {
145
145
  var mode = this._model.mode;
146
146
  part.model = _objectSpread(_objectSpread({}, this._model[key]), {}, {
147
147
  mode: mode,
@@ -152,7 +152,7 @@ var Ebsr = /*#__PURE__*/function (_HTMLElement) {
152
152
  }, {
153
153
  key: "setPartSession",
154
154
  value: function setPartSession(part, key) {
155
- if (this._session && this._model) {
155
+ if (this._session && this._model && part) {
156
156
  var value = this._session.value;
157
157
  part.session = value && value[key] ? value[key] : {
158
158
  id: key
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["SESSION_CHANGED","SessionChangedEvent","TYPE","MC_TAG_NAME","log","EbsrMC","MultipleChoice","defineMultipleChoice","customElements","get","define","isNonEmptyArray","a","Array","isArray","length","isSessionComplete","session","b","Ebsr","e","target","preventDefault","stopImmediatePropagation","id","getAttribute","key","toUpperCase","update","_model","dispatchSessionChanged","srcElement","_session","m","whenDefined","then","setPartModel","partA","partB","s","setPartSession","part","mode","model","keyMode","choicePrefix","value","partSession","complete","dispatchEvent","tagName","toLowerCase","querySelector","_render","addEventListener","onSessionUpdated","removeEventListener","innerHTML","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;AACA,IAAMA,eAAe,GAAGC,qCAAoBC,IAA5C;AACA,IAAMC,WAAW,GAAG,sBAApB;AACA,IAAMC,GAAG,GAAG,uBAAM,mBAAN,CAAZ;;IAEMC,M;;;;;;;;;;;EAAeC,0B;;AAErB,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,GAAM;AACjC,MAAI,CAACC,cAAc,CAACC,GAAf,CAAm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K,CAACpB,GAAD,CAA3B,GAAmC;AAAEF,UAAAA,EAAE,EAAEE;AAAN,SAAlD;AACD;AACF;;;WAED,gCAAuBqB,WAAvB,EAAoCrB,GAApC,EAAyC;AACvC,WAAKM,QAAL,CAAcc,KAAd,mCACK,KAAKd,QAAL,CAAcc,KADnB,4CAEGpB,GAFH,EAESqB,WAFT;AAKA3C,MAAAA,GAAG,CAAC,8BAAD,EAAiC,KAAK4B,QAAtC,CAAH;AACA,UAAMgB,QAAQ,GAAGhC,iBAAiB,CAAC,KAAKgB,QAAN,CAAlC;AACA,WAAKiB,aAAL,CACE,IAAIhD,oCAAJ,CAAwB,KAAKiD,OAAL,CAAaC,WAAb,EAAxB,EAAoDH,QAApD,CADF;AAGD;;;SAED,eAAY;AACV,aAAO,KAAKI,aAAL,WAAsBjD,WAAtB,QAAP;AACD;;;SAED,eAAY;AACV,aAAO,KAAKiD,aAAL,WAAsBjD,WAAtB,QAAP;AACD;;;WAED,6BAAoB;AAClB,WAAKkD,OAAL;;AACA,WAAKC,gBAAL,CAAsBtD,eAAtB,EAAuC,KAAKuD,gBAA5C;AACD;;;WAED,gCAAuB;AACrB,WAAKC,mBAAL,CAAyBxD,eAAzB,EAA0C,KAAKuD,gBAA/C;AACD;;;WAED,mBAAU;AACR,WAAKE,SAAL,qCAEOtD,WAFP,yBAE+BA,WAF/B,yBAGOA,WAHP,yBAG+BA,WAH/B;AAMD;;;kDA1G+BuD,W","sourcesContent":["import { SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport MultipleChoice from '@pie-element/multiple-choice';\nimport get from 'lodash/get';\nimport debug from 'debug';\nconst SESSION_CHANGED = SessionChangedEvent.TYPE;\nconst MC_TAG_NAME = 'ebsr-multiple-choice';\nconst log = debug('pie-elements:ebsr');\n\nclass EbsrMC extends MultipleChoice {}\n\nconst defineMultipleChoice = () => {\n if (!customElements.get(MC_TAG_NAME)) {\n customElements.define(MC_TAG_NAME, EbsrMC);\n }\n};\n\ndefineMultipleChoice();\n\nconst isNonEmptyArray = (a) => Array.isArray(a) && a.length > 0;\n\nexport const isSessionComplete = (session) => {\n const a = get(session, 'value.partA.value');\n const b = get(session, 'value.partB.value');\n\n return isNonEmptyArray(a) && isNonEmptyArray(b);\n};\n\nexport default class Ebsr extends HTMLElement {\n constructor() {\n super();\n this._model = {};\n this._session = {};\n }\n\n onSessionUpdated = (e) => {\n if (e.target === this) {\n return;\n }\n\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const id = e.target.getAttribute('id');\n\n if (id) {\n const key = `part${id.toUpperCase()}`;\n\n if (e.update) {\n this._model[key] = e.update;\n }\n //TODO: accessing a private property here. The session event should contain the update in future to prevent this.\n this.dispatchSessionChanged(e.srcElement._session, key);\n }\n };\n\n set model(m) {\n this._model = m;\n\n customElements.whenDefined(MC_TAG_NAME).then(() => {\n this.setPartModel(this.partA, 'partA');\n this.setPartModel(this.partB, 'partB');\n });\n }\n\n set session(s) {\n this._session = s;\n\n customElements.whenDefined(MC_TAG_NAME).then(() => {\n this.setPartSession(this.partA, 'partA');\n this.setPartSession(this.partB, 'partB');\n });\n }\n\n get session() {\n return this._session;\n }\n\n setPartModel(part, key) {\n if (this._model && this._model[key]) {\n const { mode } = this._model;\n\n part.model = {\n ...this._model[key],\n mode,\n keyMode: this._model[key].choicePrefix,\n };\n }\n }\n\n setPartSession(part, key) {\n if (this._session && this._model) {\n const { value } = this._session;\n part.session = value && value[key] ? value[key] : { id: key };\n }\n }\n\n dispatchSessionChanged(partSession, key) {\n this._session.value = {\n ...this._session.value,\n [key]: partSession,\n };\n\n log('[onSessionChanged] session: ', this._session);\n const complete = isSessionComplete(this._session);\n this.dispatchEvent(\n new SessionChangedEvent(this.tagName.toLowerCase(), complete)\n );\n }\n\n get partA() {\n return this.querySelector(`${MC_TAG_NAME}#a`);\n }\n\n get partB() {\n return this.querySelector(`${MC_TAG_NAME}#b`);\n }\n\n connectedCallback() {\n this._render();\n this.addEventListener(SESSION_CHANGED, this.onSessionUpdated);\n }\n\n disconnectedCallback() {\n this.removeEventListener(SESSION_CHANGED, this.onSessionUpdated);\n }\n\n _render() {\n this.innerHTML = `\n <div>\n <${MC_TAG_NAME} id=\"a\"></${MC_TAG_NAME}>\n <${MC_TAG_NAME} id=\"b\"></${MC_TAG_NAME}>\n </div>\n `;\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["SESSION_CHANGED","SessionChangedEvent","TYPE","MC_TAG_NAME","log","EbsrMC","MultipleChoice","defineMultipleChoice","customElements","get","define","isNonEmptyArray","a","Array","isArray","length","isSessionComplete","session","b","Ebsr","e","target","preventDefault","stopImmediatePropagation","id","getAttribute","key","toUpperCase","update","_model","dispatchSessionChanged","srcElement","_session","m","whenDefined","then","setPartModel","partA","partB","s","setPartSession","part","mode","model","keyMode","choicePrefix","value","partSession","complete","dispatchEvent","tagName","toLowerCase","querySelector","_render","addEventListener","onSessionUpdated","removeEventListener","innerHTML","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;AACA,IAAMA,eAAe,GAAGC,qCAAoBC,IAA5C;AACA,IAAMC,WAAW,GAAG,sBAApB;AACA,IAAMC,GAAG,GAAG,uBAAM,mBAAN,CAAZ;;IAEMC,M;;;;;;;;;;;EAAeC,0B;;AAErB,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,GAAM;AACjC,MAAI,CAACC,cAAc,CAACC,GAAf,CAAmBN,WAAnB,CAAL,EAAsC;AACpCK,IAAAA,cAAc,CAACE,MAAf,CAAsBP,WAAtB,EAAmCE,MAAnC;AACD;AACF,CAJD;;AAMAE,oBAAoB;;AAEpB,IAAMI,eAAe,GAAG,SAAlBA,eAAkB,CAACC,CAAD;AAAA,SAAOC,KAAK,CAACC,OAAN,CAAcF,CAAd,KAAoBA,CAAC,CAACG,MAAF,GAAW,CAAtC;AAAA,CAAxB;;AAEO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CA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AAMgB,QAAQ,GAAGhC,iBAAiB,CAAC,KAAKgB,QAAN,CAAlC;AACA,WAAKiB,aAAL,CACE,IAAIhD,oCAAJ,CAAwB,KAAKiD,OAAL,CAAaC,WAAb,EAAxB,EAAoDH,QAApD,CADF;AAGD;;;SAED,eAAY;AACV,aAAO,KAAKI,aAAL,WAAsBjD,WAAtB,QAAP;AACD;;;SAED,eAAY;AACV,aAAO,KAAKiD,aAAL,WAAsBjD,WAAtB,QAAP;AACD;;;WAED,6BAAoB;AAClB,WAAKkD,OAAL;;AACA,WAAKC,gBAAL,CAAsBtD,eAAtB,EAAuC,KAAKuD,gBAA5C;AACD;;;WAED,gCAAuB;AACrB,WAAKC,mBAAL,CAAyBxD,eAAzB,EAA0C,KAAKuD,gBAA/C;AACD;;;WAED,mBAAU;AACR,WAAKE,SAAL,qCAEOtD,WAFP,yBAE+BA,WAF/B,yBAGOA,WAHP,yBAG+BA,WAH/B;AAMD;;;kDA1G+BuD,W","sourcesContent":["import { SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport MultipleChoice from '@pie-element/multiple-choice';\nimport get from 'lodash/get';\nimport debug from 'debug';\nconst SESSION_CHANGED = SessionChangedEvent.TYPE;\nconst MC_TAG_NAME = 'ebsr-multiple-choice';\nconst log = debug('pie-elements:ebsr');\n\nclass EbsrMC extends MultipleChoice {}\n\nconst defineMultipleChoice = () => {\n if (!customElements.get(MC_TAG_NAME)) {\n customElements.define(MC_TAG_NAME, EbsrMC);\n }\n};\n\ndefineMultipleChoice();\n\nconst isNonEmptyArray = (a) => Array.isArray(a) && a.length > 0;\n\nexport const isSessionComplete = (session) => {\n const a = get(session, 'value.partA.value');\n const b = get(session, 'value.partB.value');\n\n return isNonEmptyArray(a) && isNonEmptyArray(b);\n};\n\nexport default class Ebsr extends HTMLElement {\n constructor() {\n super();\n this._model = {};\n this._session = {};\n }\n\n onSessionUpdated = (e) => {\n if (e.target === this) {\n return;\n }\n\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const id = e.target.getAttribute('id');\n\n if (id) {\n const key = `part${id.toUpperCase()}`;\n\n if (e.update) {\n this._model[key] = e.update;\n }\n //TODO: accessing a private property here. The session event should contain the update in future to prevent this.\n this.dispatchSessionChanged(e.srcElement._session, key);\n }\n };\n\n set model(m) {\n this._model = m;\n\n customElements.whenDefined(MC_TAG_NAME).then(() => {\n this.setPartModel(this.partA, 'partA');\n this.setPartModel(this.partB, 'partB');\n });\n }\n\n set session(s) {\n this._session = s;\n\n customElements.whenDefined(MC_TAG_NAME).then(() => {\n this.setPartSession(this.partA, 'partA');\n this.setPartSession(this.partB, 'partB');\n });\n }\n\n get session() {\n return this._session;\n }\n\n setPartModel(part, key) {\n if (this._model && this._model[key] && part) {\n const { mode } = this._model;\n\n part.model = {\n ...this._model[key],\n mode,\n keyMode: this._model[key].choicePrefix,\n };\n }\n }\n\n setPartSession(part, key) {\n if (this._session && this._model && part) {\n const { value } = this._session;\n part.session = value && value[key] ? value[key] : { id: key };\n }\n }\n\n dispatchSessionChanged(partSession, key) {\n this._session.value = {\n ...this._session.value,\n [key]: partSession,\n };\n\n log('[onSessionChanged] session: ', this._session);\n const complete = isSessionComplete(this._session);\n this.dispatchEvent(\n new SessionChangedEvent(this.tagName.toLowerCase(), complete)\n );\n }\n\n get partA() {\n return this.querySelector(`${MC_TAG_NAME}#a`);\n }\n\n get partB() {\n return this.querySelector(`${MC_TAG_NAME}#b`);\n }\n\n connectedCallback() {\n this._render();\n this.addEventListener(SESSION_CHANGED, this.onSessionUpdated);\n }\n\n disconnectedCallback() {\n this.removeEventListener(SESSION_CHANGED, this.onSessionUpdated);\n }\n\n _render() {\n this.innerHTML = `\n <div>\n <${MC_TAG_NAME} id=\"a\"></${MC_TAG_NAME}>\n <${MC_TAG_NAME} id=\"b\"></${MC_TAG_NAME}>\n </div>\n `;\n }\n}\n"],"file":"index.js"}
package/lib/print.js CHANGED
@@ -172,7 +172,7 @@ var Ebsr = /*#__PURE__*/function (_HTMLElement) {
172
172
  }, {
173
173
  key: "setPartModel",
174
174
  value: function setPartModel(part, key) {
175
- if (this._model && this._model[key]) {
175
+ if (this._model && this._model[key] && part) {
176
176
  part.model = _objectSpread(_objectSpread({}, preparePrintModel(this._model[key], this._options)), {}, {
177
177
  keyMode: this._model[key].choicePrefix
178
178
  });
@@ -193,7 +193,7 @@ var Ebsr = /*#__PURE__*/function (_HTMLElement) {
193
193
  }, {
194
194
  key: "setPartSession",
195
195
  value: function setPartSession(part, key) {
196
- if (this._session && this._model) {
196
+ if (this._session && this._model && part) {
197
197
  var value = this._session.value;
198
198
  part.session = value && value[key] ? value[key] : {
199
199
  id: key
package/lib/print.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/print.js"],"names":["MC_TAG_NAME","SESSION_CHANGED","SessionChangedEvent","TYPE","log","preparePrintModel","model","opts","instr","role","prompt","promptEnabled","undefined","teacherInstructions","teacherInstructionsEnabled","showTeacherInstructions","alwaysShowCorrect","mode","disabled","animationsDisabled","lockChoiceOrder","choicesLayout","choices","map","c","rationale","rationaleEnabled","hideTick","feedback","keyMode","choicePrefix","EbsrMC","MultipleChoice","defineMultipleChoice","customElements","get","define","isNonEmptyArray","a","Array","isArray","length","isSessionComplete","session","b","Ebsr","e","target","preventDefault","stopImmediatePropagation","id","getAttribute","key","toUpperCase","update","_model","dispatchSessionChanged","srcElement","_session","_options","m","whenDefined","then","setPartModel","partA","partB","s","setPartSession","part","o","value","partSession","complete","dispatchEvent","tagName","toLowerCase","querySelector","_render","addEventListener","onSessionUpdated","removeEventListener","innerHTML","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AACA,IAAMA,WAAW,GAAG,sBAApB;AACA,IAAMC,eAAe,GAAGC,qCAAoBC,IAA5C;AAEA,IAAMC,GAAG,GAAG,uBAAM,wBAAN,CAAZ;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMC,iBA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import MultipleChoice from '@pie-element/multiple-choice';\nimport debug from 'debug';\nimport get from 'lodash/get';\n\nimport {SessionChangedEvent} from '@pie-framework/pie-player-events';\nconst MC_TAG_NAME = 'ebsr-multiple-choice';\nconst SESSION_CHANGED = SessionChangedEvent.TYPE;\n\nconst log = debug('pie-element:ebsr:print');\n\n/**\n * Live in same package as main element - so we can access some of the shared comps!\n *\n * - update pslb to build print if src/print.js is there\n * - update demo el\n * - get configure/controller building\n */\n\nconst preparePrintModel = (model, opts) => {\n const instr = opts.role === 'instructor';\n\n model.prompt = model.promptEnabled !== false ? model.prompt : undefined;\n model.teacherInstructions = instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;\n model.showTeacherInstructions = instr;\n model.alwaysShowCorrect = instr;\n model.mode = instr ? 'evaluate' : 'gather';\n\n model.disabled = true;\n model.animationsDisabled = true;\n model.lockChoiceOrder = true;\n model.choicesLayout = model.choicesLayout || 'vertical';\n\n const choices = cloneDeep(model.choices);\n\n model.choices = choices.map((c) => {\n c.rationale = instr && model.rationaleEnabled !== false ? c.rationale : undefined;\n c.hideTick = instr;\n c.feedback = undefined;\n return c;\n });\n\n model.keyMode = model.choicePrefix || 'letters';\n\n return model;\n};\n\nclass EbsrMC extends MultipleChoice {}\n\nconst defineMultipleChoice = () => {\n if (!customElements.get(MC_TAG_NAME)) {\n customElements.define(MC_TAG_NAME, EbsrMC);\n }\n};\n\ndefineMultipleChoice();\n\nconst isNonEmptyArray = (a) => Array.isArray(a) && a.length > 0;\n\nexport const isSessionComplete = (session) => {\n const a = get(session, 'value.partA.value');\n const b = get(session, 'value.partB.value');\n\n return isNonEmptyArray(a) && isNonEmptyArray(b);\n};\n\nexport default class Ebsr extends HTMLElement {\n constructor() {\n super();\n this._model = {};\n this._session = {};\n this._options = null;\n }\n\n onSessionUpdated = (e) => {\n if (e.target === this) {\n return;\n }\n\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const id = e.target.getAttribute('id');\n\n if (id) {\n const key = `part${id.toUpperCase()}`;\n\n if (e.update) {\n this._model[key] = e.update;\n }\n //TODO: accessing a private property here. The session event should contain the update in future to prevent this.\n this.dispatchSessionChanged(e.srcElement._session, key);\n }\n };\n\n set model(m) {\n this._model = m;\n\n customElements.whenDefined(MC_TAG_NAME).then(() => {\n this.setPartModel(this.partA, 'partA');\n this.setPartModel(this.partB, 'partB');\n });\n }\n\n set session(s) {\n this._session = s;\n\n customElements.whenDefined(MC_TAG_NAME).then(() => {\n this.setPartSession(this.partA, 'partA');\n this.setPartSession(this.partB, 'partB');\n });\n }\n\n setPartModel(part, key) {\n if (this._model && this._model[key]) {\n\n part.model = {\n ...preparePrintModel(this._model[key], this._options),\n keyMode: this._model[key].choicePrefix,\n };\n\n if (!part._session) {\n // for print, \"set session\" is not called,\n // but ebsr needs sessions in order to render the elements,\n // so we set it here it was not set already\n part.session = {};\n }\n }\n }\n\n set options(o) {\n this._options = o;\n }\n\n setPartSession(part, key) {\n if (this._session && this._model) {\n const { value } = this._session;\n part.session = value && value[key] ? value[key] : { id: key };\n }\n }\n\n dispatchSessionChanged(partSession, key) {\n this._session.value = {\n ...this._session.value,\n [key]: partSession,\n };\n\n log('[onSessionChanged] session: ', this._session);\n const complete = isSessionComplete(this._session);\n this.dispatchEvent(\n new SessionChangedEvent(this.tagName.toLowerCase(), complete)\n );\n }\n\n get partA() {\n return this.querySelector(`${MC_TAG_NAME}#a`);\n }\n\n get partB() {\n return this.querySelector(`${MC_TAG_NAME}#b`);\n }\n\n connectedCallback() {\n this._render();\n this.addEventListener(SESSION_CHANGED, this.onSessionUpdated);\n }\n\n disconnectedCallback() {\n this.removeEventListener(SESSION_CHANGED, this.onSessionUpdated);\n }\n\n _render() {\n this.innerHTML = `\n <div>\n <${MC_TAG_NAME} id=\"a\"></${MC_TAG_NAME}>\n <${MC_TAG_NAME} id=\"b\"></${MC_TAG_NAME}>\n </div>\n `;\n }\n}\n"],"file":"print.js"}
1
+ {"version":3,"sources":["../src/print.js"],"names":["MC_TAG_NAME","SESSION_CHANGED","SessionChangedEvent","TYPE","log","preparePrintModel","model","opts","instr","role","prompt","promptEnabled","undefined","teacherInstructions","teacherInstructionsEnabled","showTeacherInstructions","alwaysShowCorrect","mode","disabled","animationsDisabled","lockChoiceOrder","choicesLayout","choices","map","c","rationale","rationaleEnabled","hideTick","feedback","keyMode","choicePrefix","EbsrMC","MultipleChoice","defineMultipleChoice","customElements","get","define","isNonEmptyArray","a","Array","isArray","length","isSessionComplete","session","b","Ebsr","e","target","preventDefault","stopImmediatePropagation","id","getAttribute","key","toUpperCase","update","_model","dispatchSessionChanged","srcElement","_session","_options","m","whenDefined","then","setPartModel","partA","partB","s","setPartSession","part","o","value","partSession","complete","dispatchEvent","tagName","toLowerCase","querySelector","_render","addEventListener","onSessionUpdated","removeEventListener","innerHTML","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AACA,IAAMA,WAAW,GAAG,sBAApB;AACA,IAAMC,eAAe,GAAGC,qCAAoBC,IAA5C;AAEA,IAAMC,GAAG,GAAG,uBAAM,wBAAN,CAAZ;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,KAAD,EAAQC,IAAR,EAAiB;AACzC,MAAMC,KAAK,GAAGD,IAAI,CAACE,IAAL,KAAc,YAA5B;AAEAH,EAAAA,KAAK,CAACI,MAAN,GAAeJ,KAAK,CAACK,aAAN,KAAwB,KAAxB,GAAgCL,KAAK,CAACI,MAAtC,GAA+CE,SAA9D;AACAN,EAAAA,KAAK,CAACO,mBAAN,GAA4BL,KAAK,IAAIF,KAAK,CAACQ,0BAAN,KAAqC,KAA9C,GAAsDR,KAAK,CAACO,mBAA5D,GAAkFD,SAA9G;AACAN,EAAAA,KAAK,CAACS,uBAAN,GAAgCP,KAAhC;AACAF,EAAAA,KAAK,CAACU,iBAAN,GAA0BR,KAA1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QAAL,CAAcY,KAAd,mCACK,KAAKZ,QAAL,CAAcY,KADnB,4CAEGlB,GAFH,EAESmB,WAFT;AAKAnE,MAAAA,GAAG,CAAC,8BAAD,EAAiC,KAAKsD,QAAtC,CAAH;AACA,UAAMc,QAAQ,GAAG9B,iBAAiB,CAAC,KAAKgB,QAAN,CAAlC;AACA,WAAKe,aAAL,CACE,IAAIvE,oCAAJ,CAAwB,KAAKwE,OAAL,CAAaC,WAAb,EAAxB,EAAoDH,QAApD,CADF;AAGD;;;SAED,eAAY;AACV,aAAO,KAAKI,aAAL,WAAsB5E,WAAtB,QAAP;AACD;;;SAED,eAAY;AACV,aAAO,KAAK4E,aAAL,WAAsB5E,WAAtB,QAAP;AACD;;;WAED,6BAAoB;AAClB,WAAK6E,OAAL;;AACA,WAAKC,gBAAL,CAAsB7E,eAAtB,EAAuC,KAAK8E,gBAA5C;AACD;;;WAED,gCAAuB;AACrB,WAAKC,mBAAL,CAAyB/E,eAAzB,EAA0C,KAAK8E,gBAA/C;AACD;;;WAED,mBAAU;AACR,WAAKE,SAAL,qCAEOjF,WAFP,yBAE+BA,WAF/B,yBAGOA,WAHP,yBAG+BA,WAH/B;AAMD;;;kDAhH+BkF,W","sourcesContent":["import React from 'react';\nimport cloneDeep from 'lodash/cloneDeep';\nimport MultipleChoice from '@pie-element/multiple-choice';\nimport debug from 'debug';\nimport get from 'lodash/get';\n\nimport {SessionChangedEvent} from '@pie-framework/pie-player-events';\nconst MC_TAG_NAME = 'ebsr-multiple-choice';\nconst SESSION_CHANGED = SessionChangedEvent.TYPE;\n\nconst log = debug('pie-element:ebsr:print');\n\n/**\n * Live in same package as main element - so we can access some of the shared comps!\n *\n * - update pslb to build print if src/print.js is there\n * - update demo el\n * - get configure/controller building\n */\n\nconst preparePrintModel = (model, opts) => {\n const instr = opts.role === 'instructor';\n\n model.prompt = model.promptEnabled !== false ? model.prompt : undefined;\n model.teacherInstructions = instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;\n model.showTeacherInstructions = instr;\n model.alwaysShowCorrect = instr;\n model.mode = instr ? 'evaluate' : 'gather';\n\n model.disabled = true;\n model.animationsDisabled = true;\n model.lockChoiceOrder = true;\n model.choicesLayout = model.choicesLayout || 'vertical';\n\n const choices = cloneDeep(model.choices);\n\n model.choices = choices.map((c) => {\n c.rationale = instr && model.rationaleEnabled !== false ? c.rationale : undefined;\n c.hideTick = instr;\n c.feedback = undefined;\n return c;\n });\n\n model.keyMode = model.choicePrefix || 'letters';\n\n return model;\n};\n\nclass EbsrMC extends MultipleChoice {}\n\nconst defineMultipleChoice = () => {\n if (!customElements.get(MC_TAG_NAME)) {\n customElements.define(MC_TAG_NAME, EbsrMC);\n }\n};\n\ndefineMultipleChoice();\n\nconst isNonEmptyArray = (a) => Array.isArray(a) && a.length > 0;\n\nexport const isSessionComplete = (session) => {\n const a = get(session, 'value.partA.value');\n const b = get(session, 'value.partB.value');\n\n return isNonEmptyArray(a) && isNonEmptyArray(b);\n};\n\nexport default class Ebsr extends HTMLElement {\n constructor() {\n super();\n this._model = {};\n this._session = {};\n this._options = null;\n }\n\n onSessionUpdated = (e) => {\n if (e.target === this) {\n return;\n }\n\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const id = e.target.getAttribute('id');\n\n if (id) {\n const key = `part${id.toUpperCase()}`;\n\n if (e.update) {\n this._model[key] = e.update;\n }\n //TODO: accessing a private property here. The session event should contain the update in future to prevent this.\n this.dispatchSessionChanged(e.srcElement._session, key);\n }\n };\n\n set model(m) {\n this._model = m;\n\n customElements.whenDefined(MC_TAG_NAME).then(() => {\n this.setPartModel(this.partA, 'partA');\n this.setPartModel(this.partB, 'partB');\n });\n }\n\n set session(s) {\n this._session = s;\n\n customElements.whenDefined(MC_TAG_NAME).then(() => {\n this.setPartSession(this.partA, 'partA');\n this.setPartSession(this.partB, 'partB');\n });\n }\n\n setPartModel(part, key) {\n if (this._model && this._model[key] && part) {\n\n part.model = {\n ...preparePrintModel(this._model[key], this._options),\n keyMode: this._model[key].choicePrefix,\n };\n\n if (!part._session) {\n // for print, \"set session\" is not called,\n // but ebsr needs sessions in order to render the elements,\n // so we set it here it was not set already\n part.session = {};\n }\n }\n }\n\n set options(o) {\n this._options = o;\n }\n\n setPartSession(part, key) {\n if (this._session && this._model && part) {\n const { value } = this._session;\n part.session = value && value[key] ? value[key] : { id: key };\n }\n }\n\n dispatchSessionChanged(partSession, key) {\n this._session.value = {\n ...this._session.value,\n [key]: partSession,\n };\n\n log('[onSessionChanged] session: ', this._session);\n const complete = isSessionComplete(this._session);\n this.dispatchEvent(\n new SessionChangedEvent(this.tagName.toLowerCase(), complete)\n );\n }\n\n get partA() {\n return this.querySelector(`${MC_TAG_NAME}#a`);\n }\n\n get partB() {\n return this.querySelector(`${MC_TAG_NAME}#b`);\n }\n\n connectedCallback() {\n this._render();\n this.addEventListener(SESSION_CHANGED, this.onSessionUpdated);\n }\n\n disconnectedCallback() {\n this.removeEventListener(SESSION_CHANGED, this.onSessionUpdated);\n }\n\n _render() {\n this.innerHTML = `\n <div>\n <${MC_TAG_NAME} id=\"a\"></${MC_TAG_NAME}>\n <${MC_TAG_NAME} id=\"b\"></${MC_TAG_NAME}>\n </div>\n `;\n }\n}\n"],"file":"print.js"}