@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,145 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Editor, { DEFAULT_PLUGINS, ALL_PLUGINS } from './editor';
4
+ import { htmlToValue, valueToHtml } from './serialization';
5
+ import { parseDegrees } from './parse-html';
6
+ import debug from 'debug';
7
+
8
+ const log = debug('@pie-lib:editable-html');
9
+ /**
10
+ * Export lower level Editor and serialization functions.
11
+ */
12
+ export { htmlToValue, valueToHtml, Editor, DEFAULT_PLUGINS, ALL_PLUGINS };
13
+
14
+ /**
15
+ * Wrapper around the editor that exposes a `markup` and `onChange(markup:string)` api.
16
+ * Because of the mismatch between the markup and the `Value` we need to convert the incoming markup to a value and
17
+ * compare it. TODO: This is an interim fix, we'll need to strip back `Editor` and look how best to maintain the
18
+ * `markup` api whilst avoiding the serialization mismatch. We should be making better use of schemas w/ normalize.
19
+ */
20
+
21
+ const reduceMultipleBrs = markup => {
22
+ try {
23
+ return markup.replace(/(<br\s*\/?>){3,}/gi, '<br>');
24
+ } catch (e) {
25
+ console.log("Couldn't remove <br/> tags: ", e);
26
+ }
27
+
28
+ return markup;
29
+ };
30
+
31
+ export default class EditableHtml extends React.Component {
32
+ static propTypes = {
33
+ onChange: PropTypes.func.isRequired,
34
+ onDone: PropTypes.func,
35
+ markup: PropTypes.string.isRequired,
36
+ allowValidation: PropTypes.bool
37
+ };
38
+
39
+ static defaultProps = {
40
+ onDone: () => {},
41
+ allowValidation: false
42
+ };
43
+
44
+ constructor(props) {
45
+ super(props);
46
+ const v = htmlToValue(props.markup);
47
+ this.state = {
48
+ value: v
49
+ };
50
+ }
51
+
52
+ // eslint-disable-next-line react/no-deprecated
53
+ componentWillReceiveProps(props) {
54
+ if (!props.allowValidation && props.markup === this.props.markup) {
55
+ return;
56
+ }
57
+
58
+ const v = htmlToValue(reduceMultipleBrs(props.markup));
59
+ const current = htmlToValue(reduceMultipleBrs(this.props.markup));
60
+
61
+ if (v.equals && !v.equals(current)) {
62
+ this.setState({ value: v });
63
+ }
64
+ }
65
+
66
+ onChange = (value, done) => {
67
+ const html = valueToHtml(value);
68
+ const htmlParsed = parseDegrees(html);
69
+
70
+ log('value as html: ', html);
71
+
72
+ if (html !== this.props.markup) {
73
+ this.props.onChange(htmlParsed);
74
+ }
75
+
76
+ if (done) {
77
+ this.props.onDone(htmlParsed);
78
+ }
79
+ };
80
+
81
+ focus = (position, node) => {
82
+ if (this.editorRef) {
83
+ this.editorRef.change(c => {
84
+ const lastText = node
85
+ ? c.value.document.getNextText(node.key)
86
+ : c.value.document.getLastText();
87
+ const editorDOM = document.querySelector(
88
+ `[data-key="${this.editorRef.value.document.key}"]`
89
+ );
90
+
91
+ if (editorDOM !== document.activeElement) {
92
+ document.activeElement.blur();
93
+ }
94
+
95
+ c.focus();
96
+
97
+ if (position === 'end' && lastText) {
98
+ c.moveFocusTo(lastText.key, lastText.text?.length).moveAnchorTo(
99
+ lastText.key,
100
+ lastText.text?.length
101
+ );
102
+ }
103
+
104
+ if (position === 'beginning' && lastText) {
105
+ c.moveFocusTo(lastText.key, 0).moveAnchorTo(lastText.key, 0);
106
+ }
107
+ });
108
+ }
109
+ };
110
+
111
+ finishEditing = () => {
112
+ if (this.editorRef) {
113
+ this.editorRef.props.onEditingDone();
114
+ }
115
+ };
116
+
117
+ render() {
118
+ const { value } = this.state;
119
+ const { toolbarOpts, error } = this.props;
120
+
121
+ if (toolbarOpts) {
122
+ toolbarOpts.error = error;
123
+ }
124
+
125
+ const props = {
126
+ ...this.props,
127
+ markup: null,
128
+ value,
129
+ onChange: this.onChange,
130
+ focus: this.focus
131
+ };
132
+
133
+ return (
134
+ <Editor
135
+ onRef={ref => {
136
+ if (ref) {
137
+ this.rootRef = ref;
138
+ }
139
+ }}
140
+ editorRef={ref => ref && (this.editorRef = ref)}
141
+ {...props}
142
+ />
143
+ );
144
+ }
145
+ }
@@ -0,0 +1,8 @@
1
+ export const parseDegrees = html =>
2
+ html
3
+ // removes \( use case: 50°
4
+ .replace(/\\[(]/g, '')
5
+ // removes \) use case: 50°+m<1
6
+ .replace(/\\[)]/g, '')
7
+ // removes \degree use case: 50°
8
+ .replace(/\\degree/g, '&deg;');
@@ -0,0 +1,27 @@
1
+ # plugins
2
+
3
+ ## Custom toolbar
4
+
5
+ To create a custom toolbar you need to add the following methods to the toolbar object:
6
+
7
+ ```typescript
8
+ type ChangeFn = (key:string, update : object) : void;
9
+
10
+ type Toolbar = {
11
+ /**
12
+ * return true if this plugin supports this node type
13
+ */
14
+ supports : (node: Slate.Node) : Boolean;
15
+ /**
16
+ * return a React component to edit the data within the node,
17
+ * call toolbarDone to finish editing, call toolbarChange to update
18
+ * the main editor without closing editing.
19
+ */
20
+ customToolbar: (node: Slate.Node, toolbarDone : ChangeFn, toolbarChange: ChangeFn),
21
+ /**
22
+ * Takes the output of the `customToolbar#toolbarDone` call
23
+ * and passes in a value so that you can create a Slate.Change.
24
+ */
25
+ applyChange: (key: string, data: object, value: Slate.Value) : Slate.Change | undefined
26
+ }
27
+ ```
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { withStyles } from '@material-ui/core/styles';
3
+ import Popover from '@material-ui/core/Popover';
4
+ import Typography from '@material-ui/core/Typography';
5
+
6
+ const styles = () => ({
7
+ popover: {
8
+ pointerEvents: 'none',
9
+ zIndex: 99999
10
+ },
11
+ paper: {
12
+ padding: 20,
13
+ height: 'auto',
14
+ width: 'auto'
15
+ },
16
+ typography: {
17
+ fontSize: 50,
18
+ textAlign: 'center'
19
+ }
20
+ });
21
+
22
+ const CustomPopOver = withStyles(styles)(({ classes, children, ...props }) => (
23
+ <Popover
24
+ id="mouse-over-popover"
25
+ open
26
+ className={classes.popover}
27
+ classes={{
28
+ paper: classes.paper
29
+ }}
30
+ anchorOrigin={{
31
+ vertical: 'bottom',
32
+ horizontal: 'left'
33
+ }}
34
+ transformOrigin={{
35
+ vertical: 'top',
36
+ horizontal: 'left'
37
+ }}
38
+ disableRestoreFocus
39
+ {...props}
40
+ >
41
+ <Typography classes={{ root: classes.typography }}>{children}</Typography>
42
+ </Popover>
43
+ ));
44
+
45
+ export default CustomPopOver;
@@ -0,0 +1,244 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import debug from 'debug';
4
+ import get from 'lodash/get';
5
+
6
+ import { PureToolbar } from '@pie-lib/math-toolbar';
7
+
8
+ import CustomPopOver from './custom-popover';
9
+ import { insertSnackBar } from '../respArea/utils';
10
+ import { characterIcons, spanishConfig, specialConfig } from './utils';
11
+ const log = debug('@pie-lib:editable-html:plugins:characters');
12
+
13
+ const removeDialogs = () => {
14
+ const prevDialogs = document.querySelectorAll('.insert-character-dialog');
15
+
16
+ log('[characters:removeDialogs]');
17
+ prevDialogs.forEach(s => s.remove());
18
+ };
19
+
20
+ const removePopOvers = () => {
21
+ const prevPopOvers = document.querySelectorAll('#mouse-over-popover');
22
+
23
+ log('[characters:removePopOvers]');
24
+ prevPopOvers.forEach(s => s.remove());
25
+ };
26
+
27
+ const insertDialog = ({ value, callback, opts }) => {
28
+ const newEl = document.createElement('div');
29
+ const initialBodyOverflow = document.body.style.overflow;
30
+
31
+ log('[characters:insertDialog]');
32
+
33
+ removeDialogs();
34
+
35
+ newEl.className = 'insert-character-dialog';
36
+ document.body.style.overflow = 'hidden';
37
+
38
+ let configToUse;
39
+
40
+ switch (true) {
41
+ case opts.language === 'spanish':
42
+ configToUse = spanishConfig;
43
+ break;
44
+ case opts.language === 'special':
45
+ configToUse = specialConfig;
46
+ break;
47
+ default:
48
+ configToUse = opts;
49
+ }
50
+
51
+ if (!configToUse.characters) {
52
+ insertSnackBar('No characters provided or language not recognized');
53
+ return;
54
+ }
55
+
56
+ const layoutForCharacters = configToUse.characters.reduce(
57
+ (obj, arr) => {
58
+ if (arr.length >= obj.columns) {
59
+ obj.columns = arr.length;
60
+ }
61
+
62
+ return obj;
63
+ },
64
+ { rows: configToUse.characters.length, columns: 0 }
65
+ );
66
+
67
+ let popoverEl;
68
+
69
+ const closePopOver = () => {
70
+ if (popoverEl) {
71
+ popoverEl.remove();
72
+ }
73
+
74
+ removePopOvers();
75
+ };
76
+
77
+ const renderPopOver = (event, el) => {
78
+ if (!event) {
79
+ return;
80
+ }
81
+
82
+ const infoStyle = { fontSize: '20px', lineHeight: '20px' };
83
+
84
+ closePopOver();
85
+
86
+ popoverEl = document.createElement('div');
87
+ ReactDOM.render(
88
+ <CustomPopOver onClose={closePopOver} anchorEl={event.currentTarget}>
89
+ <div>{el.label}</div>
90
+
91
+ <div style={infoStyle}>{el.description}</div>
92
+
93
+ <div style={infoStyle}>{el.unicode}</div>
94
+ </CustomPopOver>,
95
+ popoverEl
96
+ );
97
+
98
+ document.body.appendChild(newEl);
99
+ };
100
+
101
+ const handleClose = () => {
102
+ newEl.remove();
103
+ closePopOver();
104
+ document.body.style.overflow = initialBodyOverflow;
105
+ callback(undefined, true);
106
+ };
107
+
108
+ const handleChange = val => {
109
+ if (typeof val === 'string') {
110
+ callback(val);
111
+ }
112
+
113
+ if (configToUse.autoClose) {
114
+ handleClose();
115
+ }
116
+ };
117
+
118
+ const el = (
119
+ <PureToolbar
120
+ autoFocus
121
+ noDecimal
122
+ hideInput
123
+ noLatexHandling
124
+ layoutForKeyPad={layoutForCharacters}
125
+ additionalKeys={configToUse.characters.reduce((arr, n) => {
126
+ arr = [
127
+ ...arr,
128
+ ...n.map(k => ({
129
+ name: get(k, 'name') || k,
130
+ write: get(k, 'write') || k,
131
+ label: get(k, 'label') || k,
132
+ category: 'character',
133
+ extraClass: 'character',
134
+ extraProps: {
135
+ ...(k.extraProps || {}),
136
+ style: {
137
+ ...(k.extraProps || {}).style,
138
+ border: '1px solid #000'
139
+ }
140
+ },
141
+ ...(configToUse.hasPreview
142
+ ? {
143
+ actions: { onMouseEnter: ev => renderPopOver(ev, k), onMouseLeave: closePopOver }
144
+ }
145
+ : {})
146
+ }))
147
+ ];
148
+
149
+ return arr;
150
+ }, [])}
151
+ keypadMode="language"
152
+ onChange={handleChange}
153
+ onDone={handleClose}
154
+ />
155
+ );
156
+
157
+ ReactDOM.render(el, newEl, () => {
158
+ const cursorItem = document.querySelector(`[data-key="${value.anchorKey}"]`);
159
+
160
+ if (cursorItem) {
161
+ const boundRect = cursorItem.getBoundingClientRect();
162
+
163
+ document.body.appendChild(newEl);
164
+ newEl.style.position = 'fixed';
165
+ newEl.style.top = `${boundRect.top - newEl.offsetHeight - 10}px`;
166
+ newEl.style.left = `${boundRect.left + cursorItem.offsetWidth + 10}px`;
167
+ newEl.style.zIndex = 99999;
168
+
169
+ let firstCallMade = false;
170
+
171
+ const listener = () => {
172
+ // this will be triggered right after setting it because
173
+ // this toolbar is added on the mousedown event
174
+ // so right after mouseup, the click will be triggered
175
+ if (firstCallMade) {
176
+ document.body.removeEventListener('click', listener);
177
+ handleClose();
178
+ } else {
179
+ firstCallMade = true;
180
+ }
181
+ };
182
+
183
+ if (configToUse.autoClose) {
184
+ document.body.addEventListener('click', listener);
185
+ }
186
+ }
187
+ });
188
+ };
189
+
190
+ const CharacterIcon = ({ letter }) => (
191
+ <div
192
+ style={{
193
+ fontSize: '25px',
194
+ lineHeight: '15px'
195
+ }}
196
+ >
197
+ {letter}
198
+ </div>
199
+ );
200
+
201
+ export default function CharactersPlugin(opts) {
202
+ removeDialogs();
203
+ return {
204
+ name: 'math',
205
+ toolbar: {
206
+ icon: <CharacterIcon letter={opts.characterIcon || characterIcons[opts.language] || 'ñ'} />,
207
+ onClick: (value, onChange) => {
208
+ let valueToUse = value;
209
+ const callback = (char, focus) => {
210
+ if (char) {
211
+ const change = valueToUse
212
+ .change()
213
+ .insertTextByKey(valueToUse.anchorKey, valueToUse.anchorOffset, char);
214
+
215
+ valueToUse = change.value;
216
+ log('[characters:insert]: ', value);
217
+ onChange(change);
218
+ }
219
+
220
+ log('[characters:click]');
221
+
222
+ if (focus) {
223
+ const editorDOM = document.querySelector(`[data-key="${valueToUse.document.key}"]`);
224
+
225
+ if (editorDOM) {
226
+ editorDOM.focus();
227
+ }
228
+ }
229
+ };
230
+
231
+ insertDialog({ value: valueToUse, callback, opts });
232
+ }
233
+ },
234
+
235
+ pluginStyles: (node, parentNode, p) => {
236
+ if (p) {
237
+ return {
238
+ position: 'absolute',
239
+ top: 'initial'
240
+ };
241
+ }
242
+ }
243
+ };
244
+ }