@globalpayments/vega 2.37.2 → 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,55 @@
|
|
|
1
|
+
import { ActionHandleStrategyRegistry } from '../../../dto/action-handle-strategies/action-handle-strategy-registry';
|
|
2
|
+
import { BlockAppendNodesStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy';
|
|
3
|
+
import { BlockDeleteTextContentStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy';
|
|
4
|
+
import { BlockInsertImageIntoTextStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy';
|
|
5
|
+
import { BlockInsertLineBreakStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy';
|
|
6
|
+
import { BlockInsertLineBreakWithBlocksStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy';
|
|
7
|
+
import { BlockInsertNewParagraphStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy';
|
|
8
|
+
import { BlockInsertNodesBeforeNodeStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy';
|
|
9
|
+
import { BlockMergeNodesStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy';
|
|
10
|
+
import { BlockRemoveNodeStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy';
|
|
11
|
+
import { BlockReplaceNodesStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy';
|
|
12
|
+
import { BlockSplitWithTextNodeStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy';
|
|
13
|
+
import { BlockTransformToListStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy';
|
|
14
|
+
import { ModifyContentActionType } from '../../../dto/actions/modify-content-action.abstract';
|
|
15
|
+
import { RTETextBlock } from '../../../dto/blocks/text-block';
|
|
16
|
+
import { BlockUpdateLinkGroupStrategy } from '../../../dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy';
|
|
17
|
+
import { BlockUpdateTextStyleStrategy } from '../../../dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy';
|
|
18
|
+
import { LinkGroupAnnotationAction } from '../../../dto/actions/link-group-annotation-action';
|
|
19
|
+
import { TextStyleAnnotationAction } from '../../../dto/actions/text-style-annotation-action';
|
|
20
|
+
import { InternalAnnotationTypeEnum } from '../../../dto/annotations/annotation.abstract';
|
|
21
|
+
test('RTETextBlock annotation strategy should register properly', () => {
|
|
22
|
+
expect(ActionHandleStrategyRegistry.get(TextStyleAnnotationAction.name, RTETextBlock.name) instanceof
|
|
23
|
+
BlockUpdateTextStyleStrategy).toBeTruthy();
|
|
24
|
+
expect(ActionHandleStrategyRegistry.get(LinkGroupAnnotationAction.name, RTETextBlock.name) instanceof
|
|
25
|
+
BlockUpdateLinkGroupStrategy).toBeTruthy();
|
|
26
|
+
});
|
|
27
|
+
test('RTETextBlock apply annotation action should work properly', () => {
|
|
28
|
+
const textBlock = RTETextBlock.from({
|
|
29
|
+
id: '1',
|
|
30
|
+
type: 'subtitle',
|
|
31
|
+
nodes: [{ id: '1-1', type: 'text', text: 'Paragraph' }],
|
|
32
|
+
});
|
|
33
|
+
expect(textBlock.nodes[0].annotationMap.has('BOLD')).toBeFalsy();
|
|
34
|
+
textBlock.apply(new TextStyleAnnotationAction('paragraph', true));
|
|
35
|
+
expect(textBlock.type).toEqual('paragraph');
|
|
36
|
+
expect(textBlock.nodes[0].getAnnotationByType('BOLD')['toJSON']()['bold']).toBeTruthy();
|
|
37
|
+
expect(textBlock.annotationMap.has(InternalAnnotationTypeEnum.LINK_GROUP)).toBeFalsy();
|
|
38
|
+
textBlock.apply(new LinkGroupAnnotationAction('1', textBlock.nodes));
|
|
39
|
+
expect(textBlock.annotationMap.has(InternalAnnotationTypeEnum.LINK_GROUP)).toBeTruthy();
|
|
40
|
+
});
|
|
41
|
+
test('RTETextBlock should register action handle strategy properly', () => {
|
|
42
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.DELETE_CHILD, RTETextBlock.name) instanceof
|
|
43
|
+
BlockRemoveNodeStrategy).toBeTruthy();
|
|
44
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.APPEND_CHILD_NODES, RTETextBlock.name) instanceof BlockAppendNodesStrategy).toBeTruthy();
|
|
45
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTETextBlock.name) instanceof BlockSplitWithTextNodeStrategy).toBeTruthy();
|
|
46
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.REPLACE_CHILD_NODES, RTETextBlock.name) instanceof BlockReplaceNodesStrategy).toBeTruthy();
|
|
47
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTETextBlock.name) instanceof BlockMergeNodesStrategy).toBeTruthy();
|
|
48
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.BREAK_SINGLE_BLOCK, RTETextBlock.name) instanceof BlockInsertNewParagraphStrategy).toBeTruthy();
|
|
49
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTETextBlock.name) instanceof BlockInsertLineBreakStrategy).toBeTruthy();
|
|
50
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTETextBlock.name) instanceof BlockInsertLineBreakWithBlocksStrategy).toBeTruthy();
|
|
51
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.DELETE_BLOCK_CONTENT, RTETextBlock.name) instanceof BlockDeleteTextContentStrategy).toBeTruthy();
|
|
52
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTETextBlock.name) instanceof BlockInsertImageIntoTextStrategy).toBeTruthy();
|
|
53
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.INSERT_NODES_BEFORE, RTETextBlock.name) instanceof BlockInsertNodesBeforeNodeStrategy).toBeTruthy();
|
|
54
|
+
expect(ActionHandleStrategyRegistry.get(ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTETextBlock.name) instanceof BlockTransformToListStrategy).toBeTruthy();
|
|
55
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NodeReplaceSelectedTextStrategy } from '../../../dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy';
|
|
2
|
+
import { ReplaceSelectedTextAction } from '../../../dto/actions/replace-selected-text-action';
|
|
3
|
+
import { RTETextNode } from '../../../dto/nodes/text-node';
|
|
4
|
+
import { RTERange } from '../../../dto/range';
|
|
5
|
+
import stateEntityRenderingRegistry from '../../../slimmers/controllers/state-entity-rendering-registry';
|
|
6
|
+
test('UpdateSelectedNodeStrategy should update text properly', () => {
|
|
7
|
+
const span = document.createElement('span');
|
|
8
|
+
span.innerText = 'paragraph';
|
|
9
|
+
const textNode = new RTETextNode('1', span.innerText, null);
|
|
10
|
+
stateEntityRenderingRegistry.register(span, textNode);
|
|
11
|
+
const strategy = new NodeReplaceSelectedTextStrategy();
|
|
12
|
+
strategy.execute(new ReplaceSelectedTextAction('new text', new RTERange(span.firstChild, span.firstChild, 0, 9)), textNode);
|
|
13
|
+
expect(textNode.text).toEqual('new text');
|
|
14
|
+
});
|
|
15
|
+
test('UpdateSelectedNodeStrategy should update text properly if the range is collapsed', () => {
|
|
16
|
+
const span = document.createElement('span');
|
|
17
|
+
span.innerText = 'paragraph';
|
|
18
|
+
const textNode = new RTETextNode('1', span.innerText, null);
|
|
19
|
+
stateEntityRenderingRegistry.register(span, textNode);
|
|
20
|
+
const strategy = new NodeReplaceSelectedTextStrategy();
|
|
21
|
+
strategy.execute(new ReplaceSelectedTextAction('This is a ', new RTERange(span.firstChild, span.firstChild, 0, 0)), textNode);
|
|
22
|
+
expect(textNode.text).toEqual('This is a paragraph');
|
|
23
|
+
});
|
|
@@ -156,7 +156,6 @@ export class VegaRichTextEditor {
|
|
|
156
156
|
* @vegaVersion 2.34.0
|
|
157
157
|
*/
|
|
158
158
|
this.toolbarItems = [
|
|
159
|
-
['clearStyle'],
|
|
160
159
|
['textStyles'],
|
|
161
160
|
['bold', 'italic', 'underline', 'strikethrough', 'code'],
|
|
162
161
|
['textColor'],
|
|
@@ -164,6 +163,7 @@ export class VegaRichTextEditor {
|
|
|
164
163
|
['moreIndent', 'lessIndent'],
|
|
165
164
|
['link'],
|
|
166
165
|
['image'],
|
|
166
|
+
['clearStyle'],
|
|
167
167
|
];
|
|
168
168
|
/**
|
|
169
169
|
* Specifies the validation status of the rich text editor component.
|
|
@@ -391,7 +391,7 @@ export class VegaRichTextEditor {
|
|
|
391
391
|
}],
|
|
392
392
|
"text": "Specifies the built-in toolbar items available in the rich-text editor."
|
|
393
393
|
},
|
|
394
|
-
"defaultValue": "[\n\t\t['
|
|
394
|
+
"defaultValue": "[\n\t\t['textStyles'],\n\t\t['bold', 'italic', 'underline', 'strikethrough', 'code'],\n\t\t['textColor'],\n\t\t['horizontalAlignment', 'bulletsNumbers'],\n\t\t['moreIndent', 'lessIndent'],\n\t\t['link'],\n\t\t['image'],\n\t\t['clearStyle'],\n\t]"
|
|
395
395
|
},
|
|
396
396
|
"isValid": {
|
|
397
397
|
"type": "boolean",
|
|
@@ -5,8 +5,9 @@ import { getCountryCallingCode, parsePhoneNumber } from 'libphonenumber-js';
|
|
|
5
5
|
* @implements {FormFieldValidationRule<string>}
|
|
6
6
|
*/
|
|
7
7
|
export class ValidPhoneNumberRule {
|
|
8
|
-
constructor(countryCodeGetter) {
|
|
8
|
+
constructor(countryCodeGetter, emptyValueEnabled = false) {
|
|
9
9
|
this.countryCodeGetter = countryCodeGetter;
|
|
10
|
+
this.emptyValueEnabled = emptyValueEnabled;
|
|
10
11
|
/**
|
|
11
12
|
* Generate an invalid result
|
|
12
13
|
*
|
|
@@ -66,9 +67,13 @@ export class ValidPhoneNumberRule {
|
|
|
66
67
|
* specific country calling code.
|
|
67
68
|
* @returns {boolean} a boolean value based on whether the input is a string and not equal to the country calling
|
|
68
69
|
* code with a plus sign appended to it.
|
|
70
|
+
* The input is empty mean the component property `emptyValueEnabled` is true, we should not validate the input.
|
|
69
71
|
*/
|
|
70
72
|
isAcceptedInputType(input) {
|
|
71
|
-
|
|
73
|
+
const shouldSkipEmptyValueCheck = this.emptyValueEnabled && input === '';
|
|
74
|
+
return (typeof input === 'string' &&
|
|
75
|
+
input !== `+${getCountryCallingCode(this.countryCodeGetter())}` &&
|
|
76
|
+
!shouldSkipEmptyValueCheck);
|
|
72
77
|
}
|
|
73
78
|
/**
|
|
74
79
|
* The function `isValidPhoneNumberForCountry` validates a phone number for a specific country code.
|
|
@@ -74,4 +74,12 @@ describe('ValidPhoneNumberRule', () => {
|
|
|
74
74
|
visible: true,
|
|
75
75
|
})).toEqual(false);
|
|
76
76
|
});
|
|
77
|
+
test('should return false when the input is empty', () => {
|
|
78
|
+
const rule = new ValidPhoneNumberRule(() => 'US', true);
|
|
79
|
+
expect(rule.canEvaluate('')).toBeFalsy();
|
|
80
|
+
});
|
|
81
|
+
test('should return true when the input is not empty', () => {
|
|
82
|
+
const rule = new ValidPhoneNumberRule(() => 'US', true);
|
|
83
|
+
expect(rule.canEvaluate('1')).toBeTruthy();
|
|
84
|
+
});
|
|
77
85
|
});
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { F as FeatureFlag } from './feature-flag-controller-4b3fe6f8.js';
|
|
2
2
|
import { V as VegaLoader, a as VegaNotify, b as VegaEventManager, c as VegaZIndexManager, d as VegaSkeletonLoader } from './vega-skeleton-loader-controller-5aea7aeb.js';
|
|
3
|
-
import { V as VegaThemeManager } from './
|
|
3
|
+
import { V as VegaThemeManager, a as VegaRTEContent } from './content-state-2edba4ec.js';
|
|
4
4
|
import { M as MapToComponentMethod, V as VegaSlimmer, s as setVegaLogLevel, G as GlobalSlimmersRegistry } from './global-slimmer-registry-17c4efd4.js';
|
|
5
5
|
import { V as VegaDialog } from './vega-dialog-controller-34eb8967.js';
|
|
6
6
|
import { v as vegaEnvManager } from './vega-env-manager-8f8dc473.js';
|
|
7
7
|
import { V as VegaIconManager } from './icon-manager-b889176b.js';
|
|
8
|
-
import { w as waitForVega } from './index-
|
|
8
|
+
import { w as waitForVega } from './index-d172bafa.js';
|
|
9
9
|
import './ui-62e4be97.js';
|
|
10
10
|
import { V as VegaInternalTranslation, a as VegaTranslation, s as staticTranslations } from './translation-c08f2274.js';
|
|
11
11
|
import { T as TypographyUrls } from './typography-396de03f.js';
|
|
12
12
|
import { V as ValidCreditCardNumberRule } from './valid-credit-card-number-rule-2aef3ad5.js';
|
|
13
|
-
import { V as VegaRTEContent } from './content-state-ccf5f960.js';
|
|
14
13
|
import { U as UPDATE_TRANSLATION } from './static-subject-title-8268945e.js';
|
|
15
14
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
16
15
|
import { O as Observer } from './observer-3959f9dd.js';
|