@worktile/theia 3.0.9 → 3.1.0-next.0
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/README.md +11 -11
- package/components/color-select/color-select.component.d.ts +32 -32
- package/components/color-select/color-select.component.scss +107 -107
- package/components/column-resize/column-resize-notifier.d.ts +35 -35
- package/components/column-resize/column-resize.directive.d.ts +26 -26
- package/components/column-resize/column-resize.module.d.ts +14 -14
- package/components/column-resize/event-dispatcher.d.ts +31 -31
- package/components/column-resize/overlay-handle.component.d.ts +33 -33
- package/components/column-resize/resize-ref.d.ts +25 -25
- package/components/column-resize/resizing.store.d.ts +28 -28
- package/components/column-resize/selectors.d.ts +3 -3
- package/components/contextmenu/contextmenu.component.d.ts +22 -22
- package/components/conversion-hint/conversion-hint.component.d.ts +18 -18
- package/components/conversion-hint/conversion-hint.component.scss +11 -11
- package/components/element/element.component.d.ts +7 -7
- package/components/inline-toolbar/inline-toolbar.component.d.ts +26 -26
- package/components/nav-split-line/nav-split-line.component.d.ts +13 -13
- package/components/table-select/table-select.component.d.ts +20 -20
- package/components/table-select/table-select.component.scss +35 -35
- package/components/template/template.component.d.ts +15 -15
- package/components/text/text.component.d.ts +14 -14
- package/components/toolbar/toolbar.component.d.ts +64 -65
- package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +33 -33
- package/components/toolbar-group/toolbar-group.component.d.ts +33 -33
- package/components/toolbar-group/toolbar-group.component.scss +17 -17
- package/components/toolbar-item/toolbar-item.component.d.ts +17 -18
- package/constants/auto-format-rules.d.ts +2 -2
- package/constants/code.d.ts +9 -9
- package/constants/color-select.d.ts +14 -14
- package/constants/default.d.ts +9 -9
- package/constants/error.d.ts +5 -5
- package/constants/index.d.ts +5 -5
- package/constants/node-types.d.ts +99 -99
- package/constants/selector.d.ts +2 -2
- package/constants/toolbar.d.ts +17 -17
- package/core/create-plugin.d.ts +2 -2
- package/core/create-toolbar.d.ts +5 -5
- package/core/index.d.ts +4 -4
- package/core/toolbar-item/base-toolbar-item.d.ts +29 -29
- package/core/utils/combine-plugins.d.ts +2 -2
- package/core/utils/flatten-deep-plugins.d.ts +6 -6
- package/core/utils/get-plugin-options.d.ts +2 -2
- package/core/utils/get-plugin.d.ts +2 -2
- package/core/utils/get-plugins.d.ts +2 -2
- package/core/utils/index.d.ts +10 -10
- package/core/utils/merge-array.d.ts +1 -1
- package/core/utils/merge-deep-plugins.d.ts +2 -2
- package/core/utils/merge-options.d.ts +2 -2
- package/core/utils/nested-structure-by-key.d.ts +2 -2
- package/core/utils/plugins-by-key.d.ts +2 -2
- package/core/with-theia.d.ts +4 -4
- package/custom-types.d.ts +131 -131
- package/editor.component.d.ts +92 -92
- package/editor.module.d.ts +98 -98
- package/esm2020/components/color-select/color-select.component.mjs +109 -0
- package/esm2020/components/column-resize/column-resize-notifier.mjs +31 -0
- package/{esm2015/components/column-resize/column-resize.directive.js → esm2020/components/column-resize/column-resize.directive.mjs} +99 -99
- package/esm2020/components/column-resize/column-resize.module.mjs +33 -0
- package/{esm2015/components/column-resize/event-dispatcher.js → esm2020/components/column-resize/event-dispatcher.mjs} +56 -56
- package/{esm2015/components/column-resize/overlay-handle.component.js → esm2020/components/column-resize/overlay-handle.component.mjs} +140 -140
- package/{esm2015/components/column-resize/resize-ref.js → esm2020/components/column-resize/resize-ref.mjs} +25 -25
- package/{esm2015/components/column-resize/resizing.store.js → esm2020/components/column-resize/resizing.store.mjs} +155 -155
- package/{esm2015/components/column-resize/selectors.js → esm2020/components/column-resize/selectors.mjs} +4 -4
- package/esm2020/components/contextmenu/contextmenu.component.mjs +61 -0
- package/esm2020/components/conversion-hint/conversion-hint.component.mjs +54 -0
- package/esm2020/components/element/element.component.mjs +23 -0
- package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +138 -0
- package/{esm2015/components/nav-split-line/nav-split-line.component.js → esm2020/components/nav-split-line/nav-split-line.component.mjs} +37 -37
- package/esm2020/components/table-select/table-select.component.mjs +50 -0
- package/esm2020/components/template/template.component.mjs +62 -0
- package/{esm2015/components/text/text.component.js → esm2020/components/text/text.component.mjs} +58 -58
- package/esm2020/components/toolbar/toolbar.component.mjs +241 -0
- package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +129 -0
- package/esm2020/components/toolbar-group/toolbar-group.component.mjs +110 -0
- package/esm2020/components/toolbar-item/toolbar-item.component.mjs +101 -0
- package/{esm2015/constants/auto-format-rules.js → esm2020/constants/auto-format-rules.mjs} +166 -166
- package/{esm2015/constants/code.js → esm2020/constants/code.mjs} +88 -88
- package/{esm2015/constants/color-select.js → esm2020/constants/color-select.mjs} +61 -61
- package/{esm2015/constants/default.js → esm2020/constants/default.mjs} +9 -9
- package/{esm2015/constants/error.js → esm2020/constants/error.mjs} +7 -7
- package/{esm2015/constants/index.js → esm2020/constants/index.mjs} +5 -5
- package/{esm2015/constants/node-types.js → esm2020/constants/node-types.mjs} +132 -132
- package/{esm2015/constants/selector.js → esm2020/constants/selector.mjs} +3 -3
- package/{esm2015/constants/toolbar.js → esm2020/constants/toolbar.mjs} +69 -69
- package/{esm2015/core/create-plugin.js → esm2020/core/create-plugin.mjs} +4 -4
- package/esm2020/core/create-toolbar.mjs +56 -0
- package/{esm2015/core/index.js → esm2020/core/index.mjs} +4 -4
- package/esm2020/core/toolbar-item/base-toolbar-item.mjs +90 -0
- package/{esm2015/core/utils/combine-plugins.js → esm2020/core/utils/combine-plugins.mjs} +9 -9
- package/{esm2015/core/utils/flatten-deep-plugins.js → esm2020/core/utils/flatten-deep-plugins.mjs} +18 -18
- package/esm2020/core/utils/get-plugin-options.mjs +3 -0
- package/{esm2015/core/utils/get-plugin.js → esm2020/core/utils/get-plugin.mjs} +1 -1
- package/esm2020/core/utils/get-plugins.mjs +4 -0
- package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +10 -10
- package/esm2020/core/utils/merge-array.mjs +18 -0
- package/{esm2015/core/utils/merge-deep-plugins.js → esm2020/core/utils/merge-deep-plugins.mjs} +13 -13
- package/{esm2015/core/utils/merge-options.js → esm2020/core/utils/merge-options.mjs} +19 -19
- package/{esm2015/core/utils/nested-structure-by-key.js → esm2020/core/utils/nested-structure-by-key.mjs} +10 -10
- package/{esm2015/core/utils/plugins-by-key.js → esm2020/core/utils/plugins-by-key.mjs} +9 -9
- package/{esm2015/core/with-theia.js → esm2020/core/with-theia.mjs} +22 -22
- package/{esm2015/custom-types.js → esm2020/custom-types.mjs} +1 -1
- package/esm2020/editor.component.mjs +431 -0
- package/{esm2015/editor.module.js → esm2020/editor.module.mjs} +201 -202
- package/{esm2015/interfaces/auto-format.js → esm2020/interfaces/auto-format.mjs} +1 -1
- package/esm2020/interfaces/editor.mjs +25 -0
- package/{esm2015/interfaces/element.js → esm2020/interfaces/element.mjs} +1 -1
- package/{esm2015/interfaces/image.js → esm2020/interfaces/image.mjs} +2 -2
- package/{esm2015/interfaces/index.js → esm2020/interfaces/index.mjs} +8 -8
- package/{esm2015/interfaces/plugins/index.js → esm2020/interfaces/plugins/index.mjs} +4 -4
- package/{esm2015/interfaces/plugins/no-infer.js → esm2020/interfaces/plugins/no-infer.mjs} +1 -1
- package/{esm2015/interfaces/plugins/plugin-key.js → esm2020/interfaces/plugins/plugin-key.mjs} +39 -39
- package/{esm2015/interfaces/plugins/plugins.js → esm2020/interfaces/plugins/plugins.mjs} +1 -1
- package/{esm2015/interfaces/plugins/with-override.js → esm2020/interfaces/plugins/with-override.mjs} +1 -1
- package/esm2020/interfaces/reset-block-type-plugin-options.mjs +2 -0
- package/{esm2015/interfaces/toolbar.js → esm2020/interfaces/toolbar.mjs} +11 -11
- package/esm2020/interfaces/upload.mjs +2 -0
- package/{esm2015/interfaces/utility/index.js → esm2020/interfaces/utility/index.mjs} +3 -3
- package/{esm2015/interfaces/utility/nested-structure-by-key.js → esm2020/interfaces/utility/nested-structure-by-key.mjs} +1 -1
- package/{esm2015/interfaces/utility/override-by-key.js → esm2020/interfaces/utility/override-by-key.mjs} +1 -1
- package/{esm2015/interfaces/utility/types.js → esm2020/interfaces/utility/types.mjs} +1 -1
- package/{esm2015/interfaces/valid-children-types.js → esm2020/interfaces/valid-children-types.mjs} +35 -35
- package/{esm2015/interfaces/view-base.js → esm2020/interfaces/view-base.mjs} +21 -21
- package/{esm2015/pipes.js → esm2020/pipes.mjs} +42 -42
- package/esm2020/plugins/align/align.editor.mjs +47 -0
- package/{esm2015/plugins/align/align.plugin.js → esm2020/plugins/align/align.plugin.mjs} +63 -63
- package/esm2020/plugins/autoformat/autoformat.plugin.mjs +109 -0
- package/{esm2015/plugins/autoformat/transforms/auto-format-block.js → esm2020/plugins/autoformat/transforms/auto-format-block.mjs} +14 -14
- package/{esm2015/plugins/autoformat/transforms/auto-format-inline.js → esm2020/plugins/autoformat/transforms/auto-format-inline.mjs} +77 -77
- package/{esm2015/plugins/blockquote/blockquote.component.js → esm2020/plugins/blockquote/blockquote.component.mjs} +21 -21
- package/esm2020/plugins/blockquote/blockquote.editor.mjs +20 -0
- package/{esm2015/plugins/blockquote/blockquote.plugin.js → esm2020/plugins/blockquote/blockquote.plugin.mjs} +70 -70
- package/esm2020/plugins/code/code.component.mjs +241 -0
- package/{esm2015/plugins/code/code.editor.js → esm2020/plugins/code/code.editor.mjs} +47 -47
- package/{esm2015/plugins/code/code.plugin.js → esm2020/plugins/code/code.plugin.mjs} +41 -41
- package/esm2020/plugins/color/color.editor.mjs +44 -0
- package/{esm2015/plugins/color/color.plugin.js → esm2020/plugins/color/color.plugin.mjs} +27 -27
- package/esm2020/plugins/color/toolbar-item.component.mjs +123 -0
- package/esm2020/plugins/common/auto-insert-data..mjs +77 -0
- package/{esm2015/plugins/common/block-card.plugin.js → esm2020/plugins/common/block-card.plugin.mjs} +287 -287
- package/esm2020/plugins/common/get-fragment.plugin.mjs +24 -0
- package/{esm2015/plugins/common/history.plugin.js → esm2020/plugins/common/history.plugin.mjs} +30 -30
- package/{esm2015/plugins/common/move-selection.plugin.js → esm2020/plugins/common/move-selection.plugin.mjs} +89 -89
- package/{esm2015/plugins/common/remove-empty.plugin.js → esm2020/plugins/common/remove-empty.plugin.mjs} +59 -59
- package/{esm2015/plugins/common/remove-void.plugin.js → esm2020/plugins/common/remove-void.plugin.mjs} +56 -56
- package/{esm2015/plugins/common/reset-type.plugin.js → esm2020/plugins/common/reset-type.plugin.mjs} +34 -34
- package/{esm2015/plugins/common/transforms.plugin.js → esm2020/plugins/common/transforms.plugin.mjs} +17 -17
- package/{esm2015/plugins/deserializers/deserialize-html.plugin.js → esm2020/plugins/deserializers/deserialize-html.plugin.mjs} +38 -38
- package/{esm2015/plugins/deserializers/deserialize-md.plugin.js → esm2020/plugins/deserializers/deserialize-md.plugin.mjs} +121 -121
- package/esm2020/plugins/font-size/font-size.editor.mjs +98 -0
- package/{esm2015/plugins/heading/heading.editor.js → esm2020/plugins/heading/heading.editor.mjs} +53 -53
- package/{esm2015/plugins/heading/heading.plugin.js → esm2020/plugins/heading/heading.plugin.mjs} +84 -84
- package/{esm2015/plugins/hr/hr.component.js → esm2020/plugins/hr/hr.component.mjs} +40 -40
- package/{esm2015/plugins/hr/hr.editor.js → esm2020/plugins/hr/hr.editor.mjs} +7 -7
- package/{esm2015/plugins/hr/hr.plugin.js → esm2020/plugins/hr/hr.plugin.mjs} +41 -41
- package/esm2020/plugins/image/image.component.mjs +365 -0
- package/{esm2015/plugins/image/image.editor.js → esm2020/plugins/image/image.editor.mjs} +57 -57
- package/esm2020/plugins/image/image.plugin.mjs +57 -0
- package/esm2020/plugins/indent/indent.editor.mjs +71 -0
- package/esm2020/plugins/indent/indent.plugin.mjs +58 -0
- package/{esm2015/plugins/indent/on-keydown-indent.js → esm2020/plugins/indent/on-keydown-indent.mjs} +53 -53
- package/{esm2015/plugins/index.js → esm2020/plugins/index.mjs} +70 -70
- package/{esm2015/plugins/inline-code/inline-code.component.js → esm2020/plugins/inline-code/inline-code.component.mjs} +23 -23
- package/{esm2015/plugins/inline-code/inline-code.editor.js → esm2020/plugins/inline-code/inline-code.editor.mjs} +48 -49
- package/{esm2015/plugins/inline-code/inline-code.plugin.js → esm2020/plugins/inline-code/inline-code.plugin.mjs} +65 -65
- package/esm2020/plugins/link/edit/link-edit.component.mjs +105 -0
- package/esm2020/plugins/link/hover/link-hover.component.mjs +36 -0
- package/{esm2015/plugins/link/link.component.js → esm2020/plugins/link/link.component.mjs} +164 -164
- package/{esm2015/plugins/link/link.editor.js → esm2020/plugins/link/link.editor.mjs} +66 -66
- package/{esm2015/plugins/link/link.plugin.js → esm2020/plugins/link/link.plugin.mjs} +58 -58
- package/{esm2015/plugins/link/link.types.js → esm2020/plugins/link/link.types.mjs} +12 -12
- package/esm2020/plugins/list/components/bulleted-list.component.mjs +33 -0
- package/esm2020/plugins/list/components/list-item.component.mjs +93 -0
- package/esm2020/plugins/list/components/numbered-list.component.mjs +39 -0
- package/{esm2015/plugins/list/list.editor.js → esm2020/plugins/list/list.editor.mjs} +125 -125
- package/esm2020/plugins/list/list.plugin.mjs +286 -0
- package/{esm2015/plugins/list/normalizers/get-list-normalizer.js → esm2020/plugins/list/normalizers/get-list-normalizer.mjs} +39 -39
- package/esm2020/plugins/list/normalizers/normalize-list-item.mjs +18 -0
- package/{esm2015/plugins/list/normalizers/normalize-no.js → esm2020/plugins/list/normalizers/normalize-no.mjs} +42 -42
- package/{esm2015/plugins/list/on-key-down-list.js → esm2020/plugins/list/on-key-down-list.mjs} +32 -32
- package/{esm2015/plugins/list/queries/get-list-item-entry.js → esm2020/plugins/list/queries/get-list-item-entry.mjs} +27 -27
- package/{esm2015/plugins/list/queries/get-list-item-sublist.js → esm2020/plugins/list/queries/get-list-item-sublist.mjs} +12 -12
- package/{esm2015/plugins/list/queries/get-list-types.js → esm2020/plugins/list/queries/get-list-types.mjs} +5 -5
- package/{esm2015/plugins/list/queries/get-start-list-item.js → esm2020/plugins/list/queries/get-start-list-item.mjs} +26 -26
- package/{esm2015/plugins/list/queries/has-list-in-list-item.js → esm2020/plugins/list/queries/has-list-in-list-item.mjs} +27 -27
- package/{esm2015/plugins/list/queries/is-in-list.js → esm2020/plugins/list/queries/is-in-list.mjs} +5 -5
- package/{esm2015/plugins/list/queries/is-list-nested.js → esm2020/plugins/list/queries/is-list-nested.mjs} +10 -10
- package/{esm2015/plugins/list/queries/is-list.js → esm2020/plugins/list/queries/is-list.mjs} +5 -5
- package/{esm2015/plugins/list/queries/is-node-type-list.js → esm2020/plugins/list/queries/is-node-type-list.mjs} +4 -4
- package/{esm2015/plugins/list/queries/is-selection-at-list-item-start.js → esm2020/plugins/list/queries/is-selection-at-list-item-start.mjs} +12 -12
- package/{esm2015/plugins/list/queries/is-selection-in-same-list-item.js → esm2020/plugins/list/queries/is-selection-in-same-list-item.mjs} +16 -16
- package/{esm2015/plugins/list/queries/is-single-list-item.js → esm2020/plugins/list/queries/is-single-list-item.mjs} +9 -9
- package/{esm2015/plugins/list/transforms/insert-list-data.js → esm2020/plugins/list/transforms/insert-list-data.mjs} +71 -71
- package/{esm2015/plugins/list/transforms/insert-list-item.js → esm2020/plugins/list/transforms/insert-list-item.mjs} +72 -72
- package/{esm2015/plugins/list/transforms/move-list-item-down.js → esm2020/plugins/list/transforms/move-list-item-down.mjs} +41 -41
- package/{esm2015/plugins/list/transforms/move-list-item-sublist-items-to-list-item-sublist.js → esm2020/plugins/list/transforms/move-list-item-sublist-items-to-list-item-sublist.mjs} +42 -42
- package/{esm2015/plugins/list/transforms/move-list-item-sublist-items-to-list.js → esm2020/plugins/list/transforms/move-list-item-sublist-items-to-list.mjs} +29 -29
- package/{esm2015/plugins/list/transforms/move-list-item-up.js → esm2020/plugins/list/transforms/move-list-item-up.mjs} +77 -77
- package/{esm2015/plugins/list/transforms/unwrap-list.js → esm2020/plugins/list/transforms/unwrap-list.mjs} +9 -9
- package/esm2020/plugins/list/types.mjs +2 -0
- package/esm2020/plugins/mark/mark.editor.mjs +28 -0
- package/esm2020/plugins/mark/mark.plugin.mjs +105 -0
- package/esm2020/plugins/node-id/node-id.plugin.mjs +78 -0
- package/esm2020/plugins/normalizers/insert-paragraph-nodes.mjs +28 -0
- package/{esm2015/plugins/normalizers/remove-empty-nodes.js → esm2020/plugins/normalizers/remove-empty-nodes.mjs} +17 -17
- package/esm2020/plugins/normalizers/trailing-node.plugin.mjs +33 -0
- package/{esm2015/plugins/paint-format/paint-format.editor.js → esm2020/plugins/paint-format/paint-format.editor.mjs} +122 -122
- package/{esm2015/plugins/public-api.js → esm2020/plugins/public-api.mjs} +15 -15
- package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +96 -0
- package/esm2020/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.mjs +80 -0
- package/{esm2015/plugins/quick-insert/quick-insert.editor.js → esm2020/plugins/quick-insert/quick-insert.editor.mjs} +52 -52
- package/esm2020/plugins/quick-insert/quick-insert.plugin.mjs +74 -0
- package/esm2020/plugins/soft-break/soft-break.plugin.mjs +36 -0
- package/{esm2015/plugins/soft-break/soft-break.types.js → esm2020/plugins/soft-break/soft-break.types.mjs} +1 -1
- package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +100 -0
- package/{esm2015/plugins/table/components/row/row.component.js → esm2020/plugins/table/components/row/row.component.mjs} +47 -47
- package/esm2020/plugins/table/components/table.component.mjs +461 -0
- package/esm2020/plugins/table/components/td/td.component.mjs +696 -0
- package/{esm2015/plugins/table/components/toolbar/table-options.component.js → esm2020/plugins/table/components/toolbar/table-options.component.mjs} +72 -69
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +159 -0
- package/{esm2015/plugins/table/table.editor.js → esm2020/plugins/table/table.editor.mjs} +182 -182
- package/esm2020/plugins/table/table.plugin.mjs +427 -0
- package/{esm2015/plugins/table/table.service.js → esm2020/plugins/table/table.service.mjs} +103 -103
- package/esm2020/plugins/table/table.store.mjs +484 -0
- package/{esm2015/plugins/table/table.types.js → esm2020/plugins/table/table.types.mjs} +33 -33
- package/esm2020/plugins/table/toolbar-item.component.mjs +85 -0
- package/esm2020/plugins/table/transforms/clear-cell.mjs +14 -0
- package/{esm2015/plugins/table/transforms/clear-table-node.js → esm2020/plugins/table/transforms/clear-table-node.mjs} +27 -27
- package/{esm2015/plugins/table/transforms/insert-column.js → esm2020/plugins/table/transforms/insert-column.mjs} +57 -57
- package/{esm2015/plugins/table/transforms/insert-row.js → esm2020/plugins/table/transforms/insert-row.mjs} +42 -42
- package/esm2020/plugins/table/transforms/insert-table.mjs +15 -0
- package/{esm2015/plugins/table/transforms/remove-column.js → esm2020/plugins/table/transforms/remove-column.mjs} +51 -51
- package/{esm2015/plugins/table/transforms/remove-row.js → esm2020/plugins/table/transforms/remove-row.mjs} +50 -50
- package/{esm2015/plugins/table/transforms/remove-table.js → esm2020/plugins/table/transforms/remove-table.mjs} +49 -49
- package/{esm2015/plugins/table/utils/add-columns.js → esm2020/plugins/table/utils/add-columns.mjs} +28 -28
- package/{esm2015/plugins/table/utils/calc-anchor-position.js → esm2020/plugins/table/utils/calc-anchor-position.mjs} +24 -24
- package/{esm2015/plugins/table/utils/calc-span.js → esm2020/plugins/table/utils/calc-span.mjs} +72 -72
- package/{esm2015/plugins/table/utils/create-cell.js → esm2020/plugins/table/utils/create-cell.mjs} +19 -19
- package/{esm2015/plugins/table/utils/create-row.js → esm2020/plugins/table/utils/create-row.mjs} +12 -12
- package/{esm2015/plugins/table/utils/create-table.js → esm2020/plugins/table/utils/create-table.mjs} +13 -13
- package/{esm2015/plugins/table/utils/get-base-height.js → esm2020/plugins/table/utils/get-base-height.mjs} +22 -22
- package/{esm2015/plugins/table/utils/get-select-cell-node.js → esm2020/plugins/table/utils/get-select-cell-node.mjs} +19 -16
- package/{esm2015/plugins/table/utils/index.js → esm2020/plugins/table/utils/index.mjs} +8 -8
- package/{esm2015/plugins/table/utils/is-range-in-table.js → esm2020/plugins/table/utils/is-range-in-table.mjs} +16 -16
- package/{esm2015/plugins/table/utils/is-selection-in-table.js → esm2020/plugins/table/utils/is-selection-in-table.mjs} +11 -11
- package/{esm2015/plugins/table/utils/is-virtual-key.js → esm2020/plugins/table/utils/is-virtual-key.mjs} +13 -13
- package/{esm2015/plugins/table/utils/merge-cell.js → esm2020/plugins/table/utils/merge-cell.mjs} +90 -90
- package/{esm2015/plugins/table/utils/next-path.js → esm2020/plugins/table/utils/next-path.mjs} +5 -5
- package/{esm2015/plugins/table/utils/normalize-table.js → esm2020/plugins/table/utils/normalize-table.mjs} +30 -30
- package/{esm2015/plugins/table/utils/remove-columns.js → esm2020/plugins/table/utils/remove-columns.mjs} +23 -23
- package/{esm2015/plugins/table/utils/set-menu-cell-invisibility.js → esm2020/plugins/table/utils/set-menu-cell-invisibility.mjs} +15 -15
- package/{esm2015/plugins/table/utils/split-cell.js → esm2020/plugins/table/utils/split-cell.mjs} +31 -31
- package/{esm2015/plugins/table/utils/table-position.js → esm2020/plugins/table/utils/table-position.mjs} +242 -242
- package/esm2020/plugins/todo-item/todo-item.component.mjs +64 -0
- package/{esm2015/plugins/todo-item/todo-item.editor.js → esm2020/plugins/todo-item/todo-item.editor.mjs} +31 -31
- package/{esm2015/plugins/todo-item/todo-item.plugin.js → esm2020/plugins/todo-item/todo-item.plugin.mjs} +78 -78
- package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +83 -0
- package/{esm2015/plugins/vertical-align/vertical-align.editor.js → esm2020/plugins/vertical-align/vertical-align.editor.mjs} +54 -54
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +23 -23
- package/{esm2015/queries/anchor-block-entry.js → esm2020/queries/anchor-block-entry.mjs} +13 -13
- package/{esm2015/queries/anchor-block.js → esm2020/queries/anchor-block.mjs} +6 -6
- package/{esm2015/queries/anchor-inline-entry.js → esm2020/queries/anchor-inline-entry.mjs} +10 -10
- package/{esm2015/queries/find-descendant.js → esm2020/queries/find-descendant.mjs} +47 -47
- package/{esm2015/queries/find-node.js → esm2020/queries/find-node.mjs} +45 -45
- package/{esm2015/queries/find-path.js → esm2020/queries/find-path.mjs} +28 -28
- package/esm2020/queries/get-above-by-type.mjs +14 -0
- package/{esm2015/queries/get-above.js → esm2020/queries/get-above.mjs} +9 -9
- package/{esm2015/queries/get-anchor-block-entry.js → esm2020/queries/get-anchor-block-entry.mjs} +8 -8
- package/esm2020/queries/get-block-above.mjs +10 -0
- package/esm2020/queries/get-block-card-above.mjs +10 -0
- package/{esm2015/queries/get-block-card-cursor.js → esm2020/queries/get-block-card-cursor.mjs} +5 -5
- package/{esm2015/queries/get-container-blocks.js → esm2020/queries/get-container-blocks.mjs} +11 -11
- package/{esm2015/queries/get-directly-parent.js → esm2020/queries/get-directly-parent.mjs} +11 -11
- package/{esm2015/queries/get-insert-elements-path.js → esm2020/queries/get-insert-elements-path.mjs} +43 -43
- package/{esm2015/queries/get-last-child-path.js → esm2020/queries/get-last-child-path.mjs} +9 -9
- package/{esm2015/queries/get-last-node.js → esm2020/queries/get-last-node.mjs} +17 -17
- package/{esm2015/queries/get-next-sibling-nodes.js → esm2020/queries/get-next-sibling-nodes.mjs} +17 -17
- package/{esm2015/queries/get-node.js → esm2020/queries/get-node.mjs} +10 -10
- package/esm2020/queries/get-nodes-by-type.mjs +15 -0
- package/{esm2015/queries/get-nodes.js → esm2020/queries/get-nodes.mjs} +7 -7
- package/{esm2015/queries/get-parent.js → esm2020/queries/get-parent.mjs} +12 -12
- package/esm2020/queries/get-plain-text.mjs +16 -0
- package/{esm2015/queries/get-plugin-by-toolbar.js → esm2020/queries/get-plugin-by-toolbar.mjs} +12 -12
- package/{esm2015/queries/get-point-before.js → esm2020/queries/get-point-before.mjs} +62 -62
- package/{esm2015/queries/get-point-from-location.js → esm2020/queries/get-point-from-location.mjs} +15 -15
- package/{esm2015/queries/get-previous-path.js → esm2020/queries/get-previous-path.mjs} +9 -9
- package/{esm2015/queries/get-rang-from-block-start.js → esm2020/queries/get-rang-from-block-start.mjs} +16 -16
- package/{esm2015/queries/get-range-before.js → esm2020/queries/get-range-before.mjs} +17 -17
- package/esm2020/queries/get-selection-marks.mjs +18 -0
- package/{esm2015/queries/get-selection-nodes-by-type.js → esm2020/queries/get-selection-nodes-by-type.mjs} +29 -29
- package/{esm2015/queries/get-text.js → esm2020/queries/get-text.mjs} +9 -9
- package/esm2020/queries/get-toolbar-disabled.mjs +13 -0
- package/{esm2015/queries/index.js → esm2020/queries/index.mjs} +58 -58
- package/{esm2015/queries/is-across-blocks.js → esm2020/queries/is-across-blocks.mjs} +7 -7
- package/{esm2015/queries/is-ancestor-empty.js → esm2020/queries/is-ancestor-empty.mjs} +6 -6
- package/{esm2015/queries/is-ancestor.js → esm2020/queries/is-ancestor.mjs} +3 -3
- package/{esm2015/queries/is-block-above-empty.js → esm2020/queries/is-block-above-empty.mjs} +11 -11
- package/{esm2015/queries/is-block-active.js → esm2020/queries/is-block-active.mjs} +7 -7
- package/{esm2015/queries/is-block-card-cursor.js → esm2020/queries/is-block-card-cursor.mjs} +4 -4
- package/{esm2015/queries/is-block-text-empty-after-selection.js → esm2020/queries/is-block-text-empty-after-selection.mjs} +31 -31
- package/{esm2015/queries/is-collapsed.js → esm2020/queries/is-collapsed.mjs} +7 -7
- package/{esm2015/queries/is-contain-nested-type.js → esm2020/queries/is-contain-nested-type.mjs} +28 -28
- package/{esm2015/queries/is-container-type.js → esm2020/queries/is-container-type.mjs} +2 -2
- package/{esm2015/queries/is-descendant.js → esm2020/queries/is-descendant.mjs} +3 -3
- package/{esm2015/queries/is-empty-content.js → esm2020/queries/is-empty-content.mjs} +14 -14
- package/{esm2015/queries/is-empty-paragraph-by-path.js → esm2020/queries/is-empty-paragraph-by-path.mjs} +7 -7
- package/{esm2015/queries/is-empty-paragraph.js → esm2020/queries/is-empty-paragraph.mjs} +11 -11
- package/{esm2015/queries/is-first-child.js → esm2020/queries/is-first-child.mjs} +5 -5
- package/{esm2015/queries/is-include-types.js → esm2020/queries/is-include-types.mjs} +11 -11
- package/{esm2015/queries/is-node-type-in.js → esm2020/queries/is-node-type-in.mjs} +9 -9
- package/{esm2015/queries/is-node-type.js → esm2020/queries/is-node-type.mjs} +15 -15
- package/{esm2015/queries/is-paragraph.js → esm2020/queries/is-paragraph.mjs} +9 -9
- package/{esm2015/queries/is-point-at-root.js → esm2020/queries/is-point-at-root.mjs} +2 -2
- package/esm2020/queries/is-range-across-blocks.mjs +22 -0
- package/{esm2015/queries/is-range-at-root.js → esm2020/queries/is-range-at-root.mjs} +3 -3
- package/{esm2015/queries/is-start.js → esm2020/queries/is-start.mjs} +6 -6
- package/{esm2015/queries/some-node.js → esm2020/queries/some-node.mjs} +9 -9
- package/{esm2015/services/color-select.service.js → esm2020/services/color-select.service.mjs} +50 -50
- package/esm2020/services/context.service.mjs +59 -0
- package/{esm2015/services/table-contextmenu.service.js → esm2020/services/table-contextmenu.service.mjs} +190 -190
- package/esm2020/services/toolbar.service.mjs +48 -0
- package/{esm2015/shortcuts/index.js → esm2020/shortcuts/index.mjs} +5 -5
- package/{esm2015/shortcuts/mark.js → esm2020/shortcuts/mark.mjs} +24 -24
- package/{esm2015/transforms/apply-deep-to-nodes.js → esm2020/transforms/apply-deep-to-nodes.mjs} +21 -21
- package/{esm2015/transforms/clear-marks.js → esm2020/transforms/clear-marks.mjs} +23 -23
- package/{esm2015/transforms/close-conversion-hint.js → esm2020/transforms/close-conversion-hint.mjs} +8 -8
- package/{esm2015/transforms/delete-element.js → esm2020/transforms/delete-element.mjs} +11 -11
- package/{esm2015/transforms/handle-continual-delete-backward.js → esm2020/transforms/handle-continual-delete-backward.mjs} +17 -17
- package/{esm2015/transforms/handle-continual-insert-break.js → esm2020/transforms/handle-continual-insert-break.mjs} +19 -19
- package/{esm2015/transforms/index.js → esm2020/transforms/index.mjs} +18 -18
- package/esm2020/transforms/insert-elements.mjs +34 -0
- package/{esm2015/transforms/insert-paragraph.js → esm2020/transforms/insert-paragraph.mjs} +6 -6
- package/esm2020/transforms/merge-deep-to-nodes.mjs +9 -0
- package/{esm2015/transforms/move-children.js → esm2020/transforms/move-children.mjs} +21 -21
- package/{esm2015/transforms/on-keydown-reset-block-type.js → esm2020/transforms/on-keydown-reset-block-type.mjs} +22 -22
- package/{esm2015/transforms/set-end-selection.js → esm2020/transforms/set-end-selection.mjs} +10 -10
- package/{esm2015/transforms/set-marks.js → esm2020/transforms/set-marks.mjs} +9 -9
- package/{esm2015/transforms/set-node.js → esm2020/transforms/set-node.mjs} +5 -5
- package/{esm2015/transforms/split-node.js → esm2020/transforms/split-node.mjs} +31 -31
- package/{esm2015/transforms/un-hang-range.js → esm2020/transforms/un-hang-range.mjs} +11 -11
- package/{esm2015/transforms/un-wrap.js → esm2020/transforms/un-wrap.mjs} +11 -11
- package/esm2020/transforms/unwrap-nodes-by-type.mjs +14 -0
- package/{esm2015/utils/auto-focus.js → esm2020/utils/auto-focus.mjs} +13 -13
- package/{esm2015/utils/auto-scroll-view.js → esm2020/utils/auto-scroll-view.mjs} +24 -24
- package/{esm2015/utils/cast-array.js → esm2020/utils/cast-array.mjs} +7 -7
- package/{esm2015/utils/common.js → esm2020/utils/common.mjs} +2 -2
- package/{esm2015/utils/create-empty-paragraph.js → esm2020/utils/create-empty-paragraph.mjs} +14 -14
- package/{esm2015/utils/data-transform.js → esm2020/utils/data-transform.mjs} +48 -48
- package/{esm2015/utils/dom.js → esm2020/utils/dom.mjs} +46 -46
- package/{esm2015/utils/editor-uuid.js → esm2020/utils/editor-uuid.mjs} +8 -8
- package/{esm2015/utils/fragment.js → esm2020/utils/fragment.mjs} +65 -65
- package/{esm2015/utils/get-editable-element-height.js → esm2020/utils/get-editable-element-height.mjs} +6 -6
- package/{esm2015/utils/get-toolbar-class.js → esm2020/utils/get-toolbar-class.mjs} +6 -6
- package/{esm2015/utils/id-creator.js → esm2020/utils/id-creator.mjs} +11 -11
- package/{esm2015/utils/index.js → esm2020/utils/index.mjs} +13 -13
- package/{esm2015/utils/is-clean-empty-paragraph.js → esm2020/utils/is-clean-empty-paragraph.mjs} +36 -36
- package/esm2020/utils/is-inline.mjs +9 -0
- package/{esm2015/utils/lodash.js → esm2020/utils/lodash.mjs} +3 -3
- package/esm2020/utils/match.mjs +32 -0
- package/{esm2015/utils/merge-element-options.js → esm2020/utils/merge-element-options.mjs} +19 -19
- package/{esm2015/utils/weak-maps.js → esm2020/utils/weak-maps.mjs} +3 -3
- package/{esm2015/worktile-theia.js → esm2020/worktile-theia.mjs} +4 -4
- package/fesm2015/{worktile-theia.js → worktile-theia.mjs} +13096 -13169
- package/fesm2015/worktile-theia.mjs.map +1 -0
- package/fesm2020/worktile-theia.mjs +13739 -0
- package/fesm2020/worktile-theia.mjs.map +1 -0
- package/interfaces/auto-format.d.ts +64 -64
- package/interfaces/editor.d.ts +146 -146
- package/interfaces/element.d.ts +9 -9
- package/interfaces/image.d.ts +25 -25
- package/interfaces/index.d.ts +8 -8
- package/interfaces/plugins/index.d.ts +4 -4
- package/interfaces/plugins/no-infer.d.ts +1 -1
- package/interfaces/plugins/plugin-key.d.ts +48 -48
- package/interfaces/plugins/plugins.d.ts +45 -45
- package/interfaces/plugins/with-override.d.ts +7 -7
- package/interfaces/reset-block-type-plugin-options.d.ts +23 -23
- package/interfaces/toolbar.d.ts +64 -64
- package/interfaces/upload.d.ts +11 -11
- package/interfaces/utility/index.d.ts +3 -3
- package/interfaces/utility/nested-structure-by-key.d.ts +3 -3
- package/interfaces/utility/override-by-key.d.ts +3 -3
- package/interfaces/utility/types.d.ts +1 -1
- package/interfaces/valid-children-types.d.ts +9 -9
- package/interfaces/view-base.d.ts +9 -9
- package/package.json +19 -6
- package/pipes.d.ts +16 -16
- package/plugins/align/align.editor.d.ts +7 -7
- package/plugins/align/align.plugin.d.ts +2 -2
- package/plugins/autoformat/autoformat.plugin.d.ts +6 -6
- package/plugins/autoformat/transforms/auto-format-block.d.ts +5 -5
- package/plugins/autoformat/transforms/auto-format-inline.d.ts +9 -9
- package/plugins/blockquote/blockquote.component.d.ts +11 -11
- package/plugins/blockquote/blockquote.editor.d.ts +4 -4
- package/plugins/blockquote/blockquote.plugin.d.ts +2 -2
- package/plugins/code/code.component.d.ts +65 -65
- package/plugins/code/code.editor.d.ts +8 -8
- package/plugins/code/code.plugin.d.ts +2 -2
- package/plugins/color/color.editor.d.ts +8 -8
- package/plugins/color/color.plugin.d.ts +1 -1
- package/plugins/color/toolbar-item.component.d.ts +16 -16
- package/plugins/common/auto-insert-data..d.ts +2 -2
- package/plugins/common/block-card.plugin.d.ts +2 -2
- package/plugins/common/get-fragment.plugin.d.ts +6 -6
- package/plugins/common/history.plugin.d.ts +9 -9
- package/plugins/common/move-selection.plugin.d.ts +2 -2
- package/plugins/common/remove-empty.plugin.d.ts +2 -2
- package/plugins/common/remove-void.plugin.d.ts +2 -2
- package/plugins/common/reset-type.plugin.d.ts +2 -2
- package/plugins/common/transforms.plugin.d.ts +8 -8
- package/plugins/deserializers/deserialize-html.plugin.d.ts +2 -2
- package/plugins/deserializers/deserialize-md.plugin.d.ts +2 -2
- package/plugins/font-size/font-size.editor.d.ts +10 -10
- package/plugins/heading/heading.editor.d.ts +9 -9
- package/plugins/heading/heading.plugin.d.ts +7 -7
- package/plugins/hr/hr.component.d.ts +12 -12
- package/plugins/hr/hr.editor.d.ts +4 -4
- package/plugins/hr/hr.plugin.d.ts +2 -2
- package/plugins/image/image.component.d.ts +74 -74
- package/plugins/image/image.editor.d.ts +12 -12
- package/plugins/image/image.plugin.d.ts +7 -7
- package/plugins/indent/indent.editor.d.ts +10 -10
- package/plugins/indent/indent.plugin.d.ts +8 -8
- package/plugins/indent/on-keydown-indent.d.ts +3 -3
- package/plugins/index.d.ts +1 -1
- package/plugins/inline-code/inline-code.component.d.ts +9 -9
- package/plugins/inline-code/inline-code.editor.d.ts +7 -7
- package/plugins/inline-code/inline-code.plugin.d.ts +2 -2
- package/plugins/link/edit/link-edit.component.d.ts +36 -36
- package/plugins/link/hover/link-hover.component.d.ts +15 -15
- package/plugins/link/link.component.d.ts +39 -39
- package/plugins/link/link.editor.d.ts +7 -7
- package/plugins/link/link.plugin.d.ts +2 -2
- package/plugins/link/link.types.d.ts +9 -9
- package/plugins/list/components/bulleted-list.component.d.ts +15 -15
- package/plugins/list/components/list-item.component.d.ts +20 -20
- package/plugins/list/components/numbered-list.component.d.ts +16 -16
- package/plugins/list/list.editor.d.ts +12 -12
- package/plugins/list/list.plugin.d.ts +3 -3
- package/plugins/list/normalizers/get-list-normalizer.d.ts +6 -6
- package/plugins/list/normalizers/normalize-list-item.d.ts +5 -5
- package/plugins/list/normalizers/normalize-no.d.ts +2 -2
- package/plugins/list/on-key-down-list.d.ts +2 -2
- package/plugins/list/queries/get-list-item-entry.d.ts +10 -10
- package/plugins/list/queries/get-list-item-sublist.d.ts +6 -6
- package/plugins/list/queries/get-list-types.d.ts +2 -2
- package/plugins/list/queries/get-start-list-item.d.ts +8 -8
- package/plugins/list/queries/has-list-in-list-item.d.ts +15 -15
- package/plugins/list/queries/is-in-list.d.ts +2 -2
- package/plugins/list/queries/is-list-nested.d.ts +5 -5
- package/plugins/list/queries/is-list.d.ts +2 -2
- package/plugins/list/queries/is-node-type-list.d.ts +2 -2
- package/plugins/list/queries/is-selection-at-list-item-start.d.ts +5 -5
- package/plugins/list/queries/is-selection-in-same-list-item.d.ts +5 -5
- package/plugins/list/queries/is-single-list-item.d.ts +5 -5
- package/plugins/list/transforms/insert-list-data.d.ts +12 -12
- package/plugins/list/transforms/insert-list-item.d.ts +5 -5
- package/plugins/list/transforms/move-list-item-down.d.ts +6 -6
- package/plugins/list/transforms/move-list-item-sublist-items-to-list-item-sublist.d.ts +20 -20
- package/plugins/list/transforms/move-list-item-sublist-items-to-list.d.ts +19 -19
- package/plugins/list/transforms/move-list-item-up.d.ts +10 -10
- package/plugins/list/transforms/unwrap-list.d.ts +2 -2
- package/plugins/list/types.d.ts +7 -7
- package/plugins/mark/mark.editor.d.ts +8 -8
- package/plugins/mark/mark.plugin.d.ts +3 -3
- package/plugins/node-id/node-id.plugin.d.ts +8 -8
- package/plugins/normalizers/insert-paragraph-nodes.d.ts +7 -7
- package/plugins/normalizers/remove-empty-nodes.d.ts +7 -7
- package/plugins/normalizers/trailing-node.plugin.d.ts +9 -9
- package/plugins/paint-format/paint-format.editor.d.ts +8 -8
- package/plugins/public-api.d.ts +15 -15
- package/plugins/quick-insert/components/quick-insert.component.d.ts +28 -28
- package/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.d.ts +28 -28
- package/plugins/quick-insert/quick-insert.editor.d.ts +7 -7
- package/plugins/quick-insert/quick-insert.plugin.d.ts +10 -10
- package/plugins/soft-break/soft-break.plugin.d.ts +5 -5
- package/plugins/soft-break/soft-break.types.d.ts +8 -8
- package/plugins/table/components/insert-mark/insert-mark.component.d.ts +24 -24
- package/plugins/table/components/row/row.component.d.ts +14 -14
- package/plugins/table/components/table.component.d.ts +79 -79
- package/plugins/table/components/td/td.component.d.ts +95 -95
- package/plugins/table/components/toolbar/table-options.component.d.ts +20 -20
- package/plugins/table/components/toolbar/table-toolbar.component.d.ts +38 -38
- package/plugins/table/table.editor.d.ts +25 -25
- package/plugins/table/table.plugin.d.ts +3 -3
- package/plugins/table/table.service.d.ts +30 -30
- package/plugins/table/table.store.d.ts +71 -71
- package/plugins/table/table.types.d.ts +67 -67
- package/plugins/table/toolbar-item.component.d.ts +17 -17
- package/plugins/table/transforms/clear-cell.d.ts +6 -6
- package/plugins/table/transforms/clear-table-node.d.ts +6 -6
- package/plugins/table/transforms/insert-column.d.ts +12 -12
- package/plugins/table/transforms/insert-row.d.ts +6 -6
- package/plugins/table/transforms/insert-table.d.ts +6 -6
- package/plugins/table/transforms/remove-column.d.ts +3 -3
- package/plugins/table/transforms/remove-row.d.ts +3 -3
- package/plugins/table/transforms/remove-table.d.ts +3 -3
- package/plugins/table/utils/add-columns.d.ts +2 -2
- package/plugins/table/utils/calc-anchor-position.d.ts +6 -6
- package/plugins/table/utils/calc-span.d.ts +11 -11
- package/plugins/table/utils/create-cell.d.ts +16 -16
- package/plugins/table/utils/create-row.d.ts +7 -7
- package/plugins/table/utils/create-table.d.ts +7 -7
- package/plugins/table/utils/get-base-height.d.ts +9 -9
- package/plugins/table/utils/get-select-cell-node.d.ts +7 -7
- package/plugins/table/utils/index.d.ts +7 -7
- package/plugins/table/utils/is-range-in-table.d.ts +6 -6
- package/plugins/table/utils/is-selection-in-table.d.ts +6 -6
- package/plugins/table/utils/is-virtual-key.d.ts +1 -1
- package/plugins/table/utils/merge-cell.d.ts +21 -21
- package/plugins/table/utils/next-path.d.ts +2 -2
- package/plugins/table/utils/normalize-table.d.ts +2 -2
- package/plugins/table/utils/remove-columns.d.ts +2 -2
- package/plugins/table/utils/set-menu-cell-invisibility.d.ts +3 -3
- package/plugins/table/utils/split-cell.d.ts +4 -4
- package/plugins/table/utils/table-position.d.ts +97 -97
- package/plugins/todo-item/todo-item.component.d.ts +21 -21
- package/plugins/todo-item/todo-item.editor.d.ts +5 -5
- package/plugins/todo-item/todo-item.plugin.d.ts +5 -5
- package/plugins/vertical-align/toolbar-item.component.d.ts +25 -25
- package/plugins/vertical-align/vertical-align.editor.d.ts +7 -7
- package/public-api.d.ts +20 -20
- package/queries/anchor-block-entry.d.ts +2 -2
- package/queries/anchor-block.d.ts +2 -2
- package/queries/anchor-inline-entry.d.ts +2 -2
- package/queries/find-descendant.d.ts +10 -10
- package/queries/find-node.d.ts +15 -15
- package/queries/find-path.d.ts +6 -6
- package/queries/get-above-by-type.d.ts +6 -6
- package/queries/get-above.d.ts +6 -6
- package/queries/get-anchor-block-entry.d.ts +2 -2
- package/queries/get-block-above.d.ts +7 -7
- package/queries/get-block-card-above.d.ts +7 -7
- package/queries/get-block-card-cursor.d.ts +2 -2
- package/queries/get-container-blocks.d.ts +2 -2
- package/queries/get-directly-parent.d.ts +2 -2
- package/queries/get-insert-elements-path.d.ts +7 -7
- package/queries/get-last-child-path.d.ts +6 -6
- package/queries/get-last-node.d.ts +2 -2
- package/queries/get-next-sibling-nodes.d.ts +7 -7
- package/queries/get-node.d.ts +2 -2
- package/queries/get-nodes-by-type.d.ts +6 -6
- package/queries/get-nodes.d.ts +4 -4
- package/queries/get-parent.d.ts +7 -7
- package/queries/get-plain-text.d.ts +6 -6
- package/queries/get-plugin-by-toolbar.d.ts +3 -3
- package/queries/get-point-before.d.ts +38 -38
- package/queries/get-point-from-location.d.ts +5 -5
- package/queries/get-previous-path.d.ts +2 -2
- package/queries/get-rang-from-block-start.d.ts +9 -9
- package/queries/get-range-before.d.ts +7 -7
- package/queries/get-selection-marks.d.ts +12 -12
- package/queries/get-selection-nodes-by-type.d.ts +3 -3
- package/queries/get-text.d.ts +6 -6
- package/queries/get-toolbar-disabled.d.ts +4 -4
- package/queries/index.d.ts +58 -58
- package/queries/is-across-blocks.d.ts +2 -2
- package/queries/is-ancestor-empty.d.ts +5 -5
- package/queries/is-ancestor.d.ts +2 -2
- package/queries/is-block-above-empty.d.ts +5 -5
- package/queries/is-block-active.d.ts +3 -3
- package/queries/is-block-card-cursor.d.ts +2 -2
- package/queries/is-block-text-empty-after-selection.d.ts +7 -7
- package/queries/is-collapsed.d.ts +6 -6
- package/queries/is-contain-nested-type.d.ts +2 -2
- package/queries/is-container-type.d.ts +2 -2
- package/queries/is-descendant.d.ts +2 -2
- package/queries/is-empty-content.d.ts +2 -2
- package/queries/is-empty-paragraph-by-path.d.ts +2 -2
- package/queries/is-empty-paragraph.d.ts +2 -2
- package/queries/is-first-child.d.ts +5 -5
- package/queries/is-include-types.d.ts +3 -3
- package/queries/is-node-type-in.d.ts +6 -6
- package/queries/is-node-type.d.ts +6 -6
- package/queries/is-paragraph.d.ts +2 -2
- package/queries/is-point-at-root.d.ts +2 -2
- package/queries/is-range-across-blocks.d.ts +8 -8
- package/queries/is-range-at-root.d.ts +2 -2
- package/queries/is-start.d.ts +5 -5
- package/queries/some-node.d.ts +7 -7
- package/services/color-select.service.d.ts +20 -20
- package/services/context.service.d.ts +49 -49
- package/services/table-contextmenu.service.d.ts +25 -25
- package/services/toolbar.service.d.ts +9 -9
- package/shortcuts/index.d.ts +2 -2
- package/shortcuts/mark.d.ts +2 -2
- package/transforms/apply-deep-to-nodes.d.ts +12 -12
- package/transforms/clear-marks.d.ts +2 -2
- package/transforms/close-conversion-hint.d.ts +2 -2
- package/transforms/delete-element.d.ts +2 -2
- package/transforms/handle-continual-delete-backward.d.ts +3 -3
- package/transforms/handle-continual-insert-break.d.ts +3 -3
- package/transforms/index.d.ts +18 -18
- package/transforms/insert-elements.d.ts +2 -2
- package/transforms/insert-paragraph.d.ts +2 -2
- package/transforms/merge-deep-to-nodes.d.ts +5 -5
- package/transforms/move-children.d.ts +24 -24
- package/transforms/on-keydown-reset-block-type.d.ts +3 -3
- package/transforms/set-end-selection.d.ts +2 -2
- package/transforms/set-marks.d.ts +12 -12
- package/transforms/set-node.d.ts +2 -2
- package/transforms/split-node.d.ts +3 -3
- package/transforms/un-hang-range.d.ts +10 -10
- package/transforms/un-wrap.d.ts +3 -3
- package/transforms/unwrap-nodes-by-type.d.ts +6 -6
- package/utils/auto-focus.d.ts +2 -2
- package/utils/auto-scroll-view.d.ts +6 -6
- package/utils/cast-array.d.ts +1 -1
- package/utils/common.d.ts +2 -2
- package/utils/create-empty-paragraph.d.ts +2 -2
- package/utils/data-transform.d.ts +6 -6
- package/utils/dom.d.ts +10 -10
- package/utils/editor-uuid.d.ts +3 -3
- package/utils/fragment.d.ts +10 -10
- package/utils/get-editable-element-height.d.ts +2 -2
- package/utils/get-toolbar-class.d.ts +2 -2
- package/utils/id-creator.d.ts +1 -1
- package/utils/index.d.ts +13 -13
- package/utils/is-clean-empty-paragraph.d.ts +9 -9
- package/utils/is-inline.d.ts +2 -2
- package/utils/lodash.d.ts +1 -1
- package/utils/match.d.ts +18 -18
- package/utils/merge-element-options.d.ts +2 -2
- package/utils/weak-maps.d.ts +5 -5
- package/worktile-theia.d.ts +5 -5
- package/bundles/worktile-theia.umd.js +0 -14919
- package/bundles/worktile-theia.umd.js.map +0 -1
- package/esm2015/components/color-select/color-select.component.js +0 -113
- package/esm2015/components/column-resize/column-resize-notifier.js +0 -31
- package/esm2015/components/column-resize/column-resize.module.js +0 -34
- package/esm2015/components/contextmenu/contextmenu.component.js +0 -64
- package/esm2015/components/conversion-hint/conversion-hint.component.js +0 -59
- package/esm2015/components/element/element.component.js +0 -24
- package/esm2015/components/inline-toolbar/inline-toolbar.component.js +0 -139
- package/esm2015/components/table-select/table-select.component.js +0 -53
- package/esm2015/components/template/template.component.js +0 -66
- package/esm2015/components/toolbar/toolbar.component.js +0 -250
- package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +0 -133
- package/esm2015/components/toolbar-group/toolbar-group.component.js +0 -116
- package/esm2015/components/toolbar-item/toolbar-item.component.js +0 -105
- package/esm2015/core/create-toolbar.js +0 -57
- package/esm2015/core/toolbar-item/base-toolbar-item.js +0 -92
- package/esm2015/core/utils/get-plugin-options.js +0 -3
- package/esm2015/core/utils/get-plugins.js +0 -5
- package/esm2015/core/utils/merge-array.js +0 -18
- package/esm2015/editor.component.js +0 -440
- package/esm2015/interfaces/editor.js +0 -23
- package/esm2015/interfaces/reset-block-type-plugin-options.js +0 -2
- package/esm2015/interfaces/upload.js +0 -2
- package/esm2015/plugins/align/align.editor.js +0 -48
- package/esm2015/plugins/autoformat/autoformat.plugin.js +0 -110
- package/esm2015/plugins/blockquote/blockquote.editor.js +0 -21
- package/esm2015/plugins/code/code.component.js +0 -245
- package/esm2015/plugins/color/color.editor.js +0 -45
- package/esm2015/plugins/color/toolbar-item.component.js +0 -124
- package/esm2015/plugins/common/auto-insert-data..js +0 -78
- package/esm2015/plugins/common/get-fragment.plugin.js +0 -25
- package/esm2015/plugins/font-size/font-size.editor.js +0 -98
- package/esm2015/plugins/image/image.component.js +0 -370
- package/esm2015/plugins/image/image.plugin.js +0 -58
- package/esm2015/plugins/indent/indent.editor.js +0 -73
- package/esm2015/plugins/indent/indent.plugin.js +0 -60
- package/esm2015/plugins/link/edit/link-edit.component.js +0 -108
- package/esm2015/plugins/link/hover/link-hover.component.js +0 -39
- package/esm2015/plugins/list/components/bulleted-list.component.js +0 -34
- package/esm2015/plugins/list/components/list-item.component.js +0 -95
- package/esm2015/plugins/list/components/numbered-list.component.js +0 -40
- package/esm2015/plugins/list/list.plugin.js +0 -281
- package/esm2015/plugins/list/normalizers/normalize-list-item.js +0 -19
- package/esm2015/plugins/list/types.js +0 -2
- package/esm2015/plugins/mark/mark.editor.js +0 -29
- package/esm2015/plugins/mark/mark.plugin.js +0 -102
- package/esm2015/plugins/node-id/node-id.plugin.js +0 -69
- package/esm2015/plugins/normalizers/insert-paragraph-nodes.js +0 -29
- package/esm2015/plugins/normalizers/trailing-node.plugin.js +0 -34
- package/esm2015/plugins/quick-insert/components/quick-insert.component.js +0 -102
- package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +0 -84
- package/esm2015/plugins/quick-insert/quick-insert.plugin.js +0 -75
- package/esm2015/plugins/soft-break/soft-break.plugin.js +0 -37
- package/esm2015/plugins/table/components/insert-mark/insert-mark.component.js +0 -103
- package/esm2015/plugins/table/components/table.component.js +0 -470
- package/esm2015/plugins/table/components/td/td.component.js +0 -698
- package/esm2015/plugins/table/components/toolbar/table-toolbar.component.js +0 -162
- package/esm2015/plugins/table/table.plugin.js +0 -424
- package/esm2015/plugins/table/table.store.js +0 -480
- package/esm2015/plugins/table/toolbar-item.component.js +0 -86
- package/esm2015/plugins/table/transforms/clear-cell.js +0 -11
- package/esm2015/plugins/table/transforms/insert-table.js +0 -15
- package/esm2015/plugins/todo-item/todo-item.component.js +0 -66
- package/esm2015/plugins/vertical-align/toolbar-item.component.js +0 -90
- package/esm2015/queries/get-above-by-type.js +0 -11
- package/esm2015/queries/get-block-above.js +0 -7
- package/esm2015/queries/get-block-card-above.js +0 -7
- package/esm2015/queries/get-nodes-by-type.js +0 -12
- package/esm2015/queries/get-plain-text.js +0 -16
- package/esm2015/queries/get-selection-marks.js +0 -19
- package/esm2015/queries/get-toolbar-disabled.js +0 -14
- package/esm2015/queries/is-range-across-blocks.js +0 -18
- package/esm2015/services/context.service.js +0 -60
- package/esm2015/services/toolbar.service.js +0 -48
- package/esm2015/transforms/insert-elements.js +0 -35
- package/esm2015/transforms/merge-deep-to-nodes.js +0 -9
- package/esm2015/transforms/unwrap-nodes-by-type.js +0 -11
- package/esm2015/utils/is-inline.js +0 -10
- package/esm2015/utils/match.js +0 -29
- package/fesm2015/worktile-theia.js.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { getToolbarClass } from '../utils';
|
|
2
|
+
import { DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition } from '../constants/toolbar';
|
|
3
|
+
const toolbarInitialize = (toolbarItems, global = DefaultGlobalToolbarDefinition, inline = DefaultInlineToolbarDefinition, quick = DefaultQuickToolbarDefinition) => {
|
|
4
|
+
const toolbarDefinition = {
|
|
5
|
+
global,
|
|
6
|
+
inline,
|
|
7
|
+
quick
|
|
8
|
+
};
|
|
9
|
+
const toolbarOperations = new Map();
|
|
10
|
+
toolbarItems.forEach(i => toolbarOperations.set(i.key, i));
|
|
11
|
+
const toolbarEntity = nextToolbarEntity(toolbarDefinition, toolbarOperations);
|
|
12
|
+
return {
|
|
13
|
+
toolbarDefinition,
|
|
14
|
+
toolbarOperations,
|
|
15
|
+
toolbarEntity
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
const nextToolbarEntity = (toolbarDefinition, toolbarItems) => {
|
|
19
|
+
const entity = {};
|
|
20
|
+
for (const defKey in toolbarDefinition) {
|
|
21
|
+
entity[defKey] = getToolbarItemByKeys(toolbarDefinition[defKey], toolbarItems);
|
|
22
|
+
}
|
|
23
|
+
return entity;
|
|
24
|
+
};
|
|
25
|
+
const getToolbarItemByKeys = (keys, toolbarItems) => {
|
|
26
|
+
const items = [];
|
|
27
|
+
keys.forEach((key) => {
|
|
28
|
+
if (key === `split`) {
|
|
29
|
+
items.push({ key: `split` });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const item = toolbarItems.get(key);
|
|
33
|
+
if (item && item.includes) {
|
|
34
|
+
items.push({ ...item, includes: getToolbarItemByKeys(item.includes, toolbarItems) });
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (item) {
|
|
38
|
+
items.push(item);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return items;
|
|
42
|
+
};
|
|
43
|
+
export const createToolbar = (editor, toolbar) => {
|
|
44
|
+
const toolbarItems = editor?.plugins.reduce((prevItems, nextPlugin) => {
|
|
45
|
+
prevItems.push(...(nextPlugin?.toolbarItems ?? []));
|
|
46
|
+
return prevItems;
|
|
47
|
+
}, []);
|
|
48
|
+
const toolbarOption = toolbarInitialize(toolbarItems, toolbar?.global, toolbar?.inline, toolbar?.quick);
|
|
49
|
+
const globalToolbarClass = ['the-global-toolbar', getToolbarClass(editor)];
|
|
50
|
+
const toolbarEntity = toolbarOption.toolbarEntity;
|
|
51
|
+
return {
|
|
52
|
+
globalToolbarClass,
|
|
53
|
+
toolbarEntity
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXRvb2xiYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29yZS9jcmVhdGUtdG9vbGJhci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sVUFBVSxDQUFDO0FBQzNDLE9BQU8sRUFBRSw4QkFBOEIsRUFBRSw4QkFBOEIsRUFBRSw2QkFBNkIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBRXJJLE1BQU0saUJBQWlCLEdBQUcsQ0FDdEIsWUFBMkIsRUFDM0IsU0FBbUIsOEJBQThCLEVBQ2pELFNBQW1CLDhCQUE4QixFQUNqRCxRQUFrQiw2QkFBNkIsRUFDOUIsRUFBRTtJQUNuQixNQUFNLGlCQUFpQixHQUFHO1FBQ3RCLE1BQU07UUFDTixNQUFNO1FBQ04sS0FBSztLQU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ayk7XG4gICAgY29uc3QgZ2xvYmFsVG9vbGJhckNsYXNzID0gWyd0aGUtZ2xvYmFsLXRvb2xiYXInLCBnZXRUb29sYmFyQ2xhc3MoZWRpdG9yKV07XG4gICAgY29uc3QgdG9vbGJhckVudGl0eSA9IHRvb2xiYXJPcHRpb24udG9vbGJhckVudGl0eTtcblxuICAgIHJldHVybiB7XG4gICAgICAgIGdsb2JhbFRvb2xiYXJDbGFzcyxcbiAgICAgICAgdG9vbGJhckVudGl0eVxuICAgIH07XG59O1xuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './with-theia';
|
|
2
|
-
export * from './create-plugin';
|
|
3
|
-
export * from './create-toolbar';
|
|
4
|
-
export * from './utils/index';
|
|
1
|
+
export * from './with-theia';
|
|
2
|
+
export * from './create-plugin';
|
|
3
|
+
export * from './create-toolbar';
|
|
4
|
+
export * from './utils/index';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29yZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxlQUFlLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3dpdGgtdGhlaWEnO1xuZXhwb3J0ICogZnJvbSAnLi9jcmVhdGUtcGx1Z2luJztcbmV4cG9ydCAqIGZyb20gJy4vY3JlYXRlLXRvb2xiYXInO1xuZXhwb3J0ICogZnJvbSAnLi91dGlscy9pbmRleCc7XG4iXX0=
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Directive, HostBinding, Input } from '@angular/core';
|
|
2
|
+
import { Editor, Transforms } from 'slate';
|
|
3
|
+
import { AngularEditor } from 'slate-angular';
|
|
4
|
+
import { DropdownMode } from '../../constants/toolbar';
|
|
5
|
+
import * as TheQueries from '../../queries';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class TheBaseToolbarItem {
|
|
8
|
+
set toolbarItem(value) {
|
|
9
|
+
this._toolbarItem = value;
|
|
10
|
+
}
|
|
11
|
+
get toolbarItem() {
|
|
12
|
+
return this._toolbarItem;
|
|
13
|
+
}
|
|
14
|
+
get disabledState() {
|
|
15
|
+
return this.disabled;
|
|
16
|
+
}
|
|
17
|
+
get activeState() {
|
|
18
|
+
return this.active;
|
|
19
|
+
}
|
|
20
|
+
execute(event) {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
if (!this.itemMousedownHandle && !this.editor?.selection) {
|
|
24
|
+
const lastNode = TheQueries.getLastNode(this.editor, 1);
|
|
25
|
+
const end = Editor.end(this.editor, lastNode[1]);
|
|
26
|
+
Transforms.select(this.editor, end);
|
|
27
|
+
AngularEditor.focus(this.editor);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
selectionChange(editor) {
|
|
31
|
+
if (editor.selection) {
|
|
32
|
+
this.active = this._toolbarItem?.active ? this._toolbarItem?.active(editor) : false;
|
|
33
|
+
if (this._toolbarItem?.disable) {
|
|
34
|
+
this.disabled = this._toolbarItem?.disable ? this._toolbarItem?.disable(editor) : false;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const thePlugin = TheQueries.getPluginByToolbarItem(editor, this._toolbarItem);
|
|
38
|
+
this.disabled = thePlugin && TheQueries.getToolbarItemDisabled(editor, thePlugin.key);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
44
|
+
TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
|
|
46
|
+
type: Directive
|
|
47
|
+
}], propDecorators: { toolbarItem: [{
|
|
48
|
+
type: Input
|
|
49
|
+
}], editor: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], disabledState: [{
|
|
52
|
+
type: HostBinding,
|
|
53
|
+
args: ['class.disabled']
|
|
54
|
+
}], activeState: [{
|
|
55
|
+
type: HostBinding,
|
|
56
|
+
args: ['class.active']
|
|
57
|
+
}] } });
|
|
58
|
+
export class TheBaseToolbarDropdown extends TheBaseToolbarItem {
|
|
59
|
+
constructor() {
|
|
60
|
+
super(...arguments);
|
|
61
|
+
this.mode = DropdownMode.text;
|
|
62
|
+
}
|
|
63
|
+
get defaultDropdownItem() {
|
|
64
|
+
const activeItem = this.dropdownItemKey && this.menus.find((item) => item.key === this.dropdownItemKey);
|
|
65
|
+
return activeItem ? activeItem : this.menus[0];
|
|
66
|
+
}
|
|
67
|
+
selectionChange(editor) {
|
|
68
|
+
super.selectionChange(editor);
|
|
69
|
+
const activeItem = this.menus.find(i => {
|
|
70
|
+
if (i?.active) {
|
|
71
|
+
return i?.active(editor);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
if (!this.toolbarItem.dropdownFixedIcon) {
|
|
75
|
+
this.activeMenuItem = activeItem ? activeItem : this.defaultDropdownItem;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
80
|
+
TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0 });
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
|
|
82
|
+
type: Directive
|
|
83
|
+
}], propDecorators: { menus: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], mode: [{
|
|
86
|
+
type: Input
|
|
87
|
+
}], dropdownItemKey: [{
|
|
88
|
+
type: Input
|
|
89
|
+
}] } });
|
|
90
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS10b29sYmFyLWl0ZW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29yZS90b29sYmFyLWl0ZW0vYmFzZS10b29sYmFyLWl0ZW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzlELE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sT0FBTyxDQUFDO0FBQzNDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDOUMsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRXZELE9BQU8sS0FBSyxVQUFVLE1BQU0sZUFBZSxDQUFDOztBQUc1QyxNQUFNLE9BQWdCLGtCQUFrQjtJQUNwQyxJQUNJLFdBQVcsQ0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ge1xuICAgICAgICAgICAgaWYgKGk/LmFjdGl2ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpPy5hY3RpdmUoZWRpdG9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmICghdGhpcy50b29sYmFySXRlbS5kcm9wZG93bkZpeGVkSWNvbikge1xuICAgICAgICAgICAgdGhpcy5hY3RpdmVNZW51SXRlbSA9IGFjdGl2ZUl0ZW0gPyBhY3RpdmVJdGVtIDogdGhpcy5kZWZhdWx0RHJvcGRvd25JdGVtO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export const combinePlugins = (editor) => {
|
|
2
|
-
// withOverrides
|
|
3
|
-
editor.plugins.forEach((plugin) => {
|
|
4
|
-
if (plugin.withOverrides) {
|
|
5
|
-
editor = plugin.withOverrides(editor, plugin);
|
|
6
|
-
}
|
|
7
|
-
});
|
|
8
|
-
return editor;
|
|
9
|
-
};
|
|
1
|
+
export const combinePlugins = (editor) => {
|
|
2
|
+
// withOverrides
|
|
3
|
+
editor.plugins.forEach((plugin) => {
|
|
4
|
+
if (plugin.withOverrides) {
|
|
5
|
+
editor = plugin.withOverrides(editor, plugin);
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
return editor;
|
|
9
|
+
};
|
|
10
10
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tYmluZS1wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvc3JjL2NvcmUvdXRpbHMvY29tYmluZS1wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sQ0FBQyxNQUFNLGNBQWMsR0FBRyxDQUFDLE1BQWlCLEVBQWEsRUFBRTtJQUMzRCxnQkFBZ0I7SUFDaEIsTUFBTSxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxNQUFxQixFQUFFLEVBQUU7UUFDN0MsSUFBSSxNQUFNLENBQUMsYUFBYSxFQUFFO1lBQ3RCLE1BQU0sR0FBRyxNQUFNLENBQUMsYUFBYSxDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsQ0FBQztTQUNqRDtJQUNMLENBQUMsQ0FBQyxDQUFDO0lBQ0gsT0FBTyxNQUFNLENBQUM7QUFDbEIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVGhlRWRpdG9yLCBXaXRoVGhlUGx1Z2luIH0gZnJvbSAnLi4vLi4vaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCBjb25zdCBjb21iaW5lUGx1Z2lucyA9IChlZGl0b3I6IFRoZUVkaXRvcik6IFRoZUVkaXRvciA9PiB7XG4gICAgLy8gd2l0aE92ZXJyaWRlc1xuICAgIGVkaXRvci5wbHVnaW5zLmZvckVhY2goKHBsdWdpbjogV2l0aFRoZVBsdWdpbikgPT4ge1xuICAgICAgICBpZiAocGx1Z2luLndpdGhPdmVycmlkZXMpIHtcbiAgICAgICAgICAgIGVkaXRvciA9IHBsdWdpbi53aXRoT3ZlcnJpZGVzKGVkaXRvciwgcGx1Z2luKTtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIHJldHVybiBlZGl0b3I7XG59O1xuIl19
|
package/{esm2015/core/utils/flatten-deep-plugins.js → esm2020/core/utils/flatten-deep-plugins.mjs}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { _ } from '../../utils/lodash';
|
|
2
|
-
/**
|
|
3
|
-
* 循环 plugins 到 editor.plugins 和 editor.pluginsByKey
|
|
4
|
-
* 如果有 key 重复则进行覆盖
|
|
5
|
-
*/
|
|
6
|
-
export const flattenDeepPlugins = (editor, plugins) => {
|
|
7
|
-
if (!plugins)
|
|
8
|
-
return;
|
|
9
|
-
plugins.forEach((plugin) => {
|
|
10
|
-
let p = _.cloneDeep(plugin);
|
|
11
|
-
if (!p.options)
|
|
12
|
-
p.options = {};
|
|
13
|
-
if (!p.nestedStructureByKey)
|
|
14
|
-
p.nestedStructureByKey = {};
|
|
15
|
-
editor.plugins.push(p);
|
|
16
|
-
flattenDeepPlugins(editor, p.plugins);
|
|
17
|
-
});
|
|
18
|
-
};
|
|
1
|
+
import { _ } from '../../utils/lodash';
|
|
2
|
+
/**
|
|
3
|
+
* 循环 plugins 到 editor.plugins 和 editor.pluginsByKey
|
|
4
|
+
* 如果有 key 重复则进行覆盖
|
|
5
|
+
*/
|
|
6
|
+
export const flattenDeepPlugins = (editor, plugins) => {
|
|
7
|
+
if (!plugins)
|
|
8
|
+
return;
|
|
9
|
+
plugins.forEach((plugin) => {
|
|
10
|
+
let p = _.cloneDeep(plugin);
|
|
11
|
+
if (!p.options)
|
|
12
|
+
p.options = {};
|
|
13
|
+
if (!p.nestedStructureByKey)
|
|
14
|
+
p.nestedStructureByKey = {};
|
|
15
|
+
editor.plugins.push(p);
|
|
16
|
+
flattenDeepPlugins(editor, p.plugins);
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
19
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxhdHRlbi1kZWVwLXBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29yZS91dGlscy9mbGF0dGVuLWRlZXAtcGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFHdkM7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sa0JBQWtCLEdBQUcsQ0FBUyxNQUFpQixFQUFFLE9BQXdCLEVBQUUsRUFBRTtJQUN0RixJQUFJLENBQUMsT0FBTztRQUFFLE9BQU87SUF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7XG4gICAgICAgIGxldCBwID0gXy5jbG9uZURlZXAocGx1Z2luKTtcbiAgICAgICAgaWYgKCFwLm9wdGlvbnMpIHAub3B0aW9ucyA9IHt9IGFzIGFueTtcbiAgICAgICAgaWYgKCFwLm5lc3RlZFN0cnVjdHVyZUJ5S2V5KSBwLm5lc3RlZFN0cnVjdHVyZUJ5S2V5ID0ge307XG5cbiAgICAgICAgZWRpdG9yLnBsdWdpbnMucHVzaChwKTtcbiAgICAgICAgZmxhdHRlbkRlZXBQbHVnaW5zPFQ+KGVkaXRvciwgcC5wbHVnaW5zISk7XG4gICAgfSk7XG59O1xuIl19
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { getPlugin } from './get-plugin';
|
|
2
|
+
export const getPluginOptions = (editor, key) => getPlugin(editor, key)?.options ?? {};
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXBsdWdpbi1vcHRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvc3JjL2NvcmUvdXRpbHMvZ2V0LXBsdWdpbi1vcHRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFFekMsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsQ0FBaUIsTUFBaUIsRUFBRSxHQUFjLEVBQXNCLEVBQUUsQ0FDdEcsU0FBUyxDQUFPLE1BQU0sRUFBRSxHQUFHLENBQUMsRUFBRSxPQUFPLElBQUssRUFBeUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBsdWdpbktleSwgVGhlRWRpdG9yLCBUaGVQbHVnaW5PcHRpb24gfSBmcm9tICcuLi8uLi9pbnRlcmZhY2VzJztcbmltcG9ydCB7IGdldFBsdWdpbiB9IGZyb20gJy4vZ2V0LXBsdWdpbic7XG5cbmV4cG9ydCBjb25zdCBnZXRQbHVnaW5PcHRpb25zID0gPFAgPSB7fSwgVCA9IHt9PihlZGl0b3I6IFRoZUVkaXRvciwga2V5OiBQbHVnaW5LZXkpOiBUaGVQbHVnaW5PcHRpb248UD4gPT5cbiAgICBnZXRQbHVnaW48UCwgVD4oZWRpdG9yLCBrZXkpPy5vcHRpb25zID8/ICh7fSBhcyBUaGVQbHVnaW5PcHRpb248UD4pO1xuIl19
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const getPlugin = (editor, key) => editor.pluginsByKey[key];
|
|
1
|
+
export const getPlugin = (editor, key) => editor.pluginsByKey[key];
|
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXBsdWdpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3NyYy9jb3JlL3V0aWxzL2dldC1wbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsTUFBTSxDQUFDLE1BQU0sU0FBUyxHQUFHLENBQWlCLE1BQWlCLEVBQUUsR0FBYyxFQUF1QixFQUFFLENBQ2hHLE1BQU0sQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUF3QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUGx1Z2luS2V5LCBUaGVFZGl0b3IsIFdpdGhUaGVQbHVnaW4gfSBmcm9tICcuLi8uLi9pbnRlcmZhY2VzJztcblxuZXhwb3J0IGNvbnN0IGdldFBsdWdpbiA9IDxQID0ge30sIFQgPSB7fT4oZWRpdG9yOiBUaGVFZGl0b3IsIGtleTogUGx1Z2luS2V5KTogV2l0aFRoZVBsdWdpbjxULCBQPiA9PlxuICAgIGVkaXRvci5wbHVnaW5zQnlLZXlba2V5XSBhcyBXaXRoVGhlUGx1Z2luPFQsIFA+O1xuIl19
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export const getPlugins = (editor) => {
|
|
2
|
+
return editor?.plugins ?? [];
|
|
3
|
+
};
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29yZS91dGlscy9nZXQtcGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxNQUFNLENBQUMsTUFBTSxVQUFVLEdBQUcsQ0FBUyxNQUFpQixFQUFrQixFQUFFO0lBQ3BFLE9BQU8sTUFBTSxFQUFFLE9BQU8sSUFBSSxFQUFFLENBQUM7QUFDakMsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVGhlRWRpdG9yLCBUaGVQbHVnaW4gfSBmcm9tICcuLi8uLi9pbnRlcmZhY2VzJztcblxuZXhwb3J0IGNvbnN0IGdldFBsdWdpbnMgPSA8VCA9IHt9PihlZGl0b3I6IFRoZUVkaXRvcik6IFRoZVBsdWdpbjxUPltdID0+IHtcbiAgICByZXR1cm4gZWRpdG9yPy5wbHVnaW5zID8/IFtdO1xufTtcbiJdfQ==
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from './flatten-deep-plugins';
|
|
2
|
-
export * from './get-plugins';
|
|
3
|
-
export * from './get-plugin';
|
|
4
|
-
export * from './get-plugin-options';
|
|
5
|
-
export * from './merge-options';
|
|
6
|
-
export * from './combine-plugins';
|
|
7
|
-
export * from './merge-deep-plugins';
|
|
8
|
-
export * from './nested-structure-by-key';
|
|
9
|
-
export * from './plugins-by-key';
|
|
10
|
-
export * from './merge-array';
|
|
1
|
+
export * from './flatten-deep-plugins';
|
|
2
|
+
export * from './get-plugins';
|
|
3
|
+
export * from './get-plugin';
|
|
4
|
+
export * from './get-plugin-options';
|
|
5
|
+
export * from './merge-options';
|
|
6
|
+
export * from './combine-plugins';
|
|
7
|
+
export * from './merge-deep-plugins';
|
|
8
|
+
export * from './nested-structure-by-key';
|
|
9
|
+
export * from './plugins-by-key';
|
|
10
|
+
export * from './merge-array';
|
|
11
11
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29yZS91dGlscy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsZUFBZSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9mbGF0dGVuLWRlZXAtcGx1Z2lucyc7XG5leHBvcnQgKiBmcm9tICcuL2dldC1wbHVnaW5zJztcbmV4cG9ydCAqIGZyb20gJy4vZ2V0LXBsdWdpbic7XG5leHBvcnQgKiBmcm9tICcuL2dldC1wbHVnaW4tb3B0aW9ucyc7XG5leHBvcnQgKiBmcm9tICcuL21lcmdlLW9wdGlvbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9jb21iaW5lLXBsdWdpbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9tZXJnZS1kZWVwLXBsdWdpbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9uZXN0ZWQtc3RydWN0dXJlLWJ5LWtleSc7XG5leHBvcnQgKiBmcm9tICcuL3BsdWdpbnMtYnkta2V5JztcbmV4cG9ydCAqIGZyb20gJy4vbWVyZ2UtYXJyYXknO1xuIl19
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isObject } from 'ngx-tethys/util';
|
|
2
|
+
export const mergeArray = (origin, source) => {
|
|
3
|
+
if (!Array.isArray(source))
|
|
4
|
+
return source;
|
|
5
|
+
for (let i = 0; i < source.length; i++) {
|
|
6
|
+
const value = source[i];
|
|
7
|
+
if (isObject(value) && value?.key && origin.some((item) => item?.key === value?.key)) {
|
|
8
|
+
let index = origin.findIndex((item) => item?.key === value?.key);
|
|
9
|
+
origin[index] = { ...origin[index], ...value };
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
if (origin.includes(source[i]))
|
|
13
|
+
continue;
|
|
14
|
+
origin.push(source[i]);
|
|
15
|
+
}
|
|
16
|
+
return origin;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVyZ2UtYXJyYXkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29yZS91dGlscy9tZXJnZS1hcnJheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFHM0MsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLENBQUksTUFBVyxFQUFFLE1BQVcsRUFBRSxFQUFFO0lBQ3RELElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQztRQUFFLE9BQU8sTUFBTSxDQUFDO0lBRTFDLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxNQUFNLENBQUMsTUFBTSxFQUFFLENBQ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kuaXNBcnJheShzb3VyY2UpKSByZXR1cm4gc291cmNlO1xuXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzb3VyY2UubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgY29uc3QgdmFsdWUgPSBzb3VyY2VbaV0gYXMgT3B0aW9uSXRlbTtcbiAgICAgICAgaWYgKGlzT2JqZWN0KHZhbHVlKSAmJiB2YWx1ZT8ua2V5ICYmIG9yaWdpbi5zb21lKChpdGVtOiBPcHRpb25JdGVtKSA9PiBpdGVtPy5rZXkgPT09IHZhbHVlPy5rZXkpKSB7XG4gICAgICAgICAgICBsZXQgaW5kZXggPSBvcmlnaW4uZmluZEluZGV4KChpdGVtOiBPcHRpb25JdGVtKSA9PiBpdGVtPy5rZXkgPT09IHZhbHVlPy5rZXkpO1xuICAgICAgICAgICAgb3JpZ2luW2luZGV4XSA9IHsgLi4ub3JpZ2luW2luZGV4XSwgLi4udmFsdWUgfTtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChvcmlnaW4uaW5jbHVkZXMoc291cmNlW2ldKSkgY29udGludWU7XG4gICAgICAgIG9yaWdpbi5wdXNoKHNvdXJjZVtpXSk7XG4gICAgfVxuICAgIHJldHVybiBvcmlnaW47XG59O1xuIl19
|
package/{esm2015/core/utils/merge-deep-plugins.js → esm2020/core/utils/merge-deep-plugins.mjs}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { mergeOptions } from './merge-options';
|
|
2
|
-
export const mergeDeepPlugins = (editor, _plugins) => {
|
|
3
|
-
_plugins.forEach(plugin => {
|
|
4
|
-
if (plugin.overrideByKey) {
|
|
5
|
-
const newPlugins = _plugins.filter(p => plugin.overrideByKey[p.key]);
|
|
6
|
-
newPlugins.forEach(p => {
|
|
7
|
-
if (editor.pluginsByKey[p.key]) {
|
|
8
|
-
mergeOptions(p, plugin.overrideByKey[p.key]);
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
};
|
|
1
|
+
import { mergeOptions } from './merge-options';
|
|
2
|
+
export const mergeDeepPlugins = (editor, _plugins) => {
|
|
3
|
+
_plugins.forEach(plugin => {
|
|
4
|
+
if (plugin.overrideByKey) {
|
|
5
|
+
const newPlugins = _plugins.filter(p => plugin.overrideByKey[p.key]);
|
|
6
|
+
newPlugins.forEach(p => {
|
|
7
|
+
if (editor.pluginsByKey[p.key]) {
|
|
8
|
+
mergeOptions(p, plugin.overrideByKey[p.key]);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
14
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVyZ2UtZGVlcC1wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvc3JjL2NvcmUvdXRpbHMvbWVyZ2UtZGVlcC1wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUUvQyxNQUFNLENBQUMsTUFBTSxnQkFBZ0IsR0FBRyxDQUFvRCxNQUFpQixFQUFFLFFBQVcsRUFBRSxFQUFFO0lBQ2xILFFBQVEsQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLEVBQUU7UUFDdEIsSUFBSSxNQUFNLENBQUMsYUFBYSxFQUFFO1lBQ3RCLE1BQU0sVUFBVSxHQUFHLFFBQVEsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxNQUFNLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO1lBRXJFLFVBQVUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUU7Z0JBQ25C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ZGVCeUtleVtwLmtleV0gYXMgT3ZlcnJpZGVCeUtleSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9KTtcbn07XG4iXX0=
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isObject } from 'ngx-tethys/util';
|
|
2
|
-
import { _ } from '../../utils/lodash';
|
|
3
|
-
import { mergeArray } from './merge-array';
|
|
4
|
-
export const mergeOptions = (plugin, override) => {
|
|
5
|
-
const { options } = plugin;
|
|
6
|
-
const newOptions = options;
|
|
7
|
-
for (let option in override.options) {
|
|
8
|
-
if (Array.isArray(override.options[option]) && newOptions[option]) {
|
|
9
|
-
newOptions[option] = mergeArray(newOptions[option], override.options[option]);
|
|
10
|
-
continue;
|
|
11
|
-
}
|
|
12
|
-
if (isObject(override.options[option]) && newOptions[option]) {
|
|
13
|
-
newOptions[option] = _.assign(newOptions[option], override.options[option]);
|
|
14
|
-
continue;
|
|
15
|
-
}
|
|
16
|
-
newOptions[option] = override.options[option];
|
|
17
|
-
}
|
|
18
|
-
plugin.options = newOptions;
|
|
19
|
-
};
|
|
1
|
+
import { isObject } from 'ngx-tethys/util';
|
|
2
|
+
import { _ } from '../../utils/lodash';
|
|
3
|
+
import { mergeArray } from './merge-array';
|
|
4
|
+
export const mergeOptions = (plugin, override) => {
|
|
5
|
+
const { options } = plugin;
|
|
6
|
+
const newOptions = options;
|
|
7
|
+
for (let option in override.options) {
|
|
8
|
+
if (Array.isArray(override.options[option]) && newOptions[option]) {
|
|
9
|
+
newOptions[option] = mergeArray(newOptions[option], override.options[option]);
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
if (isObject(override.options[option]) && newOptions[option]) {
|
|
13
|
+
newOptions[option] = _.assign(newOptions[option], override.options[option]);
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
newOptions[option] = override.options[option];
|
|
17
|
+
}
|
|
18
|
+
plugin.options = newOptions;
|
|
19
|
+
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cbiAgICAgICAgICAgIG5ld09wdGlvbnNbb3B0aW9uXSA9IG1lcmdlQXJyYXkobmV3T3B0aW9uc1tvcHRpb25dLCBvdmVycmlkZS5vcHRpb25zW29wdGlvbl0pO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlzT2JqZWN0KG92ZXJyaWRlLm9wdGlvbnNbb3B0aW9uXSkgJiYgbmV3T3B0aW9uc1tvcHRpb25dKSB7XG4gICAgICAgICAgICBuZXdPcHRpb25zW29wdGlvbl0gPSBfLmFzc2lnbihuZXdPcHRpb25zW29wdGlvbl0sIG92ZXJyaWRlLm9wdGlvbnNbb3B0aW9uXSk7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBuZXdPcHRpb25zW29wdGlvbl0gPSBvdmVycmlkZS5vcHRpb25zW29wdGlvbl07XG4gICAgfVxuICAgIHBsdWdpbi5vcHRpb25zID0gbmV3T3B0aW9ucztcbn07XG4iXX0=
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export const nestedStructureByKey = (editor, plugins) => {
|
|
2
|
-
// 如果有 key 重复则进行覆盖
|
|
3
|
-
plugins.forEach((p) => {
|
|
4
|
-
for (const key in p.nestedStructureByKey) {
|
|
5
|
-
if (!editor.nestedStructureByKey[key]) {
|
|
6
|
-
editor.nestedStructureByKey[key] = p.nestedStructureByKey[key];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
};
|
|
1
|
+
export const nestedStructureByKey = (editor, plugins) => {
|
|
2
|
+
// 如果有 key 重复则进行覆盖
|
|
3
|
+
plugins.forEach((p) => {
|
|
4
|
+
for (const key in p.nestedStructureByKey) {
|
|
5
|
+
if (!editor.nestedStructureByKey[key]) {
|
|
6
|
+
editor.nestedStructureByKey[key] = p.nestedStructureByKey[key];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
11
|
//# sourceM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iBXaXRoVGhlUGx1Z2luKSA9PiB7XG4gICAgICAgIGZvciAoY29uc3Qga2V5IGluIHAubmVzdGVkU3RydWN0dXJlQnlLZXkpIHtcbiAgICAgICAgICAgIGlmICghZWRpdG9yLm5lc3RlZFN0cnVjdHVyZUJ5S2V5W2tleV0pIHtcbiAgICAgICAgICAgICAgICBlZGl0b3IubmVzdGVkU3RydWN0dXJlQnlLZXlba2V5XSA9IHAubmVzdGVkU3RydWN0dXJlQnlLZXlba2V5XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xufTtcbiJdfQ==
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export const pluginsByKey = (editor, plugins) => {
|
|
2
|
-
if (!plugins)
|
|
3
|
-
return;
|
|
4
|
-
plugins.forEach((p) => {
|
|
5
|
-
if (!editor.pluginsByKey[p.key]) {
|
|
6
|
-
editor.pluginsByKey[p.key] = p;
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
};
|
|
1
|
+
export const pluginsByKey = (editor, plugins) => {
|
|
2
|
+
if (!plugins)
|
|
3
|
+
return;
|
|
4
|
+
plugins.forEach((p) => {
|
|
5
|
+
if (!editor.pluginsByKey[p.key]) {
|
|
6
|
+
editor.pluginsByKey[p.key] = p;
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
10
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGx1Z2lucy1ieS1rZXkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29yZS91dGlscy9wbHVnaW5zLWJ5LWtleS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxNQUFNLENBQUMsTUFBTSxZQUFZLEdBQUcsQ0FBUyxNQUFpQixFQUFFLE9BQXdCLEVBQUUsRUFBRTtJQUNoRixJQUFJLENBQUMsT0FBTztRQUFFLE9BQU87SUFFckIsT0FBTyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQWdCLEVBQUUsRUFBRTtRQUNqQyxJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLEVBQUU7WUFDN0IsTUFBTSxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1NBQ2xDO0lBQ0wsQ0FBQyxDQUFDLENBQUM7QUFDUCxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBUaGVFZGl0b3IsIFRoZVBsdWdpbiwgV2l0aFRoZVBsdWdpbiB9IGZyb20gJy4uLy4uL2ludGVyZmFjZXMnO1xuaW1wb3J0IHsgXyB9IGZyb20gJy4uLy4uL3V0aWxzL2xvZGFzaCc7XG5cbmV4cG9ydCBjb25zdCBwbHVnaW5zQnlLZXkgPSA8VCA9IHt9PihlZGl0b3I6IFRoZUVkaXRvciwgcGx1Z2lucz86IFRoZVBsdWdpbjxUPltdKSA9PiB7XG4gICAgaWYgKCFwbHVnaW5zKSByZXR1cm47XG5cbiAgICBwbHVnaW5zLmZvckVhY2goKHA6IFdpdGhUaGVQbHVnaW4pID0+IHtcbiAgICAgICAgaWYgKCFlZGl0b3IucGx1Z2luc0J5S2V5W3Aua2V5XSkge1xuICAgICAgICAgICAgZWRpdG9yLnBsdWdpbnNCeUtleVtwLmtleV0gPSBwO1xuICAgICAgICB9XG4gICAgfSk7XG59O1xuIl19
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { combinePlugins, flattenDeepPlugins, mergeDeepPlugins, nestedStructureByKey, pluginsByKey } from './utils';
|
|
2
|
-
export const withTheia = (editor, plugins = []) => {
|
|
3
|
-
let e = editor;
|
|
4
|
-
e.renderElement = (element) => null;
|
|
5
|
-
e.renderLeaf = (text) => null;
|
|
6
|
-
e.isContainer = (value) => false;
|
|
7
|
-
e.extraElementOptions = [];
|
|
8
|
-
e.disabled = false;
|
|
9
|
-
e.plugins = [];
|
|
10
|
-
e.pluginsByKey = {};
|
|
11
|
-
e.nestedStructureByKey = {};
|
|
12
|
-
// withOverridesByKey
|
|
13
|
-
flattenDeepPlugins(e, plugins);
|
|
14
|
-
// mount pluginsByKey
|
|
15
|
-
pluginsByKey(e, e.plugins);
|
|
16
|
-
// mount nestedStructureByKey
|
|
17
|
-
nestedStructureByKey(e, e.plugins);
|
|
18
|
-
// merge plugin to pluginByKey
|
|
19
|
-
mergeDeepPlugins(e, e.plugins);
|
|
20
|
-
e = combinePlugins(e);
|
|
21
|
-
return e;
|
|
22
|
-
};
|
|
1
|
+
import { combinePlugins, flattenDeepPlugins, mergeDeepPlugins, nestedStructureByKey, pluginsByKey } from './utils';
|
|
2
|
+
export const withTheia = (editor, plugins = []) => {
|
|
3
|
+
let e = editor;
|
|
4
|
+
e.renderElement = (element) => null;
|
|
5
|
+
e.renderLeaf = (text) => null;
|
|
6
|
+
e.isContainer = (value) => false;
|
|
7
|
+
e.extraElementOptions = [];
|
|
8
|
+
e.disabled = false;
|
|
9
|
+
e.plugins = [];
|
|
10
|
+
e.pluginsByKey = {};
|
|
11
|
+
e.nestedStructureByKey = {};
|
|
12
|
+
// withOverridesByKey
|
|
13
|
+
flattenDeepPlugins(e, plugins);
|
|
14
|
+
// mount pluginsByKey
|
|
15
|
+
pluginsByKey(e, e.plugins);
|
|
16
|
+
// mount nestedStructureByKey
|
|
17
|
+
nestedStructureByKey(e, e.plugins);
|
|
18
|
+
// merge plugin to pluginByKey
|
|
19
|
+
mergeDeepPlugins(e, e.plugins);
|
|
20
|
+
e = combinePlugins(e);
|
|
21
|
+
return e;
|
|
22
|
+
};
|
|
23
23
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2l0aC10aGVpYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3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