@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,1306 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const codeBlock = require('./code-block-22ee2550.js');
|
|
4
|
-
const object = require('./object-e2e28e3d.js');
|
|
5
|
-
const typeGuard = require('./type-guard-69d2cf01.js');
|
|
6
|
-
const createPublicApiRuntimeMetricsSlimmer = require('./create-public-api-runtime-metrics-slimmer-e2e274e1.js');
|
|
7
|
-
const contentState = require('./content-state-0be6fda3.js');
|
|
8
|
-
|
|
9
|
-
exports.RTETableExtensionAnnotationTypeEnum = void 0;
|
|
10
|
-
(function (RTETableExtensionAnnotationTypeEnum) {
|
|
11
|
-
RTETableExtensionAnnotationTypeEnum["TABLE"] = "EXTENSION_TABLE";
|
|
12
|
-
RTETableExtensionAnnotationTypeEnum["CELL"] = "EXTENSION_TABLE_CELL";
|
|
13
|
-
RTETableExtensionAnnotationTypeEnum["CAPTION"] = "EXTENSION_TABLE_CAPTION";
|
|
14
|
-
})(exports.RTETableExtensionAnnotationTypeEnum || (exports.RTETableExtensionAnnotationTypeEnum = {}));
|
|
15
|
-
/**
|
|
16
|
-
* Class representing a table annotation in the rich text editor.
|
|
17
|
-
*/
|
|
18
|
-
class RTETableAnnotation extends codeBlock.BlockAnnotation {
|
|
19
|
-
constructor({ backgroundColor, border, width, height, alignment = 'center', } = {}) {
|
|
20
|
-
super();
|
|
21
|
-
this.type = exports.RTETableExtensionAnnotationTypeEnum.TABLE;
|
|
22
|
-
this.backgroundColor = backgroundColor;
|
|
23
|
-
this.border = border;
|
|
24
|
-
this.width = width;
|
|
25
|
-
this.height = height;
|
|
26
|
-
this.alignment = alignment;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
static from(value) {
|
|
32
|
-
return [exports.RTETableExtensionAnnotationTypeEnum.TABLE, new RTETableAnnotation(value)];
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Generates the CSS border string from the border properties.
|
|
36
|
-
*
|
|
37
|
-
* @returns {Nullable<string>} The CSS border string.
|
|
38
|
-
*/
|
|
39
|
-
get borderStr() {
|
|
40
|
-
if (!this.border) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
return `${this.border.style} ${this.border.width} ${this.border.color}`.trim();
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @inheritDoc
|
|
47
|
-
*/
|
|
48
|
-
clone() {
|
|
49
|
-
return new RTETableAnnotation({
|
|
50
|
-
backgroundColor: this.backgroundColor,
|
|
51
|
-
border: this.border,
|
|
52
|
-
width: this.width,
|
|
53
|
-
height: this.height,
|
|
54
|
-
alignment: this.alignment,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @inheritDoc
|
|
59
|
-
*/
|
|
60
|
-
toJSON() {
|
|
61
|
-
return {
|
|
62
|
-
table: object.cleanObject({
|
|
63
|
-
backgroundColor: this.backgroundColor,
|
|
64
|
-
border: this.border,
|
|
65
|
-
width: this.width,
|
|
66
|
-
height: this.height,
|
|
67
|
-
alignment: this.alignment,
|
|
68
|
-
}),
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @inheritDoc
|
|
73
|
-
*/
|
|
74
|
-
renderStyle() {
|
|
75
|
-
const defaultStyles = {
|
|
76
|
-
borderCollapse: 'collapse',
|
|
77
|
-
};
|
|
78
|
-
const tableStyles = Object.assign({ backgroundColor: this.backgroundColor, border: this.borderStr, width: this.width, height: this.height }, this.renderAlignmentStyle());
|
|
79
|
-
return object.cleanObject(Object.assign(Object.assign({}, defaultStyles), tableStyles));
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* @inheritDoc
|
|
83
|
-
*/
|
|
84
|
-
renderClass() {
|
|
85
|
-
return 'v-rte--extension-table';
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Generates the alignment styles for the table.
|
|
89
|
-
*
|
|
90
|
-
* @returns {Record<string, string>} The alignment styles.
|
|
91
|
-
*/
|
|
92
|
-
renderAlignmentStyle() {
|
|
93
|
-
return {
|
|
94
|
-
margin: this.alignment === 'center' ? '0 auto' : this.alignment === 'left' ? '0' : '0 0 0 auto',
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Class representing a table block in the rich text editor.
|
|
101
|
-
*/
|
|
102
|
-
class RTETableBlock extends codeBlock.RTEBlock {
|
|
103
|
-
constructor(id, options) {
|
|
104
|
-
super(id);
|
|
105
|
-
this.type = 'table-block';
|
|
106
|
-
this.children = [];
|
|
107
|
-
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
108
|
-
if (autoMatchFormat) {
|
|
109
|
-
this.annotationMap.set(exports.RTETableExtensionAnnotationTypeEnum.TABLE, new RTETableAnnotation());
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* @inheritDoc
|
|
114
|
-
*/
|
|
115
|
-
static from(block, options) {
|
|
116
|
-
var _a;
|
|
117
|
-
const tableBlock = new RTETableBlock(block.id, options);
|
|
118
|
-
super.convertAnnotationsToMap(tableBlock.annotationMap, Object.assign({}, block.annotations));
|
|
119
|
-
tableBlock.children = super.generateBlockChildren(block.children, options, tableBlock);
|
|
120
|
-
if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.table) {
|
|
121
|
-
tableBlock.annotationMap.set(...RTETableAnnotation.from(block.annotations.table));
|
|
122
|
-
}
|
|
123
|
-
return tableBlock;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* @inheritDoc
|
|
127
|
-
*/
|
|
128
|
-
clone(parent) {
|
|
129
|
-
const clonedBlock = new RTETableBlock(this.id);
|
|
130
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
131
|
-
clonedBlock.parent = parent;
|
|
132
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
133
|
-
return clonedBlock;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* @inheritDoc
|
|
137
|
-
*/
|
|
138
|
-
getLastNode() {
|
|
139
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Get the first node of the table block.
|
|
143
|
-
*
|
|
144
|
-
* @returns {RTENode} The first node of the table block.
|
|
145
|
-
*/
|
|
146
|
-
getFirstNode() {
|
|
147
|
-
if (this.hasCaption()) {
|
|
148
|
-
return this.children[0].children[0].getLastNode();
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
const childNode = this.children[0].children[0]
|
|
152
|
-
.children[0];
|
|
153
|
-
return childNode.getLastNode();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* @inheritDoc
|
|
158
|
-
*/
|
|
159
|
-
isNotEmpty() {
|
|
160
|
-
return this.children.length > 0;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* @inheritDoc
|
|
164
|
-
*/
|
|
165
|
-
toHtml() {
|
|
166
|
-
const childrenHtml = this.children.map((child) => child.toHtml()).join('');
|
|
167
|
-
const attrStr = super.generateAttributeString();
|
|
168
|
-
return `<table${attrStr}>${childrenHtml}</table>`;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* @inheritDoc
|
|
172
|
-
*/
|
|
173
|
-
toJSON() {
|
|
174
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Retrieves the caption block from the children collection, if present.
|
|
178
|
-
*
|
|
179
|
-
* @returns {Nullable<RTETableCaptionBlock>} The caption block or `null`.
|
|
180
|
-
*/
|
|
181
|
-
getCaption() {
|
|
182
|
-
const caption = this.children.find((child) => child.type === 'table-caption');
|
|
183
|
-
return caption !== null && caption !== void 0 ? caption : null;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Inserts, replaces, or removes the caption block within the children.
|
|
187
|
-
*
|
|
188
|
-
* @param {Nullable<RTETableCaptionBlock>} caption - The caption block to set, or `null` to remove.
|
|
189
|
-
*/
|
|
190
|
-
setCaption(caption) {
|
|
191
|
-
const index = this.children.findIndex((child) => child.type === 'table-caption');
|
|
192
|
-
if (!caption) {
|
|
193
|
-
if (index >= 0) {
|
|
194
|
-
this.children.splice(index, 1);
|
|
195
|
-
}
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
caption.parent = this;
|
|
199
|
-
if (index >= 0) {
|
|
200
|
-
this.children[index] = caption;
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
this.children.unshift(caption);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Checks whether the table currently stores a caption block reference.
|
|
208
|
-
*
|
|
209
|
-
* @returns {boolean} `true` when a caption DTO is attached; otherwise `false`.
|
|
210
|
-
*/
|
|
211
|
-
hasCaption() {
|
|
212
|
-
return typeGuard.isNonNullable(this.getCaption());
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
exports.TableSettingType = void 0;
|
|
217
|
-
(function (TableSettingType) {
|
|
218
|
-
TableSettingType["ROW"] = "ROW";
|
|
219
|
-
TableSettingType["CAPTION"] = "CAPTION";
|
|
220
|
-
TableSettingType["COLUMN"] = "COLUMN";
|
|
221
|
-
TableSettingType["MERGE_CELLS"] = "MERGE_CELLS";
|
|
222
|
-
TableSettingType["TABLE"] = "TABLE";
|
|
223
|
-
TableSettingType["CELL"] = "CELL";
|
|
224
|
-
})(exports.TableSettingType || (exports.TableSettingType = {}));
|
|
225
|
-
/**
|
|
226
|
-
* Abstract class for setting event handlers.
|
|
227
|
-
*/
|
|
228
|
-
class SettingEventHandler {
|
|
229
|
-
/**
|
|
230
|
-
* Applies a cursor update action so the editor focuses on the resolved node.
|
|
231
|
-
*
|
|
232
|
-
* @param {RTETableBlock} block - Table block currently being toggled.
|
|
233
|
-
* @param {Nullable<RTENode>} focusNode - Target node that should receive the caret.
|
|
234
|
-
*/
|
|
235
|
-
syncCursorPosition(block, focusNode) {
|
|
236
|
-
const rootContent = this.findRootContent(block);
|
|
237
|
-
if (focusNode && rootContent) {
|
|
238
|
-
const offset = focusNode.getRangeEndOffset();
|
|
239
|
-
rootContent.apply(new contentState.UpdateCursorPositionAction(focusNode, offset));
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Walks up the parent chain to locate the nearest VegaRTEContent root.
|
|
244
|
-
*
|
|
245
|
-
* @param {RTETableBlock} block - Table block used as the starting point.
|
|
246
|
-
* @returns {Nullable<VegaRTEContent>} Content root containing the table, if found.
|
|
247
|
-
*/
|
|
248
|
-
findRootContent(block) {
|
|
249
|
-
let currentParent = block.parent;
|
|
250
|
-
while (currentParent) {
|
|
251
|
-
if (currentParent instanceof contentState.VegaRTEContent) {
|
|
252
|
-
return currentParent;
|
|
253
|
-
}
|
|
254
|
-
currentParent = currentParent.parent;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
const DELETE_TABLE_ROW = 'DELETE_TABLE_ROW';
|
|
260
|
-
/**
|
|
261
|
-
* Action class for deleting a specific table row.
|
|
262
|
-
*/
|
|
263
|
-
class DeleteTableRowAction extends codeBlock.ModifyContentAction {
|
|
264
|
-
/**
|
|
265
|
-
* Constructs an InsertTableRowAction.
|
|
266
|
-
*
|
|
267
|
-
* @param {RTETableRowBlock[]} rowsToBeRemoved - The rows to be removed from the table.
|
|
268
|
-
*/
|
|
269
|
-
constructor(rowsToBeRemoved) {
|
|
270
|
-
super();
|
|
271
|
-
this.isFlushable = true;
|
|
272
|
-
this.type = DELETE_TABLE_ROW;
|
|
273
|
-
this.rowsToBeRemoved = rowsToBeRemoved;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
const INSERT_TABLE_ROW = 'INSERT_TABLE_ROW';
|
|
278
|
-
exports.InsertTableRowDirection = void 0;
|
|
279
|
-
(function (InsertTableRowDirection) {
|
|
280
|
-
InsertTableRowDirection["ABOVE"] = "ABOVE";
|
|
281
|
-
InsertTableRowDirection["BELOW"] = "BELOW";
|
|
282
|
-
})(exports.InsertTableRowDirection || (exports.InsertTableRowDirection = {}));
|
|
283
|
-
/**
|
|
284
|
-
* Action class for inserting a new row into a table within the rich text editor.
|
|
285
|
-
*/
|
|
286
|
-
class InsertTableRowAction extends codeBlock.ModifyContentAction {
|
|
287
|
-
/**
|
|
288
|
-
* Constructs an InsertTableRowAction.
|
|
289
|
-
*
|
|
290
|
-
* @param {InsertTableRowDirection} insertDirection - The direction to insert the new row (above or below the current row).
|
|
291
|
-
* @param {RTETableRowBlock[]} selectedRows - The currently selected rows in the table.
|
|
292
|
-
*/
|
|
293
|
-
constructor(insertDirection, selectedRows = []) {
|
|
294
|
-
super();
|
|
295
|
-
this.isFlushable = true;
|
|
296
|
-
this.type = INSERT_TABLE_ROW;
|
|
297
|
-
this.selectedRows = [];
|
|
298
|
-
this.insertDirection = insertDirection;
|
|
299
|
-
this.selectedRows = selectedRows;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const TOGGLE_HEADER_ROW = 'TOGGLE_HEADER_ROW';
|
|
304
|
-
/**
|
|
305
|
-
* Action to convert selected rows to header rows or revert them back to normal rows.
|
|
306
|
-
*/
|
|
307
|
-
class ToggleHeaderRowAction extends codeBlock.ModifyContentAction {
|
|
308
|
-
constructor(selectedRows) {
|
|
309
|
-
super();
|
|
310
|
-
this.isFlushable = true;
|
|
311
|
-
this.type = TOGGLE_HEADER_ROW;
|
|
312
|
-
this.selectedRows = selectedRows;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Class representing a table row block in the rich text editor.
|
|
318
|
-
*/
|
|
319
|
-
class RTETableRowBlock extends codeBlock.RTEBlock {
|
|
320
|
-
constructor(id) {
|
|
321
|
-
super(id);
|
|
322
|
-
this.type = 'table-row';
|
|
323
|
-
this.children = [];
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* @inheritDoc
|
|
327
|
-
*/
|
|
328
|
-
static from(block, options) {
|
|
329
|
-
const rowBlock = new RTETableRowBlock(block.id);
|
|
330
|
-
super.convertAnnotationsToMap(rowBlock.annotationMap, Object.assign({}, block.annotations));
|
|
331
|
-
rowBlock.children = super.generateBlockChildren(block.children, options, rowBlock);
|
|
332
|
-
return rowBlock;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* @inheritDoc
|
|
336
|
-
*/
|
|
337
|
-
clone(parent) {
|
|
338
|
-
const clonedBlock = new RTETableRowBlock(this.id);
|
|
339
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
340
|
-
clonedBlock.parent = parent;
|
|
341
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
342
|
-
return clonedBlock;
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* @inheritDoc
|
|
346
|
-
*/
|
|
347
|
-
getLastNode() {
|
|
348
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* @inheritDoc
|
|
352
|
-
*/
|
|
353
|
-
isNotEmpty() {
|
|
354
|
-
return this.children.length > 0;
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* @inheritDoc
|
|
358
|
-
*/
|
|
359
|
-
toHtml() {
|
|
360
|
-
const childrenHtml = this.children
|
|
361
|
-
.map((child) => {
|
|
362
|
-
return child.toHtml();
|
|
363
|
-
})
|
|
364
|
-
.join('');
|
|
365
|
-
const attrStr = super.generateAttributeString();
|
|
366
|
-
return `<tr${attrStr}>${childrenHtml}</tr>`;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* @inheritDoc
|
|
370
|
-
*/
|
|
371
|
-
toJSON() {
|
|
372
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Class representing a table body block in the rich text editor.
|
|
378
|
-
*/
|
|
379
|
-
class RTETableBodyBlock extends codeBlock.RTEBlock {
|
|
380
|
-
constructor(id) {
|
|
381
|
-
super(id);
|
|
382
|
-
this.type = 'table-body';
|
|
383
|
-
this.children = [];
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* @inheritDoc
|
|
387
|
-
*/
|
|
388
|
-
static from(block, options) {
|
|
389
|
-
const tableBodyBlock = new RTETableBodyBlock(block.id);
|
|
390
|
-
super.convertAnnotationsToMap(tableBodyBlock.annotationMap, Object.assign({}, block.annotations));
|
|
391
|
-
tableBodyBlock.children = super.generateBlockChildren(block.children, options, tableBodyBlock);
|
|
392
|
-
return tableBodyBlock;
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* @inheritDoc
|
|
396
|
-
*/
|
|
397
|
-
clone(parent) {
|
|
398
|
-
const clonedBlock = new RTETableBodyBlock(this.id);
|
|
399
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
400
|
-
clonedBlock.parent = parent;
|
|
401
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
402
|
-
return clonedBlock;
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* @inheritDoc
|
|
406
|
-
*/
|
|
407
|
-
getLastNode() {
|
|
408
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* @inheritDoc
|
|
412
|
-
*/
|
|
413
|
-
isNotEmpty() {
|
|
414
|
-
return this.children.length > 0;
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* @inheritDoc
|
|
418
|
-
*/
|
|
419
|
-
toHtml() {
|
|
420
|
-
const childrenHtml = this.children.map((child) => child.toHtml()).join('');
|
|
421
|
-
const attrStr = super.generateAttributeString();
|
|
422
|
-
return `<tbody${attrStr}>${childrenHtml}</tbody>`;
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* @inheritDoc
|
|
426
|
-
*/
|
|
427
|
-
toJSON() {
|
|
428
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* Class representing a table head block in the rich text editor.
|
|
434
|
-
*/
|
|
435
|
-
class RTETableHeadBlock extends codeBlock.RTEBlock {
|
|
436
|
-
constructor(id) {
|
|
437
|
-
super(id);
|
|
438
|
-
this.type = 'table-head';
|
|
439
|
-
this.children = [];
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* @inheritDoc
|
|
443
|
-
*/
|
|
444
|
-
static from(block, options) {
|
|
445
|
-
const headBlock = new RTETableHeadBlock(block.id);
|
|
446
|
-
super.convertAnnotationsToMap(headBlock.annotationMap, Object.assign({}, block.annotations));
|
|
447
|
-
headBlock.children = super.generateBlockChildren(block.children, options, headBlock);
|
|
448
|
-
return headBlock;
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* @inheritDoc
|
|
452
|
-
*/
|
|
453
|
-
clone(parent) {
|
|
454
|
-
const clonedBlock = new RTETableHeadBlock(this.id);
|
|
455
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
456
|
-
clonedBlock.parent = parent;
|
|
457
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
458
|
-
return clonedBlock;
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* @inheritDoc
|
|
462
|
-
*/
|
|
463
|
-
getLastNode() {
|
|
464
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* @inheritDoc
|
|
468
|
-
*/
|
|
469
|
-
isNotEmpty() {
|
|
470
|
-
return this.children.length > 0;
|
|
471
|
-
}
|
|
472
|
-
/**
|
|
473
|
-
* @inheritDoc
|
|
474
|
-
*/
|
|
475
|
-
toHtml() {
|
|
476
|
-
const childrenHtml = this.children
|
|
477
|
-
.map((child) => {
|
|
478
|
-
return child.toHtml();
|
|
479
|
-
})
|
|
480
|
-
.join('');
|
|
481
|
-
const attrStr = super.generateAttributeString();
|
|
482
|
-
return `<thead${attrStr}>${childrenHtml}</thead>`;
|
|
483
|
-
}
|
|
484
|
-
/**
|
|
485
|
-
* @inheritDoc
|
|
486
|
-
*/
|
|
487
|
-
toJSON() {
|
|
488
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Recursively searches for a parent block of a specific type.
|
|
494
|
-
*
|
|
495
|
-
* @typedef T - Generic type extending RTEBlock.
|
|
496
|
-
* @param {RTEBlock} block - The starting block to search from.
|
|
497
|
-
* @param {ClassType<unknown>} dtoClass - The class type to match the parent block against.
|
|
498
|
-
* @returns {T | null} - The found parent block of the specified type, or null if not found.
|
|
499
|
-
*/
|
|
500
|
-
function getParentBlockByType(block, dtoClass) {
|
|
501
|
-
if (block) {
|
|
502
|
-
if (block instanceof dtoClass) {
|
|
503
|
-
return block;
|
|
504
|
-
}
|
|
505
|
-
else {
|
|
506
|
-
return getParentBlockByType(block.parent, dtoClass);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
return null;
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* Generate the table body with the specified number of rows and columns.
|
|
513
|
-
*
|
|
514
|
-
* @param {number} rowCount - The number of rows in the table body.
|
|
515
|
-
* @param {number} columnCount - The number of columns in the table body.
|
|
516
|
-
* @returns {VegaRTETableBodyBlock} The generated table body block.
|
|
517
|
-
*/
|
|
518
|
-
function generateTableBody(rowCount, columnCount) {
|
|
519
|
-
return {
|
|
520
|
-
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
521
|
-
type: 'table-body',
|
|
522
|
-
children: Array.from({ length: rowCount }, () => generateTableRow(columnCount)),
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* Create a table row block with the specified number of columns and cell type.
|
|
527
|
-
*
|
|
528
|
-
* @param {number} columnCount - The number of columns in the row.
|
|
529
|
-
* @returns {VegaRTETableRowBlock} The created table row block.
|
|
530
|
-
*/
|
|
531
|
-
function generateTableRow(columnCount) {
|
|
532
|
-
return {
|
|
533
|
-
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
534
|
-
type: 'table-row',
|
|
535
|
-
children: Array.from({ length: columnCount }, () => getDefaultCellBlockTemplate('table-cell')),
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Get all table rows from a table block (including rows from all table bodies and headers).
|
|
540
|
-
*
|
|
541
|
-
* @param {RTETableBlock} tableBlock - The table block.
|
|
542
|
-
* @returns {RTETableRowBlock[]} Array of all table row blocks.
|
|
543
|
-
*/
|
|
544
|
-
function getAllTableRows(tableBlock) {
|
|
545
|
-
return tableBlock.children
|
|
546
|
-
.filter((child) => child instanceof RTETableBodyBlock || child instanceof RTETableHeadBlock)
|
|
547
|
-
.flatMap((body) => body.children);
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* Find the first node within a block recursively.
|
|
551
|
-
*
|
|
552
|
-
* @param {Nullable<RTEBlock>} block - The block to find the first node in.
|
|
553
|
-
* @returns {Nullable<RTENode>} The focusable node within the block.
|
|
554
|
-
*/
|
|
555
|
-
function getFirstNode(block) {
|
|
556
|
-
if (!block || !block.children || !block.children[0])
|
|
557
|
-
return null;
|
|
558
|
-
const firstNode = block.children[0];
|
|
559
|
-
if (firstNode instanceof codeBlock.RTENode) {
|
|
560
|
-
return firstNode;
|
|
561
|
-
}
|
|
562
|
-
return getFirstNode(firstNode);
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* Get the default cell block template.
|
|
566
|
-
*
|
|
567
|
-
* @param {string} cellType - The type of the cell block.
|
|
568
|
-
* @returns {VegaRTETableCellBlock} The default cell block template.
|
|
569
|
-
*/
|
|
570
|
-
function getDefaultCellBlockTemplate(cellType) {
|
|
571
|
-
const id = createPublicApiRuntimeMetricsSlimmer.generateUUID();
|
|
572
|
-
return {
|
|
573
|
-
id,
|
|
574
|
-
type: cellType,
|
|
575
|
-
children: [
|
|
576
|
-
{
|
|
577
|
-
id: `${id}-p`,
|
|
578
|
-
type: 'paragraph',
|
|
579
|
-
nodes: [
|
|
580
|
-
{
|
|
581
|
-
id: `${id}-p-t`,
|
|
582
|
-
type: 'text',
|
|
583
|
-
text: '',
|
|
584
|
-
},
|
|
585
|
-
],
|
|
586
|
-
},
|
|
587
|
-
],
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
exports.RowOperationType = void 0;
|
|
592
|
-
(function (RowOperationType) {
|
|
593
|
-
RowOperationType["HEADER_ROW"] = "HEADER_ROW";
|
|
594
|
-
RowOperationType["ADD_ROW_ABOVE"] = "ADD_ROW_ABOVE";
|
|
595
|
-
RowOperationType["ADD_ROW_BELOW"] = "ADD_ROW_BELOW";
|
|
596
|
-
RowOperationType["DELETE_ROW"] = "DELETE_ROW";
|
|
597
|
-
RowOperationType["SELECT_ROW"] = "SELECT_ROW";
|
|
598
|
-
})(exports.RowOperationType || (exports.RowOperationType = {}));
|
|
599
|
-
/**
|
|
600
|
-
* Event handler for row operations in a table.
|
|
601
|
-
*/
|
|
602
|
-
class RowOperationEventHandler extends SettingEventHandler {
|
|
603
|
-
/**
|
|
604
|
-
* @inheritDoc
|
|
605
|
-
*/
|
|
606
|
-
canHandle(action) {
|
|
607
|
-
return action[0] === exports.TableSettingType.ROW;
|
|
608
|
-
}
|
|
609
|
-
/**
|
|
610
|
-
* @inheritDoc
|
|
611
|
-
*/
|
|
612
|
-
execute(action, extensionContext) {
|
|
613
|
-
const operation = action[1];
|
|
614
|
-
switch (operation) {
|
|
615
|
-
case exports.RowOperationType.ADD_ROW_ABOVE:
|
|
616
|
-
case exports.RowOperationType.ADD_ROW_BELOW:
|
|
617
|
-
this.handleInsertRow(operation, extensionContext);
|
|
618
|
-
break;
|
|
619
|
-
case exports.RowOperationType.DELETE_ROW:
|
|
620
|
-
this.handleDeleteRow(extensionContext);
|
|
621
|
-
break;
|
|
622
|
-
case exports.RowOperationType.HEADER_ROW:
|
|
623
|
-
this.handleToggleHeader(extensionContext);
|
|
624
|
-
break;
|
|
625
|
-
case exports.RowOperationType.SELECT_ROW:
|
|
626
|
-
this.handleSelectRow(extensionContext);
|
|
627
|
-
break;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
/**
|
|
631
|
-
* Adds a new row to the table at the specified position.
|
|
632
|
-
*
|
|
633
|
-
* @param {RowOperationType} direction - The position to insert the new row (above or below).
|
|
634
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
635
|
-
*/
|
|
636
|
-
handleInsertRow(direction, extensionContext) {
|
|
637
|
-
const selectedRows = this.getAllSelectedRows(extensionContext);
|
|
638
|
-
if (selectedRows.length > 0) {
|
|
639
|
-
const action = new InsertTableRowAction(direction === exports.RowOperationType.ADD_ROW_ABOVE
|
|
640
|
-
? exports.InsertTableRowDirection.ABOVE
|
|
641
|
-
: exports.InsertTableRowDirection.BELOW, selectedRows);
|
|
642
|
-
this.applyActionToTable(selectedRows[0], action);
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Deletes the selected row(s) from the table.
|
|
647
|
-
*
|
|
648
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
649
|
-
*/
|
|
650
|
-
handleDeleteRow(extensionContext) {
|
|
651
|
-
const selectedRows = this.getAllSelectedRows(extensionContext);
|
|
652
|
-
if (selectedRows.length) {
|
|
653
|
-
const action = new DeleteTableRowAction(selectedRows);
|
|
654
|
-
this.applyActionToTable(selectedRows[0], action);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
/**
|
|
658
|
-
* Converts selected rows to header rows or reverts them back to normal rows.
|
|
659
|
-
*
|
|
660
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
661
|
-
*/
|
|
662
|
-
handleToggleHeader(extensionContext) {
|
|
663
|
-
const selectedRows = this.getAllSelectedRows(extensionContext);
|
|
664
|
-
if (selectedRows.length > 0) {
|
|
665
|
-
const action = new ToggleHeaderRowAction(selectedRows);
|
|
666
|
-
this.applyActionToTable(selectedRows[0], action);
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
/**
|
|
670
|
-
* Selects the focus row(s) in the table.
|
|
671
|
-
*
|
|
672
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
673
|
-
*/
|
|
674
|
-
handleSelectRow(extensionContext) {
|
|
675
|
-
const selectedRows = this.getAllSelectedRows(extensionContext);
|
|
676
|
-
if (selectedRows.length > 0 && extensionContext && extensionContext.tableSelection) {
|
|
677
|
-
const allCells = selectedRows.flatMap((row) => row.children);
|
|
678
|
-
extensionContext.tableSelection.setSelectedCells(allCells);
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* Get all selected table rows.
|
|
683
|
-
*
|
|
684
|
-
* @param {RTETableExtensionContext} extensionContext - The extension context.
|
|
685
|
-
* @returns {RTETableRowBlock[]} The selected table row blocks.
|
|
686
|
-
*/
|
|
687
|
-
getAllSelectedRows(extensionContext) {
|
|
688
|
-
const selectedRows = new Set();
|
|
689
|
-
if (extensionContext && extensionContext.tableSelection) {
|
|
690
|
-
const { tableSelection } = extensionContext;
|
|
691
|
-
const selectedCells = tableSelection.getSelectedCells();
|
|
692
|
-
selectedCells.forEach((cell) => {
|
|
693
|
-
const rowBlock = getParentBlockByType(cell, RTETableRowBlock);
|
|
694
|
-
if (rowBlock) {
|
|
695
|
-
selectedRows.add(rowBlock);
|
|
696
|
-
}
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
return Array.from(selectedRows);
|
|
700
|
-
}
|
|
701
|
-
/**
|
|
702
|
-
* Applies the given action to the table containing the reference block.
|
|
703
|
-
*
|
|
704
|
-
* @param {RTEBlock} refBlock - The reference block within the table.
|
|
705
|
-
* @param {ModifyContentAction} action - The action to apply to the table.
|
|
706
|
-
*/
|
|
707
|
-
applyActionToTable(refBlock, action) {
|
|
708
|
-
const table = getParentBlockByType(refBlock, RTETableBlock);
|
|
709
|
-
if (table) {
|
|
710
|
-
table.apply(action);
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* Class representing a table cell annotation in the rich text editor.
|
|
717
|
-
*/
|
|
718
|
-
class RTETableCellAnnotation extends codeBlock.BlockAnnotation {
|
|
719
|
-
constructor({ backgroundColor, padding = RTETableCellAnnotation.DEFAULT_PADDING, border = RTETableCellAnnotation.DEFAULT_BORDER, width, height, textAlign = RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN, verticalAlign = RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN, } = {}) {
|
|
720
|
-
super();
|
|
721
|
-
this.type = exports.RTETableExtensionAnnotationTypeEnum.CELL;
|
|
722
|
-
this.backgroundColor = backgroundColor;
|
|
723
|
-
this.padding = padding;
|
|
724
|
-
this.border = border;
|
|
725
|
-
this.width = width;
|
|
726
|
-
this.height = height;
|
|
727
|
-
this.textAlign = textAlign;
|
|
728
|
-
this.verticalAlign = verticalAlign;
|
|
729
|
-
}
|
|
730
|
-
/**
|
|
731
|
-
* @inheritDoc
|
|
732
|
-
*/
|
|
733
|
-
static from(cellAnnotation) {
|
|
734
|
-
return [exports.RTETableExtensionAnnotationTypeEnum.CELL, new RTETableCellAnnotation(cellAnnotation)];
|
|
735
|
-
}
|
|
736
|
-
/**
|
|
737
|
-
* Generates the CSS border string from the border properties.
|
|
738
|
-
*
|
|
739
|
-
* @returns {Nullable<string>} The CSS border string.
|
|
740
|
-
*/
|
|
741
|
-
get borderStr() {
|
|
742
|
-
if (!this.border)
|
|
743
|
-
return null;
|
|
744
|
-
return `${this.border.style} ${this.border.width} ${this.border.color}`;
|
|
745
|
-
}
|
|
746
|
-
/**
|
|
747
|
-
* @inheritDoc
|
|
748
|
-
*/
|
|
749
|
-
clone() {
|
|
750
|
-
return new RTETableCellAnnotation({
|
|
751
|
-
backgroundColor: this.backgroundColor,
|
|
752
|
-
padding: this.padding,
|
|
753
|
-
border: this.border,
|
|
754
|
-
width: this.width,
|
|
755
|
-
height: this.height,
|
|
756
|
-
textAlign: this.textAlign,
|
|
757
|
-
verticalAlign: this.verticalAlign,
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* @inheritDoc
|
|
762
|
-
*/
|
|
763
|
-
toJSON() {
|
|
764
|
-
return {
|
|
765
|
-
tableCell: object.cleanObject({
|
|
766
|
-
backgroundColor: this.backgroundColor,
|
|
767
|
-
padding: this.padding,
|
|
768
|
-
border: this.border,
|
|
769
|
-
width: this.width,
|
|
770
|
-
height: this.height,
|
|
771
|
-
textAlign: this.textAlign,
|
|
772
|
-
verticalAlign: this.verticalAlign,
|
|
773
|
-
}),
|
|
774
|
-
};
|
|
775
|
-
}
|
|
776
|
-
/**
|
|
777
|
-
* @inheritDoc
|
|
778
|
-
*/
|
|
779
|
-
renderStyle(options) {
|
|
780
|
-
const style = {
|
|
781
|
-
backgroundColor: this.backgroundColor,
|
|
782
|
-
padding: this.padding,
|
|
783
|
-
border: this.borderStr,
|
|
784
|
-
width: this.width,
|
|
785
|
-
height: this.height,
|
|
786
|
-
textAlign: this.textAlign,
|
|
787
|
-
verticalAlign: this.verticalAlign,
|
|
788
|
-
};
|
|
789
|
-
if (!(options === null || options === void 0 ? void 0 : options.standalone)) {
|
|
790
|
-
return object.cleanObject(this.removeDefaultValues(style));
|
|
791
|
-
}
|
|
792
|
-
return object.cleanObject(Object.assign(Object.assign({}, style), { minWidth: RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH }));
|
|
793
|
-
}
|
|
794
|
-
/**
|
|
795
|
-
* @inheritDoc
|
|
796
|
-
*/
|
|
797
|
-
renderClass() {
|
|
798
|
-
return null;
|
|
799
|
-
}
|
|
800
|
-
/**
|
|
801
|
-
* Removes default values from the style object to avoid redundancy.
|
|
802
|
-
*
|
|
803
|
-
* @param {Record<string, Nullable<string>>} style - The style object to clean.
|
|
804
|
-
* @returns {Record<string, Nullable<string>>} The cleaned style object.
|
|
805
|
-
*/
|
|
806
|
-
removeDefaultValues(style) {
|
|
807
|
-
const cleanedStyle = Object.assign({}, style);
|
|
808
|
-
if (cleanedStyle.padding === RTETableCellAnnotation.DEFAULT_PADDING) {
|
|
809
|
-
delete cleanedStyle.padding;
|
|
810
|
-
}
|
|
811
|
-
if (cleanedStyle.border ===
|
|
812
|
-
`${RTETableCellAnnotation.DEFAULT_BORDER.style} ${RTETableCellAnnotation.DEFAULT_BORDER.width} ${RTETableCellAnnotation.DEFAULT_BORDER.color}`) {
|
|
813
|
-
delete cleanedStyle.border;
|
|
814
|
-
}
|
|
815
|
-
if (cleanedStyle.textAlign === RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN) {
|
|
816
|
-
delete cleanedStyle.textAlign;
|
|
817
|
-
}
|
|
818
|
-
if (cleanedStyle.verticalAlign === RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN) {
|
|
819
|
-
delete cleanedStyle.verticalAlign;
|
|
820
|
-
}
|
|
821
|
-
return cleanedStyle;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
RTETableCellAnnotation.DEFAULT_PADDING = '12px';
|
|
825
|
-
RTETableCellAnnotation.DEFAULT_BORDER = {
|
|
826
|
-
style: 'solid',
|
|
827
|
-
width: '1px',
|
|
828
|
-
color: '#ddd',
|
|
829
|
-
};
|
|
830
|
-
RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN = 'left';
|
|
831
|
-
RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN = 'middle';
|
|
832
|
-
RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH = '30px';
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* Class representing a table cell block in the rich text editor.
|
|
836
|
-
*/
|
|
837
|
-
class RTETableCellBlock extends codeBlock.RTEBlock {
|
|
838
|
-
constructor(id, options) {
|
|
839
|
-
super(id);
|
|
840
|
-
this.type = 'table-cell';
|
|
841
|
-
this.children = [];
|
|
842
|
-
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
843
|
-
if (autoMatchFormat) {
|
|
844
|
-
this.annotationMap.set(exports.RTETableExtensionAnnotationTypeEnum.CELL, new RTETableCellAnnotation());
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
/**
|
|
848
|
-
* @inheritDoc
|
|
849
|
-
*/
|
|
850
|
-
static from(block, options) {
|
|
851
|
-
var _a;
|
|
852
|
-
const tableCellBlock = new RTETableCellBlock(block.id, options);
|
|
853
|
-
super.convertAnnotationsToMap(tableCellBlock.annotationMap, Object.assign({}, block.annotations));
|
|
854
|
-
if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.tableCell) {
|
|
855
|
-
tableCellBlock.annotationMap.set(...RTETableCellAnnotation.from(block.annotations.tableCell));
|
|
856
|
-
}
|
|
857
|
-
tableCellBlock.children = super.generateBlockChildren(block.children, options, tableCellBlock);
|
|
858
|
-
return tableCellBlock;
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* @inheritDoc
|
|
862
|
-
*/
|
|
863
|
-
clone(parent) {
|
|
864
|
-
const clonedBlock = new RTETableCellBlock(this.id);
|
|
865
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
866
|
-
clonedBlock.parent = parent;
|
|
867
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
868
|
-
return clonedBlock;
|
|
869
|
-
}
|
|
870
|
-
/**
|
|
871
|
-
* @inheritDoc
|
|
872
|
-
*/
|
|
873
|
-
getLastNode() {
|
|
874
|
-
return this.children[this.children.length - 1].getLastNode();
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* @inheritDoc
|
|
878
|
-
*/
|
|
879
|
-
isNotEmpty() {
|
|
880
|
-
return this.children.length > 0;
|
|
881
|
-
}
|
|
882
|
-
/**
|
|
883
|
-
* @inheritDoc
|
|
884
|
-
*/
|
|
885
|
-
toHtml() {
|
|
886
|
-
const childrenHtml = this.children.map((child) => child.toHtml()).join('');
|
|
887
|
-
const attrStr = super.generateAttributeString();
|
|
888
|
-
return `<td${attrStr}>${childrenHtml}</td>`;
|
|
889
|
-
}
|
|
890
|
-
/**
|
|
891
|
-
* @inheritDoc
|
|
892
|
-
*/
|
|
893
|
-
toJSON() {
|
|
894
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
/**
|
|
899
|
-
* Class representing a table head cell annotation in the rich text editor.
|
|
900
|
-
*/
|
|
901
|
-
class RTETableHeadCellAnnotation extends RTETableCellAnnotation {
|
|
902
|
-
constructor(annotation = {}) {
|
|
903
|
-
super(annotation);
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
* @inheritDoc
|
|
907
|
-
*/
|
|
908
|
-
static from(cellAnnotation) {
|
|
909
|
-
return [exports.RTETableExtensionAnnotationTypeEnum.CELL, new RTETableHeadCellAnnotation(cellAnnotation)];
|
|
910
|
-
}
|
|
911
|
-
/**
|
|
912
|
-
* @inheritDoc
|
|
913
|
-
*/
|
|
914
|
-
clone() {
|
|
915
|
-
return new RTETableHeadCellAnnotation({
|
|
916
|
-
backgroundColor: this.backgroundColor,
|
|
917
|
-
padding: this.padding,
|
|
918
|
-
border: this.border,
|
|
919
|
-
width: this.width,
|
|
920
|
-
height: this.height,
|
|
921
|
-
textAlign: this.textAlign,
|
|
922
|
-
verticalAlign: this.verticalAlign,
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
/**
|
|
926
|
-
* @inheritDoc
|
|
927
|
-
*/
|
|
928
|
-
renderStyle(options) {
|
|
929
|
-
var _a;
|
|
930
|
-
const styles = super.renderStyle(options);
|
|
931
|
-
return object.cleanObject(Object.assign(Object.assign({}, styles), { backgroundColor: (_a = this.backgroundColor) !== null && _a !== void 0 ? _a : RTETableHeadCellAnnotation.DEFAULT_BACKGROUND_COLOR }));
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
RTETableHeadCellAnnotation.DEFAULT_BACKGROUND_COLOR = '#f2f2f2';
|
|
935
|
-
|
|
936
|
-
/**
|
|
937
|
-
* Class representing a table head block in the rich text editor.
|
|
938
|
-
*/
|
|
939
|
-
class RTETableHeadCellBlock extends RTETableCellBlock {
|
|
940
|
-
constructor(id, options) {
|
|
941
|
-
super(id, options);
|
|
942
|
-
this.type = 'table-head-cell';
|
|
943
|
-
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
944
|
-
if (autoMatchFormat) {
|
|
945
|
-
this.annotationMap.set(exports.RTETableExtensionAnnotationTypeEnum.CELL, new RTETableHeadCellAnnotation());
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
/**
|
|
949
|
-
* @inheritDoc
|
|
950
|
-
*/
|
|
951
|
-
static from(block, options) {
|
|
952
|
-
var _a;
|
|
953
|
-
const headCellBlock = new RTETableHeadCellBlock(block.id, options);
|
|
954
|
-
super.convertAnnotationsToMap(headCellBlock.annotationMap, Object.assign({}, block.annotations));
|
|
955
|
-
if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.tableCell) {
|
|
956
|
-
headCellBlock.annotationMap.set(...RTETableHeadCellAnnotation.from(block.annotations.tableCell));
|
|
957
|
-
}
|
|
958
|
-
headCellBlock.children = super.generateBlockChildren(block.children, options, headCellBlock);
|
|
959
|
-
return headCellBlock;
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* @inheritDoc
|
|
963
|
-
*/
|
|
964
|
-
clone(parent) {
|
|
965
|
-
const clonedBlock = new RTETableHeadCellBlock(this.id);
|
|
966
|
-
clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
|
|
967
|
-
clonedBlock.parent = parent;
|
|
968
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
969
|
-
return clonedBlock;
|
|
970
|
-
}
|
|
971
|
-
/**
|
|
972
|
-
* @inheritDoc
|
|
973
|
-
*/
|
|
974
|
-
toHtml() {
|
|
975
|
-
const childrenHtml = this.children.map((child) => child.toHtml()).join('');
|
|
976
|
-
const attrStr = super.generateAttributeString();
|
|
977
|
-
return `<th${attrStr}>${childrenHtml}</th>`;
|
|
978
|
-
}
|
|
979
|
-
/**
|
|
980
|
-
* @inheritDoc
|
|
981
|
-
*/
|
|
982
|
-
toJSON() {
|
|
983
|
-
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
/**
|
|
988
|
-
* Abstract base strategy for handling table column operations.
|
|
989
|
-
* Provides common functionality for all column-related strategies.
|
|
990
|
-
*/
|
|
991
|
-
class TableColumnStrategy extends codeBlock.ActionHandleStrategy {
|
|
992
|
-
/**
|
|
993
|
-
* Finds the index range of cells within a table row.
|
|
994
|
-
* Returns the start and end indices of the given cell range.
|
|
995
|
-
*
|
|
996
|
-
* @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} cellRange - The range of table cells to find indices for.
|
|
997
|
-
* @returns {[number, number]} A tuple containing the start and end indices.
|
|
998
|
-
*/
|
|
999
|
-
getBoundaryCellIndexOfRow(cellRange) {
|
|
1000
|
-
const firstCell = cellRange[0];
|
|
1001
|
-
const lastCell = cellRange[cellRange.length - 1];
|
|
1002
|
-
return [firstCell.parent.children.indexOf(firstCell), lastCell.parent.children.indexOf(lastCell)];
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
* Strategy to handle the toggle of header state of a table column.
|
|
1008
|
-
*/
|
|
1009
|
-
class ToggleHeaderTableColumnStrategy extends TableColumnStrategy {
|
|
1010
|
-
/**
|
|
1011
|
-
* Check if all selected cells are header cells.
|
|
1012
|
-
*
|
|
1013
|
-
* @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} selectedCellRange - The range of selected table cell blocks.
|
|
1014
|
-
* @returns {boolean} True if all selected cells are header cells, false otherwise.
|
|
1015
|
-
*/
|
|
1016
|
-
static isFullHeaderSelection(selectedCellRange) {
|
|
1017
|
-
if (selectedCellRange.length === 0) {
|
|
1018
|
-
return false;
|
|
1019
|
-
}
|
|
1020
|
-
const endSelectedCell = selectedCellRange[selectedCellRange.length - 1];
|
|
1021
|
-
const endSelectedCellIndex = endSelectedCell.parent.children.findIndex((child) => child === endSelectedCell);
|
|
1022
|
-
const table = getParentBlockByType(endSelectedCell, RTETableBlock);
|
|
1023
|
-
if (table) {
|
|
1024
|
-
const allTableRows = getAllTableRows(table);
|
|
1025
|
-
return allTableRows.every((row) => {
|
|
1026
|
-
const cell = row.children[endSelectedCellIndex];
|
|
1027
|
-
return cell instanceof RTETableHeadCellBlock;
|
|
1028
|
-
});
|
|
1029
|
-
}
|
|
1030
|
-
return false;
|
|
1031
|
-
}
|
|
1032
|
-
/**
|
|
1033
|
-
* @inheritDoc
|
|
1034
|
-
*/
|
|
1035
|
-
handleAction(action, target) {
|
|
1036
|
-
var _a;
|
|
1037
|
-
const headerOn = action.headerOn;
|
|
1038
|
-
const [startCellIndex, endCellIndex] = this.getBoundaryCellIndexOfRow(action.tableCellHeaderRange);
|
|
1039
|
-
const allTableBodyRows = ((_a = target.children.find((body) => body instanceof RTETableBodyBlock)) === null || _a === void 0 ? void 0 : _a.children) || [];
|
|
1040
|
-
allTableBodyRows.forEach((row) => {
|
|
1041
|
-
const firstTableCellIndex = row.children.findIndex((cell) => !(cell instanceof RTETableHeadCellBlock));
|
|
1042
|
-
if (headerOn) {
|
|
1043
|
-
this.toggleCellsToHeader(firstTableCellIndex, endCellIndex, row);
|
|
1044
|
-
}
|
|
1045
|
-
else {
|
|
1046
|
-
this.toggleHeaderCellsToCells(firstTableCellIndex, row, startCellIndex);
|
|
1047
|
-
}
|
|
1048
|
-
});
|
|
1049
|
-
const root = this.getRootContent(target);
|
|
1050
|
-
if (root && action.tableCellHeaderRange[0].parent) {
|
|
1051
|
-
const focusNode = action.tableCellHeaderRange[0].parent.getFirstNode();
|
|
1052
|
-
focusNode && root.apply(new contentState.UpdateCursorPositionAction(focusNode, 0));
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Toggles the specified header cells in a row to cells.
|
|
1057
|
-
*
|
|
1058
|
-
* @param {number} firstTableCellIndex - The index of the first table cell in the row.
|
|
1059
|
-
* @param {RTETableRowBlock} row - The table row block containing the cells to toggle.
|
|
1060
|
-
* @param {number} startCellIndex - The index of the first cell to toggle.
|
|
1061
|
-
*/
|
|
1062
|
-
toggleHeaderCellsToCells(firstTableCellIndex, row, startCellIndex) {
|
|
1063
|
-
const lastTableHeaderCellIndex = firstTableCellIndex >= 0 ? firstTableCellIndex - 1 : row.children.length - 1;
|
|
1064
|
-
for (let cellIndex = startCellIndex; cellIndex <= lastTableHeaderCellIndex; cellIndex++) {
|
|
1065
|
-
const cellToToggle = row.children[cellIndex];
|
|
1066
|
-
const newCell = RTETableCellBlock.from(cellToToggle.toJSON());
|
|
1067
|
-
this.replaceCellInRow(row, cellToToggle, newCell);
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
/**
|
|
1071
|
-
* Toggles the specified cells in a row to header cells.
|
|
1072
|
-
*
|
|
1073
|
-
* @param {number} firstTableCellIndex - The index of the first table cell in the row.
|
|
1074
|
-
* @param {number} endCellIndex - The index of the last cell to toggle.
|
|
1075
|
-
* @param {RTETableRowBlock} row - The table row block containing the cells to toggle.
|
|
1076
|
-
*/
|
|
1077
|
-
toggleCellsToHeader(firstTableCellIndex, endCellIndex, row) {
|
|
1078
|
-
for (let tableCellIndex = firstTableCellIndex; tableCellIndex <= endCellIndex; tableCellIndex++) {
|
|
1079
|
-
const cellToToggle = row.children[tableCellIndex];
|
|
1080
|
-
const newHeaderCell = RTETableHeadCellBlock.from(cellToToggle.toJSON());
|
|
1081
|
-
this.replaceCellInRow(row, cellToToggle, newHeaderCell);
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
/**
|
|
1085
|
-
* Replaces a cell in a given row at the specified index with a new cell.
|
|
1086
|
-
*
|
|
1087
|
-
* @param {RTETableRowBlock} row - The table row block containing the cell to replace.
|
|
1088
|
-
* @param {RTETableCellBlock | RTETableHeadCellBlock} oldCell - The cell to replace.
|
|
1089
|
-
* @param {RTETableCellBlock | RTETableHeadCellBlock} newCell - The new cell to insert.
|
|
1090
|
-
*/
|
|
1091
|
-
replaceCellInRow(row, oldCell, newCell) {
|
|
1092
|
-
row.apply(new codeBlock.InsertChildrenBeforeAction(oldCell, newCell));
|
|
1093
|
-
row.apply(new codeBlock.RemoveChildrenAction(oldCell));
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
const DELETE_TABLE_COLUMN = 'DELETE_TABLE_COLUMN';
|
|
1098
|
-
/**
|
|
1099
|
-
* Action to delete a table column
|
|
1100
|
-
*/
|
|
1101
|
-
class DeleteTableColumnAction extends codeBlock.ModifyContentAction {
|
|
1102
|
-
constructor(target) {
|
|
1103
|
-
super();
|
|
1104
|
-
this.isFlushable = true;
|
|
1105
|
-
this.type = DELETE_TABLE_COLUMN;
|
|
1106
|
-
this.tableCellDeleteRange = target;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
const INSERT_TABLE_COLUMN = 'INSERT_TABLE_COLUMN';
|
|
1111
|
-
exports.InsertTableColumnDirection = void 0;
|
|
1112
|
-
(function (InsertTableColumnDirection) {
|
|
1113
|
-
InsertTableColumnDirection["LEFT"] = "LEFT";
|
|
1114
|
-
InsertTableColumnDirection["RIGHT"] = "RIGHT";
|
|
1115
|
-
})(exports.InsertTableColumnDirection || (exports.InsertTableColumnDirection = {}));
|
|
1116
|
-
/**
|
|
1117
|
-
* Action to insert a table column into the RTETable.
|
|
1118
|
-
*/
|
|
1119
|
-
class InsertTableColumnAction extends codeBlock.ModifyContentAction {
|
|
1120
|
-
constructor(insertDirection, tableCellInsertRange) {
|
|
1121
|
-
super();
|
|
1122
|
-
this.isFlushable = true;
|
|
1123
|
-
this.type = INSERT_TABLE_COLUMN;
|
|
1124
|
-
this.tableCellInsertRange = tableCellInsertRange;
|
|
1125
|
-
this.insertDirection = insertDirection;
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
const SELECT_TABLE_COLUMN = 'SELECT_TABLE_COLUMN';
|
|
1130
|
-
/**
|
|
1131
|
-
* Action to select a table column into the RTETable.
|
|
1132
|
-
*/
|
|
1133
|
-
class SelectTableColumnAction extends codeBlock.ModifyContentAction {
|
|
1134
|
-
constructor(tableCellSelectRange, selectCellCallback) {
|
|
1135
|
-
super();
|
|
1136
|
-
this.type = SELECT_TABLE_COLUMN;
|
|
1137
|
-
this.tableCellSelectRange = tableCellSelectRange;
|
|
1138
|
-
this.selectCellCallback = selectCellCallback;
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
const TOGGLE_HEADER_TABLE_COLUMN = 'TOGGLE_HEADER_TABLE_COLUMN';
|
|
1143
|
-
/**
|
|
1144
|
-
* Action to toggle header state of a table column in the RTETable.
|
|
1145
|
-
*/
|
|
1146
|
-
class ToggleHeaderTableColumnAction extends codeBlock.ModifyContentAction {
|
|
1147
|
-
constructor(tableCellHeaderRange, headerOn) {
|
|
1148
|
-
super();
|
|
1149
|
-
this.isFlushable = true;
|
|
1150
|
-
this.type = TOGGLE_HEADER_TABLE_COLUMN;
|
|
1151
|
-
this.headerOn = false;
|
|
1152
|
-
this.tableCellHeaderRange = tableCellHeaderRange;
|
|
1153
|
-
this.headerOn = headerOn;
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
exports.ColumnOperationType = void 0;
|
|
1158
|
-
(function (ColumnOperationType) {
|
|
1159
|
-
ColumnOperationType["HEADER_COLUMN"] = "HEADER_COLUMN";
|
|
1160
|
-
ColumnOperationType["ADD_COLUMN_LEFT"] = "ADD_COLUMN_LEFT";
|
|
1161
|
-
ColumnOperationType["ADD_COLUMN_RIGHT"] = "ADD_COLUMN_RIGHT";
|
|
1162
|
-
ColumnOperationType["DELETE_COLUMN"] = "DELETE_COLUMN";
|
|
1163
|
-
ColumnOperationType["SELECT_COLUMN"] = "SELECT_COLUMN";
|
|
1164
|
-
})(exports.ColumnOperationType || (exports.ColumnOperationType = {}));
|
|
1165
|
-
/**
|
|
1166
|
-
* Event handler for column operations in a table.
|
|
1167
|
-
*/
|
|
1168
|
-
class ColumnOperationEventHandler extends SettingEventHandler {
|
|
1169
|
-
/**
|
|
1170
|
-
* @inheritDoc
|
|
1171
|
-
*/
|
|
1172
|
-
canHandle(action) {
|
|
1173
|
-
return action[0] === exports.TableSettingType.COLUMN;
|
|
1174
|
-
}
|
|
1175
|
-
/**
|
|
1176
|
-
* @inheritDoc
|
|
1177
|
-
*/
|
|
1178
|
-
execute(action, extensionContext) {
|
|
1179
|
-
const selectedCells = extensionContext.tableSelection.getSelectedCells();
|
|
1180
|
-
if (!selectedCells || selectedCells.length === 0) {
|
|
1181
|
-
return;
|
|
1182
|
-
}
|
|
1183
|
-
const operation = action[1];
|
|
1184
|
-
switch (operation) {
|
|
1185
|
-
case exports.ColumnOperationType.ADD_COLUMN_LEFT:
|
|
1186
|
-
case exports.ColumnOperationType.ADD_COLUMN_RIGHT:
|
|
1187
|
-
this.handleInsertColumn(operation, selectedCells);
|
|
1188
|
-
break;
|
|
1189
|
-
case exports.ColumnOperationType.DELETE_COLUMN:
|
|
1190
|
-
this.handleDeleteColumn(selectedCells);
|
|
1191
|
-
break;
|
|
1192
|
-
case exports.ColumnOperationType.SELECT_COLUMN:
|
|
1193
|
-
this.handleSelectColumn(selectedCells, extensionContext);
|
|
1194
|
-
break;
|
|
1195
|
-
case exports.ColumnOperationType.HEADER_COLUMN:
|
|
1196
|
-
this.handleToggleHeaderColumn(selectedCells);
|
|
1197
|
-
break;
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
/**
|
|
1201
|
-
* Adds a new column to the table at the specified position.
|
|
1202
|
-
*
|
|
1203
|
-
* @param {ColumnOperationType} direction - The position to insert the new column (left or right).
|
|
1204
|
-
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
|
|
1205
|
-
*/
|
|
1206
|
-
handleInsertColumn(direction, selectedCells) {
|
|
1207
|
-
const action = new InsertTableColumnAction(direction === exports.ColumnOperationType.ADD_COLUMN_LEFT
|
|
1208
|
-
? exports.InsertTableColumnDirection.LEFT
|
|
1209
|
-
: exports.InsertTableColumnDirection.RIGHT, selectedCells);
|
|
1210
|
-
this.applyActionOnTable(action, selectedCells[0]);
|
|
1211
|
-
}
|
|
1212
|
-
/**
|
|
1213
|
-
* Deletes the selected column from the table.
|
|
1214
|
-
*
|
|
1215
|
-
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
|
|
1216
|
-
*/
|
|
1217
|
-
handleDeleteColumn(selectedCells) {
|
|
1218
|
-
const action = new DeleteTableColumnAction(selectedCells);
|
|
1219
|
-
this.applyActionOnTable(action, selectedCells[0]);
|
|
1220
|
-
}
|
|
1221
|
-
/**
|
|
1222
|
-
* Selects the entire column in the table.
|
|
1223
|
-
*
|
|
1224
|
-
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
|
|
1225
|
-
* @param {RTETableExtensionContext} extensionContext - The table extension context.
|
|
1226
|
-
*/
|
|
1227
|
-
handleSelectColumn(selectedCells, extensionContext) {
|
|
1228
|
-
const action = new SelectTableColumnAction(selectedCells, (allSelectedCells) => {
|
|
1229
|
-
extensionContext.tableSelection.setSelectedCells(allSelectedCells);
|
|
1230
|
-
});
|
|
1231
|
-
this.applyActionOnTable(action, selectedCells[0]);
|
|
1232
|
-
}
|
|
1233
|
-
/**
|
|
1234
|
-
* Toggles the header state of the selected column in the table.
|
|
1235
|
-
*
|
|
1236
|
-
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
|
|
1237
|
-
*/
|
|
1238
|
-
handleToggleHeaderColumn(selectedCells) {
|
|
1239
|
-
const headerOn = !ToggleHeaderTableColumnStrategy.isFullHeaderSelection(selectedCells);
|
|
1240
|
-
const action = new ToggleHeaderTableColumnAction(selectedCells, headerOn);
|
|
1241
|
-
this.applyActionOnTable(action, selectedCells[0]);
|
|
1242
|
-
}
|
|
1243
|
-
/**
|
|
1244
|
-
* Apply the specified action on the table containing the selected cell.
|
|
1245
|
-
*
|
|
1246
|
-
* @param {DeleteTableColumnAction | InsertTableColumnAction} action - The action to apply.
|
|
1247
|
-
* @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The selected table cell.
|
|
1248
|
-
*/
|
|
1249
|
-
applyActionOnTable(action, selectedCell) {
|
|
1250
|
-
const table = getParentBlockByType(selectedCell, RTETableBlock);
|
|
1251
|
-
if (table) {
|
|
1252
|
-
table.apply(action);
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
const RTE_TABLE_BORDER_STYLES = [
|
|
1258
|
-
'none',
|
|
1259
|
-
'solid',
|
|
1260
|
-
'dashed',
|
|
1261
|
-
'dotted',
|
|
1262
|
-
'double',
|
|
1263
|
-
'groove',
|
|
1264
|
-
'ridge',
|
|
1265
|
-
'inset',
|
|
1266
|
-
'outset',
|
|
1267
|
-
];
|
|
1268
|
-
const RTE_TABLE_DEFAULT_COLORS = [
|
|
1269
|
-
{ dark: '#04041C', light: '#FCFCFC' },
|
|
1270
|
-
{ dark: '#AA091C', light: '#FF4C61' },
|
|
1271
|
-
{ dark: '#974502', light: '#FDAB68' },
|
|
1272
|
-
{ dark: '#735C00', light: '#FFDC4C' },
|
|
1273
|
-
{ dark: '#2E6D18', light: '#7BDA58' },
|
|
1274
|
-
{ dark: '#287171', light: '#7BD1D1' },
|
|
1275
|
-
{ dark: '#595959', light: '#999999' },
|
|
1276
|
-
{ dark: '#FCFCFC', light: '#04041C' },
|
|
1277
|
-
];
|
|
1278
|
-
|
|
1279
|
-
exports.ColumnOperationEventHandler = ColumnOperationEventHandler;
|
|
1280
|
-
exports.DELETE_TABLE_COLUMN = DELETE_TABLE_COLUMN;
|
|
1281
|
-
exports.DELETE_TABLE_ROW = DELETE_TABLE_ROW;
|
|
1282
|
-
exports.INSERT_TABLE_COLUMN = INSERT_TABLE_COLUMN;
|
|
1283
|
-
exports.INSERT_TABLE_ROW = INSERT_TABLE_ROW;
|
|
1284
|
-
exports.RTETableAnnotation = RTETableAnnotation;
|
|
1285
|
-
exports.RTETableBlock = RTETableBlock;
|
|
1286
|
-
exports.RTETableBodyBlock = RTETableBodyBlock;
|
|
1287
|
-
exports.RTETableCellAnnotation = RTETableCellAnnotation;
|
|
1288
|
-
exports.RTETableCellBlock = RTETableCellBlock;
|
|
1289
|
-
exports.RTETableHeadBlock = RTETableHeadBlock;
|
|
1290
|
-
exports.RTETableHeadCellAnnotation = RTETableHeadCellAnnotation;
|
|
1291
|
-
exports.RTETableHeadCellBlock = RTETableHeadCellBlock;
|
|
1292
|
-
exports.RTETableRowBlock = RTETableRowBlock;
|
|
1293
|
-
exports.RTE_TABLE_BORDER_STYLES = RTE_TABLE_BORDER_STYLES;
|
|
1294
|
-
exports.RTE_TABLE_DEFAULT_COLORS = RTE_TABLE_DEFAULT_COLORS;
|
|
1295
|
-
exports.RowOperationEventHandler = RowOperationEventHandler;
|
|
1296
|
-
exports.SELECT_TABLE_COLUMN = SELECT_TABLE_COLUMN;
|
|
1297
|
-
exports.SettingEventHandler = SettingEventHandler;
|
|
1298
|
-
exports.TOGGLE_HEADER_ROW = TOGGLE_HEADER_ROW;
|
|
1299
|
-
exports.TOGGLE_HEADER_TABLE_COLUMN = TOGGLE_HEADER_TABLE_COLUMN;
|
|
1300
|
-
exports.TableColumnStrategy = TableColumnStrategy;
|
|
1301
|
-
exports.ToggleHeaderTableColumnStrategy = ToggleHeaderTableColumnStrategy;
|
|
1302
|
-
exports.generateTableBody = generateTableBody;
|
|
1303
|
-
exports.getAllTableRows = getAllTableRows;
|
|
1304
|
-
exports.getDefaultCellBlockTemplate = getDefaultCellBlockTemplate;
|
|
1305
|
-
exports.getFirstNode = getFirstNode;
|
|
1306
|
-
exports.getParentBlockByType = getParentBlockByType;
|