@pie-element/ebsr 6.6.3-next.1097 → 6.6.3-next.1137

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 (239) hide show
  1. package/configure/node_modules/@pie-lib/config-ui/CHANGELOG.json +1677 -0
  2. package/configure/node_modules/@pie-lib/config-ui/CHANGELOG.md +1743 -0
  3. package/configure/node_modules/@pie-lib/config-ui/LICENSE.md +5 -0
  4. package/configure/node_modules/@pie-lib/config-ui/README.md +12 -0
  5. package/configure/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +44 -0
  6. package/configure/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +1 -0
  7. package/configure/node_modules/@pie-lib/config-ui/lib/checkbox.js +86 -0
  8. package/configure/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +1 -0
  9. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +164 -0
  10. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +1 -0
  11. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +398 -0
  12. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +1 -0
  13. package/configure/node_modules/@pie-lib/config-ui/lib/choice-utils.js +54 -0
  14. package/configure/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +1 -0
  15. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +185 -0
  16. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +1 -0
  17. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +75 -0
  18. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +1 -0
  19. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +178 -0
  20. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +1 -0
  21. package/configure/node_modules/@pie-lib/config-ui/lib/form-section.js +46 -0
  22. package/configure/node_modules/@pie-lib/config-ui/lib/form-section.js.map +1 -0
  23. package/configure/node_modules/@pie-lib/config-ui/lib/help.js +145 -0
  24. package/configure/node_modules/@pie-lib/config-ui/lib/help.js.map +1 -0
  25. package/configure/node_modules/@pie-lib/config-ui/lib/index.js +216 -0
  26. package/configure/node_modules/@pie-lib/config-ui/lib/index.js.map +1 -0
  27. package/configure/node_modules/@pie-lib/config-ui/lib/input.js +139 -0
  28. package/configure/node_modules/@pie-lib/config-ui/lib/input.js.map +1 -0
  29. package/configure/node_modules/@pie-lib/config-ui/lib/inputs.js +131 -0
  30. package/configure/node_modules/@pie-lib/config-ui/lib/inputs.js.map +1 -0
  31. package/configure/node_modules/@pie-lib/config-ui/lib/langs.js +179 -0
  32. package/configure/node_modules/@pie-lib/config-ui/lib/langs.js.map +1 -0
  33. package/configure/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +101 -0
  34. package/configure/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +1 -0
  35. package/configure/node_modules/@pie-lib/config-ui/lib/layout/index.js +24 -0
  36. package/configure/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +1 -0
  37. package/configure/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +105 -0
  38. package/configure/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +1 -0
  39. package/configure/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +87 -0
  40. package/configure/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +1 -0
  41. package/configure/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +79 -0
  42. package/configure/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +1 -0
  43. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +364 -0
  44. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +1 -0
  45. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field.js +265 -0
  46. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +1 -0
  47. package/configure/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +41 -0
  48. package/configure/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +1 -0
  49. package/configure/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +77 -0
  50. package/configure/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +1 -0
  51. package/configure/node_modules/@pie-lib/config-ui/lib/settings/index.js +130 -0
  52. package/configure/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +1 -0
  53. package/configure/node_modules/@pie-lib/config-ui/lib/settings/panel.js +412 -0
  54. package/configure/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +1 -0
  55. package/configure/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +43 -0
  56. package/configure/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +1 -0
  57. package/configure/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +56 -0
  58. package/configure/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +1 -0
  59. package/configure/node_modules/@pie-lib/config-ui/lib/tabs/index.js +106 -0
  60. package/configure/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +1 -0
  61. package/configure/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +198 -0
  62. package/configure/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +1 -0
  63. package/configure/node_modules/@pie-lib/config-ui/lib/two-choice.js +180 -0
  64. package/configure/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +1 -0
  65. package/configure/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +84 -0
  66. package/configure/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +1 -0
  67. package/configure/node_modules/@pie-lib/config-ui/package.json +30 -0
  68. package/configure/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +43 -0
  69. package/configure/node_modules/@pie-lib/config-ui/src/checkbox.jsx +63 -0
  70. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +103 -0
  71. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +319 -0
  72. package/configure/node_modules/@pie-lib/config-ui/src/choice-utils.js +30 -0
  73. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +116 -0
  74. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +54 -0
  75. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +98 -0
  76. package/configure/node_modules/@pie-lib/config-ui/src/form-section.jsx +23 -0
  77. package/configure/node_modules/@pie-lib/config-ui/src/help.jsx +88 -0
  78. package/configure/node_modules/@pie-lib/config-ui/src/index.js +58 -0
  79. package/configure/node_modules/@pie-lib/config-ui/src/input.jsx +72 -0
  80. package/configure/node_modules/@pie-lib/config-ui/src/inputs.jsx +96 -0
  81. package/configure/node_modules/@pie-lib/config-ui/src/langs.jsx +122 -0
  82. package/configure/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +64 -0
  83. package/configure/node_modules/@pie-lib/config-ui/src/layout/index.js +4 -0
  84. package/configure/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +60 -0
  85. package/configure/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +31 -0
  86. package/configure/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +64 -0
  87. package/configure/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +276 -0
  88. package/configure/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +196 -0
  89. package/configure/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +18 -0
  90. package/configure/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +52 -0
  91. package/configure/node_modules/@pie-lib/config-ui/src/settings/index.js +75 -0
  92. package/configure/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +297 -0
  93. package/configure/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +20 -0
  94. package/configure/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +31 -0
  95. package/configure/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +51 -0
  96. package/configure/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +121 -0
  97. package/configure/node_modules/@pie-lib/config-ui/src/two-choice.jsx +94 -0
  98. package/configure/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +36 -0
  99. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +3327 -0
  100. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +1759 -0
  101. package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +5 -0
  102. package/configure/node_modules/@pie-lib/editable-html/README.md +45 -0
  103. package/configure/node_modules/@pie-lib/editable-html/deploy.sh +16 -0
  104. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +893 -0
  105. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +1 -0
  106. package/configure/node_modules/@pie-lib/editable-html/lib/index.js +226 -0
  107. package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +1 -0
  108. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +16 -0
  109. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +1 -0
  110. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js +70 -0
  111. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js.map +1 -0
  112. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js +266 -0
  113. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js.map +1 -0
  114. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js +382 -0
  115. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js.map +1 -0
  116. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/alt-dialog.js +119 -0
  117. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/alt-dialog.js.map +1 -0
  118. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +424 -0
  119. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +1 -0
  120. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +175 -0
  121. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +1 -0
  122. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +261 -0
  123. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +1 -0
  124. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +135 -0
  125. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +1 -0
  126. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +141 -0
  127. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +1 -0
  128. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +204 -0
  129. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +1 -0
  130. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +347 -0
  131. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +1 -0
  132. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +339 -0
  133. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +1 -0
  134. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +434 -0
  135. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +1 -0
  136. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +99 -0
  137. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +1 -0
  138. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +93 -0
  139. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +1 -0
  140. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +251 -0
  141. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +1 -0
  142. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +97 -0
  143. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +1 -0
  144. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +54 -0
  145. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +1 -0
  146. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +93 -0
  147. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +1 -0
  148. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +293 -0
  149. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +1 -0
  150. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +70 -0
  151. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +1 -0
  152. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +110 -0
  153. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +1 -0
  154. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +69 -0
  155. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +1 -0
  156. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +499 -0
  157. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +1 -0
  158. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +158 -0
  159. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +1 -0
  160. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +132 -0
  161. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +1 -0
  162. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +50 -0
  163. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +1 -0
  164. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +263 -0
  165. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +1 -0
  166. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +32 -0
  167. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +1 -0
  168. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +161 -0
  169. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +1 -0
  170. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +346 -0
  171. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +1 -0
  172. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +62 -0
  173. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +1 -0
  174. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +428 -0
  175. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +1 -0
  176. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +9 -0
  177. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +1 -0
  178. package/configure/node_modules/@pie-lib/editable-html/package.json +52 -0
  179. package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +59 -0
  180. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +24 -0
  181. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +83 -0
  182. package/configure/node_modules/@pie-lib/editable-html/playground/index.html +27 -0
  183. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +25 -0
  184. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +151 -0
  185. package/configure/node_modules/@pie-lib/editable-html/playground/package.json +15 -0
  186. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +26 -0
  187. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +30 -0
  188. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +29 -0
  189. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +40 -0
  190. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +23 -0
  191. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +96 -0
  192. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +29 -0
  193. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +40 -0
  194. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +24 -0
  195. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +12 -0
  196. package/configure/node_modules/@pie-lib/editable-html/playground/static.json +3 -0
  197. package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +67 -0
  198. package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +42 -0
  199. package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +749 -0
  200. package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +145 -0
  201. package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +8 -0
  202. package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +27 -0
  203. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/custom-popover.js +45 -0
  204. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/index.jsx +244 -0
  205. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/utils.js +448 -0
  206. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/alt-dialog.jsx +69 -0
  207. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +349 -0
  208. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +108 -0
  209. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +218 -0
  210. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +93 -0
  211. package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +115 -0
  212. package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +175 -0
  213. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +283 -0
  214. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +284 -0
  215. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +372 -0
  216. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +53 -0
  217. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +43 -0
  218. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +187 -0
  219. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +78 -0
  220. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +45 -0
  221. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +68 -0
  222. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +263 -0
  223. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +63 -0
  224. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +77 -0
  225. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +59 -0
  226. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +439 -0
  227. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +104 -0
  228. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +111 -0
  229. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +36 -0
  230. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +225 -0
  231. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +21 -0
  232. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +97 -0
  233. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +323 -0
  234. package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +32 -0
  235. package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +385 -0
  236. package/configure/node_modules/@pie-lib/editable-html/src/theme.js +1 -0
  237. package/configure/node_modules/@pie-lib/editable-html/static.json +1 -0
  238. package/configure/package.json +1 -1
  239. package/package.json +3 -3
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import classNames from 'classnames';
4
+ import { withStyles } from '@material-ui/core/styles';
5
+
6
+ const useStyles = withStyles(() => ({
7
+ root: {
8
+ position: 'relative'
9
+ },
10
+ editor: {
11
+ display: 'inline-block',
12
+ overflow: 'hidden'
13
+ }
14
+ }));
15
+
16
+ class MediaWrapper extends React.Component {
17
+ static propTypes = {
18
+ classes: PropTypes.object,
19
+ children: PropTypes.array,
20
+ editor: PropTypes.bool,
21
+ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
22
+ };
23
+
24
+ render() {
25
+ const { editor, classes, children, width, ...rest } = this.props;
26
+
27
+ return (
28
+ <span
29
+ className={classNames(classes.root, {
30
+ [classes.editor]: editor
31
+ })}
32
+ {...rest}
33
+ style={{
34
+ width: width || 300
35
+ }}
36
+ >
37
+ {children}
38
+ </span>
39
+ );
40
+ }
41
+ }
42
+
43
+ export default useStyles(MediaWrapper);
@@ -0,0 +1,187 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import isUndefined from 'lodash/isUndefined';
4
+ import { DragSource, DropTarget } from '@pie-lib/drag';
5
+ import { color } from '@pie-lib/render-ui';
6
+ import { renderMath } from '@pie-lib/math-rendering';
7
+ import { withStyles } from '@material-ui/core/styles';
8
+ import classnames from 'classnames';
9
+
10
+ import { GripIcon } from '../icons';
11
+
12
+ const useStyles = withStyles(theme => ({
13
+ content: {
14
+ border: `solid 0px ${theme.palette.primary.main}`
15
+ },
16
+ chip: {
17
+ minWidth: '90px'
18
+ },
19
+ correct: {
20
+ border: 'solid 1px green'
21
+ },
22
+ incorrect: {
23
+ border: 'solid 1px red'
24
+ },
25
+ selected: {
26
+ border: `2px solid ${color.primaryDark()} !important`
27
+ }
28
+ }));
29
+
30
+ export class BlankContent extends React.Component {
31
+ static propTypes = {
32
+ n: PropTypes.object,
33
+ children: PropTypes.func,
34
+ isDragging: PropTypes.bool,
35
+ isOver: PropTypes.bool,
36
+ dragItem: PropTypes.object,
37
+ value: PropTypes.object,
38
+ classes: PropTypes.object
39
+ };
40
+
41
+ constructor(props) {
42
+ super(props);
43
+
44
+ this.handleClick = this.handleClick.bind(this);
45
+ }
46
+
47
+ componentDidMount() {
48
+ document.addEventListener('click', this.handleClick);
49
+ }
50
+
51
+ componentWillUnmount() {
52
+ document.removeEventListener('click', this.handleClick);
53
+ }
54
+
55
+ handleClick(event) {
56
+ const { classes } = this.props;
57
+
58
+ if (this.elementRef) {
59
+ this.elementRef.className = this.elementRef.contains(event.target) ? classes.selected : '';
60
+ }
61
+ }
62
+
63
+ componentDidUpdate() {
64
+ if (this.elementRef) {
65
+ renderMath(this.elementRef);
66
+ }
67
+ }
68
+
69
+ render() {
70
+ const { n, children, isDragging, dragItem, isOver, value } = this.props;
71
+
72
+ const label = dragItem && isOver ? dragItem.value.value : value.value || '\u00A0';
73
+ const finalLabel = isDragging ? '\u00A0' : label;
74
+ const hasGrip = finalLabel !== '\u00A0';
75
+
76
+ return (
77
+ <div
78
+ ref={ref => (this.elementRef = ref)}
79
+ style={{
80
+ display: 'inline-flex',
81
+ minWidth: '178px',
82
+ minHeight: '36px',
83
+ background: '#FFF',
84
+ border: '1px solid #C0C3CF',
85
+ boxSizing: 'border-box',
86
+ borderRadius: '3px',
87
+ overflow: 'hidden',
88
+ position: 'relative',
89
+ padding: '8px 8px 8px 35px'
90
+ }}
91
+ data-key={n.key}
92
+ contentEditable={false}
93
+ >
94
+ {hasGrip && (
95
+ <GripIcon
96
+ style={{
97
+ position: 'absolute',
98
+ top: '6px',
99
+ left: '15px',
100
+ color: '#9B9B9B'
101
+ }}
102
+ contentEditable={false}
103
+ />
104
+ )}
105
+ <span
106
+ dangerouslySetInnerHTML={{
107
+ __html: finalLabel
108
+ }}
109
+ />
110
+ {children}
111
+ </div>
112
+ );
113
+ }
114
+ }
115
+
116
+ const StyledBlankContent = useStyles(BlankContent);
117
+
118
+ const connectedBlankContent = useStyles(({ connectDropTarget, connectDragSource, ...props }) => {
119
+ const { classes, isOver, value } = props;
120
+ const dragContent = <StyledBlankContent {...props} />;
121
+ const dragEl = !value ? dragContent : connectDragSource(<span>{dragContent}</span>);
122
+ const content = (
123
+ <span className={classnames(classes.content, isOver && classes.over)}>{dragEl}</span>
124
+ );
125
+
126
+ return connectDropTarget ? connectDropTarget(content) : content;
127
+ });
128
+
129
+ export const tileTarget = {
130
+ drop(props, monitor) {
131
+ const draggedItem = monitor.getItem();
132
+ const shouldDrop =
133
+ isUndefined(draggedItem.value.index) ||
134
+ isUndefined(props.value.index) ||
135
+ draggedItem.value.index !== props.value.index;
136
+
137
+ if (shouldDrop) {
138
+ props.onChange(draggedItem.value);
139
+ }
140
+
141
+ return {
142
+ dropped: shouldDrop
143
+ };
144
+ },
145
+ canDrop(props, monitor) {
146
+ const draggedItem = monitor.getItem();
147
+
148
+ return draggedItem.instanceId === props.instanceId;
149
+ }
150
+ };
151
+
152
+ const DropTile = DropTarget('drag-in-the-blank-choice', tileTarget, (connect, monitor) => ({
153
+ connectDropTarget: connect.dropTarget(),
154
+ isOver: monitor.isOver(),
155
+ dragItem: monitor.getItem()
156
+ }))(connectedBlankContent);
157
+
158
+ export const tileSource = {
159
+ canDrag(props) {
160
+ return !props.disabled && !!props.value;
161
+ },
162
+ beginDrag(props) {
163
+ return {
164
+ id: props.targetId,
165
+ value: props.value,
166
+ instanceId: props.instanceId,
167
+ fromChoice: true
168
+ };
169
+ },
170
+ endDrag(props, monitor) {
171
+ // this will be null if it did not drop
172
+ const dropResult = monitor.getDropResult();
173
+
174
+ if (!dropResult || (dropResult.dropped && !props.duplicates)) {
175
+ const draggedItem = monitor.getItem();
176
+
177
+ if (draggedItem.fromChoice) {
178
+ props.removeResponse(draggedItem.value);
179
+ }
180
+ }
181
+ }
182
+ };
183
+
184
+ export default DragSource('drag-in-the-blank-choice', tileSource, (connect, monitor) => ({
185
+ connectDragSource: connect.dragSource(),
186
+ isDragging: monitor.isDragging()
187
+ }))(DropTile);
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import DragDropTile from './choice';
4
+
5
+ export const onValueChange = (nodeProps, n, value) => {
6
+ const val = nodeProps.editor.value;
7
+ const change = val.change();
8
+
9
+ change.setNodeByKey(n.key, {
10
+ data: {
11
+ ...value,
12
+ index: n.data.get('index')
13
+ }
14
+ });
15
+
16
+ nodeProps.editor.props.onChange(change, () => {
17
+ nodeProps.editor.props.onEditingDone();
18
+ });
19
+ };
20
+
21
+ export const onRemoveResponse = (nodeProps, value) => {
22
+ const val = nodeProps.editor.value;
23
+ const change = val.change();
24
+ const dragInTheBlank = val.document.findDescendant(
25
+ n => n.data && n.data.get('index') === value.index
26
+ );
27
+
28
+ change.setNodeByKey(dragInTheBlank.key, {
29
+ data: {
30
+ index: dragInTheBlank.data.get('index')
31
+ }
32
+ });
33
+
34
+ nodeProps.editor.props.onChange(change, () => {
35
+ nodeProps.editor.props.onEditingDone();
36
+ });
37
+ };
38
+
39
+ const DragDrop = props => {
40
+ const { attributes, data, n, nodeProps, opts } = props;
41
+ const { inTable } = data;
42
+
43
+ return (
44
+ <span
45
+ {...attributes}
46
+ style={{
47
+ display: 'inline-flex',
48
+ minHeight: '50px',
49
+ minWidth: '178px',
50
+ position: 'relative',
51
+ margin: inTable ? '10px' : '0 10px',
52
+ cursor: 'pointer'
53
+ }}
54
+ >
55
+ <DragDropTile
56
+ n={n}
57
+ dragKey={n.key}
58
+ targetId="0"
59
+ value={data}
60
+ duplicates={opts.options.duplicates}
61
+ onChange={value => onValueChange(nodeProps, n, value)}
62
+ removeResponse={value => onRemoveResponse(nodeProps, value)}
63
+ >
64
+ {nodeProps.children}
65
+ </DragDropTile>
66
+ </span>
67
+ );
68
+ };
69
+
70
+ DragDrop.propTypes = {
71
+ attributes: PropTypes.object,
72
+ data: PropTypes.object,
73
+ n: PropTypes.object,
74
+ nodeProps: PropTypes.object,
75
+ opts: PropTypes.object
76
+ };
77
+
78
+ export default DragDrop;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+
4
+ const ExplicitConstructedResponse = props => {
5
+ const { attributes, value, error } = props;
6
+
7
+ return (
8
+ <span
9
+ {...attributes}
10
+ style={{
11
+ display: 'inline-flex',
12
+ minHeight: '50px',
13
+ minWidth: '178px',
14
+ position: 'relative',
15
+ margin: '0 5px',
16
+ cursor: 'pointer'
17
+ }}
18
+ >
19
+ <div
20
+ style={{
21
+ display: 'inline-flex',
22
+ minWidth: '178px',
23
+ minHeight: '36px',
24
+ height: '36px',
25
+ background: '#FFF',
26
+ border: `1px solid ${error ? 'red' : '#C0C3CF'}`,
27
+ boxSizing: 'border-box',
28
+ borderRadius: '3px',
29
+ overflow: 'hidden',
30
+ padding: '8px'
31
+ }}
32
+ dangerouslySetInnerHTML={{
33
+ __html: value || '<div>&nbsp;</div>'
34
+ }}
35
+ />
36
+ </span>
37
+ );
38
+ };
39
+
40
+ ExplicitConstructedResponse.propTypes = {
41
+ attributes: PropTypes.object,
42
+ value: PropTypes.string
43
+ };
44
+
45
+ export default ExplicitConstructedResponse;
@@ -0,0 +1,68 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import ChevronRight from '@material-ui/icons/ChevronRight';
4
+ import MoreVert from '@material-ui/icons/MoreVert';
5
+ import { withStyles } from '@material-ui/core/styles';
6
+
7
+ const getRotate = direction => {
8
+ switch (direction) {
9
+ case 'down':
10
+ return 90;
11
+ case 'up':
12
+ return -90;
13
+ case 'left':
14
+ return 180;
15
+ default:
16
+ return 0;
17
+ }
18
+ };
19
+
20
+ export const Chevron = props => {
21
+ const { direction, style } = props;
22
+ const rotate = getRotate(direction);
23
+
24
+ return (
25
+ <ChevronRight
26
+ style={{
27
+ transform: `rotate(${rotate}deg)`,
28
+ ...style
29
+ }}
30
+ />
31
+ );
32
+ };
33
+
34
+ Chevron.propTypes = {
35
+ direction: PropTypes.string,
36
+ style: PropTypes.object
37
+ };
38
+
39
+ export const GripIcon = ({ style }) => {
40
+ return (
41
+ <span style={style}>
42
+ <MoreVert
43
+ style={{
44
+ margin: '0 -16px'
45
+ }}
46
+ />
47
+ <MoreVert />
48
+ </span>
49
+ );
50
+ };
51
+
52
+ GripIcon.propTypes = {
53
+ style: PropTypes.object
54
+ };
55
+
56
+ export const ToolbarIcon = withStyles({
57
+ icon: {
58
+ fontFamily: 'Cerebri Sans !important',
59
+ fontSize: '14px',
60
+ fontWeight: 'bold',
61
+ lineHeight: '14px',
62
+ position: 'relative',
63
+ top: '7px',
64
+ width: '110px',
65
+ height: '28px',
66
+ whiteSpace: 'nowrap'
67
+ }
68
+ })(({ classes }) => <div className={classes.icon}>+ Response Area</div>);
@@ -0,0 +1,263 @@
1
+ import React from 'react';
2
+ import debug from 'debug';
3
+ import isUndefined from 'lodash/isUndefined';
4
+
5
+ import InlineDropdown from './inline-dropdown';
6
+ import DragInTheBlank from './drag-in-the-blank';
7
+ import ExplicitConstructedResponse from './explicit-constructed-response';
8
+ import { getDefaultElement } from './utils';
9
+ import { ToolbarIcon } from './icons';
10
+
11
+ const log = debug('@pie-lib:editable-html:plugins:respArea');
12
+
13
+ const lastIndexMap = {};
14
+ const elTypesMap = {
15
+ 'inline-dropdown': 'inline_dropdown',
16
+ 'explicit-constructed-response': 'explicit_constructed_response',
17
+ 'drag-in-the-blank': 'drag_in_the_blank'
18
+ };
19
+ const elTypesArray = Object.values(elTypesMap);
20
+
21
+ export default function ResponseAreaPlugin(opts) {
22
+ const isOfCurrentType = d => d.type === opts.type || d.type === elTypesMap[opts.type];
23
+
24
+ const toolbar = {
25
+ icon: <ToolbarIcon />,
26
+ buttonStyles: {
27
+ margin: '0 20px 0 auto'
28
+ },
29
+ onClick: (value, onChange) => {
30
+ log('[toolbar] onClick');
31
+ const change = value.change();
32
+ const currentRespAreaList = change.value.document.filterDescendants(isOfCurrentType);
33
+
34
+ if (currentRespAreaList.size >= opts.maxResponseAreas) {
35
+ return;
36
+ }
37
+
38
+ const type = opts.type.replace(/-/g, '_');
39
+ const prevIndex = lastIndexMap[type];
40
+ const newIndex = prevIndex === 0 ? prevIndex : prevIndex + 1;
41
+ const newInline = getDefaultElement(opts, newIndex);
42
+
43
+ lastIndexMap[type] += 1;
44
+
45
+ if (newInline) {
46
+ if (change.value.selection.startKey || change.value.selection.endKey) {
47
+ change.insertInline(newInline);
48
+ } else {
49
+ // If the markup is empty and there's no focus
50
+ const lastText = value.document.getLastText();
51
+
52
+ if (!lastText) {
53
+ return;
54
+ }
55
+ const parentNode = value.document.getParent(lastText.key);
56
+
57
+ if (parentNode) {
58
+ const index = parentNode.nodes.indexOf(lastText.key);
59
+
60
+ if (parentNode.isVoid) return;
61
+
62
+ change.insertNodeByKey(parentNode.key, index + 1, newInline);
63
+ }
64
+ }
65
+
66
+ if (newInline.type === 'drag_in_the_blank') {
67
+ const nextText = change.value.document.getNextText(newInline.key);
68
+
69
+ if (nextText) {
70
+ change.moveFocusTo(nextText.key, 0).moveAnchorTo(nextText.key, 0);
71
+ }
72
+ }
73
+
74
+ onChange(change);
75
+ }
76
+ },
77
+ customToolbar: opts.respAreaToolbar,
78
+ supports: node => node.object === 'inline' && elTypesArray.indexOf(node.type) >= 0,
79
+ showDone: false
80
+ };
81
+
82
+ return {
83
+ name: 'response_area',
84
+ toolbar,
85
+ filterPlugins: (node, plugins) => {
86
+ if (node.type === 'explicit_constructed_response' || node.type === 'drag_in_the_blank') {
87
+ return [];
88
+ }
89
+
90
+ return plugins.filter(p => p.name !== 'response_area');
91
+ },
92
+ deleteNode: (e, node, value, onChange) => {
93
+ e.preventDefault();
94
+
95
+ const change = value.change().removeNodeByKey(node.key);
96
+
97
+ onChange(change);
98
+ },
99
+ renderNode(props) {
100
+ const { attributes, node: n } = props;
101
+
102
+ if (n.type === 'explicit_constructed_response') {
103
+ const data = n.data.toJSON();
104
+ let error;
105
+
106
+ if (opts.error) {
107
+ error = opts.error();
108
+ }
109
+
110
+ return (
111
+ <ExplicitConstructedResponse
112
+ attributes={attributes}
113
+ value={data.value}
114
+ error={error && error[data.index] && error[data.index][0]}
115
+ />
116
+ );
117
+ }
118
+
119
+ if (n.type === 'drag_in_the_blank') {
120
+ const data = n.data.toJSON();
121
+
122
+ return (
123
+ <DragInTheBlank attributes={attributes} data={data} n={n} nodeProps={props} opts={opts} />
124
+ );
125
+ }
126
+
127
+ if (n.type === 'inline_dropdown') {
128
+ const data = n.data.toJSON();
129
+
130
+ return <InlineDropdown attributes={attributes} selectedItem={data.value} />;
131
+ }
132
+ },
133
+ onChange(change, editor) {
134
+ const type = opts.type.replace(/-/g, '_');
135
+
136
+ if (isUndefined(lastIndexMap[type])) {
137
+ lastIndexMap[type] = 0;
138
+
139
+ change.value.document.forEachDescendant(d => {
140
+ if (d.type === type) {
141
+ const newIndex = parseInt(d.data.get('index'), 10);
142
+
143
+ if (newIndex > lastIndexMap[type]) {
144
+ lastIndexMap[type] = newIndex;
145
+ }
146
+ }
147
+ });
148
+ }
149
+
150
+ if (!editor.value) {
151
+ return;
152
+ }
153
+
154
+ const currentRespAreaList = change.value.document.filterDescendants(isOfCurrentType);
155
+ const oldRespAreaList = editor.value.document.filterDescendants(isOfCurrentType);
156
+
157
+ if (currentRespAreaList.size >= opts.maxResponseAreas) {
158
+ toolbar.disabled = true;
159
+ } else {
160
+ toolbar.disabled = false;
161
+ }
162
+
163
+ const arrayToFilter =
164
+ oldRespAreaList.size > currentRespAreaList.size ? oldRespAreaList : currentRespAreaList;
165
+ const arrayToUseForFilter =
166
+ arrayToFilter === oldRespAreaList ? currentRespAreaList : oldRespAreaList;
167
+
168
+ const elementsWithChangedStatus = arrayToFilter.filter(
169
+ d => !arrayToUseForFilter.find(e => e.data.get('index') === d.data.get('index'))
170
+ );
171
+
172
+ if (elementsWithChangedStatus.size && oldRespAreaList.size > currentRespAreaList.size) {
173
+ opts.onHandleAreaChange(elementsWithChangedStatus);
174
+ }
175
+ },
176
+ onDrop(event, change, editor) {
177
+ const closestEl = event.target.closest('[data-key]');
178
+ const inline = editor.value.document.findDescendant(d => d.key === closestEl.dataset.key);
179
+
180
+ if (inline.type === 'drag_in_the_blank') {
181
+ return false;
182
+ }
183
+ }
184
+ };
185
+ }
186
+
187
+ export const serialization = {
188
+ deserialize(el) {
189
+ const type = el.dataset && el.dataset.type;
190
+
191
+ switch (type) {
192
+ case 'inline_dropdown':
193
+ return {
194
+ object: 'inline',
195
+ type: 'inline_dropdown',
196
+ isVoid: true,
197
+ data: {
198
+ index: el.dataset.index,
199
+ value: el.dataset.value
200
+ }
201
+ };
202
+ case 'explicit_constructed_response':
203
+ return {
204
+ object: 'inline',
205
+ type: 'explicit_constructed_response',
206
+ isVoid: true,
207
+ data: {
208
+ index: el.dataset.index,
209
+ value: el.dataset.value
210
+ }
211
+ };
212
+ case 'drag_in_the_blank':
213
+ return {
214
+ object: 'inline',
215
+ type: 'drag_in_the_blank',
216
+ isVoid: true,
217
+ data: {
218
+ index: el.dataset.index,
219
+ id: el.dataset.id,
220
+ value: el.dataset.value,
221
+ inTable: el.dataset.inTable
222
+ }
223
+ };
224
+ }
225
+ },
226
+ serialize(object) {
227
+ if (object.object !== 'inline') {
228
+ return;
229
+ }
230
+
231
+ switch (object.type) {
232
+ case 'inline_dropdown': {
233
+ const data = object.data.toJSON();
234
+
235
+ return <span data-type="inline_dropdown" data-index={data.index} data-value={data.value} />;
236
+ }
237
+ case 'explicit_constructed_response': {
238
+ const data = object.data.toJSON();
239
+
240
+ return (
241
+ <span
242
+ data-type="explicit_constructed_response"
243
+ data-index={data.index}
244
+ data-value={data.value}
245
+ />
246
+ );
247
+ }
248
+ case 'drag_in_the_blank': {
249
+ const data = object.data.toJSON();
250
+
251
+ return (
252
+ <span
253
+ data-type="drag_in_the_blank"
254
+ data-index={data.index}
255
+ data-id={data.id}
256
+ data-value={data.value}
257
+ data-in-table={data.inTable}
258
+ />
259
+ );
260
+ }
261
+ }
262
+ }
263
+ };