@worktile/theia 13.0.0-next.1 → 13.0.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 -64
- 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 -17
- 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 +100 -98
- package/esm2020/components/color-select/color-select.component.mjs +108 -108
- package/esm2020/components/column-resize/column-resize-notifier.mjs +31 -31
- package/esm2020/components/column-resize/column-resize.directive.mjs +98 -98
- package/esm2020/components/column-resize/column-resize.module.mjs +32 -32
- package/esm2020/components/column-resize/event-dispatcher.mjs +55 -55
- package/esm2020/components/column-resize/overlay-handle.component.mjs +139 -139
- package/esm2020/components/column-resize/resize-ref.mjs +25 -25
- package/esm2020/components/column-resize/resizing.store.mjs +154 -154
- package/esm2020/components/column-resize/selectors.mjs +4 -4
- package/esm2020/components/contextmenu/contextmenu.component.mjs +61 -61
- package/esm2020/components/conversion-hint/conversion-hint.component.mjs +54 -54
- package/esm2020/components/element/element.component.mjs +22 -22
- package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +125 -125
- package/esm2020/components/nav-split-line/nav-split-line.component.mjs +36 -36
- package/esm2020/components/table-select/table-select.component.mjs +49 -49
- package/esm2020/components/template/template.component.mjs +62 -62
- package/esm2020/components/text/text.component.mjs +57 -57
- package/esm2020/components/toolbar/toolbar.component.mjs +241 -241
- package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +128 -128
- package/esm2020/components/toolbar-group/toolbar-group.component.mjs +110 -110
- package/esm2020/components/toolbar-item/toolbar-item.component.mjs +60 -60
- package/esm2020/constants/auto-format-rules.mjs +166 -166
- package/esm2020/constants/code.mjs +88 -88
- package/esm2020/constants/color-select.mjs +61 -61
- package/esm2020/constants/default.mjs +9 -9
- package/esm2020/constants/error.mjs +7 -7
- package/esm2020/constants/index.mjs +5 -5
- package/esm2020/constants/node-types.mjs +132 -132
- package/esm2020/constants/selector.mjs +3 -3
- package/esm2020/constants/toolbar.mjs +69 -69
- package/esm2020/core/create-plugin.mjs +4 -4
- package/esm2020/core/create-toolbar.mjs +55 -55
- package/esm2020/core/index.mjs +4 -4
- package/esm2020/core/toolbar-item/base-toolbar-item.mjs +89 -89
- package/esm2020/core/utils/combine-plugins.mjs +9 -9
- package/esm2020/core/utils/flatten-deep-plugins.mjs +18 -18
- package/esm2020/core/utils/get-plugin-options.mjs +2 -2
- package/esm2020/core/utils/get-plugin.mjs +1 -1
- package/esm2020/core/utils/get-plugins.mjs +3 -3
- package/esm2020/core/utils/index.mjs +10 -10
- package/esm2020/core/utils/merge-array.mjs +17 -17
- package/esm2020/core/utils/merge-deep-plugins.mjs +13 -13
- package/esm2020/core/utils/merge-options.mjs +19 -19
- package/esm2020/core/utils/nested-structure-by-key.mjs +10 -10
- package/esm2020/core/utils/plugins-by-key.mjs +9 -9
- package/esm2020/core/with-theia.mjs +22 -22
- package/esm2020/custom-types.mjs +1 -1
- package/esm2020/editor.component.mjs +430 -430
- package/esm2020/editor.module.mjs +207 -201
- package/esm2020/interfaces/auto-format.mjs +1 -1
- package/esm2020/interfaces/editor.mjs +24 -24
- package/esm2020/interfaces/element.mjs +1 -1
- package/esm2020/interfaces/image.mjs +2 -2
- package/esm2020/interfaces/index.mjs +8 -8
- package/esm2020/interfaces/plugins/index.mjs +4 -4
- package/esm2020/interfaces/plugins/no-infer.mjs +1 -1
- package/esm2020/interfaces/plugins/plugin-key.mjs +39 -39
- package/esm2020/interfaces/plugins/plugins.mjs +1 -1
- package/esm2020/interfaces/plugins/with-override.mjs +1 -1
- package/esm2020/interfaces/reset-block-type-plugin-options.mjs +2 -2
- package/esm2020/interfaces/toolbar.mjs +11 -11
- package/esm2020/interfaces/upload.mjs +1 -1
- package/esm2020/interfaces/utility/index.mjs +3 -3
- package/esm2020/interfaces/utility/nested-structure-by-key.mjs +1 -1
- package/esm2020/interfaces/utility/override-by-key.mjs +1 -1
- package/esm2020/interfaces/utility/types.mjs +1 -1
- package/esm2020/interfaces/valid-children-types.mjs +35 -35
- package/esm2020/interfaces/view-base.mjs +21 -21
- package/esm2020/pipes.mjs +42 -42
- package/esm2020/plugins/align/align.editor.mjs +46 -46
- package/esm2020/plugins/align/align.plugin.mjs +63 -63
- package/esm2020/plugins/autoformat/autoformat.plugin.mjs +108 -108
- package/esm2020/plugins/autoformat/transforms/auto-format-block.mjs +14 -14
- package/esm2020/plugins/autoformat/transforms/auto-format-inline.mjs +77 -77
- package/esm2020/plugins/blockquote/blockquote.component.mjs +21 -21
- package/esm2020/plugins/blockquote/blockquote.editor.mjs +19 -19
- package/esm2020/plugins/blockquote/blockquote.plugin.mjs +70 -70
- package/esm2020/plugins/code/code.component.mjs +240 -240
- package/esm2020/plugins/code/code.editor.mjs +47 -47
- package/esm2020/plugins/code/code.plugin.mjs +41 -41
- package/esm2020/plugins/color/color.editor.mjs +43 -43
- package/esm2020/plugins/color/color.plugin.mjs +27 -27
- package/esm2020/plugins/color/toolbar-item.component.mjs +78 -78
- package/esm2020/plugins/common/auto-insert-data..mjs +76 -76
- package/esm2020/plugins/common/block-card.plugin.mjs +286 -286
- package/esm2020/plugins/common/get-fragment.plugin.mjs +23 -23
- package/esm2020/plugins/common/history.plugin.mjs +30 -30
- package/esm2020/plugins/common/move-selection.plugin.mjs +89 -89
- package/esm2020/plugins/common/remove-empty.plugin.mjs +59 -59
- package/esm2020/plugins/common/remove-void.plugin.mjs +56 -56
- package/esm2020/plugins/common/reset-type.plugin.mjs +34 -34
- package/esm2020/plugins/common/transforms.plugin.mjs +17 -17
- package/esm2020/plugins/deserializers/deserialize-html.plugin.mjs +38 -38
- package/esm2020/plugins/deserializers/deserialize-md.plugin.mjs +121 -121
- package/esm2020/plugins/font-size/font-size.editor.mjs +97 -97
- package/esm2020/plugins/heading/heading.editor.mjs +53 -53
- package/esm2020/plugins/heading/heading.plugin.mjs +84 -84
- package/esm2020/plugins/hr/hr.component.mjs +40 -40
- package/esm2020/plugins/hr/hr.editor.mjs +7 -7
- package/esm2020/plugins/hr/hr.plugin.mjs +41 -41
- package/esm2020/plugins/image/image.component.mjs +385 -365
- package/esm2020/plugins/image/image.editor.mjs +57 -57
- package/esm2020/plugins/image/image.plugin.mjs +56 -56
- package/esm2020/plugins/indent/indent.editor.mjs +70 -70
- package/esm2020/plugins/indent/indent.plugin.mjs +57 -57
- package/esm2020/plugins/indent/on-keydown-indent.mjs +53 -53
- package/esm2020/plugins/index.mjs +70 -70
- package/esm2020/plugins/inline-code/inline-code.component.mjs +21 -21
- package/esm2020/plugins/inline-code/inline-code.editor.mjs +47 -47
- package/esm2020/plugins/inline-code/inline-code.plugin.mjs +65 -65
- package/esm2020/plugins/link/edit/link-edit.component.mjs +105 -105
- package/esm2020/plugins/link/hover/link-hover.component.mjs +36 -36
- package/esm2020/plugins/link/link.component.mjs +162 -162
- package/esm2020/plugins/link/link.editor.mjs +66 -66
- package/esm2020/plugins/link/link.plugin.mjs +58 -58
- package/esm2020/plugins/link/link.types.mjs +12 -12
- package/esm2020/plugins/list/components/bulleted-list.component.mjs +32 -32
- package/esm2020/plugins/list/components/list-item.component.mjs +92 -92
- package/esm2020/plugins/list/components/numbered-list.component.mjs +38 -38
- package/esm2020/plugins/list/list.editor.mjs +125 -125
- package/esm2020/plugins/list/list.plugin.mjs +285 -285
- package/esm2020/plugins/list/normalizers/get-list-normalizer.mjs +39 -39
- package/esm2020/plugins/list/normalizers/normalize-list-item.mjs +18 -18
- package/esm2020/plugins/list/normalizers/normalize-no.mjs +42 -42
- package/esm2020/plugins/list/on-key-down-list.mjs +32 -32
- package/esm2020/plugins/list/queries/get-list-item-entry.mjs +27 -27
- package/esm2020/plugins/list/queries/get-list-item-sublist.mjs +12 -12
- package/esm2020/plugins/list/queries/get-list-types.mjs +5 -5
- package/esm2020/plugins/list/queries/get-start-list-item.mjs +26 -26
- package/esm2020/plugins/list/queries/has-list-in-list-item.mjs +27 -27
- package/esm2020/plugins/list/queries/is-in-list.mjs +5 -5
- package/esm2020/plugins/list/queries/is-list-nested.mjs +10 -10
- package/esm2020/plugins/list/queries/is-list.mjs +5 -5
- package/esm2020/plugins/list/queries/is-node-type-list.mjs +4 -4
- package/esm2020/plugins/list/queries/is-selection-at-list-item-start.mjs +12 -12
- package/esm2020/plugins/list/queries/is-selection-in-same-list-item.mjs +16 -16
- package/esm2020/plugins/list/queries/is-single-list-item.mjs +9 -9
- package/esm2020/plugins/list/transforms/insert-list-data.mjs +71 -71
- package/esm2020/plugins/list/transforms/insert-list-item.mjs +72 -72
- package/esm2020/plugins/list/transforms/move-list-item-down.mjs +41 -41
- package/esm2020/plugins/list/transforms/move-list-item-sublist-items-to-list-item-sublist.mjs +42 -42
- package/esm2020/plugins/list/transforms/move-list-item-sublist-items-to-list.mjs +29 -29
- package/esm2020/plugins/list/transforms/move-list-item-up.mjs +77 -77
- package/esm2020/plugins/list/transforms/unwrap-list.mjs +9 -9
- package/esm2020/plugins/list/types.mjs +2 -2
- package/esm2020/plugins/mark/mark.editor.mjs +27 -27
- package/esm2020/plugins/mark/mark.plugin.mjs +104 -104
- package/esm2020/plugins/node-id/node-id.plugin.mjs +77 -77
- package/esm2020/plugins/normalizers/insert-paragraph-nodes.mjs +27 -27
- package/esm2020/plugins/normalizers/remove-empty-nodes.mjs +17 -17
- package/esm2020/plugins/normalizers/trailing-node.plugin.mjs +32 -32
- package/esm2020/plugins/paint-format/paint-format.editor.mjs +122 -122
- package/esm2020/plugins/public-api.mjs +15 -15
- package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +95 -95
- package/esm2020/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.mjs +79 -79
- package/esm2020/plugins/quick-insert/quick-insert.editor.mjs +52 -52
- package/esm2020/plugins/quick-insert/quick-insert.plugin.mjs +73 -73
- package/esm2020/plugins/soft-break/soft-break.plugin.mjs +35 -35
- package/esm2020/plugins/soft-break/soft-break.types.mjs +1 -1
- package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +99 -99
- package/esm2020/plugins/table/components/row/row.component.mjs +46 -46
- package/esm2020/plugins/table/components/table.component.mjs +460 -460
- package/esm2020/plugins/table/components/td/td.component.mjs +696 -696
- package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +70 -70
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +158 -158
- package/esm2020/plugins/table/table.editor.mjs +182 -182
- package/esm2020/plugins/table/table.plugin.mjs +426 -426
- package/esm2020/plugins/table/table.service.mjs +102 -102
- package/esm2020/plugins/table/table.store.mjs +483 -483
- package/esm2020/plugins/table/table.types.mjs +33 -33
- package/esm2020/plugins/table/toolbar-item.component.mjs +60 -60
- package/esm2020/plugins/table/transforms/clear-cell.mjs +14 -14
- package/esm2020/plugins/table/transforms/clear-table-node.mjs +27 -27
- package/esm2020/plugins/table/transforms/insert-column.mjs +57 -57
- package/esm2020/plugins/table/transforms/insert-row.mjs +42 -42
- package/esm2020/plugins/table/transforms/insert-table.mjs +14 -14
- package/esm2020/plugins/table/transforms/remove-column.mjs +51 -51
- package/esm2020/plugins/table/transforms/remove-row.mjs +50 -50
- package/esm2020/plugins/table/transforms/remove-table.mjs +49 -49
- package/esm2020/plugins/table/utils/add-columns.mjs +28 -28
- package/esm2020/plugins/table/utils/calc-anchor-position.mjs +24 -24
- package/esm2020/plugins/table/utils/calc-span.mjs +72 -72
- package/esm2020/plugins/table/utils/create-cell.mjs +19 -19
- package/esm2020/plugins/table/utils/create-row.mjs +12 -12
- package/esm2020/plugins/table/utils/create-table.mjs +13 -13
- package/esm2020/plugins/table/utils/get-base-height.mjs +22 -22
- package/esm2020/plugins/table/utils/get-select-cell-node.mjs +19 -19
- package/esm2020/plugins/table/utils/index.mjs +8 -8
- package/esm2020/plugins/table/utils/is-range-in-table.mjs +16 -16
- package/esm2020/plugins/table/utils/is-selection-in-table.mjs +11 -11
- package/esm2020/plugins/table/utils/is-virtual-key.mjs +12 -12
- package/esm2020/plugins/table/utils/merge-cell.mjs +90 -90
- package/esm2020/plugins/table/utils/next-path.mjs +5 -5
- package/esm2020/plugins/table/utils/normalize-table.mjs +30 -30
- package/esm2020/plugins/table/utils/remove-columns.mjs +23 -23
- package/esm2020/plugins/table/utils/set-menu-cell-invisibility.mjs +15 -15
- package/esm2020/plugins/table/utils/split-cell.mjs +31 -31
- package/esm2020/plugins/table/utils/table-position.mjs +242 -242
- package/esm2020/plugins/todo-item/todo-item.component.mjs +53 -53
- package/esm2020/plugins/todo-item/todo-item.editor.mjs +31 -31
- package/esm2020/plugins/todo-item/todo-item.plugin.mjs +78 -78
- package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +82 -82
- package/esm2020/plugins/vertical-align/vertical-align.editor.mjs +54 -54
- package/esm2020/public-api.mjs +23 -23
- package/esm2020/queries/anchor-block-entry.mjs +13 -13
- package/esm2020/queries/anchor-block.mjs +6 -6
- package/esm2020/queries/anchor-inline-entry.mjs +10 -10
- package/esm2020/queries/find-descendant.mjs +47 -47
- package/esm2020/queries/find-node.mjs +45 -45
- package/esm2020/queries/find-path.mjs +28 -28
- package/esm2020/queries/get-above-by-type.mjs +13 -13
- package/esm2020/queries/get-above.mjs +9 -9
- package/esm2020/queries/get-anchor-block-entry.mjs +8 -8
- package/esm2020/queries/get-block-above.mjs +10 -10
- package/esm2020/queries/get-block-card-above.mjs +10 -10
- package/esm2020/queries/get-block-card-cursor.mjs +5 -5
- package/esm2020/queries/get-container-blocks.mjs +11 -11
- package/esm2020/queries/get-directly-parent.mjs +11 -11
- package/esm2020/queries/get-insert-elements-path.mjs +43 -43
- package/esm2020/queries/get-last-child-path.mjs +9 -9
- package/esm2020/queries/get-last-node.mjs +17 -17
- package/esm2020/queries/get-next-sibling-nodes.mjs +17 -17
- package/esm2020/queries/get-node.mjs +10 -10
- package/esm2020/queries/get-nodes-by-type.mjs +15 -15
- package/esm2020/queries/get-nodes.mjs +7 -7
- package/esm2020/queries/get-parent.mjs +12 -12
- package/esm2020/queries/get-plain-text.mjs +16 -16
- package/esm2020/queries/get-plugin-by-toolbar.mjs +12 -12
- package/esm2020/queries/get-point-before.mjs +61 -61
- package/esm2020/queries/get-point-from-location.mjs +15 -15
- package/esm2020/queries/get-previous-path.mjs +9 -9
- package/esm2020/queries/get-rang-from-block-start.mjs +16 -16
- package/esm2020/queries/get-range-before.mjs +17 -17
- package/esm2020/queries/get-selection-marks.mjs +18 -18
- package/esm2020/queries/get-selection-nodes-by-type.mjs +29 -29
- package/esm2020/queries/get-text.mjs +9 -9
- package/esm2020/queries/get-toolbar-disabled.mjs +12 -12
- package/esm2020/queries/index.mjs +58 -58
- package/esm2020/queries/is-across-blocks.mjs +7 -7
- package/esm2020/queries/is-ancestor-empty.mjs +6 -6
- package/esm2020/queries/is-ancestor.mjs +3 -3
- package/esm2020/queries/is-block-above-empty.mjs +11 -11
- package/esm2020/queries/is-block-active.mjs +7 -7
- package/esm2020/queries/is-block-card-cursor.mjs +4 -4
- package/esm2020/queries/is-block-text-empty-after-selection.mjs +31 -31
- package/esm2020/queries/is-collapsed.mjs +7 -7
- package/esm2020/queries/is-contain-nested-type.mjs +28 -28
- package/esm2020/queries/is-container-type.mjs +2 -2
- package/esm2020/queries/is-descendant.mjs +3 -3
- package/esm2020/queries/is-empty-content.mjs +14 -14
- package/esm2020/queries/is-empty-paragraph-by-path.mjs +7 -7
- package/esm2020/queries/is-empty-paragraph.mjs +11 -11
- package/esm2020/queries/is-first-child.mjs +5 -5
- package/esm2020/queries/is-include-types.mjs +11 -11
- package/esm2020/queries/is-node-type-in.mjs +9 -9
- package/esm2020/queries/is-node-type.mjs +15 -15
- package/esm2020/queries/is-paragraph.mjs +9 -9
- package/esm2020/queries/is-point-at-root.mjs +2 -2
- package/esm2020/queries/is-range-across-blocks.mjs +22 -22
- package/esm2020/queries/is-range-at-root.mjs +3 -3
- package/esm2020/queries/is-start.mjs +6 -6
- package/esm2020/queries/some-node.mjs +9 -9
- package/esm2020/services/color-select.service.mjs +49 -49
- package/esm2020/services/context.service.mjs +58 -58
- package/esm2020/services/table-contextmenu.service.mjs +189 -189
- package/esm2020/services/toolbar.service.mjs +47 -47
- package/esm2020/shortcuts/index.mjs +5 -5
- package/esm2020/shortcuts/mark.mjs +24 -24
- package/esm2020/transforms/apply-deep-to-nodes.mjs +21 -21
- package/esm2020/transforms/clear-marks.mjs +23 -23
- package/esm2020/transforms/close-conversion-hint.mjs +8 -8
- package/esm2020/transforms/delete-element.mjs +11 -11
- package/esm2020/transforms/handle-continual-delete-backward.mjs +17 -17
- package/esm2020/transforms/handle-continual-insert-break.mjs +19 -19
- package/esm2020/transforms/index.mjs +18 -18
- package/esm2020/transforms/insert-elements.mjs +33 -33
- package/esm2020/transforms/insert-paragraph.mjs +6 -6
- package/esm2020/transforms/merge-deep-to-nodes.mjs +8 -8
- package/esm2020/transforms/move-children.mjs +21 -21
- package/esm2020/transforms/on-keydown-reset-block-type.mjs +22 -22
- package/esm2020/transforms/set-end-selection.mjs +10 -10
- package/esm2020/transforms/set-marks.mjs +9 -9
- package/esm2020/transforms/set-node.mjs +5 -5
- package/esm2020/transforms/split-node.mjs +31 -31
- package/esm2020/transforms/un-hang-range.mjs +11 -11
- package/esm2020/transforms/un-wrap.mjs +11 -11
- package/esm2020/transforms/unwrap-nodes-by-type.mjs +14 -14
- package/esm2020/utils/auto-focus.mjs +13 -13
- package/esm2020/utils/auto-scroll-view.mjs +24 -24
- package/esm2020/utils/cast-array.mjs +7 -7
- package/esm2020/utils/common.mjs +2 -2
- package/esm2020/utils/create-empty-paragraph.mjs +14 -14
- package/esm2020/utils/data-transform.mjs +48 -48
- package/esm2020/utils/dom.mjs +46 -46
- package/esm2020/utils/editor-uuid.mjs +8 -8
- package/esm2020/utils/fragment.mjs +65 -65
- package/esm2020/utils/get-all-nodes-by-type.mjs +5 -0
- package/esm2020/utils/get-editable-element-height.mjs +6 -6
- package/esm2020/utils/get-toolbar-class.mjs +6 -6
- package/esm2020/utils/id-creator.mjs +11 -11
- package/esm2020/utils/index.mjs +13 -13
- package/esm2020/utils/is-clean-empty-paragraph.mjs +36 -36
- package/esm2020/utils/is-inline.mjs +8 -8
- package/esm2020/utils/lodash.mjs +2 -2
- package/esm2020/utils/match.mjs +32 -32
- package/esm2020/utils/merge-element-options.mjs +19 -19
- package/esm2020/utils/weak-maps.mjs +3 -3
- package/esm2020/worktile-theia.mjs +4 -4
- package/fesm2015/worktile-theia.mjs +13131 -13097
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +13150 -13120
- package/fesm2020/worktile-theia.mjs.map +1 -1
- 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 +5 -4
- 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 +77 -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-all-nodes-by-type.d.ts +3 -0
- 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 +2 -2
- 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
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { Component, HostListener, Input, ViewChild, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { TheBaseToolbarItem } from '../../core/toolbar-item/base-toolbar-item';
|
|
3
|
-
import { ToolbarItemMode } from '../../constants/toolbar';
|
|
4
|
-
import { isComponentType } from 'slate-angular';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "ngx-tethys/nav";
|
|
7
|
-
import * as i2 from "ngx-tethys/icon";
|
|
8
|
-
import * as i3 from "@angular/common";
|
|
9
|
-
import * as i4 from "ngx-tethys/tooltip";
|
|
10
|
-
export class TheToolbarItemComponent extends TheBaseToolbarItem {
|
|
11
|
-
constructor(ngZone) {
|
|
12
|
-
super();
|
|
13
|
-
this.ngZone = ngZone;
|
|
14
|
-
this.itemMode = ToolbarItemMode.horizontal;
|
|
15
|
-
this.ToolbarItemMode = ToolbarItemMode;
|
|
16
|
-
}
|
|
17
|
-
toggleDropdown(event) {
|
|
18
|
-
super.execute(event);
|
|
19
|
-
}
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
if (this.toolbarItem?.quickItemComponent && isComponentType(this.toolbarItem?.quickItemComponent)) {
|
|
22
|
-
this.renderToolbarItem();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
execute(event) {
|
|
26
|
-
super.execute(event);
|
|
27
|
-
if (this.editor?.disabled || this.disabled || !this.toolbarItem?.execute) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
this.toolbarItem?.execute(this.editor);
|
|
31
|
-
}
|
|
32
|
-
renderToolbarItem() {
|
|
33
|
-
this.ngZone.run(() => {
|
|
34
|
-
const toolbarItemRef = this.toolbarContainer.createComponent(this.toolbarItem.quickItemComponent);
|
|
35
|
-
toolbarItemRef.instance.editor = this.editor;
|
|
36
|
-
toolbarItemRef.instance.item = this.toolbarItem;
|
|
37
|
-
toolbarItemRef.instance.itemMode = ToolbarItemMode.vertical;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheToolbarItemComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1
|
+
import { Component, HostListener, Input, ViewChild, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { TheBaseToolbarItem } from '../../core/toolbar-item/base-toolbar-item';
|
|
3
|
+
import { ToolbarItemMode } from '../../constants/toolbar';
|
|
4
|
+
import { isComponentType } from 'slate-angular';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "ngx-tethys/nav";
|
|
7
|
+
import * as i2 from "ngx-tethys/icon";
|
|
8
|
+
import * as i3 from "@angular/common";
|
|
9
|
+
import * as i4 from "ngx-tethys/tooltip";
|
|
10
|
+
export class TheToolbarItemComponent extends TheBaseToolbarItem {
|
|
11
|
+
constructor(ngZone) {
|
|
12
|
+
super();
|
|
13
|
+
this.ngZone = ngZone;
|
|
14
|
+
this.itemMode = ToolbarItemMode.horizontal;
|
|
15
|
+
this.ToolbarItemMode = ToolbarItemMode;
|
|
16
|
+
}
|
|
17
|
+
toggleDropdown(event) {
|
|
18
|
+
super.execute(event);
|
|
19
|
+
}
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
if (this.toolbarItem?.quickItemComponent && isComponentType(this.toolbarItem?.quickItemComponent)) {
|
|
22
|
+
this.renderToolbarItem();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
execute(event) {
|
|
26
|
+
super.execute(event);
|
|
27
|
+
if (this.editor?.disabled || this.disabled || !this.toolbarItem?.execute) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
this.toolbarItem?.execute(this.editor);
|
|
31
|
+
}
|
|
32
|
+
renderToolbarItem() {
|
|
33
|
+
this.ngZone.run(() => {
|
|
34
|
+
const toolbarItemRef = this.toolbarContainer.createComponent(this.toolbarItem.quickItemComponent);
|
|
35
|
+
toolbarItemRef.instance.editor = this.editor;
|
|
36
|
+
toolbarItemRef.instance.item = this.toolbarItem;
|
|
37
|
+
toolbarItemRef.instance.itemMode = ToolbarItemMode.vertical;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheToolbarItemComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
42
42
|
TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
43
43
|
<ng-container *ngIf="itemMode === ToolbarItemMode.horizontal; else selectionItem">
|
|
44
44
|
<a
|
|
@@ -59,11 +59,11 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
59
59
|
</ng-template>
|
|
60
60
|
<ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
|
|
61
61
|
<ng-container #toolbarContainer></ng-container>
|
|
62
|
-
`, isInline: true, components: [{ type: i1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i2.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
|
|
64
|
-
type: Component,
|
|
65
|
-
args: [{
|
|
66
|
-
selector: 'the-toolbar-item',
|
|
62
|
+
`, isInline: true, components: [{ type: i1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i2.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{
|
|
66
|
+
selector: 'the-toolbar-item',
|
|
67
67
|
template: `
|
|
68
68
|
<ng-container *ngIf="itemMode === ToolbarItemMode.horizontal; else selectionItem">
|
|
69
69
|
<a
|
|
@@ -84,18 +84,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
84
84
|
</ng-template>
|
|
85
85
|
<ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
|
|
86
86
|
<ng-container #toolbarContainer></ng-container>
|
|
87
|
-
`,
|
|
88
|
-
host: {
|
|
89
|
-
class: 'the-toolbar-item'
|
|
90
|
-
}
|
|
91
|
-
}]
|
|
92
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { itemMode: [{
|
|
93
|
-
type: Input
|
|
94
|
-
}], toolbarContainer: [{
|
|
95
|
-
type: ViewChild,
|
|
96
|
-
args: ['toolbarContainer', { read: ViewContainerRef, static: true }]
|
|
97
|
-
}], toggleDropdown: [{
|
|
98
|
-
type: HostListener,
|
|
99
|
-
args: ['mousedown', ['$event']]
|
|
100
|
-
}] } });
|
|
87
|
+
`,
|
|
88
|
+
host: {
|
|
89
|
+
class: 'the-toolbar-item'
|
|
90
|
+
}
|
|
91
|
+
}]
|
|
92
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { itemMode: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], toolbarContainer: [{
|
|
95
|
+
type: ViewChild,
|
|
96
|
+
args: ['toolbarContainer', { read: ViewContainerRef, static: true }]
|
|
97
|
+
}], toggleDropdown: [{
|
|
98
|
+
type: HostListener,
|
|
99
|
+
args: ['mousedown', ['$event']]
|
|
100
|
+
}] } });
|
|
101
101
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9vbGJhci1pdGVtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3NyYy9jb21wb25lbnRzL3Rvb2xiYXItaXRlbS90b29sYmFyLWl0ZW0uY29tcG9uZW50LnRzIl0sIm5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dGVtPy5leGVjdXRlKHRoaXMuZWRpdG9yKTtcbiAgICB9XG5cbiAgICByZW5kZXJUb29sYmFySXRlbSgpIHtcbiAgICAgICAgdGhpcy5uZ1pvbmUucnVuKCgpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHRvb2xiYXJJdGVtUmVmID0gdGhpcy50b29sYmFyQ29udGFpbmVyLmNyZWF0ZUNvbXBvbmVudCh0aGlzLnRvb2xiYXJJdGVtLnF1aWNrSXRlbUNvbXBvbmVudCk7XG4gICAgICAgICAgICB0b29sYmFySXRlbVJlZi5pbnN0YW5jZS5lZGl0b3IgPSB0aGlzLmVkaXRvcjtcbiAgICAgICAgICAgIHRvb2xiYXJJdGVtUmVmLmluc3RhbmNlLml0ZW0gPSB0aGlzLnRvb2xiYXJJdGVtO1xuICAgICAgICAgICAgdG9vbGJhckl0ZW1SZWYuaW5zdGFuY2UuaXRlbU1vZGUgPSBUb29sYmFySXRlbU1vZGUudmVydGljYWw7XG4gICAgICAgIH0pO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
import { Editor, Transforms } from 'slate';
|
|
2
|
-
import { MarkTypes, ElementKinds } from './node-types';
|
|
3
|
-
import * as TheQueries from '../queries';
|
|
4
|
-
import { ListEditor } from '../plugins/list/list.editor';
|
|
5
|
-
import { TodoItemEditor } from '../plugins/todo-item/todo-item.editor';
|
|
6
|
-
import { BlockquoteEditor } from '../plugins/blockquote/blockquote.editor';
|
|
7
|
-
import { InlineCodeEditor } from '../plugins/inline-code/inline-code.editor';
|
|
8
|
-
import { HeadingEditor } from '../plugins/heading/heading.editor';
|
|
9
|
-
import { CodeEditor } from '../plugins/code/code.editor';
|
|
10
|
-
export const defaultAutoFormatRules = [
|
|
11
|
-
{
|
|
12
|
-
key: ElementKinds.heading_1,
|
|
13
|
-
type: ElementKinds.heading_1,
|
|
14
|
-
markup: '#',
|
|
15
|
-
format: (editor) => {
|
|
16
|
-
HeadingEditor.setHeading(editor, ElementKinds.heading_1);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
key: ElementKinds.heading_2,
|
|
21
|
-
type: ElementKinds.heading_2,
|
|
22
|
-
markup: '##',
|
|
23
|
-
format: (editor) => {
|
|
24
|
-
HeadingEditor.setHeading(editor, ElementKinds.heading_2);
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
key: ElementKinds.heading_3,
|
|
29
|
-
type: ElementKinds.heading_3,
|
|
30
|
-
markup: '###',
|
|
31
|
-
format: (editor) => {
|
|
32
|
-
HeadingEditor.setHeading(editor, ElementKinds.heading_3);
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
key: ElementKinds.heading_4,
|
|
37
|
-
type: ElementKinds.heading_4,
|
|
38
|
-
markup: '####',
|
|
39
|
-
format: (editor) => {
|
|
40
|
-
HeadingEditor.setHeading(editor, ElementKinds.heading_4);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
key: ElementKinds.heading_5,
|
|
45
|
-
type: ElementKinds.heading_5,
|
|
46
|
-
markup: '#####',
|
|
47
|
-
format: (editor) => {
|
|
48
|
-
HeadingEditor.setHeading(editor, ElementKinds.heading_5);
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
key: ElementKinds.heading_6,
|
|
53
|
-
type: ElementKinds.heading_6,
|
|
54
|
-
markup: '######',
|
|
55
|
-
format: (editor) => {
|
|
56
|
-
HeadingEditor.setHeading(editor, ElementKinds.heading_6);
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
key: ElementKinds.blockquote,
|
|
61
|
-
type: ElementKinds.blockquote,
|
|
62
|
-
markup: ['>'],
|
|
63
|
-
format: (editor) => {
|
|
64
|
-
BlockquoteEditor.toggleBlockquote(editor);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
key: MarkTypes.bold,
|
|
69
|
-
type: MarkTypes.bold,
|
|
70
|
-
between: ['**', '**'],
|
|
71
|
-
mode: 'inline',
|
|
72
|
-
insertTrigger: true
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
key: `${MarkTypes.bold}__`,
|
|
76
|
-
type: MarkTypes.bold,
|
|
77
|
-
between: ['__', '__'],
|
|
78
|
-
mode: 'inline',
|
|
79
|
-
insertTrigger: true
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
key: MarkTypes.italic,
|
|
83
|
-
type: MarkTypes.italic,
|
|
84
|
-
between: ['*', '*'],
|
|
85
|
-
mode: 'inline',
|
|
86
|
-
insertTrigger: true
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
key: `${MarkTypes.italic}_`,
|
|
90
|
-
type: MarkTypes.italic,
|
|
91
|
-
between: ['_', '_'],
|
|
92
|
-
mode: 'inline',
|
|
93
|
-
insertTrigger: true
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
key: ElementKinds.inlineCode,
|
|
97
|
-
type: ElementKinds.inlineCode,
|
|
98
|
-
between: ['`', '`'],
|
|
99
|
-
mode: 'inline',
|
|
100
|
-
format: (editor, text) => {
|
|
101
|
-
InlineCodeEditor.toggleInlineCode(editor, text);
|
|
102
|
-
Transforms.select(editor, Editor.after(editor, editor.selection));
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
key: MarkTypes.strike,
|
|
107
|
-
type: MarkTypes.strike,
|
|
108
|
-
between: ['~~', '~~'],
|
|
109
|
-
mode: 'inline',
|
|
110
|
-
insertTrigger: true
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
key: ElementKinds.code,
|
|
114
|
-
type: ElementKinds.code,
|
|
115
|
-
markup: '```',
|
|
116
|
-
format: (editor) => {
|
|
117
|
-
CodeEditor.insertCode(editor);
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
key: ElementKinds.listItem,
|
|
122
|
-
type: ElementKinds.listItem,
|
|
123
|
-
markup: [],
|
|
124
|
-
match: (editor) => {
|
|
125
|
-
return TheQueries.isParagraph(editor) ? ['*', '-', '+'] : [];
|
|
126
|
-
},
|
|
127
|
-
format: (editor) => {
|
|
128
|
-
ListEditor.toggleList(editor, ElementKinds.bulletedList);
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
key: ElementKinds.numberedList,
|
|
133
|
-
type: ElementKinds.listItem,
|
|
134
|
-
markup: [],
|
|
135
|
-
match: (editor, textFromBlockStart) => {
|
|
136
|
-
return TheQueries.isParagraph(editor) && /^-?\d+(\.|\))$/.test(textFromBlockStart) ? [textFromBlockStart] : [];
|
|
137
|
-
},
|
|
138
|
-
format: (editor, markup) => {
|
|
139
|
-
let startIndex = 1;
|
|
140
|
-
if (markup) {
|
|
141
|
-
startIndex = markup[0].split('.')[0];
|
|
142
|
-
if (startIndex === 0) {
|
|
143
|
-
startIndex = 1;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
ListEditor.toggleList(editor, ElementKinds.numberedList, startIndex);
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
key: ElementKinds.checkItem,
|
|
151
|
-
type: ElementKinds.checkItem,
|
|
152
|
-
markup: [],
|
|
153
|
-
match: (editor) => {
|
|
154
|
-
return TheQueries.isParagraph(editor) ? ['[]'] : [];
|
|
155
|
-
},
|
|
156
|
-
format: (editor) => {
|
|
157
|
-
TodoItemEditor.insertTodoItem(editor);
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
key: ElementKinds.hr,
|
|
162
|
-
type: ElementKinds.hr,
|
|
163
|
-
markup: '---',
|
|
164
|
-
insertTrigger: true
|
|
165
|
-
}
|
|
166
|
-
];
|
|
1
|
+
import { Editor, Transforms } from 'slate';
|
|
2
|
+
import { MarkTypes, ElementKinds } from './node-types';
|
|
3
|
+
import * as TheQueries from '../queries';
|
|
4
|
+
import { ListEditor } from '../plugins/list/list.editor';
|
|
5
|
+
import { TodoItemEditor } from '../plugins/todo-item/todo-item.editor';
|
|
6
|
+
import { BlockquoteEditor } from '../plugins/blockquote/blockquote.editor';
|
|
7
|
+
import { InlineCodeEditor } from '../plugins/inline-code/inline-code.editor';
|
|
8
|
+
import { HeadingEditor } from '../plugins/heading/heading.editor';
|
|
9
|
+
import { CodeEditor } from '../plugins/code/code.editor';
|
|
10
|
+
export const defaultAutoFormatRules = [
|
|
11
|
+
{
|
|
12
|
+
key: ElementKinds.heading_1,
|
|
13
|
+
type: ElementKinds.heading_1,
|
|
14
|
+
markup: '#',
|
|
15
|
+
format: (editor) => {
|
|
16
|
+
HeadingEditor.setHeading(editor, ElementKinds.heading_1);
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: ElementKinds.heading_2,
|
|
21
|
+
type: ElementKinds.heading_2,
|
|
22
|
+
markup: '##',
|
|
23
|
+
format: (editor) => {
|
|
24
|
+
HeadingEditor.setHeading(editor, ElementKinds.heading_2);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: ElementKinds.heading_3,
|
|
29
|
+
type: ElementKinds.heading_3,
|
|
30
|
+
markup: '###',
|
|
31
|
+
format: (editor) => {
|
|
32
|
+
HeadingEditor.setHeading(editor, ElementKinds.heading_3);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: ElementKinds.heading_4,
|
|
37
|
+
type: ElementKinds.heading_4,
|
|
38
|
+
markup: '####',
|
|
39
|
+
format: (editor) => {
|
|
40
|
+
HeadingEditor.setHeading(editor, ElementKinds.heading_4);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: ElementKinds.heading_5,
|
|
45
|
+
type: ElementKinds.heading_5,
|
|
46
|
+
markup: '#####',
|
|
47
|
+
format: (editor) => {
|
|
48
|
+
HeadingEditor.setHeading(editor, ElementKinds.heading_5);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: ElementKinds.heading_6,
|
|
53
|
+
type: ElementKinds.heading_6,
|
|
54
|
+
markup: '######',
|
|
55
|
+
format: (editor) => {
|
|
56
|
+
HeadingEditor.setHeading(editor, ElementKinds.heading_6);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: ElementKinds.blockquote,
|
|
61
|
+
type: ElementKinds.blockquote,
|
|
62
|
+
markup: ['>'],
|
|
63
|
+
format: (editor) => {
|
|
64
|
+
BlockquoteEditor.toggleBlockquote(editor);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
key: MarkTypes.bold,
|
|
69
|
+
type: MarkTypes.bold,
|
|
70
|
+
between: ['**', '**'],
|
|
71
|
+
mode: 'inline',
|
|
72
|
+
insertTrigger: true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: `${MarkTypes.bold}__`,
|
|
76
|
+
type: MarkTypes.bold,
|
|
77
|
+
between: ['__', '__'],
|
|
78
|
+
mode: 'inline',
|
|
79
|
+
insertTrigger: true
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
key: MarkTypes.italic,
|
|
83
|
+
type: MarkTypes.italic,
|
|
84
|
+
between: ['*', '*'],
|
|
85
|
+
mode: 'inline',
|
|
86
|
+
insertTrigger: true
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: `${MarkTypes.italic}_`,
|
|
90
|
+
type: MarkTypes.italic,
|
|
91
|
+
between: ['_', '_'],
|
|
92
|
+
mode: 'inline',
|
|
93
|
+
insertTrigger: true
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: ElementKinds.inlineCode,
|
|
97
|
+
type: ElementKinds.inlineCode,
|
|
98
|
+
between: ['`', '`'],
|
|
99
|
+
mode: 'inline',
|
|
100
|
+
format: (editor, text) => {
|
|
101
|
+
InlineCodeEditor.toggleInlineCode(editor, text);
|
|
102
|
+
Transforms.select(editor, Editor.after(editor, editor.selection));
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: MarkTypes.strike,
|
|
107
|
+
type: MarkTypes.strike,
|
|
108
|
+
between: ['~~', '~~'],
|
|
109
|
+
mode: 'inline',
|
|
110
|
+
insertTrigger: true
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
key: ElementKinds.code,
|
|
114
|
+
type: ElementKinds.code,
|
|
115
|
+
markup: '```',
|
|
116
|
+
format: (editor) => {
|
|
117
|
+
CodeEditor.insertCode(editor);
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: ElementKinds.listItem,
|
|
122
|
+
type: ElementKinds.listItem,
|
|
123
|
+
markup: [],
|
|
124
|
+
match: (editor) => {
|
|
125
|
+
return TheQueries.isParagraph(editor) ? ['*', '-', '+'] : [];
|
|
126
|
+
},
|
|
127
|
+
format: (editor) => {
|
|
128
|
+
ListEditor.toggleList(editor, ElementKinds.bulletedList);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: ElementKinds.numberedList,
|
|
133
|
+
type: ElementKinds.listItem,
|
|
134
|
+
markup: [],
|
|
135
|
+
match: (editor, textFromBlockStart) => {
|
|
136
|
+
return TheQueries.isParagraph(editor) && /^-?\d+(\.|\))$/.test(textFromBlockStart) ? [textFromBlockStart] : [];
|
|
137
|
+
},
|
|
138
|
+
format: (editor, markup) => {
|
|
139
|
+
let startIndex = 1;
|
|
140
|
+
if (markup) {
|
|
141
|
+
startIndex = markup[0].split('.')[0];
|
|
142
|
+
if (startIndex === 0) {
|
|
143
|
+
startIndex = 1;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
ListEditor.toggleList(editor, ElementKinds.numberedList, startIndex);
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: ElementKinds.checkItem,
|
|
151
|
+
type: ElementKinds.checkItem,
|
|
152
|
+
markup: [],
|
|
153
|
+
match: (editor) => {
|
|
154
|
+
return TheQueries.isParagraph(editor) ? ['[]'] : [];
|
|
155
|
+
},
|
|
156
|
+
format: (editor) => {
|
|
157
|
+
TodoItemEditor.insertTodoItem(editor);
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
key: ElementKinds.hr,
|
|
162
|
+
type: ElementKinds.hr,
|
|
163
|
+
markup: '---',
|
|
164
|
+
insertTrigger: true
|
|
165
|
+
}
|
|
166
|
+
];
|
|
167
167
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0by1mb3JtYXQtcnVsZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9zcmMvY29uc3RhbnRzL2F1dG8tZm9ybWF0LXJ1bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sT0FBTyxDQUFDO0FBRTNDLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLE1BQU0sY0FBYyxDQUFDO0FBQ3ZELE9BQU8sS0FBSyxVQUFVLE1BQU0sWUFBWSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUN6RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sdUNBQXVDLENBQUM7QUFDdkUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUNBQXlDLENBQUM7QUFDM0UsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sMkNBQTJDLENBQUM7QUFDN0UsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLG1DQUFtQyxDQUFDO0FBQ2xFLE9B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VkaXRvcikgPT4ge1xuICAgICAgICAgICAgSGVhZGluZ0VkaXRvci5zZXRIZWFkaW5nKGVkaXRvciwgRWxlbWVudEtpbmRzLmhlYWRpbmdfMyk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHtcbiAgICAgICAga2V5OiBFbGVtZW50S2luZHMuaGVhZGluZ180LFxuICAgICAgICB0eXBlOiBFbGVtZW50S2luZHMuaGVhZGluZ180LFxuICAgICAgICBtYXJrdXA6ICcjIyMjJyxcbiAgICAgICAgZm9ybWF0OiAoZWRpdG9yOiBFZGl0b3IpID0+IHtcbiAgICAgICAgICAgIEhlYWRpbmdFZGl0b3Iuc2V0SGVhZGluZyhlZGl0b3IsIEVsZW1lbnRLaW5kcy5oZWFkaW5nXzQpO1xuICAgICAgICB9XG4gICAgfSxcbiAgICB7XG4gICAgICAgIGtleTogRWxlbWVudEtpbmRzLmhlYWRpbmdfNSxcbiAgICAgICAgdHlwZTogRWxlbWVudEtpbmRzLmhlYWRpbmdfNSxcbiAgICAgICAgbWFya3VwOiAnIyMjIyMnLFxuICAgICAgICBmb3JtYXQ6IChlZGl0b3I6IEVkaXRvcikgPT4ge1xuICAgICAgICAgICAgSGVhZGluZ0VkaXRvci5zZXRIZWFkaW5nKGVkaXRvciwgRWxlbWVudEtpbmRzLmhlYWRpbmdfNSk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHtcbiAgICAgICAga2V5OiBFbGVtZW50S2luZHMuaGVhZGluZ182LFxuICAgICAgICB0eXBlOiBFbGVtZW50S2luZHMuaGVhZGluZ182LFxuICAgICAgICBtYXJrdXA6ICcjIyMjIyMnLFxuICAgICAgICBmb3JtYXQ6IChlZGl0b3I6IEVkaXRvcikgPT4ge1xuICAgICAgICAgICAgSGVhZGluZ0VkaXRvci5zZXRIZWFkaW5nKGVkaXRvciwgRWxlbWVudEtpbmRzLmhlYWRpbmdfNik7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHtcbiAgICAgICAga2V5OiBFbGVtZW50S2luZHMuYmxvY2txdW90ZSxcbiAgICAgICAgdHlwZTogRWxlbWVudEtpbmRzLmJsb2NrcXVvdGUsXG4gICAgICAgIG1hcmt1cDogWyc+J10sXG4gICAgICAgIGZvcm1hdDogKGVkaXRvcjogRWRpdG9yKSA9PiB7XG4gICAgICAgICAgICBCbG9ja3F1b3RlRWRpdG9yLnRvZ2dsZUJsb2NrcXVvdGUoZWRpdG9yKTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAge1xuICAgICAgICBrZXk6IE1hcmtUeXBlcy5ib2xkLFxuICAgICAgICB0eXBlOiBNYXJrVHlwZXMuYm9sZCxcbiAgICAgICAgYmV0d2VlbjogWycqKicsICcqKiddLFxuICAgICAgICBtb2RlOiAnaW5saW5lJyxcbiAgICAgICAgaW5zZXJ0VHJpZ2dlcjogdHJ1ZVxuICAgIH0sXG4gICAge1xuICAgICAgICBrZXk6IGAke01hcmtUeXBlcy5ib2xkfV9fYCxcbiAgICAgICAgdHlwZTogTWFya1R5cGVzLmJvbGQsXG4gICAgICAgIGJldHdlZW46IFsnX18nLCAnX18nXSxcbiAgICAgICAgbW9kZTogJ2lubGluZScsXG4gICAgICAgIGluc2VydFRyaWdnZXI6IHRydWVcbiAgICB9LFxuICAgIHtcbiAgICAgICAga2V5OiBNYXJrVHlwZXMuaXRhbGljLFxuICAgICAgICB0eXBlOiBNYXJrVHlwZXMuaXRhbGljLFxuICAgICAgICBiZXR3ZWVuOiBbJyonLCAnKiddLFxuICAgICAgICBtb2RlOiAnaW5saW5lJyxcbiAgICAgICAgaW5zZXJ0VHJpZ2dlcjogdHJ1ZVxuICAgIH0sXG4gICAge1xuICAgICAgICBrZXk6IGAke01hcmtUeXBlcy5pdGFsaWN9X2AsXG4gICAgICAgIHR5cGU6IE1hcmtUeXBlcy5pdGFsaWMsXG4gICAgICAgIGJldHdlZW46IFsnXycsICdfJ10sXG4gICAgICAgIG1vZGU6ICdpbmxpbmUnLFxuICAgICAgICBpbnNlcnRUcmlnZ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gICAgICBtYXRjaDogKGVkaXRvcjogRWRpdG9yKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gVGhlUXVlcmllcy5pc1BhcmFncmFwaChlZGl0b3IpID8gWycqJywgJy0nLCAnKyddIDogW107XG4gICAgICAgIH0sXG4gICAgICAgIGZvcm1hdDogKGVkaXRvcjogRWRpdG9yKSA9PiB7XG4gICAgICAgICAgICBMaXN0RWRpdG9yLnRvZ2dsZUxpc3QoZWRpdG9yLCBFbGVtZW50S2luZHMuYnVsbGV0ZWRMaXN0KTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAge1xuICAgICAgICBrZXk6IEVsZW1lbnRLaW5kcy5udW1iZXJlZExpc3QsXG4gICAgICAgIHR5cGU6IEVsZW1lbnRLaW5kcy5saXN0SXRlbSxcbiAgICAgICAgbWFya3VwOiBbXSxcbiAgICAgICAgbWF0Y2g6IChlZGl0b3I6IEVkaXRvciwgdGV4dEZyb21CbG9ja1N0YXJ0OiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBUaGVRdWVyaWVzLmlzUGFyYWdyYXBoKGVkaXRvcikgJiYgL14tP1xcZCsoXFwufFxcKSkkLy50ZXN0KHRleHRGcm9tQmxvY2tTdGFydCkgPyBbdGV4dEZyb21CbG9ja1N0YXJ0XSA6IFtdO1xuICAgICAgICB9LFxuICAgICAgICBmb3JtYXQ6IChlZGl0b3I6IEVkaXRvciwgbWFya3VwPzogc3RyaW5nW10pID0+IHtcbiAgICAgICAgICAgIGxldCBzdGFydEluZGV4ID0gMTtcbiAgICAgICAgICAgIGlmIChtYXJrdXApIHtcbiAgICAgICAgICAgICAgICBzdGFydEluZGV4ID0gbWFya3VwWzBdLnNwbGl0KCcuJylbMF0gYXMgdW5rbm93biBhcyBudW1iZXI7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXJ0SW5kZXggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRJbmRleCA9IDE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgTGlzdEVkaXRvci50b2dnbGVMaXN0KGVkaXRvciwgRWxlbWVudEtpbmRzLm51bWJlcmVkTGlzdCwgc3RhcnRJbmRleCk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHtcbiAgICAgICAga2V5OiBFbGVtZW50S2luZHMuY2hlY2tJdGVtLFxuICAgICAgICB0eXBlOiBFbGVtZW50S2luZHMuY2hlY2tJdGVtLFxuICAgICAgICBtYXJrdXA6IFtdLFxuICAgICAgICBtYXRjaDogKGVkaXRvcjogRWRpdG9yKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gVGhlUXVlcmllcy5pc1BhcmFncmFwaChlZGl0b3IpID8gWydbXSddIDogW107XG4gICAgICAgIH0sXG4gICAgICAgIGZvcm1hdDogKGVkaXRvcjogRWRpdG9yKSA9PiB7XG4gICAgICAgICAgICBUb2RvSXRlbUVkaXRvci5pbnNlcnRUb2RvSXRlbShlZGl0b3IpO1xuICAgICAgICB9XG4gICAgfSxcbiAgICB7XG4gICAgICAgIGtleTogRWxlbWVudEtpbmRzLmhyLFxuICAgICAgICB0eXBlOiBFbGVtZW50S2luZHMuaHIsXG4gICAgICAgIG1hcmt1cDogJy0tLScsXG4gICAgICAgIGluc2VydFRyaWdnZXI6IHRydWVcbiAgICB9XG5dO1xuIl19
|