@pie-element/ebsr 6.6.3-next.1131 → 6.6.3-next.1199

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/package.json +1 -1
  2. package/package.json +3 -3
  3. package/configure/node_modules/@pie-lib/config-ui/CHANGELOG.json +0 -1677
  4. package/configure/node_modules/@pie-lib/config-ui/CHANGELOG.md +0 -1743
  5. package/configure/node_modules/@pie-lib/config-ui/LICENSE.md +0 -5
  6. package/configure/node_modules/@pie-lib/config-ui/README.md +0 -12
  7. package/configure/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +0 -44
  8. package/configure/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +0 -1
  9. package/configure/node_modules/@pie-lib/config-ui/lib/checkbox.js +0 -86
  10. package/configure/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +0 -1
  11. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +0 -164
  12. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +0 -1
  13. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +0 -398
  14. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +0 -1
  15. package/configure/node_modules/@pie-lib/config-ui/lib/choice-utils.js +0 -54
  16. package/configure/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +0 -1
  17. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +0 -185
  18. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +0 -1
  19. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +0 -75
  20. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +0 -1
  21. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +0 -178
  22. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +0 -1
  23. package/configure/node_modules/@pie-lib/config-ui/lib/form-section.js +0 -46
  24. package/configure/node_modules/@pie-lib/config-ui/lib/form-section.js.map +0 -1
  25. package/configure/node_modules/@pie-lib/config-ui/lib/help.js +0 -145
  26. package/configure/node_modules/@pie-lib/config-ui/lib/help.js.map +0 -1
  27. package/configure/node_modules/@pie-lib/config-ui/lib/index.js +0 -216
  28. package/configure/node_modules/@pie-lib/config-ui/lib/index.js.map +0 -1
  29. package/configure/node_modules/@pie-lib/config-ui/lib/input.js +0 -139
  30. package/configure/node_modules/@pie-lib/config-ui/lib/input.js.map +0 -1
  31. package/configure/node_modules/@pie-lib/config-ui/lib/inputs.js +0 -131
  32. package/configure/node_modules/@pie-lib/config-ui/lib/inputs.js.map +0 -1
  33. package/configure/node_modules/@pie-lib/config-ui/lib/langs.js +0 -179
  34. package/configure/node_modules/@pie-lib/config-ui/lib/langs.js.map +0 -1
  35. package/configure/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +0 -101
  36. package/configure/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +0 -1
  37. package/configure/node_modules/@pie-lib/config-ui/lib/layout/index.js +0 -24
  38. package/configure/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +0 -1
  39. package/configure/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +0 -105
  40. package/configure/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +0 -1
  41. package/configure/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +0 -87
  42. package/configure/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +0 -1
  43. package/configure/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +0 -79
  44. package/configure/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +0 -1
  45. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +0 -364
  46. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +0 -1
  47. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field.js +0 -265
  48. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +0 -1
  49. package/configure/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +0 -41
  50. package/configure/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +0 -1
  51. package/configure/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +0 -77
  52. package/configure/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +0 -1
  53. package/configure/node_modules/@pie-lib/config-ui/lib/settings/index.js +0 -130
  54. package/configure/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +0 -1
  55. package/configure/node_modules/@pie-lib/config-ui/lib/settings/panel.js +0 -412
  56. package/configure/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +0 -1
  57. package/configure/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +0 -43
  58. package/configure/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +0 -1
  59. package/configure/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +0 -56
  60. package/configure/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +0 -1
  61. package/configure/node_modules/@pie-lib/config-ui/lib/tabs/index.js +0 -106
  62. package/configure/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +0 -1
  63. package/configure/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +0 -198
  64. package/configure/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +0 -1
  65. package/configure/node_modules/@pie-lib/config-ui/lib/two-choice.js +0 -180
  66. package/configure/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +0 -1
  67. package/configure/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +0 -84
  68. package/configure/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +0 -1
  69. package/configure/node_modules/@pie-lib/config-ui/package.json +0 -30
  70. package/configure/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +0 -43
  71. package/configure/node_modules/@pie-lib/config-ui/src/checkbox.jsx +0 -63
  72. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +0 -103
  73. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +0 -319
  74. package/configure/node_modules/@pie-lib/config-ui/src/choice-utils.js +0 -30
  75. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +0 -116
  76. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +0 -54
  77. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +0 -98
  78. package/configure/node_modules/@pie-lib/config-ui/src/form-section.jsx +0 -23
  79. package/configure/node_modules/@pie-lib/config-ui/src/help.jsx +0 -88
  80. package/configure/node_modules/@pie-lib/config-ui/src/index.js +0 -58
  81. package/configure/node_modules/@pie-lib/config-ui/src/input.jsx +0 -72
  82. package/configure/node_modules/@pie-lib/config-ui/src/inputs.jsx +0 -96
  83. package/configure/node_modules/@pie-lib/config-ui/src/langs.jsx +0 -122
  84. package/configure/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +0 -64
  85. package/configure/node_modules/@pie-lib/config-ui/src/layout/index.js +0 -4
  86. package/configure/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +0 -60
  87. package/configure/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +0 -31
  88. package/configure/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +0 -64
  89. package/configure/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +0 -276
  90. package/configure/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +0 -196
  91. package/configure/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +0 -18
  92. package/configure/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +0 -52
  93. package/configure/node_modules/@pie-lib/config-ui/src/settings/index.js +0 -75
  94. package/configure/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +0 -297
  95. package/configure/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +0 -20
  96. package/configure/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +0 -31
  97. package/configure/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +0 -51
  98. package/configure/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +0 -121
  99. package/configure/node_modules/@pie-lib/config-ui/src/two-choice.jsx +0 -94
  100. package/configure/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +0 -36
  101. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +0 -3327
  102. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +0 -1759
  103. package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +0 -5
  104. package/configure/node_modules/@pie-lib/editable-html/README.md +0 -45
  105. package/configure/node_modules/@pie-lib/editable-html/deploy.sh +0 -16
  106. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +0 -893
  107. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +0 -1
  108. package/configure/node_modules/@pie-lib/editable-html/lib/index.js +0 -226
  109. package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +0 -1
  110. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +0 -16
  111. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +0 -1
  112. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js +0 -70
  113. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js.map +0 -1
  114. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js +0 -266
  115. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js.map +0 -1
  116. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js +0 -382
  117. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js.map +0 -1
  118. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/alt-dialog.js +0 -119
  119. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/alt-dialog.js.map +0 -1
  120. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +0 -424
  121. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +0 -1
  122. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +0 -175
  123. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +0 -1
  124. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +0 -261
  125. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +0 -1
  126. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +0 -135
  127. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +0 -1
  128. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +0 -141
  129. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +0 -1
  130. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +0 -204
  131. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +0 -1
  132. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +0 -347
  133. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +0 -1
  134. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +0 -339
  135. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +0 -1
  136. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +0 -434
  137. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +0 -1
  138. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +0 -99
  139. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +0 -1
  140. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +0 -93
  141. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +0 -1
  142. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +0 -251
  143. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +0 -1
  144. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +0 -97
  145. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +0 -1
  146. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +0 -54
  147. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +0 -1
  148. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +0 -93
  149. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +0 -1
  150. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +0 -293
  151. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +0 -1
  152. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +0 -70
  153. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +0 -1
  154. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +0 -110
  155. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +0 -1
  156. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +0 -69
  157. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +0 -1
  158. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +0 -499
  159. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +0 -1
  160. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +0 -158
  161. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +0 -1
  162. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +0 -132
  163. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +0 -1
  164. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +0 -50
  165. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +0 -1
  166. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +0 -263
  167. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +0 -1
  168. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +0 -32
  169. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +0 -1
  170. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +0 -161
  171. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +0 -1
  172. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +0 -346
  173. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +0 -1
  174. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +0 -62
  175. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +0 -1
  176. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +0 -428
  177. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +0 -1
  178. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +0 -9
  179. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +0 -1
  180. package/configure/node_modules/@pie-lib/editable-html/package.json +0 -52
  181. package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +0 -59
  182. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +0 -24
  183. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +0 -83
  184. package/configure/node_modules/@pie-lib/editable-html/playground/index.html +0 -27
  185. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +0 -25
  186. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +0 -151
  187. package/configure/node_modules/@pie-lib/editable-html/playground/package.json +0 -15
  188. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +0 -26
  189. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +0 -30
  190. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +0 -29
  191. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +0 -40
  192. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +0 -23
  193. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +0 -96
  194. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +0 -29
  195. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +0 -40
  196. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +0 -24
  197. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +0 -12
  198. package/configure/node_modules/@pie-lib/editable-html/playground/static.json +0 -3
  199. package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +0 -67
  200. package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +0 -42
  201. package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +0 -749
  202. package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +0 -145
  203. package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +0 -8
  204. package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +0 -27
  205. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/custom-popover.js +0 -45
  206. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/index.jsx +0 -244
  207. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/utils.js +0 -448
  208. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/alt-dialog.jsx +0 -69
  209. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +0 -349
  210. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +0 -108
  211. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +0 -218
  212. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +0 -93
  213. package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +0 -115
  214. package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +0 -175
  215. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +0 -283
  216. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +0 -284
  217. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +0 -372
  218. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +0 -53
  219. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +0 -43
  220. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +0 -187
  221. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +0 -78
  222. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +0 -45
  223. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +0 -68
  224. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +0 -263
  225. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +0 -63
  226. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +0 -77
  227. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +0 -59
  228. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +0 -439
  229. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +0 -104
  230. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +0 -111
  231. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +0 -36
  232. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +0 -225
  233. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +0 -21
  234. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +0 -97
  235. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +0 -323
  236. package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +0 -32
  237. package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +0 -385
  238. package/configure/node_modules/@pie-lib/editable-html/src/theme.js +0 -1
  239. package/configure/node_modules/@pie-lib/editable-html/static.json +0 -1
@@ -1,62 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.hasNode = exports.hasMark = exports.hasBlock = exports.findSingleNode = exports.findParentNode = void 0;
7
-
8
- var findSingleNode = function findSingleNode(value) {
9
- if (!value || !value.isCollapsed || !value.startKey) {
10
- return;
11
- }
12
-
13
- var inline = value.document.getClosestInline(value.startKey);
14
-
15
- if (inline) {
16
- return inline;
17
- }
18
-
19
- var block = value.document.getClosestBlock(value.startKey);
20
-
21
- if (block) {
22
- return block;
23
- }
24
- };
25
-
26
- exports.findSingleNode = findSingleNode;
27
-
28
- var findParentNode = function findParentNode(value, node) {
29
- if (!value || !node) {
30
- return;
31
- }
32
-
33
- return value.document.getParent(node.key);
34
- };
35
-
36
- exports.findParentNode = findParentNode;
37
-
38
- var hasMark = function hasMark(value, type) {
39
- return value && value.marks.some(function (mark) {
40
- return mark.type == type;
41
- });
42
- };
43
-
44
- exports.hasMark = hasMark;
45
-
46
- var hasBlock = function hasBlock(value, type) {
47
- return value && value.blocks.some(function (node) {
48
- return node.type == type;
49
- });
50
- };
51
-
52
- exports.hasBlock = hasBlock;
53
-
54
- var hasNode = function hasNode(_ref, type) {
55
- var document = _ref.document;
56
- return document && document.nodes.some(function (node) {
57
- return node.type == type;
58
- });
59
- };
60
-
61
- exports.hasNode = hasNode;
62
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/plugins/utils.js"],"names":["findSingleNode","value","isCollapsed","startKey","inline","document","getClosestInline","block","getClosestBlock","findParentNode","node","getParent","key","hasMark","type","marks","some","mark","hasBlock","blocks","hasNode","nodes"],"mappings":";;;;;;;AAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAAAC,KAAK,EAAI;AACrC,MAAI,CAACA,KAAD,IAAU,CAACA,KAAK,CAACC,WAAjB,IAAgC,CAACD,KAAK,CAACE,QAA3C,EAAqD;AACnD;AACD;;AAED,MAAMC,MAAM,GAAGH,KAAK,CAACI,QAAN,CAAeC,gBAAf,CAAgCL,KAAK,CAACE,QAAtC,CAAf;;AAEA,MAAIC,MAAJ,EAAY;AACV,WAAOA,MAAP;AACD;;AAED,MAAMG,KAAK,GAAGN,KAAK,CAACI,QAAN,CAAeG,eAAf,CAA+BP,KAAK,CAACE,QAArC,CAAd;;AAEA,MAAII,KAAJ,EAAW;AACT,WAAOA,KAAP;AACD;AACF,CAhBM;;;;AAkBA,IAAME,cAAc,GAAG,SAAjBA,cAAiB,CAACR,KAAD,EAAQS,IAAR,EAAiB;AAC7C,MAAI,CAACT,KAAD,IAAU,CAACS,IAAf,EAAqB;AACnB;AACD;;AAED,SAAOT,KAAK,CAACI,QAAN,CAAeM,SAAf,CAAyBD,IAAI,CAACE,GAA9B,CAAP;AACD,CANM;;;;AAQA,IAAMC,OAAO,GAAG,SAAVA,OAAU,CAACZ,KAAD,EAAQa,IAAR;AAAA,SAAiBb,KAAK,IAAIA,KAAK,CAACc,KAAN,CAAYC,IAAZ,CAAiB,UAAAC,IAAI;AAAA,WAAIA,IAAI,CAACH,IAAL,IAAaA,IAAjB;AAAA,GAArB,CAA1B;AAAA,CAAhB;;;;AAEA,IAAMI,QAAQ,GAAG,SAAXA,QAAW,CAACjB,KAAD,EAAQa,IAAR;AAAA,SAAiBb,KAAK,IAAIA,KAAK,CAACkB,MAAN,CAAaH,IAAb,CAAkB,UAAAN,IAAI;AAAA,WAAIA,IAAI,CAACI,IAAL,IAAaA,IAAjB;AAAA,GAAtB,CAA1B;AAAA,CAAjB;;;;AAEA,IAAMM,OAAO,GAAG,SAAVA,OAAU,OAAeN,IAAf;AAAA,MAAGT,QAAH,QAAGA,QAAH;AAAA,SACrBA,QAAQ,IAAIA,QAAQ,CAACgB,KAAT,CAAeL,IAAf,CAAoB,UAAAN,IAAI;AAAA,WAAIA,IAAI,CAACI,IAAL,IAAaA,IAAjB;AAAA,GAAxB,CADS;AAAA,CAAhB","sourcesContent":["export const findSingleNode = value => {\n if (!value || !value.isCollapsed || !value.startKey) {\n return;\n }\n\n const inline = value.document.getClosestInline(value.startKey);\n\n if (inline) {\n return inline;\n }\n\n const block = value.document.getClosestBlock(value.startKey);\n\n if (block) {\n return block;\n }\n};\n\nexport const findParentNode = (value, node) => {\n if (!value || !node) {\n return;\n }\n\n return value.document.getParent(node.key);\n};\n\nexport const hasMark = (value, type) => value && value.marks.some(mark => mark.type == type);\n\nexport const hasBlock = (value, type) => value && value.blocks.some(node => node.type == type);\n\nexport const hasNode = ({ document }, type) =>\n document && document.nodes.some(node => node.type == type);\n"],"file":"utils.js"}
@@ -1,428 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.valueToHtml = exports.reactAttributes = exports.parseStyleString = exports.htmlToValue = exports.getBase64 = exports.TEXT_RULE = exports.BLOCK_TAGS = void 0;
9
-
10
- var _slateHtmlSerializer = _interopRequireDefault(require("slate-html-serializer"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _debug = _interopRequireDefault(require("debug"));
15
-
16
- var _toStyle = require("to-style");
17
-
18
- var _image = require("./plugins/image");
19
-
20
- var _math = require("./plugins/math");
21
-
22
- var _media = require("./plugins/media");
23
-
24
- var _list = require("./plugins/list");
25
-
26
- var _table = require("./plugins/table");
27
-
28
- var _respArea = require("./plugins/respArea");
29
-
30
- var _slate = require("slate");
31
-
32
- var log = (0, _debug["default"])('@pie-lib:editable-html:serialization');
33
- /**
34
- * Tags to blocks.
35
- *
36
- * @type {Object}
37
- */
38
-
39
- var BLOCK_TAGS = {
40
- div: 'div',
41
- span: 'span',
42
- p: 'paragraph',
43
- blockquote: 'quote',
44
- pre: 'code',
45
- h1: 'heading-one',
46
- h2: 'heading-two',
47
- h3: 'heading-three',
48
- h4: 'heading-four',
49
- h5: 'heading-five',
50
- h6: 'heading-six'
51
- };
52
- /**
53
- * Tags to marks.
54
- *
55
- * @type {Object}
56
- */
57
-
58
- exports.BLOCK_TAGS = BLOCK_TAGS;
59
- var MARK_TAGS = {
60
- b: 'bold',
61
- em: 'italic',
62
- u: 'underline',
63
- s: 'strikethrough',
64
- code: 'code',
65
- strong: 'bold'
66
- };
67
-
68
- var parseStyleString = function parseStyleString(s) {
69
- var regex = /([\w-]*)\s*:\s*([^;]*)/g;
70
- var match;
71
- var result = {};
72
-
73
- while (match = regex.exec(s)) {
74
- result[match[1]] = match[2].trim();
75
- }
76
-
77
- return result;
78
- };
79
-
80
- exports.parseStyleString = parseStyleString;
81
-
82
- var getBase64 = function getBase64(file) {
83
- return new Promise(function (resolve, reject) {
84
- var reader = new FileReader();
85
- reader.readAsDataURL(file);
86
-
87
- reader.onload = function () {
88
- return resolve(reader.result);
89
- };
90
-
91
- reader.onerror = function (error) {
92
- return reject(error);
93
- };
94
- });
95
- };
96
-
97
- exports.getBase64 = getBase64;
98
-
99
- var reactAttributes = function reactAttributes(o) {
100
- return (0, _toStyle.object)(o, {
101
- camelize: true,
102
- addUnits: false
103
- });
104
- };
105
-
106
- exports.reactAttributes = reactAttributes;
107
-
108
- var attributesToMap = function attributesToMap(el) {
109
- return function (acc, attribute) {
110
- var value = el.getAttribute(attribute);
111
-
112
- if (value) {
113
- if (attribute === 'style') {
114
- var styleString = el.getAttribute(attribute);
115
- var reactStyleObject = reactAttributes(parseStyleString(styleString));
116
- acc['style'] = reactStyleObject;
117
- } else {
118
- acc[attribute] = el.getAttribute(attribute);
119
- }
120
- }
121
-
122
- return acc;
123
- };
124
- };
125
-
126
- var attributes = ['border', 'cellpadding', 'cellspacing', 'class', 'style'];
127
- /**
128
- * Serializer rules.
129
- *
130
- * @type {Array}
131
- */
132
-
133
- var blocks = {
134
- deserialize: function deserialize(el, next) {
135
- log('[blocks:deserialize] block: ', el);
136
- var block = BLOCK_TAGS[el.tagName.toLowerCase()];
137
- if (!block) return;
138
- log('[blocks:deserialize] block: ', block);
139
-
140
- if (el.childNodes.length === 1) {
141
- var cn = el.childNodes[0];
142
-
143
- if (cn && cn.tagName && cn.tagName.toLowerCase() === block) {
144
- log('[we have a child node of the same]...');
145
- return;
146
- }
147
- }
148
-
149
- return {
150
- object: 'block',
151
- type: block,
152
-
153
- /**
154
- * Here for rendering styles for all block elements
155
- */
156
- data: {
157
- attributes: attributes.reduce(attributesToMap(el), {})
158
- },
159
- nodes: next(el.childNodes)
160
- };
161
- },
162
- serialize: function serialize(object, children) {
163
- if (object.object !== 'block') return;
164
- var jsonData = object.data.toJSON();
165
- log('[blocks:serialize] object: ', object, children);
166
- var key;
167
-
168
- for (key in BLOCK_TAGS) {
169
- if (BLOCK_TAGS[key] === object.type) {
170
- var Tag = key;
171
- return /*#__PURE__*/_react["default"].createElement(Tag, jsonData.attributes, children);
172
- }
173
- }
174
- }
175
- };
176
- var marks = {
177
- deserialize: function deserialize(el, next) {
178
- var mark = MARK_TAGS[el.tagName.toLowerCase()];
179
- if (!mark) return;
180
- log('[deserialize] mark: ', mark);
181
- return {
182
- object: 'mark',
183
- type: mark,
184
- nodes: next(el.childNodes)
185
- };
186
- },
187
- serialize: function serialize(object, children) {
188
- if (_slate.Mark.isMark(object)) {
189
- for (var key in MARK_TAGS) {
190
- if (MARK_TAGS[key] === object.type) {
191
- var Tag = key;
192
- return /*#__PURE__*/_react["default"].createElement(Tag, null, children);
193
- }
194
- }
195
- }
196
- }
197
- };
198
-
199
- var findPreviousText = function findPreviousText(el) {
200
- if (el.nodeName === '#text') {
201
- return el;
202
- }
203
-
204
- if (el.previousSibling) {
205
- return findPreviousText(el.previousSibling);
206
- }
207
-
208
- return null;
209
- };
210
-
211
- var TEXT_RULE = {
212
- deserialize: function deserialize(el) {
213
- /**
214
- * This needs to be called on the dom element in order to merge the adjacent text nodes together
215
- * */
216
- el.normalize();
217
-
218
- if (el.tagName && el.tagName.toLowerCase() === 'br') {
219
- return {
220
- object: 'text',
221
- leaves: [{
222
- object: 'leaf',
223
- text: '\n'
224
- }]
225
- };
226
- }
227
-
228
- if (el.nodeName === '#text') {
229
- if (el.nodeValue && el.nodeValue.match(/<!--.*?-->/)) return;
230
- log('[text:deserialize] return text object..');
231
- return {
232
- object: 'text',
233
- leaves: [{
234
- object: 'leaf',
235
- text: el.nodeValue
236
- }]
237
- };
238
- }
239
- },
240
- serialize: function serialize(obj, children) {
241
- if (obj.object === 'string') {
242
- return children.split('\n').reduce(function (array, text, i) {
243
- if (i !== 0) array.push( /*#__PURE__*/_react["default"].createElement("br", null));
244
- array.push(text);
245
- return array;
246
- }, []);
247
- }
248
- }
249
- };
250
- exports.TEXT_RULE = TEXT_RULE;
251
- var RULES = [_list.serialization, _math.serialization, _media.serialization, _image.serialization, _table.serialization, _respArea.serialization, TEXT_RULE, blocks, marks];
252
-
253
- function allWhitespace(node) {
254
- // Use ECMA-262 Edition 3 String and RegExp features
255
- return !/[^\t\n\r ]/.test(node.textContent);
256
- }
257
-
258
- function defaultParseHtml(html) {
259
- if (typeof DOMParser === 'undefined') {
260
- throw new Error('The native `DOMParser` global which the `Html` serializer uses by default is not present in this environment. You must supply the `options.parseHtml` function instead.');
261
- }
262
-
263
- var parsed = new DOMParser().parseFromString(html, 'text/html');
264
- var body = parsed.body;
265
- var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);
266
- var n = textNodes.nextNode();
267
-
268
- while (n) {
269
- if (allWhitespace(n) || n.nodeValue === "\u200B") {
270
- n.parentNode.removeChild(n);
271
- }
272
-
273
- n = textNodes.nextNode();
274
- }
275
-
276
- return body;
277
- }
278
- /** If this lib is used on the server side, we need to bypass using the DOMParser - just put in a stub. */
279
-
280
-
281
- var parseHtml = typeof window === 'undefined' ? function () {
282
- return {
283
- childNodes: []
284
- };
285
- } : defaultParseHtml;
286
- var serializer = new _slateHtmlSerializer["default"]({
287
- defaultBlock: 'div',
288
- rules: RULES,
289
- parseHtml: parseHtml
290
- });
291
-
292
- var _extends = Object.assign || function (target) {
293
- for (var i = 1; i < arguments.length; i++) {
294
- var source = arguments[i];
295
-
296
- for (var key in source) {
297
- if (Object.prototype.hasOwnProperty.call(source, key)) {
298
- target[key] = source[key];
299
- }
300
- }
301
- }
302
-
303
- return target;
304
- };
305
- /**
306
- * This is needed in order to override the function that eventually leads
307
- * to the max iteration of 12, which in most cases it's not enough. The newer versions
308
- * have a different way to calculate this, but updating to a newer version of slate
309
- * requires a lot of work fixing other issues. So we just increase the rules by 1000,
310
- * which means a lot of iterations.
311
- * Below is the code that calculates the max iterations.
312
- * var max = schema.stack.plugins.length + schema.rules.length + 1;
313
- */
314
-
315
-
316
- serializer.deserialize = function deserialize(html) {
317
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
318
- var _options$toJSON = options.toJSON;
319
- var toJSON = _options$toJSON === undefined ? false : _options$toJSON;
320
- var defaultBlock = this.defaultBlock;
321
- var parseHtml = this.parseHtml;
322
- var fragment = parseHtml(html);
323
- var children = Array.from(fragment.childNodes);
324
- var nodes = this.deserializeElements(children); // COMPAT: ensure that all top-level inline nodes are wrapped into a block.
325
-
326
- nodes = nodes.reduce(function (memo, node, i, original) {
327
- if (node.object === 'block') {
328
- memo.push(node);
329
- return memo;
330
- }
331
-
332
- if (i > 0 && original[i - 1].object !== 'block') {
333
- var _block = memo[memo.length - 1];
334
-
335
- _block.nodes.push(node);
336
-
337
- return memo;
338
- }
339
-
340
- var block = _extends({
341
- object: 'block',
342
- data: {},
343
- isVoid: false
344
- }, defaultBlock, {
345
- nodes: [node]
346
- });
347
-
348
- memo.push(block);
349
- return memo;
350
- }, []);
351
-
352
- if (nodes.length === 0) {
353
- nodes = [_extends({
354
- object: 'block',
355
- data: {},
356
- isVoid: false
357
- }, defaultBlock, {
358
- nodes: [{
359
- object: 'text',
360
- leaves: [{
361
- object: 'leaf',
362
- text: '',
363
- marks: []
364
- }]
365
- }]
366
- })];
367
- }
368
-
369
- var json = {
370
- object: 'value',
371
- document: {
372
- object: 'document',
373
- data: {},
374
- nodes: nodes
375
- },
376
- schema: {
377
- rules: []
378
- }
379
- };
380
- var i;
381
-
382
- for (i = 0; i < 3000; i++) {
383
- json.schema.rules.push({
384
- match: {
385
- object: 'document'
386
- },
387
- nodes: [{
388
- match: {
389
- object: 'block'
390
- }
391
- }]
392
- });
393
- }
394
-
395
- var ret = toJSON ? json : _slate.Value.fromJSON(json);
396
-
397
- if (ret) {
398
- return ret;
399
- }
400
-
401
- return null;
402
- };
403
-
404
- var htmlToValue = function htmlToValue(html) {
405
- try {
406
- return serializer.deserialize(html);
407
- } catch (e) {
408
- console.log("Couldn't parse html: ", e);
409
- return {};
410
- }
411
- };
412
-
413
- exports.htmlToValue = htmlToValue;
414
-
415
- var valueToHtml = function valueToHtml(value) {
416
- return serializer.serialize(value);
417
- };
418
- /**
419
- *
420
- * <div><div>a</div></div> -> <div>a</div>
421
- *
422
- * <div><div>a</div><div>b</div></div> -> <div>a</div><div>b</div>
423
- * <div><div>a</div>4444<div>b</div></div> -> <div>a</div>4444<div>b</div>
424
- */
425
-
426
-
427
- exports.valueToHtml = valueToHtml;
428
- //# sourceMappingURL=serialization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/serialization.jsx"],"names":["log","BLOCK_TAGS","div","span","p","blockquote","pre","h1","h2","h3","h4","h5","h6","MARK_TAGS","b","em","u","s","code","strong","parseStyleString","regex","match","result","exec","trim","getBase64","file","Promise","resolve","reject","reader","FileReader","readAsDataURL","onload","onerror","error","reactAttributes","o","camelize","addUnits","attributesToMap","el","acc","attribute","value","getAttribute","styleString","reactStyleObject","attributes","blocks","deserialize","next","block","tagName","toLowerCase","childNodes","length","cn","object","type","data","reduce","nodes","serialize","children","jsonData","toJSON","key","Tag","marks","mark","Mark","isMark","findPreviousText","nodeName","previousSibling","TEXT_RULE","normalize","leaves","text","nodeValue","obj","split","array","i","push","RULES","listSerialization","mathSerialization","mediaSerialization","imgSerialization","tableSerialization","responseAreaSerialization","allWhitespace","node","test","textContent","defaultParseHtml","html","DOMParser","Error","parsed","parseFromString","body","textNodes","document","createTreeWalker","NodeFilter","SHOW_TEXT","n","nextNode","parentNode","removeChild","parseHtml","window","serializer","Html","defaultBlock","rules","_extends","Object","assign","target","arguments","source","prototype","hasOwnProperty","call","options","undefined","_options$toJSON","fragment","Array","from","deserializeElements","memo","original","_block","isVoid","json","schema","ret","Value","fromJSON","htmlToValue","e","console","valueToHtml"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,GAAG,GAAG,uBAAM,sCAAN,CAAZ;AAEA;AACA;AACA;AACA;AACA;;AAEO,IAAMC,UAAU,GAAG;AACxBC,EAAAA,GAAG,EAAE,KADmB;AAExBC,EAAAA,IAAI,EAAE,MAFkB;AAGxBC,EAAAA,CAAC,EAAE,WAHqB;AAIxBC,EAAAA,UAAU,EAAE,OAJY;AAKxBC,EAAAA,GAAG,EAAE,MALmB;AAMxBC,EAAAA,EAAE,EAAE,aANoB;AAOxBC,EAAAA,EAAE,EAAE,aAPoB;AAQxBC,EAAAA,EAAE,EAAE,eARoB;AASxBC,EAAAA,EAAE,EAAE,cAToB;AAUx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;;AAEA,OAAKA,CAAC,GAAG,CAAT,EAAYA,CAAC,GAAG,IAAhB,EAAsBA,CAAC,EAAvB,EAA2B;AACzBuD,IAAAA,IAAI,CAACC,MAAL,CAAYtB,KAAZ,CAAkBjC,IAAlB,CAAuB;AACrBhE,MAAAA,KAAK,EAAE;AAAEqC,QAAAA,MAAM,EAAE;AAAV,OADc;AAErBI,MAAAA,KAAK,EAAE,CAAC;AAAEzC,QAAAA,KAAK,EAAE;AAAEqC,UAAAA,MAAM,EAAE;AAAV;AAAT,OAAD;AAFc,KAAvB;AAID;;AAED,MAAMmF,GAAG,GAAG3E,MAAM,GAAGyE,IAAH,GAAUG,aAAMC,QAAN,CAAeJ,IAAf,CAA5B;;AAEA,MAAIE,GAAJ,EAAS;AACP,WAAOA,GAAP;AACD;;AAED,SAAO,IAAP;AACD,CArED;;AAuEO,IAAMG,WAAW,GAAG,SAAdA,WAAc,CAAA9C,IAAI,EAAI;AACjC,MAAI;AACF,WAAOiB,UAAU,CAACjE,WAAX,CAAuBgD,IAAvB,CAAP;AACD,GAFD,CAEE,OAAO+C,CAAP,EAAU;AACVC,IAAAA,OAAO,CAACnJ,GAAR,CAAY,uBAAZ,EAAqCkJ,CAArC;AACA,WAAO,EAAP;AACD;AACF,CAPM;;;;AASA,IAAME,WAAW,GAAG,SAAdA,WAAc,CAAAvG,KAAK;AAAA,SAAIuE,UAAU,CAACpD,SAAX,CAAqBnB,KAArB,CAAJ;AAAA,CAAzB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":["import Html from 'slate-html-serializer';\nimport React from 'react';\nimport debug from 'debug';\nimport { object as toStyleObject } from 'to-style';\n\nimport { serialization as imgSerialization } from './plugins/image';\nimport { serialization as mathSerialization } from './plugins/math';\nimport { serialization as mediaSerialization } from './plugins/media';\nimport { serialization as listSerialization } from './plugins/list';\nimport { serialization as tableSerialization } from './plugins/table';\nimport { serialization as responseAreaSerialization } from './plugins/respArea';\nimport { Mark, Value } from 'slate';\n\nconst log = debug('@pie-lib:editable-html:serialization');\n\n/**\n * Tags to blocks.\n *\n * @type {Object}\n */\n\nexport const BLOCK_TAGS = {\n div: 'div',\n span: 'span',\n p: 'paragraph',\n blockquote: 'quote',\n pre: 'code',\n h1: 'heading-one',\n h2: 'heading-two',\n h3: 'heading-three',\n h4: 'heading-four',\n h5: 'heading-five',\n h6: 'heading-six'\n};\n\n/**\n * Tags to marks.\n *\n * @type {Object}\n */\n\nconst MARK_TAGS = {\n b: 'bold',\n em: 'italic',\n u: 'underline',\n s: 'strikethrough',\n code: 'code',\n strong: 'bold'\n};\n\nexport const parseStyleString = s => {\n const regex = /([\\w-]*)\\s*:\\s*([^;]*)/g;\n let match;\n const result = {};\n while ((match = regex.exec(s))) {\n result[match[1]] = match[2].trim();\n }\n return result;\n};\n\nexport const getBase64 = file => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => resolve(reader.result);\n reader.onerror = error => reject(error);\n });\n};\n\nexport const reactAttributes = o => toStyleObject(o, { camelize: true, addUnits: false });\n\nconst attributesToMap = el => (acc, attribute) => {\n const value = el.getAttribute(attribute);\n if (value) {\n if (attribute === 'style') {\n const styleString = el.getAttribute(attribute);\n const reactStyleObject = reactAttributes(parseStyleString(styleString));\n acc['style'] = reactStyleObject;\n } else {\n acc[attribute] = el.getAttribute(attribute);\n }\n }\n return acc;\n};\n\nconst attributes = ['border', 'cellpadding', 'cellspacing', 'class', 'style'];\n\n/**\n * Serializer rules.\n *\n * @type {Array}\n */\n\nconst blocks = {\n deserialize(el, next) {\n log('[blocks:deserialize] block: ', el);\n const block = BLOCK_TAGS[el.tagName.toLowerCase()];\n if (!block) return;\n log('[blocks:deserialize] block: ', block);\n\n if (el.childNodes.length === 1) {\n const cn = el.childNodes[0];\n if (cn && cn.tagName && cn.tagName.toLowerCase() === block) {\n log('[we have a child node of the same]...');\n return;\n }\n }\n\n return {\n object: 'block',\n type: block,\n /**\n * Here for rendering styles for all block elements\n */\n data: { attributes: attributes.reduce(attributesToMap(el), {}) },\n nodes: next(el.childNodes)\n };\n },\n serialize: (object, children) => {\n if (object.object !== 'block') return;\n\n const jsonData = object.data.toJSON();\n\n log('[blocks:serialize] object: ', object, children);\n let key;\n\n for (key in BLOCK_TAGS) {\n if (BLOCK_TAGS[key] === object.type) {\n const Tag = key;\n\n return <Tag {...jsonData.attributes}>{children}</Tag>;\n }\n }\n }\n};\n\nconst marks = {\n deserialize(el, next) {\n const mark = MARK_TAGS[el.tagName.toLowerCase()];\n if (!mark) return;\n log('[deserialize] mark: ', mark);\n return {\n object: 'mark',\n type: mark,\n nodes: next(el.childNodes)\n };\n },\n serialize(object, children) {\n if (Mark.isMark(object)) {\n for (var key in MARK_TAGS) {\n if (MARK_TAGS[key] === object.type) {\n const Tag = key;\n return <Tag>{children}</Tag>;\n }\n }\n }\n }\n};\n\nconst findPreviousText = el => {\n if (el.nodeName === '#text') {\n return el;\n }\n\n if (el.previousSibling) {\n return findPreviousText(el.previousSibling);\n }\n\n return null;\n};\n\nexport const TEXT_RULE = {\n deserialize(el) {\n /**\n * This needs to be called on the dom element in order to merge the adjacent text nodes together\n * */\n el.normalize();\n\n if (el.tagName && el.tagName.toLowerCase() === 'br') {\n return {\n object: 'text',\n leaves: [\n {\n object: 'leaf',\n text: '\\n'\n }\n ]\n };\n }\n\n if (el.nodeName === '#text') {\n if (el.nodeValue && el.nodeValue.match(/<!--.*?-->/)) return;\n\n log('[text:deserialize] return text object..');\n return {\n object: 'text',\n leaves: [\n {\n object: 'leaf',\n text: el.nodeValue\n }\n ]\n };\n }\n },\n\n serialize(obj, children) {\n if (obj.object === 'string') {\n return children.split('\\n').reduce((array, text, i) => {\n if (i !== 0) array.push(<br />);\n array.push(text);\n return array;\n }, []);\n }\n }\n};\n\nconst RULES = [\n listSerialization,\n mathSerialization,\n mediaSerialization,\n imgSerialization,\n tableSerialization,\n responseAreaSerialization,\n TEXT_RULE,\n blocks,\n marks\n];\n\nfunction allWhitespace(node) {\n // Use ECMA-262 Edition 3 String and RegExp features\n return !/[^\\t\\n\\r ]/.test(node.textContent);\n}\n\nfunction defaultParseHtml(html) {\n if (typeof DOMParser === 'undefined') {\n throw new Error(\n 'The native `DOMParser` global which the `Html` serializer uses by default is not present in this environment. You must supply the `options.parseHtml` function instead.'\n );\n }\n\n const parsed = new DOMParser().parseFromString(html, 'text/html');\n\n const { body } = parsed;\n var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);\n var n = textNodes.nextNode();\n\n while (n) {\n if (allWhitespace(n) || n.nodeValue === '\\u200B') {\n n.parentNode.removeChild(n);\n }\n n = textNodes.nextNode();\n }\n\n return body;\n}\n\n/** If this lib is used on the server side, we need to bypass using the DOMParser - just put in a stub. */\nconst parseHtml =\n typeof window === 'undefined'\n ? () => ({\n childNodes: []\n })\n : defaultParseHtml;\n\nconst serializer = new Html({\n defaultBlock: 'div',\n rules: RULES,\n parseHtml\n});\n\nconst _extends =\n Object.assign ||\n function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n/**\n * This is needed in order to override the function that eventually leads\n * to the max iteration of 12, which in most cases it's not enough. The newer versions\n * have a different way to calculate this, but updating to a newer version of slate\n * requires a lot of work fixing other issues. So we just increase the rules by 1000,\n * which means a lot of iterations.\n * Below is the code that calculates the max iterations.\n * var max = schema.stack.plugins.length + schema.rules.length + 1;\n */\nserializer.deserialize = function deserialize(html) {\n const options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const _options$toJSON = options.toJSON;\n const toJSON = _options$toJSON === undefined ? false : _options$toJSON;\n const defaultBlock = this.defaultBlock;\n const parseHtml = this.parseHtml;\n\n const fragment = parseHtml(html);\n const children = Array.from(fragment.childNodes);\n let nodes = this.deserializeElements(children);\n\n // COMPAT: ensure that all top-level inline nodes are wrapped into a block.\n nodes = nodes.reduce(function(memo, node, i, original) {\n if (node.object === 'block') {\n memo.push(node);\n return memo;\n }\n\n if (i > 0 && original[i - 1].object !== 'block') {\n const _block = memo[memo.length - 1];\n\n _block.nodes.push(node);\n return memo;\n }\n\n const block = _extends({ object: 'block', data: {}, isVoid: false }, defaultBlock, {\n nodes: [node]\n });\n\n memo.push(block);\n return memo;\n }, []);\n\n if (nodes.length === 0) {\n nodes = [\n _extends({ object: 'block', data: {}, isVoid: false }, defaultBlock, {\n nodes: [{ object: 'text', leaves: [{ object: 'leaf', text: '', marks: [] }] }]\n })\n ];\n }\n\n const json = {\n object: 'value',\n document: {\n object: 'document',\n data: {},\n nodes: nodes\n },\n schema: {\n rules: []\n }\n };\n\n let i;\n\n for (i = 0; i < 3000; i++) {\n json.schema.rules.push({\n match: { object: 'document' },\n nodes: [{ match: { object: 'block' } }]\n });\n }\n\n const ret = toJSON ? json : Value.fromJSON(json);\n\n if (ret) {\n return ret;\n }\n\n return null;\n};\n\nexport const htmlToValue = html => {\n try {\n return serializer.deserialize(html);\n } catch (e) {\n console.log(\"Couldn't parse html: \", e);\n return {};\n }\n};\n\nexport const valueToHtml = value => serializer.serialize(value);\n\n/**\n *\n * <div><div>a</div></div> -> <div>a</div>\n *\n * <div><div>a</div><div>b</div></div> -> <div>a</div><div>b</div>\n * <div><div>a</div>4444<div>b</div></div> -> <div>a</div>4444<div>b</div>\n */\n"],"file":"serialization.js"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.primary = void 0;
7
- var primary = '#304ffe';
8
- exports.primary = primary;
9
- //# sourceMappingURL=theme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/theme.js"],"names":["primary"],"mappings":";;;;;;AAAO,IAAMA,OAAO,GAAG,SAAhB","sourcesContent":["export const primary = '#304ffe';\n"],"file":"theme.js"}
@@ -1,52 +0,0 @@
1
- {
2
- "name": "@pie-lib/editable-html",
3
- "version": "9.0.5",
4
- "description": "",
5
- "license": "ISC",
6
- "main": "lib/index.js",
7
- "module": "src/index.jsx",
8
- "author": "pie-framework developers",
9
- "dependencies": {
10
- "@material-ui/core": "^3.8.3",
11
- "@material-ui/icons": "^3.0.2",
12
- "@material-ui/styles": "^3.0.0-alpha.10",
13
- "@pie-lib/drag": "^1.1.52",
14
- "@pie-lib/math-rendering": "^2.4.5",
15
- "@pie-lib/math-toolbar": "^1.10.3",
16
- "@pie-lib/render-ui": "^4.13.1",
17
- "change-case": "^3.0.2",
18
- "classnames": "^2.2.6",
19
- "debug": "^4.1.1",
20
- "immutable": "^4.0.0-rc.12",
21
- "keycode": "^2.2.0",
22
- "lodash": "^4.17.11",
23
- "prop-types": "^15.6.2",
24
- "react-attr-converter": "^0.3.1",
25
- "react-jss": "^8.6.1",
26
- "react-portal": "^4.2.0",
27
- "slate": "^0.36.2",
28
- "slate-dev-environment": "^0.2.0",
29
- "slate-edit-list": "^0.11.3",
30
- "slate-edit-table": "^0.17.0",
31
- "slate-html-serializer": "^0.6.12",
32
- "slate-plain-serializer": "^0.5.26",
33
- "slate-prop-types": "^0.4.38",
34
- "slate-react": "^0.14.3",
35
- "slate-schema-violations": "^0.1.39",
36
- "slate-soft-break": "^0.8.1",
37
- "to-style": "^1.3.3"
38
- },
39
- "devDependencies": {
40
- "@pie-framework/mathquill": "^1.1.3",
41
- "react": "^16.8.1",
42
- "react-dom": "^16.9.0"
43
- },
44
- "peerDependencies": {
45
- "react": "^16.8.1"
46
- },
47
- "publishConfig": {
48
- "access": "public"
49
- },
50
- "gitHead": "45e12d524142a6576c9ebb9292de01a34e88fc03",
51
- "scripts": {}
52
- }
@@ -1,59 +0,0 @@
1
- module.exports = {
2
- document: {
3
- nodes: [
4
- {
5
- object: 'block',
6
- type: 'div',
7
- nodes: [
8
- {
9
- object: 'block',
10
- type: 'paragraph',
11
- nodes: [
12
- {
13
- object: 'text',
14
- leaves: [
15
- {
16
- text: 'foo'
17
- }
18
- ]
19
- },
20
-
21
- {
22
- object: 'inline',
23
- type: 'image',
24
- isVoid: true,
25
- data: {
26
- src:
27
- 'https://img.washingtonpost.com/wp-apps/imrs.php?src=https://img.washingtonpost.com/news/speaking-of-science/wp-content/uploads/sites/36/2015/10/as12-49-7278-1024x1024.jpg&w=1484'
28
- }
29
- },
30
-
31
- {
32
- object: 'text',
33
- leaves: [
34
- {
35
- text: 'bar'
36
- }
37
- ]
38
- }
39
- ]
40
- }
41
- ]
42
- },
43
- {
44
- object: 'block',
45
- type: 'paragraph',
46
- nodes: [
47
- {
48
- object: 'text',
49
- leaves: [
50
- {
51
- text: 'text'
52
- }
53
- ]
54
- }
55
- ]
56
- }
57
- ]
58
- }
59
- };