@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,15 @@
|
|
|
1
|
+
import { UpdateTextAction } from '../../actions/update-text-action';
|
|
2
|
+
import { RTETextNode } from '../../nodes/text-node';
|
|
3
|
+
import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* Update the editor text node text content strategy.
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeUpdateTextStrategy extends ActionHandleStrategy<UpdateTextAction, RTETextNode> {
|
|
8
|
+
/**
|
|
9
|
+
* Updates the text content of a node and unlink the node if it is a link node and the text is deleted.
|
|
10
|
+
*
|
|
11
|
+
* @param {UpdateTextAction} action - The update text action instance.
|
|
12
|
+
* @param {RTETextNode} target - The text node instance which need update the text.
|
|
13
|
+
*/
|
|
14
|
+
protected handleAction(action: UpdateTextAction, target: RTETextNode): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModifyContentAction, ModifyContentActionType } from './modify-content-action.abstract';
|
|
2
|
+
/**
|
|
3
|
+
* Update the image node property url after the image uploaded.
|
|
4
|
+
*
|
|
5
|
+
* @example currentImageNode.apply(new ImageUpdateUrlAction(url))
|
|
6
|
+
*/
|
|
7
|
+
export declare class ImageUpdateUrlAction extends ModifyContentAction {
|
|
8
|
+
type: ModifyContentActionType;
|
|
9
|
+
url: string;
|
|
10
|
+
constructor(newUrl: string);
|
|
11
|
+
}
|
package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare enum ModifyContentActionType {
|
|
|
4
4
|
'UPDATE_TEXT' = "UPDATE_TEXT",
|
|
5
5
|
'REPLACE_SELECTED_TEXT' = "REPLACE_SELECTED_TEXT",
|
|
6
6
|
'APPEND_CHILD_NODES' = "APPEND_CHILD_NODES",
|
|
7
|
-
'CLEAR_CHILD_NODES' = "CLEAR_CHILD_NODES",
|
|
8
7
|
'INSERT_BLOCKS_AFTER' = "INSERT_BLOCKS_AFTER",
|
|
9
8
|
'INSERT_BLOCKS_BEFORE' = "INSERT_BLOCKS_BEFORE",
|
|
10
9
|
'INSERT_NODES_AFTER' = "INSERT_NODES_AFTER",
|
|
@@ -19,7 +18,8 @@ export declare enum ModifyContentActionType {
|
|
|
19
18
|
'TRANSFORM_LIST_BLOCK' = "TRANSFORM_LIST_BLOCK",
|
|
20
19
|
'TRANSFORM_PARAGRAPH_BLOCK' = "TRANSFORM_PARAGRAPH_BLOCK",
|
|
21
20
|
'DELETE_BLOCK_CONTENT' = "DELETE_BLOCK_CONTENT",
|
|
22
|
-
'INSERT_IMAGE_TO_BLOCK' = "INSERT_IMAGE_TO_BLOCK"
|
|
21
|
+
'INSERT_IMAGE_TO_BLOCK' = "INSERT_IMAGE_TO_BLOCK",
|
|
22
|
+
'UPDATE_IMAGE_NODE_URL' = "UPDATE_IMAGE_NODE_URL"
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Abstract class for update node content, delete node, insert node
|
|
@@ -7,11 +7,10 @@ import { VegaRTEContent } from '../content-state';
|
|
|
7
7
|
import { InternalAnnotationTypeEnum } from '../annotations/annotation.abstract';
|
|
8
8
|
import { LinkGroupAnnotation } from '../annotations/link-group-annotation';
|
|
9
9
|
import { RTENode } from '../nodes/node.abstract';
|
|
10
|
-
import { BlockBaseOperator } from '../helper/block-base-operator';
|
|
11
10
|
/**
|
|
12
11
|
* Abstract class for block
|
|
13
12
|
*/
|
|
14
|
-
export declare abstract class RTEBlock
|
|
13
|
+
export declare abstract class RTEBlock {
|
|
15
14
|
id: string;
|
|
16
15
|
annotationMap: Map<keyof typeof BlockAnnotationTypeEnum | InternalAnnotationTypeEnum.LINK_GROUP, BlockAnnotation | LinkGroupAnnotation>;
|
|
17
16
|
abstract type: RTEBlockType;
|
|
@@ -61,82 +60,6 @@ export declare abstract class RTEBlock extends BlockBaseOperator {
|
|
|
61
60
|
* @param {AnnotationAction} action - Annotation action
|
|
62
61
|
*/
|
|
63
62
|
protected applyAnnotationAction(action: AnnotationAction): void;
|
|
64
|
-
/**
|
|
65
|
-
* Appends a list of RTENode objects to the current node's child nodes and sets the parent block of each node to the current node.
|
|
66
|
-
*
|
|
67
|
-
* @param {RTENode[]} nodesToBeAppended - An array of `RTENode` objects that you want to append to the current block.
|
|
68
|
-
*/
|
|
69
|
-
protected appendChildNodes(nodesToBeAppended: RTENode[]): void;
|
|
70
|
-
/**
|
|
71
|
-
* Merges the child nodes of two RTEBlocks if they have the same type or both are not images.
|
|
72
|
-
*
|
|
73
|
-
* @param {RTEBlock} secondBlock - A block of content in a rich text editor, such as a paragraph, heading, image, etc.
|
|
74
|
-
*/
|
|
75
|
-
protected mergeTwoBlocksNodes(secondBlock: RTEBlock): void;
|
|
76
|
-
/**
|
|
77
|
-
* Concat the child nodes of multiple RTEBlocks if both are not images.
|
|
78
|
-
*
|
|
79
|
-
* @param {RTEBlock[]} blocks - multiple block of content in a rich text editor, such as a paragraph, heading, image, etc.
|
|
80
|
-
* @returns {RTENode[]} Array of connected block nodes
|
|
81
|
-
*/
|
|
82
|
-
protected concatBlocksNodes(blocks: RTEBlock[]): RTENode[];
|
|
83
|
-
/**
|
|
84
|
-
* Returns the previous node relative to the current node in a rich text editor structure.
|
|
85
|
-
*
|
|
86
|
-
* @param {RTENode} currentNode - An object of type `RTENode`.
|
|
87
|
-
* @returns {Nullable<RTENode>} the previous block last node
|
|
88
|
-
*/
|
|
89
|
-
protected getPreviousNode(currentNode: RTENode): Nullable<RTENode>;
|
|
90
|
-
/**
|
|
91
|
-
* Returns the next node relative to the current node in a rich text editor structure.
|
|
92
|
-
*
|
|
93
|
-
* @param {RTENode} currentNode - An object of type `RTENode`.
|
|
94
|
-
* @returns {Nullable<RTENode>} the next block first node
|
|
95
|
-
*/
|
|
96
|
-
protected getNextNode(currentNode: RTENode): Nullable<RTENode>;
|
|
97
|
-
/**
|
|
98
|
-
* Determines if a given node is the first node within the current state.
|
|
99
|
-
*
|
|
100
|
-
* @param {RTENode} currentNode - An object representing a node in a rich text editor (RTE).
|
|
101
|
-
* @returns {boolean} True or false;
|
|
102
|
-
*/
|
|
103
|
-
protected isContentFirstNode(currentNode: RTENode): boolean;
|
|
104
|
-
/**
|
|
105
|
-
* Returns the last node within a given RTE block, handling different block types accordingly.
|
|
106
|
-
*
|
|
107
|
-
* @param {RTEBlock} currentBlock - Returns the last node within that block.
|
|
108
|
-
* @returns {Nullable<RTENode>} Returns the last node of the given `currentBlock` object.
|
|
109
|
-
*/
|
|
110
|
-
protected getBlockLastNode(currentBlock: RTEBlock): Nullable<RTENode>;
|
|
111
|
-
/**
|
|
112
|
-
* Returns the first node within a given RTE block, handling different block types accordingly.
|
|
113
|
-
*
|
|
114
|
-
* @param {RTEBlock} currentBlock - Returns the first node within that block.
|
|
115
|
-
* @returns {Nullable<RTENode>} Returns the first node of the given `currentBlock` object.
|
|
116
|
-
*/
|
|
117
|
-
protected getBlockFirstNode(currentBlock: RTEBlock): Nullable<RTENode>;
|
|
118
|
-
/**
|
|
119
|
-
* TODO: The getPreviousBlock add nest list support
|
|
120
|
-
* This function retrieves the previous block in a rich text editor, considering different scenarios such as being in a bullet list.
|
|
121
|
-
*
|
|
122
|
-
* @param {RTEBlock} currentBlock - Used to retrieve the previous block relative to the given `currentBlock` within a rich text editor context.
|
|
123
|
-
* @returns {Nullable<RTEBlock>} The previous block if existing
|
|
124
|
-
*/
|
|
125
|
-
protected getPreviousBlock(currentBlock: RTEBlock): Nullable<RTEBlock>;
|
|
126
|
-
/**
|
|
127
|
-
* This function retrieves the next block in a rich text editor, considering different scenarios such as being in a bullet list.
|
|
128
|
-
*
|
|
129
|
-
* @param {RTEBlock} currentBlock - Used to retrieve the next block relative to the given `currentBlock` within a rich text editor context.
|
|
130
|
-
* @returns {Nullable<RTEBlock>} The next block if existing
|
|
131
|
-
*/
|
|
132
|
-
protected getNextBlock(currentBlock: RTEBlock): Nullable<RTEBlock>;
|
|
133
|
-
/**
|
|
134
|
-
* Replaces a specific node with an array of nodes within a RTENode array.
|
|
135
|
-
*
|
|
136
|
-
* @param {RTENode} referNode - Used as a reference node to identify the node that needs to be replaced in the `nodes` array.
|
|
137
|
-
* @param {RTENode[]} nodes - An array of RTENode objects that you want to replace the `referNode` with in the `nodes` array.
|
|
138
|
-
*/
|
|
139
|
-
protected replaceNodeWithNodes(referNode: RTENode, nodes: RTENode[]): void;
|
|
140
63
|
/**
|
|
141
64
|
* abstract method to apply annotation action in each block
|
|
142
65
|
*
|
|
@@ -150,5 +73,4 @@ export declare abstract class RTEBlock extends BlockBaseOperator {
|
|
|
150
73
|
*/
|
|
151
74
|
abstract isNotEmpty(): boolean;
|
|
152
75
|
abstract getLastNode(): RTENode;
|
|
153
|
-
protected abstract doModifyActionApply(action: ModifyContentAction): void;
|
|
154
76
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RTEBlockType, VegaRTEImageBlock } from '../../interface';
|
|
2
2
|
import { RTEBlock } from './block.abstract';
|
|
3
3
|
import { RTEImageNode } from '../nodes/image-node';
|
|
4
|
-
import { ModifyContentAction } from '../actions/modify-content-action.abstract';
|
|
5
4
|
import { VegaRTEContent } from '../content-state';
|
|
6
5
|
/**
|
|
7
6
|
* Image block
|
|
@@ -31,82 +30,9 @@ export declare class RTEImageBlock extends RTEBlock {
|
|
|
31
30
|
*/
|
|
32
31
|
getLastNode(): RTEImageNode;
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
33
|
+
* Create a new image block.
|
|
35
34
|
*
|
|
36
|
-
* @
|
|
35
|
+
* @returns {RTEImageBlock} - The empty image block.
|
|
37
36
|
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Removes a specified child node from a list of nodes and triggers a parent action if the list becomes empty.
|
|
41
|
-
*
|
|
42
|
-
* @param {RemoveChildAction} action - Action to be performed when removing a child node from the list of nodes.
|
|
43
|
-
*/
|
|
44
|
-
private removeChildNode;
|
|
45
|
-
/**
|
|
46
|
-
* The image offset should be 0 or 1
|
|
47
|
-
* <vega-rich-text-image-editor><img /></vega-rich-text-image-editor>
|
|
48
|
-
*
|
|
49
|
-
* @param {RTEImageNode} imageNode The split point image node
|
|
50
|
-
* @param {number} imageOffset The cursor point 0 | 1
|
|
51
|
-
* @returns {Nullable<RTEBlock>} The new block after split
|
|
52
|
-
*/
|
|
53
|
-
private splitImageNodes;
|
|
54
|
-
/**
|
|
55
|
-
* Creates a new RTEImageBlock instance with the provided RTEImageNode instances appended to it.
|
|
56
|
-
*
|
|
57
|
-
* @param {RTEImageNode[]} nodes - An array of RTEImageNode objects that will be used to create a new RTEImageBlock instance.
|
|
58
|
-
* @returns {RTEImageBlock} A new `RTEImageBlock` object with the provided `nodes` appended to it.
|
|
59
|
-
*/
|
|
60
|
-
private cloneWithNodes;
|
|
61
|
-
/**
|
|
62
|
-
* Used to split a block of text at a specific position and insert a new paragraph block.
|
|
63
|
-
*
|
|
64
|
-
* @param {RTEImageNode} splitNode - The node that needs to be split into separate blocks.
|
|
65
|
-
* @param {number} startOffsetOfNode - The index or position within the `splitNode` where the block should be broken or split.
|
|
66
|
-
* @returns {Nullable<RTEBlock>} Returns either a new paragraph block or the new block created after splitting the original block.
|
|
67
|
-
*/
|
|
68
|
-
private breakSingleBlock;
|
|
69
|
-
/**
|
|
70
|
-
* Breaks a single block of text at a specified offset and returns the first node of the new paragraph if created.
|
|
71
|
-
*
|
|
72
|
-
* @param {RTEImageNode} splitNode - It represents a node in a rich text editor that contains an image.
|
|
73
|
-
* @param {number} startOffset - The index at which the line break should occur within the `RTEImageNode` block.
|
|
74
|
-
* @returns {Nullable<RTETextNode>} Returning the first node of the `newParagraph` block if `newParagraph` is not null.
|
|
75
|
-
*/
|
|
76
|
-
private lineBreakSingleBlock;
|
|
77
|
-
/**
|
|
78
|
-
* Checks if the caret position is at the start of a specified RTEImageNode.
|
|
79
|
-
*
|
|
80
|
-
* @param {RTEImageNode} node - `RTEImageNode` - a node representing an image in a rich text editor.
|
|
81
|
-
* @param {number} startOffset - The position within the text node where the caret is located.
|
|
82
|
-
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTEImageNode.
|
|
83
|
-
*/
|
|
84
|
-
private isCaretPositionAtStart;
|
|
85
|
-
/**
|
|
86
|
-
* Checks if the caret position is at the end of a given RTEImageNode.
|
|
87
|
-
*
|
|
88
|
-
* @param {RTEImageNode} node - `node` is a RTEImageNode
|
|
89
|
-
* @param {number} startOffset - The position within the `RTEImageNode` where the caret is located.
|
|
90
|
-
* @returns {boolean}Returns a boolean value indicating whether the caret position is at the end of the `RTEImageNode`.
|
|
91
|
-
*/
|
|
92
|
-
private isCaretPositionAtEnd;
|
|
93
|
-
/**
|
|
94
|
-
* Inserts a new paragraph block with a line break after a selected block of text in a rich text editor.
|
|
95
|
-
*
|
|
96
|
-
* @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.
|
|
97
|
-
* @returns {Nullable<RTETextNode>} Returns a Nullable RTETextNode.
|
|
98
|
-
*/
|
|
99
|
-
private lineBreakMultipleBlocks;
|
|
100
|
-
/**
|
|
101
|
-
* Deletes content from a block node based on specific conditions.
|
|
102
|
-
*
|
|
103
|
-
* @param {DeleteBlockContentAction} action - Delete block content action
|
|
104
|
-
*/
|
|
105
|
-
private deleteNodeContent;
|
|
106
|
-
/**
|
|
107
|
-
* Image will always create new image block
|
|
108
|
-
*
|
|
109
|
-
* @param {InsertImageToBlockAction} action insert image to current block
|
|
110
|
-
*/
|
|
111
|
-
private insertImage;
|
|
37
|
+
createNewImageBlock(): RTEImageBlock;
|
|
112
38
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RTEBlock } from './block.abstract';
|
|
2
2
|
import { VegaRTEListBlock, VegaRTEListBlockType } from '../../interface';
|
|
3
3
|
import { RTEListItemBlock } from './list-item-block';
|
|
4
|
-
import { ModifyContentAction } from '../actions/modify-content-action.abstract';
|
|
5
4
|
import { VegaRTEContent } from '../content-state';
|
|
6
5
|
import { RTETextNode } from '../nodes/text-node';
|
|
7
6
|
/**
|
|
@@ -31,41 +30,4 @@ export declare class RTEListBlock extends RTEBlock {
|
|
|
31
30
|
* @inheritDoc
|
|
32
31
|
*/
|
|
33
32
|
getLastNode(): RTETextNode;
|
|
34
|
-
/**
|
|
35
|
-
* Apply a modify action to block
|
|
36
|
-
*
|
|
37
|
-
* @param {ModifyContentAction} action - Modify action
|
|
38
|
-
*/
|
|
39
|
-
protected doModifyActionApply(action: ModifyContentAction): void;
|
|
40
|
-
/**
|
|
41
|
-
* Converts a RTEListItemBlock to a RTETextBlock representing a paragraph.
|
|
42
|
-
*
|
|
43
|
-
* @param {RTEListItemBlock} block - The block that will be covered
|
|
44
|
-
* @returns {RTETextBlock} Returns a `RTETextBlock`.
|
|
45
|
-
*/
|
|
46
|
-
private toParagraph;
|
|
47
|
-
/**
|
|
48
|
-
* Covert block to List
|
|
49
|
-
*
|
|
50
|
-
* @param {TransformListAction} action - Modify action
|
|
51
|
-
*/
|
|
52
|
-
private convertToList;
|
|
53
|
-
/**
|
|
54
|
-
* Covert block to paragraph
|
|
55
|
-
*
|
|
56
|
-
* @param {TransformListAction} action - Modify action
|
|
57
|
-
*/
|
|
58
|
-
private convertToParagraph;
|
|
59
|
-
/**
|
|
60
|
-
* Inserts an image block into a rich text editor block based on the parent block type.
|
|
61
|
-
*
|
|
62
|
-
* @param {InsertImageToBlockAction} action - Modify action
|
|
63
|
-
*/
|
|
64
|
-
private insertImage;
|
|
65
|
-
/**
|
|
66
|
-
* Removes a specified block and handles the removal of nested lists if necessary.
|
|
67
|
-
*
|
|
68
|
-
* @param {RTEBlock} blockToBeRemoved - block that will be removed
|
|
69
|
-
*/
|
|
70
|
-
private removeListItemBlock;
|
|
71
33
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { VegaRTEListItemBlock } from '../../interface';
|
|
2
2
|
import { RTETextNode } from '../nodes/text-node';
|
|
3
3
|
import { RTEListBlock } from './list-block';
|
|
4
|
-
import { ModifyContentAction } from '../actions/modify-content-action.abstract';
|
|
5
4
|
import { RTETextBlock } from './text-block';
|
|
6
5
|
import { RTEBlock } from './block.abstract';
|
|
7
6
|
/**
|
|
@@ -35,63 +34,9 @@ export declare class RTEListItemBlock extends RTETextBlock {
|
|
|
35
34
|
*/
|
|
36
35
|
getLastNode(): RTETextNode;
|
|
37
36
|
/**
|
|
38
|
-
*
|
|
37
|
+
* Create a new list item block.
|
|
39
38
|
*
|
|
40
|
-
* @
|
|
39
|
+
* @returns {RTEListItemBlock} - A list item block.
|
|
41
40
|
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Remove the list child node
|
|
45
|
-
*
|
|
46
|
-
* @param {RemoveChildAction} action - Modify action
|
|
47
|
-
*/
|
|
48
|
-
private removeListChildNode;
|
|
49
|
-
/**
|
|
50
|
-
* Remove the nest list
|
|
51
|
-
*
|
|
52
|
-
* @param {RemoveNestListAction} action - Modify action
|
|
53
|
-
*/
|
|
54
|
-
private removeNestList;
|
|
55
|
-
/**
|
|
56
|
-
* Iterates through a list of RTEListBlock and sets their parent property to the current object, then replaces the children property with the new list.
|
|
57
|
-
*
|
|
58
|
-
* @param {RTEListBlock[]} newList - new list that you want to replace the existing children of the current object with.
|
|
59
|
-
*/
|
|
60
|
-
private replaceNestList;
|
|
61
|
-
/**
|
|
62
|
-
* Split list item block
|
|
63
|
-
*
|
|
64
|
-
* @param {SplitBlockWithNodeAction} action - Modify action
|
|
65
|
-
*/
|
|
66
|
-
private splitListItemBlock;
|
|
67
|
-
/**
|
|
68
|
-
* Breaks a single list item block at a specific position.
|
|
69
|
-
*
|
|
70
|
-
* @param {RTETextNode} splitNode - The node that needs to be split within a list item block.
|
|
71
|
-
* @param {number} startOffsetOfNode - The index within the `splitNode` where the break operation should occur.
|
|
72
|
-
* @returns {Nullable<RTEBlock>} Returns either a new `RTEListItemBlock` if the caret
|
|
73
|
-
* position is at the end of the `splitNode`, or it returns the result of splitting the block at the
|
|
74
|
-
* caret position if it is neither at the start nor at the end.
|
|
75
|
-
*/
|
|
76
|
-
private breakSingleListItemBlock;
|
|
77
|
-
/**
|
|
78
|
-
* Breaks a list item at the end and handles the insertion of a new list item or paragraph accordingly.
|
|
79
|
-
*
|
|
80
|
-
* @param {RTEListItemBlock} newListItem - Item that represents a new list item to be added to the existing list.
|
|
81
|
-
* @returns {RTEBlock} Returns a `RTEBlock`.
|
|
82
|
-
*/
|
|
83
|
-
private breakListItemAtEnd;
|
|
84
|
-
/**
|
|
85
|
-
* Delete list node content
|
|
86
|
-
*
|
|
87
|
-
* @param {DeleteBlockContentAction} action - Modify action
|
|
88
|
-
*/
|
|
89
|
-
private deleteListNodeContent;
|
|
90
|
-
/**
|
|
91
|
-
* Copy the inline style to new node
|
|
92
|
-
*
|
|
93
|
-
* @param {RTETextNode} needCopedNode - The node that needed to be copied to
|
|
94
|
-
* @returns {RTETextNode} Returns a `RTETextNode`.
|
|
95
|
-
*/
|
|
96
|
-
private copyInlineStyleToNewNode;
|
|
41
|
+
createNewListItem(): RTEListItemBlock;
|
|
97
42
|
}
|
|
@@ -2,12 +2,10 @@ import { VegaRTETextBlock, VegaRTETextBlockType, VegaRTEBlockAnnotations, VegaRT
|
|
|
2
2
|
import { RTETextNode } from '../nodes/text-node';
|
|
3
3
|
import { Nullable } from '../../../../types/general';
|
|
4
4
|
import { BlockAnnotation, BlockAnnotationTypeEnum } from '../annotations/block-annotation.abstract';
|
|
5
|
-
import { ModifyContentAction } from '../actions/modify-content-action.abstract';
|
|
6
5
|
import { VegaRTEContent } from '../content-state';
|
|
7
6
|
import { RTEBlock } from './block.abstract';
|
|
8
7
|
import { AnnotationAction } from '../actions/annotation-action.abstract';
|
|
9
8
|
import { RTEListBlock } from './list-block';
|
|
10
|
-
import { DeleteBlockContentAction } from '../actions/delete-block-content-action';
|
|
11
9
|
/**
|
|
12
10
|
* Text block
|
|
13
11
|
*/
|
|
@@ -69,99 +67,13 @@ export declare class RTETextBlock extends RTEBlock {
|
|
|
69
67
|
*/
|
|
70
68
|
getLastNode(): RTETextNode;
|
|
71
69
|
/**
|
|
72
|
-
*
|
|
73
|
-
*/
|
|
74
|
-
protected doAnnotationActionApply(action: AnnotationAction): void;
|
|
75
|
-
/**
|
|
76
|
-
* Apply a modify action to block
|
|
77
|
-
*
|
|
78
|
-
* @param {ModifyContentAction} action - Modify action
|
|
79
|
-
*/
|
|
80
|
-
protected doModifyActionApply(action: ModifyContentAction): void;
|
|
81
|
-
/**
|
|
82
|
-
* Splits a text node at a specified offset within a block of nodes and returns a new block with the split nodes.
|
|
83
|
-
*
|
|
84
|
-
* @param {RTETextNode} splitNode - The text node that will be split
|
|
85
|
-
* @param {number} startOffsetOfNode - The index at which will split the text content of the `splitNode`.
|
|
86
|
-
* @returns {Nullable<RTEBlock>} return either an RTEBlock object or null.
|
|
87
|
-
*/
|
|
88
|
-
protected splitTextNodeBlock(splitNode: RTETextNode, startOffsetOfNode: number): Nullable<RTEBlock>;
|
|
89
|
-
/**
|
|
90
|
-
* Checks if the caret position is at the start of a specified RTETextNode.
|
|
91
|
-
*
|
|
92
|
-
* @param {RTETextNode} node - `RTETextNode` - a node representing an image in a rich text editor.
|
|
93
|
-
* @param {number} startOffset - The position within the text node where the caret is located.
|
|
94
|
-
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
95
|
-
*/
|
|
96
|
-
protected isCaretPositionAtStart(node: RTETextNode, startOffset: number): boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Checks if the caret position is at the end of a specified RTETextNode.
|
|
99
|
-
*
|
|
100
|
-
* @param {RTETextNode} node - `RTETextNode` - a node representing an image in a rich text editor.
|
|
101
|
-
* @param {number} startOffset - The position within the text node where the caret is located.
|
|
102
|
-
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
103
|
-
*/
|
|
104
|
-
protected isCaretPositionAtEnd(node: RTETextNode, startOffset: number): boolean;
|
|
105
|
-
/**
|
|
106
|
-
* lineBreakSingleBlock
|
|
107
|
-
*
|
|
108
|
-
* @param {RTETextNode} splitNode -
|
|
109
|
-
* @param {number} startOffsetOfNode -
|
|
110
|
-
* @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
|
|
111
|
-
*/
|
|
112
|
-
protected lineBreakSingleBlock(splitNode: RTETextNode, startOffsetOfNode: number): Nullable<RTETextNode>;
|
|
113
|
-
/**
|
|
114
|
-
* lineBreakMultipleBlocks
|
|
115
|
-
*
|
|
116
|
-
* @param {RTEBlock[]} selectedBlocks -
|
|
117
|
-
* @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
|
|
118
|
-
*/
|
|
119
|
-
protected lineBreakMultipleBlocks(selectedBlocks: RTEBlock[]): Nullable<RTETextNode>;
|
|
120
|
-
/**
|
|
121
|
-
* deleteNodeContent
|
|
122
|
-
*
|
|
123
|
-
* @param {DeleteBlockContentAction} action - ModifyContentAction
|
|
124
|
-
*/
|
|
125
|
-
protected deleteNodeContent(action: DeleteBlockContentAction): void;
|
|
126
|
-
/**
|
|
127
|
-
* Remove the child node
|
|
128
|
-
*
|
|
129
|
-
* @param {RemoveChildAction} action - Modify action
|
|
130
|
-
*/
|
|
131
|
-
private removeChildNode;
|
|
132
|
-
/**
|
|
133
|
-
* mergeLineBreakNodes
|
|
134
|
-
*
|
|
135
|
-
* @param {RTENode[]} beforeNodes -
|
|
136
|
-
* @param {RTETextNode} lineBreakNode -
|
|
137
|
-
* @param {RTENode[]} afterNodes -
|
|
138
|
-
*/
|
|
139
|
-
private mergeLineBreakNodes;
|
|
140
|
-
/**
|
|
141
|
-
* breakSingleTextBlock
|
|
142
|
-
*
|
|
143
|
-
* @param {RTETextNode} splitNode -
|
|
144
|
-
* @param {number} startOffsetOfNode -
|
|
145
|
-
* @returns {Nullable<RTEBlock>} Nullable<RTEBlock>
|
|
146
|
-
*/
|
|
147
|
-
private breakSingleTextBlock;
|
|
148
|
-
/**
|
|
149
|
-
* convertParagraphToList
|
|
150
|
-
*
|
|
151
|
-
* @param {TransformListAction} action - ModifyContentAction
|
|
152
|
-
*/
|
|
153
|
-
private convertParagraphToList;
|
|
154
|
-
/**
|
|
155
|
-
* insertImage
|
|
70
|
+
* Create new empty paragraph.
|
|
156
71
|
*
|
|
157
|
-
* @
|
|
72
|
+
* @returns {RTETextBlock} Paragraph.
|
|
158
73
|
*/
|
|
159
|
-
|
|
74
|
+
createNewParagraph(): RTETextBlock;
|
|
160
75
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* @param {RTETextNode} needCopedNode -
|
|
164
|
-
* @returns {RTETextBlock} RTETextBlock
|
|
76
|
+
* @inheritDoc
|
|
165
77
|
*/
|
|
166
|
-
|
|
78
|
+
protected doAnnotationActionApply(action: AnnotationAction): void;
|
|
167
79
|
}
|
|
@@ -2,12 +2,11 @@ import { RTEContentBlock, VegaRTEContentBlock, ListType } from '../interface';
|
|
|
2
2
|
import { RTEListBlock } from './blocks/list-block';
|
|
3
3
|
import { RTETextBlock } from './blocks/text-block';
|
|
4
4
|
import { ModifyContentAction } from './actions/modify-content-action.abstract';
|
|
5
|
-
import { BlockBaseOperator } from './helper/block-base-operator';
|
|
6
5
|
import { RTEListItemBlock } from './blocks/list-item-block';
|
|
7
6
|
/**
|
|
8
7
|
* Class representing the content state of the rich text editor.
|
|
9
8
|
*/
|
|
10
|
-
export declare class VegaRTEContent
|
|
9
|
+
export declare class VegaRTEContent {
|
|
11
10
|
blocks: RTEContentBlock[];
|
|
12
11
|
constructor(blocks: RTEContentBlock[]);
|
|
13
12
|
/**
|
|
@@ -56,14 +56,6 @@ export declare class RTETextNode extends RTENode {
|
|
|
56
56
|
* @inheritDoc
|
|
57
57
|
*/
|
|
58
58
|
protected doModifyActionApply(action: ModifyContentAction): void;
|
|
59
|
-
/**
|
|
60
|
-
* Split text node with range
|
|
61
|
-
*
|
|
62
|
-
* @param {TextSplittableAction} action - Annotation action
|
|
63
|
-
* @param {Range} range - Selection range
|
|
64
|
-
* @returns {RTETextNode[] | this} RTETextNode array
|
|
65
|
-
*/
|
|
66
|
-
private splitTextNode;
|
|
67
59
|
/**
|
|
68
60
|
* Apply action to node
|
|
69
61
|
*
|
|
@@ -71,45 +63,10 @@ export declare class RTETextNode extends RTENode {
|
|
|
71
63
|
* @param {AnnotationAction} action - AnnotationAction
|
|
72
64
|
*/
|
|
73
65
|
private applyActionToNode;
|
|
74
|
-
/**
|
|
75
|
-
* Replaces the selected text within a given range with a new text in a TypeScript class.
|
|
76
|
-
*
|
|
77
|
-
* @param {string} text - The new text that will replace the currently selected text within the specified range.
|
|
78
|
-
* @param {RTERange} currentRange - A range of text within a Rich Text Editor (RTE).
|
|
79
|
-
*/
|
|
80
|
-
private replaceSelectedText;
|
|
81
|
-
/**
|
|
82
|
-
* Updates the text content of a node and unlink the node if it is a link node and the text is deleted.
|
|
83
|
-
*
|
|
84
|
-
* @param {string} newText - The new text string
|
|
85
|
-
*/
|
|
86
|
-
private updateText;
|
|
87
|
-
/**
|
|
88
|
-
* Checks if a node has an annotation with the key 'LINK'.
|
|
89
|
-
*
|
|
90
|
-
* @returns {boolean} A boolean value indicating whether the `annotationMap` has a key 'LINK'.
|
|
91
|
-
*/
|
|
92
|
-
private isLinkNode;
|
|
93
|
-
/**
|
|
94
|
-
* Whether a given range should be split based on various conditions within the range.
|
|
95
|
-
*
|
|
96
|
-
* @param {Range} range - Selection range
|
|
97
|
-
* @returns {boolean} Returns a boolean value indicating whether the
|
|
98
|
-
* selection range should be split.
|
|
99
|
-
*/
|
|
100
|
-
private shouldSplitSelection;
|
|
101
66
|
/**
|
|
102
67
|
* Sync up the selected node by change manager
|
|
103
68
|
*
|
|
104
69
|
* @param {RTETextNode} selectedNode - The selected node
|
|
105
70
|
*/
|
|
106
71
|
private syncUpSelectedNodes;
|
|
107
|
-
/**
|
|
108
|
-
* Insert the new node at the start offset
|
|
109
|
-
*
|
|
110
|
-
* @param {number} startOffset - The start position offset
|
|
111
|
-
* @param {AnnotationAction} action - AnnotationAction
|
|
112
|
-
* @returns {RTETextNode[]} - RTETextNode array
|
|
113
|
-
*/
|
|
114
|
-
private insertNewNode;
|
|
115
72
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2628,6 +2628,13 @@ export namespace Components {
|
|
|
2628
2628
|
* @vegaVersion 1.22.0
|
|
2629
2629
|
*/
|
|
2630
2630
|
"hide": () => Promise<void>;
|
|
2631
|
+
/**
|
|
2632
|
+
* Determines whether the popover's position is calculated relative to the screen.
|
|
2633
|
+
* @VegaWarning When enabled (set to true), it overrides the positionRelativeTo property, making it ineffective.
|
|
2634
|
+
* @VegaWarning Currently, when set to true, the position calculation may be inaccurate if the popover is placed inside a scrollable container within a shadowRoot (e.g., inside a vega-modal with scrollable content).
|
|
2635
|
+
* @vegaVersion 2.39.0
|
|
2636
|
+
*/
|
|
2637
|
+
"isScreenPosition": boolean;
|
|
2631
2638
|
/**
|
|
2632
2639
|
* Specifies the placement or position of the popover in relation to its parent element. If there is insufficient space to display the popover in the default position, it will automatically adjust its placement based on the following order: `top`, `left`, `bottom`, `right`.
|
|
2633
2640
|
* @vegaVersion 1.19.0
|
|
@@ -8078,6 +8085,13 @@ declare namespace LocalJSX {
|
|
|
8078
8085
|
* @vegaVersion 1.19.0
|
|
8079
8086
|
*/
|
|
8080
8087
|
"alignment"?: PositionAlignmentType;
|
|
8088
|
+
/**
|
|
8089
|
+
* Determines whether the popover's position is calculated relative to the screen.
|
|
8090
|
+
* @VegaWarning When enabled (set to true), it overrides the positionRelativeTo property, making it ineffective.
|
|
8091
|
+
* @VegaWarning Currently, when set to true, the position calculation may be inaccurate if the popover is placed inside a scrollable container within a shadowRoot (e.g., inside a vega-modal with scrollable content).
|
|
8092
|
+
* @vegaVersion 2.39.0
|
|
8093
|
+
*/
|
|
8094
|
+
"isScreenPosition"?: boolean;
|
|
8081
8095
|
/**
|
|
8082
8096
|
* An event emitter notifying the popover hide event.
|
|
8083
8097
|
* @eventSemantics namespace:native
|
|
@@ -8,7 +8,8 @@ import { EvaluateResultTranslation } from './validation-rule';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class ValidPhoneNumberRule implements FormFieldValidationRule<string> {
|
|
10
10
|
private readonly countryCodeGetter;
|
|
11
|
-
|
|
11
|
+
private emptyValueEnabled;
|
|
12
|
+
constructor(countryCodeGetter: () => VegaCountryCode, emptyValueEnabled?: boolean);
|
|
12
13
|
/**
|
|
13
14
|
* It checks if the phone number is valid.
|
|
14
15
|
*
|
|
@@ -40,6 +41,7 @@ export declare class ValidPhoneNumberRule implements FormFieldValidationRule<str
|
|
|
40
41
|
* specific country calling code.
|
|
41
42
|
* @returns {boolean} a boolean value based on whether the input is a string and not equal to the country calling
|
|
42
43
|
* code with a plus sign appended to it.
|
|
44
|
+
* The input is empty mean the component property `emptyValueEnabled` is true, we should not validate the input.
|
|
43
45
|
*/
|
|
44
46
|
private isAcceptedInputType;
|
|
45
47
|
/**
|