@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
|
@@ -332,6 +332,14 @@ class RTEBlock {
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
+
/**
|
|
336
|
+
* Check if the block is a list item block
|
|
337
|
+
*
|
|
338
|
+
* @returns {boolean} True if the block is a list item block, false otherwise.
|
|
339
|
+
*/
|
|
340
|
+
isListItemBlock() {
|
|
341
|
+
return this.type === 'list-item';
|
|
342
|
+
}
|
|
335
343
|
/**
|
|
336
344
|
* Apply action to block
|
|
337
345
|
*
|
|
@@ -553,7 +561,7 @@ class ActionHandleStrategy {
|
|
|
553
561
|
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
554
562
|
*/
|
|
555
563
|
isCaretPositionAtTextBlockEnd(textBlock, node, startOffset) {
|
|
556
|
-
const lastNode = textBlock.
|
|
564
|
+
const lastNode = textBlock.children[textBlock.children.length - 1];
|
|
557
565
|
return node === lastNode && (node.isEmpty() || startOffset === lastNode.text.length);
|
|
558
566
|
}
|
|
559
567
|
/**
|
|
@@ -565,7 +573,7 @@ class ActionHandleStrategy {
|
|
|
565
573
|
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
566
574
|
*/
|
|
567
575
|
isCaretPositionAtTextBlockStart(textBlock, node, startOffset) {
|
|
568
|
-
return node === textBlock.
|
|
576
|
+
return node === textBlock.children[0] && startOffset === 0;
|
|
569
577
|
}
|
|
570
578
|
/**
|
|
571
579
|
* Checks if the caret position is at the start of a specified RTEImageNode.
|
|
@@ -576,7 +584,7 @@ class ActionHandleStrategy {
|
|
|
576
584
|
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTEImageNode.
|
|
577
585
|
*/
|
|
578
586
|
isCaretPositionAtImageBlockStart(target, node, startOffset) {
|
|
579
|
-
return node === target.
|
|
587
|
+
return node === target.children[0] && startOffset === 0;
|
|
580
588
|
}
|
|
581
589
|
/**
|
|
582
590
|
* Checks if the caret position is at the end of a given RTEImageNode.
|
|
@@ -587,7 +595,7 @@ class ActionHandleStrategy {
|
|
|
587
595
|
* @returns {boolean}Returns a boolean value indicating whether the caret position is at the end of the `RTEImageNode`.
|
|
588
596
|
*/
|
|
589
597
|
isCaretPositionAtImageBlockEnd(target, node, startOffset) {
|
|
590
|
-
const lastNode = target.
|
|
598
|
+
const lastNode = target.children[target.children.length - 1];
|
|
591
599
|
return node === lastNode && startOffset === 1;
|
|
592
600
|
}
|
|
593
601
|
}
|
|
@@ -631,7 +639,7 @@ class RTEImageNode extends RTENode {
|
|
|
631
639
|
super(id, annotationMap);
|
|
632
640
|
this.type = NodeTypeEnum.IMAGE;
|
|
633
641
|
this.url = url;
|
|
634
|
-
this.
|
|
642
|
+
this.parent = parentBlock;
|
|
635
643
|
}
|
|
636
644
|
/**
|
|
637
645
|
* Converts a VegaRTEImageNode into an RTEImageNode by mapping nodes and creating annotations.
|
|
@@ -672,7 +680,7 @@ class RTEImageNode extends RTENode {
|
|
|
672
680
|
* @inheritDoc
|
|
673
681
|
*/
|
|
674
682
|
clone() {
|
|
675
|
-
return new RTEImageNode(this.id, this.url, this.
|
|
683
|
+
return new RTEImageNode(this.id, this.url, this.parent, super.cloneAnnotations());
|
|
676
684
|
}
|
|
677
685
|
/**
|
|
678
686
|
* @inheritDoc
|
|
@@ -720,10 +728,10 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
720
728
|
* @returns {Nullable<RTENode>} the previous block last node
|
|
721
729
|
*/
|
|
722
730
|
getPreviousNode(currentNode) {
|
|
723
|
-
const currentBlock = currentNode.
|
|
724
|
-
const currentIndex = currentBlock
|
|
731
|
+
const currentBlock = currentNode.parent;
|
|
732
|
+
const currentIndex = currentBlock.children.indexOf(currentNode);
|
|
725
733
|
if (currentIndex > 0) {
|
|
726
|
-
return currentBlock[
|
|
734
|
+
return currentBlock.children[currentIndex - 1];
|
|
727
735
|
}
|
|
728
736
|
else if (currentBlock.parent) {
|
|
729
737
|
const previousBlock = this.getPreviousBlock(currentBlock);
|
|
@@ -739,10 +747,10 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
739
747
|
* @returns {Nullable<RTENode>} the next block first node
|
|
740
748
|
*/
|
|
741
749
|
getNextNode(currentNode) {
|
|
742
|
-
const currentBlock = currentNode.
|
|
743
|
-
const currentIndex = currentBlock
|
|
744
|
-
if (currentBlock[
|
|
745
|
-
return currentBlock[
|
|
750
|
+
const currentBlock = currentNode.parent;
|
|
751
|
+
const currentIndex = currentBlock.children.indexOf(currentNode);
|
|
752
|
+
if (currentBlock.children[currentIndex + 1]) {
|
|
753
|
+
return currentBlock.children[currentIndex + 1];
|
|
746
754
|
}
|
|
747
755
|
else if (currentBlock.parent) {
|
|
748
756
|
const nextBlock = this.getNextBlock(currentBlock);
|
|
@@ -758,20 +766,20 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
758
766
|
* @returns {boolean} True or false;
|
|
759
767
|
*/
|
|
760
768
|
isContentFirstNode(currentNode) {
|
|
761
|
-
const currentBlock = currentNode.
|
|
762
|
-
const currentIndex = currentBlock
|
|
769
|
+
const currentBlock = currentNode.parent;
|
|
770
|
+
const currentIndex = currentBlock.children.indexOf(currentNode);
|
|
763
771
|
const parent = currentBlock.parent;
|
|
764
|
-
if (currentBlock.
|
|
772
|
+
if (currentBlock.isListItemBlock()) {
|
|
765
773
|
const listParent = parent.parent;
|
|
766
774
|
return (currentIndex === 0 &&
|
|
767
|
-
Array.isArray(parent
|
|
768
|
-
parent[
|
|
775
|
+
Array.isArray(parent.children) &&
|
|
776
|
+
parent.children[0] === currentBlock &&
|
|
769
777
|
listParent['type'] !== 'list-item' &&
|
|
770
|
-
Array.isArray(listParent
|
|
771
|
-
listParent[
|
|
778
|
+
Array.isArray(listParent.children) &&
|
|
779
|
+
listParent.children[0] === parent);
|
|
772
780
|
}
|
|
773
781
|
else {
|
|
774
|
-
return (currentIndex === 0 && Array.isArray(parent
|
|
782
|
+
return (currentIndex === 0 && Array.isArray(parent.children) && parent.children[0] === currentBlock);
|
|
775
783
|
}
|
|
776
784
|
}
|
|
777
785
|
/**
|
|
@@ -782,10 +790,10 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
782
790
|
* @returns {Nullable<RTEBlock>} The previous block if existing
|
|
783
791
|
*/
|
|
784
792
|
getPreviousBlock(currentBlock) {
|
|
785
|
-
if (currentBlock && currentBlock.parent && currentBlock.parent
|
|
786
|
-
const currentBlockIndex = currentBlock.parent
|
|
793
|
+
if (currentBlock && currentBlock.parent && currentBlock.parent.children) {
|
|
794
|
+
const currentBlockIndex = currentBlock.parent.children.indexOf(currentBlock);
|
|
787
795
|
if (currentBlockIndex > 0) {
|
|
788
|
-
return currentBlock.parent[
|
|
796
|
+
return currentBlock.parent.children[currentBlockIndex - 1];
|
|
789
797
|
}
|
|
790
798
|
else if ((currentBlock.parent['type'] === 'number-list' ||
|
|
791
799
|
currentBlock.parent['type'] === 'bullet-list') &&
|
|
@@ -801,26 +809,7 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
801
809
|
* @returns {Nullable<RTENode>} Returns the last node of the given `currentBlock` object.
|
|
802
810
|
*/
|
|
803
811
|
getBlockLastNode(currentBlock) {
|
|
804
|
-
|
|
805
|
-
if (currentBlock['children'] && currentBlock['children'].length > 0) {
|
|
806
|
-
return this.getBlockLastNode(currentBlock['children'][currentBlock['children'].length - 1]);
|
|
807
|
-
}
|
|
808
|
-
else {
|
|
809
|
-
return currentBlock['nodes'][currentBlock['nodes'].length - 1];
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
else if (currentBlock.type === 'number-list' || currentBlock.type === 'bullet-list') {
|
|
813
|
-
const listItems = currentBlock.blocks;
|
|
814
|
-
if (listItems) {
|
|
815
|
-
const lastListItem = listItems[listItems.length - 1];
|
|
816
|
-
return this.getBlockLastNode(lastListItem);
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
else {
|
|
820
|
-
if (currentBlock['nodes']) {
|
|
821
|
-
return currentBlock['nodes'][currentBlock['nodes'].length - 1];
|
|
822
|
-
}
|
|
823
|
-
}
|
|
812
|
+
return currentBlock.getLastNode();
|
|
824
813
|
}
|
|
825
814
|
/**
|
|
826
815
|
* Returns the first node within a given RTE block, handling different block types accordingly.
|
|
@@ -830,14 +819,14 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
830
819
|
*/
|
|
831
820
|
getBlockFirstNode(currentBlock) {
|
|
832
821
|
if (currentBlock.type === 'number-list' || currentBlock.type === 'bullet-list') {
|
|
833
|
-
if (currentBlock.
|
|
834
|
-
const firstListItem = currentBlock.
|
|
822
|
+
if (currentBlock.children) {
|
|
823
|
+
const firstListItem = currentBlock.children[0];
|
|
835
824
|
return this.getBlockFirstNode(firstListItem);
|
|
836
825
|
}
|
|
837
826
|
}
|
|
838
827
|
else {
|
|
839
|
-
if (currentBlock
|
|
840
|
-
return currentBlock[
|
|
828
|
+
if (currentBlock.children) {
|
|
829
|
+
return currentBlock.children[0];
|
|
841
830
|
}
|
|
842
831
|
}
|
|
843
832
|
}
|
|
@@ -848,13 +837,13 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
848
837
|
* @returns {Nullable<RTEBlock>} The next block if existing
|
|
849
838
|
*/
|
|
850
839
|
getNextBlock(currentBlock) {
|
|
851
|
-
if (currentBlock && currentBlock.parent && currentBlock.parent
|
|
852
|
-
const currentBlockIndex = currentBlock.parent
|
|
853
|
-
if (currentBlock.parent[
|
|
854
|
-
return currentBlock.parent[
|
|
840
|
+
if (currentBlock && currentBlock.parent && currentBlock.parent.children) {
|
|
841
|
+
const currentBlockIndex = currentBlock.parent.children.indexOf(currentBlock);
|
|
842
|
+
if (currentBlock.parent.children[currentBlockIndex + 1]) {
|
|
843
|
+
return currentBlock.parent.children[currentBlockIndex + 1];
|
|
855
844
|
}
|
|
856
845
|
else if (currentBlock.type === 'list-item' &&
|
|
857
|
-
currentBlock.parent.
|
|
846
|
+
currentBlock.parent.children.length === currentBlockIndex + 1) {
|
|
858
847
|
return this.getNextBlock(currentBlock.parent);
|
|
859
848
|
}
|
|
860
849
|
}
|
|
@@ -883,9 +872,9 @@ class BlockMergeNodesStrategy extends ActionHandleStrategy {
|
|
|
883
872
|
handleAction(action, target) {
|
|
884
873
|
const anotherBlock = action.blockNeedToBeMerged;
|
|
885
874
|
if (target.type === anotherBlock.type || (target.type !== 'image' && anotherBlock.type !== 'image')) {
|
|
886
|
-
let shouldMergeNodes = anotherBlock
|
|
887
|
-
if (anotherBlock
|
|
888
|
-
shouldMergeNodes = anotherBlock
|
|
875
|
+
let shouldMergeNodes = anotherBlock.children;
|
|
876
|
+
if (anotherBlock.type !== 'image') {
|
|
877
|
+
shouldMergeNodes = anotherBlock.children.filter((node) => node.text);
|
|
889
878
|
}
|
|
890
879
|
target.apply(new AppendChildNodesAction(shouldMergeNodes));
|
|
891
880
|
anotherBlock.parent.apply(new RemoveChildAction(anotherBlock));
|
|
@@ -905,9 +894,9 @@ class BlockRemoveNodeStrategy extends ActionHandleStrategy {
|
|
|
905
894
|
* @param {RTEBlockWithNodes} target - The parent block of the node that will be removed.
|
|
906
895
|
*/
|
|
907
896
|
handleAction(action, target) {
|
|
908
|
-
const arrayFixed = target.
|
|
909
|
-
target.
|
|
910
|
-
if (target.
|
|
897
|
+
const arrayFixed = target.children;
|
|
898
|
+
target.children = arrayFixed.filter((node) => node !== action.entityToBeRemoved);
|
|
899
|
+
if (target.children.length === 0 && target.parent) {
|
|
911
900
|
target.parent.apply(new RemoveChildAction(target));
|
|
912
901
|
}
|
|
913
902
|
}
|
|
@@ -926,11 +915,11 @@ class BlockAppendNodesStrategy extends ActionHandleStrategy {
|
|
|
926
915
|
handleAction(action, target) {
|
|
927
916
|
const nodesToBeAppended = action.entityToBeAppended;
|
|
928
917
|
nodesToBeAppended.forEach((node) => {
|
|
929
|
-
node.
|
|
918
|
+
node.parent = target;
|
|
930
919
|
});
|
|
931
920
|
// This line is used to fix the typescript error `This expression is not callable`. https://github.com/microsoft/TypeScript/issues/44373
|
|
932
|
-
const arrayFixed = target.
|
|
933
|
-
target.
|
|
921
|
+
const arrayFixed = target.children;
|
|
922
|
+
target.children = arrayFixed.concat(nodesToBeAppended);
|
|
934
923
|
}
|
|
935
924
|
}
|
|
936
925
|
|
|
@@ -945,7 +934,7 @@ class BlockReplaceNodesStrategy extends ActionHandleStrategy {
|
|
|
945
934
|
* @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
|
|
946
935
|
*/
|
|
947
936
|
handleAction(action, target) {
|
|
948
|
-
target.
|
|
937
|
+
target.children = [];
|
|
949
938
|
target.apply(new AppendChildNodesAction(action.newChildNodes));
|
|
950
939
|
}
|
|
951
940
|
}
|
|
@@ -1589,7 +1578,7 @@ class NodeSplitTextStrategy extends ActionHandleStrategy {
|
|
|
1589
1578
|
if (action instanceof TextSplittableAction && action.doSplit && selectionRangeAnnotation) {
|
|
1590
1579
|
const { startContainer, endContainer, startOffset, endOffset } = selectionRangeAnnotation.range;
|
|
1591
1580
|
const noTextRangeSelected = startContainer === endContainer && startOffset === endOffset;
|
|
1592
|
-
target.
|
|
1581
|
+
target.parent.children = target.parent.children.flatMap((item) => {
|
|
1593
1582
|
if (item.id === target.id) {
|
|
1594
1583
|
if (noTextRangeSelected) {
|
|
1595
1584
|
return this.insertNewNode(startOffset, target);
|
|
@@ -1823,7 +1812,7 @@ class NodeUpdateAnnotationMapStrategy extends ActionHandleStrategy {
|
|
|
1823
1812
|
if (isNonNullable(action.newText)) {
|
|
1824
1813
|
target.text = action.newText;
|
|
1825
1814
|
}
|
|
1826
|
-
target.
|
|
1815
|
+
target.parent.apply(new LinkGroupAnnotationAction(action.link.groupKey, [target]));
|
|
1827
1816
|
}
|
|
1828
1817
|
if (action instanceof CodeAnnotationAction) {
|
|
1829
1818
|
this.handleAction(new ClearFormattingAnnotationAction(), target);
|
|
@@ -1841,7 +1830,7 @@ class RTETextNode extends RTENode {
|
|
|
1841
1830
|
constructor(id, text, parentBlock, annotationMap) {
|
|
1842
1831
|
super(id, annotationMap);
|
|
1843
1832
|
this.type = NodeTypeEnum.TEXT;
|
|
1844
|
-
this.
|
|
1833
|
+
this.parent = parentBlock;
|
|
1845
1834
|
this.text = text;
|
|
1846
1835
|
}
|
|
1847
1836
|
/**
|
|
@@ -1910,13 +1899,13 @@ class RTETextNode extends RTENode {
|
|
|
1910
1899
|
* @returns {RTETextNode} An new RTETextNode
|
|
1911
1900
|
*/
|
|
1912
1901
|
cloneWithText(text) {
|
|
1913
|
-
return new RTETextNode(generateUUID(), text, this.
|
|
1902
|
+
return new RTETextNode(generateUUID(), text, this.parent, super.cloneAnnotations());
|
|
1914
1903
|
}
|
|
1915
1904
|
/**
|
|
1916
1905
|
* @inheritDoc
|
|
1917
1906
|
*/
|
|
1918
1907
|
clone() {
|
|
1919
|
-
return new RTETextNode(this.id, this.text, this.
|
|
1908
|
+
return new RTETextNode(this.id, this.text, this.parent, super.cloneAnnotations());
|
|
1920
1909
|
}
|
|
1921
1910
|
/**
|
|
1922
1911
|
* Checks if a node is empty
|
|
@@ -1943,7 +1932,7 @@ class RTETextNode extends RTENode {
|
|
|
1943
1932
|
else {
|
|
1944
1933
|
this.applyActionToNode(this, action);
|
|
1945
1934
|
}
|
|
1946
|
-
this.
|
|
1935
|
+
this.parent.mergeNodes(action);
|
|
1947
1936
|
}
|
|
1948
1937
|
/**
|
|
1949
1938
|
* @inheritDoc
|
|
@@ -2125,14 +2114,14 @@ class BlockUpdateTextStyleStrategy extends ActionHandleStrategy {
|
|
|
2125
2114
|
target.type = action.textStyle;
|
|
2126
2115
|
}
|
|
2127
2116
|
if (action.bold) {
|
|
2128
|
-
target.
|
|
2117
|
+
target.children.forEach((node) => {
|
|
2129
2118
|
const boldAnnotationAction = new BoldAnnotationAction(true);
|
|
2130
2119
|
boldAnnotationAction.doSplit = false;
|
|
2131
2120
|
node.apply(boldAnnotationAction);
|
|
2132
2121
|
});
|
|
2133
2122
|
}
|
|
2134
2123
|
else {
|
|
2135
|
-
target.
|
|
2124
|
+
target.children.forEach((node) => {
|
|
2136
2125
|
node.apply(new DeleteNodeAnnotationAction(NodeAnnotationTypeEnum.BOLD));
|
|
2137
2126
|
});
|
|
2138
2127
|
}
|
|
@@ -2181,10 +2170,10 @@ class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy {
|
|
|
2181
2170
|
if (splitNode) {
|
|
2182
2171
|
const beforeText = splitNode.text.slice(0, startOffsetOfNode);
|
|
2183
2172
|
const afterText = splitNode.text.slice(startOffsetOfNode);
|
|
2184
|
-
const nodesSplitIndex = textBlock.
|
|
2173
|
+
const nodesSplitIndex = textBlock.children.indexOf(splitNode);
|
|
2185
2174
|
if (nodesSplitIndex > -1) {
|
|
2186
|
-
const beforeNodes = textBlock.
|
|
2187
|
-
const afterNodes = textBlock.
|
|
2175
|
+
const beforeNodes = textBlock.children.slice(0, nodesSplitIndex);
|
|
2176
|
+
const afterNodes = textBlock.children.slice(nodesSplitIndex + 1);
|
|
2188
2177
|
if (beforeText) {
|
|
2189
2178
|
beforeNodes.push(splitNode.cloneWithText(beforeText));
|
|
2190
2179
|
}
|
|
@@ -2273,10 +2262,10 @@ class BlockInsertLineBreakStrategy extends ActionHandleStrategy {
|
|
|
2273
2262
|
const lineBreakNode = new RTETextNode(generateUUID(), '\n', target);
|
|
2274
2263
|
const beforeText = splitNode.text.slice(0, startOffsetOfNode);
|
|
2275
2264
|
const afterText = splitNode.text.slice(startOffsetOfNode);
|
|
2276
|
-
const nodesSplitIndex = target.
|
|
2265
|
+
const nodesSplitIndex = target.children.indexOf(splitNode);
|
|
2277
2266
|
if (nodesSplitIndex > -1) {
|
|
2278
|
-
const beforeNodes = target.
|
|
2279
|
-
const afterNodes = target.
|
|
2267
|
+
const beforeNodes = target.children.slice(0, nodesSplitIndex);
|
|
2268
|
+
const afterNodes = target.children.slice(nodesSplitIndex + 1);
|
|
2280
2269
|
if (beforeText) {
|
|
2281
2270
|
beforeNodes.push(splitNode.cloneWithText(beforeText));
|
|
2282
2271
|
}
|
|
@@ -2322,7 +2311,7 @@ class BlockInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy {
|
|
|
2322
2311
|
* @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
|
|
2323
2312
|
*/
|
|
2324
2313
|
lineBreakMultipleBlocks(selectedBlocks, target) {
|
|
2325
|
-
const beforeNodes = target.
|
|
2314
|
+
const beforeNodes = target.children;
|
|
2326
2315
|
const lineBreakNode = new RTETextNode(generateUUID(), '\n', target);
|
|
2327
2316
|
const afterNodes = this.concatBlocksNodes(selectedBlocks.slice(1));
|
|
2328
2317
|
this.mergeLineBreakNodes(beforeNodes, lineBreakNode, afterNodes, target);
|
|
@@ -2338,7 +2327,7 @@ class BlockInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy {
|
|
|
2338
2327
|
const nodes = [];
|
|
2339
2328
|
blocks.map((block) => {
|
|
2340
2329
|
if (block.type !== 'image') {
|
|
2341
|
-
nodes.push(...block
|
|
2330
|
+
nodes.push(...block.children);
|
|
2342
2331
|
block.parent.apply(new RemoveChildAction(block));
|
|
2343
2332
|
}
|
|
2344
2333
|
});
|
|
@@ -2403,8 +2392,8 @@ class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2403
2392
|
else {
|
|
2404
2393
|
const previousNode = this.getPreviousNode(startContainerNode);
|
|
2405
2394
|
// Remove the last character will not delete paragraph, the paragraph will removed after press delete again
|
|
2406
|
-
if ((previousNode && previousNode.
|
|
2407
|
-
target.
|
|
2395
|
+
if ((previousNode && previousNode.parent === target && previousNode['text'] === '\n') ||
|
|
2396
|
+
target.children.length === 1) {
|
|
2408
2397
|
action.previousNode = startContainerNode;
|
|
2409
2398
|
return;
|
|
2410
2399
|
}
|
|
@@ -2418,12 +2407,12 @@ class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2418
2407
|
else {
|
|
2419
2408
|
let previousNode = this.getPreviousNode(startContainerNode);
|
|
2420
2409
|
let nextNode = null;
|
|
2421
|
-
if (target.
|
|
2410
|
+
if (target.children.length && previousNode && previousNode.parent !== target) {
|
|
2422
2411
|
if (startContainerNode.isEmpty()) {
|
|
2423
2412
|
target.apply(new RemoveChildAction(startContainerNode));
|
|
2424
2413
|
}
|
|
2425
|
-
if (target.type === previousNode.
|
|
2426
|
-
previousNode.
|
|
2414
|
+
if (target.type === previousNode.parent.type) {
|
|
2415
|
+
previousNode.parent.apply(new MergeTwoBlocksNodesAction(target));
|
|
2427
2416
|
}
|
|
2428
2417
|
}
|
|
2429
2418
|
else {
|
|
@@ -2450,14 +2439,14 @@ class BlockDeleteTextContentStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2450
2439
|
if (previousNode instanceof RTETextNode && previousNode.isEmpty()) {
|
|
2451
2440
|
const shouldRemoveNode = previousNode;
|
|
2452
2441
|
previousNode = this.getPreviousNode(previousNode);
|
|
2453
|
-
shouldRemoveNode.
|
|
2442
|
+
shouldRemoveNode.parent.apply(new RemoveChildAction(shouldRemoveNode));
|
|
2454
2443
|
if (!previousNode) {
|
|
2455
2444
|
nextNode = startContainerNode;
|
|
2456
2445
|
}
|
|
2457
2446
|
}
|
|
2458
2447
|
}
|
|
2459
2448
|
//Remove the paragraph block if the content is empty
|
|
2460
|
-
if (target.
|
|
2449
|
+
if (target.children.length === 0) {
|
|
2461
2450
|
target.parent.apply(new RemoveChildAction(target));
|
|
2462
2451
|
}
|
|
2463
2452
|
if (previousNode) {
|
|
@@ -2510,11 +2499,11 @@ class BlockReplaceNodeWithNodesStrategy extends ActionHandleStrategy {
|
|
|
2510
2499
|
* @param {RTENode[]} newNodes - The array of the text node or the image node.
|
|
2511
2500
|
*/
|
|
2512
2501
|
replaceNodeWithNodes(target, referNode, newNodes) {
|
|
2513
|
-
if (target
|
|
2502
|
+
if (target.children) {
|
|
2514
2503
|
newNodes.forEach((node) => {
|
|
2515
|
-
node.
|
|
2504
|
+
node.parent = target;
|
|
2516
2505
|
});
|
|
2517
|
-
target
|
|
2506
|
+
target.children = target.children.flatMap((node) => {
|
|
2518
2507
|
if (node === referNode) {
|
|
2519
2508
|
return newNodes;
|
|
2520
2509
|
}
|
|
@@ -2569,7 +2558,7 @@ class BlockTransformToListStrategy extends ActionHandleStrategy {
|
|
|
2569
2558
|
class RTETextBlock extends RTEBlock {
|
|
2570
2559
|
constructor(id, type) {
|
|
2571
2560
|
super(id);
|
|
2572
|
-
this.
|
|
2561
|
+
this.children = [];
|
|
2573
2562
|
this.type = type;
|
|
2574
2563
|
if (RTETextBlock.isAcceptableTextStyle(type)) {
|
|
2575
2564
|
this.annotationMap = new Map([TextStyleAnnotation.from(type)]);
|
|
@@ -2587,7 +2576,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
2587
2576
|
static from(block) {
|
|
2588
2577
|
const textBlock = new RTETextBlock(block.id, block.type);
|
|
2589
2578
|
const { annotations } = block;
|
|
2590
|
-
textBlock.
|
|
2579
|
+
textBlock.children = block.nodes.map((richText) => RTETextNode.from(richText, textBlock));
|
|
2591
2580
|
if (annotations) {
|
|
2592
2581
|
Object.entries(annotations).forEach(([type, value]) => {
|
|
2593
2582
|
const item = this.createAnnotationEntity(type, value);
|
|
@@ -2643,7 +2632,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
2643
2632
|
* @param {AnnotationAction} action - AnnotationAction
|
|
2644
2633
|
*/
|
|
2645
2634
|
mergeNodes(action) {
|
|
2646
|
-
this.
|
|
2635
|
+
this.children = this.children.reduce((prev, cur) => {
|
|
2647
2636
|
const lastNode = prev.at(-1);
|
|
2648
2637
|
if (action instanceof LinkAnnotationAction && action.needMergeNode) {
|
|
2649
2638
|
const lastNodeLinkAnnotation = lastNode === null || lastNode === void 0 ? void 0 : lastNode.getAnnotationByType(NodeAnnotationTypeEnum.LINK);
|
|
@@ -2662,7 +2651,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
2662
2651
|
* @inheritDoc
|
|
2663
2652
|
*/
|
|
2664
2653
|
toJSON() {
|
|
2665
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, nodes: this.
|
|
2654
|
+
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, nodes: this.children.map((node) => node.toJSON()) });
|
|
2666
2655
|
}
|
|
2667
2656
|
/**
|
|
2668
2657
|
* Clone the nodes to a new block
|
|
@@ -2672,7 +2661,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
2672
2661
|
*/
|
|
2673
2662
|
cloneWithNodes(nodes) {
|
|
2674
2663
|
const block = new RTETextBlock(generateUUID(), this.type);
|
|
2675
|
-
block.
|
|
2664
|
+
block.children = [];
|
|
2676
2665
|
block.apply(new AppendChildNodesAction(nodes));
|
|
2677
2666
|
return block;
|
|
2678
2667
|
}
|
|
@@ -2681,9 +2670,9 @@ class RTETextBlock extends RTEBlock {
|
|
|
2681
2670
|
*/
|
|
2682
2671
|
clone() {
|
|
2683
2672
|
const clonedBlock = new RTETextBlock(this.id, this.type);
|
|
2684
|
-
clonedBlock.
|
|
2673
|
+
clonedBlock.children = this.children.map((node) => {
|
|
2685
2674
|
const clonedNode = node.clone();
|
|
2686
|
-
clonedNode.
|
|
2675
|
+
clonedNode.parent = clonedBlock;
|
|
2687
2676
|
return clonedNode;
|
|
2688
2677
|
});
|
|
2689
2678
|
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
@@ -2694,13 +2683,13 @@ class RTETextBlock extends RTEBlock {
|
|
|
2694
2683
|
* @inheritDoc
|
|
2695
2684
|
*/
|
|
2696
2685
|
isNotEmpty() {
|
|
2697
|
-
return this.
|
|
2686
|
+
return this.children.length > 0 && this.children.some((node) => !node.isEmpty());
|
|
2698
2687
|
}
|
|
2699
2688
|
/**
|
|
2700
2689
|
* @inheritDoc
|
|
2701
2690
|
*/
|
|
2702
2691
|
getLastNode() {
|
|
2703
|
-
return this.
|
|
2692
|
+
return this.children[this.children.length - 1];
|
|
2704
2693
|
}
|
|
2705
2694
|
/**
|
|
2706
2695
|
* Create new empty paragraph.
|
|
@@ -2745,7 +2734,7 @@ class CodeBlockRemoveSelfStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2745
2734
|
* @inheritDoc
|
|
2746
2735
|
*/
|
|
2747
2736
|
handleAction(_action, target) {
|
|
2748
|
-
const node = target.
|
|
2737
|
+
const node = target.children[0];
|
|
2749
2738
|
const parent = target.parent;
|
|
2750
2739
|
if (parent) {
|
|
2751
2740
|
let focusNode = this.getPreviousNode(node);
|
|
@@ -2758,14 +2747,14 @@ class CodeBlockRemoveSelfStrategy extends BlockDeleteNodeContentStrategy {
|
|
|
2758
2747
|
const focusElement = focusNode
|
|
2759
2748
|
? stateEntityRenderingRegistry.getDOMByEntity(focusNode)
|
|
2760
2749
|
: null;
|
|
2761
|
-
if (parent.
|
|
2750
|
+
if (parent.children.length === 0) {
|
|
2762
2751
|
const defaultParagraph = RTETextBlock.from({
|
|
2763
2752
|
id: generateUUID(),
|
|
2764
2753
|
type: 'paragraph',
|
|
2765
2754
|
nodes: [{ id: generateUUID(), type: 'text', text: '' }],
|
|
2766
2755
|
});
|
|
2767
2756
|
target.parent.apply(new AppendChildNodesAction([defaultParagraph]));
|
|
2768
|
-
focusNode = defaultParagraph.
|
|
2757
|
+
focusNode = defaultParagraph.children[0];
|
|
2769
2758
|
offset = 0;
|
|
2770
2759
|
}
|
|
2771
2760
|
this.notifyUpdateSelection(focusNode, focusElement, offset, target);
|
|
@@ -2833,7 +2822,7 @@ class SwitchOutFromCodeBlockStrategy extends ActionHandleStrategy {
|
|
|
2833
2822
|
const textArray = content.split('\n');
|
|
2834
2823
|
const updateAction = new UpdateCodeBlockAction(textArray.slice(0, textArray.length - 2).join('\n'), language);
|
|
2835
2824
|
updateAction.isFlushable = false;
|
|
2836
|
-
target.
|
|
2825
|
+
target.children[0].apply(updateAction);
|
|
2837
2826
|
const textBlock = RTETextBlock.from({
|
|
2838
2827
|
id: generateUUID(),
|
|
2839
2828
|
type: 'paragraph',
|
|
@@ -2845,7 +2834,7 @@ class SwitchOutFromCodeBlockStrategy extends ActionHandleStrategy {
|
|
|
2845
2834
|
if (currentNodeDom) {
|
|
2846
2835
|
const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, VegaInternalRichTextEditorSelectionRangeChange);
|
|
2847
2836
|
if (nodeSubject) {
|
|
2848
|
-
ChangeManager.notify(nodeSubject, { node: textBlock.
|
|
2837
|
+
ChangeManager.notify(nodeSubject, { node: textBlock.children[0] });
|
|
2849
2838
|
}
|
|
2850
2839
|
}
|
|
2851
2840
|
}
|
|
@@ -2906,7 +2895,7 @@ class RTECodeBlockNode extends RTENode {
|
|
|
2906
2895
|
this.text = '';
|
|
2907
2896
|
this.annotationMap = new Map();
|
|
2908
2897
|
this.text = content;
|
|
2909
|
-
this.
|
|
2898
|
+
this.parent = parentBlock;
|
|
2910
2899
|
this.language = language;
|
|
2911
2900
|
}
|
|
2912
2901
|
/**
|
|
@@ -2921,7 +2910,7 @@ class RTECodeBlockNode extends RTENode {
|
|
|
2921
2910
|
* @inheritDoc
|
|
2922
2911
|
*/
|
|
2923
2912
|
clone() {
|
|
2924
|
-
return new RTECodeBlockNode(this.id, this.text, this.language, this.
|
|
2913
|
+
return new RTECodeBlockNode(this.id, this.text, this.language, this.parent);
|
|
2925
2914
|
}
|
|
2926
2915
|
/**
|
|
2927
2916
|
* @inheritDoc
|
|
@@ -2964,7 +2953,7 @@ class RTECodeBlock extends RTEBlock {
|
|
|
2964
2953
|
constructor(id, content, language) {
|
|
2965
2954
|
super(id);
|
|
2966
2955
|
this.type = 'code-block';
|
|
2967
|
-
this.
|
|
2956
|
+
this.children = [new RTECodeBlockNode(`${id}-1`, content, language, this)];
|
|
2968
2957
|
}
|
|
2969
2958
|
/**
|
|
2970
2959
|
* Converts a VegaRTECodeBlock into an RTECodeBlock.
|
|
@@ -2979,7 +2968,7 @@ class RTECodeBlock extends RTEBlock {
|
|
|
2979
2968
|
* @inheritDoc
|
|
2980
2969
|
*/
|
|
2981
2970
|
toJSON() {
|
|
2982
|
-
const { language, text } = this.
|
|
2971
|
+
const { language, text } = this.children[0];
|
|
2983
2972
|
return {
|
|
2984
2973
|
id: this.id,
|
|
2985
2974
|
type: 'code-block',
|
|
@@ -3018,13 +3007,13 @@ class RTECodeBlock extends RTEBlock {
|
|
|
3018
3007
|
* @inheritDoc
|
|
3019
3008
|
*/
|
|
3020
3009
|
isNotEmpty() {
|
|
3021
|
-
return !!this.
|
|
3010
|
+
return !!this.children.length;
|
|
3022
3011
|
}
|
|
3023
3012
|
/**
|
|
3024
3013
|
* @inheritDoc
|
|
3025
3014
|
*/
|
|
3026
3015
|
getLastNode() {
|
|
3027
|
-
return this.
|
|
3016
|
+
return this.children[0];
|
|
3028
3017
|
}
|
|
3029
3018
|
/**
|
|
3030
3019
|
* The code block is selected or not.
|
|
@@ -3032,7 +3021,7 @@ class RTECodeBlock extends RTEBlock {
|
|
|
3032
3021
|
* @returns {boolean} - The boolean result.
|
|
3033
3022
|
*/
|
|
3034
3023
|
isSelected() {
|
|
3035
|
-
return this.
|
|
3024
|
+
return this.children[0].annotationMap.has(InternalAnnotationTypeEnum.SELECTION_RANGE);
|
|
3036
3025
|
}
|
|
3037
3026
|
}
|
|
3038
3027
|
(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { M as MapToComponentMethod, V as VegaSlimmer, L as LogUtility, c as MapToComponentField } from './global-slimmer-registry-17c4efd4.js';
|
|
2
2
|
import { d as debounce } from './timer-9321173b.js';
|
|
3
|
-
import { v as RTENode, w as stateEntityRenderingRegistry, a as RTEImageNode, G as RTECodeBlockNode, g as RTETextNode, Z as ZERO_WIDTH_SPACE, D as SelectionChangeAction, z as InternalAnnotationTypeEnum, u as RTECodeBlock } from './code-block-
|
|
3
|
+
import { v as RTENode, w as stateEntityRenderingRegistry, a as RTEImageNode, G as RTECodeBlockNode, g as RTETextNode, Z as ZERO_WIDTH_SPACE, D as SelectionChangeAction, z as InternalAnnotationTypeEnum, u as RTECodeBlock } from './code-block-1cdb0599.js';
|
|
4
4
|
import { g as getActiveElement } from './component-7d906393.js';
|
|
5
5
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
6
6
|
import { d as domNodeSubjectFactory } from './dom-node-subject-factory-6374611f.js';
|
|
@@ -622,7 +622,7 @@ class SelectionController extends AutoRunWhenReRenderTaskQueueSlimmer {
|
|
|
622
622
|
const nodeEntity = stateEntityRenderingRegistry.getEntityByDOM(entityElement);
|
|
623
623
|
if (nodeEntity instanceof RTECodeBlock) {
|
|
624
624
|
if (this.internalCodeBlockSelectionController.isCodeBlockSelected(nodeEntity, range)) {
|
|
625
|
-
selectedNodes.push(nodeEntity.
|
|
625
|
+
selectedNodes.push(nodeEntity.children[0]);
|
|
626
626
|
}
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
@@ -635,11 +635,11 @@ class SelectionController extends AutoRunWhenReRenderTaskQueueSlimmer {
|
|
|
635
635
|
};
|
|
636
636
|
filterNode(commonAncestor);
|
|
637
637
|
selectedNodes.forEach((node) => {
|
|
638
|
-
if (this.selectionMap.has(node.
|
|
639
|
-
this.selectionMap.get(node.
|
|
638
|
+
if (this.selectionMap.has(node.parent)) {
|
|
639
|
+
this.selectionMap.get(node.parent).push(node);
|
|
640
640
|
}
|
|
641
641
|
else {
|
|
642
|
-
this.selectionMap.set(node.
|
|
642
|
+
this.selectionMap.set(node.parent, [node]);
|
|
643
643
|
}
|
|
644
644
|
});
|
|
645
645
|
this.getSelectedNodes().forEach((node) => node.apply(new SelectionChangeAction(range)));
|