@globalpayments/vega 2.55.1 → 2.56.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-f1ff47e3.js → app-globals-7e482341.js} +2 -2
- package/dist/cjs/{code-block-2d014e17.js → code-block-e56c5216.js} +99 -110
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-6bfb9145.js → component-value-history-controller-slimmer.abstract-9a1285a1.js} +5 -5
- package/dist/cjs/{content-state-6a5da7ec.js → content-state-e07c843c.js} +90 -84
- package/dist/cjs/{design-token-d15e60fa.js → design-token-3e0bd48d.js} +1 -1
- package/dist/cjs/{element-appender-slimmer-2f16891f.js → element-appender-slimmer-2b9ca234.js} +1 -1
- package/dist/cjs/{image-annotation-action-617bbb13.js → image-annotation-action-76e3c89d.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{public-rules-a3b7e267.js → public-rules-1ac67099.js} +3 -3
- package/dist/cjs/{responsive-format-facade-4a19e115.js → responsive-format-facade-e2e11c24.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-e9c7c379.js → rich-text-editor-required-rule-63f50aa4.js} +3 -3
- package/dist/cjs/{style-formatter-b8cea5ee.js → style-formatter-0213d3a8.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +4 -4
- package/dist/cjs/vega-app-header-button.cjs.entry.js +4 -4
- package/dist/cjs/vega-box.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-circle.cjs.entry.js +4 -4
- package/dist/cjs/vega-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-calendar_3.cjs.entry.js +49 -10
- package/dist/cjs/vega-card.cjs.entry.js +4 -4
- package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
- package/dist/cjs/vega-chip.cjs.entry.js +4 -4
- package/dist/cjs/vega-code-block.cjs.entry.js +2 -2
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-dialog_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-divider.cjs.entry.js +4 -4
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -6
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-flag-icon.cjs.entry.js +4 -4
- package/dist/cjs/vega-flex.cjs.entry.js +5 -5
- package/dist/cjs/vega-font.cjs.entry.js +4 -4
- package/dist/cjs/vega-grid.cjs.entry.js +4 -4
- package/dist/cjs/vega-icon.cjs.entry.js +4 -4
- package/dist/cjs/vega-image-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +2 -2
- package/dist/cjs/vega-input-select.cjs.entry.js +3 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +4 -4
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination.cjs.entry.js +3 -3
- package/dist/cjs/vega-popover_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -13
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +68 -68
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
- package/dist/cjs/vega-signature-capture.cjs.entry.js +4 -4
- package/dist/cjs/vega-table_8.cjs.entry.js +3 -3
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +4 -4
- package/dist/cjs/vega.cjs.js +4 -4
- package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +1 -1
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +24 -7
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +11 -2
- package/dist/collection/components/vega-calendar/vega-calendar.css +6 -0
- package/dist/collection/components/vega-calendar/vega-calendar.js +43 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +1 -1
- package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
- package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +28 -47
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.js +7 -7
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-code-block-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/code-block-remove-self-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +9 -9
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/switch-out-from-code-block-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +8 -0
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +5 -5
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +7 -7
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +6 -6
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +18 -12
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +9 -9
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +14 -14
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/code-block-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/code-block-node-renderer.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/delete-selected-nodes-controller.js +20 -20
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/focus-controller.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.js +8 -8
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +8 -8
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +5 -5
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +6 -6
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/insert-composition-text-controller.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/insert-image-controller.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/internal-code-block-selection-controller.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +56 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/code-block.test.js +5 -5
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/image-block.test.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +7 -7
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-item.test.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +18 -18
- package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +9 -9
- package/dist/collection/helpers/validator/rules/rich-text-editor-required-rule.js +2 -2
- package/dist/esm/{app-globals-4881974a.js → app-globals-b5881948.js} +2 -2
- package/dist/esm/{code-block-ef2f04ca.js → code-block-1cdb0599.js} +99 -110
- package/dist/esm/{component-value-history-controller-slimmer.abstract-0a0ef33f.js → component-value-history-controller-slimmer.abstract-c12b2958.js} +5 -5
- package/dist/esm/{content-state-69d29a07.js → content-state-cf27d19b.js} +90 -84
- package/dist/esm/{design-token-9bbefd23.js → design-token-96e03257.js} +1 -1
- package/dist/esm/{element-appender-slimmer-8652e8d7.js → element-appender-slimmer-00dcccb9.js} +1 -1
- package/dist/esm/{image-annotation-action-1497f70e.js → image-annotation-action-e76b3396.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{public-rules-3436034b.js → public-rules-e8616346.js} +3 -3
- package/dist/esm/{responsive-format-facade-bcc2fd21.js → responsive-format-facade-464498b6.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-cc5b6a2d.js → rich-text-editor-required-rule-69844536.js} +3 -3
- package/dist/esm/{style-formatter-00d6c32f.js → style-formatter-670e20f7.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +4 -4
- package/dist/esm/vega-app-header-button.entry.js +4 -4
- package/dist/esm/vega-box.entry.js +5 -5
- package/dist/esm/vega-button-circle.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +3 -3
- package/dist/esm/vega-calendar_3.entry.js +49 -10
- package/dist/esm/vega-card.entry.js +4 -4
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-chip.entry.js +4 -4
- package/dist/esm/vega-code-block.entry.js +2 -2
- package/dist/esm/vega-date-picker_2.entry.js +4 -4
- package/dist/esm/vega-dialog_2.entry.js +4 -4
- package/dist/esm/vega-divider.entry.js +4 -4
- package/dist/esm/vega-dropdown_5.entry.js +7 -6
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-flag-icon.entry.js +4 -4
- package/dist/esm/vega-flex.entry.js +5 -5
- package/dist/esm/vega-font.entry.js +4 -4
- package/dist/esm/vega-grid.entry.js +4 -4
- package/dist/esm/vega-icon.entry.js +4 -4
- package/dist/esm/vega-image-uploader.entry.js +3 -3
- package/dist/esm/vega-input-phone-number.entry.js +2 -2
- package/dist/esm/vega-input-select.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +4 -4
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-pagination.entry.js +3 -3
- package/dist/esm/vega-popover_2.entry.js +4 -4
- package/dist/esm/vega-rich-text-content.entry.js +13 -13
- package/dist/esm/vega-rich-text-editor_4.entry.js +68 -68
- package/dist/esm/vega-selection-chip_2.entry.js +3 -3
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +4 -4
- package/dist/esm/vega-table_8.entry.js +3 -3
- package/dist/esm/vega-time-picker_2.entry.js +4 -4
- package/dist/esm/vega-tooltip_2.entry.js +4 -4
- package/dist/esm/vega.js +4 -4
- package/dist/types/components/vega-app-header-button/types.d.ts +2 -0
- package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.d.ts +1 -0
- package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +1 -0
- package/dist/types/components/vega-calendar/types.d.ts +2 -0
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +14 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +13 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +8 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +3 -3
- package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +2 -2
- package/dist/types/components.d.ts +15 -1
- package/dist/types/types/components.type.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-0e8324f2.entry.js → p-03c759ae.entry.js} +1 -1
- package/dist/vega/p-04c8b83d.entry.js +1 -0
- package/dist/vega/{p-c212a1e3.entry.js → p-08a0cbd0.entry.js} +1 -1
- package/dist/vega/{p-72e14f49.entry.js → p-0c660956.entry.js} +1 -1
- package/dist/vega/{p-1b165fbb.entry.js → p-144d2390.entry.js} +1 -1
- package/dist/vega/{p-c48a8510.entry.js → p-1737536e.entry.js} +1 -1
- package/dist/vega/{p-ad858290.entry.js → p-1a7d0e21.entry.js} +1 -1
- package/dist/vega/{p-9dc9fcf3.js → p-1c3e1134.js} +1 -1
- package/dist/vega/{p-ecd9a973.entry.js → p-1ebc1acf.entry.js} +1 -1
- package/dist/vega/{p-1d41f551.entry.js → p-2a6517f9.entry.js} +1 -1
- package/dist/vega/p-2f6c4f2c.entry.js +1 -0
- package/dist/vega/{p-f17c9093.entry.js → p-302e01e9.entry.js} +1 -1
- package/dist/vega/{p-f7062473.entry.js → p-3162a3f0.entry.js} +1 -1
- package/dist/vega/{p-6681efd5.js → p-397c7199.js} +1 -1
- package/dist/vega/{p-8270bb8f.entry.js → p-487c0f17.entry.js} +1 -1
- package/dist/vega/{p-ca91268b.entry.js → p-4a12fb0d.entry.js} +1 -1
- package/dist/vega/{p-f9cf7e36.js → p-4b2a90b8.js} +1 -1
- package/dist/vega/{p-84a31a31.entry.js → p-4c595d8d.entry.js} +1 -1
- package/dist/vega/{p-43ba9a8a.entry.js → p-576b812b.entry.js} +1 -1
- package/dist/vega/{p-56dc1345.entry.js → p-59f1fd3e.entry.js} +1 -1
- package/dist/vega/{p-5a6b8846.entry.js → p-5be150cb.entry.js} +1 -1
- package/dist/vega/{p-a63e2fee.entry.js → p-5cb92c51.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-201a78a2.entry.js → p-5f86a286.entry.js} +1 -1
- package/dist/vega/{p-4f5079bc.entry.js → p-636142ae.entry.js} +1 -1
- package/dist/vega/{p-327be043.js → p-66516ee9.js} +1 -1
- package/dist/vega/p-68864531.js +1 -0
- package/dist/vega/p-6a7b7214.js +1 -0
- package/dist/vega/p-6b8d105e.entry.js +1 -0
- package/dist/vega/{p-c7e2a155.entry.js → p-7728041e.entry.js} +1 -1
- package/dist/vega/p-778fd499.js +1 -0
- package/dist/vega/{p-13ca73c7.entry.js → p-7cc20ed5.entry.js} +1 -1
- package/dist/vega/{p-cce253c2.entry.js → p-81e56716.entry.js} +1 -1
- package/dist/vega/p-962b40d1.entry.js +1 -0
- package/dist/vega/{p-c10b4f47.entry.js → p-9d286c08.entry.js} +1 -1
- package/dist/vega/{p-cae183fd.entry.js → p-a42bc438.entry.js} +1 -1
- package/dist/vega/{p-b89a9760.js → p-ae74d511.js} +1 -1
- package/dist/vega/{p-da95668c.entry.js → p-b3da0b44.entry.js} +1 -1
- package/dist/vega/{p-1e4b6f0a.entry.js → p-c0043eed.entry.js} +1 -1
- package/dist/vega/p-c685adcd.js +1 -0
- package/dist/vega/{p-9c0cda62.js → p-d8e1ed2d.js} +1 -1
- package/dist/vega/{p-9a0d3d2d.entry.js → p-dc383362.entry.js} +1 -1
- package/dist/vega/{p-822cd8e5.js → p-dc3d93d6.js} +1 -1
- package/dist/vega/{p-79370ad4.entry.js → p-e2282f71.entry.js} +1 -1
- package/dist/vega/{p-c8a87f06.entry.js → p-e5eda663.entry.js} +1 -1
- package/dist/vega/{p-7704a608.entry.js → p-ec7dc51f.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +5 -1
- package/dist/vega/p-3eb2d433.js +0 -1
- package/dist/vega/p-3fa7d356.js +0 -1
- package/dist/vega/p-547692bf.entry.js +0 -1
- package/dist/vega/p-57005931.entry.js +0 -1
- package/dist/vega/p-5e8e4aba.js +0 -1
- package/dist/vega/p-cb36ccf0.entry.js +0 -1
- package/dist/vega/p-ec3495de.entry.js +0 -1
- package/dist/vega/p-fecb4044.js +0 -1
|
@@ -8,7 +8,7 @@ const iconManager = require('./icon-manager-9a47399c.js');
|
|
|
8
8
|
require('./wait-for-vega-handler-4491efc9.js');
|
|
9
9
|
require('./ui-6c069604.js');
|
|
10
10
|
const translation = require('./translation-e5003a00.js');
|
|
11
|
-
const contentState = require('./content-state-
|
|
11
|
+
const contentState = require('./content-state-e07c843c.js');
|
|
12
12
|
const typography = require('./typography-4560e7f1.js');
|
|
13
13
|
const validCreditCardNumberRule = require('./valid-credit-card-number-rule-4a1b00b8.js');
|
|
14
14
|
const index$1 = require('./index-ebb1bb17.js');
|
|
@@ -317,7 +317,7 @@ function injectVegaRichTextEditorClassIntoGlobal() {
|
|
|
317
317
|
* Inject VegaPublicValidationRules to global as a public api
|
|
318
318
|
*/
|
|
319
319
|
function injectVegaPublicValidationRules() {
|
|
320
|
-
void Promise.resolve().then(function () { return require('./public-rules-
|
|
320
|
+
void Promise.resolve().then(function () { return require('./public-rules-1ac67099.js'); }).then((module) => {
|
|
321
321
|
Object.entries(module).forEach(([name, value]) => {
|
|
322
322
|
globalThis[name] = value;
|
|
323
323
|
});
|
|
@@ -334,6 +334,14 @@ class RTEBlock {
|
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
+
/**
|
|
338
|
+
* Check if the block is a list item block
|
|
339
|
+
*
|
|
340
|
+
* @returns {boolean} True if the block is a list item block, false otherwise.
|
|
341
|
+
*/
|
|
342
|
+
isListItemBlock() {
|
|
343
|
+
return this.type === 'list-item';
|
|
344
|
+
}
|
|
337
345
|
/**
|
|
338
346
|
* Apply action to block
|
|
339
347
|
*
|
|
@@ -555,7 +563,7 @@ class ActionHandleStrategy {
|
|
|
555
563
|
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
556
564
|
*/
|
|
557
565
|
isCaretPositionAtTextBlockEnd(textBlock, node, startOffset) {
|
|
558
|
-
const lastNode = textBlock.
|
|
566
|
+
const lastNode = textBlock.children[textBlock.children.length - 1];
|
|
559
567
|
return node === lastNode && (node.isEmpty() || startOffset === lastNode.text.length);
|
|
560
568
|
}
|
|
561
569
|
/**
|
|
@@ -567,7 +575,7 @@ class ActionHandleStrategy {
|
|
|
567
575
|
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
568
576
|
*/
|
|
569
577
|
isCaretPositionAtTextBlockStart(textBlock, node, startOffset) {
|
|
570
|
-
return node === textBlock.
|
|
578
|
+
return node === textBlock.children[0] && startOffset === 0;
|
|
571
579
|
}
|
|
572
580
|
/**
|
|
573
581
|
* Checks if the caret position is at the start of a specified RTEImageNode.
|
|
@@ -578,7 +586,7 @@ class ActionHandleStrategy {
|
|
|
578
586
|
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTEImageNode.
|
|
579
587
|
*/
|
|
580
588
|
isCaretPositionAtImageBlockStart(target, node, startOffset) {
|
|
581
|
-
return node === target.
|
|
589
|
+
return node === target.children[0] && startOffset === 0;
|
|
582
590
|
}
|
|
583
591
|
/**
|
|
584
592
|
* Checks if the caret position is at the end of a given RTEImageNode.
|
|
@@ -589,7 +597,7 @@ class ActionHandleStrategy {
|
|
|
589
597
|
* @returns {boolean}Returns a boolean value indicating whether the caret position is at the end of the `RTEImageNode`.
|
|
590
598
|
*/
|
|
591
599
|
isCaretPositionAtImageBlockEnd(target, node, startOffset) {
|
|
592
|
-
const lastNode = target.
|
|
600
|
+
const lastNode = target.children[target.children.length - 1];
|
|
593
601
|
return node === lastNode && startOffset === 1;
|
|
594
602
|
}
|
|
595
603
|
}
|
|
@@ -633,7 +641,7 @@ class RTEImageNode extends RTENode {
|
|
|
633
641
|
super(id, annotationMap);
|
|
634
642
|
this.type = NodeTypeEnum.IMAGE;
|
|
635
643
|
this.url = url;
|
|
636
|
-
this.
|
|
644
|
+
this.parent = parentBlock;
|
|
637
645
|
}
|
|
638
646
|
/**
|
|
639
647
|
* Converts a VegaRTEImageNode into an RTEImageNode by mapping nodes and creating annotations.
|
|
@@ -674,7 +682,7 @@ class RTEImageNode extends RTENode {
|
|
|
674
682
|
* @inheritDoc
|
|
675
683
|
*/
|
|
676
684
|
clone() {
|
|
677
|
-
return new RTEImageNode(this.id, this.url, this.
|
|
685
|
+
return new RTEImageNode(this.id, this.url, this.parent, super.cloneAnnotations());
|
|
678
686
|
}
|
|
679
687
|
/**
|
|
680
688
|
* @inheritDoc
|
|
@@ -722,10 +730,10 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
722
730
|
* @returns {Nullable<RTENode>} the previous block last node
|
|
723
731
|
*/
|
|
724
732
|
getPreviousNode(currentNode) {
|
|
725
|
-
const currentBlock = currentNode.
|
|
726
|
-
const currentIndex = currentBlock
|
|
733
|
+
const currentBlock = currentNode.parent;
|
|
734
|
+
const currentIndex = currentBlock.children.indexOf(currentNode);
|
|
727
735
|
if (currentIndex > 0) {
|
|
728
|
-
return currentBlock[
|
|
736
|
+
return currentBlock.children[currentIndex - 1];
|
|
729
737
|
}
|
|
730
738
|
else if (currentBlock.parent) {
|
|
731
739
|
const previousBlock = this.getPreviousBlock(currentBlock);
|
|
@@ -741,10 +749,10 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
741
749
|
* @returns {Nullable<RTENode>} the next block first node
|
|
742
750
|
*/
|
|
743
751
|
getNextNode(currentNode) {
|
|
744
|
-
const currentBlock = currentNode.
|
|
745
|
-
const currentIndex = currentBlock
|
|
746
|
-
if (currentBlock[
|
|
747
|
-
return currentBlock[
|
|
752
|
+
const currentBlock = currentNode.parent;
|
|
753
|
+
const currentIndex = currentBlock.children.indexOf(currentNode);
|
|
754
|
+
if (currentBlock.children[currentIndex + 1]) {
|
|
755
|
+
return currentBlock.children[currentIndex + 1];
|
|
748
756
|
}
|
|
749
757
|
else if (currentBlock.parent) {
|
|
750
758
|
const nextBlock = this.getNextBlock(currentBlock);
|
|
@@ -760,20 +768,20 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
760
768
|
* @returns {boolean} True or false;
|
|
761
769
|
*/
|
|
762
770
|
isContentFirstNode(currentNode) {
|
|
763
|
-
const currentBlock = currentNode.
|
|
764
|
-
const currentIndex = currentBlock
|
|
771
|
+
const currentBlock = currentNode.parent;
|
|
772
|
+
const currentIndex = currentBlock.children.indexOf(currentNode);
|
|
765
773
|
const parent = currentBlock.parent;
|
|
766
|
-
if (currentBlock.
|
|
774
|
+
if (currentBlock.isListItemBlock()) {
|
|
767
775
|
const listParent = parent.parent;
|
|
768
776
|
return (currentIndex === 0 &&
|
|
769
|
-
Array.isArray(parent
|
|
770
|
-
parent[
|
|
777
|
+
Array.isArray(parent.children) &&
|
|
778
|
+
parent.children[0] === currentBlock &&
|
|
771
779
|
listParent['type'] !== 'list-item' &&
|
|
772
|
-
Array.isArray(listParent
|
|
773
|
-
listParent[
|
|
780
|
+
Array.isArray(listParent.children) &&
|
|
781
|
+
listParent.children[0] === parent);
|
|
774
782
|
}
|
|
775
783
|
else {
|
|
776
|
-
return (currentIndex === 0 && Array.isArray(parent
|
|
784
|
+
return (currentIndex === 0 && Array.isArray(parent.children) && parent.children[0] === currentBlock);
|
|
777
785
|
}
|
|
778
786
|
}
|
|
779
787
|
/**
|
|
@@ -784,10 +792,10 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
784
792
|
* @returns {Nullable<RTEBlock>} The previous block if existing
|
|
785
793
|
*/
|
|
786
794
|
getPreviousBlock(currentBlock) {
|
|
787
|
-
if (currentBlock && currentBlock.parent && currentBlock.parent
|
|
788
|
-
const currentBlockIndex = currentBlock.parent
|
|
795
|
+
if (currentBlock && currentBlock.parent && currentBlock.parent.children) {
|
|
796
|
+
const currentBlockIndex = currentBlock.parent.children.indexOf(currentBlock);
|
|
789
797
|
if (currentBlockIndex > 0) {
|
|
790
|
-
return currentBlock.parent[
|
|
798
|
+
return currentBlock.parent.children[currentBlockIndex - 1];
|
|
791
799
|
}
|
|
792
800
|
else if ((currentBlock.parent['type'] === 'number-list' ||
|
|
793
801
|
currentBlock.parent['type'] === 'bullet-list') &&
|
|
@@ -803,26 +811,7 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
803
811
|
* @returns {Nullable<RTENode>} Returns the last node of the given `currentBlock` object.
|
|
804
812
|
*/
|
|
805
813
|
getBlockLastNode(currentBlock) {
|
|
806
|
-
|
|
807
|
-
if (currentBlock['children'] && currentBlock['children'].length > 0) {
|
|
808
|
-
return this.getBlockLastNode(currentBlock['children'][currentBlock['children'].length - 1]);
|
|
809
|
-
}
|
|
810
|
-
else {
|
|
811
|
-
return currentBlock['nodes'][currentBlock['nodes'].length - 1];
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
else if (currentBlock.type === 'number-list' || currentBlock.type === 'bullet-list') {
|
|
815
|
-
const listItems = currentBlock.blocks;
|
|
816
|
-
if (listItems) {
|
|
817
|
-
const lastListItem = listItems[listItems.length - 1];
|
|
818
|
-
return this.getBlockLastNode(lastListItem);
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
else {
|
|
822
|
-
if (currentBlock['nodes']) {
|
|
823
|
-
return currentBlock['nodes'][currentBlock['nodes'].length - 1];
|
|
824
|
-
}
|
|
825
|
-
}
|
|
814
|
+
return currentBlock.getLastNode();
|
|
826
815
|
}
|
|
827
816
|
/**
|
|
828
817
|
* Returns the first node within a given RTE block, handling different block types accordingly.
|
|
@@ -832,14 +821,14 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
832
821
|
*/
|
|
833
822
|
getBlockFirstNode(currentBlock) {
|
|
834
823
|
if (currentBlock.type === 'number-list' || currentBlock.type === 'bullet-list') {
|
|
835
|
-
if (currentBlock.
|
|
836
|
-
const firstListItem = currentBlock.
|
|
824
|
+
if (currentBlock.children) {
|
|
825
|
+
const firstListItem = currentBlock.children[0];
|
|
837
826
|
return this.getBlockFirstNode(firstListItem);
|
|
838
827
|
}
|
|
839
828
|
}
|
|
840
829
|
else {
|
|
841
|
-
if (currentBlock
|
|
842
|
-
return currentBlock[
|
|
830
|
+
if (currentBlock.children) {
|
|
831
|
+
return currentBlock.children[0];
|
|
843
832
|
}
|
|
844
833
|
}
|
|
845
834
|
}
|
|
@@ -850,13 +839,13 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
850
839
|
* @returns {Nullable<RTEBlock>} The next block if existing
|
|
851
840
|
*/
|
|
852
841
|
getNextBlock(currentBlock) {
|
|
853
|
-
if (currentBlock && currentBlock.parent && currentBlock.parent
|
|
854
|
-
const currentBlockIndex = currentBlock.parent
|
|
855
|
-
if (currentBlock.parent[
|
|
856
|
-
return currentBlock.parent[
|
|
842
|
+
if (currentBlock && currentBlock.parent && currentBlock.parent.children) {
|
|
843
|
+
const currentBlockIndex = currentBlock.parent.children.indexOf(currentBlock);
|
|
844
|
+
if (currentBlock.parent.children[currentBlockIndex + 1]) {
|
|
845
|
+
return currentBlock.parent.children[currentBlockIndex + 1];
|
|
857
846
|
}
|
|
858
847
|
else if (currentBlock.type === 'list-item' &&
|
|
859
|
-
currentBlock.parent.
|
|
848
|
+
currentBlock.parent.children.length === currentBlockIndex + 1) {
|
|
860
849
|
return this.getNextBlock(currentBlock.parent);
|
|
861
850
|
}
|
|
862
851
|
}
|
|
@@ -885,9 +874,9 @@ class BlockMergeNodesStrategy extends ActionHandleStrategy {
|
|
|
885
874
|
handleAction(action, target) {
|
|
886
875
|
const anotherBlock = action.blockNeedToBeMerged;
|
|
887
876
|
if (target.type === anotherBlock.type || (target.type !== 'image' && anotherBlock.type !== 'image')) {
|
|
888
|
-
let shouldMergeNodes = anotherBlock
|
|
889
|
-
if (anotherBlock
|
|
890
|
-
shouldMergeNodes = anotherBlock
|
|
877
|
+
let shouldMergeNodes = anotherBlock.children;
|
|
878
|
+
if (anotherBlock.type !== 'image') {
|
|
879
|
+
shouldMergeNodes = anotherBlock.children.filter((node) => node.text);
|
|
891
880
|
}
|
|
892
881
|
target.apply(new AppendChildNodesAction(shouldMergeNodes));
|
|
893
882
|
anotherBlock.parent.apply(new RemoveChildAction(anotherBlock));
|
|
@@ -907,9 +896,9 @@ class BlockRemoveNodeStrategy extends ActionHandleStrategy {
|
|
|
907
896
|
* @param {RTEBlockWithNodes} target - The parent block of the node that will be removed.
|
|
908
897
|
*/
|
|
909
898
|
handleAction(action, target) {
|
|
910
|
-
const arrayFixed = target.
|
|
911
|
-
target.
|
|
912
|
-
if (target.
|
|
899
|
+
const arrayFixed = target.children;
|
|
900
|
+
target.children = arrayFixed.filter((node) => node !== action.entityToBeRemoved);
|
|
901
|
+
if (target.children.length === 0 && target.parent) {
|
|
913
902
|
target.parent.apply(new RemoveChildAction(target));
|
|
914
903
|
}
|
|
915
904
|
}
|
|
@@ -928,11 +917,11 @@ class BlockAppendNodesStrategy extends ActionHandleStrategy {
|
|
|
928
917
|
handleAction(action, target) {
|
|
929
918
|
const nodesToBeAppended = action.entityToBeAppended;
|
|
930
919
|
nodesToBeAppended.forEach((node) => {
|
|
931
|
-
node.
|
|
920
|
+
node.parent = target;
|
|
932
921
|
});
|
|
933
922
|
// This line is used to fix the typescript error `This expression is not callable`. https://github.com/microsoft/TypeScript/issues/44373
|
|
934
|
-
const arrayFixed = target.
|
|
935
|
-
target.
|
|
923
|
+
const arrayFixed = target.children;
|
|
924
|
+
target.children = arrayFixed.concat(nodesToBeAppended);
|
|
936
925
|
}
|
|
937
926
|
}
|
|
938
927
|
|
|
@@ -947,7 +936,7 @@ class BlockReplaceNodesStrategy extends ActionHandleStrategy {
|
|
|
947
936
|
* @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
|
|
948
937
|
*/
|
|
949
938
|
handleAction(action, target) {
|
|
950
|
-
target.
|
|
939
|
+
target.children = [];
|
|
951
940
|
target.apply(new AppendChildNodesAction(action.newChildNodes));
|
|
952
941
|
}
|
|
953
942
|
}
|
|
@@ -1591,7 +1580,7 @@ class NodeSplitTextStrategy extends ActionHandleStrategy {
|
|
|
1591
1580
|
if (action instanceof TextSplittableAction && action.doSplit && selectionRangeAnnotation) {
|
|
1592
1581
|
const { startContainer, endContainer, startOffset, endOffset } = selectionRangeAnnotation.range;
|
|
1593
1582
|
const noTextRangeSelected = startContainer === endContainer && startOffset === endOffset;
|
|
1594
|
-
target.
|
|
1583
|
+
target.parent.children = target.parent.children.flatMap((item) => {
|
|
1595
1584
|
if (item.id === target.id) {
|
|
1596
1585
|
if (noTextRangeSelected) {
|
|
1597
1586
|
return this.insertNewNode(startOffset, target);
|
|
@@ -1825,7 +1814,7 @@ class NodeUpdateAnnotationMapStrategy extends ActionHandleStrategy {
|
|
|
1825
1814
|
if (typeGuard.isNonNullable(action.newText)) {
|
|
1826
1815
|
target.text = action.newText;
|
|
1827
1816
|
}
|
|
1828
|
-
target.
|
|
1817
|
+
target.parent.apply(new LinkGroupAnnotationAction(action.link.groupKey, [target]));
|
|
1829
1818
|
}
|
|
1830
1819
|
if (action instanceof CodeAnnotationAction) {
|
|
1831
1820
|
this.handleAction(new ClearFormattingAnnotationAction(), target);
|
|
@@ -1843,7 +1832,7 @@ class RTETextNode extends RTENode {
|
|
|
1843
1832
|
constructor(id, text, parentBlock, annotationMap) {
|
|
1844
1833
|
super(id, annotationMap);
|
|
1845
1834
|
this.type = NodeTypeEnum.TEXT;
|
|
1846
|
-
this.
|
|
1835
|
+
this.parent = parentBlock;
|
|
1847
1836
|
this.text = text;
|
|
1848
1837
|
}
|
|
1849
1838
|
/**
|
|
@@ -1912,13 +1901,13 @@ class RTETextNode extends RTENode {
|
|
|
1912
1901
|
* @returns {RTETextNode} An new RTETextNode
|
|
1913
1902
|
*/
|
|
1914
1903
|
cloneWithText(text) {
|
|
1915
|
-
return new RTETextNode(createPublicApiRuntimeMetricsSlimmer.generateUUID(), text, this.
|
|
1904
|
+
return new RTETextNode(createPublicApiRuntimeMetricsSlimmer.generateUUID(), text, this.parent, super.cloneAnnotations());
|
|
1916
1905
|
}
|
|
1917
1906
|
/**
|
|
1918
1907
|
* @inheritDoc
|
|
1919
1908
|
*/
|
|
1920
1909
|
clone() {
|
|
1921
|
-
return new RTETextNode(this.id, this.text, this.
|
|
1910
|
+
return new RTETextNode(this.id, this.text, this.parent, super.cloneAnnotations());
|
|
1922
1911
|
}
|
|
1923
1912
|
/**
|
|
1924
1913
|
* Checks if a node is empty
|
|
@@ -1945,7 +1934,7 @@ class RTETextNode extends RTENode {
|
|
|
1945
1934
|
else {
|
|
1946
1935
|
this.applyActionToNode(this, action);
|
|
1947
1936
|
}
|
|
1948
|
-
this.
|
|
1937
|
+
this.parent.mergeNodes(action);
|
|
1949
1938
|
}
|
|
1950
1939
|
/**
|
|
1951
1940
|
* @inheritDoc
|
|
@@ -2127,14 +2116,14 @@ class BlockUpdateTextStyleStrategy extends ActionHandleStrategy {
|
|
|
2127
2116
|
target.type = action.textStyle;
|
|
2128
2117
|
}
|
|
2129
2118
|
if (action.bold) {
|
|
2130
|
-
target.
|
|
2119
|
+
target.children.forEach((node) => {
|
|
2131
2120
|
const boldAnnotationAction = new BoldAnnotationAction(true);
|
|
2132
2121
|
boldAnnotationAction.doSplit = false;
|
|
2133
2122
|
node.apply(boldAnnotationAction);
|
|
2134
2123
|
});
|
|
2135
2124
|
}
|
|
2136
2125
|
else {
|
|
2137
|
-
target.
|
|
2126
|
+
target.children.forEach((node) => {
|
|
2138
2127
|
node.apply(new DeleteNodeAnnotationAction(exports.NodeAnnotationTypeEnum.BOLD));
|
|
2139
2128
|
});
|
|
2140
2129
|
}
|
|
@@ -2183,10 +2172,10 @@ class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy {
|
|
|
2183
2172
|
if (splitNode) {
|
|
2184
2173
|
const beforeText = splitNode.text.slice(0, startOffsetOfNode);
|
|
2185
2174
|
const afterText = splitNode.text.slice(startOffsetOfNode);
|
|
2186
|
-
const nodesSplitIndex = textBlock.
|
|
2175
|
+
const nodesSplitIndex = textBlock.children.indexOf(splitNode);
|
|
2187
2176
|
if (nodesSplitIndex > -1) {
|
|
2188
|
-
const beforeNodes = textBlock.
|
|
2189
|
-
const afterNodes = textBlock.
|
|
2177
|
+
const beforeNodes = textBlock.children.slice(0, nodesSplitIndex);
|
|
2178
|
+
const afterNodes = textBlock.children.slice(nodesSplitIndex + 1);
|
|
2190
2179
|
if (beforeText) {
|
|
2191
2180
|
beforeNodes.push(splitNode.cloneWithText(beforeText));
|
|
2192
2181
|
}
|
|
@@ -2275,10 +2264,10 @@ class BlockInsertLineBreakStrategy extends ActionHandleStrategy {
|
|
|
2275
2264
|
const lineBreakNode = new RTETextNode(createPublicApiRuntimeMetricsSlimmer.generateUUID(), '\n', target);
|
|
2276
2265
|
const beforeText = splitNode.text.slice(0, startOffsetOfNode);
|
|
2277
2266
|
const afterText = splitNode.text.slice(startOffsetOfNode);
|
|
2278
|
-
const nodesSplitIndex = target.
|
|
2267
|
+
const nodesSplitIndex = target.children.indexOf(splitNode);
|
|
2279
2268
|
if (nodesSplitIndex > -1) {
|
|
2280
|
-
const beforeNodes = target.
|
|
2281
|
-
const afterNodes = target.
|
|
2269
|
+
const beforeNodes = target.children.slice(0, nodesSplitIndex);
|
|
2270
|
+
const afterNodes = target.children.slice(nodesSplitIndex + 1);
|
|
2282
2271
|
if (beforeText) {
|
|
2283
2272
|
beforeNodes.push(splitNode.cloneWithText(beforeText));
|
|
2284
2273
|
}
|
|
@@ -2324,7 +2313,7 @@ class BlockInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy {
|
|
|
2324
2313
|
* @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
|
|
2325
2314
|
*/
|
|
2326
2315
|
lineBreakMultipleBlocks(selectedBlocks, target) {
|
|
2327
|
-
const beforeNodes = target.
|
|
2316
|
+
const beforeNodes = target.children;
|
|
2328
2317
|
const lineBreakNode = new RTETextNode(createPublicApiRuntimeMetricsSlimmer.generateUUID(), '\n', target);
|
|
2329
2318
|
const afterNodes = this.concatBlocksNodes(selectedBlocks.slice(1));
|
|
2330
2319
|
this.mergeLineBreakNodes(beforeNodes, lineBreakNode, afterNodes, target);
|
|
@@ -2340,7 +2329,7 @@ class BlockInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy {
|
|
|
2340
2329
|
const nodes = [];
|
|
2341
2330
|
blocks.map((block) => {
|
|
2342
2331
|
if (block.type !== 'image') {
|
|
2343
|
-
nodes.push(...block
|
|
2332
|
+
nodes.push(...block.children);
|
|
2344
2333
|
block.parent.apply(new RemoveChildAction(block));
|
|
2345
2334
|
}
|
|
2346
2335
|
});
|
|
@@ -2405,8 +2394,8 @@ class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2405
2394
|
else {
|
|
2406
2395
|
const previousNode = this.getPreviousNode(startContainerNode);
|
|
2407
2396
|
// Remove the last character will not delete paragraph, the paragraph will removed after press delete again
|
|
2408
|
-
if ((previousNode && previousNode.
|
|
2409
|
-
target.
|
|
2397
|
+
if ((previousNode && previousNode.parent === target && previousNode['text'] === '\n') ||
|
|
2398
|
+
target.children.length === 1) {
|
|
2410
2399
|
action.previousNode = startContainerNode;
|
|
2411
2400
|
return;
|
|
2412
2401
|
}
|
|
@@ -2420,12 +2409,12 @@ class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2420
2409
|
else {
|
|
2421
2410
|
let previousNode = this.getPreviousNode(startContainerNode);
|
|
2422
2411
|
let nextNode = null;
|
|
2423
|
-
if (target.
|
|
2412
|
+
if (target.children.length && previousNode && previousNode.parent !== target) {
|
|
2424
2413
|
if (startContainerNode.isEmpty()) {
|
|
2425
2414
|
target.apply(new RemoveChildAction(startContainerNode));
|
|
2426
2415
|
}
|
|
2427
|
-
if (target.type === previousNode.
|
|
2428
|
-
previousNode.
|
|
2416
|
+
if (target.type === previousNode.parent.type) {
|
|
2417
|
+
previousNode.parent.apply(new MergeTwoBlocksNodesAction(target));
|
|
2429
2418
|
}
|
|
2430
2419
|
}
|
|
2431
2420
|
else {
|
|
@@ -2452,14 +2441,14 @@ class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2452
2441
|
if (previousNode instanceof RTETextNode && previousNode.isEmpty()) {
|
|
2453
2442
|
const shouldRemoveNode = previousNode;
|
|
2454
2443
|
previousNode = this.getPreviousNode(previousNode);
|
|
2455
|
-
shouldRemoveNode.
|
|
2444
|
+
shouldRemoveNode.parent.apply(new RemoveChildAction(shouldRemoveNode));
|
|
2456
2445
|
if (!previousNode) {
|
|
2457
2446
|
nextNode = startContainerNode;
|
|
2458
2447
|
}
|
|
2459
2448
|
}
|
|
2460
2449
|
}
|
|
2461
2450
|
//Remove the paragraph block if the content is empty
|
|
2462
|
-
if (target.
|
|
2451
|
+
if (target.children.length === 0) {
|
|
2463
2452
|
target.parent.apply(new RemoveChildAction(target));
|
|
2464
2453
|
}
|
|
2465
2454
|
if (previousNode) {
|
|
@@ -2512,11 +2501,11 @@ class BlockReplaceNodeWithNodesStrategy extends ActionHandleStrategy {
|
|
|
2512
2501
|
* @param {RTENode[]} newNodes - The array of the text node or the image node.
|
|
2513
2502
|
*/
|
|
2514
2503
|
replaceNodeWithNodes(target, referNode, newNodes) {
|
|
2515
|
-
if (target
|
|
2504
|
+
if (target.children) {
|
|
2516
2505
|
newNodes.forEach((node) => {
|
|
2517
|
-
node.
|
|
2506
|
+
node.parent = target;
|
|
2518
2507
|
});
|
|
2519
|
-
target
|
|
2508
|
+
target.children = target.children.flatMap((node) => {
|
|
2520
2509
|
if (node === referNode) {
|
|
2521
2510
|
return newNodes;
|
|
2522
2511
|
}
|
|
@@ -2571,7 +2560,7 @@ class BlockTransformToListStrategy extends ActionHandleStrategy {
|
|
|
2571
2560
|
class RTETextBlock extends RTEBlock {
|
|
2572
2561
|
constructor(id, type) {
|
|
2573
2562
|
super(id);
|
|
2574
|
-
this.
|
|
2563
|
+
this.children = [];
|
|
2575
2564
|
this.type = type;
|
|
2576
2565
|
if (RTETextBlock.isAcceptableTextStyle(type)) {
|
|
2577
2566
|
this.annotationMap = new Map([TextStyleAnnotation.from(type)]);
|
|
@@ -2589,7 +2578,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
2589
2578
|
static from(block) {
|
|
2590
2579
|
const textBlock = new RTETextBlock(block.id, block.type);
|
|
2591
2580
|
const { annotations } = block;
|
|
2592
|
-
textBlock.
|
|
2581
|
+
textBlock.children = block.nodes.map((richText) => RTETextNode.from(richText, textBlock));
|
|
2593
2582
|
if (annotations) {
|
|
2594
2583
|
Object.entries(annotations).forEach(([type, value]) => {
|
|
2595
2584
|
const item = this.createAnnotationEntity(type, value);
|
|
@@ -2645,7 +2634,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
2645
2634
|
* @param {AnnotationAction} action - AnnotationAction
|
|
2646
2635
|
*/
|
|
2647
2636
|
mergeNodes(action) {
|
|
2648
|
-
this.
|
|
2637
|
+
this.children = this.children.reduce((prev, cur) => {
|
|
2649
2638
|
const lastNode = prev.at(-1);
|
|
2650
2639
|
if (action instanceof LinkAnnotationAction && action.needMergeNode) {
|
|
2651
2640
|
const lastNodeLinkAnnotation = lastNode === null || lastNode === void 0 ? void 0 : lastNode.getAnnotationByType(exports.NodeAnnotationTypeEnum.LINK);
|
|
@@ -2664,7 +2653,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
2664
2653
|
* @inheritDoc
|
|
2665
2654
|
*/
|
|
2666
2655
|
toJSON() {
|
|
2667
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, nodes: this.
|
|
2656
|
+
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, nodes: this.children.map((node) => node.toJSON()) });
|
|
2668
2657
|
}
|
|
2669
2658
|
/**
|
|
2670
2659
|
* Clone the nodes to a new block
|
|
@@ -2674,7 +2663,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
2674
2663
|
*/
|
|
2675
2664
|
cloneWithNodes(nodes) {
|
|
2676
2665
|
const block = new RTETextBlock(createPublicApiRuntimeMetricsSlimmer.generateUUID(), this.type);
|
|
2677
|
-
block.
|
|
2666
|
+
block.children = [];
|
|
2678
2667
|
block.apply(new AppendChildNodesAction(nodes));
|
|
2679
2668
|
return block;
|
|
2680
2669
|
}
|
|
@@ -2683,9 +2672,9 @@ class RTETextBlock extends RTEBlock {
|
|
|
2683
2672
|
*/
|
|
2684
2673
|
clone() {
|
|
2685
2674
|
const clonedBlock = new RTETextBlock(this.id, this.type);
|
|
2686
|
-
clonedBlock.
|
|
2675
|
+
clonedBlock.children = this.children.map((node) => {
|
|
2687
2676
|
const clonedNode = node.clone();
|
|
2688
|
-
clonedNode.
|
|
2677
|
+
clonedNode.parent = clonedBlock;
|
|
2689
2678
|
return clonedNode;
|
|
2690
2679
|
});
|
|
2691
2680
|
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
@@ -2696,13 +2685,13 @@ class RTETextBlock extends RTEBlock {
|
|
|
2696
2685
|
* @inheritDoc
|
|
2697
2686
|
*/
|
|
2698
2687
|
isNotEmpty() {
|
|
2699
|
-
return this.
|
|
2688
|
+
return this.children.length > 0 && this.children.some((node) => !node.isEmpty());
|
|
2700
2689
|
}
|
|
2701
2690
|
/**
|
|
2702
2691
|
* @inheritDoc
|
|
2703
2692
|
*/
|
|
2704
2693
|
getLastNode() {
|
|
2705
|
-
return this.
|
|
2694
|
+
return this.children[this.children.length - 1];
|
|
2706
2695
|
}
|
|
2707
2696
|
/**
|
|
2708
2697
|
* Create new empty paragraph.
|
|
@@ -2747,7 +2736,7 @@ class CodeBlockRemoveSelfStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2747
2736
|
* @inheritDoc
|
|
2748
2737
|
*/
|
|
2749
2738
|
handleAction(_action, target) {
|
|
2750
|
-
const node = target.
|
|
2739
|
+
const node = target.children[0];
|
|
2751
2740
|
const parent = target.parent;
|
|
2752
2741
|
if (parent) {
|
|
2753
2742
|
let focusNode = this.getPreviousNode(node);
|
|
@@ -2760,14 +2749,14 @@ class CodeBlockRemoveSelfStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2760
2749
|
const focusElement = focusNode
|
|
2761
2750
|
? stateEntityRenderingRegistry.getDOMByEntity(focusNode)
|
|
2762
2751
|
: null;
|
|
2763
|
-
if (parent.
|
|
2752
|
+
if (parent.children.length === 0) {
|
|
2764
2753
|
const defaultParagraph = RTETextBlock.from({
|
|
2765
2754
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
2766
2755
|
type: 'paragraph',
|
|
2767
2756
|
nodes: [{ id: createPublicApiRuntimeMetricsSlimmer.generateUUID(), type: 'text', text: '' }],
|
|
2768
2757
|
});
|
|
2769
2758
|
target.parent.apply(new AppendChildNodesAction([defaultParagraph]));
|
|
2770
|
-
focusNode = defaultParagraph.
|
|
2759
|
+
focusNode = defaultParagraph.children[0];
|
|
2771
2760
|
offset = 0;
|
|
2772
2761
|
}
|
|
2773
2762
|
this.notifyUpdateSelection(focusNode, focusElement, offset, target);
|
|
@@ -2835,7 +2824,7 @@ class SwitchOutFromCodeBlockStrategy extends ActionHandleStrategy {
|
|
|
2835
2824
|
const textArray = content.split('\n');
|
|
2836
2825
|
const updateAction = new UpdateCodeBlockAction(textArray.slice(0, textArray.length - 2).join('\n'), language);
|
|
2837
2826
|
updateAction.isFlushable = false;
|
|
2838
|
-
target.
|
|
2827
|
+
target.children[0].apply(updateAction);
|
|
2839
2828
|
const textBlock = RTETextBlock.from({
|
|
2840
2829
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
2841
2830
|
type: 'paragraph',
|
|
@@ -2847,7 +2836,7 @@ class SwitchOutFromCodeBlockStrategy extends ActionHandleStrategy {
|
|
|
2847
2836
|
if (currentNodeDom) {
|
|
2848
2837
|
const nodeSubject = domNodeSubjectFactory.domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, vegaInternalEventId.VegaInternalRichTextEditorSelectionRangeChange);
|
|
2849
2838
|
if (nodeSubject) {
|
|
2850
|
-
changeManager.ChangeManager.notify(nodeSubject, { node: textBlock.
|
|
2839
|
+
changeManager.ChangeManager.notify(nodeSubject, { node: textBlock.children[0] });
|
|
2851
2840
|
}
|
|
2852
2841
|
}
|
|
2853
2842
|
}
|
|
@@ -2908,7 +2897,7 @@ class RTECodeBlockNode extends RTENode {
|
|
|
2908
2897
|
this.text = '';
|
|
2909
2898
|
this.annotationMap = new Map();
|
|
2910
2899
|
this.text = content;
|
|
2911
|
-
this.
|
|
2900
|
+
this.parent = parentBlock;
|
|
2912
2901
|
this.language = language;
|
|
2913
2902
|
}
|
|
2914
2903
|
/**
|
|
@@ -2923,7 +2912,7 @@ class RTECodeBlockNode extends RTENode {
|
|
|
2923
2912
|
* @inheritDoc
|
|
2924
2913
|
*/
|
|
2925
2914
|
clone() {
|
|
2926
|
-
return new RTECodeBlockNode(this.id, this.text, this.language, this.
|
|
2915
|
+
return new RTECodeBlockNode(this.id, this.text, this.language, this.parent);
|
|
2927
2916
|
}
|
|
2928
2917
|
/**
|
|
2929
2918
|
* @inheritDoc
|
|
@@ -2966,7 +2955,7 @@ class RTECodeBlock extends RTEBlock {
|
|
|
2966
2955
|
constructor(id, content, language) {
|
|
2967
2956
|
super(id);
|
|
2968
2957
|
this.type = 'code-block';
|
|
2969
|
-
this.
|
|
2958
|
+
this.children = [new RTECodeBlockNode(`${id}-1`, content, language, this)];
|
|
2970
2959
|
}
|
|
2971
2960
|
/**
|
|
2972
2961
|
* Converts a VegaRTECodeBlock into an RTECodeBlock.
|
|
@@ -2981,7 +2970,7 @@ class RTECodeBlock extends RTEBlock {
|
|
|
2981
2970
|
* @inheritDoc
|
|
2982
2971
|
*/
|
|
2983
2972
|
toJSON() {
|
|
2984
|
-
const { language, text } = this.
|
|
2973
|
+
const { language, text } = this.children[0];
|
|
2985
2974
|
return {
|
|
2986
2975
|
id: this.id,
|
|
2987
2976
|
type: 'code-block',
|
|
@@ -3020,13 +3009,13 @@ class RTECodeBlock extends RTEBlock {
|
|
|
3020
3009
|
* @inheritDoc
|
|
3021
3010
|
*/
|
|
3022
3011
|
isNotEmpty() {
|
|
3023
|
-
return !!this.
|
|
3012
|
+
return !!this.children.length;
|
|
3024
3013
|
}
|
|
3025
3014
|
/**
|
|
3026
3015
|
* @inheritDoc
|
|
3027
3016
|
*/
|
|
3028
3017
|
getLastNode() {
|
|
3029
|
-
return this.
|
|
3018
|
+
return this.children[0];
|
|
3030
3019
|
}
|
|
3031
3020
|
/**
|
|
3032
3021
|
* The code block is selected or not.
|
|
@@ -3034,7 +3023,7 @@ class RTECodeBlock extends RTEBlock {
|
|
|
3034
3023
|
* @returns {boolean} - The boolean result.
|
|
3035
3024
|
*/
|
|
3036
3025
|
isSelected() {
|
|
3037
|
-
return this.
|
|
3026
|
+
return this.children[0].annotationMap.has(exports.InternalAnnotationTypeEnum.SELECTION_RANGE);
|
|
3038
3027
|
}
|
|
3039
3028
|
}
|
|
3040
3029
|
(() => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
4
4
|
const timer = require('./timer-5f33058b.js');
|
|
5
|
-
const codeBlock = require('./code-block-
|
|
5
|
+
const codeBlock = require('./code-block-e56c5216.js');
|
|
6
6
|
const component = require('./component-1e352960.js');
|
|
7
7
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
8
8
|
const domNodeSubjectFactory = require('./dom-node-subject-factory-769dd00f.js');
|
|
@@ -624,7 +624,7 @@ class SelectionController extends AutoRunWhenReRenderTaskQueueSlimmer {
|
|
|
624
624
|
const nodeEntity = codeBlock.stateEntityRenderingRegistry.getEntityByDOM(entityElement);
|
|
625
625
|
if (nodeEntity instanceof codeBlock.RTECodeBlock) {
|
|
626
626
|
if (this.internalCodeBlockSelectionController.isCodeBlockSelected(nodeEntity, range)) {
|
|
627
|
-
selectedNodes.push(nodeEntity.
|
|
627
|
+
selectedNodes.push(nodeEntity.children[0]);
|
|
628
628
|
}
|
|
629
629
|
return;
|
|
630
630
|
}
|
|
@@ -637,11 +637,11 @@ class SelectionController extends AutoRunWhenReRenderTaskQueueSlimmer {
|
|
|
637
637
|
};
|
|
638
638
|
filterNode(commonAncestor);
|
|
639
639
|
selectedNodes.forEach((node) => {
|
|
640
|
-
if (this.selectionMap.has(node.
|
|
641
|
-
this.selectionMap.get(node.
|
|
640
|
+
if (this.selectionMap.has(node.parent)) {
|
|
641
|
+
this.selectionMap.get(node.parent).push(node);
|
|
642
642
|
}
|
|
643
643
|
else {
|
|
644
|
-
this.selectionMap.set(node.
|
|
644
|
+
this.selectionMap.set(node.parent, [node]);
|
|
645
645
|
}
|
|
646
646
|
});
|
|
647
647
|
this.getSelectedNodes().forEach((node) => node.apply(new codeBlock.SelectionChangeAction(range)));
|