@pie-element/ebsr 6.6.3-next.414 → 6.6.3-next.430
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.
- package/CHANGELOG.md +25 -0
- package/configure/CHANGELOG.md +25 -0
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +17 -0
- package/controller/package.json +1 -1
- package/package.json +3 -3
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +0 -1972
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +0 -1563
- package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multiple-choice/README.md +0 -56
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +0 -1387
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +0 -1140
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +0 -103
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +0 -193
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +0 -471
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +0 -20
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +0 -527
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +0 -714
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +0 -242
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +0 -36
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +0 -15
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +0 -311
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +0 -245
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +0 -52
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +0 -7
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +0 -326
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +0 -266
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +0 -284
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +0 -174
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +0 -151
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +0 -97
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +0 -341
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +0 -35
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +0 -1677
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +0 -1498
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +0 -12
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +0 -86
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +0 -176
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +0 -391
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +0 -54
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +0 -194
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +0 -75
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +0 -184
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +0 -44
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +0 -152
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +0 -195
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +0 -144
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +0 -120
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +0 -187
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +0 -109
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +0 -24
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +0 -111
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +0 -95
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +0 -79
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +0 -274
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +0 -41
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +0 -77
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +0 -136
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +0 -422
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +0 -43
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +0 -56
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +0 -113
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +0 -206
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +0 -190
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +0 -91
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +0 -30
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +0 -63
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +0 -103
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +0 -301
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +0 -30
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +0 -116
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +0 -54
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +0 -98
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +0 -23
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +0 -88
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +0 -54
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +0 -72
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +0 -88
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +0 -122
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +0 -64
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +0 -4
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +0 -60
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +0 -31
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +0 -64
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +0 -196
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +0 -52
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +0 -75
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +0 -297
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +0 -20
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +0 -31
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +0 -51
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +0 -121
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +0 -94
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +0 -36
- package/configure/node_modules/@pie-element/multiple-choice/package.json +0 -30
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +0 -547
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +0 -513
- package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +0 -64
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +0 -81
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +0 -150
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +0 -65
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +0 -36
- package/configure/node_modules/@pie-lib/correct-answer-toggle/preview.png +0 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +0 -60
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +0 -73
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +0 -60
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +0 -3162
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +0 -1441
- package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/editable-html/README.md +0 -45
- package/configure/node_modules/@pie-lib/editable-html/deploy.sh +0 -16
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +0 -698
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js +0 -213
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +0 -16
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +0 -248
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +0 -141
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +0 -219
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +0 -141
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +0 -133
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +0 -136
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +0 -352
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +0 -338
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +0 -445
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +0 -105
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +0 -100
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +0 -229
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +0 -97
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +0 -53
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +0 -93
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +0 -277
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +0 -70
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +0 -110
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +0 -69
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +0 -443
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +0 -167
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +0 -129
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +0 -50
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +0 -263
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +0 -32
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +0 -164
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +0 -350
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +0 -62
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +0 -405
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +0 -9
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/package.json +0 -51
- package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +0 -59
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +0 -24
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +0 -83
- package/configure/node_modules/@pie-lib/editable-html/playground/index.html +0 -27
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +0 -25
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +0 -151
- package/configure/node_modules/@pie-lib/editable-html/playground/package.json +0 -15
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +0 -26
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +0 -30
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +0 -29
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +0 -40
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +0 -23
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +0 -96
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +0 -29
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +0 -40
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +0 -24
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +0 -12
- package/configure/node_modules/@pie-lib/editable-html/playground/static.json +0 -3
- package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +0 -67
- package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +0 -42
- package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +0 -584
- package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +0 -128
- package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +0 -8
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +0 -27
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +0 -166
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +0 -62
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +0 -180
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +0 -93
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +0 -112
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +0 -113
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +0 -289
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +0 -281
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +0 -372
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +0 -53
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +0 -43
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +0 -160
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +0 -78
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +0 -45
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +0 -68
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +0 -244
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +0 -63
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +0 -77
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +0 -59
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +0 -390
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +0 -104
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +0 -103
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +0 -36
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +0 -217
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +0 -21
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +0 -86
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +0 -313
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +0 -32
- package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +0 -369
- package/configure/node_modules/@pie-lib/editable-html/src/theme.js +0 -1
- package/configure/node_modules/@pie-lib/editable-html/static.json +0 -1
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +0 -1412
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +0 -874
- package/configure/node_modules/@pie-lib/math-input/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-input/README.md +0 -27
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +0 -123
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/index.js +0 -75
- package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +0 -367
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +0 -30
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +0 -41
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +0 -46
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +0 -26
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +0 -53
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +0 -16
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +0 -35
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +0 -31
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +0 -139
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +0 -198
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +0 -50
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +0 -32
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +0 -69
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +0 -38
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +0 -53
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +0 -126
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +0 -29
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +0 -200
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +0 -24
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +0 -255
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +0 -216
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/package.json +0 -26
- package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +0 -53
- package/configure/node_modules/@pie-lib/math-input/src/index.jsx +0 -27
- package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +0 -279
- package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +0 -32
- package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +0 -5
- package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +0 -27
- package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +0 -18
- package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +0 -40
- package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +0 -3
- package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +0 -27
- package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +0 -116
- package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +0 -265
- package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +0 -21
- package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +0 -22
- package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +0 -60
- package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +0 -8
- package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +0 -9
- package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +0 -29
- package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +0 -71
- package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +0 -19
- package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +0 -128
- package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +0 -11
- package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +0 -4
- package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +0 -163
- package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +0 -139
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +0 -657
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +0 -412
- package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +0 -30
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +0 -312
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +0 -23
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +0 -119
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +0 -99
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +0 -239
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/package.json +0 -19
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +0 -872
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +0 -108
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +0 -156
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +0 -16
- package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +0 -29
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +0 -4
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +0 -215
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +0 -13
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +0 -24
- package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +0 -69
- package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +0 -203
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +0 -847
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +0 -742
- package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +0 -53
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +0 -386
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +0 -259
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +0 -163
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/package.json +0 -36
- package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +0 -39
- package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +0 -311
- package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +0 -185
- package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +0 -101
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +0 -937
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +0 -616
- package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/render-ui/README.md +0 -33
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +0 -144
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js +0 -134
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +0 -154
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +0 -24
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +0 -98
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js +0 -99
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +0 -60
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +0 -129
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +0 -133
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +0 -154
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +0 -194
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/package.json +0 -30
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +0 -68
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +0 -48
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +0 -100
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +0 -14
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +0 -40
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +0 -27
- package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +0 -41
- package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +0 -77
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +0 -73
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +0 -19
- package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +0 -19
- package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +0 -89
- package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +0 -118
- package/configure/node_modules/immutable/LICENSE +0 -21
- package/configure/node_modules/immutable/README.md +0 -657
- package/configure/node_modules/immutable/dist/immutable-nonambient.d.ts +0 -5607
- package/configure/node_modules/immutable/dist/immutable.d.ts +0 -5611
- package/configure/node_modules/immutable/dist/immutable.es.js +0 -5893
- package/configure/node_modules/immutable/dist/immutable.js +0 -5948
- package/configure/node_modules/immutable/dist/immutable.js.flow +0 -2340
- package/configure/node_modules/immutable/dist/immutable.min.js +0 -55
- package/configure/node_modules/immutable/package.json +0 -41
- package/configure/node_modules/slate-dev-environment/Readme.md +0 -1
- package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.js +0 -287
- package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.min.js +0 -1
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js +0 -264
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js.map +0 -1
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js +0 -282
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js.map +0 -1
- package/configure/node_modules/slate-dev-environment/package.json +0 -21
- package/configure/node_modules/slate-edit-list/CHANGELOG.md +0 -124
- package/configure/node_modules/slate-edit-list/LICENSE +0 -201
- package/configure/node_modules/slate-edit-list/README.md +0 -159
- package/configure/node_modules/slate-edit-list/dist/changes/decreaseItemDepth.js +0 -73
- package/configure/node_modules/slate-edit-list/dist/changes/decreaseItemDepth.js.flow +0 -88
- package/configure/node_modules/slate-edit-list/dist/changes/increaseItemDepth.js +0 -70
- package/configure/node_modules/slate-edit-list/dist/changes/increaseItemDepth.js.flow +0 -77
- package/configure/node_modules/slate-edit-list/dist/changes/index.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/changes/index.js.flow +0 -13
- package/configure/node_modules/slate-edit-list/dist/changes/splitListItem.js +0 -27
- package/configure/node_modules/slate-edit-list/dist/changes/splitListItem.js.flow +0 -26
- package/configure/node_modules/slate-edit-list/dist/changes/unwrapList.js +0 -52
- package/configure/node_modules/slate-edit-list/dist/changes/unwrapList.js.flow +0 -46
- package/configure/node_modules/slate-edit-list/dist/changes/wrapInList.js +0 -67
- package/configure/node_modules/slate-edit-list/dist/changes/wrapInList.js.flow +0 -67
- package/configure/node_modules/slate-edit-list/dist/core.js +0 -80
- package/configure/node_modules/slate-edit-list/dist/core.js.flow +0 -76
- package/configure/node_modules/slate-edit-list/dist/handlers/index.js +0 -24
- package/configure/node_modules/slate-edit-list/dist/handlers/index.js.flow +0 -5
- package/configure/node_modules/slate-edit-list/dist/handlers/onBackspace.js +0 -45
- package/configure/node_modules/slate-edit-list/dist/handlers/onBackspace.js.flow +0 -44
- package/configure/node_modules/slate-edit-list/dist/handlers/onEnter.js +0 -54
- package/configure/node_modules/slate-edit-list/dist/handlers/onEnter.js.flow +0 -54
- package/configure/node_modules/slate-edit-list/dist/handlers/onTab.js +0 -39
- package/configure/node_modules/slate-edit-list/dist/handlers/onTab.js.flow +0 -34
- package/configure/node_modules/slate-edit-list/dist/index.js +0 -58
- package/configure/node_modules/slate-edit-list/dist/index.js.flow +0 -45
- package/configure/node_modules/slate-edit-list/dist/options.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/options.js.flow +0 -26
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentItem.js +0 -24
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentItem.js.flow +0 -20
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentList.js +0 -31
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentList.js.flow +0 -21
- package/configure/node_modules/slate-edit-list/dist/utils/getItemDepth.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/utils/getItemDepth.js.flow +0 -24
- package/configure/node_modules/slate-edit-list/dist/utils/getItemsAtRange.js +0 -60
- package/configure/node_modules/slate-edit-list/dist/utils/getItemsAtRange.js.flow +0 -51
- package/configure/node_modules/slate-edit-list/dist/utils/getListForItem.js +0 -25
- package/configure/node_modules/slate-edit-list/dist/utils/getListForItem.js.flow +0 -16
- package/configure/node_modules/slate-edit-list/dist/utils/getPreviousItem.js +0 -39
- package/configure/node_modules/slate-edit-list/dist/utils/getPreviousItem.js.flow +0 -29
- package/configure/node_modules/slate-edit-list/dist/utils/index.js +0 -49
- package/configure/node_modules/slate-edit-list/dist/utils/index.js.flow +0 -19
- package/configure/node_modules/slate-edit-list/dist/utils/isList.js +0 -15
- package/configure/node_modules/slate-edit-list/dist/utils/isList.js.flow +0 -13
- package/configure/node_modules/slate-edit-list/dist/utils/isSelectionInList.js +0 -22
- package/configure/node_modules/slate-edit-list/dist/utils/isSelectionInList.js.flow +0 -14
- package/configure/node_modules/slate-edit-list/dist/validation/index.js +0 -19
- package/configure/node_modules/slate-edit-list/dist/validation/index.js.flow +0 -4
- package/configure/node_modules/slate-edit-list/dist/validation/schema.js +0 -83
- package/configure/node_modules/slate-edit-list/dist/validation/schema.js.flow +0 -81
- package/configure/node_modules/slate-edit-list/dist/validation/validateNode.js +0 -61
- package/configure/node_modules/slate-edit-list/dist/validation/validateNode.js.flow +0 -61
- package/configure/node_modules/slate-edit-list/package.json +0 -67
- package/configure/node_modules/slate-edit-table/CHANGELOG.md +0 -192
- package/configure/node_modules/slate-edit-table/LICENSE +0 -201
- package/configure/node_modules/slate-edit-table/README.md +0 -269
- package/configure/node_modules/slate-edit-table/dist/changes/clearCell.js +0 -29
- package/configure/node_modules/slate-edit-table/dist/changes/clearCell.js.flow +0 -26
- package/configure/node_modules/slate-edit-table/dist/changes/index.js +0 -69
- package/configure/node_modules/slate-edit-table/dist/changes/index.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/insertColumn.js +0 -43
- package/configure/node_modules/slate-edit-table/dist/changes/insertColumn.js.flow +0 -46
- package/configure/node_modules/slate-edit-table/dist/changes/insertRow.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/insertRow.js.flow +0 -35
- package/configure/node_modules/slate-edit-table/dist/changes/insertTable.js +0 -29
- package/configure/node_modules/slate-edit-table/dist/changes/insertTable.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelection.js +0 -32
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelection.js.flow +0 -31
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelectionBy.js +0 -84
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelectionBy.js.flow +0 -80
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumn.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumn.js.flow +0 -28
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumnByKey.js +0 -52
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumnByKey.js.flow +0 -40
- package/configure/node_modules/slate-edit-table/dist/changes/removeRow.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/removeRow.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/removeRowByKey.js +0 -41
- package/configure/node_modules/slate-edit-table/dist/changes/removeRowByKey.js.flow +0 -30
- package/configure/node_modules/slate-edit-table/dist/changes/removeTable.js +0 -26
- package/configure/node_modules/slate-edit-table/dist/changes/removeTable.js.flow +0 -17
- package/configure/node_modules/slate-edit-table/dist/changes/removeTableByKey.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/changes/removeTableByKey.js.flow +0 -54
- package/configure/node_modules/slate-edit-table/dist/core.js +0 -88
- package/configure/node_modules/slate-edit-table/dist/core.js.flow +0 -94
- package/configure/node_modules/slate-edit-table/dist/handlers/index.js +0 -39
- package/configure/node_modules/slate-edit-table/dist/handlers/index.js.flow +0 -8
- package/configure/node_modules/slate-edit-table/dist/handlers/onBackspace.js +0 -82
- package/configure/node_modules/slate-edit-table/dist/handlers/onBackspace.js.flow +0 -87
- package/configure/node_modules/slate-edit-table/dist/handlers/onEnter.js +0 -34
- package/configure/node_modules/slate-edit-table/dist/handlers/onEnter.js.flow +0 -37
- package/configure/node_modules/slate-edit-table/dist/handlers/onKeyDown.js +0 -71
- package/configure/node_modules/slate-edit-table/dist/handlers/onKeyDown.js.flow +0 -56
- package/configure/node_modules/slate-edit-table/dist/handlers/onModEnter.js +0 -35
- package/configure/node_modules/slate-edit-table/dist/handlers/onModEnter.js.flow +0 -38
- package/configure/node_modules/slate-edit-table/dist/handlers/onTab.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/handlers/onTab.js.flow +0 -51
- package/configure/node_modules/slate-edit-table/dist/handlers/onUpDown.js +0 -38
- package/configure/node_modules/slate-edit-table/dist/handlers/onUpDown.js.flow +0 -41
- package/configure/node_modules/slate-edit-table/dist/index.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/index.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/options.js +0 -61
- package/configure/node_modules/slate-edit-table/dist/options.js.flow +0 -42
- package/configure/node_modules/slate-edit-table/dist/utils/TablePosition.js +0 -306
- package/configure/node_modules/slate-edit-table/dist/utils/TablePosition.js.flow +0 -211
- package/configure/node_modules/slate-edit-table/dist/utils/createCell.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createCell.js.flow +0 -26
- package/configure/node_modules/slate-edit-table/dist/utils/createRow.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createRow.js.flow +0 -28
- package/configure/node_modules/slate-edit-table/dist/utils/createTable.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createTable.js.flow +0 -33
- package/configure/node_modules/slate-edit-table/dist/utils/forEachCells.js +0 -21
- package/configure/node_modules/slate-edit-table/dist/utils/forEachCells.js.flow +0 -22
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtColumn.js +0 -22
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtColumn.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtRow.js +0 -20
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtRow.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getPosition.js +0 -24
- package/configure/node_modules/slate-edit-table/dist/utils/getPosition.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getPositionByKey.js +0 -26
- package/configure/node_modules/slate-edit-table/dist/utils/getPositionByKey.js.flow +0 -21
- package/configure/node_modules/slate-edit-table/dist/utils/getRow.js +0 -24
- package/configure/node_modules/slate-edit-table/dist/utils/getRow.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/index.js +0 -64
- package/configure/node_modules/slate-edit-table/dist/utils/index.js.flow +0 -25
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionInTable.js +0 -34
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionInTable.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionOutOfTable.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionOutOfTable.js.flow +0 -23
- package/configure/node_modules/slate-edit-table/dist/validation/index.js +0 -19
- package/configure/node_modules/slate-edit-table/dist/validation/index.js.flow +0 -4
- package/configure/node_modules/slate-edit-table/dist/validation/schema.js +0 -101
- package/configure/node_modules/slate-edit-table/dist/validation/schema.js.flow +0 -98
- package/configure/node_modules/slate-edit-table/dist/validation/validateNode.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/validation/validateNode.js.flow +0 -49
- package/configure/node_modules/slate-edit-table/package.json +0 -69
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/plugins/math/index.jsx"],"names":["log","TEXT_NODE","generateAdditionalKeys","keyData","map","key","name","latex","write","label","CustomToolbarComp","React","memo","props","node","value","onFocus","onBlur","onClick","pluginProps","math","keypadMode","customKeys","controlledKeypadMode","onDone","update","data","toObject","change","setNodeByKey","nextText","document","getNextText","moveFocusTo","moveAnchorTo","onToolbarDone","onChange","onDataChange","get","prev","next","nodeNext","keypadModeNext","controlledKeypadModeNext","keypadModeChanged","controlledKeypadModeChanged","equal","equals","propTypes","SlatePropTypes","isRequired","PropTypes","func","MathPlugin","toolbar","icon","inlineMath","insertInline","supports","object","type","schema","match","pluginStyles","parentNode","p","position","top","renderNode","html","attributes","__html","normalizeNode","addSpacesArray","allElements","filterDescendants","d","forEach","el","prevText","getPreviousText","lastCharIsNewLine","text","length","push","nr","withoutNormalization","getNode","insertTextByKey","repeat","ROUND_BRACKETS","SQUARE_BRACKETS","DOLLAR","DOUBLE_DOLLAR","Inline","create","isVoid","htmlDecode","input","doc","DOMParser","parseFromString","documentElement","textContent","getTagName","tagName","toLowerCase","serialization","deserialize","hasMathChild","BLOCK_TAGS","childNodes","firstChild","dataset","newHtml","innerHTML","outerHTML","nodeType","hasLatex","hasAttribute","unwrapped","wrapType","nodes","wrapper","serialize","l","decoded"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;;;AACA,IAAMA,GAAG,GAAG,uBAAM,qCAAN,CAAZ;AAEA,IAAMC,SAAS,GAAG,CAAlB;;AAEA,SAASC,sBAAT,GAA8C;AAAA,MAAdC,OAAc,uEAAJ,EAAI;AAC5C,SAAOA,OAAO,CAACC,GAAR,CAAY,UAAAC,GAAG;AAAA,WAAK;AACzBC,MAAAA,IAAI,EAAED,GADmB;AAEzBE,MAAAA,KAAK,EAAEF,GAFkB;AAGzBG,MAAAA,KAAK,EAAEH,GAHkB;AAIzBI,MAAAA,KAAK,EAAEJ;AAJkB,KAAL;AAAA,GAAf,CAAP;AAMD;;AAEM,IAAMK,iBAAiB,GAAGC,kBAAMC,IAAN,CAC/B,UAAAC,KAAK,EAAI;AAAA,MACCC,IADD,GAC2CD,KAD3C,CACCC,IADD;AAAA,MACOC,KADP,GAC2CF,KAD3C,CACOE,KADP;AAAA,MACcC,OADd,GAC2CH,KAD3C,CACcG,OADd;AAAA,MAC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,UAAU,CAAC4B,CAAD,CAA1B;AACA,aACE;AAAM,sBAAW,EAAjB;AAAoB,oBAAUC;AAA9B,SACG,6BAASA,OAAT,EAAkBH,OAAlB,CADH,CADF;AAKD;AAED;;;;;AAGA,QAAIhE,MAAM,CAACC,IAAP,KAAgB,QAApB,EAA8B;AAC5B,UAAMS,IAAI,GAAGV,MAAM,CAACjC,IAAP,CAAYY,GAAZ,CAAgB,MAAhB,CAAb;AAEA,aAAO;AAAM,qBAAU,QAAhB;AAAyB,QAAA,uBAAuB,EAAE;AAAEiC,UAAAA,MAAM,EAAEF;AAAV;AAAlD,QAAP;AACD;AACF;AA7E0B,CAAtB","sourcesContent":["import Functions from '@material-ui/icons/Functions';\nimport { Inline } from 'slate';\nimport { MathPreview, MathToolbar } from '@pie-lib/math-toolbar';\nimport { wrapMath, unWrapMath } from '@pie-lib/math-rendering';\nimport React from 'react';\nimport debug from 'debug';\nimport SlatePropTypes from 'slate-prop-types';\nimport PropTypes from 'prop-types';\n\nimport { BLOCK_TAGS } from '../../serialization';\nconst log = debug('@pie-lib:editable-html:plugins:math');\n\nconst TEXT_NODE = 3;\n\nfunction generateAdditionalKeys(keyData = []) {\n return keyData.map(key => ({\n name: key,\n latex: key,\n write: key,\n label: key\n }));\n}\n\nexport const CustomToolbarComp = React.memo(\n props => {\n const { node, value, onFocus, onBlur, onClick } = props;\n const { pluginProps } = props || {};\n const { math } = pluginProps || {};\n const { keypadMode, customKeys, controlledKeypadMode = true } = math || {};\n\n const onDone = latex => {\n const update = {\n ...node.data.toObject(),\n latex\n };\n const change = value.change().setNodeByKey(node.key, { data: update });\n\n const nextText = value.document.getNextText(node.key);\n\n change.moveFocusTo(nextText.key, 0).moveAnchorTo(nextText.key, 0);\n\n props.onToolbarDone(change, false);\n };\n\n const onChange = latex => {\n const update = {\n ...node.data.toObject(),\n latex\n };\n const change = value.change().setNodeByKey(node.key, { data: update });\n log('call onToolbarChange:', change);\n props.onDataChange(node.key, update);\n };\n\n const latex = node.data.get('latex');\n\n return (\n <MathToolbar\n autoFocus\n additionalKeys={generateAdditionalKeys(customKeys)}\n latex={latex}\n onChange={onChange}\n onDone={onDone}\n onBlur={onBlur}\n onFocus={onFocus}\n onClick={onClick}\n keypadMode={keypadMode}\n controlledKeypadMode={controlledKeypadMode}\n />\n );\n },\n (prev, next) => {\n const { node, pluginProps: { math: { keypadMode, controlledKeypadMode } = {} } = {} } = prev;\n const {\n node: nodeNext,\n pluginProps: {\n math: { keypadMode: keypadModeNext, controlledKeypadMode: controlledKeypadModeNext } = {}\n } = {}\n } = next;\n const keypadModeChanged = keypadMode !== keypadModeNext;\n const controlledKeypadModeChanged = controlledKeypadMode !== controlledKeypadModeNext;\n\n const equal = node.equals(nodeNext);\n return equal && !keypadModeChanged && !controlledKeypadModeChanged;\n }\n);\n\nCustomToolbarComp.propTypes = {\n node: SlatePropTypes.node.isRequired,\n value: SlatePropTypes.value,\n onToolbarDone: PropTypes.func,\n onDataChange: PropTypes.func,\n onFocus: PropTypes.func,\n onClick: PropTypes.func,\n onBlur: PropTypes.func\n};\n\nexport default function MathPlugin() {\n return {\n name: 'math',\n toolbar: {\n icon: <Functions />,\n onClick: (value, onChange) => {\n log('[insertMath]');\n const math = inlineMath();\n const change = value.change().insertInline(math);\n onChange(change);\n },\n supports: node => node && node.object === 'inline' && node.type === 'math',\n /**\n * Return a react component function\n * @param node {Slate.Node}\n * @param value {Slate.Value}\n * @param onDone {(change?: Slate.Change, finishEditing :boolea) => void} - a function to call once the toolbar\n * has made any changes, call with the node.key and a data object.\n */\n CustomToolbarComp\n },\n schema: {\n document: { match: [{ type: 'math' }] }\n },\n\n pluginStyles: (node, parentNode, p) => {\n if (p) {\n return {\n position: 'absolute',\n top: 'initial'\n };\n }\n },\n\n renderNode: props => {\n if (props.node.type === 'math') {\n log('[renderNode]: data:', props.node.data);\n return <MathPreview {...props} />;\n }\n\n /**\n * Here for rendering mathml content\n */\n if (props.node.type === 'mathml') {\n const html = props.node.data.get('html');\n\n return <span {...props.attributes} dangerouslySetInnerHTML={{ __html: html }} />;\n }\n },\n\n normalizeNode: node => {\n if (node.object !== 'document') {\n return;\n }\n\n const addSpacesArray = [];\n\n const allElements = node.filterDescendants(d => d.type === 'math');\n\n allElements.forEach(el => {\n const prevText = node.getPreviousText(el.key);\n const lastCharIsNewLine = prevText.text[prevText.text.length - 1] === '\\n';\n\n if (prevText.text.length === 0 || lastCharIsNewLine) {\n addSpacesArray.push({\n nr: lastCharIsNewLine ? 1 : 2,\n key: prevText.key\n });\n }\n });\n\n if (!addSpacesArray.length) {\n return;\n }\n\n return change => {\n change.withoutNormalization(() => {\n addSpacesArray.forEach(({ key, nr }) => {\n const node = change.value.document.getNode(key);\n\n change.insertTextByKey(key, node.text.length, '\\u00A0'.repeat(nr));\n });\n });\n };\n }\n };\n}\n\nMathPlugin.ROUND_BRACKETS = 'round_brackets';\nMathPlugin.SQUARE_BRACKETS = 'square_brackets';\nMathPlugin.DOLLAR = 'dollar';\nMathPlugin.DOUBLE_DOLLAR = 'double_dollar';\n\nexport const inlineMath = () =>\n Inline.create({\n object: 'inline',\n type: 'math',\n isVoid: true,\n data: {\n latex: ''\n }\n });\n\nconst htmlDecode = input => {\n const doc = new DOMParser().parseFromString(input, 'text/html');\n\n return doc.documentElement.textContent;\n};\n\nconst getTagName = el => {\n return ((el && el.tagName) || '').toLowerCase();\n};\n\nexport const serialization = {\n deserialize(el) {\n const tagName = getTagName(el);\n /**\n * This is used for when there's a wrapper over the mathml element.\n * Because of this slate rule: \"Only allow block nodes or inline and text nodes in blocks.\"\n * The element that contains only the mathml is removed (along with the math) because it has\n * an inline child and the block is of type block\n * This is for legacy content only since our math rendering is valid for the core slate rules\n */\n const hasMathChild =\n BLOCK_TAGS[tagName] && el.childNodes.length === 1 && getTagName(el.firstChild) === 'math';\n log('[deserialize] name: ', tagName);\n\n /**\n * This is here in order to be able to render mathml content\n */\n if (tagName === 'math' || (el.dataset && el.dataset.type === 'mathml') || hasMathChild) {\n const newHtml = hasMathChild ? el.innerHTML : el.outerHTML;\n\n return {\n object: 'inline',\n isVoid: true,\n type: 'mathml',\n data: {\n html: newHtml\n }\n };\n }\n\n if (el.nodeType === TEXT_NODE) {\n return;\n }\n\n if (tagName !== 'span') {\n return;\n }\n\n const hasLatex = el.hasAttribute('data-latex') || el.hasAttribute('latex');\n\n if (hasLatex) {\n const latex = htmlDecode(el.innerHTML);\n const { unwrapped, wrapType } = unWrapMath(latex);\n log('[deserialize]: noBrackets: ', unwrapped, wrapType);\n return {\n object: 'inline',\n type: 'math',\n isVoid: true,\n nodes: [],\n data: {\n latex: unwrapped,\n wrapper: wrapType\n }\n };\n }\n },\n serialize(object) {\n if (object.type === 'math') {\n const l = object.data.get('latex');\n const wrapper = object.data.get('wrapper');\n log('[serialize] latex: ', l);\n const decoded = htmlDecode(l);\n return (\n <span data-latex=\"\" data-raw={decoded}>\n {wrapMath(decoded, wrapper)}\n </span>\n );\n }\n\n /**\n * Here for rendering mathml content\n */\n if (object.type === 'mathml') {\n const html = object.data.get('html');\n\n return <span data-type=\"mathml\" dangerouslySetInnerHTML={{ __html: html }} />;\n }\n }\n};\n"],"file":"index.js"}
|
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = MediaPlugin;
|
|
7
|
-
exports.serialization = exports.insertDialog = void 0;
|
|
8
|
-
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
|
|
11
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
12
|
-
|
|
13
|
-
var _slate = require("slate");
|
|
14
|
-
|
|
15
|
-
var _Theaters = _interopRequireDefault(require("@material-ui/icons/Theaters"));
|
|
16
|
-
|
|
17
|
-
var _VolumeUp = _interopRequireDefault(require("@material-ui/icons/VolumeUp"));
|
|
18
|
-
|
|
19
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
20
|
-
|
|
21
|
-
var _mediaDialog = _interopRequireDefault(require("./media-dialog"));
|
|
22
|
-
|
|
23
|
-
var _mediaToolbar = _interopRequireDefault(require("./media-toolbar"));
|
|
24
|
-
|
|
25
|
-
var _mediaWrapper = _interopRequireDefault(require("./media-wrapper"));
|
|
26
|
-
|
|
27
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
28
|
-
|
|
29
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
30
|
-
|
|
31
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
32
|
-
|
|
33
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
34
|
-
|
|
35
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
36
|
-
|
|
37
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
38
|
-
|
|
39
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
40
|
-
|
|
41
|
-
var log = (0, _debug["default"])('@pie-lib:editable-html:plugins:image');
|
|
42
|
-
|
|
43
|
-
var removeDialogs = function removeDialogs() {
|
|
44
|
-
var prevDialogs = document.querySelectorAll('.insert-media-dialog');
|
|
45
|
-
prevDialogs.forEach(function (s) {
|
|
46
|
-
return s.remove();
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
var insertDialog = function insertDialog(props) {
|
|
51
|
-
var newEl = document.createElement('div');
|
|
52
|
-
|
|
53
|
-
var type = props.type,
|
|
54
|
-
callback = props.callback,
|
|
55
|
-
rest = _objectWithoutProperties(props, ["type", "callback"]);
|
|
56
|
-
|
|
57
|
-
removeDialogs();
|
|
58
|
-
newEl.className = 'insert-media-dialog';
|
|
59
|
-
|
|
60
|
-
var handleClose = function handleClose(val, data) {
|
|
61
|
-
callback(val, data);
|
|
62
|
-
newEl.remove();
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
var el = _react["default"].createElement(_mediaDialog["default"], _extends({}, rest, {
|
|
66
|
-
type: type,
|
|
67
|
-
disablePortal: true,
|
|
68
|
-
open: true,
|
|
69
|
-
handleClose: handleClose
|
|
70
|
-
}));
|
|
71
|
-
|
|
72
|
-
_reactDom["default"].render(el, newEl);
|
|
73
|
-
|
|
74
|
-
document.body.appendChild(newEl);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
exports.insertDialog = insertDialog;
|
|
78
|
-
var types = ['audio', 'video'];
|
|
79
|
-
|
|
80
|
-
function MediaPlugin(type, opts) {
|
|
81
|
-
var toolbar = {
|
|
82
|
-
icon: type === 'audio' ? _react["default"].createElement(_VolumeUp["default"], null) : _react["default"].createElement(_Theaters["default"], null),
|
|
83
|
-
onClick: function onClick(value, onChange) {
|
|
84
|
-
log('[toolbar] onClick');
|
|
85
|
-
|
|
86
|
-
var inline = _slate.Inline.create({
|
|
87
|
-
type: type,
|
|
88
|
-
isVoid: true,
|
|
89
|
-
data: {
|
|
90
|
-
editing: false,
|
|
91
|
-
ends: undefined,
|
|
92
|
-
height: undefined,
|
|
93
|
-
title: undefined,
|
|
94
|
-
starts: undefined,
|
|
95
|
-
src: undefined,
|
|
96
|
-
url: undefined,
|
|
97
|
-
width: undefined
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
var change = value.change().insertInline(inline);
|
|
102
|
-
onChange(change);
|
|
103
|
-
insertDialog({
|
|
104
|
-
type: type,
|
|
105
|
-
callback: function callback(val, data) {
|
|
106
|
-
var nodeIsThere = change.value.document.findDescendant(function (d) {
|
|
107
|
-
return d.key === inline.key;
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
if (nodeIsThere) {
|
|
111
|
-
if (!val) {
|
|
112
|
-
var c = change.removeNodeByKey(inline.key);
|
|
113
|
-
onChange(c, function () {
|
|
114
|
-
return opts.focus();
|
|
115
|
-
});
|
|
116
|
-
} else {
|
|
117
|
-
var _c = change.setNodeByKey(inline.key, {
|
|
118
|
-
data: data
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
onChange(_c, function () {
|
|
122
|
-
return opts.focus('beginning', nodeIsThere);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
} else {
|
|
126
|
-
opts.focus();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
},
|
|
131
|
-
supports: function supports(node) {
|
|
132
|
-
return node.object === 'inline' && node.type === type;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
return {
|
|
136
|
-
name: type,
|
|
137
|
-
toolbar: toolbar,
|
|
138
|
-
deleteNode: function deleteNode(e, node, value, onChange) {
|
|
139
|
-
e.preventDefault();
|
|
140
|
-
var change = value.change().removeNodeByKey(node.key);
|
|
141
|
-
onChange(change);
|
|
142
|
-
},
|
|
143
|
-
renderNode: function renderNode(props) {
|
|
144
|
-
if (props.node.type === type) {
|
|
145
|
-
var node = props.node,
|
|
146
|
-
key = props.key;
|
|
147
|
-
var data = node.data;
|
|
148
|
-
var jsonData = data.toJSON();
|
|
149
|
-
|
|
150
|
-
var src = jsonData.src,
|
|
151
|
-
height = jsonData.height,
|
|
152
|
-
width = jsonData.width,
|
|
153
|
-
editing = jsonData.editing,
|
|
154
|
-
rest = _objectWithoutProperties(jsonData, ["src", "height", "width", "editing"]);
|
|
155
|
-
|
|
156
|
-
var handleEdit = function handleEdit() {
|
|
157
|
-
var change = opts.createChange();
|
|
158
|
-
var c = change.setNodeByKey(key, {
|
|
159
|
-
data: _objectSpread({}, jsonData, {
|
|
160
|
-
editing: true
|
|
161
|
-
})
|
|
162
|
-
});
|
|
163
|
-
opts.onChange(c, function () {
|
|
164
|
-
insertDialog(_objectSpread({}, jsonData, {
|
|
165
|
-
edit: true,
|
|
166
|
-
type: type,
|
|
167
|
-
callback: function callback(val, data) {
|
|
168
|
-
var key = node.key;
|
|
169
|
-
var nodeIsThere = change.value.document.findDescendant(function (d) {
|
|
170
|
-
return d.type === type && d.data.get('editing');
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
if (nodeIsThere && val) {
|
|
174
|
-
var _c2 = change.setNodeByKey(key, {
|
|
175
|
-
data: data,
|
|
176
|
-
editing: false
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
opts.onChange(_c2, function () {
|
|
180
|
-
return opts.focus('beginning', nodeIsThere);
|
|
181
|
-
});
|
|
182
|
-
} else {
|
|
183
|
-
opts.focus();
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}));
|
|
187
|
-
});
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
var handleDelete = function handleDelete() {
|
|
191
|
-
var change = opts.createChange();
|
|
192
|
-
var c = change.removeNodeByKey(node.key);
|
|
193
|
-
opts.onChange(c);
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
var style = {};
|
|
197
|
-
|
|
198
|
-
if (width) {
|
|
199
|
-
style.width = "".concat(width, "px");
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
if (height) {
|
|
203
|
-
style.height = "".concat(height, "px");
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
return _react["default"].createElement(_mediaWrapper["default"], _extends({
|
|
207
|
-
editor: true,
|
|
208
|
-
"data-type": type,
|
|
209
|
-
width: style.width
|
|
210
|
-
}, rest), _react["default"].createElement("iframe", _extends({
|
|
211
|
-
frameBorder: "0",
|
|
212
|
-
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
213
|
-
allowFullScreen: true,
|
|
214
|
-
src: src,
|
|
215
|
-
editing: editing ? 1 : 0
|
|
216
|
-
}, rest, style)), _react["default"].createElement(_mediaToolbar["default"], {
|
|
217
|
-
onEdit: handleEdit,
|
|
218
|
-
onRemove: handleDelete
|
|
219
|
-
}));
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
normalizeNode: function normalizeNode(node) {
|
|
223
|
-
var textNodeMap = {};
|
|
224
|
-
var updateNodesArray = [];
|
|
225
|
-
var index = 0;
|
|
226
|
-
if (node.object !== 'document') return;
|
|
227
|
-
node.findDescendant(function (d) {
|
|
228
|
-
if (d.object === 'text') {
|
|
229
|
-
textNodeMap[index] = d;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
var isMedia = types.indexOf(d.type) >= 0;
|
|
233
|
-
|
|
234
|
-
if (isMedia) {
|
|
235
|
-
if (index > 0 && textNodeMap[index - 1] && textNodeMap[index - 1].text === '') {
|
|
236
|
-
updateNodesArray.push(textNodeMap[index - 1]);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
index++;
|
|
241
|
-
});
|
|
242
|
-
if (!updateNodesArray.length) return;
|
|
243
|
-
return function (change) {
|
|
244
|
-
change.withoutNormalization(function () {
|
|
245
|
-
updateNodesArray.forEach(function (n) {
|
|
246
|
-
return change.insertTextByKey(n.key, 0, ' ');
|
|
247
|
-
});
|
|
248
|
-
});
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
var serialization = {
|
|
255
|
-
deserialize: function deserialize(el
|
|
256
|
-
/*, next*/
|
|
257
|
-
) {
|
|
258
|
-
var type = el.dataset && el.dataset.type;
|
|
259
|
-
var typeIndex = types.indexOf(type);
|
|
260
|
-
if (typeIndex < 0) return;
|
|
261
|
-
|
|
262
|
-
var _ref = el.dataset || {},
|
|
263
|
-
ends = _ref.ends,
|
|
264
|
-
starts = _ref.starts,
|
|
265
|
-
title = _ref.title,
|
|
266
|
-
editing = _ref.editing,
|
|
267
|
-
url = _ref.url;
|
|
268
|
-
|
|
269
|
-
log('deserialize: ', name);
|
|
270
|
-
var width = parseInt(el.getAttribute('width'), 10) || null;
|
|
271
|
-
var height = parseInt(el.getAttribute('height'), 10) || null;
|
|
272
|
-
var out = {
|
|
273
|
-
object: 'inline',
|
|
274
|
-
type: type,
|
|
275
|
-
isVoid: true,
|
|
276
|
-
data: {
|
|
277
|
-
src: el.getAttribute('src'),
|
|
278
|
-
editing: editing,
|
|
279
|
-
ends: ends,
|
|
280
|
-
height: height,
|
|
281
|
-
starts: starts,
|
|
282
|
-
title: title,
|
|
283
|
-
width: width,
|
|
284
|
-
url: url
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
log('return object: ', out);
|
|
288
|
-
return out;
|
|
289
|
-
},
|
|
290
|
-
serialize: function serialize(object
|
|
291
|
-
/*, children*/
|
|
292
|
-
) {
|
|
293
|
-
var typeIndex = types.indexOf(object.type);
|
|
294
|
-
if (typeIndex < 0) return;
|
|
295
|
-
var type = types[typeIndex];
|
|
296
|
-
var data = object.data;
|
|
297
|
-
var editing = data.get('editing');
|
|
298
|
-
var ends = data.get('ends');
|
|
299
|
-
var src = data.get('src');
|
|
300
|
-
var starts = data.get('starts');
|
|
301
|
-
var title = data.get('title');
|
|
302
|
-
var width = data.get('width');
|
|
303
|
-
var height = data.get('height');
|
|
304
|
-
var url = data.get('url');
|
|
305
|
-
var style = {};
|
|
306
|
-
|
|
307
|
-
if (width) {
|
|
308
|
-
style.width = "".concat(width, "px");
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
if (height) {
|
|
312
|
-
style.height = "".concat(height, "px");
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
var divProps = {
|
|
316
|
-
'data-editing': editing,
|
|
317
|
-
'data-ends': ends,
|
|
318
|
-
'data-starts': starts,
|
|
319
|
-
'data-title': title,
|
|
320
|
-
'data-url': url
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
var props = _objectSpread({}, style, {
|
|
324
|
-
src: src
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
return _react["default"].createElement("iframe", _extends({
|
|
328
|
-
"data-type": type,
|
|
329
|
-
src: src
|
|
330
|
-
}, divProps, {
|
|
331
|
-
frameBorder: "0",
|
|
332
|
-
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
333
|
-
allowFullScreen: true
|
|
334
|
-
}, props));
|
|
335
|
-
}
|
|
336
|
-
};
|
|
337
|
-
exports.serialization = serialization;
|
|
338
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/plugins/media/index.jsx"],"names":["log","removeDialogs","prevDialogs","document","querySelectorAll","forEach","s","remove","insertDialog","props","newEl","createElement","type","callback","rest","className","handleClose","val","data","el","ReactDOM","render","body","appendChild","types","MediaPlugin","opts","toolbar","icon","onClick","value","onChange","inline","Inline","create","isVoid","editing","ends","undefined","height","title","starts","src","url","width","change","insertInline","nodeIsThere","findDescendant","d","key","c","removeNodeByKey","focus","setNodeByKey","supports","node","object","name","deleteNode","e","preventDefault","renderNode","jsonData","toJSON","handleEdit","createChange","edit","get","handleDelete","style","normalizeNode","textNodeMap","updateNodesArray","index","isMedia","indexOf","text","push","length","withoutNormalization","n","insertTextByKey","serialization","deserialize","dataset","typeIndex","parseInt","getAttribute","out","serialize","divProps"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,sCAAN,CAAZ;;AAEA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,GAAM;AAC1B,MAAMC,WAAW,GAAGC,QAAQ,CAACC,gBAAT,CAA0B,sBAA1B,CAApB;AAEAF,EAAAA,WAAW,CAACG,OAAZ,CAAoB,UAAAC,CAAC;AAAA,WAAIA,CAAC,CAACC,MAAF,EAAJ;AAAA,GAArB;AACD,CAJD;;AAMO,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAAAC,KAAK,EAAI;AACnC,MAAMC,KAAK,GAAGP,QAAQ,CAACQ,aAAT,CAAuB,KAAvB,CAAd;;AADmC,MAE3BC,IAF2B,GAECH,KAFD,CAE3BG,IAF2B;AAAA,MAErBC,QAFqB,GAECJ,KAFD,CAErBI,QAFqB;AAAA,MAERC,IAFQ,4BAECL,KAFD;;AAInCR,EAAAA,aAAa;AAEbS,EAAAA,KAAK,CAACK,SAAN,GAAkB,qBAAlB;;AAEA,MAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,GAAD,EAAMC,IAAN,EAAe;AACjCL,IAAAA,QAAQ,CAACI,GAAD,EAAMC,IAAN,CAAR;AACAR,IAAAA,KAAK,CAACH,MAAN;AACD,GAHD;;AAKA,MAAMY,EAAE,GACN,gCAAC,uBAAD,eAAiBL,IAAjB;AAAuB,IAAA,IAAI,EAAEF,IAA7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AA,KAAK,CAAC/B,MAAN,aAAkBA,MAAlB;AACD;;AAED,QAAMoD,QAAQ,GAAG;AACf,sBAAgBvD,OADD;AAEf,mBAAaC,IAFE;AAGf,qBAAeI,MAHA;AAIf,oBAAcD,KAJC;AAKf,kBAAYG;AALG,KAAjB;;AAOA,QAAMlC,KAAK,qBACN6D,KADM;AAET5B,MAAAA,GAAG,EAAHA;AAFS,MAAX;;AAKA,WACE;AACE,mBAAW9B,IADb;AAEE,MAAA,GAAG,EAAE8B;AAFP,OAGMiD,QAHN;AAIE,MAAA,WAAW,EAAC,GAJd;AAKE,MAAA,KAAK,EAAC,0FALR;AAME,MAAA,eAAe;AANjB,OAOMlF,KAPN,EADF;AAWD;AAhF0B,CAAtB","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Inline } from 'slate';\nimport TheatersIcon from '@material-ui/icons/Theaters';\nimport VolumeUpIcon from '@material-ui/icons/VolumeUp';\nimport debug from 'debug';\n\nimport MediaDialog from './media-dialog';\nimport MediaToolbar from './media-toolbar';\nimport MediaWrapper from './media-wrapper';\n\nconst log = debug('@pie-lib:editable-html:plugins:image');\n\nconst removeDialogs = () => {\n const prevDialogs = document.querySelectorAll('.insert-media-dialog');\n\n prevDialogs.forEach(s => s.remove());\n};\n\nexport const insertDialog = props => {\n const newEl = document.createElement('div');\n const { type, callback, ...rest } = props;\n\n removeDialogs();\n\n newEl.className = 'insert-media-dialog';\n\n const handleClose = (val, data) => {\n callback(val, data);\n newEl.remove();\n };\n\n const el = (\n <MediaDialog {...rest} type={type} disablePortal={true} open={true} handleClose={handleClose} />\n );\n\n ReactDOM.render(el, newEl);\n\n document.body.appendChild(newEl);\n};\n\nconst types = ['audio', 'video'];\n\nexport default function MediaPlugin(type, opts) {\n const toolbar = {\n icon: type === 'audio' ? <VolumeUpIcon /> : <TheatersIcon />,\n onClick: (value, onChange) => {\n log('[toolbar] onClick');\n const inline = Inline.create({\n type: type,\n isVoid: true,\n data: {\n editing: false,\n ends: undefined,\n height: undefined,\n title: undefined,\n starts: undefined,\n src: undefined,\n url: undefined,\n width: undefined\n }\n });\n\n const change = value.change().insertInline(inline);\n onChange(change);\n insertDialog({\n type,\n callback: (val, data) => {\n const nodeIsThere = change.value.document.findDescendant(d => d.key === inline.key);\n\n if (nodeIsThere) {\n if (!val) {\n const c = change.removeNodeByKey(inline.key);\n onChange(c, () => opts.focus());\n } else {\n const c = change.setNodeByKey(inline.key, { data });\n onChange(c, () => opts.focus('beginning', nodeIsThere));\n }\n } else {\n opts.focus();\n }\n }\n });\n },\n supports: node => node.object === 'inline' && node.type === type\n };\n\n return {\n name: type,\n toolbar,\n deleteNode: (e, node, value, onChange) => {\n e.preventDefault();\n const change = value.change().removeNodeByKey(node.key);\n\n onChange(change);\n },\n renderNode(props) {\n if (props.node.type === type) {\n const { node, key } = props;\n const { data } = node;\n const jsonData = data.toJSON();\n const { src, height, width, editing, ...rest } = jsonData;\n const handleEdit = () => {\n const change = opts.createChange();\n const c = change.setNodeByKey(key, {\n data: {\n ...jsonData,\n editing: true\n }\n });\n\n opts.onChange(c, () => {\n insertDialog({\n ...jsonData,\n edit: true,\n type,\n callback: (val, data) => {\n const { key } = node;\n\n const nodeIsThere = change.value.document.findDescendant(\n d => d.type === type && d.data.get('editing')\n );\n\n if (nodeIsThere && val) {\n const c = change.setNodeByKey(key, { data, editing: false });\n opts.onChange(c, () => opts.focus('beginning', nodeIsThere));\n } else {\n opts.focus();\n }\n }\n });\n });\n };\n const handleDelete = () => {\n const change = opts.createChange();\n const c = change.removeNodeByKey(node.key);\n\n opts.onChange(c);\n };\n const style = {};\n\n if (width) {\n style.width = `${width}px`;\n }\n\n if (height) {\n style.height = `${height}px`;\n }\n\n return (\n <MediaWrapper editor data-type={type} width={style.width} {...rest}>\n <iframe\n frameBorder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n src={src}\n editing={editing ? 1 : 0}\n {...rest}\n {...style}\n />\n <MediaToolbar onEdit={handleEdit} onRemove={handleDelete} />\n </MediaWrapper>\n );\n }\n },\n normalizeNode: node => {\n const textNodeMap = {};\n const updateNodesArray = [];\n let index = 0;\n\n if (node.object !== 'document') return;\n\n node.findDescendant(d => {\n if (d.object === 'text') {\n textNodeMap[index] = d;\n }\n\n const isMedia = types.indexOf(d.type) >= 0;\n\n if (isMedia) {\n if (index > 0 && textNodeMap[index - 1] && textNodeMap[index - 1].text === '') {\n updateNodesArray.push(textNodeMap[index - 1]);\n }\n }\n\n index++;\n });\n\n if (!updateNodesArray.length) return;\n\n return change => {\n change.withoutNormalization(() => {\n updateNodesArray.forEach(n => change.insertTextByKey(n.key, 0, ' '));\n });\n };\n }\n };\n}\n\nexport const serialization = {\n deserialize(el /*, next*/) {\n const type = el.dataset && el.dataset.type;\n const typeIndex = types.indexOf(type);\n\n if (typeIndex < 0) return;\n\n const { ends, starts, title, editing, url } = el.dataset || {};\n\n log('deserialize: ', name);\n const width = parseInt(el.getAttribute('width'), 10) || null;\n const height = parseInt(el.getAttribute('height'), 10) || null;\n\n const out = {\n object: 'inline',\n type: type,\n isVoid: true,\n data: {\n src: el.getAttribute('src'),\n editing,\n ends,\n height,\n starts,\n title,\n width,\n url\n }\n };\n log('return object: ', out);\n return out;\n },\n serialize(object /*, children*/) {\n const typeIndex = types.indexOf(object.type);\n\n if (typeIndex < 0) return;\n\n const type = types[typeIndex];\n\n const { data } = object;\n const editing = data.get('editing');\n const ends = data.get('ends');\n const src = data.get('src');\n const starts = data.get('starts');\n const title = data.get('title');\n const width = data.get('width');\n const height = data.get('height');\n const url = data.get('url');\n const style = {};\n\n if (width) {\n style.width = `${width}px`;\n }\n\n if (height) {\n style.height = `${height}px`;\n }\n\n const divProps = {\n 'data-editing': editing,\n 'data-ends': ends,\n 'data-starts': starts,\n 'data-title': title,\n 'data-url': url\n };\n const props = {\n ...style,\n src\n };\n\n return (\n <iframe\n data-type={type}\n src={src}\n {...divProps}\n frameBorder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n {...props}\n />\n );\n }\n};\n"],"file":"index.js"}
|