@globalpayments/vega 2.38.0 → 2.39.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/dist/cjs/{app-globals-7087f121.js → app-globals-dd3e7925.js} +2 -3
- package/dist/cjs/content-state-c5b47ca1.js +6644 -0
- package/dist/cjs/{image-annotation-action-7d82f7e1.js → image-annotation-action-75b9c0d3.js} +5 -6
- package/dist/cjs/index.cjs.js +13 -14
- package/dist/cjs/loader.cjs.js +8 -9
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +31 -7
- package/dist/cjs/vega-popover_2.cjs.entry.js +14 -0
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +18 -19
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +75 -79
- package/dist/cjs/vega.cjs.js +8 -9
- package/dist/collection/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.js +18 -2
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +7 -4
- package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +4 -0
- package/dist/collection/components/vega-popover/vega-popover.js +37 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.js +52 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +63 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.js +32 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/image-set-annotation-map-strategy.js +13 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.js +134 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.js +47 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.js +54 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +152 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.js +99 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-after-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.js +38 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +57 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.js +60 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-after-node-strategy.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +25 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.js +28 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.js +48 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +43 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.js +26 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.js +32 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-new-paragraph-strategy.js +44 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-update-url-strategy.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-insert-image-strategy.js +22 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-image-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.js +92 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.js +22 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +27 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +36 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +63 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy.js +46 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-update-text-strategy.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/image-update-url-action.js +13 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +3 -215
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +31 -244
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +17 -155
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +33 -184
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +40 -352
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +13 -23
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +14 -6
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +23 -182
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.js +41 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +24 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.js +11 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.js +16 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.js +23 -0
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +2 -2
- package/dist/collection/helpers/validator/rules/valid-phone-number-rule.js +7 -2
- package/dist/collection/helpers/validator/test/rules/valid-phone-number-rule.test.js +8 -0
- package/dist/esm/{app-globals-4cca4a96.js → app-globals-c954167a.js} +2 -3
- package/dist/esm/content-state-2edba4ec.js +6600 -0
- package/dist/esm/{form-field-controller-slimmer-3535e76a.js → form-field-controller-slimmer-7a9f2b2e.js} +1 -1
- package/dist/esm/{image-annotation-action-3da42221.js → image-annotation-action-b6668f48.js} +1 -2
- package/dist/esm/{index-6e05b241.js → index-d172bafa.js} +1 -1
- package/dist/esm/index.js +5 -6
- package/dist/esm/loader.js +9 -10
- package/dist/esm/{string-input-formatter-slimmer-d4132497.js → string-input-formatter-slimmer-418b54f0.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-51151fc3.js → sub-state-notify-slimmer-b36fd081.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-d77a1c46.js → sub-state-observer-slimmer-09452523.js} +1 -1
- package/dist/esm/vega-button-group_2.entry.js +3 -3
- package/dist/esm/vega-calendar_3.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +2 -2
- package/dist/esm/vega-color-picker.entry.js +2 -2
- package/dist/esm/vega-combo-box.entry.js +2 -2
- package/dist/esm/vega-date-picker_2.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +3 -3
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +2 -2
- package/dist/esm/vega-form.entry.js +2 -2
- package/dist/esm/vega-image-uploader.entry.js +2 -2
- package/dist/esm/vega-input-credit-card.entry.js +2 -2
- package/dist/esm/vega-input-numeric.entry.js +3 -3
- package/dist/esm/vega-input-phone-number.entry.js +33 -9
- package/dist/esm/vega-input-range.entry.js +2 -2
- package/dist/esm/vega-input-select.entry.js +2 -2
- package/dist/esm/vega-input.entry.js +5 -5
- package/dist/esm/{vega-internal-event-id-d0690d0d.js → vega-internal-event-id-f269c42f.js} +1 -1
- package/dist/esm/vega-left-nav_5.entry.js +3 -3
- package/dist/esm/vega-popover_2.entry.js +15 -1
- package/dist/esm/vega-radio_2.entry.js +2 -2
- package/dist/esm/vega-rich-text-content.entry.js +6 -7
- package/dist/esm/vega-rich-text-editor_4.entry.js +21 -25
- package/dist/esm/vega-selection-chip_2.entry.js +4 -4
- package/dist/esm/vega-selection-tile_2.entry.js +4 -4
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +2 -2
- package/dist/esm/vega-stepper.entry.js +2 -2
- package/dist/esm/vega-table_8.entry.js +3 -3
- package/dist/esm/vega-textarea.entry.js +2 -2
- package/dist/esm/vega-time-picker_2.entry.js +2 -2
- package/dist/esm/vega-toggle-switch.entry.js +2 -2
- package/dist/esm/vega.js +9 -10
- package/dist/types/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.d.ts +7 -0
- package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +1 -0
- package/dist/types/components/vega-popover/vega-popover.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.d.ts +37 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +66 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/image-set-annotation-map-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.d.ts +47 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.d.ts +61 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-after-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.d.ts +23 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-after-node-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.d.ts +20 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.d.ts +24 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-new-paragraph-strategy.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-update-url-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-insert-image-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-image-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.d.ts +38 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy.d.ts +20 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-update-text-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/image-update-url-action.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +1 -79
- package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +3 -77
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +0 -38
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +3 -58
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +5 -93
- package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +0 -43
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.d.ts +1 -0
- package/dist/types/components.d.ts +14 -0
- package/dist/types/helpers/validator/rules/valid-phone-number-rule.d.ts +3 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-ba077ca8.entry.js → p-073beb31.entry.js} +1 -1
- package/dist/vega/{p-6419e13e.entry.js → p-0b697841.entry.js} +1 -1
- package/dist/vega/p-0cc1ad76.js +1 -0
- package/dist/vega/{p-29d6ec6c.js → p-239bae84.js} +1 -1
- package/dist/vega/{p-7198d675.entry.js → p-24ac5151.entry.js} +1 -1
- package/dist/vega/{p-cb4fd6e1.entry.js → p-257b1bc2.entry.js} +1 -1
- package/dist/vega/{p-ba2833c0.entry.js → p-3c85a11b.entry.js} +1 -1
- package/dist/vega/{p-b517ed15.js → p-49bf2b3a.js} +1 -1
- package/dist/vega/p-4a8db510.entry.js +1 -0
- package/dist/vega/p-4b19706c.entry.js +1 -0
- package/dist/vega/{p-bf4996d5.entry.js → p-4e436842.entry.js} +1 -1
- package/dist/vega/{p-12fe63c1.entry.js → p-59834ea4.entry.js} +1 -1
- package/dist/vega/{p-50eabdca.entry.js → p-59cfed37.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-60e1ebe1.entry.js +1 -0
- package/dist/vega/{p-23fd9401.entry.js → p-629bd266.entry.js} +1 -1
- package/dist/vega/p-6408d3dc.entry.js +1 -0
- package/dist/vega/{p-3e8f9fcf.entry.js → p-64e0c944.entry.js} +1 -1
- package/dist/vega/{p-b9a0f136.entry.js → p-64e49394.entry.js} +1 -1
- package/dist/vega/p-6e5db02b.js +1 -0
- package/dist/vega/{p-9689ad99.entry.js → p-74ff73d6.entry.js} +1 -1
- package/dist/vega/{p-b809f3d7.entry.js → p-8120e7a1.entry.js} +1 -1
- package/dist/vega/p-894c067a.entry.js +1 -0
- package/dist/vega/{p-e9785742.entry.js → p-989b36a2.entry.js} +1 -1
- package/dist/vega/{p-a2a34239.entry.js → p-9ee23f34.entry.js} +1 -1
- package/dist/vega/{p-34bd9204.js → p-a9e1123a.js} +1 -1
- package/dist/vega/{p-267cde46.entry.js → p-b071be5c.entry.js} +1 -1
- package/dist/vega/{p-1b67c443.entry.js → p-b6bffdf3.entry.js} +1 -1
- package/dist/vega/{p-20326c64.js → p-bd0116f9.js} +1 -1
- package/dist/vega/{p-a7e078ac.entry.js → p-bf6d3c00.entry.js} +1 -1
- package/dist/vega/{p-ecaf4cfa.entry.js → p-c00fde35.entry.js} +1 -1
- package/dist/vega/{p-7baa4fae.entry.js → p-c2e96537.entry.js} +1 -1
- package/dist/vega/{p-3cb90bdf.entry.js → p-ce94a9c5.entry.js} +1 -1
- package/dist/vega/{p-904b489a.entry.js → p-d03945cb.entry.js} +1 -1
- package/dist/vega/p-d2e6090a.js +1 -0
- package/dist/vega/{p-348e95ba.js → p-d2ff56d8.js} +1 -1
- package/dist/vega/p-e0d3ca2d.js +1 -0
- package/dist/vega/{p-ee2e4bff.entry.js → p-ea78ddfa.entry.js} +1 -1
- package/dist/vega/{p-e9a5bd12.entry.js → p-f1ebe86b.entry.js} +1 -1
- package/dist/vega/{p-497f2f86.entry.js → p-fc49a98e.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/content-state-f97d3278.js +0 -2990
- package/dist/cjs/node-annotation.abstract-4f6df9cf.js +0 -3223
- package/dist/collection/components/vega-rich-text-editor/dto/actions/clear-child-nodes-action.js +0 -12
- package/dist/collection/components/vega-rich-text-editor/dto/helper/block-base-operator.js +0 -47
- package/dist/esm/content-state-ccf5f960.js +0 -2954
- package/dist/esm/node-annotation.abstract-b2e36bc4.js +0 -3214
- package/dist/types/components/vega-rich-text-editor/dto/actions/clear-child-nodes-action.d.ts +0 -9
- package/dist/types/components/vega-rich-text-editor/dto/helper/block-base-operator.d.ts +0 -24
- package/dist/vega/p-0461e318.js +0 -1
- package/dist/vega/p-1d93b3a9.js +0 -1
- package/dist/vega/p-2fecbcf9.entry.js +0 -1
- package/dist/vega/p-52a8a4f8.js +0 -1
- package/dist/vega/p-7edcb8d0.entry.js +0 -1
- package/dist/vega/p-9728d571.entry.js +0 -1
- package/dist/vega/p-a7f40a65.entry.js +0 -1
- package/dist/vega/p-a8b16ff2.js +0 -1
- package/dist/vega/p-aed80794.entry.js +0 -1
- package/dist/vega/p-f86ec91b.js +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InsertBlocksAfterAction } from '../../actions/insert-blocks-after-block';
|
|
2
|
+
import { InsertBlocksBeforeAction } from '../../actions/insert-blocks-before-block';
|
|
3
|
+
import { RTEBlock } from '../../blocks/block.abstract';
|
|
4
|
+
import type { RTEListBlock } from '../../blocks/list-block';
|
|
5
|
+
import type { VegaRTEContent } from '../../content-state';
|
|
6
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
7
|
+
/**
|
|
8
|
+
* Insert block array at the front of the block strategy.
|
|
9
|
+
*/
|
|
10
|
+
export declare class BlockInsertBlocksBeforeStrategy extends ActionHandleStrategy<InsertBlocksBeforeAction | InsertBlocksAfterAction, RTEListBlock | VegaRTEContent> {
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: InsertBlocksBeforeAction, target: RTEListBlock | VegaRTEContent): void;
|
|
15
|
+
/**
|
|
16
|
+
* Replaces a specific block with an array of blocks within a RTEContentBlock array.
|
|
17
|
+
*
|
|
18
|
+
* @param {RTEListBlock|VegaRTEContent} target - The list block or the VegaRTEContent instance.
|
|
19
|
+
* @param {RTEBlock} referBlock - Used as a reference block to identify the block that needs to be replaced in the `blocks` array.
|
|
20
|
+
* @param {RTEBlock[]} blocks - An array of RTEBlock objects that you want to replace the `referBlock` with in the `blocks` array.
|
|
21
|
+
*/
|
|
22
|
+
protected replaceBlockWithBlocks(target: RTEListBlock | VegaRTEContent, referBlock: RTEBlock, blocks: RTEBlock[]): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InsertImageToBlockAction } from '../../actions/insert-image-to-block-action';
|
|
2
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert a image block into the text block at special position strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BlockInsertImageIntoTextStrategy extends ActionHandleStrategy<InsertImageToBlockAction, RTETextBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* insertImage
|
|
10
|
+
*
|
|
11
|
+
* @param {InsertImageToBlockAction} action - Insert image action instance.
|
|
12
|
+
* @param {RTETextBlock} target - The text block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: InsertImageToBlockAction, target: RTETextBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LineBreakSingleBlockAction } from '../../actions/line-break-single-block-action';
|
|
2
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert a line break node into current text block at special position strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BlockInsertLineBreakStrategy extends ActionHandleStrategy<LineBreakSingleBlockAction, RTETextBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: LineBreakSingleBlockAction, target: RTETextBlock): void;
|
|
12
|
+
/**
|
|
13
|
+
* lineBreakSingleBlock
|
|
14
|
+
*
|
|
15
|
+
* @param {RTETextNode} splitNode -
|
|
16
|
+
* @param {number} startOffsetOfNode -
|
|
17
|
+
* @param {RTETextBlock} target -
|
|
18
|
+
* @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
|
|
19
|
+
*/
|
|
20
|
+
private lineBreakSingleBlock;
|
|
21
|
+
/**
|
|
22
|
+
* mergeLineBreakNodes
|
|
23
|
+
*
|
|
24
|
+
* @param {RTENode[]} beforeNodes -
|
|
25
|
+
* @param {RTETextNode} lineBreakNode -
|
|
26
|
+
* @param {RTENode[]} afterNodes -
|
|
27
|
+
* @param {RTETextBlock} target -
|
|
28
|
+
*/
|
|
29
|
+
private mergeLineBreakNodes;
|
|
30
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { lineBreakMultipleBlocksAction } from '../../actions/line-break-multiple-block-action';
|
|
2
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert a line break node into multiple blocks selection at special position strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BlockInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy<lineBreakMultipleBlocksAction, RTETextBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: lineBreakMultipleBlocksAction, target: RTETextBlock): void;
|
|
12
|
+
/**
|
|
13
|
+
* lineBreakMultipleBlocks
|
|
14
|
+
*
|
|
15
|
+
* @param {RTEBlock[]} selectedBlocks -
|
|
16
|
+
* @param {RTETextBlock} target -
|
|
17
|
+
* @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
|
|
18
|
+
*/
|
|
19
|
+
private lineBreakMultipleBlocks;
|
|
20
|
+
/**
|
|
21
|
+
* Concat the child nodes of multiple RTEBlocks if both are not images.
|
|
22
|
+
*
|
|
23
|
+
* @param {RTEBlock[]} blocks - multiple block of content in a rich text editor, such as a paragraph, heading, image, etc.
|
|
24
|
+
* @returns {RTENode[]} Array of connected block nodes
|
|
25
|
+
*/
|
|
26
|
+
private concatBlocksNodes;
|
|
27
|
+
/**
|
|
28
|
+
* mergeLineBreakNodes
|
|
29
|
+
*
|
|
30
|
+
* @param {RTENode[]} beforeNodes -
|
|
31
|
+
* @param {RTETextNode} lineBreakNode -
|
|
32
|
+
* @param {RTENode[]} afterNodes -
|
|
33
|
+
* @param {RTETextBlock} target -
|
|
34
|
+
*/
|
|
35
|
+
private mergeLineBreakNodes;
|
|
36
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BreakSingleBlockAction } from '../../actions/break-single-block-action';
|
|
2
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert new paragraph into current text block at special position.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BlockInsertNewParagraphStrategy extends ActionHandleStrategy<BreakSingleBlockAction, RTETextBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: BreakSingleBlockAction, target: RTETextBlock): void;
|
|
12
|
+
/**
|
|
13
|
+
* breakSingleTextBlock
|
|
14
|
+
*
|
|
15
|
+
* @param {RTETextNode} splitNode -
|
|
16
|
+
* @param {number} startOffsetOfNode -
|
|
17
|
+
* @param {RTETextBlock} target -
|
|
18
|
+
* @returns {Nullable<RTEBlock>} Nullable<RTEBlock>
|
|
19
|
+
*/
|
|
20
|
+
private breakSingleTextBlock;
|
|
21
|
+
/**
|
|
22
|
+
* copyInlineStyleToNewParagraph
|
|
23
|
+
*
|
|
24
|
+
* @param {RTETextNode} needCopedNode - The text node.
|
|
25
|
+
* @param {RTETextBlock} target - The text block.
|
|
26
|
+
* @returns {RTETextBlock} - The new paragraph.
|
|
27
|
+
*/
|
|
28
|
+
private copyInlineStyleToNewParagraph;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InsertNodesAfterAction } from '../../actions/insert-nodes-after-node-action';
|
|
2
|
+
import type { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
4
|
+
import { BlockReplaceNodeWithNodesStrategy } from './block-replace-node-with-nodes-strategy';
|
|
5
|
+
/**
|
|
6
|
+
* Insert some text nodes at the behind of the node strategy.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BlockInsertNodesAfterNodeStrategy extends BlockReplaceNodeWithNodesStrategy {
|
|
9
|
+
/**
|
|
10
|
+
* @inheritDoc
|
|
11
|
+
*/
|
|
12
|
+
protected handleAction(action: InsertNodesAfterAction, target: RTETextBlock | RTEImageBlock): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InsertNodesBeforeAction } from '../../actions/insert-nodes-before-node-action';
|
|
2
|
+
import type { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
4
|
+
import { BlockReplaceNodeWithNodesStrategy } from './block-replace-node-with-nodes-strategy';
|
|
5
|
+
/**
|
|
6
|
+
* Insert some text nodes at the before of the node strategy.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BlockInsertNodesBeforeNodeStrategy extends BlockReplaceNodeWithNodesStrategy {
|
|
9
|
+
/**
|
|
10
|
+
* @inheritDoc
|
|
11
|
+
*/
|
|
12
|
+
protected handleAction(action: InsertNodesBeforeAction, target: RTETextBlock | RTEImageBlock): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MergeTwoBlocksNodesAction } from '../../actions/merge-two-blocks-nodes-action';
|
|
2
|
+
import { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import { RTETextBlock } from '../../blocks/text-block';
|
|
4
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
5
|
+
/**
|
|
6
|
+
* Append the second block child nodes to the first block child nodes and remove the second block strategy.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BlockMergeNodesStrategy extends ActionHandleStrategy<MergeTwoBlocksNodesAction, RTETextBlock | RTEImageBlock> {
|
|
9
|
+
/**
|
|
10
|
+
* Merges the child nodes of two RTEBlocks if they have the same type or both are not images.
|
|
11
|
+
*
|
|
12
|
+
* @param {MergeTwoBlocksNodesAction} action - The merge block nodes action instance.
|
|
13
|
+
* @param {RTETextBlock | RTEImageBlock} target - The first text block or image block.
|
|
14
|
+
*/
|
|
15
|
+
protected handleAction(action: MergeTwoBlocksNodesAction, target: RTETextBlock | RTEImageBlock): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RemoveChildAction } from '../../actions/remove-child-action';
|
|
2
|
+
import type { RTEListBlock } from '../../blocks/list-block';
|
|
3
|
+
import type { VegaRTEContent } from '../../content-state';
|
|
4
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
5
|
+
/**
|
|
6
|
+
* List block or VegaRTEContent remove child block strategy.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BlockRemoveChildBlockStrategy extends ActionHandleStrategy<RemoveChildAction, RTEListBlock | VegaRTEContent> {
|
|
9
|
+
/**
|
|
10
|
+
* @inheritDoc
|
|
11
|
+
*/
|
|
12
|
+
protected handleAction(action: RemoveChildAction, target: RTEListBlock | VegaRTEContent): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RemoveChildAction } from '../../actions/remove-child-action';
|
|
2
|
+
import { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
4
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
5
|
+
/**
|
|
6
|
+
* Remove the node from the text block or image block strategy.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BlockRemoveNodeStrategy extends ActionHandleStrategy<RemoveChildAction, RTETextBlock | RTEImageBlock> {
|
|
9
|
+
/**
|
|
10
|
+
* Remove the text node from the parent text block or remove the image node from the parent image block.
|
|
11
|
+
* Remove the block if the block nodes is empty after delete the current node.
|
|
12
|
+
*
|
|
13
|
+
* @param {RemoveChildAction} action - The remove child action instance.
|
|
14
|
+
* @param {RTETextBlock | RTEImageBlock} target - The parent block of the node that will be removed.
|
|
15
|
+
*/
|
|
16
|
+
protected handleAction(action: RemoveChildAction, target: RTETextBlock | RTEImageBlock): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InsertNodesAfterAction } from '../../actions/insert-nodes-after-node-action';
|
|
2
|
+
import { InsertNodesBeforeAction } from '../../actions/insert-nodes-before-node-action';
|
|
3
|
+
import { RTEBlock } from '../../blocks/block.abstract';
|
|
4
|
+
import type { RTEImageBlock } from '../../blocks/image-block';
|
|
5
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
6
|
+
import { RTENode } from '../../nodes/node.abstract';
|
|
7
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
8
|
+
/**
|
|
9
|
+
* Replace the node with new node array strategy.
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class BlockReplaceNodeWithNodesStrategy extends ActionHandleStrategy<InsertNodesBeforeAction | InsertNodesAfterAction, RTETextBlock | RTEImageBlock> {
|
|
12
|
+
/**
|
|
13
|
+
* Replace the current node to the new node array.
|
|
14
|
+
*
|
|
15
|
+
* @param {RTEBlock} target - The image block or the text block.
|
|
16
|
+
* @param {RTENode} referNode - The text node or the image node.
|
|
17
|
+
* @param {RTENode[]} newNodes - The array of the text node or the image node.
|
|
18
|
+
*/
|
|
19
|
+
protected replaceNodeWithNodes(target: RTEBlock, referNode: RTENode, newNodes: RTENode[]): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReplaceChildNodesAction } from '../../actions/replace-child-nodes-action';
|
|
2
|
+
import type { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
4
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
5
|
+
/**
|
|
6
|
+
* Remove all nodes and append new nodes strategy.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BlockReplaceNodesStrategy extends ActionHandleStrategy<ReplaceChildNodesAction, RTETextBlock | RTEImageBlock> {
|
|
9
|
+
/**
|
|
10
|
+
* Empty the text block or image block nodes and add new nodes.
|
|
11
|
+
*
|
|
12
|
+
* @param {ReplaceChildNodesAction} action - The replace child nodes action instance.
|
|
13
|
+
* @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
|
|
14
|
+
*/
|
|
15
|
+
protected handleAction(action: ReplaceChildNodesAction, target: RTETextBlock | RTEImageBlock): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SplitBlockWithNodeAction } from '../../actions/split-block-with-node-action';
|
|
2
|
+
import type { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Split the current image block with a special position strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BlockSplitWithImageNodeStrategy extends ActionHandleStrategy<SplitBlockWithNodeAction, RTEImageBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: SplitBlockWithNodeAction, target: RTEImageBlock): void;
|
|
12
|
+
/**
|
|
13
|
+
* The image offset should be 0 or 1
|
|
14
|
+
* <vega-rich-text-image-editor><img /></vega-rich-text-image-editor>
|
|
15
|
+
*
|
|
16
|
+
* @param {RTEImageNode} imageNode The split point image node.
|
|
17
|
+
* @param {number} imageOffset The cursor point 0 | 1.
|
|
18
|
+
* @param {RTEImageBlock} target The image block.
|
|
19
|
+
* @returns {Nullable<RTEBlock>} The new block after split
|
|
20
|
+
*/
|
|
21
|
+
private splitImageNodes;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new RTEImageBlock instance with the provided RTEImageNode instances appended to it.
|
|
24
|
+
*
|
|
25
|
+
* @param {RTEImageNode[]} nodes - An array of RTEImageNode objects that will be used to create a new RTEImageBlock instance.
|
|
26
|
+
* @param {RTEImageBlock} target The image block.
|
|
27
|
+
* @returns {RTEImageBlock} A new `RTEImageBlock` object with the provided `nodes` appended to it.
|
|
28
|
+
*/
|
|
29
|
+
private cloneWithNodes;
|
|
30
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Nullable } from '../../../../../types/general';
|
|
2
|
+
import { SplitBlockWithNodeAction } from '../../actions/split-block-with-node-action';
|
|
3
|
+
import { RTEBlock } from '../../blocks/block.abstract';
|
|
4
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
5
|
+
import { RTETextNode } from '../../nodes/text-node';
|
|
6
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
7
|
+
/**
|
|
8
|
+
* Split the current node with a special position strategy.
|
|
9
|
+
*/
|
|
10
|
+
export declare class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy<SplitBlockWithNodeAction, RTETextBlock> {
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: SplitBlockWithNodeAction, target: RTETextBlock): void;
|
|
15
|
+
/**
|
|
16
|
+
* Splits a text node at a specified offset within a block of nodes and returns a new block with the split nodes.
|
|
17
|
+
*
|
|
18
|
+
* @param {RTETextNode} splitNode - The text node that will be split
|
|
19
|
+
* @param {number} startOffsetOfNode - The index at which will split the text content of the `splitNode`.
|
|
20
|
+
* @param {RTETextBlock} textBlock - The text block need to be splited.
|
|
21
|
+
* @returns {Nullable<RTEBlock>} return either an RTEBlock object or null.
|
|
22
|
+
*/
|
|
23
|
+
protected splitTextNodeBlock(splitNode: RTETextNode, startOffsetOfNode: number, textBlock: RTETextBlock): Nullable<RTEBlock>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TransformListAction } from '../../actions/transform-list-action';
|
|
2
|
+
import type { RTETextBlock } from '../../blocks/text-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Convert the selected blocks to list strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BlockTransformToListStrategy extends ActionHandleStrategy<TransformListAction, RTETextBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* This method will create a empty list block and append all selected blocks as list item block.
|
|
10
|
+
*
|
|
11
|
+
* @param {TransformListAction} action - The transform list action instance.
|
|
12
|
+
* @param {RTETextBlock} target - The first item of the selected block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: TransformListAction, target: RTETextBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InsertImageToBlockAction } from '../../actions/insert-image-to-block-action';
|
|
2
|
+
import type { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert a image node at the special position of image block.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ImageBlockInsertImageStrategy extends ActionHandleStrategy<InsertImageToBlockAction, RTEImageBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: InsertImageToBlockAction, target: RTEImageBlock): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LineBreakSingleBlockAction } from '../../actions/line-break-single-block-action';
|
|
2
|
+
import { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* The image block insert line break strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ImageInsertLineBreakStrategy extends ActionHandleStrategy<LineBreakSingleBlockAction, RTEImageBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* The image block not support insert the line break node, so invoke the insert new paragraph logic directly.
|
|
10
|
+
*
|
|
11
|
+
* @param {LineBreakSingleBlockAction} action - The action instance.
|
|
12
|
+
* @param {RTEImageBlock} target - The image block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: LineBreakSingleBlockAction, target: RTEImageBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { lineBreakMultipleBlocksAction } from '../../actions/line-break-multiple-block-action';
|
|
2
|
+
import type { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert a line break node into multiple blocks selection at special position strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ImageInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy<lineBreakMultipleBlocksAction, RTEImageBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: lineBreakMultipleBlocksAction, target: RTEImageBlock): void;
|
|
12
|
+
/**
|
|
13
|
+
* Inserts a new paragraph block with a line break after a selected block of text in a rich text editor.
|
|
14
|
+
*
|
|
15
|
+
* @param {RTEBlock[]} selectedBlocks - An array of RTEBlock objects that represent the blocks that have been selected for a specific action in the Rich Text Editor.
|
|
16
|
+
* @param {RTEImageBlock} target - The image block.
|
|
17
|
+
* @returns {Nullable<RTETextNode>} Returns a Nullable RTETextNode.
|
|
18
|
+
*/
|
|
19
|
+
private lineBreakMultipleBlocks;
|
|
20
|
+
/**
|
|
21
|
+
* Concat the child nodes of multiple RTEBlocks if both are not images.
|
|
22
|
+
*
|
|
23
|
+
* @param {RTEBlock[]} blocks - multiple block of content in a rich text editor, such as a paragraph, heading, image, etc.
|
|
24
|
+
* @returns {RTENode[]} Array of connected block nodes
|
|
25
|
+
*/
|
|
26
|
+
private concatBlocksNodes;
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BreakSingleBlockAction } from '../../actions/break-single-block-action';
|
|
2
|
+
import type { RTEImageBlock } from '../../blocks/image-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert a new paragraph at the image block special position strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ImageInsertNewParagraphStrategy extends ActionHandleStrategy<BreakSingleBlockAction, RTEImageBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: BreakSingleBlockAction, target: RTEImageBlock): void;
|
|
12
|
+
/**
|
|
13
|
+
* Used to split a block of text at a specific position and insert a new paragraph block.
|
|
14
|
+
*
|
|
15
|
+
* @param {RTEImageNode} splitNode - The node that needs to be split into separate blocks.
|
|
16
|
+
* @param {number} startOffsetOfNode - The index or position within the `splitNode` where the block should be broken or split.
|
|
17
|
+
* @param {RTEImageBlock} target - The image block.
|
|
18
|
+
* @returns {Nullable<RTEBlock>} Returns either a new paragraph block or the new block created after splitting the original block.
|
|
19
|
+
*/
|
|
20
|
+
private breakSingleBlock;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ImageUpdateUrlAction } from '../../actions/image-update-url-action';
|
|
2
|
+
import { RTEImageNode } from '../../nodes/image-node';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* The image node update property url strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ImageUpdateUrlStrategy extends ActionHandleStrategy<ImageUpdateUrlAction, RTEImageNode> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: ImageUpdateUrlAction, target: RTEImageNode): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InsertImageToBlockAction } from '../../actions/insert-image-to-block-action';
|
|
2
|
+
import type { RTEListBlock } from '../../blocks/list-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert image to list block strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListInsertImageStrategy extends ActionHandleStrategy<InsertImageToBlockAction, RTEListBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* Insert image block at behind of the list item block.
|
|
10
|
+
*
|
|
11
|
+
* @param {InsertImageToBlockAction} action - The insert image action instance.
|
|
12
|
+
* @param {RTEListBlock} target - The list block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: InsertImageToBlockAction, target: RTEListBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DeleteBlockContentAction } from '../../actions/delete-block-content-action';
|
|
2
|
+
import type { RTEListItemBlock } from '../../blocks/list-item-block';
|
|
3
|
+
import { BlockDeleteTextContentStrategy } from './block-delete-text-content-strategy';
|
|
4
|
+
/**
|
|
5
|
+
* The list item block block delete text content strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListItemDeleteTextContentStrategy extends BlockDeleteTextContentStrategy {
|
|
8
|
+
/**
|
|
9
|
+
* Delete the list item content and delete the parent list after delete the last item.
|
|
10
|
+
*
|
|
11
|
+
* @param {DeleteBlockContentAction} action - The delete block content action instance.
|
|
12
|
+
* @param {RTEListItemBlock} target - The list item block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: DeleteBlockContentAction, target: RTEListItemBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InsertImageToBlockAction } from '../../actions/insert-image-to-block-action';
|
|
2
|
+
import type { RTEListItemBlock } from '../../blocks/list-item-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert image node to list item block strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListItemInsertImageStrategy extends ActionHandleStrategy<InsertImageToBlockAction, RTEListItemBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* The image node can not insert into list item block, so insert image after parent list block.
|
|
10
|
+
*
|
|
11
|
+
* @param {InsertImageToBlockAction} action - The action instance.
|
|
12
|
+
* @param {RTEListItemBlock} target - The list item block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: InsertImageToBlockAction, target: RTEListItemBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BreakSingleBlockAction } from '../../actions/break-single-block-action';
|
|
2
|
+
import type { RTEListItemBlock } from '../../blocks/list-item-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Insert new paragraph into current list item block at special position.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListItemInsertNewParagraphStrategy extends ActionHandleStrategy<BreakSingleBlockAction, RTEListItemBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: BreakSingleBlockAction, target: RTEListItemBlock): void;
|
|
12
|
+
/**
|
|
13
|
+
* Breaks a single list item block at a specific position.
|
|
14
|
+
*
|
|
15
|
+
* @param {RTETextNode} splitNode - The node that needs to be split within a list item block.
|
|
16
|
+
* @param {number} startOffsetOfNode - The index within the `splitNode` where the break operation should occur.
|
|
17
|
+
* @param {RTEListItemBlock} target - The list item block.
|
|
18
|
+
* @returns {Nullable<RTEBlock>} Returns either a new `RTEListItemBlock` if the caret
|
|
19
|
+
* position is at the end of the `splitNode`, or it returns the result of splitting the block at the
|
|
20
|
+
* caret position if it is neither at the start nor at the end.
|
|
21
|
+
*/
|
|
22
|
+
private breakSingleListItemBlock;
|
|
23
|
+
/**
|
|
24
|
+
* Breaks a list item at the end and handles the insertion of a new list item or paragraph accordingly.
|
|
25
|
+
*
|
|
26
|
+
* @param {RTEListItemBlock} newListItem - Item that represents a new list item to be added to the existing list.
|
|
27
|
+
* @param {RTEListItemBlock} target - The list item block.
|
|
28
|
+
* @returns {RTEBlock} Returns a `RTEBlock`.
|
|
29
|
+
*/
|
|
30
|
+
private breakListItemAtEnd;
|
|
31
|
+
/**
|
|
32
|
+
* Copy the inline style to new node
|
|
33
|
+
*
|
|
34
|
+
* @param {RTETextNode} needCopedNode - The node that needed to be copied to
|
|
35
|
+
* @returns {RTETextNode} Returns a `RTETextNode`.
|
|
36
|
+
*/
|
|
37
|
+
private copyInlineStyleToNewNode;
|
|
38
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RemoveNestListAction } from '../../actions/remove-nest-list-action';
|
|
2
|
+
import type { RTEListItemBlock } from '../../blocks/list-item-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Remove list item nest list block strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListItemRemoveNestListStrategy extends ActionHandleStrategy<RemoveNestListAction, RTEListItemBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* Remove the nest list block from the list item, clear the property children when the children is empty.
|
|
10
|
+
*
|
|
11
|
+
* @param {RemoveNestListAction} action - The action instance.
|
|
12
|
+
* @param {RTEListItemBlock} target - The list item block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: RemoveNestListAction, target: RTEListItemBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RemoveChildAction } from '../../actions/remove-child-action';
|
|
2
|
+
import type { RTEListItemBlock } from '../../blocks/list-item-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Remove list item child node strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListItemRemoveNodeStrategy extends ActionHandleStrategy<RemoveChildAction, RTEListItemBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* Remove child node from the list item, remove the list item if the list item is empty.
|
|
10
|
+
*
|
|
11
|
+
* @param {RemoveChildAction} action - The remove child action instance.
|
|
12
|
+
* @param {RTEListItemBlock} target - The list item block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: RemoveChildAction, target: RTEListItemBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReplaceNestListAction } from '../../actions/replace-nest-list-action';
|
|
2
|
+
import type { RTEListItemBlock } from '../../blocks/list-item-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Replace list item nest list strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListItemReplaceNestListStrategy extends ActionHandleStrategy<ReplaceNestListAction, RTEListItemBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: ReplaceNestListAction, target: RTEListItemBlock): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RemoveChildAction } from '../../actions/remove-child-action';
|
|
2
|
+
import type { RTEListBlock } from '../../blocks/list-block';
|
|
3
|
+
import { BlockRemoveChildBlockStrategy } from './block-remove-child-block-strategy';
|
|
4
|
+
/**
|
|
5
|
+
* List remove list item strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListRemoveListItemStrategy extends BlockRemoveChildBlockStrategy {
|
|
8
|
+
/**
|
|
9
|
+
* Remove the list item, check the list item and remove self if the list item is empty.
|
|
10
|
+
*
|
|
11
|
+
* @param {RemoveChildAction} action - The remove action instance.
|
|
12
|
+
* @param {RTEListBlock} target - The list block.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: RemoveChildAction, target: RTEListBlock): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TransformListAction } from '../../actions/transform-list-action';
|
|
2
|
+
import type { RTEListBlock } from '../../blocks/list-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Convert the selected blocks to list strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListTransformToListStrategy extends ActionHandleStrategy<TransformListAction, RTEListBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: TransformListAction, target: RTEListBlock): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TransformParagraphAction } from '../../actions/transform-paragraph-action';
|
|
2
|
+
import type { RTEListBlock } from '../../blocks/list-block';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Convert the selected list block to paragraph strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListTransformToParagraphStrategy extends ActionHandleStrategy<TransformParagraphAction, RTEListBlock> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: TransformParagraphAction, target: RTEListBlock): void;
|
|
12
|
+
/**
|
|
13
|
+
* Converts a RTEListItemBlock to a RTETextBlock representing a paragraph.
|
|
14
|
+
*
|
|
15
|
+
* @param {RTEListItemBlock} block - The block that will be covered
|
|
16
|
+
* @returns {RTETextBlock} Returns a `RTETextBlock`.
|
|
17
|
+
*/
|
|
18
|
+
private toParagraph;
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReplaceSelectedTextAction } from '../../actions/replace-selected-text-action';
|
|
2
|
+
import { RTETextNode } from '../../nodes/text-node';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Replaces the rich text node selected text strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeReplaceSelectedTextStrategy extends ActionHandleStrategy<ReplaceSelectedTextAction, RTETextNode> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected handleAction(action: ReplaceSelectedTextAction, target: RTETextNode): void;
|
|
12
|
+
/**
|
|
13
|
+
* Replaces the selected text within a given range with a new text in a TypeScript class.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} text - The new text that will replace the currently selected text within the specified range.
|
|
16
|
+
* @param {RTERange} currentRange - A range of text within a Rich Text Editor (RTE).
|
|
17
|
+
* @param {RTETextNode} target - The RTE text node instance.
|
|
18
|
+
*/
|
|
19
|
+
private replaceSelectedText;
|
|
20
|
+
}
|