@heartlandone/vega 2.74.0-RTE-table-preview → 2.74.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-be2e868e.js → app-globals-e9f2edcf.js} +17 -18
- package/dist/cjs/{code-block-22ee2550.js → code-block-c8ae7e0a.js} +3 -34
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-3486cbc0.js → component-value-history-controller-slimmer.abstract-13968181.js} +5 -26
- package/dist/cjs/{design-token-505997df.js → design-token-4e23c50a.js} +1 -1
- package/dist/cjs/{content-state-0be6fda3.js → dto-renderer-manager-ca753971.js} +58 -15
- package/dist/cjs/{element-appender-slimmer-26420c09.js → element-appender-slimmer-dc769946.js} +6 -6
- package/dist/cjs/{form-field-controller-slimmer-56c551ea.js → form-field-controller-slimmer-6e3e14fd.js} +2 -2
- package/dist/cjs/function-extension-5972c73c.js +2927 -0
- package/dist/cjs/{image-annotation-action-462fd073.js → image-annotation-action-92df8979.js} +3 -3
- package/dist/cjs/index-58ea899e.js +0 -4
- package/dist/cjs/{index-fc538f17.js → index-638a0f0d.js} +1 -1
- package/dist/cjs/index.cjs.js +38 -43
- package/dist/cjs/{language-extension-414149c2.js → language-extension-d78389f9.js} +8 -8
- package/dist/cjs/loader.cjs.js +8 -13
- package/dist/cjs/{public-rules-2d18cf41.js → public-rules-23a86d33.js} +4 -4
- package/dist/cjs/{range-439a0c0c.js → range-80f19554.js} +1 -1
- package/dist/cjs/{responsive-format-facade-0ececeb3.js → responsive-format-facade-8d195366.js} +3 -3
- package/dist/cjs/{rich-text-editor-required-rule-5a4f3626.js → rich-text-editor-required-rule-80304585.js} +2 -2
- package/dist/cjs/{string-input-formatter-slimmer-a8f4a9b1.js → string-input-formatter-slimmer-338bbd73.js} +2 -2
- package/dist/cjs/{style-formatter-142500c0.js → style-formatter-dbda894b.js} +1 -1
- package/dist/cjs/{sub-state-notify-slimmer-011866d9.js → sub-state-notify-slimmer-1efa69c4.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-23d43f1e.js → sub-state-observer-slimmer-6afa62f5.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +6 -10
- package/dist/cjs/vega-app-header-button.cjs.entry.js +6 -10
- package/dist/cjs/vega-box.cjs.entry.js +7 -11
- package/dist/cjs/vega-button-circle.cjs.entry.js +6 -10
- package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-button.cjs.entry.js +5 -9
- package/dist/cjs/vega-calendar_4.cjs.entry.js +3 -3
- package/dist/cjs/vega-card.cjs.entry.js +6 -10
- package/dist/cjs/vega-carousel.cjs.entry.js +5 -9
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-chip.cjs.entry.js +6 -10
- package/dist/cjs/vega-code-block.cjs.entry.js +4 -4
- package/dist/cjs/vega-color-picker.cjs.entry.js +3 -3
- package/dist/cjs/vega-combo-box.cjs.entry.js +3 -3
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +11 -15
- package/dist/cjs/vega-dialog_2.cjs.entry.js +13 -17
- package/dist/cjs/vega-divider.cjs.entry.js +6 -10
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +9 -12
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -10
- package/dist/cjs/vega-flex.cjs.entry.js +7 -11
- package/dist/cjs/vega-font.cjs.entry.js +6 -10
- package/dist/cjs/vega-form.cjs.entry.js +4 -4
- package/dist/cjs/vega-grid.cjs.entry.js +6 -10
- package/dist/cjs/vega-icon.cjs.entry.js +6 -10
- package/dist/cjs/vega-image-uploader.cjs.entry.js +8 -12
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-numeric.cjs.entry.js +4 -4
- package/dist/cjs/vega-input-passcode.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +6 -10
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +7 -10
- package/dist/cjs/vega-input.cjs.entry.js +5 -5
- package/dist/cjs/{vega-internal-event-id-73334b4b.js → vega-internal-event-id-f2465f1b.js} +0 -4
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +13 -17
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +7 -11
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination.cjs.entry.js +5 -9
- package/dist/cjs/vega-popover_2.cjs.entry.js +7 -11
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +7 -11
- package/dist/cjs/vega-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +9 -10
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +53 -59
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -12
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +11 -15
- package/dist/cjs/vega-signature-capture.cjs.entry.js +8 -12
- package/dist/cjs/vega-stepper.cjs.entry.js +3 -3
- package/dist/cjs/vega-table_11.cjs.entry.js +13 -16
- package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +8 -12
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +3 -3
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -10
- package/dist/cjs/vega.cjs.js +8 -13
- package/dist/collection/collection-manifest.json +0 -10
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +2 -2
- package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +0 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +2 -24
- package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +1 -18
- package/dist/collection/components/vega-rich-text-editor/public-api.js +0 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +0 -20
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +2 -23
- package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +0 -252
- package/dist/collection/components/vega-rich-text-editor/test/spec-utils.js +2 -5
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +0 -4
- package/dist/collection/global/scripts/before-vega-load.js +0 -2
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +0 -2
- package/dist/collection/utils/spec-utils.js +3 -4
- package/dist/esm/{app-globals-8b873b6f.js → app-globals-9203a3e5.js} +6 -7
- package/dist/esm/{child-nodes-event-prevent-slimmer-a6afdb1e.js → child-nodes-event-prevent-slimmer-e6f98de5.js} +1 -1
- package/dist/esm/{code-block-76b29be1.js → code-block-4e0d321d.js} +5 -36
- package/dist/esm/{component-value-history-controller-slimmer.abstract-e1b0e163.js → component-value-history-controller-slimmer.abstract-0ab0d9f0.js} +6 -27
- package/dist/esm/{design-token-8fedb532.js → design-token-175c4c0c.js} +1 -1
- package/dist/esm/{dom-node-subject-observer-factory-e998eba4.js → dom-node-subject-observer-factory-1aaa1159.js} +1 -1
- package/dist/esm/{content-state-03f1d302.js → dto-renderer-manager-402e89d0.js} +59 -14
- package/dist/esm/{element-appender-slimmer-7b9326e2.js → element-appender-slimmer-7e7aa230.js} +4 -4
- package/dist/esm/{event-emit-slimmer-bbf6668c.js → event-emit-slimmer-2d791d0e.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-a0cff4d3.js → form-field-controller-slimmer-257928c1.js} +3 -3
- package/dist/esm/function-extension-45e413ff.js +2908 -0
- package/dist/esm/{image-annotation-action-47cdc068.js → image-annotation-action-2cdbbd57.js} +3 -3
- package/dist/esm/index-090d31ca.js +0 -4
- package/dist/esm/{index-da7e5fe5.js → index-0d487fae.js} +2 -2
- package/dist/esm/index.js +13 -17
- package/dist/esm/{internal-vega-event-manager-e799c54a.js → internal-vega-event-manager-fdee2a0a.js} +1 -1
- package/dist/esm/{language-extension-de6e6caf.js → language-extension-4bed2436.js} +2 -2
- package/dist/esm/loader.js +10 -15
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{public-rules-c48cc5c9.js → public-rules-05e83e40.js} +5 -5
- package/dist/esm/{range-af6150a8.js → range-5086f250.js} +1 -1
- package/dist/esm/{responsive-format-facade-16da4623.js → responsive-format-facade-f995d6de.js} +3 -3
- package/dist/esm/{rich-text-editor-required-rule-7255832e.js → rich-text-editor-required-rule-0d1147a8.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-82f85b0b.js → string-input-formatter-slimmer-3a42d9b8.js} +3 -3
- package/dist/esm/{style-formatter-6ca58f6b.js → style-formatter-f4067407.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-4060c333.js → sub-state-notify-slimmer-71b9bbd5.js} +2 -2
- package/dist/esm/{sub-state-observer-slimmer-bfa5e63e.js → sub-state-observer-slimmer-41a1b380.js} +2 -2
- package/dist/esm/vega-accordion.entry.js +9 -13
- package/dist/esm/vega-app-header-button.entry.js +10 -14
- package/dist/esm/vega-banner.entry.js +3 -3
- package/dist/esm/vega-box.entry.js +9 -13
- package/dist/esm/vega-breadcrumb.entry.js +4 -4
- package/dist/esm/vega-button-circle.entry.js +10 -14
- package/dist/esm/vega-button-group_2.entry.js +7 -7
- package/dist/esm/vega-button-link.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +9 -13
- package/dist/esm/vega-calendar_4.entry.js +7 -7
- package/dist/esm/vega-card.entry.js +8 -12
- package/dist/esm/vega-carousel.entry.js +8 -12
- package/dist/esm/vega-checkbox_2.entry.js +7 -7
- package/dist/esm/vega-chip.entry.js +10 -14
- package/dist/esm/vega-code-block.entry.js +8 -8
- package/dist/esm/vega-color-picker.entry.js +6 -6
- package/dist/esm/vega-combo-box.entry.js +7 -7
- package/dist/esm/vega-date-picker_2.entry.js +15 -19
- package/dist/esm/vega-dialog_2.entry.js +10 -14
- package/dist/esm/vega-divider.entry.js +8 -12
- package/dist/esm/vega-dropdown_5.entry.js +13 -16
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +3 -3
- package/dist/esm/vega-file-uploader.entry.js +6 -6
- package/dist/esm/vega-flag-icon.entry.js +8 -12
- package/dist/esm/vega-flex.entry.js +9 -13
- package/dist/esm/vega-font.entry.js +8 -12
- package/dist/esm/vega-form.entry.js +8 -8
- package/dist/esm/vega-grid.entry.js +8 -12
- package/dist/esm/vega-icon.entry.js +8 -12
- package/dist/esm/vega-image-uploader.entry.js +11 -15
- package/dist/esm/vega-input-credit-card.entry.js +7 -7
- package/dist/esm/vega-input-numeric.entry.js +8 -8
- package/dist/esm/vega-input-passcode.entry.js +7 -7
- package/dist/esm/vega-input-phone-number.entry.js +10 -14
- package/dist/esm/vega-input-range.entry.js +7 -7
- package/dist/esm/vega-input-select.entry.js +11 -14
- package/dist/esm/vega-input.entry.js +8 -8
- package/dist/esm/{vega-internal-event-id-3edc9b4e.js → vega-internal-event-id-4a06d705.js} +1 -3
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +12 -16
- package/dist/esm/vega-loader-wrapper_2.entry.js +7 -11
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +4 -4
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination.entry.js +9 -13
- package/dist/esm/vega-popover_2.entry.js +10 -14
- package/dist/esm/vega-progress-tracker_2.entry.js +10 -14
- package/dist/esm/vega-radio_2.entry.js +7 -7
- package/dist/esm/vega-rich-text-content.entry.js +7 -8
- package/dist/esm/vega-rich-text-editor_4.entry.js +34 -40
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +12 -16
- package/dist/esm/vega-selection-tile_2.entry.js +8 -8
- package/dist/esm/vega-sidenav_3.entry.js +10 -14
- package/dist/esm/vega-signature-capture.entry.js +11 -15
- package/dist/esm/vega-stepper.entry.js +7 -7
- package/dist/esm/vega-tab-group_2.entry.js +4 -4
- package/dist/esm/vega-table_11.entry.js +11 -14
- package/dist/esm/vega-textarea.entry.js +7 -7
- package/dist/esm/vega-time-picker_2.entry.js +12 -16
- package/dist/esm/vega-toggle-switch.entry.js +6 -6
- package/dist/esm/vega-tooltip_2.entry.js +8 -12
- package/dist/esm/vega.js +10 -15
- package/dist/sri/vega-sri-manifest.json +304 -704
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +2 -2
- package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation.abstract.d.ts +5 -2
- package/dist/types/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.d.ts +3 -3
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +6 -10
- package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +2 -15
- package/dist/types/components/vega-rich-text-editor/interface.d.ts +2 -39
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/extension-controller.d.ts +0 -4
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +0 -9
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +6 -19
- package/dist/types/components/vega-rich-text-editor/test/spec-utils.d.ts +0 -4
- package/dist/types/components.d.ts +3 -140
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +0 -2
- package/dist/types/types/components.type.d.ts +0 -4
- package/dist/types/utils/spec-utils.d.ts +3 -2
- package/dist/vega/index.esm.js +1 -57
- package/dist/vega/p-05feab84.entry.js +1 -0
- package/dist/vega/p-071f9d00.entry.js +1 -0
- package/dist/vega/p-0f601e59.entry.js +1 -0
- package/dist/vega/{p-c00adad9.js → p-184d8443.js} +1 -1
- package/dist/vega/p-1a7e97d2.entry.js +1 -0
- package/dist/vega/{p-24766b9d.entry.js → p-2409a475.entry.js} +1 -1
- package/dist/vega/{p-99e3dcab.js → p-29618be2.js} +1 -1
- package/dist/vega/{p-206245d2.entry.js → p-2ae5ad30.entry.js} +1 -1
- package/dist/vega/{p-d2033624.js → p-301096ee.js} +1 -1
- package/dist/vega/{p-16af7681.js → p-30e7544c.js} +1 -1
- package/dist/vega/p-310a6294.entry.js +1 -0
- package/dist/vega/{p-08b4d097.entry.js → p-3162a7fd.entry.js} +1 -1
- package/dist/vega/{p-7ca9f6f1.js → p-3226c208.js} +1 -1
- package/dist/vega/p-3398f553.entry.js +1 -0
- package/dist/vega/{p-b91c2c9d.js → p-3566ad76.js} +1 -1
- package/dist/vega/p-370ee9e3.entry.js +1 -0
- package/dist/vega/p-38b8efe5.entry.js +1 -0
- package/dist/vega/p-398220f5.entry.js +1 -0
- package/dist/vega/p-3a279b71.js +1 -0
- package/dist/vega/{p-c3d388b5.entry.js → p-3b32e75d.entry.js} +1 -1
- package/dist/vega/p-3ebc8b5b.entry.js +1 -0
- package/dist/vega/p-3f56d184.entry.js +1 -0
- package/dist/vega/p-42b7b5df.js +1 -0
- package/dist/vega/{p-9aac9879.entry.js → p-44bc9ea9.entry.js} +1 -1
- package/dist/vega/p-451ddd84.js +1 -0
- package/dist/vega/{p-a924c1e2.entry.js → p-4957f07a.entry.js} +1 -1
- package/dist/vega/p-59fa3f68.js +1 -0
- package/dist/vega/p-5a0c92db.entry.js +1 -0
- package/dist/vega/p-5b71c85e.js +1 -0
- package/dist/vega/{p-ddf81373.js → p-5be29f14.js} +1 -1
- package/dist/vega/p-5c492358.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-8162980c.js → p-674fe99e.js} +1 -1
- package/dist/vega/{p-dd5d917b.entry.js → p-676eaf3f.entry.js} +1 -1
- package/dist/vega/{p-c335088c.js → p-697eb0e1.js} +1 -1
- package/dist/vega/{p-e797bf8d.entry.js → p-6b9d2996.entry.js} +1 -1
- package/dist/vega/{p-1f4a814e.entry.js → p-6e84e451.entry.js} +1 -1
- package/dist/vega/p-73383099.js +1 -0
- package/dist/vega/{p-ac4bd1f8.js → p-748eb5a2.js} +1 -1
- package/dist/vega/p-779cd090.entry.js +1 -0
- package/dist/vega/{p-216f3436.entry.js → p-7a8c4cf8.entry.js} +1 -1
- package/dist/vega/p-7c238c19.entry.js +1 -0
- package/dist/vega/{p-86caa739.entry.js → p-7f9acdf7.entry.js} +1 -1
- package/dist/vega/{p-d4e35d2e.entry.js → p-82dbff54.entry.js} +1 -1
- package/dist/vega/{p-ff57c872.js → p-8bd496b4.js} +1 -1
- package/dist/vega/p-94cf46ca.entry.js +1 -0
- package/dist/vega/p-950bf9a9.entry.js +1 -0
- package/dist/vega/p-95b11cdd.entry.js +1 -0
- package/dist/vega/{p-c9541fc2.entry.js → p-96797fee.entry.js} +1 -1
- package/dist/vega/p-99676172.entry.js +1 -0
- package/dist/vega/{p-f6eab527.entry.js → p-9b673fd4.entry.js} +1 -1
- package/dist/vega/p-9b7daab0.entry.js +1 -0
- package/dist/vega/{p-73688c4e.entry.js → p-9d8e2939.entry.js} +1 -1
- package/dist/vega/{p-d466baf7.js → p-9ea8eb49.js} +1 -1
- package/dist/vega/{p-780cbfb0.entry.js → p-9fb71d8c.entry.js} +1 -1
- package/dist/vega/{p-63246470.js → p-a2d1c2f3.js} +1 -1
- package/dist/vega/{p-d07d04e0.entry.js → p-a58bdbad.entry.js} +1 -1
- package/dist/vega/{p-e788598a.entry.js → p-a5d4d168.entry.js} +1 -1
- package/dist/vega/p-a6dfef41.entry.js +1 -0
- package/dist/vega/p-a7f151fe.entry.js +1 -0
- package/dist/vega/p-b007d0d5.entry.js +1 -0
- package/dist/vega/p-b0ed81e2.js +1 -0
- package/dist/vega/p-b18c12cb.entry.js +1 -0
- package/dist/vega/p-b19d4e26.entry.js +1 -0
- package/dist/vega/p-b4be03bb.entry.js +1 -0
- package/dist/vega/p-ba223773.entry.js +1 -0
- package/dist/vega/p-bb9db84a.entry.js +1 -0
- package/dist/vega/{p-8ac453cb.entry.js → p-be0b67b8.entry.js} +1 -1
- package/dist/vega/p-c34feecd.entry.js +1 -0
- package/dist/vega/p-c4700277.entry.js +1 -0
- package/dist/vega/{p-3bc7e162.entry.js → p-c7194674.entry.js} +1 -1
- package/dist/vega/p-c796307d.entry.js +1 -0
- package/dist/vega/{p-fa34ace2.entry.js → p-c7f292dd.entry.js} +1 -1
- package/dist/vega/p-ca9b4af9.entry.js +1 -0
- package/dist/vega/p-cadd84ec.entry.js +1 -0
- package/dist/vega/p-ce2ffff7.js +1 -0
- package/dist/vega/p-e3fa091a.js +1 -0
- package/dist/vega/{p-12a97dad.entry.js → p-ead1da57.entry.js} +1 -1
- package/dist/vega/p-edbecf19.entry.js +1 -0
- package/dist/vega/{p-c8ad47c9.js → p-f0bde406.js} +1 -1
- package/dist/vega/{p-5367eaab.js → p-f2c8c363.js} +1 -1
- package/dist/vega/{p-a6e03df4.entry.js → p-f38a4be2.entry.js} +1 -1
- package/dist/vega/{p-813b2915.entry.js → p-f6cd7a08.entry.js} +1 -1
- package/dist/vega/p-f844f3f1.entry.js +1 -0
- package/dist/vega/p-f92752d2.entry.js +1 -0
- package/dist/vega/p-fbda4a20.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -172
- package/package.json +1 -1
- package/dist/cjs/align-left-4a76df69.js +0 -22
- package/dist/cjs/dto-renderer-manager-ae5fcbba.js +0 -58
- package/dist/cjs/styles.constants-3aff0b56.js +0 -1306
- package/dist/cjs/table-extension-2a20da57.js +0 -6018
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +0 -1313
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.js +0 -26
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.js +0 -23
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.js +0 -25
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.js +0 -57
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.js +0 -57
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.js +0 -54
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.js +0 -117
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.js +0 -22
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.js +0 -19
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.js +0 -133
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.js +0 -99
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +0 -23
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +0 -29
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.js +0 -13
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.js +0 -13
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.js +0 -18
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.js +0 -13
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.js +0 -19
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-action.js +0 -26
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.js +0 -13
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.js +0 -18
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.js +0 -13
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.js +0 -18
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.js +0 -18
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.js +0 -13
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.js +0 -15
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.js +0 -38
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +0 -97
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +0 -69
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +0 -82
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +0 -14
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +0 -91
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +0 -57
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +0 -121
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +0 -40
- package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +0 -21
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +0 -119
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +0 -56
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +0 -69
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +0 -66
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +0 -60
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +0 -53
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +0 -60
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +0 -50
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +0 -71
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.js +0 -15
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.js +0 -22
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +0 -74
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.js +0 -254
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.js +0 -12
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.js +0 -15
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +0 -149
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.js +0 -15
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +0 -148
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.js +0 -78
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.js +0 -17
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.js +0 -15
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.js +0 -19
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +0 -131
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.js +0 -109
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.js +0 -132
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +0 -44
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.js +0 -19
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.js +0 -20
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.js +0 -20
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.js +0 -50
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +0 -152
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-icon.js +0 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +0 -371
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +0 -234
- package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +0 -102
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.js +0 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.js +0 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.js +0 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.js +0 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.js +0 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.js +0 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.js +0 -27
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-cell-properties-form-field-renderer.js +0 -106
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.js +0 -259
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-field-renderer.js +0 -58
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.js +0 -93
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +0 -148
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +0 -241
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.js +0 -36
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.js +0 -83
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.css +0 -41
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.js +0 -80
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.js +0 -20
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.js +0 -27
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.js +0 -26
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +0 -86
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +0 -101
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.js +0 -26
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.js +0 -75
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +0 -50
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.css +0 -20
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +0 -215
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.js +0 -164
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +0 -293
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +0 -295
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +0 -415
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.js +0 -99
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +0 -89
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.js +0 -79
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +0 -128
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +0 -517
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +0 -1450
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-test-utils.js +0 -172
- package/dist/esm/align-left-7f959adf.js +0 -17
- package/dist/esm/dto-renderer-manager-12bc9121.js +0 -56
- package/dist/esm/styles.constants-0dd6f7fa.js +0 -1277
- package/dist/esm/table-extension-c83b7a56.js +0 -5998
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +0 -1307
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.d.ts +0 -25
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.d.ts +0 -20
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.d.ts +0 -19
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.d.ts +0 -31
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.d.ts +0 -28
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.d.ts +0 -27
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.d.ts +0 -19
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.d.ts +0 -27
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.d.ts +0 -12
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.d.ts +0 -20
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.d.ts +0 -41
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.d.ts +0 -45
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.d.ts +0 -13
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.d.ts +0 -12
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.d.ts +0 -12
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.d.ts +0 -15
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.d.ts +0 -17
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.d.ts +0 -20
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.d.ts +0 -23
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-action.d.ts +0 -23
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.d.ts +0 -18
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.d.ts +0 -16
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.d.ts +0 -15
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.d.ts +0 -12
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.d.ts +0 -16
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.d.ts +0 -18
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +0 -43
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.d.ts +0 -26
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +0 -42
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.d.ts +0 -13
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +0 -64
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +0 -26
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +0 -67
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +0 -22
- package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +0 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +0 -79
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +0 -42
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +0 -41
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +0 -45
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +0 -42
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +0 -34
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +0 -44
- package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.d.ts +0 -29
- package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.d.ts +0 -26
- package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.d.ts +0 -26
- package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.d.ts +0 -27
- package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.d.ts +0 -26
- package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.d.ts +0 -26
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.d.ts +0 -12
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.d.ts +0 -13
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.d.ts +0 -37
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +0 -88
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.d.ts +0 -12
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.d.ts +0 -12
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +0 -61
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.d.ts +0 -12
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.d.ts +0 -66
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.d.ts +0 -36
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.d.ts +0 -17
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.d.ts +0 -15
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.d.ts +0 -17
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.d.ts +0 -62
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.d.ts +0 -55
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.d.ts +0 -61
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +0 -47
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.d.ts +0 -19
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.d.ts +0 -17
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.d.ts +0 -17
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.d.ts +0 -33
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +0 -36
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-icon.d.ts +0 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +0 -149
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.d.ts +0 -86
- package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +0 -53
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.d.ts +0 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.d.ts +0 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.d.ts +0 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.d.ts +0 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.d.ts +0 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.d.ts +0 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-cell-properties-form-field-renderer.d.ts +0 -49
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.d.ts +0 -99
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-field-renderer.d.ts +0 -27
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.d.ts +0 -33
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +0 -57
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.d.ts +0 -15
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.d.ts +0 -31
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.d.ts +0 -27
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.d.ts +0 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.d.ts +0 -11
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.d.ts +0 -11
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.d.ts +0 -28
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.d.ts +0 -36
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.d.ts +0 -11
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.d.ts +0 -36
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.d.ts +0 -11
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +0 -55
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-dto.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-test-utils.d.ts +0 -11
- package/dist/vega/app-globals-955a2b3b.js +0 -427
- package/dist/vega/child-nodes-event-prevent-slimmer-a604a6dd.js +0 -156
- package/dist/vega/design-token-56b26205.js +0 -402
- package/dist/vega/element-appender-slimmer-8355fb28.js +0 -1508
- package/dist/vega/event-emit-slimmer-7a14f5e9.js +0 -265
- package/dist/vega/internal-vega-event-manager-8c62c88e.js +0 -458
- package/dist/vega/p-068ee55e.entry.js +0 -1
- package/dist/vega/p-088f4613.entry.js +0 -1
- package/dist/vega/p-0e4cecbd.entry.js +0 -1
- package/dist/vega/p-10ffb765.js +0 -1
- package/dist/vega/p-151b1deb.js +0 -1
- package/dist/vega/p-1b44db34.js +0 -1
- package/dist/vega/p-1bda4016.entry.js +0 -1
- package/dist/vega/p-213be5e9.entry.js +0 -1
- package/dist/vega/p-224a4f3f.entry.js +0 -1
- package/dist/vega/p-22c76be7.entry.js +0 -1
- package/dist/vega/p-22da15d7.entry.js +0 -1
- package/dist/vega/p-29a9c8f5.entry.js +0 -1
- package/dist/vega/p-34a994a1.entry.js +0 -1
- package/dist/vega/p-39d56e3d.js +0 -1
- package/dist/vega/p-40660c09.js +0 -1
- package/dist/vega/p-50a506ea.entry.js +0 -1
- package/dist/vega/p-550ce71a.entry.js +0 -1
- package/dist/vega/p-5d2704c1.entry.js +0 -1
- package/dist/vega/p-61ae4e9c.entry.js +0 -1
- package/dist/vega/p-6665d083.entry.js +0 -1
- package/dist/vega/p-69af3422.entry.js +0 -1
- package/dist/vega/p-6d9731c1.entry.js +0 -1
- package/dist/vega/p-6f08e3e1.entry.js +0 -1
- package/dist/vega/p-7172332a.entry.js +0 -1
- package/dist/vega/p-73689ec0.entry.js +0 -1
- package/dist/vega/p-79e8236a.entry.js +0 -1
- package/dist/vega/p-82ec9721.entry.js +0 -1
- package/dist/vega/p-8a4d8139.entry.js +0 -1
- package/dist/vega/p-98b78c75.entry.js +0 -1
- package/dist/vega/p-a007b493.entry.js +0 -1
- package/dist/vega/p-a439e59b.entry.js +0 -1
- package/dist/vega/p-a4d0ab07.js +0 -1
- package/dist/vega/p-ab0e013c.entry.js +0 -1
- package/dist/vega/p-abf871cd.entry.js +0 -1
- package/dist/vega/p-c674b07c.js +0 -1
- package/dist/vega/p-c6d98c60.entry.js +0 -1
- package/dist/vega/p-c78fe943.js +0 -1
- package/dist/vega/p-d1349401.entry.js +0 -1
- package/dist/vega/p-d4719c14.entry.js +0 -1
- package/dist/vega/p-d55365b9.entry.js +0 -1
- package/dist/vega/p-db482ee1.js +0 -1
- package/dist/vega/p-dc2813eb.entry.js +0 -1
- package/dist/vega/p-e0cefd90.entry.js +0 -1
- package/dist/vega/p-e13c163c.entry.js +0 -1
- package/dist/vega/p-f4b46f6b.entry.js +0 -1
- package/dist/vega/p-f519cdc3.entry.js +0 -1
- package/dist/vega/p-fbfb4c70.entry.js +0 -1
- package/dist/vega/p-fcabf0dc.js +0 -1
- package/dist/vega/p-ff921d10.js +0 -1
- package/dist/vega/p-ff9a0e6e.js +0 -1
- package/dist/vega/public-api-8dd022fa.js +0 -6043
- package/dist/vega/public-api-baaf7593.js +0 -4
- package/dist/vega/responsive-format-facade-98596535.js +0 -913
- package/dist/vega/style-formatter-0ae102e9.js +0 -32
- package/dist/vega/vega-accordion.entry.js +0 -291
- package/dist/vega/vega-app-header-button.entry.js +0 -452
- package/dist/vega/vega-banner.entry.js +0 -351
- package/dist/vega/vega-box.entry.js +0 -353
- package/dist/vega/vega-breadcrumb.entry.js +0 -249
- package/dist/vega/vega-button-circle.entry.js +0 -245
- package/dist/vega/vega-button-group.entry.js +0 -203
- package/dist/vega/vega-button-link.entry.js +0 -226
- package/dist/vega/vega-button.entry.js +0 -259
- package/dist/vega/vega-calendar.entry.js +0 -3884
- package/dist/vega/vega-card.entry.js +0 -226
- package/dist/vega/vega-carousel.entry.js +0 -540
- package/dist/vega/vega-checkbox-group.entry.js +0 -266
- package/dist/vega/vega-checkbox.entry.js +0 -335
- package/dist/vega/vega-chip.entry.js +0 -321
- package/dist/vega/vega-code-block.entry.js +0 -4372
- package/dist/vega/vega-color-picker.entry.js +0 -258
- package/dist/vega/vega-combo-box.entry.js +0 -748
- package/dist/vega/vega-date-picker-calendar.entry.js +0 -1381
- package/dist/vega/vega-date-picker.entry.js +0 -1646
- package/dist/vega/vega-dialog.entry.js +0 -158
- package/dist/vega/vega-divider.entry.js +0 -179
- package/dist/vega/vega-dropdown-content-box.entry.js +0 -57
- package/dist/vega/vega-dropdown-item.entry.js +0 -352
- package/dist/vega/vega-dropdown.entry.js +0 -2136
- package/dist/vega/vega-field-label.entry.js +0 -182
- package/dist/vega/vega-file-uploader.entry.js +0 -751
- package/dist/vega/vega-flag-icon.entry.js +0 -216
- package/dist/vega/vega-flex.entry.js +0 -224
- package/dist/vega/vega-font.entry.js +0 -327
- package/dist/vega/vega-form.entry.js +0 -1008
- package/dist/vega/vega-grid.entry.js +0 -129
- package/dist/vega/vega-icon.entry.js +0 -256
- package/dist/vega/vega-image-uploader.entry.js +0 -977
- package/dist/vega/vega-input-credit-card.entry.js +0 -549
- package/dist/vega/vega-input-numeric.entry.js +0 -471
- package/dist/vega/vega-input-passcode.entry.js +0 -728
- package/dist/vega/vega-input-phone-number.entry.js +0 -9143
- package/dist/vega/vega-input-range.entry.js +0 -693
- package/dist/vega/vega-input-select.entry.js +0 -1268
- package/dist/vega/vega-input.entry.js +0 -1735
- package/dist/vega/vega-item-toggle.entry.js +0 -190
- package/dist/vega/vega-left-nav-group.entry.js +0 -433
- package/dist/vega/vega-left-nav-link.entry.js +0 -317
- package/dist/vega/vega-left-nav-section.entry.js +0 -97
- package/dist/vega/vega-left-nav.entry.js +0 -654
- package/dist/vega/vega-loading-indicator.entry.js +0 -209
- package/dist/vega/vega-modal.entry.js +0 -1287
- package/dist/vega/vega-nav-card.entry.js +0 -163
- package/dist/vega/vega-pagination-page-selector-mobile.entry.js +0 -214
- package/dist/vega/vega-pagination.entry.js +0 -629
- package/dist/vega/vega-popover-content-box.entry.js +0 -101
- package/dist/vega/vega-popover.entry.js +0 -362
- package/dist/vega/vega-progress-tracker.entry.js +0 -757
- package/dist/vega/vega-radio-group.entry.js +0 -496
- package/dist/vega/vega-radio.entry.js +0 -272
- package/dist/vega/vega-rich-text-editor-toolbar-button.entry.js +0 -169
- package/dist/vega/vega-rich-text-editor.entry.js +0 -4107
- package/dist/vega/vega-rich-text-image-editor.entry.js +0 -216
- package/dist/vega/vega-rich-text-link-editor.entry.js +0 -238
- package/dist/vega/vega-rich-text-table-properties.entry.js +0 -641
- package/dist/vega/vega-rich-text-table-setting.entry.js +0 -525
- package/dist/vega/vega-segment-control.entry.js +0 -350
- package/dist/vega/vega-selection-chip-group.entry.js +0 -447
- package/dist/vega/vega-selection-chip.entry.js +0 -443
- package/dist/vega/vega-selection-tile-group.entry.js +0 -438
- package/dist/vega/vega-selection-tile.entry.js +0 -409
- package/dist/vega/vega-sidenav-link.entry.js +0 -160
- package/dist/vega/vega-sidenav.entry.js +0 -766
- package/dist/vega/vega-signature-capture.entry.js +0 -589
- package/dist/vega/vega-stepper.entry.js +0 -292
- package/dist/vega/vega-tab-group-panel.entry.js +0 -79
- package/dist/vega/vega-tab-group.entry.js +0 -1281
- package/dist/vega/vega-table-body.entry.js +0 -48
- package/dist/vega/vega-table-cell.entry.js +0 -243
- package/dist/vega/vega-table-foot-cell.entry.js +0 -169
- package/dist/vega/vega-table-foot-row.entry.js +0 -219
- package/dist/vega/vega-table-foot.entry.js +0 -136
- package/dist/vega/vega-table-head-cell.entry.js +0 -339
- package/dist/vega/vega-table-head-row.entry.js +0 -416
- package/dist/vega/vega-table-head.entry.js +0 -113
- package/dist/vega/vega-table-row.entry.js +0 -666
- package/dist/vega/vega-table.entry.js +0 -3707
- package/dist/vega/vega-textarea.entry.js +0 -329
- package/dist/vega/vega-time-picker.entry.js +0 -2039
- package/dist/vega/vega-toggle-switch.entry.js +0 -194
- package/dist/vega/vega-tooltip.entry.js +0 -339
- package/style/vega-icons.css +0 -17266
|
@@ -1,1277 +0,0 @@
|
|
|
1
|
-
import { B as BlockAnnotation, f as RTEBlock, M as ModifyContentAction, i as RTENode, d as ActionHandleStrategy, j as InsertChildrenBeforeAction, m as RemoveChildrenAction } from './code-block-76b29be1.js';
|
|
2
|
-
import { c as cleanObject } from './object-66c37948.js';
|
|
3
|
-
import { i as isNonNullable } from './type-guard-b48aec98.js';
|
|
4
|
-
import { g as generateUUID } from './create-public-api-runtime-metrics-slimmer-bedf3a1e.js';
|
|
5
|
-
import { U as UpdateCursorPositionAction, V as VegaRTEContent } from './content-state-03f1d302.js';
|
|
6
|
-
|
|
7
|
-
var RTETableExtensionAnnotationTypeEnum;
|
|
8
|
-
(function (RTETableExtensionAnnotationTypeEnum) {
|
|
9
|
-
RTETableExtensionAnnotationTypeEnum["TABLE"] = "EXTENSION_TABLE";
|
|
10
|
-
RTETableExtensionAnnotationTypeEnum["CELL"] = "EXTENSION_TABLE_CELL";
|
|
11
|
-
RTETableExtensionAnnotationTypeEnum["CAPTION"] = "EXTENSION_TABLE_CAPTION";
|
|
12
|
-
})(RTETableExtensionAnnotationTypeEnum || (RTETableExtensionAnnotationTypeEnum = {}));
|
|
13
|
-
/**
|
|
14
|
-
* Class representing a table annotation in the rich text editor.
|
|
15
|
-
*/
|
|
16
|
-
class RTETableAnnotation extends BlockAnnotation {
|
|
17
|
-
constructor({ backgroundColor, border, width, height, alignment = 'center', } = {}) {
|
|
18
|
-
super();
|
|
19
|
-
this.type = RTETableExtensionAnnotationTypeEnum.TABLE;
|
|
20
|
-
this.backgroundColor = backgroundColor;
|
|
21
|
-
this.border = border;
|
|
22
|
-
this.width = width;
|
|
23
|
-
this.height = height;
|
|
24
|
-
this.alignment = alignment;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
static from(value) {
|
|
30
|
-
return [RTETableExtensionAnnotationTypeEnum.TABLE, new RTETableAnnotation(value)];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Generates the CSS border string from the border properties.
|
|
34
|
-
*
|
|
35
|
-
* @returns {Nullable<string>} The CSS border string.
|
|
36
|
-
*/
|
|
37
|
-
get borderStr() {
|
|
38
|
-
if (!this.border) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return `${this.border.style} ${this.border.width} ${this.border.color}`.trim();
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @inheritDoc
|
|
45
|
-
*/
|
|
46
|
-
clone() {
|
|
47
|
-
return new RTETableAnnotation({
|
|
48
|
-
backgroundColor: this.backgroundColor,
|
|
49
|
-
border: this.border,
|
|
50
|
-
width: this.width,
|
|
51
|
-
height: this.height,
|
|
52
|
-
alignment: this.alignment,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* @inheritDoc
|
|
57
|
-
*/
|
|
58
|
-
toJSON() {
|
|
59
|
-
return {
|
|
60
|
-
table: cleanObject({
|
|
61
|
-
backgroundColor: this.backgroundColor,
|
|
62
|
-
border: this.border,
|
|
63
|
-
width: this.width,
|
|
64
|
-
height: this.height,
|
|
65
|
-
alignment: this.alignment,
|
|
66
|
-
}),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* @inheritDoc
|
|
71
|
-
*/
|
|
72
|
-
renderStyle() {
|
|
73
|
-
const defaultStyles = {
|
|
74
|
-
borderCollapse: 'collapse',
|
|
75
|
-
};
|
|
76
|
-
const tableStyles = Object.assign({ backgroundColor: this.backgroundColor, border: this.borderStr, width: this.width, height: this.height }, this.renderAlignmentStyle());
|
|
77
|
-
return cleanObject(Object.assign(Object.assign({}, defaultStyles), tableStyles));
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* @inheritDoc
|
|
81
|
-
*/
|
|
82
|
-
renderClass() {
|
|
83
|
-
return 'v-rte--extension-table';
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Generates the alignment styles for the table.
|
|
87
|
-
*
|
|
88
|
-
* @returns {Record<string, string>} The alignment styles.
|
|
89
|
-
*/
|
|
90
|
-
renderAlignmentStyle() {
|
|
91
|
-
return {
|
|
92
|
-
margin: this.alignment === 'center' ? '0 auto' : this.alignment === 'left' ? '0' : '0 0 0 auto',
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Class representing a table block in the rich text editor.
|
|
99
|
-
*/
|
|
100
|
-
class RTETableBlock extends RTEBlock {
|
|
101
|
-
constructor(id, options) {
|
|
102
|
-
super(id);
|
|
103
|
-
this.type = 'table-block';
|
|
104
|
-
this.children = [];
|
|
105
|
-
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
106
|
-
if (autoMatchFormat) {
|
|
107
|
-
this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.TABLE, new RTETableAnnotation());
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* @inheritDoc
|
|
112
|
-
*/
|
|
113
|
-
static from(block, options) {
|
|
114
|
-
var _a;
|
|
115
|
-
const tableBlock = new RTETableBlock(block.id, options);
|
|
116
|
-
super.convertAnnotationsToMap(tableBlock.annotationMap, Object.assign({}, block.annotations));
|
|
117
|
-
tableBlock.children = super.generateBlockChildren(block.children, options, tableBlock);
|
|
118
|
-
if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.table) {
|
|
119
|
-
tableBlock.annotationMap.set(...RTETableAnnotation.from(block.annotations.table));
|
|
120
|
-
}
|
|
121
|
-
return tableBlock;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @inheritDoc
|
|
125
|
-
*/
|
|
126
|
-
clone(parent) {
|
|
127
|
-
const clonedBlock = new RTETableBlock(this.id);
|
|
128
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
129
|
-
clonedBlock.parent = parent;
|
|
130
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
131
|
-
return clonedBlock;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* @inheritDoc
|
|
135
|
-
*/
|
|
136
|
-
getLastNode() {
|
|
137
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get the first node of the table block.
|
|
141
|
-
*
|
|
142
|
-
* @returns {RTENode} The first node of the table block.
|
|
143
|
-
*/
|
|
144
|
-
getFirstNode() {
|
|
145
|
-
if (this.hasCaption()) {
|
|
146
|
-
return this.children[0].children[0].getLastNode();
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
const childNode = this.children[0].children[0]
|
|
150
|
-
.children[0];
|
|
151
|
-
return childNode.getLastNode();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* @inheritDoc
|
|
156
|
-
*/
|
|
157
|
-
isNotEmpty() {
|
|
158
|
-
return this.children.length > 0;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* @inheritDoc
|
|
162
|
-
*/
|
|
163
|
-
toHtml() {
|
|
164
|
-
const childrenHtml = this.children.map((child) => child.toHtml()).join('');
|
|
165
|
-
const attrStr = super.generateAttributeString();
|
|
166
|
-
return `<table${attrStr}>${childrenHtml}</table>`;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* @inheritDoc
|
|
170
|
-
*/
|
|
171
|
-
toJSON() {
|
|
172
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Retrieves the caption block from the children collection, if present.
|
|
176
|
-
*
|
|
177
|
-
* @returns {Nullable<RTETableCaptionBlock>} The caption block or `null`.
|
|
178
|
-
*/
|
|
179
|
-
getCaption() {
|
|
180
|
-
const caption = this.children.find((child) => child.type === 'table-caption');
|
|
181
|
-
return caption !== null && caption !== void 0 ? caption : null;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Inserts, replaces, or removes the caption block within the children.
|
|
185
|
-
*
|
|
186
|
-
* @param {Nullable<RTETableCaptionBlock>} caption - The caption block to set, or `null` to remove.
|
|
187
|
-
*/
|
|
188
|
-
setCaption(caption) {
|
|
189
|
-
const index = this.children.findIndex((child) => child.type === 'table-caption');
|
|
190
|
-
if (!caption) {
|
|
191
|
-
if (index >= 0) {
|
|
192
|
-
this.children.splice(index, 1);
|
|
193
|
-
}
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
caption.parent = this;
|
|
197
|
-
if (index >= 0) {
|
|
198
|
-
this.children[index] = caption;
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
this.children.unshift(caption);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Checks whether the table currently stores a caption block reference.
|
|
206
|
-
*
|
|
207
|
-
* @returns {boolean} `true` when a caption DTO is attached; otherwise `false`.
|
|
208
|
-
*/
|
|
209
|
-
hasCaption() {
|
|
210
|
-
return isNonNullable(this.getCaption());
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
var TableSettingType;
|
|
215
|
-
(function (TableSettingType) {
|
|
216
|
-
TableSettingType["ROW"] = "ROW";
|
|
217
|
-
TableSettingType["CAPTION"] = "CAPTION";
|
|
218
|
-
TableSettingType["COLUMN"] = "COLUMN";
|
|
219
|
-
TableSettingType["MERGE_CELLS"] = "MERGE_CELLS";
|
|
220
|
-
TableSettingType["TABLE"] = "TABLE";
|
|
221
|
-
TableSettingType["CELL"] = "CELL";
|
|
222
|
-
})(TableSettingType || (TableSettingType = {}));
|
|
223
|
-
/**
|
|
224
|
-
* Abstract class for setting event handlers.
|
|
225
|
-
*/
|
|
226
|
-
class SettingEventHandler {
|
|
227
|
-
/**
|
|
228
|
-
* Applies a cursor update action so the editor focuses on the resolved node.
|
|
229
|
-
*
|
|
230
|
-
* @param {RTETableBlock} block - Table block currently being toggled.
|
|
231
|
-
* @param {Nullable<RTENode>} focusNode - Target node that should receive the caret.
|
|
232
|
-
*/
|
|
233
|
-
syncCursorPosition(block, focusNode) {
|
|
234
|
-
const rootContent = this.findRootContent(block);
|
|
235
|
-
if (focusNode && rootContent) {
|
|
236
|
-
const offset = focusNode.getRangeEndOffset();
|
|
237
|
-
rootContent.apply(new UpdateCursorPositionAction(focusNode, offset));
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Walks up the parent chain to locate the nearest VegaRTEContent root.
|
|
242
|
-
*
|
|
243
|
-
* @param {RTETableBlock} block - Table block used as the starting point.
|
|
244
|
-
* @returns {Nullable<VegaRTEContent>} Content root containing the table, if found.
|
|
245
|
-
*/
|
|
246
|
-
findRootContent(block) {
|
|
247
|
-
let currentParent = block.parent;
|
|
248
|
-
while (currentParent) {
|
|
249
|
-
if (currentParent instanceof VegaRTEContent) {
|
|
250
|
-
return currentParent;
|
|
251
|
-
}
|
|
252
|
-
currentParent = currentParent.parent;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
const DELETE_TABLE_ROW = 'DELETE_TABLE_ROW';
|
|
258
|
-
/**
|
|
259
|
-
* Action class for deleting a specific table row.
|
|
260
|
-
*/
|
|
261
|
-
class DeleteTableRowAction extends ModifyContentAction {
|
|
262
|
-
/**
|
|
263
|
-
* Constructs an InsertTableRowAction.
|
|
264
|
-
*
|
|
265
|
-
* @param {RTETableRowBlock[]} rowsToBeRemoved - The rows to be removed from the table.
|
|
266
|
-
*/
|
|
267
|
-
constructor(rowsToBeRemoved) {
|
|
268
|
-
super();
|
|
269
|
-
this.isFlushable = true;
|
|
270
|
-
this.type = DELETE_TABLE_ROW;
|
|
271
|
-
this.rowsToBeRemoved = rowsToBeRemoved;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
const INSERT_TABLE_ROW = 'INSERT_TABLE_ROW';
|
|
276
|
-
var InsertTableRowDirection;
|
|
277
|
-
(function (InsertTableRowDirection) {
|
|
278
|
-
InsertTableRowDirection["ABOVE"] = "ABOVE";
|
|
279
|
-
InsertTableRowDirection["BELOW"] = "BELOW";
|
|
280
|
-
})(InsertTableRowDirection || (InsertTableRowDirection = {}));
|
|
281
|
-
/**
|
|
282
|
-
* Action class for inserting a new row into a table within the rich text editor.
|
|
283
|
-
*/
|
|
284
|
-
class InsertTableRowAction extends ModifyContentAction {
|
|
285
|
-
/**
|
|
286
|
-
* Constructs an InsertTableRowAction.
|
|
287
|
-
*
|
|
288
|
-
* @param {InsertTableRowDirection} insertDirection - The direction to insert the new row (above or below the current row).
|
|
289
|
-
* @param {RTETableRowBlock[]} selectedRows - The currently selected rows in the table.
|
|
290
|
-
*/
|
|
291
|
-
constructor(insertDirection, selectedRows = []) {
|
|
292
|
-
super();
|
|
293
|
-
this.isFlushable = true;
|
|
294
|
-
this.type = INSERT_TABLE_ROW;
|
|
295
|
-
this.selectedRows = [];
|
|
296
|
-
this.insertDirection = insertDirection;
|
|
297
|
-
this.selectedRows = selectedRows;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
const TOGGLE_HEADER_ROW = 'TOGGLE_HEADER_ROW';
|
|
302
|
-
/**
|
|
303
|
-
* Action to convert selected rows to header rows or revert them back to normal rows.
|
|
304
|
-
*/
|
|
305
|
-
class ToggleHeaderRowAction extends ModifyContentAction {
|
|
306
|
-
constructor(selectedRows) {
|
|
307
|
-
super();
|
|
308
|
-
this.isFlushable = true;
|
|
309
|
-
this.type = TOGGLE_HEADER_ROW;
|
|
310
|
-
this.selectedRows = selectedRows;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Class representing a table row block in the rich text editor.
|
|
316
|
-
*/
|
|
317
|
-
class RTETableRowBlock extends RTEBlock {
|
|
318
|
-
constructor(id) {
|
|
319
|
-
super(id);
|
|
320
|
-
this.type = 'table-row';
|
|
321
|
-
this.children = [];
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* @inheritDoc
|
|
325
|
-
*/
|
|
326
|
-
static from(block, options) {
|
|
327
|
-
const rowBlock = new RTETableRowBlock(block.id);
|
|
328
|
-
super.convertAnnotationsToMap(rowBlock.annotationMap, Object.assign({}, block.annotations));
|
|
329
|
-
rowBlock.children = super.generateBlockChildren(block.children, options, rowBlock);
|
|
330
|
-
return rowBlock;
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* @inheritDoc
|
|
334
|
-
*/
|
|
335
|
-
clone(parent) {
|
|
336
|
-
const clonedBlock = new RTETableRowBlock(this.id);
|
|
337
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
338
|
-
clonedBlock.parent = parent;
|
|
339
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
340
|
-
return clonedBlock;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* @inheritDoc
|
|
344
|
-
*/
|
|
345
|
-
getLastNode() {
|
|
346
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* @inheritDoc
|
|
350
|
-
*/
|
|
351
|
-
isNotEmpty() {
|
|
352
|
-
return this.children.length > 0;
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* @inheritDoc
|
|
356
|
-
*/
|
|
357
|
-
toHtml() {
|
|
358
|
-
const childrenHtml = this.children
|
|
359
|
-
.map((child) => {
|
|
360
|
-
return child.toHtml();
|
|
361
|
-
})
|
|
362
|
-
.join('');
|
|
363
|
-
const attrStr = super.generateAttributeString();
|
|
364
|
-
return `<tr${attrStr}>${childrenHtml}</tr>`;
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* @inheritDoc
|
|
368
|
-
*/
|
|
369
|
-
toJSON() {
|
|
370
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Class representing a table body block in the rich text editor.
|
|
376
|
-
*/
|
|
377
|
-
class RTETableBodyBlock extends RTEBlock {
|
|
378
|
-
constructor(id) {
|
|
379
|
-
super(id);
|
|
380
|
-
this.type = 'table-body';
|
|
381
|
-
this.children = [];
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* @inheritDoc
|
|
385
|
-
*/
|
|
386
|
-
static from(block, options) {
|
|
387
|
-
const tableBodyBlock = new RTETableBodyBlock(block.id);
|
|
388
|
-
super.convertAnnotationsToMap(tableBodyBlock.annotationMap, Object.assign({}, block.annotations));
|
|
389
|
-
tableBodyBlock.children = super.generateBlockChildren(block.children, options, tableBodyBlock);
|
|
390
|
-
return tableBodyBlock;
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* @inheritDoc
|
|
394
|
-
*/
|
|
395
|
-
clone(parent) {
|
|
396
|
-
const clonedBlock = new RTETableBodyBlock(this.id);
|
|
397
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
398
|
-
clonedBlock.parent = parent;
|
|
399
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
400
|
-
return clonedBlock;
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* @inheritDoc
|
|
404
|
-
*/
|
|
405
|
-
getLastNode() {
|
|
406
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* @inheritDoc
|
|
410
|
-
*/
|
|
411
|
-
isNotEmpty() {
|
|
412
|
-
return this.children.length > 0;
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* @inheritDoc
|
|
416
|
-
*/
|
|
417
|
-
toHtml() {
|
|
418
|
-
const childrenHtml = this.children.map((child) => child.toHtml()).join('');
|
|
419
|
-
const attrStr = super.generateAttributeString();
|
|
420
|
-
return `<tbody${attrStr}>${childrenHtml}</tbody>`;
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* @inheritDoc
|
|
424
|
-
*/
|
|
425
|
-
toJSON() {
|
|
426
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Class representing a table head block in the rich text editor.
|
|
432
|
-
*/
|
|
433
|
-
class RTETableHeadBlock extends RTEBlock {
|
|
434
|
-
constructor(id) {
|
|
435
|
-
super(id);
|
|
436
|
-
this.type = 'table-head';
|
|
437
|
-
this.children = [];
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* @inheritDoc
|
|
441
|
-
*/
|
|
442
|
-
static from(block, options) {
|
|
443
|
-
const headBlock = new RTETableHeadBlock(block.id);
|
|
444
|
-
super.convertAnnotationsToMap(headBlock.annotationMap, Object.assign({}, block.annotations));
|
|
445
|
-
headBlock.children = super.generateBlockChildren(block.children, options, headBlock);
|
|
446
|
-
return headBlock;
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* @inheritDoc
|
|
450
|
-
*/
|
|
451
|
-
clone(parent) {
|
|
452
|
-
const clonedBlock = new RTETableHeadBlock(this.id);
|
|
453
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
454
|
-
clonedBlock.parent = parent;
|
|
455
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
456
|
-
return clonedBlock;
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* @inheritDoc
|
|
460
|
-
*/
|
|
461
|
-
getLastNode() {
|
|
462
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* @inheritDoc
|
|
466
|
-
*/
|
|
467
|
-
isNotEmpty() {
|
|
468
|
-
return this.children.length > 0;
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* @inheritDoc
|
|
472
|
-
*/
|
|
473
|
-
toHtml() {
|
|
474
|
-
const childrenHtml = this.children
|
|
475
|
-
.map((child) => {
|
|
476
|
-
return child.toHtml();
|
|
477
|
-
})
|
|
478
|
-
.join('');
|
|
479
|
-
const attrStr = super.generateAttributeString();
|
|
480
|
-
return `<thead${attrStr}>${childrenHtml}</thead>`;
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* @inheritDoc
|
|
484
|
-
*/
|
|
485
|
-
toJSON() {
|
|
486
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Recursively searches for a parent block of a specific type.
|
|
492
|
-
*
|
|
493
|
-
* @typedef T - Generic type extending RTEBlock.
|
|
494
|
-
* @param {RTEBlock} block - The starting block to search from.
|
|
495
|
-
* @param {ClassType<unknown>} dtoClass - The class type to match the parent block against.
|
|
496
|
-
* @returns {T | null} - The found parent block of the specified type, or null if not found.
|
|
497
|
-
*/
|
|
498
|
-
function getParentBlockByType(block, dtoClass) {
|
|
499
|
-
if (block) {
|
|
500
|
-
if (block instanceof dtoClass) {
|
|
501
|
-
return block;
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
return getParentBlockByType(block.parent, dtoClass);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
return null;
|
|
508
|
-
}
|
|
509
|
-
/**
|
|
510
|
-
* Generate the table body with the specified number of rows and columns.
|
|
511
|
-
*
|
|
512
|
-
* @param {number} rowCount - The number of rows in the table body.
|
|
513
|
-
* @param {number} columnCount - The number of columns in the table body.
|
|
514
|
-
* @returns {VegaRTETableBodyBlock} The generated table body block.
|
|
515
|
-
*/
|
|
516
|
-
function generateTableBody(rowCount, columnCount) {
|
|
517
|
-
return {
|
|
518
|
-
id: generateUUID(),
|
|
519
|
-
type: 'table-body',
|
|
520
|
-
children: Array.from({ length: rowCount }, () => generateTableRow(columnCount)),
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* Create a table row block with the specified number of columns and cell type.
|
|
525
|
-
*
|
|
526
|
-
* @param {number} columnCount - The number of columns in the row.
|
|
527
|
-
* @returns {VegaRTETableRowBlock} The created table row block.
|
|
528
|
-
*/
|
|
529
|
-
function generateTableRow(columnCount) {
|
|
530
|
-
return {
|
|
531
|
-
id: generateUUID(),
|
|
532
|
-
type: 'table-row',
|
|
533
|
-
children: Array.from({ length: columnCount }, () => getDefaultCellBlockTemplate('table-cell')),
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
/**
|
|
537
|
-
* Get all table rows from a table block (including rows from all table bodies and headers).
|
|
538
|
-
*
|
|
539
|
-
* @param {RTETableBlock} tableBlock - The table block.
|
|
540
|
-
* @returns {RTETableRowBlock[]} Array of all table row blocks.
|
|
541
|
-
*/
|
|
542
|
-
function getAllTableRows(tableBlock) {
|
|
543
|
-
return tableBlock.children
|
|
544
|
-
.filter((child) => child instanceof RTETableBodyBlock || child instanceof RTETableHeadBlock)
|
|
545
|
-
.flatMap((body) => body.children);
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* Find the first node within a block recursively.
|
|
549
|
-
*
|
|
550
|
-
* @param {Nullable<RTEBlock>} block - The block to find the first node in.
|
|
551
|
-
* @returns {Nullable<RTENode>} The focusable node within the block.
|
|
552
|
-
*/
|
|
553
|
-
function getFirstNode(block) {
|
|
554
|
-
if (!block || !block.children || !block.children[0])
|
|
555
|
-
return null;
|
|
556
|
-
const firstNode = block.children[0];
|
|
557
|
-
if (firstNode instanceof RTENode) {
|
|
558
|
-
return firstNode;
|
|
559
|
-
}
|
|
560
|
-
return getFirstNode(firstNode);
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Get the default cell block template.
|
|
564
|
-
*
|
|
565
|
-
* @param {string} cellType - The type of the cell block.
|
|
566
|
-
* @returns {VegaRTETableCellBlock} The default cell block template.
|
|
567
|
-
*/
|
|
568
|
-
function getDefaultCellBlockTemplate(cellType) {
|
|
569
|
-
const id = generateUUID();
|
|
570
|
-
return {
|
|
571
|
-
id,
|
|
572
|
-
type: cellType,
|
|
573
|
-
children: [
|
|
574
|
-
{
|
|
575
|
-
id: `${id}-p`,
|
|
576
|
-
type: 'paragraph',
|
|
577
|
-
nodes: [
|
|
578
|
-
{
|
|
579
|
-
id: `${id}-p-t`,
|
|
580
|
-
type: 'text',
|
|
581
|
-
text: '',
|
|
582
|
-
},
|
|
583
|
-
],
|
|
584
|
-
},
|
|
585
|
-
],
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
var RowOperationType;
|
|
590
|
-
(function (RowOperationType) {
|
|
591
|
-
RowOperationType["HEADER_ROW"] = "HEADER_ROW";
|
|
592
|
-
RowOperationType["ADD_ROW_ABOVE"] = "ADD_ROW_ABOVE";
|
|
593
|
-
RowOperationType["ADD_ROW_BELOW"] = "ADD_ROW_BELOW";
|
|
594
|
-
RowOperationType["DELETE_ROW"] = "DELETE_ROW";
|
|
595
|
-
RowOperationType["SELECT_ROW"] = "SELECT_ROW";
|
|
596
|
-
})(RowOperationType || (RowOperationType = {}));
|
|
597
|
-
/**
|
|
598
|
-
* Event handler for row operations in a table.
|
|
599
|
-
*/
|
|
600
|
-
class RowOperationEventHandler extends SettingEventHandler {
|
|
601
|
-
/**
|
|
602
|
-
* @inheritDoc
|
|
603
|
-
*/
|
|
604
|
-
canHandle(action) {
|
|
605
|
-
return action[0] === TableSettingType.ROW;
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* @inheritDoc
|
|
609
|
-
*/
|
|
610
|
-
execute(action, extensionContext) {
|
|
611
|
-
const operation = action[1];
|
|
612
|
-
switch (operation) {
|
|
613
|
-
case RowOperationType.ADD_ROW_ABOVE:
|
|
614
|
-
case RowOperationType.ADD_ROW_BELOW:
|
|
615
|
-
this.handleInsertRow(operation, extensionContext);
|
|
616
|
-
break;
|
|
617
|
-
case RowOperationType.DELETE_ROW:
|
|
618
|
-
this.handleDeleteRow(extensionContext);
|
|
619
|
-
break;
|
|
620
|
-
case RowOperationType.HEADER_ROW:
|
|
621
|
-
this.handleToggleHeader(extensionContext);
|
|
622
|
-
break;
|
|
623
|
-
case RowOperationType.SELECT_ROW:
|
|
624
|
-
this.handleSelectRow(extensionContext);
|
|
625
|
-
break;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* Adds a new row to the table at the specified position.
|
|
630
|
-
*
|
|
631
|
-
* @param {RowOperationType} direction - The position to insert the new row (above or below).
|
|
632
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
633
|
-
*/
|
|
634
|
-
handleInsertRow(direction, extensionContext) {
|
|
635
|
-
const selectedRows = this.getAllSelectedRows(extensionContext);
|
|
636
|
-
if (selectedRows.length > 0) {
|
|
637
|
-
const action = new InsertTableRowAction(direction === RowOperationType.ADD_ROW_ABOVE
|
|
638
|
-
? InsertTableRowDirection.ABOVE
|
|
639
|
-
: InsertTableRowDirection.BELOW, selectedRows);
|
|
640
|
-
this.applyActionToTable(selectedRows[0], action);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* Deletes the selected row(s) from the table.
|
|
645
|
-
*
|
|
646
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
647
|
-
*/
|
|
648
|
-
handleDeleteRow(extensionContext) {
|
|
649
|
-
const selectedRows = this.getAllSelectedRows(extensionContext);
|
|
650
|
-
if (selectedRows.length) {
|
|
651
|
-
const action = new DeleteTableRowAction(selectedRows);
|
|
652
|
-
this.applyActionToTable(selectedRows[0], action);
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* Converts selected rows to header rows or reverts them back to normal rows.
|
|
657
|
-
*
|
|
658
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
659
|
-
*/
|
|
660
|
-
handleToggleHeader(extensionContext) {
|
|
661
|
-
const selectedRows = this.getAllSelectedRows(extensionContext);
|
|
662
|
-
if (selectedRows.length > 0) {
|
|
663
|
-
const action = new ToggleHeaderRowAction(selectedRows);
|
|
664
|
-
this.applyActionToTable(selectedRows[0], action);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
/**
|
|
668
|
-
* Selects the focus row(s) in the table.
|
|
669
|
-
*
|
|
670
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
671
|
-
*/
|
|
672
|
-
handleSelectRow(extensionContext) {
|
|
673
|
-
const selectedRows = this.getAllSelectedRows(extensionContext);
|
|
674
|
-
if (selectedRows.length > 0 && extensionContext && extensionContext.tableSelection) {
|
|
675
|
-
const allCells = selectedRows.flatMap((row) => row.children);
|
|
676
|
-
extensionContext.tableSelection.setSelectedCells(allCells);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
/**
|
|
680
|
-
* Get all selected table rows.
|
|
681
|
-
*
|
|
682
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
683
|
-
* @returns {RTETableRowBlock[]} The selected table row blocks.
|
|
684
|
-
*/
|
|
685
|
-
getAllSelectedRows(extensionContext) {
|
|
686
|
-
const selectedRows = new Set();
|
|
687
|
-
if (extensionContext && extensionContext.tableSelection) {
|
|
688
|
-
const { tableSelection } = extensionContext;
|
|
689
|
-
const selectedCells = tableSelection.getSelectedCells();
|
|
690
|
-
selectedCells.forEach((cell) => {
|
|
691
|
-
const rowBlock = getParentBlockByType(cell, RTETableRowBlock);
|
|
692
|
-
if (rowBlock) {
|
|
693
|
-
selectedRows.add(rowBlock);
|
|
694
|
-
}
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
return Array.from(selectedRows);
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* Applies the given action to the table containing the reference block.
|
|
701
|
-
*
|
|
702
|
-
* @param {RTEBlock} refBlock - The reference block within the table.
|
|
703
|
-
* @param {ModifyContentAction} action - The action to apply to the table.
|
|
704
|
-
*/
|
|
705
|
-
applyActionToTable(refBlock, action) {
|
|
706
|
-
const table = getParentBlockByType(refBlock, RTETableBlock);
|
|
707
|
-
if (table) {
|
|
708
|
-
table.apply(action);
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* Class representing a table cell annotation in the rich text editor.
|
|
715
|
-
*/
|
|
716
|
-
class RTETableCellAnnotation extends BlockAnnotation {
|
|
717
|
-
constructor({ backgroundColor, padding = RTETableCellAnnotation.DEFAULT_PADDING, border = RTETableCellAnnotation.DEFAULT_BORDER, width, height, textAlign = RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN, verticalAlign = RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN, } = {}) {
|
|
718
|
-
super();
|
|
719
|
-
this.type = RTETableExtensionAnnotationTypeEnum.CELL;
|
|
720
|
-
this.backgroundColor = backgroundColor;
|
|
721
|
-
this.padding = padding;
|
|
722
|
-
this.border = border;
|
|
723
|
-
this.width = width;
|
|
724
|
-
this.height = height;
|
|
725
|
-
this.textAlign = textAlign;
|
|
726
|
-
this.verticalAlign = verticalAlign;
|
|
727
|
-
}
|
|
728
|
-
/**
|
|
729
|
-
* @inheritDoc
|
|
730
|
-
*/
|
|
731
|
-
static from(cellAnnotation) {
|
|
732
|
-
return [RTETableExtensionAnnotationTypeEnum.CELL, new RTETableCellAnnotation(cellAnnotation)];
|
|
733
|
-
}
|
|
734
|
-
/**
|
|
735
|
-
* Generates the CSS border string from the border properties.
|
|
736
|
-
*
|
|
737
|
-
* @returns {Nullable<string>} The CSS border string.
|
|
738
|
-
*/
|
|
739
|
-
get borderStr() {
|
|
740
|
-
if (!this.border)
|
|
741
|
-
return null;
|
|
742
|
-
return `${this.border.style} ${this.border.width} ${this.border.color}`;
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* @inheritDoc
|
|
746
|
-
*/
|
|
747
|
-
clone() {
|
|
748
|
-
return new RTETableCellAnnotation({
|
|
749
|
-
backgroundColor: this.backgroundColor,
|
|
750
|
-
padding: this.padding,
|
|
751
|
-
border: this.border,
|
|
752
|
-
width: this.width,
|
|
753
|
-
height: this.height,
|
|
754
|
-
textAlign: this.textAlign,
|
|
755
|
-
verticalAlign: this.verticalAlign,
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
/**
|
|
759
|
-
* @inheritDoc
|
|
760
|
-
*/
|
|
761
|
-
toJSON() {
|
|
762
|
-
return {
|
|
763
|
-
tableCell: cleanObject({
|
|
764
|
-
backgroundColor: this.backgroundColor,
|
|
765
|
-
padding: this.padding,
|
|
766
|
-
border: this.border,
|
|
767
|
-
width: this.width,
|
|
768
|
-
height: this.height,
|
|
769
|
-
textAlign: this.textAlign,
|
|
770
|
-
verticalAlign: this.verticalAlign,
|
|
771
|
-
}),
|
|
772
|
-
};
|
|
773
|
-
}
|
|
774
|
-
/**
|
|
775
|
-
* @inheritDoc
|
|
776
|
-
*/
|
|
777
|
-
renderStyle(options) {
|
|
778
|
-
const style = {
|
|
779
|
-
backgroundColor: this.backgroundColor,
|
|
780
|
-
padding: this.padding,
|
|
781
|
-
border: this.borderStr,
|
|
782
|
-
width: this.width,
|
|
783
|
-
height: this.height,
|
|
784
|
-
textAlign: this.textAlign,
|
|
785
|
-
verticalAlign: this.verticalAlign,
|
|
786
|
-
};
|
|
787
|
-
if (!(options === null || options === void 0 ? void 0 : options.standalone)) {
|
|
788
|
-
return cleanObject(this.removeDefaultValues(style));
|
|
789
|
-
}
|
|
790
|
-
return cleanObject(Object.assign(Object.assign({}, style), { minWidth: RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH }));
|
|
791
|
-
}
|
|
792
|
-
/**
|
|
793
|
-
* @inheritDoc
|
|
794
|
-
*/
|
|
795
|
-
renderClass() {
|
|
796
|
-
return null;
|
|
797
|
-
}
|
|
798
|
-
/**
|
|
799
|
-
* Removes default values from the style object to avoid redundancy.
|
|
800
|
-
*
|
|
801
|
-
* @param {Record<string, Nullable<string>>} style - The style object to clean.
|
|
802
|
-
* @returns {Record<string, Nullable<string>>} The cleaned style object.
|
|
803
|
-
*/
|
|
804
|
-
removeDefaultValues(style) {
|
|
805
|
-
const cleanedStyle = Object.assign({}, style);
|
|
806
|
-
if (cleanedStyle.padding === RTETableCellAnnotation.DEFAULT_PADDING) {
|
|
807
|
-
delete cleanedStyle.padding;
|
|
808
|
-
}
|
|
809
|
-
if (cleanedStyle.border ===
|
|
810
|
-
`${RTETableCellAnnotation.DEFAULT_BORDER.style} ${RTETableCellAnnotation.DEFAULT_BORDER.width} ${RTETableCellAnnotation.DEFAULT_BORDER.color}`) {
|
|
811
|
-
delete cleanedStyle.border;
|
|
812
|
-
}
|
|
813
|
-
if (cleanedStyle.textAlign === RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN) {
|
|
814
|
-
delete cleanedStyle.textAlign;
|
|
815
|
-
}
|
|
816
|
-
if (cleanedStyle.verticalAlign === RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN) {
|
|
817
|
-
delete cleanedStyle.verticalAlign;
|
|
818
|
-
}
|
|
819
|
-
return cleanedStyle;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
RTETableCellAnnotation.DEFAULT_PADDING = '12px';
|
|
823
|
-
RTETableCellAnnotation.DEFAULT_BORDER = {
|
|
824
|
-
style: 'solid',
|
|
825
|
-
width: '1px',
|
|
826
|
-
color: '#ddd',
|
|
827
|
-
};
|
|
828
|
-
RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN = 'left';
|
|
829
|
-
RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN = 'middle';
|
|
830
|
-
RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH = '30px';
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* Class representing a table cell block in the rich text editor.
|
|
834
|
-
*/
|
|
835
|
-
class RTETableCellBlock extends RTEBlock {
|
|
836
|
-
constructor(id, options) {
|
|
837
|
-
super(id);
|
|
838
|
-
this.type = 'table-cell';
|
|
839
|
-
this.children = [];
|
|
840
|
-
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
841
|
-
if (autoMatchFormat) {
|
|
842
|
-
this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.CELL, new RTETableCellAnnotation());
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
/**
|
|
846
|
-
* @inheritDoc
|
|
847
|
-
*/
|
|
848
|
-
static from(block, options) {
|
|
849
|
-
var _a;
|
|
850
|
-
const tableCellBlock = new RTETableCellBlock(block.id, options);
|
|
851
|
-
super.convertAnnotationsToMap(tableCellBlock.annotationMap, Object.assign({}, block.annotations));
|
|
852
|
-
if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.tableCell) {
|
|
853
|
-
tableCellBlock.annotationMap.set(...RTETableCellAnnotation.from(block.annotations.tableCell));
|
|
854
|
-
}
|
|
855
|
-
tableCellBlock.children = super.generateBlockChildren(block.children, options, tableCellBlock);
|
|
856
|
-
return tableCellBlock;
|
|
857
|
-
}
|
|
858
|
-
/**
|
|
859
|
-
* @inheritDoc
|
|
860
|
-
*/
|
|
861
|
-
clone(parent) {
|
|
862
|
-
const clonedBlock = new RTETableCellBlock(this.id);
|
|
863
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
864
|
-
clonedBlock.parent = parent;
|
|
865
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
866
|
-
return clonedBlock;
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* @inheritDoc
|
|
870
|
-
*/
|
|
871
|
-
getLastNode() {
|
|
872
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
873
|
-
}
|
|
874
|
-
/**
|
|
875
|
-
* @inheritDoc
|
|
876
|
-
*/
|
|
877
|
-
isNotEmpty() {
|
|
878
|
-
return this.children.length > 0;
|
|
879
|
-
}
|
|
880
|
-
/**
|
|
881
|
-
* @inheritDoc
|
|
882
|
-
*/
|
|
883
|
-
toHtml() {
|
|
884
|
-
const childrenHtml = this.children.map((child) => child.toHtml()).join('');
|
|
885
|
-
const attrStr = super.generateAttributeString();
|
|
886
|
-
return `<td${attrStr}>${childrenHtml}</td>`;
|
|
887
|
-
}
|
|
888
|
-
/**
|
|
889
|
-
* @inheritDoc
|
|
890
|
-
*/
|
|
891
|
-
toJSON() {
|
|
892
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* Class representing a table head cell annotation in the rich text editor.
|
|
898
|
-
*/
|
|
899
|
-
class RTETableHeadCellAnnotation extends RTETableCellAnnotation {
|
|
900
|
-
constructor(annotation = {}) {
|
|
901
|
-
super(annotation);
|
|
902
|
-
}
|
|
903
|
-
/**
|
|
904
|
-
* @inheritDoc
|
|
905
|
-
*/
|
|
906
|
-
static from(cellAnnotation) {
|
|
907
|
-
return [RTETableExtensionAnnotationTypeEnum.CELL, new RTETableHeadCellAnnotation(cellAnnotation)];
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* @inheritDoc
|
|
911
|
-
*/
|
|
912
|
-
clone() {
|
|
913
|
-
return new RTETableHeadCellAnnotation({
|
|
914
|
-
backgroundColor: this.backgroundColor,
|
|
915
|
-
padding: this.padding,
|
|
916
|
-
border: this.border,
|
|
917
|
-
width: this.width,
|
|
918
|
-
height: this.height,
|
|
919
|
-
textAlign: this.textAlign,
|
|
920
|
-
verticalAlign: this.verticalAlign,
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
/**
|
|
924
|
-
* @inheritDoc
|
|
925
|
-
*/
|
|
926
|
-
renderStyle(options) {
|
|
927
|
-
var _a;
|
|
928
|
-
const styles = super.renderStyle(options);
|
|
929
|
-
return cleanObject(Object.assign(Object.assign({}, styles), { backgroundColor: (_a = this.backgroundColor) !== null && _a !== void 0 ? _a : RTETableHeadCellAnnotation.DEFAULT_BACKGROUND_COLOR }));
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
RTETableHeadCellAnnotation.DEFAULT_BACKGROUND_COLOR = '#f2f2f2';
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* Class representing a table head block in the rich text editor.
|
|
936
|
-
*/
|
|
937
|
-
class RTETableHeadCellBlock extends RTETableCellBlock {
|
|
938
|
-
constructor(id, options) {
|
|
939
|
-
super(id, options);
|
|
940
|
-
this.type = 'table-head-cell';
|
|
941
|
-
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
942
|
-
if (autoMatchFormat) {
|
|
943
|
-
this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.CELL, new RTETableHeadCellAnnotation());
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
/**
|
|
947
|
-
* @inheritDoc
|
|
948
|
-
*/
|
|
949
|
-
static from(block, options) {
|
|
950
|
-
var _a;
|
|
951
|
-
const headCellBlock = new RTETableHeadCellBlock(block.id, options);
|
|
952
|
-
super.convertAnnotationsToMap(headCellBlock.annotationMap, Object.assign({}, block.annotations));
|
|
953
|
-
if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.tableCell) {
|
|
954
|
-
headCellBlock.annotationMap.set(...RTETableHeadCellAnnotation.from(block.annotations.tableCell));
|
|
955
|
-
}
|
|
956
|
-
headCellBlock.children = super.generateBlockChildren(block.children, options, headCellBlock);
|
|
957
|
-
return headCellBlock;
|
|
958
|
-
}
|
|
959
|
-
/**
|
|
960
|
-
* @inheritDoc
|
|
961
|
-
*/
|
|
962
|
-
clone(parent) {
|
|
963
|
-
const clonedBlock = new RTETableHeadCellBlock(this.id);
|
|
964
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
965
|
-
clonedBlock.parent = parent;
|
|
966
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
967
|
-
return clonedBlock;
|
|
968
|
-
}
|
|
969
|
-
/**
|
|
970
|
-
* @inheritDoc
|
|
971
|
-
*/
|
|
972
|
-
toHtml() {
|
|
973
|
-
const childrenHtml = this.children.map((child) => child.toHtml()).join('');
|
|
974
|
-
const attrStr = super.generateAttributeString();
|
|
975
|
-
return `<th${attrStr}>${childrenHtml}</th>`;
|
|
976
|
-
}
|
|
977
|
-
/**
|
|
978
|
-
* @inheritDoc
|
|
979
|
-
*/
|
|
980
|
-
toJSON() {
|
|
981
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
/**
|
|
986
|
-
* Abstract base strategy for handling table column operations.
|
|
987
|
-
* Provides common functionality for all column-related strategies.
|
|
988
|
-
*/
|
|
989
|
-
class TableColumnStrategy extends ActionHandleStrategy {
|
|
990
|
-
/**
|
|
991
|
-
* Finds the index range of cells within a table row.
|
|
992
|
-
* Returns the start and end indices of the given cell range.
|
|
993
|
-
*
|
|
994
|
-
* @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} cellRange - The range of table cells to find indices for.
|
|
995
|
-
* @returns {[number, number]} A tuple containing the start and end indices.
|
|
996
|
-
*/
|
|
997
|
-
getBoundaryCellIndexOfRow(cellRange) {
|
|
998
|
-
const firstCell = cellRange[0];
|
|
999
|
-
const lastCell = cellRange[cellRange.length - 1];
|
|
1000
|
-
return [firstCell.parent.children.indexOf(firstCell), lastCell.parent.children.indexOf(lastCell)];
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
/**
|
|
1005
|
-
* Strategy to handle the toggle of header state of a table column.
|
|
1006
|
-
*/
|
|
1007
|
-
class ToggleHeaderTableColumnStrategy extends TableColumnStrategy {
|
|
1008
|
-
/**
|
|
1009
|
-
* Check if all selected cells are header cells.
|
|
1010
|
-
*
|
|
1011
|
-
* @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} selectedCellRange - The range of selected table cell blocks.
|
|
1012
|
-
* @returns {boolean} True if all selected cells are header cells, false otherwise.
|
|
1013
|
-
*/
|
|
1014
|
-
static isFullHeaderSelection(selectedCellRange) {
|
|
1015
|
-
if (selectedCellRange.length === 0) {
|
|
1016
|
-
return false;
|
|
1017
|
-
}
|
|
1018
|
-
const endSelectedCell = selectedCellRange[selectedCellRange.length - 1];
|
|
1019
|
-
const endSelectedCellIndex = endSelectedCell.parent.children.findIndex((child) => child === endSelectedCell);
|
|
1020
|
-
const table = getParentBlockByType(endSelectedCell, RTETableBlock);
|
|
1021
|
-
if (table) {
|
|
1022
|
-
const allTableRows = getAllTableRows(table);
|
|
1023
|
-
return allTableRows.every((row) => {
|
|
1024
|
-
const cell = row.children[endSelectedCellIndex];
|
|
1025
|
-
return cell instanceof RTETableHeadCellBlock;
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
return false;
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* @inheritDoc
|
|
1032
|
-
*/
|
|
1033
|
-
handleAction(action, target) {
|
|
1034
|
-
var _a;
|
|
1035
|
-
const headerOn = action.headerOn;
|
|
1036
|
-
const [startCellIndex, endCellIndex] = this.getBoundaryCellIndexOfRow(action.tableCellHeaderRange);
|
|
1037
|
-
const allTableBodyRows = ((_a = target.children.find((body) => body instanceof RTETableBodyBlock)) === null || _a === void 0 ? void 0 : _a.children) || [];
|
|
1038
|
-
allTableBodyRows.forEach((row) => {
|
|
1039
|
-
const firstTableCellIndex = row.children.findIndex((cell) => !(cell instanceof RTETableHeadCellBlock));
|
|
1040
|
-
if (headerOn) {
|
|
1041
|
-
this.toggleCellsToHeader(firstTableCellIndex, endCellIndex, row);
|
|
1042
|
-
}
|
|
1043
|
-
else {
|
|
1044
|
-
this.toggleHeaderCellsToCells(firstTableCellIndex, row, startCellIndex);
|
|
1045
|
-
}
|
|
1046
|
-
});
|
|
1047
|
-
const root = this.getRootContent(target);
|
|
1048
|
-
if (root && action.tableCellHeaderRange[0].parent) {
|
|
1049
|
-
const focusNode = action.tableCellHeaderRange[0].parent.getFirstNode();
|
|
1050
|
-
focusNode && root.apply(new UpdateCursorPositionAction(focusNode, 0));
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
/**
|
|
1054
|
-
* Toggles the specified header cells in a row to cells.
|
|
1055
|
-
*
|
|
1056
|
-
* @param {number} firstTableCellIndex - The index of the first table cell in the row.
|
|
1057
|
-
* @param {RTETableRowBlock} row - The table row block containing the cells to toggle.
|
|
1058
|
-
* @param {number} startCellIndex - The index of the first cell to toggle.
|
|
1059
|
-
*/
|
|
1060
|
-
toggleHeaderCellsToCells(firstTableCellIndex, row, startCellIndex) {
|
|
1061
|
-
const lastTableHeaderCellIndex = firstTableCellIndex >= 0 ? firstTableCellIndex - 1 : row.children.length - 1;
|
|
1062
|
-
for (let cellIndex = startCellIndex; cellIndex <= lastTableHeaderCellIndex; cellIndex++) {
|
|
1063
|
-
const cellToToggle = row.children[cellIndex];
|
|
1064
|
-
const newCell = RTETableCellBlock.from(cellToToggle.toJSON());
|
|
1065
|
-
this.replaceCellInRow(row, cellToToggle, newCell);
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
/**
|
|
1069
|
-
* Toggles the specified cells in a row to header cells.
|
|
1070
|
-
*
|
|
1071
|
-
* @param {number} firstTableCellIndex - The index of the first table cell in the row.
|
|
1072
|
-
* @param {number} endCellIndex - The index of the last cell to toggle.
|
|
1073
|
-
* @param {RTETableRowBlock} row - The table row block containing the cells to toggle.
|
|
1074
|
-
*/
|
|
1075
|
-
toggleCellsToHeader(firstTableCellIndex, endCellIndex, row) {
|
|
1076
|
-
for (let tableCellIndex = firstTableCellIndex; tableCellIndex <= endCellIndex; tableCellIndex++) {
|
|
1077
|
-
const cellToToggle = row.children[tableCellIndex];
|
|
1078
|
-
const newHeaderCell = RTETableHeadCellBlock.from(cellToToggle.toJSON());
|
|
1079
|
-
this.replaceCellInRow(row, cellToToggle, newHeaderCell);
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
/**
|
|
1083
|
-
* Replaces a cell in a given row at the specified index with a new cell.
|
|
1084
|
-
*
|
|
1085
|
-
* @param {RTETableRowBlock} row - The table row block containing the cell to replace.
|
|
1086
|
-
* @param {RTETableCellBlock | RTETableHeadCellBlock} oldCell - The cell to replace.
|
|
1087
|
-
* @param {RTETableCellBlock | RTETableHeadCellBlock} newCell - The new cell to insert.
|
|
1088
|
-
*/
|
|
1089
|
-
replaceCellInRow(row, oldCell, newCell) {
|
|
1090
|
-
row.apply(new InsertChildrenBeforeAction(oldCell, newCell));
|
|
1091
|
-
row.apply(new RemoveChildrenAction(oldCell));
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
const DELETE_TABLE_COLUMN = 'DELETE_TABLE_COLUMN';
|
|
1096
|
-
/**
|
|
1097
|
-
* Action to delete a table column
|
|
1098
|
-
*/
|
|
1099
|
-
class DeleteTableColumnAction extends ModifyContentAction {
|
|
1100
|
-
constructor(target) {
|
|
1101
|
-
super();
|
|
1102
|
-
this.isFlushable = true;
|
|
1103
|
-
this.type = DELETE_TABLE_COLUMN;
|
|
1104
|
-
this.tableCellDeleteRange = target;
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
const INSERT_TABLE_COLUMN = 'INSERT_TABLE_COLUMN';
|
|
1109
|
-
var InsertTableColumnDirection;
|
|
1110
|
-
(function (InsertTableColumnDirection) {
|
|
1111
|
-
InsertTableColumnDirection["LEFT"] = "LEFT";
|
|
1112
|
-
InsertTableColumnDirection["RIGHT"] = "RIGHT";
|
|
1113
|
-
})(InsertTableColumnDirection || (InsertTableColumnDirection = {}));
|
|
1114
|
-
/**
|
|
1115
|
-
* Action to insert a table column into the RTETable.
|
|
1116
|
-
*/
|
|
1117
|
-
class InsertTableColumnAction extends ModifyContentAction {
|
|
1118
|
-
constructor(insertDirection, tableCellInsertRange) {
|
|
1119
|
-
super();
|
|
1120
|
-
this.isFlushable = true;
|
|
1121
|
-
this.type = INSERT_TABLE_COLUMN;
|
|
1122
|
-
this.tableCellInsertRange = tableCellInsertRange;
|
|
1123
|
-
this.insertDirection = insertDirection;
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
const SELECT_TABLE_COLUMN = 'SELECT_TABLE_COLUMN';
|
|
1128
|
-
/**
|
|
1129
|
-
* Action to select a table column into the RTETable.
|
|
1130
|
-
*/
|
|
1131
|
-
class SelectTableColumnAction extends ModifyContentAction {
|
|
1132
|
-
constructor(tableCellSelectRange, selectCellCallback) {
|
|
1133
|
-
super();
|
|
1134
|
-
this.type = SELECT_TABLE_COLUMN;
|
|
1135
|
-
this.tableCellSelectRange = tableCellSelectRange;
|
|
1136
|
-
this.selectCellCallback = selectCellCallback;
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
const TOGGLE_HEADER_TABLE_COLUMN = 'TOGGLE_HEADER_TABLE_COLUMN';
|
|
1141
|
-
/**
|
|
1142
|
-
* Action to toggle header state of a table column in the RTETable.
|
|
1143
|
-
*/
|
|
1144
|
-
class ToggleHeaderTableColumnAction extends ModifyContentAction {
|
|
1145
|
-
constructor(tableCellHeaderRange, headerOn) {
|
|
1146
|
-
super();
|
|
1147
|
-
this.isFlushable = true;
|
|
1148
|
-
this.type = TOGGLE_HEADER_TABLE_COLUMN;
|
|
1149
|
-
this.headerOn = false;
|
|
1150
|
-
this.tableCellHeaderRange = tableCellHeaderRange;
|
|
1151
|
-
this.headerOn = headerOn;
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
var ColumnOperationType;
|
|
1156
|
-
(function (ColumnOperationType) {
|
|
1157
|
-
ColumnOperationType["HEADER_COLUMN"] = "HEADER_COLUMN";
|
|
1158
|
-
ColumnOperationType["ADD_COLUMN_LEFT"] = "ADD_COLUMN_LEFT";
|
|
1159
|
-
ColumnOperationType["ADD_COLUMN_RIGHT"] = "ADD_COLUMN_RIGHT";
|
|
1160
|
-
ColumnOperationType["DELETE_COLUMN"] = "DELETE_COLUMN";
|
|
1161
|
-
ColumnOperationType["SELECT_COLUMN"] = "SELECT_COLUMN";
|
|
1162
|
-
})(ColumnOperationType || (ColumnOperationType = {}));
|
|
1163
|
-
/**
|
|
1164
|
-
* Event handler for column operations in a table.
|
|
1165
|
-
*/
|
|
1166
|
-
class ColumnOperationEventHandler extends SettingEventHandler {
|
|
1167
|
-
/**
|
|
1168
|
-
* @inheritDoc
|
|
1169
|
-
*/
|
|
1170
|
-
canHandle(action) {
|
|
1171
|
-
return action[0] === TableSettingType.COLUMN;
|
|
1172
|
-
}
|
|
1173
|
-
/**
|
|
1174
|
-
* @inheritDoc
|
|
1175
|
-
*/
|
|
1176
|
-
execute(action, extensionContext) {
|
|
1177
|
-
const selectedCells = extensionContext.tableSelection.getSelectedCells();
|
|
1178
|
-
if (!selectedCells || selectedCells.length === 0) {
|
|
1179
|
-
return;
|
|
1180
|
-
}
|
|
1181
|
-
const operation = action[1];
|
|
1182
|
-
switch (operation) {
|
|
1183
|
-
case ColumnOperationType.ADD_COLUMN_LEFT:
|
|
1184
|
-
case ColumnOperationType.ADD_COLUMN_RIGHT:
|
|
1185
|
-
this.handleInsertColumn(operation, selectedCells);
|
|
1186
|
-
break;
|
|
1187
|
-
case ColumnOperationType.DELETE_COLUMN:
|
|
1188
|
-
this.handleDeleteColumn(selectedCells);
|
|
1189
|
-
break;
|
|
1190
|
-
case ColumnOperationType.SELECT_COLUMN:
|
|
1191
|
-
this.handleSelectColumn(selectedCells, extensionContext);
|
|
1192
|
-
break;
|
|
1193
|
-
case ColumnOperationType.HEADER_COLUMN:
|
|
1194
|
-
this.handleToggleHeaderColumn(selectedCells);
|
|
1195
|
-
break;
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
/**
|
|
1199
|
-
* Adds a new column to the table at the specified position.
|
|
1200
|
-
*
|
|
1201
|
-
* @param {ColumnOperationType} direction - The position to insert the new column (left or right).
|
|
1202
|
-
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
|
|
1203
|
-
*/
|
|
1204
|
-
handleInsertColumn(direction, selectedCells) {
|
|
1205
|
-
const action = new InsertTableColumnAction(direction === ColumnOperationType.ADD_COLUMN_LEFT
|
|
1206
|
-
? InsertTableColumnDirection.LEFT
|
|
1207
|
-
: InsertTableColumnDirection.RIGHT, selectedCells);
|
|
1208
|
-
this.applyActionOnTable(action, selectedCells[0]);
|
|
1209
|
-
}
|
|
1210
|
-
/**
|
|
1211
|
-
* Deletes the selected column from the table.
|
|
1212
|
-
*
|
|
1213
|
-
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
|
|
1214
|
-
*/
|
|
1215
|
-
handleDeleteColumn(selectedCells) {
|
|
1216
|
-
const action = new DeleteTableColumnAction(selectedCells);
|
|
1217
|
-
this.applyActionOnTable(action, selectedCells[0]);
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* Selects the entire column in the table.
|
|
1221
|
-
*
|
|
1222
|
-
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
|
|
1223
|
-
* @param {RTETableExtensionContext} extensionContext - The table extension context.
|
|
1224
|
-
*/
|
|
1225
|
-
handleSelectColumn(selectedCells, extensionContext) {
|
|
1226
|
-
const action = new SelectTableColumnAction(selectedCells, (allSelectedCells) => {
|
|
1227
|
-
extensionContext.tableSelection.setSelectedCells(allSelectedCells);
|
|
1228
|
-
});
|
|
1229
|
-
this.applyActionOnTable(action, selectedCells[0]);
|
|
1230
|
-
}
|
|
1231
|
-
/**
|
|
1232
|
-
* Toggles the header state of the selected column in the table.
|
|
1233
|
-
*
|
|
1234
|
-
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
|
|
1235
|
-
*/
|
|
1236
|
-
handleToggleHeaderColumn(selectedCells) {
|
|
1237
|
-
const headerOn = !ToggleHeaderTableColumnStrategy.isFullHeaderSelection(selectedCells);
|
|
1238
|
-
const action = new ToggleHeaderTableColumnAction(selectedCells, headerOn);
|
|
1239
|
-
this.applyActionOnTable(action, selectedCells[0]);
|
|
1240
|
-
}
|
|
1241
|
-
/**
|
|
1242
|
-
* Apply the specified action on the table containing the selected cell.
|
|
1243
|
-
*
|
|
1244
|
-
* @param {DeleteTableColumnAction | InsertTableColumnAction} action - The action to apply.
|
|
1245
|
-
* @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The selected table cell.
|
|
1246
|
-
*/
|
|
1247
|
-
applyActionOnTable(action, selectedCell) {
|
|
1248
|
-
const table = getParentBlockByType(selectedCell, RTETableBlock);
|
|
1249
|
-
if (table) {
|
|
1250
|
-
table.apply(action);
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
const RTE_TABLE_BORDER_STYLES = [
|
|
1256
|
-
'none',
|
|
1257
|
-
'solid',
|
|
1258
|
-
'dashed',
|
|
1259
|
-
'dotted',
|
|
1260
|
-
'double',
|
|
1261
|
-
'groove',
|
|
1262
|
-
'ridge',
|
|
1263
|
-
'inset',
|
|
1264
|
-
'outset',
|
|
1265
|
-
];
|
|
1266
|
-
const RTE_TABLE_DEFAULT_COLORS = [
|
|
1267
|
-
{ dark: '#04041C', light: '#FCFCFC' },
|
|
1268
|
-
{ dark: '#AA091C', light: '#FF4C61' },
|
|
1269
|
-
{ dark: '#974502', light: '#FDAB68' },
|
|
1270
|
-
{ dark: '#735C00', light: '#FFDC4C' },
|
|
1271
|
-
{ dark: '#2E6D18', light: '#7BDA58' },
|
|
1272
|
-
{ dark: '#287171', light: '#7BD1D1' },
|
|
1273
|
-
{ dark: '#595959', light: '#999999' },
|
|
1274
|
-
{ dark: '#FCFCFC', light: '#04041C' },
|
|
1275
|
-
];
|
|
1276
|
-
|
|
1277
|
-
export { ColumnOperationType as A, RowOperationType as B, ColumnOperationEventHandler as C, DELETE_TABLE_ROW as D, InsertTableRowDirection as I, RTETableExtensionAnnotationTypeEnum as R, SettingEventHandler as S, TableSettingType as T, RowOperationEventHandler as a, RTETableAnnotation as b, RTETableCellAnnotation as c, RTETableHeadCellAnnotation as d, RTETableHeadCellBlock as e, RTETableBlock as f, generateTableBody as g, RTETableCellBlock as h, RTETableRowBlock as i, RTETableBodyBlock as j, RTETableHeadBlock as k, getParentBlockByType as l, TableColumnStrategy as m, getAllTableRows as n, InsertTableColumnDirection as o, getDefaultCellBlockTemplate as p, getFirstNode as q, RTE_TABLE_DEFAULT_COLORS as r, INSERT_TABLE_ROW as s, TOGGLE_HEADER_ROW as t, INSERT_TABLE_COLUMN as u, DELETE_TABLE_COLUMN as v, TOGGLE_HEADER_TABLE_COLUMN as w, ToggleHeaderTableColumnStrategy as x, SELECT_TABLE_COLUMN as y, RTE_TABLE_BORDER_STYLES as z };
|