@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,63 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Chevron } from '../icons';
4
+
5
+ const InlineDropdown = ({ attributes, selectedItem }) => {
6
+ // TODO: Investigate
7
+ // Needed because items with values inside have different positioning for some reason
8
+ const html = selectedItem || '<div>&nbsp</div>';
9
+
10
+ return (
11
+ <span
12
+ {...attributes}
13
+ style={{
14
+ display: 'inline-flex',
15
+ height: '50px',
16
+ margin: '0 5px',
17
+ cursor: 'pointer'
18
+ }}
19
+ >
20
+ <div
21
+ style={{
22
+ display: 'inline-flex',
23
+ minWidth: '178px',
24
+ height: '36px',
25
+ background: '#FFF',
26
+ border: '1px solid #C0C3CF',
27
+ boxSizing: 'border-box',
28
+ borderRadius: '3px',
29
+ position: 'relative'
30
+ }}
31
+ >
32
+ <div
33
+ style={{
34
+ flex: 1,
35
+ overflow: 'hidden',
36
+ padding: '0 25px 0 8px',
37
+ whiteSpace: 'nowrap',
38
+ textOverflow: 'ellipsis',
39
+ lineHeight: '35px'
40
+ }}
41
+ dangerouslySetInnerHTML={{
42
+ __html: html
43
+ }}
44
+ />
45
+ <Chevron
46
+ direction="down"
47
+ style={{
48
+ position: 'absolute',
49
+ top: '5px',
50
+ right: '5px'
51
+ }}
52
+ />
53
+ </div>
54
+ </span>
55
+ );
56
+ };
57
+
58
+ InlineDropdown.propTypes = {
59
+ attributes: PropTypes.object,
60
+ selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
61
+ };
62
+
63
+ export default InlineDropdown;
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import { Inline } from 'slate';
4
+ import Snackbar from '@material-ui/core/Snackbar';
5
+
6
+ export const isNumber = val => !isNaN(parseFloat(val)) && isFinite(val);
7
+
8
+ export const insertSnackBar = message => {
9
+ const prevSnacks = document.querySelectorAll('.response-area-alert');
10
+
11
+ prevSnacks.forEach(s => s.remove());
12
+
13
+ const newEl = document.createElement('div');
14
+
15
+ newEl.className = 'response-area-alert';
16
+
17
+ const el = (
18
+ <Snackbar
19
+ anchorOrigin={{ vertical: 'top', horizontal: 'center' }}
20
+ open={true}
21
+ ContentProps={{
22
+ 'aria-describedby': 'message-id'
23
+ }}
24
+ message={<span id="message-id">{message}</span>}
25
+ />
26
+ );
27
+
28
+ ReactDOM.render(el, newEl);
29
+
30
+ document.body.appendChild(newEl);
31
+
32
+ setTimeout(() => {
33
+ newEl.remove();
34
+ }, 2000);
35
+ };
36
+
37
+ export const defaultECR = index =>
38
+ Inline.create({
39
+ type: 'explicit_constructed_response',
40
+ isVoid: true,
41
+ data: {
42
+ index
43
+ }
44
+ });
45
+
46
+ export const defaultDIB = (opts, index) =>
47
+ Inline.create({
48
+ type: 'drag_in_the_blank',
49
+ isVoid: true,
50
+ data: {
51
+ index,
52
+ duplicates: opts.options.duplicates,
53
+ value: null
54
+ }
55
+ });
56
+
57
+ export const defaultIDD = index =>
58
+ Inline.create({
59
+ object: 'inline',
60
+ type: 'inline_dropdown',
61
+ isVoid: true,
62
+ data: {
63
+ index
64
+ }
65
+ });
66
+
67
+ export const getDefaultElement = (opts, index) => {
68
+ switch (opts.type) {
69
+ case 'explicit-constructed-response':
70
+ return defaultECR(index);
71
+ case 'drag-in-the-blank':
72
+ return defaultDIB(opts, index);
73
+ default:
74
+ // inline-dropdown
75
+ return defaultIDD(index);
76
+ }
77
+ };
@@ -0,0 +1,59 @@
1
+ import React from 'react';
2
+ import { withStyles } from '@material-ui/core/styles';
3
+
4
+ const styles = {
5
+ icon: {
6
+ fill: 'grey',
7
+ '&:hover': {
8
+ fill: 'black'
9
+ }
10
+ }
11
+ };
12
+
13
+ const SvgIcon = Component => {
14
+ return withStyles(styles)(props => (
15
+ <svg
16
+ xmlns="http://www.w3.org/2000/svg"
17
+ version="1.1"
18
+ width="24"
19
+ height="24"
20
+ viewBox="0 0 24 24"
21
+ >
22
+ <Component className={props.classes.icon} />
23
+ </svg>
24
+ ));
25
+ };
26
+ export const AddRow = SvgIcon(props => (
27
+ <path
28
+ {...props}
29
+ d="M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z"
30
+ />
31
+ ));
32
+
33
+ export const RemoveRow = SvgIcon(props => (
34
+ <path
35
+ {...props}
36
+ d="M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z"
37
+ />
38
+ ));
39
+
40
+ export const AddColumn = SvgIcon(props => (
41
+ <path
42
+ {...props}
43
+ d="M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z"
44
+ />
45
+ ));
46
+
47
+ export const RemoveColumn = SvgIcon(props => (
48
+ <path
49
+ {...props}
50
+ d="M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z"
51
+ />
52
+ ));
53
+
54
+ export const RemoveTable = SvgIcon(props => (
55
+ <path
56
+ {...props}
57
+ d="M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z"
58
+ />
59
+ ));
@@ -0,0 +1,439 @@
1
+ import React from 'react';
2
+ import EditTable from 'slate-edit-table';
3
+ import { Block } from 'slate';
4
+ import debug from 'debug';
5
+ import GridOn from '@material-ui/icons/GridOn';
6
+ import TableToolbar from './table-toolbar';
7
+ import PropTypes from 'prop-types';
8
+ import SlatePropTypes from 'slate-prop-types';
9
+ import { withStyles } from '@material-ui/core/styles';
10
+ import convert from 'react-attr-converter';
11
+ import { object as toStyleObject } from 'to-style';
12
+
13
+ const log = debug('@pie-lib:editable-html:plugins:table');
14
+
15
+ const Table = withStyles(() => ({
16
+ table: {}
17
+ }))(props => {
18
+ const nodeAttributes = dataToAttributes(props.node.data);
19
+
20
+ return (
21
+ <table
22
+ className={props.classes.table}
23
+ {...props.attributes}
24
+ {...nodeAttributes}
25
+ onFocus={props.onFocus}
26
+ onBlur={props.onBlur}
27
+ >
28
+ <tbody>{props.children}</tbody>
29
+ </table>
30
+ );
31
+ });
32
+
33
+ Table.propTypes = {
34
+ attributes: PropTypes.object,
35
+ onFocus: PropTypes.func,
36
+ onBlur: PropTypes.func,
37
+ node: SlatePropTypes.node,
38
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
39
+ };
40
+
41
+ const TableRow = props => <tr {...props.attributes}>{props.children}</tr>;
42
+
43
+ TableRow.propTypes = {
44
+ attributes: PropTypes.object,
45
+ onFocus: PropTypes.func,
46
+ onBlur: PropTypes.func,
47
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
48
+ };
49
+
50
+ const TableCell = withStyles(() => ({
51
+ td: {
52
+ minWidth: '25px'
53
+ }
54
+ }))(props => {
55
+ const Tag = props.node.data.get('header') ? 'th' : 'td';
56
+
57
+ const nodeAttributes = dataToAttributes(props.node.data);
58
+ delete nodeAttributes.header;
59
+
60
+ return (
61
+ <Tag
62
+ {...props.attributes}
63
+ {...nodeAttributes}
64
+ colSpan={props.node.data.get('colspan')}
65
+ className={props.classes[Tag]}
66
+ onFocus={props.onFocus}
67
+ onBlur={props.onBlur}
68
+ >
69
+ {props.children}
70
+ </Tag>
71
+ );
72
+ });
73
+
74
+ TableCell.propTypes = {
75
+ attributes: PropTypes.object,
76
+ onFocus: PropTypes.func,
77
+ onBlur: PropTypes.func,
78
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
79
+ };
80
+
81
+ export const moveFocusToBeginningOfTable = change => {
82
+ const addedTable = change.value.document.findDescendant(
83
+ d => !!d.data && !!d.data.get('newTable')
84
+ );
85
+
86
+ if (!addedTable) {
87
+ return;
88
+ }
89
+
90
+ change.collapseToStartOf(addedTable);
91
+
92
+ const update = addedTable.data.remove('newTable');
93
+
94
+ change.setNodeByKey(addedTable.key, { data: update });
95
+ };
96
+
97
+ export default (opts, toolbarPlugins /* : {toolbar: {}}[] */) => {
98
+ const core = EditTable({
99
+ typeContent: 'div'
100
+ });
101
+
102
+ // fix outdated schema
103
+
104
+ if (core.schema && core.schema.blocks) {
105
+ Object.keys(core.schema.blocks).forEach(key => {
106
+ const block = core.schema.blocks[key];
107
+
108
+ if (block.parent) {
109
+ if (block.nodes[0].types) {
110
+ block.nodes[0] = {
111
+ type: block.nodes[0].types[0]
112
+ };
113
+ }
114
+
115
+ if (block.nodes[0].objects) {
116
+ block.nodes[0] = {
117
+ object: block.nodes[0].objects[0]
118
+ };
119
+ }
120
+
121
+ block.parent = {
122
+ type: block.parent.types[0]
123
+ };
124
+ } else {
125
+ block.nodes[0] = { type: block.nodes[0].types[0] };
126
+ }
127
+ });
128
+ }
129
+
130
+ core.utils.getTableBlock = (containerNode, key) => {
131
+ const node = containerNode.getDescendant(key);
132
+ const ancestors = containerNode.getAncestors(key).push(node);
133
+ return ancestors.findLast(p => p.type === 'table');
134
+ };
135
+
136
+ core.utils.createTableWithOptions = (row, columns, extra) => {
137
+ const createdTable = core.utils.createTable(row, columns);
138
+ const newTable = Block.create({
139
+ ...createdTable.toJSON(),
140
+ ...extra
141
+ });
142
+
143
+ return newTable;
144
+ };
145
+
146
+ core.toolbar = {
147
+ icon: <GridOn />,
148
+ onClick: (value, onChange) => {
149
+ log('insert table');
150
+ const change = value.change();
151
+ const newTable = core.utils.createTableWithOptions(2, 2, {
152
+ data: {
153
+ border: '1',
154
+ newTable: true
155
+ }
156
+ });
157
+
158
+ change.insertBlock(newTable);
159
+
160
+ moveFocusToBeginningOfTable(change);
161
+ onChange(change);
162
+ },
163
+ supports: (node, value) =>
164
+ node && node.object === 'block' && core.utils.isSelectionInTable(value),
165
+ /**
166
+ * Note - the node may not be a table node - it may be a node inside a table.
167
+ */
168
+ customToolbar: (node, value, onToolbarDone) => {
169
+ log('[customToolbar] node.data: ', node.data);
170
+
171
+ const tableBlock = core.utils.getTableBlock(value.document, node?.key);
172
+ log('[customToolbar] tableBlock: ', tableBlock);
173
+
174
+ const hasBorder = () =>
175
+ tableBlock.data.get('border') && tableBlock.data.get('border') !== '0';
176
+ const addRow = () => {
177
+ const change = core.changes.insertRow(value.change());
178
+ onToolbarDone(change, false);
179
+ };
180
+
181
+ const addColumn = () => {
182
+ const change = core.changes.insertColumn(value.change());
183
+ onToolbarDone(change, false);
184
+ };
185
+
186
+ const removeRow = () => {
187
+ const change = core.changes.removeRow(value.change());
188
+ onToolbarDone(change, false);
189
+ };
190
+
191
+ const removeColumn = () => {
192
+ const change = core.changes.removeColumn(value.change());
193
+ onToolbarDone(change, false);
194
+ };
195
+
196
+ const removeTable = () => {
197
+ const change = core.changes.removeTable(value.change());
198
+ onToolbarDone(change, false);
199
+ };
200
+
201
+ const toggleBorder = () => {
202
+ const { data } = tableBlock;
203
+ const update = data.set('border', hasBorder() ? '0' : '1');
204
+ log('[toggleBorder] update: ', update);
205
+ const change = value.change().setNodeByKey(tableBlock.key, { data: update });
206
+ onToolbarDone(change, false);
207
+ };
208
+
209
+ const onDone = () => {
210
+ log('[onDone] call onToolbarDone...');
211
+ onToolbarDone(null, true);
212
+ };
213
+
214
+ const Tb = () => (
215
+ <TableToolbar
216
+ plugins={toolbarPlugins}
217
+ onChange={c => onToolbarDone(c, false)}
218
+ value={value}
219
+ onAddRow={addRow}
220
+ onRemoveRow={removeRow}
221
+ onAddColumn={addColumn}
222
+ onRemoveColumn={removeColumn}
223
+ onRemoveTable={removeTable}
224
+ hasBorder={hasBorder()}
225
+ onToggleBorder={toggleBorder}
226
+ onDone={onDone}
227
+ />
228
+ );
229
+ return Tb;
230
+ }
231
+ };
232
+
233
+ const Node = props => {
234
+ switch (props.node.type) {
235
+ case 'table':
236
+ return <Table {...props} onFocus={opts.onFocus} onBlur={opts.onBlur} />;
237
+ case 'table_row':
238
+ return <TableRow {...props} />;
239
+ case 'table_cell':
240
+ return <TableCell {...props} onFocus={opts.onFocus} onBlur={opts.onBlur} />;
241
+ default:
242
+ return null;
243
+ }
244
+ };
245
+ Node.propTypes = {
246
+ node: PropTypes.object
247
+ };
248
+
249
+ core.normalizeNode = node => {
250
+ if (node.object !== 'document') {
251
+ return;
252
+ }
253
+
254
+ const tableAdded = node.findDescendant(d => d.data && d.data.get('newTable'));
255
+
256
+ if (!tableAdded) {
257
+ return;
258
+ }
259
+
260
+ const nodeToSearch = node.getParent(tableAdded.key) || node;
261
+ let shouldAddTextAfterNode = false;
262
+ const indexToNotHaveTableOn = nodeToSearch.nodes.size - 1;
263
+ const indexOfLastTable = nodeToSearch.nodes.findLastIndex(d => d.type === 'table');
264
+
265
+ // if the last table in the document is of type table, we need to do the change
266
+ if (indexOfLastTable === indexToNotHaveTableOn) {
267
+ shouldAddTextAfterNode = true;
268
+ }
269
+
270
+ if (!shouldAddTextAfterNode) {
271
+ return;
272
+ }
273
+
274
+ return change => {
275
+ if (shouldAddTextAfterNode) {
276
+ const tableJSON = tableAdded.toJSON();
277
+
278
+ // we remove the table node because otherwise we can't add the empty block after it
279
+ // we need a block that contains text in order to do it
280
+ change.removeNodeByKey(tableAdded.key);
281
+
282
+ const newBlock = Block.create({
283
+ object: 'block',
284
+ type: 'div'
285
+ });
286
+
287
+ // we add an empty block but that it's going to be normalized
288
+ // because it will add the empty text to it like it should
289
+ change.insertBlock(newBlock);
290
+
291
+ change.withoutNormalization(() => {
292
+ // we do these changes without normalization
293
+
294
+ // we get the text previous to the new block added
295
+ const prevText = change.value.document.getPreviousText(newBlock.key);
296
+
297
+ if (prevText) {
298
+ // we move focus to the previous text
299
+ change
300
+ .moveFocusTo(prevText.key, prevText.text?.length)
301
+ .moveAnchorTo(prevText.key, prevText.text?.length);
302
+ }
303
+
304
+ // we insert the table block between the first block with text and the last block with text
305
+ change.insertBlock({
306
+ ...tableJSON,
307
+ data: {
308
+ ...tableJSON.data,
309
+ newTable: true
310
+ }
311
+ });
312
+
313
+ moveFocusToBeginningOfTable(change);
314
+ });
315
+ }
316
+ };
317
+ };
318
+
319
+ core.renderNode = Node;
320
+
321
+ return core;
322
+ };
323
+
324
+ export const parseStyleString = s => {
325
+ const regex = /([\w-]*)\s*:\s*([^;]*)/g;
326
+ let match;
327
+ const result = {};
328
+ while ((match = regex.exec(s))) {
329
+ result[match[1]] = match[2].trim();
330
+ }
331
+ return result;
332
+ };
333
+
334
+ export const reactAttributes = o => toStyleObject(o, { camelize: true, addUnits: false });
335
+
336
+ const attributesToMap = el => (acc, attribute) => {
337
+ const value = el.getAttribute(attribute);
338
+ if (value) {
339
+ if (attribute === 'style') {
340
+ const styleString = el.getAttribute(attribute);
341
+ const reactStyleObject = reactAttributes(parseStyleString(styleString));
342
+ acc['style'] = reactStyleObject;
343
+ } else {
344
+ acc[attribute] = el.getAttribute(attribute);
345
+ }
346
+ }
347
+ return acc;
348
+ };
349
+
350
+ const dataToAttributes = data => {
351
+ if (!data || !data.get) {
352
+ return {};
353
+ }
354
+
355
+ return data.reduce((acc, v, name) => {
356
+ if (v) {
357
+ acc[convert(name)] = v;
358
+ }
359
+ return acc;
360
+ }, {});
361
+ };
362
+
363
+ const attributes = ['border', 'cellpadding', 'cellspacing', 'class', 'style'];
364
+
365
+ const cellAttributes = ['colspan', 'rowspan', 'class', 'style'];
366
+
367
+ export const serialization = {
368
+ deserialize(el, next) {
369
+ const tag = el.tagName.toLowerCase();
370
+
371
+ switch (tag) {
372
+ case 'table': {
373
+ const children =
374
+ el.children.length === 1 && el.children[0].tagName.toLowerCase() === 'tbody'
375
+ ? el.children[0].children
376
+ : el.children;
377
+ const c = Array.from(children);
378
+
379
+ return {
380
+ object: 'block',
381
+ type: 'table',
382
+ nodes: next(c),
383
+ data: attributes.reduce(attributesToMap(el), {})
384
+ };
385
+ }
386
+ case 'th': {
387
+ return {
388
+ object: 'block',
389
+ type: 'table_cell',
390
+ nodes: next(el.childNodes),
391
+ data: cellAttributes.reduce(attributesToMap(el), { header: true })
392
+ };
393
+ }
394
+ case 'tr': {
395
+ return {
396
+ object: 'block',
397
+ type: 'table_row',
398
+ nodes: next(Array.from(el.children))
399
+ };
400
+ }
401
+ case 'td': {
402
+ return {
403
+ object: 'block',
404
+ type: 'table_cell',
405
+ nodes: next(Array.from(el.childNodes)),
406
+ data: cellAttributes.reduce(attributesToMap(el), { header: false })
407
+ };
408
+ }
409
+ }
410
+ },
411
+ serialize(object, children) {
412
+ if (object.object !== 'block') {
413
+ return;
414
+ }
415
+
416
+ switch (object.type) {
417
+ case 'table': {
418
+ const attributes = dataToAttributes(object.data);
419
+ return (
420
+ <table {...attributes}>
421
+ <tbody>{children}</tbody>
422
+ </table>
423
+ );
424
+ }
425
+ case 'table_row': {
426
+ return <tr>{children}</tr>;
427
+ }
428
+ case 'table_cell': {
429
+ const attributes = dataToAttributes(object.data);
430
+ delete attributes.header;
431
+ if (object.data.get('header')) {
432
+ return <th {...attributes}>{children}</th>;
433
+ } else {
434
+ return <td {...attributes}>{children}</td>;
435
+ }
436
+ }
437
+ }
438
+ }
439
+ };