@globalpayments/vega 2.55.0 → 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 +12 -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/types-a4295b11.js +12 -0
- 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-checkbox_2.cjs.entry.js +4 -1
- package/dist/cjs/vega-chip.cjs.entry.js +4 -4
- package/dist/cjs/vega-code-block.cjs.entry.js +6 -16
- 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 +13 -10
- 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-radio_2.cjs.entry.js +4 -1
- 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-checkbox/vega-checkbox.js +4 -1
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-scrollable-controller.js +6 -4
- 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-radio/vega-radio.js +4 -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/collection/types/public-api.js +1 -0
- 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 +6 -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/types-0cadfd73.js +12 -0
- 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-checkbox_2.entry.js +4 -1
- package/dist/esm/vega-chip.entry.js +4 -4
- package/dist/esm/vega-code-block.entry.js +3 -13
- 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 +13 -10
- 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-radio_2.entry.js +4 -1
- 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/types/types/public-api.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-46eb330f.entry.js +1 -0
- 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-5f86a286.entry.js +1 -0
- 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-e66f6b59.entry.js → p-81e56716.entry.js} +2 -2
- 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-c9f544bd.entry.js +1 -0
- package/dist/vega/p-d1cb7f28.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 +6 -2
- package/dist/vega/p-29262ad6.entry.js +0 -1
- package/dist/vega/p-3eb2d433.js +0 -1
- package/dist/vega/p-3fa7d356.js +0 -1
- package/dist/vega/p-468bf93a.entry.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-e8b56d3f.entry.js +0 -1
- package/dist/vega/p-ec3495de.entry.js +0 -1
- package/dist/vega/p-fecb4044.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const codeBlock = require('./code-block-
|
|
3
|
+
const codeBlock = require('./code-block-e56c5216.js');
|
|
4
4
|
const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
5
5
|
const createPublicApiRuntimeMetricsSlimmer = require('./create-public-api-runtime-metrics-slimmer-a3d17afb.js');
|
|
6
6
|
|
|
@@ -30,7 +30,7 @@ class BlockDeleteImageStrategy extends codeBlock.BlockDeleteNodeContentStrategy
|
|
|
30
30
|
if (this.isContentFirstNode(startContainerNode)) {
|
|
31
31
|
nextNode = this.getNextNode(startContainerNode);
|
|
32
32
|
}
|
|
33
|
-
if (parentBlock.
|
|
33
|
+
if (parentBlock.children.length === 1) {
|
|
34
34
|
parentBlock.parent.apply(new codeBlock.RemoveChildAction(parentBlock));
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
@@ -41,7 +41,7 @@ class BlockDeleteImageStrategy extends codeBlock.BlockDeleteNodeContentStrategy
|
|
|
41
41
|
const shouldRemoveNode = previousNode;
|
|
42
42
|
if (shouldRemoveNode && shouldRemoveNode instanceof codeBlock.RTEImageNode) {
|
|
43
43
|
previousNode = this.getPreviousNode(shouldRemoveNode);
|
|
44
|
-
shouldRemoveNode.
|
|
44
|
+
shouldRemoveNode.parent.apply(new codeBlock.RemoveChildAction(shouldRemoveNode));
|
|
45
45
|
if (!previousNode) {
|
|
46
46
|
action.nextNode = startContainerNode;
|
|
47
47
|
}
|
|
@@ -76,10 +76,10 @@ class BlockSplitWithImageNodeStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
76
76
|
* @returns {Nullable<RTEBlock>} The new block after split
|
|
77
77
|
*/
|
|
78
78
|
splitImageNodes(imageNode, imageOffset, target) {
|
|
79
|
-
const nodesSplitIndex = target.
|
|
79
|
+
const nodesSplitIndex = target.children.indexOf(imageNode);
|
|
80
80
|
if (nodesSplitIndex > -1) {
|
|
81
|
-
const beforeNodes = target.
|
|
82
|
-
const afterNodes = target.
|
|
81
|
+
const beforeNodes = target.children.slice(0, nodesSplitIndex + imageOffset);
|
|
82
|
+
const afterNodes = target.children.slice(nodesSplitIndex + imageOffset);
|
|
83
83
|
target.apply(new codeBlock.ReplaceChildNodesAction(beforeNodes));
|
|
84
84
|
const newBlock = this.cloneWithNodes(afterNodes, target);
|
|
85
85
|
target.parent.apply(new codeBlock.InsertBlocksAfterAction(target, newBlock));
|
|
@@ -95,7 +95,7 @@ class BlockSplitWithImageNodeStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
95
95
|
*/
|
|
96
96
|
cloneWithNodes(nodes, target) {
|
|
97
97
|
const block = target.createNewImageBlock();
|
|
98
|
-
block.
|
|
98
|
+
block.children = [];
|
|
99
99
|
block.apply(new codeBlock.AppendChildNodesAction(nodes));
|
|
100
100
|
return block;
|
|
101
101
|
}
|
|
@@ -171,7 +171,7 @@ class ImageInsertLineBreakStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
171
171
|
target.apply(insertNewParagraphAction);
|
|
172
172
|
const newBlock = insertNewParagraphAction.newBlock;
|
|
173
173
|
if (newBlock) {
|
|
174
|
-
action.lineBreakNode = newBlock.
|
|
174
|
+
action.lineBreakNode = newBlock.children[0];
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -205,7 +205,7 @@ class ImageInsertLineBreakWithBlocksStrategy extends codeBlock.ActionHandleStrat
|
|
|
205
205
|
afterNodes.push(new codeBlock.RTETextNode(createPublicApiRuntimeMetricsSlimmer.generateUUID(), '\n', newParagraph));
|
|
206
206
|
}
|
|
207
207
|
newParagraph.apply(new codeBlock.AppendChildNodesAction(afterNodes));
|
|
208
|
-
return newParagraph['
|
|
208
|
+
return newParagraph['children'][0];
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
211
211
|
* Concat the child nodes of multiple RTEBlocks if both are not images.
|
|
@@ -217,7 +217,7 @@ class ImageInsertLineBreakWithBlocksStrategy extends codeBlock.ActionHandleStrat
|
|
|
217
217
|
const nodes = [];
|
|
218
218
|
blocks.map((block) => {
|
|
219
219
|
if (block.type !== 'image') {
|
|
220
|
-
nodes.push(...block
|
|
220
|
+
nodes.push(...block.children);
|
|
221
221
|
block.parent.apply(new codeBlock.RemoveChildAction(block));
|
|
222
222
|
}
|
|
223
223
|
});
|
|
@@ -236,8 +236,8 @@ class ImageBlockInsertImageStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
236
236
|
const splitNode = action.splitPointNode;
|
|
237
237
|
const startOffsetOfNode = action.startOffsetOfNode;
|
|
238
238
|
const newImageBlock = action.imageBlockToBeInserted;
|
|
239
|
-
const newImageNodes = newImageBlock.
|
|
240
|
-
if (target.
|
|
239
|
+
const newImageNodes = newImageBlock.children;
|
|
240
|
+
if (target.children.length < 1) {
|
|
241
241
|
target.apply(new codeBlock.AppendChildNodesAction(newImageNodes));
|
|
242
242
|
}
|
|
243
243
|
else if (this.isCaretPositionAtImageBlockEnd(target, splitNode, startOffsetOfNode)) {
|
|
@@ -274,7 +274,7 @@ class RTEImageBlock extends codeBlock.RTEBlock {
|
|
|
274
274
|
constructor(id) {
|
|
275
275
|
super(id);
|
|
276
276
|
this.type = 'image';
|
|
277
|
-
this.
|
|
277
|
+
this.children = [];
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
280
|
* Converts a VegaRTEImageBlock object into an RTEImageBlock object by mapping nodes and creating annotations.
|
|
@@ -285,7 +285,7 @@ class RTEImageBlock extends codeBlock.RTEBlock {
|
|
|
285
285
|
static from(block) {
|
|
286
286
|
const imageBlock = new RTEImageBlock(block.id);
|
|
287
287
|
const { annotations } = block;
|
|
288
|
-
imageBlock.
|
|
288
|
+
imageBlock.children = block.nodes.map((image) => codeBlock.RTEImageNode.from(image, imageBlock));
|
|
289
289
|
if (annotations) {
|
|
290
290
|
Object.entries(annotations).forEach(([type, value]) => {
|
|
291
291
|
const item = this.createAnnotationEntity(type, value);
|
|
@@ -300,19 +300,19 @@ class RTEImageBlock extends codeBlock.RTEBlock {
|
|
|
300
300
|
* @inheritDoc
|
|
301
301
|
*/
|
|
302
302
|
toJSON() {
|
|
303
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: 'image', nodes: this.
|
|
303
|
+
return Object.assign(Object.assign({}, super.toJSON()), { type: 'image', nodes: this.children.map((node) => node.toJSON()) });
|
|
304
304
|
}
|
|
305
305
|
/**
|
|
306
306
|
* @inheritDoc
|
|
307
307
|
*/
|
|
308
308
|
isNotEmpty() {
|
|
309
|
-
return this.
|
|
309
|
+
return this.children.length > 0 && this.children.some((node) => node.url.length > 0);
|
|
310
310
|
}
|
|
311
311
|
/**
|
|
312
312
|
* @inheritDoc
|
|
313
313
|
*/
|
|
314
314
|
getLastNode() {
|
|
315
|
-
return this.
|
|
315
|
+
return this.children[this.children.length - 1];
|
|
316
316
|
}
|
|
317
317
|
/**
|
|
318
318
|
* Create a new image block.
|
|
@@ -327,9 +327,9 @@ class RTEImageBlock extends codeBlock.RTEBlock {
|
|
|
327
327
|
*/
|
|
328
328
|
clone() {
|
|
329
329
|
const clonedBlock = new RTEImageBlock(this.id);
|
|
330
|
-
clonedBlock.
|
|
330
|
+
clonedBlock.children = this.children.map((node) => {
|
|
331
331
|
const clonedNode = node.clone();
|
|
332
|
-
clonedNode.
|
|
332
|
+
clonedNode.parent = clonedBlock;
|
|
333
333
|
return clonedNode;
|
|
334
334
|
});
|
|
335
335
|
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
@@ -365,7 +365,7 @@ class ListItemDeleteTextContentStrategy extends codeBlock.BlockDeleteTextContent
|
|
|
365
365
|
handleAction(action, target) {
|
|
366
366
|
const listBlock = target.parent;
|
|
367
367
|
this.deleteNodeContent(action, target);
|
|
368
|
-
if (listBlock.
|
|
368
|
+
if (listBlock.children.length === 0) {
|
|
369
369
|
listBlock.parent.apply(new codeBlock.RemoveChildAction(listBlock));
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -382,8 +382,8 @@ class ListItemRemoveNodeStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
382
382
|
* @param {RTEListItemBlock} target - The list item block.
|
|
383
383
|
*/
|
|
384
384
|
handleAction(action, target) {
|
|
385
|
-
target.
|
|
386
|
-
if (target.
|
|
385
|
+
target.children = target.children.filter((node) => node !== action.entityToBeRemoved);
|
|
386
|
+
if (target.children.length === 0 && (!target.nestList || !target.nestList.length)) {
|
|
387
387
|
target.parent.apply(new codeBlock.RemoveChildAction(target));
|
|
388
388
|
}
|
|
389
389
|
}
|
|
@@ -400,12 +400,12 @@ class ListItemRemoveNestListStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
400
400
|
* @param {RTEListItemBlock} target - The list item block.
|
|
401
401
|
*/
|
|
402
402
|
handleAction(action, target) {
|
|
403
|
-
if (target.
|
|
404
|
-
if (target.
|
|
405
|
-
target.
|
|
403
|
+
if (target.nestList) {
|
|
404
|
+
if (target.nestList.length > 1) {
|
|
405
|
+
target.nestList = target.nestList.filter((child) => child !== action.nestListBlockToBeRemoved);
|
|
406
406
|
}
|
|
407
407
|
else {
|
|
408
|
-
target.
|
|
408
|
+
target.nestList = undefined;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -422,7 +422,7 @@ class ListItemReplaceNestListStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
422
422
|
action.newList.forEach((listBlock) => {
|
|
423
423
|
listBlock.parent = target;
|
|
424
424
|
});
|
|
425
|
-
target.
|
|
425
|
+
target.nestList = action.newList;
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
|
|
@@ -471,8 +471,8 @@ class ListItemInsertNewParagraphStrategy extends codeBlock.ActionHandleStrategy
|
|
|
471
471
|
* @returns {RTEBlock} Returns a `RTEBlock`.
|
|
472
472
|
*/
|
|
473
473
|
breakListItemAtEnd(newListItem, target) {
|
|
474
|
-
const lastItem = target.parent.
|
|
475
|
-
const currentItemIsEmpty = target.
|
|
474
|
+
const lastItem = target.parent.children[target.parent.children.length - 1];
|
|
475
|
+
const currentItemIsEmpty = target.children.length === 1 && target.children[0].isEmpty();
|
|
476
476
|
if (target === lastItem && currentItemIsEmpty) {
|
|
477
477
|
const parentParent = target.parent.parent;
|
|
478
478
|
if (parentParent['type'] !== 'list-item') {
|
|
@@ -481,7 +481,7 @@ class ListItemInsertNewParagraphStrategy extends codeBlock.ActionHandleStrategy
|
|
|
481
481
|
type: 'paragraph',
|
|
482
482
|
nodes: [],
|
|
483
483
|
});
|
|
484
|
-
newParagraph.apply(new codeBlock.AppendChildNodesAction(newListItem.
|
|
484
|
+
newParagraph.apply(new codeBlock.AppendChildNodesAction(newListItem.children));
|
|
485
485
|
parentParent.apply(new codeBlock.InsertBlocksAfterAction(target.parent, newParagraph));
|
|
486
486
|
target.parent.apply(new codeBlock.RemoveChildAction(target));
|
|
487
487
|
return newParagraph;
|
|
@@ -529,10 +529,16 @@ class ListItemInsertImageStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
529
529
|
* List item block
|
|
530
530
|
*/
|
|
531
531
|
class RTEListItemBlock extends codeBlock.RTETextBlock {
|
|
532
|
-
constructor(id,
|
|
532
|
+
constructor(id, nestList) {
|
|
533
533
|
super(id, 'list-item');
|
|
534
|
-
|
|
535
|
-
|
|
534
|
+
/**
|
|
535
|
+
* TODO: Refactor the list item properties children and nestList, merge two properties together.
|
|
536
|
+
*
|
|
537
|
+
* 1. Update the type of `children` to include `RTEListBlock` as a possible type.
|
|
538
|
+
* 2. The list block children should text block array and nest list block array, The text block should wrap a `li` tag when rendering.
|
|
539
|
+
*/
|
|
540
|
+
this.nestList = [];
|
|
541
|
+
this.nestList = nestList;
|
|
536
542
|
}
|
|
537
543
|
/**
|
|
538
544
|
* Converts a VegaRTEListItemBlock object to an RTEListItemBlock
|
|
@@ -542,9 +548,9 @@ class RTEListItemBlock extends codeBlock.RTETextBlock {
|
|
|
542
548
|
*/
|
|
543
549
|
static from(block) {
|
|
544
550
|
const listItemBlock = new RTEListItemBlock(block.id);
|
|
545
|
-
listItemBlock.
|
|
551
|
+
listItemBlock.children = block.nodes.map((richText) => codeBlock.RTETextNode.from(richText, listItemBlock));
|
|
546
552
|
if (block.children) {
|
|
547
|
-
listItemBlock.
|
|
553
|
+
listItemBlock.nestList = block.children.map((child) => {
|
|
548
554
|
const listBlock = RTEListBlock.from(child);
|
|
549
555
|
listBlock.parent = listItemBlock;
|
|
550
556
|
return listBlock;
|
|
@@ -566,14 +572,14 @@ class RTEListItemBlock extends codeBlock.RTETextBlock {
|
|
|
566
572
|
*/
|
|
567
573
|
toJSON() {
|
|
568
574
|
var _a;
|
|
569
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: 'list-item', children: (_a = this.
|
|
575
|
+
return Object.assign(Object.assign({}, super.toJSON()), { type: 'list-item', children: (_a = this.nestList) === null || _a === void 0 ? void 0 : _a.map((block) => block.toJSON()) });
|
|
570
576
|
}
|
|
571
577
|
/**
|
|
572
578
|
* @inheritDoc
|
|
573
579
|
*/
|
|
574
580
|
cloneWithNodes(nodes) {
|
|
575
581
|
const block = new RTEListItemBlock(createPublicApiRuntimeMetricsSlimmer.generateUUID());
|
|
576
|
-
block.
|
|
582
|
+
block.children = [];
|
|
577
583
|
block.apply(new codeBlock.AppendChildNodesAction(nodes));
|
|
578
584
|
return block;
|
|
579
585
|
}
|
|
@@ -581,8 +587,8 @@ class RTEListItemBlock extends codeBlock.RTETextBlock {
|
|
|
581
587
|
* @inheritDoc
|
|
582
588
|
*/
|
|
583
589
|
getLastNode() {
|
|
584
|
-
if (this.
|
|
585
|
-
const childListBlock = this.
|
|
590
|
+
if (this.nestList && this.nestList.length > 0) {
|
|
591
|
+
const childListBlock = this.nestList[this.nestList.length - 1];
|
|
586
592
|
return childListBlock.getLastNode();
|
|
587
593
|
}
|
|
588
594
|
return super.getLastNode();
|
|
@@ -601,13 +607,13 @@ class RTEListItemBlock extends codeBlock.RTETextBlock {
|
|
|
601
607
|
clone() {
|
|
602
608
|
var _a;
|
|
603
609
|
const block = new RTEListItemBlock(this.id);
|
|
604
|
-
block.
|
|
610
|
+
block.children = this.children.map((node) => {
|
|
605
611
|
const clonedNode = node.clone();
|
|
606
|
-
clonedNode.
|
|
612
|
+
clonedNode.parent = block;
|
|
607
613
|
return clonedNode;
|
|
608
614
|
});
|
|
609
615
|
block.annotationMap = super.cloneAnnotations();
|
|
610
|
-
block.
|
|
616
|
+
block.nestList = (_a = this.nestList) === null || _a === void 0 ? void 0 : _a.map((child) => {
|
|
611
617
|
const clonedChild = child.clone();
|
|
612
618
|
clonedChild.parent = block;
|
|
613
619
|
return clonedChild;
|
|
@@ -653,12 +659,12 @@ class BlockInsertBlocksBeforeStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
653
659
|
* @param {RTEBlock[]} blocks - An array of RTEBlock objects that you want to replace the `referBlock` with in the `blocks` array.
|
|
654
660
|
*/
|
|
655
661
|
replaceBlockWithBlocks(target, referBlock, blocks) {
|
|
656
|
-
if (target.
|
|
662
|
+
if (target.children) {
|
|
657
663
|
blocks.forEach((block) => {
|
|
658
664
|
block.parent = target;
|
|
659
665
|
});
|
|
660
|
-
const arrayFixed = target.
|
|
661
|
-
target.
|
|
666
|
+
const arrayFixed = target.children;
|
|
667
|
+
target.children = arrayFixed.flatMap((block) => {
|
|
662
668
|
if (block === referBlock) {
|
|
663
669
|
return blocks;
|
|
664
670
|
}
|
|
@@ -694,12 +700,12 @@ class BlockAppendBlocksStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
694
700
|
*/
|
|
695
701
|
handleAction(action, target) {
|
|
696
702
|
const newBlocks = action.entityToBeAppended;
|
|
697
|
-
if (target.
|
|
703
|
+
if (target.children) {
|
|
698
704
|
newBlocks.forEach((block) => {
|
|
699
705
|
block.parent = target;
|
|
700
706
|
});
|
|
701
|
-
const arrayFixed = target.
|
|
702
|
-
target.
|
|
707
|
+
const arrayFixed = target.children;
|
|
708
|
+
target.children = arrayFixed.concat(newBlocks);
|
|
703
709
|
}
|
|
704
710
|
}
|
|
705
711
|
}
|
|
@@ -726,8 +732,8 @@ class BlockRemoveChildBlockStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
726
732
|
*/
|
|
727
733
|
handleAction(action, target) {
|
|
728
734
|
const blockToBeRemoved = action.entityToBeRemoved;
|
|
729
|
-
if (target.
|
|
730
|
-
target.
|
|
735
|
+
if (target.children) {
|
|
736
|
+
target.children = target.children.filter((block) => block !== blockToBeRemoved);
|
|
731
737
|
}
|
|
732
738
|
}
|
|
733
739
|
}
|
|
@@ -745,7 +751,7 @@ class ListRemoveListItemStrategy extends BlockRemoveChildBlockStrategy {
|
|
|
745
751
|
handleAction(action, target) {
|
|
746
752
|
super.handleAction(action, target);
|
|
747
753
|
const parent = target.parent;
|
|
748
|
-
if (target.
|
|
754
|
+
if (target.children.length === 0 && parent) {
|
|
749
755
|
// The parent is a list item mean the current block is a nest list, so we need to use RemoveNestListAction to remove the item
|
|
750
756
|
if (parent['type'] === 'list-item') {
|
|
751
757
|
parent.apply(new RemoveNestListAction(target));
|
|
@@ -770,10 +776,10 @@ class ListTransformToListStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
770
776
|
const isSameList = selectedBlocks.every((block) => block.parent === target);
|
|
771
777
|
if (isSameList) {
|
|
772
778
|
// Select one or more list items belonging to the same list, and all items in this list should be updated
|
|
773
|
-
bulletList.apply(new codeBlock.AppendChildNodesAction(target.
|
|
779
|
+
bulletList.apply(new codeBlock.AppendChildNodesAction(target.children));
|
|
774
780
|
target.parent.apply(new codeBlock.InsertBlocksAfterAction(target, bulletList));
|
|
775
781
|
target.parent.apply(new codeBlock.RemoveChildAction(target));
|
|
776
|
-
selectedBlocks.forEach((block) => block.
|
|
782
|
+
selectedBlocks.forEach((block) => block.children.map((node) => node.apply(new codeBlock.SyncUpSelectionAction())));
|
|
777
783
|
}
|
|
778
784
|
else {
|
|
779
785
|
const listItems = action.selectedBlocks.map((block) => target.parent.toListItem(block));
|
|
@@ -782,7 +788,7 @@ class ListTransformToListStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
782
788
|
action.selectedBlocks.forEach((block) => {
|
|
783
789
|
block.parent.apply(new codeBlock.RemoveChildAction(block));
|
|
784
790
|
});
|
|
785
|
-
if (target.
|
|
791
|
+
if (target.children.length === 0) {
|
|
786
792
|
target.parent.apply(new codeBlock.RemoveChildAction(target));
|
|
787
793
|
}
|
|
788
794
|
}
|
|
@@ -801,10 +807,10 @@ class ListTransformToParagraphStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
801
807
|
let isSelectedLastBlock = false;
|
|
802
808
|
const selectedBlocks = action.selectedBlocks;
|
|
803
809
|
const currentParagraph = selectedBlocks.map((block) => {
|
|
804
|
-
block.
|
|
805
|
-
if (block === target.
|
|
810
|
+
block.children.map((node) => node.apply(new codeBlock.SyncUpSelectionAction()));
|
|
811
|
+
if (block === target.children[0])
|
|
806
812
|
isSelectedFirstBlock = true;
|
|
807
|
-
if (block === target.
|
|
813
|
+
if (block === target.children[target.children.length - 1])
|
|
808
814
|
isSelectedLastBlock = true;
|
|
809
815
|
return this.toParagraph(block);
|
|
810
816
|
});
|
|
@@ -815,19 +821,19 @@ class ListTransformToParagraphStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
815
821
|
target.parent.apply(new codeBlock.InsertBlocksAfterAction(target, ...currentParagraph));
|
|
816
822
|
}
|
|
817
823
|
else {
|
|
818
|
-
const startIndex = target.
|
|
819
|
-
const lastIndex = target.
|
|
824
|
+
const startIndex = target.children.indexOf(selectedBlocks[0]);
|
|
825
|
+
const lastIndex = target.children.indexOf(selectedBlocks[selectedBlocks.length - 1]);
|
|
820
826
|
const firstBulletList = target.parent.createList(target.type);
|
|
821
|
-
firstBulletList.apply(new codeBlock.AppendChildNodesAction(target.
|
|
827
|
+
firstBulletList.apply(new codeBlock.AppendChildNodesAction(target.children.slice(0, startIndex)));
|
|
822
828
|
const lastBulletList = target.parent.createList(target.type);
|
|
823
|
-
lastBulletList.apply(new codeBlock.AppendChildNodesAction(target.
|
|
829
|
+
lastBulletList.apply(new codeBlock.AppendChildNodesAction(target.children.slice(lastIndex + 1)));
|
|
824
830
|
target.parent.apply(new codeBlock.InsertBlocksBeforeAction(target, firstBulletList, ...currentParagraph, lastBulletList));
|
|
825
831
|
target.parent.apply(new codeBlock.RemoveChildAction(target));
|
|
826
832
|
}
|
|
827
833
|
selectedBlocks.map((block) => {
|
|
828
834
|
target.apply(new codeBlock.RemoveChildAction(block));
|
|
829
835
|
});
|
|
830
|
-
if (target.
|
|
836
|
+
if (target.children.length === 0) {
|
|
831
837
|
target.parent.apply(new codeBlock.RemoveChildAction(target));
|
|
832
838
|
}
|
|
833
839
|
}
|
|
@@ -839,7 +845,7 @@ class ListTransformToParagraphStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
839
845
|
*/
|
|
840
846
|
toParagraph(block) {
|
|
841
847
|
const textBlock = new codeBlock.RTETextBlock(createPublicApiRuntimeMetricsSlimmer.generateUUID(), 'paragraph');
|
|
842
|
-
textBlock.apply(new codeBlock.AppendChildNodesAction(block['
|
|
848
|
+
textBlock.apply(new codeBlock.AppendChildNodesAction(block['children']));
|
|
843
849
|
textBlock['annotationMap'] = block['annotationMap'];
|
|
844
850
|
return textBlock;
|
|
845
851
|
}
|
|
@@ -873,7 +879,7 @@ class RTEListBlock extends codeBlock.RTEBlock {
|
|
|
873
879
|
constructor(id, type) {
|
|
874
880
|
super(id);
|
|
875
881
|
this.type = 'bullet-list';
|
|
876
|
-
this.
|
|
882
|
+
this.children = [];
|
|
877
883
|
this.type = type;
|
|
878
884
|
}
|
|
879
885
|
/**
|
|
@@ -884,7 +890,7 @@ class RTEListBlock extends codeBlock.RTEBlock {
|
|
|
884
890
|
*/
|
|
885
891
|
static from(block) {
|
|
886
892
|
const listBlock = new RTEListBlock(block.id, block.type);
|
|
887
|
-
listBlock.
|
|
893
|
+
listBlock.children = block.blocks.map((item) => {
|
|
888
894
|
const listItemBlock = RTEListItemBlock.from(item);
|
|
889
895
|
listItemBlock.parent = listBlock;
|
|
890
896
|
return listItemBlock;
|
|
@@ -895,26 +901,26 @@ class RTEListBlock extends codeBlock.RTEBlock {
|
|
|
895
901
|
* @inheritDoc
|
|
896
902
|
*/
|
|
897
903
|
toJSON() {
|
|
898
|
-
return Object.assign(Object.assign({}, super.toJSON()), { id: this.id, type: this.type, blocks: this.
|
|
904
|
+
return Object.assign(Object.assign({}, super.toJSON()), { id: this.id, type: this.type, blocks: this.children.map((block) => block.toJSON()) });
|
|
899
905
|
}
|
|
900
906
|
/**
|
|
901
907
|
* @inheritDoc
|
|
902
908
|
*/
|
|
903
909
|
isNotEmpty() {
|
|
904
|
-
return this.
|
|
910
|
+
return this.children.length > 0;
|
|
905
911
|
}
|
|
906
912
|
/**
|
|
907
913
|
* @inheritDoc
|
|
908
914
|
*/
|
|
909
915
|
getLastNode() {
|
|
910
|
-
return this.
|
|
916
|
+
return this.children[this.children.length - 1].getLastNode();
|
|
911
917
|
}
|
|
912
918
|
/**
|
|
913
919
|
* @inheritDoc
|
|
914
920
|
*/
|
|
915
921
|
clone() {
|
|
916
922
|
const clonedListBlock = new RTEListBlock(this.id, this.type);
|
|
917
|
-
clonedListBlock.
|
|
923
|
+
clonedListBlock.children = this.children.map((item) => {
|
|
918
924
|
const clonedListItemBlock = item.clone();
|
|
919
925
|
clonedListItemBlock.parent = clonedListBlock;
|
|
920
926
|
return clonedListItemBlock;
|
|
@@ -961,7 +967,7 @@ class BlockTransformToCodeBlockStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
961
967
|
const selectedTextBlocks = selectedBlocks.filter((item) => item.type !== 'image' && item.type !== 'list-item');
|
|
962
968
|
return selectedTextBlocks
|
|
963
969
|
.map((block) => {
|
|
964
|
-
return block.
|
|
970
|
+
return block.children.map((node) => node.text).join('');
|
|
965
971
|
})
|
|
966
972
|
.join('\n');
|
|
967
973
|
}
|
|
@@ -986,7 +992,7 @@ class VegaRTEContent {
|
|
|
986
992
|
blocks.forEach((block) => {
|
|
987
993
|
block.parent = this;
|
|
988
994
|
});
|
|
989
|
-
this.
|
|
995
|
+
this.children = blocks;
|
|
990
996
|
}
|
|
991
997
|
/**
|
|
992
998
|
* Converts a JSON array of blocks to a class array of RTEContentBlock.
|
|
@@ -1047,8 +1053,8 @@ class VegaRTEContent {
|
|
|
1047
1053
|
*/
|
|
1048
1054
|
clone(deep = false) {
|
|
1049
1055
|
return deep
|
|
1050
|
-
? new VegaRTEContent(this.
|
|
1051
|
-
: new VegaRTEContent([...this.
|
|
1056
|
+
? new VegaRTEContent(this.children.map((block) => block.clone()))
|
|
1057
|
+
: new VegaRTEContent([...this.children]);
|
|
1052
1058
|
}
|
|
1053
1059
|
/**
|
|
1054
1060
|
* Converts the content state to a JSON array of blocks.
|
|
@@ -1056,7 +1062,7 @@ class VegaRTEContent {
|
|
|
1056
1062
|
* @returns {VegaRTEContentBlock[]} The JSON array of blocks.
|
|
1057
1063
|
*/
|
|
1058
1064
|
toJSON() {
|
|
1059
|
-
return this.
|
|
1065
|
+
return this.children.map((block) => block.toJSON());
|
|
1060
1066
|
}
|
|
1061
1067
|
/**
|
|
1062
1068
|
* Internal method to add the block item, remove the block item
|
|
@@ -1073,9 +1079,9 @@ class VegaRTEContent {
|
|
|
1073
1079
|
* @returns {RTEListItemBlock} list item block dto.
|
|
1074
1080
|
*/
|
|
1075
1081
|
toListItem(block) {
|
|
1076
|
-
block.
|
|
1082
|
+
block.children.map((node) => node.apply(new codeBlock.SyncUpSelectionAction()));
|
|
1077
1083
|
const listItemBlock = new RTEListItemBlock(createPublicApiRuntimeMetricsSlimmer.generateUUID());
|
|
1078
|
-
listItemBlock.apply(new codeBlock.AppendChildNodesAction(block['
|
|
1084
|
+
listItemBlock.apply(new codeBlock.AppendChildNodesAction(block['children']));
|
|
1079
1085
|
listItemBlock['annotationMap'] = block['annotationMap'];
|
|
1080
1086
|
return listItemBlock;
|
|
1081
1087
|
}
|
|
@@ -1095,7 +1101,7 @@ class VegaRTEContent {
|
|
|
1095
1101
|
* @returns {Nullable<RTENode>} The found node or null if not found.
|
|
1096
1102
|
*/
|
|
1097
1103
|
findNodeById(id) {
|
|
1098
|
-
return this.findNodeInBlocksById(id, this.
|
|
1104
|
+
return this.findNodeInBlocksById(id, this.children);
|
|
1099
1105
|
}
|
|
1100
1106
|
/**
|
|
1101
1107
|
* Recursively searches for a node by its ID in the given blocks.
|
|
@@ -1106,23 +1112,23 @@ class VegaRTEContent {
|
|
|
1106
1112
|
*/
|
|
1107
1113
|
findNodeInBlocksById(id, blocks) {
|
|
1108
1114
|
for (const block of blocks) {
|
|
1109
|
-
if ('
|
|
1110
|
-
for (const node of block.
|
|
1115
|
+
if ('children' in block) {
|
|
1116
|
+
for (const node of block.children) {
|
|
1111
1117
|
if (node.id === id) {
|
|
1112
1118
|
return node;
|
|
1113
1119
|
}
|
|
1114
1120
|
}
|
|
1115
1121
|
}
|
|
1116
|
-
if (block instanceof RTEListItemBlock && block.
|
|
1117
|
-
for (const cBlock of block.
|
|
1118
|
-
const foundNode = this.findNodeInBlocksById(id, cBlock.
|
|
1122
|
+
if (block instanceof RTEListItemBlock && block.nestList) {
|
|
1123
|
+
for (const cBlock of block.nestList) {
|
|
1124
|
+
const foundNode = this.findNodeInBlocksById(id, cBlock.children);
|
|
1119
1125
|
if (foundNode) {
|
|
1120
1126
|
return foundNode;
|
|
1121
1127
|
}
|
|
1122
1128
|
}
|
|
1123
1129
|
}
|
|
1124
|
-
if (block instanceof RTEListBlock && block.
|
|
1125
|
-
const foundNode = this.findNodeInBlocksById(id, block.
|
|
1130
|
+
if (block instanceof RTEListBlock && block.children) {
|
|
1131
|
+
const foundNode = this.findNodeInBlocksById(id, block.children);
|
|
1126
1132
|
if (foundNode) {
|
|
1127
1133
|
return foundNode;
|
|
1128
1134
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
4
4
|
const breakpoints = require('./breakpoints-ebde4837.js');
|
|
5
5
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
6
|
-
const responsiveFormatFacade = require('./responsive-format-facade-
|
|
6
|
+
const responsiveFormatFacade = require('./responsive-format-facade-e2e11c24.js');
|
|
7
7
|
const typography = require('./typography-4560e7f1.js');
|
|
8
8
|
const stateBackgroundColorFormatter = require('./state-background-color-formatter-e585a027.js');
|
|
9
9
|
const ui = require('./ui-32e69595.js');
|
package/dist/cjs/{element-appender-slimmer-2f16891f.js → element-appender-slimmer-2b9ca234.js}
RENAMED
|
@@ -7,7 +7,7 @@ const dynamicSlimmer = require('./dynamic-slimmer-f31fdfd7.js');
|
|
|
7
7
|
const pageResizeObserverSlimmer = require('./page-resize-observer-slimmer-11937d6f.js');
|
|
8
8
|
const ui$1 = require('./ui-32e69595.js');
|
|
9
9
|
const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
10
|
-
const responsiveFormatFacade = require('./responsive-format-facade-
|
|
10
|
+
const responsiveFormatFacade = require('./responsive-format-facade-e2e11c24.js');
|
|
11
11
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
12
12
|
const staticSubjectTitle = require('./static-subject-title-7e7d791a.js');
|
|
13
13
|
const observer = require('./observer-f49483e8.js');
|
package/dist/cjs/{image-annotation-action-617bbb13.js → image-annotation-action-76e3c89d.js}
RENAMED
|
@@ -5,7 +5,7 @@ const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
|
5
5
|
const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-factory-5aa4cc83.js');
|
|
6
6
|
const domNodeSubjectFactory = require('./dom-node-subject-factory-769dd00f.js');
|
|
7
7
|
const internalIconManager = require('./internal-icon-manager-00f49470.js');
|
|
8
|
-
const codeBlock = require('./code-block-
|
|
8
|
+
const codeBlock = require('./code-block-e56c5216.js');
|
|
9
9
|
const darkModeStyleController = require('./dark-mode-style-controller-f9a32d68.js');
|
|
10
10
|
|
|
11
11
|
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const pageResizeObserverSlimmer = require('./page-resize-observer-slimmer-11937d6f.js');
|
|
6
6
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
7
|
-
const designToken = require('./design-token-
|
|
7
|
+
const designToken = require('./design-token-3e0bd48d.js');
|
|
8
8
|
const string = require('./string-21427167.js');
|
|
9
9
|
const typeGuard = require('./type-guard-4ba85fdc.js');
|
|
10
10
|
const breakpoints = require('./breakpoints-ebde4837.js');
|
|
@@ -19,15 +19,16 @@ const iconManager = require('./icon-manager-9a47399c.js');
|
|
|
19
19
|
const validCreditCardNumberRule = require('./valid-credit-card-number-rule-4a1b00b8.js');
|
|
20
20
|
const index = require('./index-ebb1bb17.js');
|
|
21
21
|
const translation = require('./translation-e5003a00.js');
|
|
22
|
-
const contentState = require('./content-state-
|
|
23
|
-
const codeBlock = require('./code-block-
|
|
24
|
-
const responsiveFormatFacade = require('./responsive-format-facade-
|
|
22
|
+
const contentState = require('./content-state-e07c843c.js');
|
|
23
|
+
const codeBlock = require('./code-block-e56c5216.js');
|
|
24
|
+
const responsiveFormatFacade = require('./responsive-format-facade-e2e11c24.js');
|
|
25
|
+
const types = require('./types-a4295b11.js');
|
|
25
26
|
const checkBoxRequiredRule = require('./check-box-required-rule-1ee54b9a.js');
|
|
26
27
|
const dateRequiredRule = require('./date-required-rule-4e1f84fd.js');
|
|
27
28
|
const inputPhoneNumberRequiredRule = require('./input-phone-number-required-rule-2668fdf1.js');
|
|
28
29
|
const inputRangeRequiredRule = require('./input-range-required-rule-5b9c2a95.js');
|
|
29
30
|
const requiredFieldRule = require('./required-field-rule-d73c1d8c.js');
|
|
30
|
-
const richTextEditorRequiredRule = require('./rich-text-editor-required-rule-
|
|
31
|
+
const richTextEditorRequiredRule = require('./rich-text-editor-required-rule-63f50aa4.js');
|
|
31
32
|
const timeRequiredRule = require('./time-required-rule-ccf178e7.js');
|
|
32
33
|
const toggleSwitchRequiredRule = require('./toggle-switch-required-rule-88a51b36.js');
|
|
33
34
|
const fileUploaderRequiredRule = require('./file-uploader-required-rule-313ec9e3.js');
|
|
@@ -127,6 +128,12 @@ exports.RTETextBlock = codeBlock.RTETextBlock;
|
|
|
127
128
|
exports.RTETextNode = codeBlock.RTETextNode;
|
|
128
129
|
exports.GridColumns = responsiveFormatFacade.GridColumns;
|
|
129
130
|
exports.GridRows = responsiveFormatFacade.GridRows;
|
|
131
|
+
Object.defineProperty(exports, 'CodeLanguage', {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () {
|
|
134
|
+
return types.CodeLanguage;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
130
137
|
exports.CheckBoxRequiredRule = checkBoxRequiredRule.CheckBoxRequiredRule;
|
|
131
138
|
exports.DateRequiredRule = dateRequiredRule.DateRequiredRule;
|
|
132
139
|
exports.InputPhoneNumberRequiredRule = inputPhoneNumberRequiredRule.InputPhoneNumberRequiredRule;
|