@heartlandone/vega 2.74.0-RTE-table-preview → 2.75.0-RTE-table-preview
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-6c9a0e62.js} +11 -10
- package/dist/cjs/{child-nodes-event-prevent-slimmer-536d29fc.js → child-nodes-event-prevent-slimmer-aca87dac.js} +1 -1
- package/dist/cjs/click-outside-only-to-dismiss-strategy-407f6d1e.js +32 -0
- package/dist/cjs/{code-block-22ee2550.js → code-block-d9001f03.js} +2 -2
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-3486cbc0.js → component-value-history-controller-slimmer.abstract-b00e9f58.js} +4 -4
- package/dist/cjs/{content-state-0be6fda3.js → content-state-466f277f.js} +3 -3
- package/dist/cjs/{date-required-rule-99cca681.js → date-required-rule-30ee62d0.js} +1 -1
- package/dist/cjs/{design-token-505997df.js → design-token-a569577e.js} +2 -2
- package/dist/cjs/{dom-node-subject-observer-factory-1c8f7880.js → dom-node-subject-observer-factory-b5e71bf6.js} +4 -0
- package/dist/cjs/{element-appender-slimmer-26420c09.js → element-appender-slimmer-b7fdd82e.js} +160 -36
- package/dist/cjs/{event-emit-slimmer-6a591353.js → event-emit-slimmer-2dacabbd.js} +2 -2
- package/dist/cjs/{form-field-controller-slimmer-56c551ea.js → form-field-controller-slimmer-3ea2464a.js} +2 -2
- package/dist/cjs/{image-annotation-action-462fd073.js → image-annotation-action-4435d531.js} +3 -31
- package/dist/cjs/{index-fc538f17.js → index-19e5b936.js} +1 -1
- package/dist/cjs/index.cjs.js +22 -22
- package/dist/cjs/{inject-keyboard-manager-a6101379.js → inject-keyboard-manager-d21b4387.js} +1 -1
- package/dist/cjs/{internal-vega-event-manager-d587a33c.js → internal-vega-event-manager-6befeb34.js} +13 -2
- package/dist/cjs/{keyboard-manager-d8adb0ed.js → keyboard-manager-3dea6b28.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-15e65357.js → keyboard-manager-slimmer-0d45f944.js} +1 -1
- package/dist/cjs/{language-extension-414149c2.js → language-extension-26331915.js} +2 -2
- package/dist/cjs/loader.cjs.js +15 -15
- package/dist/cjs/{month-view-generator-706c5477.js → month-view-generator-49cc5fc2.js} +1 -1
- package/dist/cjs/{public-rules-2d18cf41.js → public-rules-942bd931.js} +7 -7
- package/dist/cjs/{range-439a0c0c.js → range-cafe69a9.js} +1 -1
- package/dist/cjs/{responsive-format-facade-0ececeb3.js → responsive-format-facade-6c22bbbd.js} +5 -4
- package/dist/cjs/{rich-text-editor-required-rule-5a4f3626.js → rich-text-editor-required-rule-0dcb08c8.js} +1 -1
- package/dist/cjs/sanitize-fb222510.js +131 -0
- package/dist/cjs/{styles.constants-3aff0b56.js → split-cell-operation-9930fde8.js} +1230 -403
- package/dist/cjs/{string-format-strategy.abstract-a8264fca.js → string-format-strategy.abstract-63514c60.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-a8f4a9b1.js → string-input-formatter-slimmer-655d0322.js} +3 -3
- package/dist/cjs/{string-mask-strategy-4e7d3780.js → string-mask-strategy-d23ac21a.js} +2 -2
- package/dist/cjs/{style-formatter-142500c0.js → style-formatter-0e0ae896.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-011866d9.js → sub-state-notify-slimmer-3fa87162.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-23d43f1e.js → sub-state-observer-slimmer-77deba40.js} +1 -1
- package/dist/cjs/{table-extension-2a20da57.js → table-extension-5f27207f.js} +676 -373
- package/dist/cjs/{time-required-rule-9d39a620.js → time-required-rule-c96ecdc9.js} +1 -1
- package/dist/cjs/{type-guard-69d2cf01.js → type-guard-a0f026d8.js} +12 -0
- package/dist/cjs/{valid-credit-card-number-rule-9f40d1d9.js → valid-credit-card-number-rule-c854bed9.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +12 -12
- package/dist/cjs/vega-app-header-button.cjs.entry.js +13 -13
- package/dist/cjs/vega-banner.cjs.entry.js +3 -3
- package/dist/cjs/vega-box.cjs.entry.js +12 -12
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
- package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
- package/dist/cjs/vega-button-group_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
- package/dist/cjs/vega-button.cjs.entry.js +11 -11
- package/dist/cjs/vega-calendar_4.cjs.entry.js +8 -8
- package/dist/cjs/vega-card.cjs.entry.js +12 -12
- package/dist/cjs/vega-carousel.cjs.entry.js +11 -11
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-chip.cjs.entry.js +13 -13
- package/dist/cjs/vega-code-block.cjs.entry.js +10 -10
- package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/vega-combo-box.cjs.entry.js +11 -10
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +392 -345
- package/dist/cjs/vega-dialog_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-divider.cjs.entry.js +13 -13
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +40 -22
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
- package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -5
- package/dist/cjs/vega-flag-icon.cjs.entry.js +11 -11
- package/dist/cjs/vega-flex.cjs.entry.js +13 -13
- package/dist/cjs/vega-font.cjs.entry.js +12 -12
- package/dist/cjs/vega-form.cjs.entry.js +8 -8
- package/dist/cjs/vega-grid.cjs.entry.js +12 -12
- package/dist/cjs/vega-icon.cjs.entry.js +12 -12
- package/dist/cjs/vega-image-uploader.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-numeric.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-passcode.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-select.cjs.entry.js +21 -16
- package/dist/cjs/vega-input.cjs.entry.js +339 -98
- package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +12 -12
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination.cjs.entry.js +13 -13
- package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -16
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +143 -194
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +312 -104
- package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +15 -15
- package/dist/cjs/vega-signature-capture.cjs.entry.js +14 -14
- package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-table_11.cjs.entry.js +13 -13
- package/dist/cjs/vega-textarea.cjs.entry.js +6 -6
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +19 -18
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +14 -14
- package/dist/cjs/vega.cjs.js +15 -15
- package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +1 -1
- package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +1 -1
- package/dist/collection/components/vega-calendar/vega-calendar.js +1 -1
- package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +2 -1
- package/dist/collection/components/vega-date-picker/assets/icons.js +4 -1
- package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.js +2 -1
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +2 -2
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.js +109 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.js +4 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +42 -70
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +12 -56
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +435 -108
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +5 -0
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-search-controller.js +5 -1
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.js +7 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +3 -2
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +21 -6
- package/dist/collection/components/vega-field-label/vega-field-label.js +1 -1
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-render-mode-controller.js +51 -0
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +6 -0
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-suggestions-renderer.js +142 -0
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-renderer.js +12 -1
- package/dist/collection/components/vega-input/vega-input.js +200 -3
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +8 -3
- package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +9 -1
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.js +74 -28
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.js +120 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.js +143 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.js +80 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +9 -30
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +26 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +26 -11
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +52 -12
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.js +66 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +11 -6
- package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +8 -8
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +32 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +2 -9
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +4 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +19 -15
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.js +100 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.js +57 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +14 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +102 -13
- package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.js +51 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +253 -0
- 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 +33 -2
- 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 +1 -1
- 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 +38 -6
- 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 +1 -1
- 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 +20 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +24 -14
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +117 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +6 -4
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +6 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +15 -8
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +41 -46
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +69 -48
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +50 -54
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +106 -14
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +204 -9
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.js +32 -0
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +583 -6
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +114 -25
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +0 -5
- package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +1 -1
- package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-range-dropdown-controller.js +2 -1
- package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-single-dropdown-controller.js +2 -1
- package/dist/collection/constants/ui.js +2 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +13 -2
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +2 -0
- package/dist/collection/helpers/event-manager/test/component-event-id-map.test.js +3 -1
- package/dist/collection/helpers/event-manager/test/vega-event-manager.test.js +3 -1
- package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +60 -32
- package/dist/collection/helpers/slimmers/element-appender/test/element-appender-slimmer.test.js +3 -2
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/click-outside-only-to-dismiss-strategy.js +28 -0
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/click-trigger-strategy.js +33 -0
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/hover-trigger-strategy.js +42 -0
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/none-trigger-strategy.js +22 -0
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/trigger-strategy.interface.js +1 -0
- package/dist/collection/types/test/type-guard.test.js +8 -1
- package/dist/collection/types/type-guard.js +11 -0
- package/dist/collection/utils/sanitize.js +126 -0
- package/dist/collection/utils/test/sanitize.test.js +65 -0
- package/dist/esm/{app-globals-8b873b6f.js → app-globals-4146c01c.js} +9 -8
- package/dist/esm/{child-nodes-event-prevent-slimmer-a6afdb1e.js → child-nodes-event-prevent-slimmer-225e7b58.js} +1 -1
- package/dist/esm/click-outside-only-to-dismiss-strategy-3d286c1b.js +30 -0
- package/dist/esm/{code-block-76b29be1.js → code-block-36393b45.js} +3 -3
- package/dist/esm/{component-value-history-controller-slimmer.abstract-e1b0e163.js → component-value-history-controller-slimmer.abstract-82339b2b.js} +4 -4
- package/dist/esm/{content-state-03f1d302.js → content-state-e8ef033a.js} +3 -3
- package/dist/esm/{date-required-rule-a9980386.js → date-required-rule-47ecc28f.js} +1 -1
- package/dist/esm/{design-token-8fedb532.js → design-token-c57a58b4.js} +2 -2
- package/dist/esm/{dom-node-subject-observer-factory-e998eba4.js → dom-node-subject-observer-factory-d4e16f66.js} +3 -1
- package/dist/esm/{element-appender-slimmer-7b9326e2.js → element-appender-slimmer-a7341fc1.js} +160 -36
- package/dist/esm/{event-emit-slimmer-bbf6668c.js → event-emit-slimmer-1bb4b533.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-a0cff4d3.js → form-field-controller-slimmer-907bf7c2.js} +2 -2
- package/dist/esm/{image-annotation-action-47cdc068.js → image-annotation-action-82cef6e4.js} +4 -31
- package/dist/esm/{index-da7e5fe5.js → index-2466b0c0.js} +1 -1
- package/dist/esm/index.js +21 -21
- package/dist/esm/{inject-keyboard-manager-9241968c.js → inject-keyboard-manager-83d76ff5.js} +1 -1
- package/dist/esm/{internal-vega-event-manager-e799c54a.js → internal-vega-event-manager-2cbb828a.js} +13 -2
- package/dist/esm/{keyboard-manager-89acac79.js → keyboard-manager-c92808d8.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-e303cb7d.js → keyboard-manager-slimmer-79c78ce8.js} +1 -1
- package/dist/esm/{language-extension-de6e6caf.js → language-extension-dcc43702.js} +2 -2
- package/dist/esm/loader.js +15 -15
- package/dist/esm/{month-view-generator-4bec99fd.js → month-view-generator-16192182.js} +1 -1
- package/dist/esm/{public-rules-c48cc5c9.js → public-rules-b8ea651f.js} +7 -7
- package/dist/esm/{range-af6150a8.js → range-872aad9f.js} +1 -1
- package/dist/esm/{responsive-format-facade-16da4623.js → responsive-format-facade-9278eae4.js} +5 -4
- package/dist/esm/{rich-text-editor-required-rule-7255832e.js → rich-text-editor-required-rule-36dd4242.js} +1 -1
- package/dist/esm/sanitize-fd0cb40d.js +129 -0
- package/dist/esm/{styles.constants-0dd6f7fa.js → split-cell-operation-6749f654.js} +1218 -405
- package/dist/esm/{string-format-strategy.abstract-75540c16.js → string-format-strategy.abstract-fc60db79.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-82f85b0b.js → string-input-formatter-slimmer-7a1e8754.js} +3 -3
- package/dist/esm/{string-mask-strategy-4a18ed1a.js → string-mask-strategy-0b0accaa.js} +2 -2
- package/dist/esm/{style-formatter-6ca58f6b.js → style-formatter-e937952a.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-4060c333.js → sub-state-notify-slimmer-2ecdba12.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-bfa5e63e.js → sub-state-observer-slimmer-2d5dba8d.js} +1 -1
- package/dist/esm/{table-extension-c83b7a56.js → table-extension-6b31754b.js} +587 -283
- package/dist/esm/{time-required-rule-8ec1faf5.js → time-required-rule-5fa43804.js} +1 -1
- package/dist/esm/{type-guard-b48aec98.js → type-guard-c65a227d.js} +12 -1
- package/dist/esm/{valid-credit-card-number-rule-96eaf9b1.js → valid-credit-card-number-rule-666c415d.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +12 -12
- package/dist/esm/vega-app-header-button.entry.js +13 -13
- package/dist/esm/vega-banner.entry.js +3 -3
- package/dist/esm/vega-box.entry.js +12 -12
- package/dist/esm/vega-breadcrumb.entry.js +4 -4
- package/dist/esm/vega-button-circle.entry.js +12 -12
- package/dist/esm/vega-button-group_2.entry.js +6 -6
- package/dist/esm/vega-button-link.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +11 -11
- package/dist/esm/vega-calendar_4.entry.js +8 -8
- package/dist/esm/vega-card.entry.js +12 -12
- package/dist/esm/vega-carousel.entry.js +11 -11
- package/dist/esm/vega-checkbox_2.entry.js +6 -6
- package/dist/esm/vega-chip.entry.js +13 -13
- package/dist/esm/vega-code-block.entry.js +10 -10
- package/dist/esm/vega-color-picker.entry.js +5 -5
- package/dist/esm/vega-combo-box.entry.js +11 -10
- package/dist/esm/vega-date-picker_2.entry.js +392 -345
- package/dist/esm/vega-dialog_2.entry.js +14 -14
- package/dist/esm/vega-divider.entry.js +13 -13
- package/dist/esm/vega-dropdown_5.entry.js +40 -22
- 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 +5 -5
- package/dist/esm/vega-flag-icon.entry.js +11 -11
- package/dist/esm/vega-flex.entry.js +13 -13
- package/dist/esm/vega-font.entry.js +12 -12
- package/dist/esm/vega-form.entry.js +8 -8
- package/dist/esm/vega-grid.entry.js +12 -12
- package/dist/esm/vega-icon.entry.js +12 -12
- package/dist/esm/vega-image-uploader.entry.js +14 -14
- package/dist/esm/vega-input-credit-card.entry.js +10 -10
- package/dist/esm/vega-input-numeric.entry.js +10 -10
- package/dist/esm/vega-input-passcode.entry.js +9 -9
- package/dist/esm/vega-input-phone-number.entry.js +14 -14
- package/dist/esm/vega-input-range.entry.js +6 -6
- package/dist/esm/vega-input-select.entry.js +21 -16
- package/dist/esm/vega-input.entry.js +340 -99
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +12 -12
- package/dist/esm/vega-loader-wrapper_2.entry.js +13 -13
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +1 -1
- package/dist/esm/vega-pagination.entry.js +13 -13
- package/dist/esm/vega-popover_2.entry.js +15 -15
- package/dist/esm/vega-progress-tracker_2.entry.js +12 -12
- package/dist/esm/vega-radio_2.entry.js +9 -9
- package/dist/esm/vega-rich-text-content.entry.js +14 -17
- package/dist/esm/vega-rich-text-editor_4.entry.js +144 -195
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +293 -85
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +14 -14
- package/dist/esm/vega-selection-tile_2.entry.js +7 -7
- package/dist/esm/vega-sidenav_3.entry.js +15 -15
- package/dist/esm/vega-signature-capture.entry.js +14 -14
- package/dist/esm/vega-stepper.entry.js +6 -6
- package/dist/esm/vega-tab-group_2.entry.js +4 -4
- package/dist/esm/vega-table_11.entry.js +13 -13
- package/dist/esm/vega-textarea.entry.js +6 -6
- package/dist/esm/vega-time-picker_2.entry.js +19 -18
- package/dist/esm/vega-toggle-switch.entry.js +5 -5
- package/dist/esm/vega-tooltip_2.entry.js +14 -14
- package/dist/esm/vega.js +15 -15
- package/dist/sri/vega-sri-manifest.json +339 -715
- package/dist/types/components/vega-date-picker/assets/icons.d.ts +1 -1
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.d.ts +20 -0
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +1 -0
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.d.ts +4 -11
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +4 -9
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +2 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.d.ts +2 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +9 -4
- package/dist/types/components/vega-input/slimmers/controllers/vega-input-render-mode-controller.d.ts +27 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +1 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-suggestions-renderer.d.ts +40 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-renderer.d.ts +3 -0
- package/dist/types/components/vega-input/types.d.ts +4 -0
- package/dist/types/components/vega-input/vega-input.d.ts +55 -1
- package/dist/types/components/vega-rich-text-content/vega-rich-text-content.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-attribute-annotation.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +0 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.d.ts +38 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.d.ts +43 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.d.ts +33 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +15 -6
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +11 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.d.ts +43 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +1 -8
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.d.ts +44 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +3 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.d.ts +26 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +102 -2
- 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 +16 -1
- 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 +18 -6
- 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 +7 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +14 -11
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.d.ts +3 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.d.ts +23 -0
- 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 +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +9 -6
- package/dist/types/components/vega-rich-text-editor/interface.d.ts +0 -5
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +8 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +0 -2
- package/dist/types/components.d.ts +72 -30
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +2 -0
- package/dist/types/helpers/slimmers/element-appender/element-appender-slimmer.d.ts +4 -9
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/click-outside-only-to-dismiss-strategy.d.ts +21 -0
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/click-trigger-strategy.d.ts +21 -0
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/hover-trigger-strategy.d.ts +22 -0
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/none-trigger-strategy.d.ts +18 -0
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/trigger-strategy.interface.d.ts +37 -0
- package/dist/types/types/components.type.d.ts +3 -1
- package/dist/types/types/type-guard.d.ts +8 -0
- package/dist/types/types/ui.type.d.ts +9 -0
- package/dist/types/utils/sanitize.d.ts +71 -0
- package/dist/types/utils/spec-utils.d.ts +2 -0
- package/dist/types/utils/test/sanitize.test.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -57
- package/dist/vega/{p-780cbfb0.entry.js → p-01dc2e48.entry.js} +1 -1
- package/dist/vega/p-0459a474.entry.js +1 -0
- package/dist/vega/p-0770a0eb.entry.js +1 -0
- package/dist/vega/{p-a924c1e2.entry.js → p-0bf4a3a7.entry.js} +1 -1
- package/dist/vega/{p-ff9a0e6e.js → p-0d57293b.js} +1 -1
- package/dist/vega/{p-22da15d7.entry.js → p-1199ebf6.entry.js} +1 -1
- package/dist/vega/p-11a6c1b7.js +1 -0
- package/dist/vega/{p-79e8236a.entry.js → p-1415d93b.entry.js} +1 -1
- package/dist/vega/p-1431c8b9.js +1 -0
- package/dist/vega/p-18560714.entry.js +1 -0
- package/dist/vega/{p-a007b493.entry.js → p-1a161082.entry.js} +1 -1
- package/dist/vega/{p-161b9c5b.js → p-1f83cebf.js} +1 -1
- package/dist/vega/{p-16af7681.js → p-20010bd6.js} +1 -1
- package/dist/vega/p-205d8401.js +1 -0
- package/dist/vega/{p-29a9c8f5.entry.js → p-20a98a99.entry.js} +1 -1
- package/dist/vega/{p-86caa739.entry.js → p-228784f7.entry.js} +1 -1
- package/dist/vega/{p-b91c2c9d.js → p-22989693.js} +1 -1
- package/dist/vega/{p-1bda4016.entry.js → p-273911b2.entry.js} +1 -1
- package/dist/vega/{p-e797bf8d.entry.js → p-28e630b2.entry.js} +1 -1
- package/dist/vega/{p-d466baf7.js → p-29f6b2d5.js} +1 -1
- package/dist/vega/{p-6d9731c1.entry.js → p-2af2e1ad.entry.js} +1 -1
- package/dist/vega/{p-d55365b9.entry.js → p-2af78c38.entry.js} +1 -1
- package/dist/vega/{p-c3d388b5.entry.js → p-2c830cba.entry.js} +1 -1
- package/dist/vega/{p-61ae4e9c.entry.js → p-3224d794.entry.js} +1 -1
- package/dist/vega/{p-216f3436.entry.js → p-326b5392.entry.js} +1 -1
- package/dist/vega/{p-69af3422.entry.js → p-3413a678.entry.js} +1 -1
- package/dist/vega/p-3532aa12.js +1 -0
- package/dist/vega/p-395cdd84.entry.js +1 -0
- package/dist/vega/{p-9aac9879.entry.js → p-3a6ff599.entry.js} +1 -1
- package/dist/vega/p-3be82c0f.entry.js +1 -0
- package/dist/vega/p-3c0f55f7.entry.js +1 -0
- package/dist/vega/{p-10ffb765.js → p-3e30567a.js} +1 -1
- package/dist/vega/p-3e5f362f.js +1 -0
- package/dist/vega/p-42cd1fde.js +1 -0
- package/dist/vega/p-476a173a.js +1 -0
- package/dist/vega/p-4b6c60cb.entry.js +1 -0
- package/dist/vega/{p-12a97dad.entry.js → p-4c36b528.entry.js} +1 -1
- package/dist/vega/{p-fa34ace2.entry.js → p-4ecf0ee7.entry.js} +1 -1
- package/dist/vega/{p-813b2915.entry.js → p-4f4c7593.entry.js} +1 -1
- package/dist/vega/p-585edae4.entry.js +1 -0
- package/dist/vega/{p-39d56e3d.js → p-5b048141.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-63246470.js → p-5fdb9047.js} +1 -1
- package/dist/vega/{p-d4e35d2e.entry.js → p-60483e3d.entry.js} +1 -1
- package/dist/vega/{p-de70aac1.js → p-60851f9d.js} +1 -1
- package/dist/vega/{p-73688c4e.entry.js → p-61145506.entry.js} +1 -1
- package/dist/vega/{p-8162980c.js → p-61ddae59.js} +1 -1
- package/dist/vega/{p-98b78c75.entry.js → p-64386be8.entry.js} +1 -1
- package/dist/vega/{p-73689ec0.entry.js → p-6490b69a.entry.js} +1 -1
- package/dist/vega/{p-50a506ea.entry.js → p-6bc1552e.entry.js} +1 -1
- package/dist/vega/{p-206245d2.entry.js → p-6e4e7192.entry.js} +1 -1
- package/dist/vega/{p-8ac453cb.entry.js → p-76d144f5.entry.js} +1 -1
- package/dist/vega/{p-dc2813eb.entry.js → p-76eb9cd0.entry.js} +1 -1
- package/dist/vega/{p-e788598a.entry.js → p-77c9949d.entry.js} +1 -1
- package/dist/vega/p-8187878e.js +1 -0
- package/dist/vega/p-8198a77c.js +1 -0
- package/dist/vega/{p-0e4cecbd.entry.js → p-82ad1006.entry.js} +1 -1
- package/dist/vega/{p-8a4d8139.entry.js → p-839c9d62.entry.js} +1 -1
- package/dist/vega/{p-d07d04e0.entry.js → p-849f78a7.entry.js} +1 -1
- package/dist/vega/{p-ac4bd1f8.js → p-85bfa0f7.js} +1 -1
- package/dist/vega/{p-dd5d917b.entry.js → p-87764570.entry.js} +1 -1
- package/dist/vega/{p-abf871cd.entry.js → p-88c894e8.entry.js} +1 -1
- package/dist/vega/{p-c00adad9.js → p-89083d63.js} +1 -1
- package/dist/vega/{p-a8dad05d.js → p-920719ad.js} +1 -1
- package/dist/vega/p-9472d19a.js +1 -0
- package/dist/vega/{p-c6d98c60.entry.js → p-96657262.entry.js} +1 -1
- package/dist/vega/p-979e4bd4.entry.js +1 -0
- package/dist/vega/{p-f6eab527.entry.js → p-9c624e03.entry.js} +1 -1
- package/dist/vega/{p-088f4613.entry.js → p-a01f985f.entry.js} +1 -1
- package/dist/vega/{p-a4ec6575.js → p-a2aeb646.js} +1 -1
- package/dist/vega/{p-22c76be7.entry.js → p-a495463f.entry.js} +1 -1
- package/dist/vega/p-b4ea3fad.js +1 -0
- package/dist/vega/{p-151b1deb.js → p-b56b0b89.js} +1 -1
- package/dist/vega/{p-3bc7e162.entry.js → p-b5b75a2f.entry.js} +1 -1
- package/dist/vega/{p-d991fb11.js → p-badad9ed.js} +1 -1
- package/dist/vega/{p-24766b9d.entry.js → p-bccaf3d2.entry.js} +1 -1
- package/dist/vega/{p-e13c163c.entry.js → p-bde5c990.entry.js} +1 -1
- package/dist/vega/{p-ab0e013c.entry.js → p-beb6c1ce.entry.js} +1 -1
- package/dist/vega/{p-068ee55e.entry.js → p-c02b01ec.entry.js} +1 -1
- package/dist/vega/p-c1fdcb62.js +1 -0
- package/dist/vega/{p-5d2704c1.entry.js → p-c5e7035b.entry.js} +1 -1
- package/dist/vega/{p-5367eaab.js → p-c841be8d.js} +1 -1
- package/dist/vega/{p-6f08e3e1.entry.js → p-cd078909.entry.js} +1 -1
- package/dist/vega/{p-d1d0f08a.js → p-d0e31633.js} +1 -1
- package/dist/vega/{p-a439e59b.entry.js → p-d5c09a94.entry.js} +1 -1
- package/dist/vega/{p-c8ad47c9.js → p-d907f8a2.js} +1 -1
- package/dist/vega/{p-6c1ef2ed.js → p-dd11f735.js} +1 -1
- package/dist/vega/{p-c9541fc2.entry.js → p-de850e98.entry.js} +1 -1
- package/dist/vega/{p-3d85411d.js → p-e16b3adf.js} +1 -1
- package/dist/vega/{p-34a994a1.entry.js → p-e1dd23f8.entry.js} +1 -1
- package/dist/vega/{p-7ca9f6f1.js → p-e1de1cdc.js} +1 -1
- package/dist/vega/{p-1f4a814e.entry.js → p-e7cfb6b6.entry.js} +1 -1
- package/dist/vega/{p-ddf81373.js → p-e819940c.js} +1 -1
- package/dist/vega/{p-e0cefd90.entry.js → p-e95ed6f3.entry.js} +1 -1
- package/dist/vega/p-ebb14c84.js +1 -0
- package/dist/vega/{p-f519cdc3.entry.js → p-f0a8aed3.entry.js} +1 -1
- package/dist/vega/p-f2b8abd3.entry.js +1 -0
- package/dist/vega/{p-d4719c14.entry.js → p-fb238751.entry.js} +1 -1
- package/dist/vega/p-fdebc47f.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -172
- package/package.json +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.js +0 -51
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.js +0 -26
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.d.ts +0 -22
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.d.ts +0 -22
- 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-08b4d097.entry.js +0 -1
- package/dist/vega/p-207cfa6a.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-40660c09.js +0 -1
- package/dist/vega/p-550ce71a.entry.js +0 -1
- package/dist/vega/p-6665d083.entry.js +0 -1
- package/dist/vega/p-7172332a.entry.js +0 -1
- package/dist/vega/p-82ec9721.entry.js +0 -1
- package/dist/vega/p-99e3dcab.js +0 -1
- package/dist/vega/p-9a83a6b0.js +0 -1
- package/dist/vega/p-a4d0ab07.js +0 -1
- package/dist/vega/p-a6e03df4.entry.js +0 -1
- package/dist/vega/p-c335088c.js +0 -1
- package/dist/vega/p-c674b07c.js +0 -1
- package/dist/vega/p-d1349401.entry.js +0 -1
- package/dist/vega/p-d2033624.js +0 -1
- package/dist/vega/p-db482ee1.js +0 -1
- package/dist/vega/p-f4b46f6b.entry.js +0 -1
- package/dist/vega/p-fbfb4c70.entry.js +0 -1
- package/dist/vega/p-ff57c872.js +0 -1
- package/dist/vega/p-ff921d10.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
|
@@ -5,20 +5,19 @@ const ui = require('./ui-9e181079.js');
|
|
|
5
5
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
6
6
|
const dynamicSlimmer = require('./dynamic-slimmer-f31fdfd7.js');
|
|
7
7
|
const pageResizeObserverSlimmer = require('./page-resize-observer-slimmer-11937d6f.js');
|
|
8
|
-
const
|
|
9
|
-
const internalVegaEventManager = require('./internal-vega-event-manager-d587a33c.js');
|
|
8
|
+
const internalVegaEventManager = require('./internal-vega-event-manager-6befeb34.js');
|
|
10
9
|
const number = require('./number-4816603d.js');
|
|
11
|
-
const contentState = require('./content-state-
|
|
12
|
-
const codeBlock = require('./code-block-
|
|
13
|
-
const typeGuard = require('./type-guard-
|
|
10
|
+
const contentState = require('./content-state-466f277f.js');
|
|
11
|
+
const codeBlock = require('./code-block-d9001f03.js');
|
|
12
|
+
const typeGuard = require('./type-guard-a0f026d8.js');
|
|
14
13
|
require('./translation-5f9f9c0c.js');
|
|
15
14
|
const internalIconManager = require('./internal-icon-manager-32f9ed63.js');
|
|
16
|
-
const
|
|
15
|
+
const splitCellOperation = require('./split-cell-operation-9930fde8.js');
|
|
17
16
|
const object = require('./object-e2e28e3d.js');
|
|
18
17
|
const dtoRendererManager = require('./dto-renderer-manager-ae5fcbba.js');
|
|
19
18
|
const baseRenderer = require('./base-renderer-0a3b62b7.js');
|
|
20
19
|
const remoteInvocationRegistry = require('./remote-invocation-registry-fc22fdd0.js');
|
|
21
|
-
const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-factory-
|
|
20
|
+
const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-factory-b5e71bf6.js');
|
|
22
21
|
const vegaInternalEventId = require('./vega-internal-event-id-73334b4b.js');
|
|
23
22
|
const tryGetDocument = require('./try-get-document-c0ebd39a.js');
|
|
24
23
|
const pixel = require('./pixel-98f2a10c.js');
|
|
@@ -68,7 +67,7 @@ const VegaLoaderRuntimeMetricsPayloadDefinition = [
|
|
|
68
67
|
},
|
|
69
68
|
];
|
|
70
69
|
|
|
71
|
-
var __decorate$
|
|
70
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
72
71
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
73
72
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
74
73
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -190,7 +189,7 @@ class VegaLoaderController {
|
|
|
190
189
|
}
|
|
191
190
|
}
|
|
192
191
|
VegaLoaderController.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY = ['VEGA-MODAL'];
|
|
193
|
-
__decorate$
|
|
192
|
+
__decorate$5([
|
|
194
193
|
createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
|
|
195
194
|
], VegaLoaderController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
196
195
|
const VegaLoader = new VegaLoaderController();
|
|
@@ -432,7 +431,7 @@ const VegaNotifyRuntimeMetricsPayloadDefinition = [
|
|
|
432
431
|
},
|
|
433
432
|
];
|
|
434
433
|
|
|
435
|
-
var __decorate$
|
|
434
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
436
435
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
437
436
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
438
437
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -543,183 +542,14 @@ class VegaNotifyController {
|
|
|
543
542
|
return this.container;
|
|
544
543
|
}
|
|
545
544
|
}
|
|
546
|
-
__decorate$
|
|
545
|
+
__decorate$4([
|
|
547
546
|
globalSlimmerRegistry.InjectVegaSlimmer()
|
|
548
547
|
], VegaNotifyController.prototype, "resizeObserverSlimmer", void 0);
|
|
549
|
-
__decorate$
|
|
548
|
+
__decorate$4([
|
|
550
549
|
createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
|
|
551
550
|
], VegaNotifyController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
552
551
|
const VegaNotify = new VegaNotifyController();
|
|
553
552
|
|
|
554
|
-
const ThemeManagerRuntimeMetricsPayloadDefinition = [
|
|
555
|
-
{
|
|
556
|
-
payloadKey: 'IS_OVERRIDECOLORS_METHOD_CALLED',
|
|
557
|
-
payloadDescription: 'Indicate if the method overrideColors of public API ThemeManager is called',
|
|
558
|
-
/**
|
|
559
|
-
* Indicate whether the method is collected when the method been called .
|
|
560
|
-
*
|
|
561
|
-
* @param {string} scope - The class name of public api
|
|
562
|
-
* @param {string} methodName - The method name called by the public api
|
|
563
|
-
* @returns {boolean} A boolean value
|
|
564
|
-
*/
|
|
565
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'overrideColors',
|
|
566
|
-
/**
|
|
567
|
-
* The function checks if the method is be called.
|
|
568
|
-
*
|
|
569
|
-
* @returns {boolean} A boolean value
|
|
570
|
-
*/
|
|
571
|
-
payloadValue: () => {
|
|
572
|
-
return true;
|
|
573
|
-
},
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
payloadKey: 'IS_RESET_METHOD_CALLED',
|
|
577
|
-
payloadDescription: 'Indicate if the method reset of public API ThemeManager is called',
|
|
578
|
-
/**
|
|
579
|
-
* Indicate whether the method is collected when the method been called .
|
|
580
|
-
*
|
|
581
|
-
* @param {string} scope - The class name of public api
|
|
582
|
-
* @param {string} methodName - The method name called by the public api
|
|
583
|
-
* @returns {boolean} A boolean value
|
|
584
|
-
*/
|
|
585
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'reset',
|
|
586
|
-
/**
|
|
587
|
-
* The function checks if the method is be called.
|
|
588
|
-
*
|
|
589
|
-
* @returns {boolean} A boolean value
|
|
590
|
-
*/
|
|
591
|
-
payloadValue: () => {
|
|
592
|
-
return true;
|
|
593
|
-
},
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
payloadKey: 'IS_TOGGLEDARKMODE_METHOD_CALLED',
|
|
597
|
-
payloadDescription: 'Indicate if the method toggleDarkMode of public API ThemeManager is called',
|
|
598
|
-
/**
|
|
599
|
-
* Indicate whether the method is collected when the method been called .
|
|
600
|
-
*
|
|
601
|
-
* @param {string} scope - The class name of public api
|
|
602
|
-
* @param {string} methodName - The method name called by the public api
|
|
603
|
-
* @returns {boolean} A boolean value
|
|
604
|
-
*/
|
|
605
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'toggleDarkMode',
|
|
606
|
-
/**
|
|
607
|
-
* The function checks if the method is be called.
|
|
608
|
-
*
|
|
609
|
-
* @returns {boolean} A boolean value
|
|
610
|
-
*/
|
|
611
|
-
payloadValue: () => {
|
|
612
|
-
return true;
|
|
613
|
-
},
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
payloadKey: 'IS_ISDARKMODE_METHOD_CALLED',
|
|
617
|
-
payloadDescription: 'Indicate if the method isDarkMode of public API ThemeManager is called',
|
|
618
|
-
/**
|
|
619
|
-
* Indicate whether the method is collected when the method been called .
|
|
620
|
-
*
|
|
621
|
-
* @param {string} scope - The class name of public api
|
|
622
|
-
* @param {string} methodName - The method name called by the public api
|
|
623
|
-
* @returns {boolean} A boolean value
|
|
624
|
-
*/
|
|
625
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'isDarkMode',
|
|
626
|
-
/**
|
|
627
|
-
* The function checks if the method is be called.
|
|
628
|
-
*
|
|
629
|
-
* @returns {boolean} A boolean value
|
|
630
|
-
*/
|
|
631
|
-
payloadValue: () => {
|
|
632
|
-
return true;
|
|
633
|
-
},
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
payloadKey: 'IS_APPLY_BRANDING_METHOD_CALLED',
|
|
637
|
-
payloadDescription: 'Indicate if the method applyBranding of public API ThemeManager is called',
|
|
638
|
-
/**
|
|
639
|
-
* Indicate whether the method is collected when the method been called .
|
|
640
|
-
*
|
|
641
|
-
* @param {string} scope - The class name of public api
|
|
642
|
-
* @param {string} methodName - The method name called by the public api
|
|
643
|
-
* @returns {boolean} A boolean value
|
|
644
|
-
*/
|
|
645
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'applyBranding',
|
|
646
|
-
/**
|
|
647
|
-
* The function checks if the method is be called.
|
|
648
|
-
*
|
|
649
|
-
* @returns {boolean} A boolean value
|
|
650
|
-
*/
|
|
651
|
-
payloadValue: () => {
|
|
652
|
-
return true;
|
|
653
|
-
},
|
|
654
|
-
},
|
|
655
|
-
];
|
|
656
|
-
|
|
657
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
658
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
659
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
660
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
661
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
662
|
-
};
|
|
663
|
-
/**
|
|
664
|
-
* Vega components theme manager
|
|
665
|
-
*/
|
|
666
|
-
class ThemeManager {
|
|
667
|
-
constructor() {
|
|
668
|
-
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicApiRuntimeMetricsSlimmer.createPublicAPIRuntimeMetricsSlimmer(ThemeManager, ['overrideColors', 'reset', 'toggleDarkMode', 'isDarkMode', 'applyBranding'], ThemeManagerRuntimeMetricsPayloadDefinition);
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* It takes the colors you passed in, parses them into the correct format, and then applies them to the theme
|
|
672
|
-
*
|
|
673
|
-
* @param {VegaThemeOverrideColors} overrideColors - OverrideColors - This is the object that you pass to the function.
|
|
674
|
-
* @vegaVersion 1.20.0
|
|
675
|
-
*/
|
|
676
|
-
async overrideColors(overrideColors) {
|
|
677
|
-
void darkModeStyleController.VegaInternalThemeManager.overrideColors(overrideColors);
|
|
678
|
-
}
|
|
679
|
-
/**
|
|
680
|
-
* It removes all the custom override theme styles from the DOM
|
|
681
|
-
*
|
|
682
|
-
* @vegaVersion 1.20.0
|
|
683
|
-
*/
|
|
684
|
-
async reset() {
|
|
685
|
-
void darkModeStyleController.VegaInternalThemeManager.reset();
|
|
686
|
-
}
|
|
687
|
-
/**
|
|
688
|
-
* This function toggles the dark mode of a webpage by adding or removing a 'dark' class to the HTML element.
|
|
689
|
-
*
|
|
690
|
-
* @param {boolean | undefined} darkMode - A boolean or undefined value that determines whether to enable or disable dark mode.
|
|
691
|
-
* If it is true, dark mode is enabled.
|
|
692
|
-
* If it is false, dark mode is disabled.
|
|
693
|
-
* @vegaVersion 1.32.0
|
|
694
|
-
*/
|
|
695
|
-
toggleDarkMode(darkMode) {
|
|
696
|
-
darkModeStyleController.VegaInternalThemeManager.toggleDarkMode(darkMode);
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* The function checks if the HTML element has a class of "dark" and returns a boolean value accordingly.
|
|
700
|
-
*
|
|
701
|
-
* @returns {boolean} A boolean value indicating whether the HTML element has a class of "dark", which is
|
|
702
|
-
* typically used to indicate that the website is in dark mode.
|
|
703
|
-
* @vegaVersion 1.32.0
|
|
704
|
-
*/
|
|
705
|
-
isDarkMode() {
|
|
706
|
-
return darkModeStyleController.VegaInternalThemeManager.isDarkMode();
|
|
707
|
-
}
|
|
708
|
-
/**
|
|
709
|
-
* This function switches the Vega theme to a brand theme based on the provided options.
|
|
710
|
-
*
|
|
711
|
-
* @param {BrandOptions} options - The options includes 'gp', 'genius' and 'heartland' options
|
|
712
|
-
* @vegaVersion 2.47.0
|
|
713
|
-
*/
|
|
714
|
-
applyBranding(options) {
|
|
715
|
-
darkModeStyleController.VegaInternalThemeManager.applyBranding(options);
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
__decorate$4([
|
|
719
|
-
createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
|
|
720
|
-
], ThemeManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
721
|
-
const VegaThemeManager = new ThemeManager();
|
|
722
|
-
|
|
723
553
|
const VegaDialogRuntimeMetricsPayloadDefinition = [
|
|
724
554
|
{
|
|
725
555
|
payloadKey: 'IS_OPEN_METHOD_CALLED',
|
|
@@ -2951,7 +2781,7 @@ class DeleteTableBlockAction extends codeBlock.ModifyContentAction {
|
|
|
2951
2781
|
class RTETableCaptionAnnotation extends codeBlock.BlockAnnotation {
|
|
2952
2782
|
constructor() {
|
|
2953
2783
|
super(...arguments);
|
|
2954
|
-
this.type =
|
|
2784
|
+
this.type = splitCellOperation.RTETableExtensionAnnotationTypeEnum.CAPTION;
|
|
2955
2785
|
}
|
|
2956
2786
|
/**
|
|
2957
2787
|
* @inheritDoc
|
|
@@ -3010,7 +2840,7 @@ class RTETableCaptionBlock extends codeBlock.RTEBlock {
|
|
|
3010
2840
|
this.type = 'table-caption';
|
|
3011
2841
|
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
3012
2842
|
if (autoMatchFormat) {
|
|
3013
|
-
this.annotationMap.set(
|
|
2843
|
+
this.annotationMap.set(splitCellOperation.RTETableExtensionAnnotationTypeEnum.CAPTION, new RTETableCaptionAnnotation());
|
|
3014
2844
|
}
|
|
3015
2845
|
}
|
|
3016
2846
|
/**
|
|
@@ -3080,12 +2910,12 @@ class TableCaptionAction extends codeBlock.ModifyContentAction {
|
|
|
3080
2910
|
/**
|
|
3081
2911
|
* Event handler for row operations in a table.
|
|
3082
2912
|
*/
|
|
3083
|
-
class CaptionOperationEventHandler extends
|
|
2913
|
+
class CaptionOperationEventHandler extends splitCellOperation.SettingEventHandler {
|
|
3084
2914
|
/**
|
|
3085
2915
|
* @inheritDoc
|
|
3086
2916
|
*/
|
|
3087
2917
|
canHandle(action) {
|
|
3088
|
-
return action[0] ===
|
|
2918
|
+
return action[0] === splitCellOperation.TableSettingType.CAPTION;
|
|
3089
2919
|
}
|
|
3090
2920
|
/**
|
|
3091
2921
|
* Toggle caption state for the target table block when the caption menu item is clicked.
|
|
@@ -3158,9 +2988,11 @@ class CaptionOperationEventHandler extends styles_constants.SettingEventHandler
|
|
|
3158
2988
|
class TableSettingPopoverRenderer {
|
|
3159
2989
|
constructor() {
|
|
3160
2990
|
this.settingHandlers = [
|
|
3161
|
-
new
|
|
2991
|
+
new splitCellOperation.RowOperationEventHandler(),
|
|
3162
2992
|
new CaptionOperationEventHandler(),
|
|
3163
|
-
new
|
|
2993
|
+
new splitCellOperation.ColumnOperationEventHandler(),
|
|
2994
|
+
new splitCellOperation.MergeCellsOperationEventHandler(),
|
|
2995
|
+
new splitCellOperation.SplitCellOperationEventHandler(),
|
|
3164
2996
|
];
|
|
3165
2997
|
/**
|
|
3166
2998
|
* Show table setting popover when table is clicked.
|
|
@@ -3202,11 +3034,11 @@ class TableSettingPopoverRenderer {
|
|
|
3202
3034
|
const handler = this.settingHandlers.find((handler) => handler.canHandle(event.detail));
|
|
3203
3035
|
if (handler) {
|
|
3204
3036
|
handler.execute(event.detail, this.extensionContext, this.tableData);
|
|
3205
|
-
if (event.detail[0] ===
|
|
3037
|
+
if (event.detail[0] === splitCellOperation.TableSettingType.CAPTION) {
|
|
3206
3038
|
this.updateTableSettingCaption();
|
|
3207
3039
|
}
|
|
3208
3040
|
}
|
|
3209
|
-
if (event.detail[0] ===
|
|
3041
|
+
if (event.detail[0] === splitCellOperation.TableSettingType.TABLE || event.detail[0] === splitCellOperation.TableSettingType.CELL) {
|
|
3210
3042
|
void this.popoverRef.hide();
|
|
3211
3043
|
void this.tableDynamicPopover.show(event.detail[0]);
|
|
3212
3044
|
}
|
|
@@ -3303,7 +3135,7 @@ class TablePropertiesEventHandler {
|
|
|
3303
3135
|
* @returns {RTETablePropertiesType} The generated form object
|
|
3304
3136
|
*/
|
|
3305
3137
|
static generateTablePropertiesForm(tableBlock) {
|
|
3306
|
-
const annotation = tableBlock.annotationMap.get(
|
|
3138
|
+
const annotation = tableBlock.annotationMap.get(splitCellOperation.RTETableExtensionAnnotationTypeEnum.TABLE);
|
|
3307
3139
|
let result = {
|
|
3308
3140
|
borderStyle: 'none',
|
|
3309
3141
|
borderColor: '',
|
|
@@ -3372,7 +3204,7 @@ class UpdateTablePropertiesAction extends codeBlock.AnnotationAction {
|
|
|
3372
3204
|
* @returns {RTETableAnnotation} The generated annotation
|
|
3373
3205
|
*/
|
|
3374
3206
|
toAnnotation() {
|
|
3375
|
-
return new
|
|
3207
|
+
return new splitCellOperation.RTETableAnnotation(this.tableProperties);
|
|
3376
3208
|
}
|
|
3377
3209
|
}
|
|
3378
3210
|
|
|
@@ -3446,7 +3278,7 @@ class RTETableCellAnnotationsAction extends codeBlock.AnnotationAction {
|
|
|
3446
3278
|
* @inheritDoc
|
|
3447
3279
|
*/
|
|
3448
3280
|
toAnnotation() {
|
|
3449
|
-
return new
|
|
3281
|
+
return new splitCellOperation.RTETableCellAnnotation(this.cellAnnotation);
|
|
3450
3282
|
}
|
|
3451
3283
|
}
|
|
3452
3284
|
|
|
@@ -3463,7 +3295,7 @@ class RTETableHeadCellAnnotationsAction extends codeBlock.AnnotationAction {
|
|
|
3463
3295
|
* @inheritDoc
|
|
3464
3296
|
*/
|
|
3465
3297
|
toAnnotation() {
|
|
3466
|
-
return new
|
|
3298
|
+
return new splitCellOperation.RTETableHeadCellAnnotation(this.tableCell);
|
|
3467
3299
|
}
|
|
3468
3300
|
}
|
|
3469
3301
|
|
|
@@ -3490,15 +3322,18 @@ class CellPropertiesEventHandler {
|
|
|
3490
3322
|
*/
|
|
3491
3323
|
static getStyleCollectionFromCell(selectedCells) {
|
|
3492
3324
|
return selectedCells.reduce((accumulator, cell) => {
|
|
3493
|
-
const annotation = cell.getAnnotationByType(
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
formattedBorder
|
|
3498
|
-
|
|
3499
|
-
|
|
3325
|
+
const annotation = cell.getAnnotationByType(splitCellOperation.RTETableExtensionAnnotationTypeEnum.CELL);
|
|
3326
|
+
accumulator[cell.id] = {};
|
|
3327
|
+
if (annotation) {
|
|
3328
|
+
const _a = annotation.toJSON().tableCell, { border } = _a, restProps = __rest(_a, ["border"]);
|
|
3329
|
+
const formattedBorder = {};
|
|
3330
|
+
if (border) {
|
|
3331
|
+
formattedBorder.borderStyle = border.style;
|
|
3332
|
+
formattedBorder.borderColor = border.color;
|
|
3333
|
+
formattedBorder.borderWidth = border.width;
|
|
3334
|
+
}
|
|
3335
|
+
accumulator[cell.id] = object.cleanObject(Object.assign(Object.assign({}, restProps), formattedBorder));
|
|
3500
3336
|
}
|
|
3501
|
-
accumulator[cell.id] = object.cleanObject(Object.assign(Object.assign({}, restProps), formattedBorder));
|
|
3502
3337
|
return accumulator;
|
|
3503
3338
|
}, {});
|
|
3504
3339
|
}
|
|
@@ -3530,7 +3365,7 @@ class CellPropertiesEventHandler {
|
|
|
3530
3365
|
mergedStyles[key] = styleValues[0];
|
|
3531
3366
|
}
|
|
3532
3367
|
}
|
|
3533
|
-
return
|
|
3368
|
+
return mergedStyles;
|
|
3534
3369
|
}
|
|
3535
3370
|
/**
|
|
3536
3371
|
* Apply the given properties to the selected cells
|
|
@@ -3568,12 +3403,14 @@ class CellPropertiesEventHandler {
|
|
|
3568
3403
|
*/
|
|
3569
3404
|
convertToVegaTableCellAnnotation(originalStyles) {
|
|
3570
3405
|
const { borderStyle, borderWidth, borderColor } = originalStyles, restStyles = __rest(originalStyles, ["borderStyle", "borderWidth", "borderColor"]);
|
|
3571
|
-
const border =
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3406
|
+
const border = borderStyle || borderColor || borderWidth
|
|
3407
|
+
? object.cleanObject({
|
|
3408
|
+
style: borderStyle,
|
|
3409
|
+
width: borderWidth ? pixel.parseToPixelString(borderWidth) : '',
|
|
3410
|
+
color: borderColor,
|
|
3411
|
+
})
|
|
3412
|
+
: null;
|
|
3413
|
+
return object.cleanObject(Object.assign(Object.assign({}, restStyles), { padding: restStyles.padding ? pixel.parseToPixelString(restStyles.padding) : '', width: restStyles.width ? pixel.parseToPixelString(restStyles.width) : '', height: restStyles.height ? pixel.parseToPixelString(restStyles.height) : '', border }));
|
|
3577
3414
|
}
|
|
3578
3415
|
/**
|
|
3579
3416
|
* Apply the given annotation to the specified table cell
|
|
@@ -3583,7 +3420,7 @@ class CellPropertiesEventHandler {
|
|
|
3583
3420
|
* @param {boolean} isFlushable - Whether the action is flushable
|
|
3584
3421
|
*/
|
|
3585
3422
|
applyAnnotation(cell, annotation, isFlushable) {
|
|
3586
|
-
const action = cell instanceof
|
|
3423
|
+
const action = cell instanceof splitCellOperation.RTETableHeadCellBlock
|
|
3587
3424
|
? new RTETableHeadCellAnnotationsAction(annotation)
|
|
3588
3425
|
: new RTETableCellAnnotationsAction(annotation);
|
|
3589
3426
|
action.isFlushable = isFlushable;
|
|
@@ -3719,13 +3556,13 @@ class TableDynamicPopoverRenderer {
|
|
|
3719
3556
|
async show(type) {
|
|
3720
3557
|
let target = this.getTableRef();
|
|
3721
3558
|
const cells = this.extensionContext.tableSelection.getSelectedCells();
|
|
3722
|
-
if (type ===
|
|
3559
|
+
if (type === splitCellOperation.TableSettingType.CELL && cells.length > 1) {
|
|
3723
3560
|
const anchor = this.getOrCreateSelectionAnchor(cells, target);
|
|
3724
3561
|
if (anchor) {
|
|
3725
3562
|
target = anchor;
|
|
3726
3563
|
}
|
|
3727
3564
|
}
|
|
3728
|
-
else if (type ===
|
|
3565
|
+
else if (type === splitCellOperation.TableSettingType.CELL && cells.length === 1) {
|
|
3729
3566
|
target = codeBlock.stateEntityRenderingRegistry.getDOMByEntity(cells[0]);
|
|
3730
3567
|
}
|
|
3731
3568
|
this.updateContent(type);
|
|
@@ -3780,7 +3617,7 @@ class TableDynamicPopoverRenderer {
|
|
|
3780
3617
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3781
3618
|
ref: (el) => (this.tablePropertiesFormRef = el),
|
|
3782
3619
|
colors: this.tableColorSchema,
|
|
3783
|
-
type:
|
|
3620
|
+
type: splitCellOperation.TableSettingType.TABLE,
|
|
3784
3621
|
onVegaCancel: this.handleTablePropertiesUpdate,
|
|
3785
3622
|
onVegaChange: this.handleTablePropertiesUpdate,
|
|
3786
3623
|
onVegaSave: this.handleTablePropertiesUpdate,
|
|
@@ -3789,7 +3626,7 @@ class TableDynamicPopoverRenderer {
|
|
|
3789
3626
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3790
3627
|
ref: (el) => (this.cellPropertiesFormRef = el),
|
|
3791
3628
|
colors: this.tableColorSchema,
|
|
3792
|
-
type:
|
|
3629
|
+
type: splitCellOperation.TableSettingType.CELL,
|
|
3793
3630
|
onVegaCancel: this.handleCellPropertiesUpdate,
|
|
3794
3631
|
onVegaChange: this.handleCellPropertiesUpdate,
|
|
3795
3632
|
onVegaSave: this.handleCellPropertiesUpdate,
|
|
@@ -3894,7 +3731,7 @@ class RTETableBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
3894
3731
|
*/
|
|
3895
3732
|
doRender(h, renderData, rteContext) {
|
|
3896
3733
|
const tableSettingPopoverRenderer = new TableSettingPopoverRenderer();
|
|
3897
|
-
const tableDynamicPopoverRenderer = new TableDynamicPopoverRenderer(
|
|
3734
|
+
const tableDynamicPopoverRenderer = new TableDynamicPopoverRenderer(splitCellOperation.RTETableColorManager.getTableColors());
|
|
3898
3735
|
this.injectExtensionContextToRenderers(this.extensionContext, [
|
|
3899
3736
|
tableDynamicPopoverRenderer,
|
|
3900
3737
|
tableSettingPopoverRenderer,
|
|
@@ -3903,7 +3740,7 @@ class RTETableBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
3903
3740
|
const table = this.renderTable(h, renderData, (ref) => (tableRef = ref));
|
|
3904
3741
|
const tableSettingPopover = tableSettingPopoverRenderer.render(h, renderData, () => tableRef, tableDynamicPopoverRenderer);
|
|
3905
3742
|
const tableDynamicPopover = tableDynamicPopoverRenderer.render(h, () => tableRef, renderData);
|
|
3906
|
-
const tableAnnotation = renderData.getAnnotationByType(
|
|
3743
|
+
const tableAnnotation = renderData.getAnnotationByType(splitCellOperation.RTETableExtensionAnnotationTypeEnum.TABLE);
|
|
3907
3744
|
const children = rteContext.editable
|
|
3908
3745
|
? [
|
|
3909
3746
|
h('vega-rich-text-table-selection-widget', {
|
|
@@ -3954,14 +3791,6 @@ class RTETableBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
3954
3791
|
this.extensionContext = context;
|
|
3955
3792
|
this.injectExtensionContextToRenderers(context, this.popoverRenders);
|
|
3956
3793
|
}
|
|
3957
|
-
/**
|
|
3958
|
-
* Updates the table color schema.
|
|
3959
|
-
*
|
|
3960
|
-
* @param {RTETableColorSchema[]} colors - The new table color schema.
|
|
3961
|
-
*/
|
|
3962
|
-
updateTableColorSchema(colors) {
|
|
3963
|
-
this.tableColorSchema = colors;
|
|
3964
|
-
}
|
|
3965
3794
|
/**
|
|
3966
3795
|
* Renders the table element.
|
|
3967
3796
|
*
|
|
@@ -4080,7 +3909,9 @@ class RTETableCellRenderer extends VegaRTEExtensionRenderer {
|
|
|
4080
3909
|
*/
|
|
4081
3910
|
renderByCellType(h, renderData, rteContext, elementType) {
|
|
4082
3911
|
var _a;
|
|
4083
|
-
return h(elementType, Object.assign(Object.assign(Object.assign({ key: renderData.id,
|
|
3912
|
+
return h(elementType, Object.assign(Object.assign(Object.assign({ key: renderData.id,
|
|
3913
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3914
|
+
ref: this.useRef(renderData) }, (_a = renderData.getCustomAttributesAnnotation()) === null || _a === void 0 ? void 0 : _a.render()), { style: renderData.getStyles(rteContext), class: renderData.getClasses() }), (rteContext.editable ? this.onSelectionListeners(renderData) : undefined)));
|
|
4084
3915
|
}
|
|
4085
3916
|
/**
|
|
4086
3917
|
* Returns the mouse event listeners for selection handling.
|
|
@@ -4420,10 +4251,10 @@ class InsertTableBlockStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
4420
4251
|
createTableBlock(row, column) {
|
|
4421
4252
|
const normalizedRowCount = Math.max(row, 1);
|
|
4422
4253
|
const normalizedColumnCount = Math.max(column, 1);
|
|
4423
|
-
return
|
|
4254
|
+
return splitCellOperation.RTETableBlock.from({
|
|
4424
4255
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
4425
4256
|
type: 'table-block',
|
|
4426
|
-
children: [
|
|
4257
|
+
children: [splitCellOperation.generateTableBody(normalizedRowCount, normalizedColumnCount)],
|
|
4427
4258
|
});
|
|
4428
4259
|
}
|
|
4429
4260
|
/**
|
|
@@ -4452,7 +4283,7 @@ class PreventCellContentDeleteInterceptor extends ActionHandlerInterceptor {
|
|
|
4452
4283
|
*/
|
|
4453
4284
|
canIntercept(action, target) {
|
|
4454
4285
|
const cell = target.parent;
|
|
4455
|
-
const isSingleCellChild = cell instanceof
|
|
4286
|
+
const isSingleCellChild = cell instanceof splitCellOperation.RTETableCellBlock && cell.children.length === 1;
|
|
4456
4287
|
return isSingleCellChild && action.startOffset === 0;
|
|
4457
4288
|
}
|
|
4458
4289
|
/**
|
|
@@ -4532,57 +4363,52 @@ class InsertTableRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
4532
4363
|
handleAction(action, target) {
|
|
4533
4364
|
const { insertDirection, selectedRows } = action;
|
|
4534
4365
|
// The reference block will control where to insert the new row
|
|
4535
|
-
|
|
4366
|
+
const refBlock = insertDirection === splitCellOperation.InsertTableRowDirection.ABOVE
|
|
4536
4367
|
? selectedRows[0]
|
|
4537
4368
|
: selectedRows[selectedRows.length - 1];
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4369
|
+
const refBlockIsHeaderRow = refBlock.parent instanceof splitCellOperation.RTETableHeadBlock;
|
|
4370
|
+
// The refBlock is a head row and new row is also a head row or the refBlock is a body row and new row is also a body row
|
|
4371
|
+
if (this.shouldInsertHeaderRow(refBlock, insertDirection) || !refBlockIsHeaderRow) {
|
|
4372
|
+
const rowBlock = splitCellOperation.RTETableRowBlock.from({
|
|
4541
4373
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
4542
4374
|
type: 'table-row',
|
|
4543
4375
|
children: refBlock.children.map((item) => {
|
|
4544
|
-
return this.getDefaultCellBlockTemplate(item.type);
|
|
4376
|
+
return this.getDefaultCellBlockTemplate(item.type, item.colSpan);
|
|
4545
4377
|
}),
|
|
4546
4378
|
});
|
|
4547
|
-
if (insertDirection ===
|
|
4548
|
-
refBlock.parent.apply(new codeBlock.InsertChildrenBeforeAction(refBlock,
|
|
4379
|
+
if (insertDirection === splitCellOperation.InsertTableRowDirection.ABOVE) {
|
|
4380
|
+
refBlock.parent.apply(new codeBlock.InsertChildrenBeforeAction(refBlock, rowBlock));
|
|
4549
4381
|
}
|
|
4550
4382
|
else {
|
|
4551
|
-
refBlock.parent.apply(new codeBlock.InsertChildrenAfterAction(refBlock,
|
|
4383
|
+
refBlock.parent.apply(new codeBlock.InsertChildrenAfterAction(refBlock, rowBlock));
|
|
4552
4384
|
}
|
|
4553
4385
|
}
|
|
4554
4386
|
else {
|
|
4555
|
-
|
|
4556
|
-
let tableBody = target.children.find((block) => block instanceof
|
|
4557
|
-
|
|
4558
|
-
if (refBlock.parent instanceof styles_constants.RTETableHeadBlock && tableBody) {
|
|
4559
|
-
refBlock = tableBody.children[0];
|
|
4560
|
-
direction = styles_constants.InsertTableRowDirection.ABOVE;
|
|
4561
|
-
}
|
|
4562
|
-
const refBlockIsHeaderRow = refBlock.parent instanceof styles_constants.RTETableHeadBlock;
|
|
4563
|
-
const rowBlock = styles_constants.RTETableRowBlock.from({
|
|
4387
|
+
// The refBlock is a head row and new row is a body row
|
|
4388
|
+
let tableBody = target.children.find((block) => block instanceof splitCellOperation.RTETableBodyBlock);
|
|
4389
|
+
const rowBlockJSON = {
|
|
4564
4390
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
4565
4391
|
type: 'table-row',
|
|
4566
|
-
children:
|
|
4567
|
-
|
|
4568
|
-
}),
|
|
4569
|
-
});
|
|
4392
|
+
children: [],
|
|
4393
|
+
};
|
|
4570
4394
|
if (!tableBody) {
|
|
4571
|
-
|
|
4395
|
+
rowBlockJSON.children = refBlock.children.map((item) => {
|
|
4396
|
+
const { colSpan } = item;
|
|
4397
|
+
return this.getDefaultCellBlockTemplate('table-cell', colSpan);
|
|
4398
|
+
});
|
|
4399
|
+
tableBody = splitCellOperation.RTETableBodyBlock.from({
|
|
4572
4400
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
4573
4401
|
type: 'table-body',
|
|
4574
4402
|
children: [],
|
|
4575
4403
|
});
|
|
4576
|
-
tableBody.apply(new codeBlock.AppendChildrenAction([
|
|
4404
|
+
tableBody.apply(new codeBlock.AppendChildrenAction([splitCellOperation.RTETableRowBlock.from(rowBlockJSON)]));
|
|
4577
4405
|
target.apply(new codeBlock.AppendChildrenAction([tableBody]));
|
|
4578
4406
|
}
|
|
4579
4407
|
else {
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
tableBody.apply(new codeBlock.InsertChildrenAfterAction(refBlock, rowBlock));
|
|
4585
|
-
}
|
|
4408
|
+
const firstBodyRow = tableBody.children[0];
|
|
4409
|
+
const headCellLength = this.getHeadCellLength(firstBodyRow);
|
|
4410
|
+
rowBlockJSON.children = this.createTableCells(refBlock, headCellLength);
|
|
4411
|
+
tableBody.apply(new codeBlock.InsertChildrenBeforeAction(firstBodyRow, splitCellOperation.RTETableRowBlock.from(rowBlockJSON)));
|
|
4586
4412
|
}
|
|
4587
4413
|
}
|
|
4588
4414
|
}
|
|
@@ -4594,12 +4420,12 @@ class InsertTableRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
4594
4420
|
* @returns {boolean} True if a header row should be inserted, false otherwise.
|
|
4595
4421
|
*/
|
|
4596
4422
|
shouldInsertHeaderRow(refBlock, direction) {
|
|
4597
|
-
if (direction ===
|
|
4598
|
-
return refBlock.parent instanceof
|
|
4423
|
+
if (direction === splitCellOperation.InsertTableRowDirection.ABOVE) {
|
|
4424
|
+
return refBlock.parent instanceof splitCellOperation.RTETableHeadBlock;
|
|
4599
4425
|
}
|
|
4600
4426
|
else {
|
|
4601
4427
|
const parentBlock = refBlock.parent;
|
|
4602
|
-
return (parentBlock instanceof
|
|
4428
|
+
return (parentBlock instanceof splitCellOperation.RTETableHeadBlock &&
|
|
4603
4429
|
parentBlock.children[parentBlock.children.length - 1] !== refBlock);
|
|
4604
4430
|
}
|
|
4605
4431
|
}
|
|
@@ -4607,11 +4433,17 @@ class InsertTableRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
4607
4433
|
* Get the default cell block template.
|
|
4608
4434
|
*
|
|
4609
4435
|
* @param {string} cellType - The type of the cell block.
|
|
4436
|
+
* @param {number} colSpan - The colspan attribute for the cell.
|
|
4437
|
+
* @param {number} rowSpan - The rowspan attribute for the cell.
|
|
4610
4438
|
* @returns {VegaRTETableCellBlock | VegaRTETableHeadCellBlock} The default cell block template.
|
|
4611
4439
|
*/
|
|
4612
|
-
getDefaultCellBlockTemplate(cellType) {
|
|
4440
|
+
getDefaultCellBlockTemplate(cellType, colSpan, rowSpan = 1) {
|
|
4441
|
+
const customAttribute = object.cleanObject({
|
|
4442
|
+
colspan: colSpan > 1 ? colSpan.toString() : null,
|
|
4443
|
+
rowspan: rowSpan > 1 ? rowSpan.toString() : null,
|
|
4444
|
+
});
|
|
4613
4445
|
const id = createPublicApiRuntimeMetricsSlimmer.generateUUID();
|
|
4614
|
-
|
|
4446
|
+
const cellBlock = {
|
|
4615
4447
|
id,
|
|
4616
4448
|
type: cellType,
|
|
4617
4449
|
children: [
|
|
@@ -4628,6 +4460,49 @@ class InsertTableRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
4628
4460
|
},
|
|
4629
4461
|
],
|
|
4630
4462
|
};
|
|
4463
|
+
if (Object.keys(customAttribute).length > 0) {
|
|
4464
|
+
cellBlock.annotations = {
|
|
4465
|
+
customAttribute,
|
|
4466
|
+
};
|
|
4467
|
+
}
|
|
4468
|
+
return cellBlock;
|
|
4469
|
+
}
|
|
4470
|
+
/**
|
|
4471
|
+
* Get the column head end index in a table row.
|
|
4472
|
+
*
|
|
4473
|
+
* @param {RTETableRowBlock} tableRow - The table row block.
|
|
4474
|
+
* @returns {number} The end index of the column head.
|
|
4475
|
+
*/
|
|
4476
|
+
getHeadCellLength(tableRow) {
|
|
4477
|
+
let length = 0;
|
|
4478
|
+
for (let i = 0; i < tableRow.children.length; i++) {
|
|
4479
|
+
const cellBlock = tableRow.children[i];
|
|
4480
|
+
if (cellBlock instanceof splitCellOperation.RTETableHeadCellBlock) {
|
|
4481
|
+
length += cellBlock.colSpan;
|
|
4482
|
+
}
|
|
4483
|
+
else {
|
|
4484
|
+
break;
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
return length;
|
|
4488
|
+
}
|
|
4489
|
+
/**
|
|
4490
|
+
* Create table cells based on reference row and head cell length.
|
|
4491
|
+
*
|
|
4492
|
+
* @param {RTETableRowBlock} refRow - The reference table row block.
|
|
4493
|
+
* @param {number} headCellLength - The length of the head cells.
|
|
4494
|
+
* @returns {VegaRTETableCellBlock[]} An array of table cell blocks.
|
|
4495
|
+
*/
|
|
4496
|
+
createTableCells(refRow, headCellLength) {
|
|
4497
|
+
const cells = [];
|
|
4498
|
+
let currentHeadCellLength = 0;
|
|
4499
|
+
for (const cell of refRow.children) {
|
|
4500
|
+
const isHeadCell = currentHeadCellLength < headCellLength;
|
|
4501
|
+
const cellType = isHeadCell ? 'table-head-cell' : 'table-cell';
|
|
4502
|
+
cells.push(this.getDefaultCellBlockTemplate(cellType, cell.colSpan));
|
|
4503
|
+
currentHeadCellLength += cell.colSpan;
|
|
4504
|
+
}
|
|
4505
|
+
return cells;
|
|
4631
4506
|
}
|
|
4632
4507
|
}
|
|
4633
4508
|
|
|
@@ -4692,7 +4567,7 @@ class DeleteTableRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
4692
4567
|
*/
|
|
4693
4568
|
getFutureFocusRow(startRow, endRow, table) {
|
|
4694
4569
|
const allRows = table.children
|
|
4695
|
-
.filter((item) => item instanceof
|
|
4570
|
+
.filter((item) => item instanceof splitCellOperation.RTETableHeadBlock || item instanceof splitCellOperation.RTETableBodyBlock)
|
|
4696
4571
|
.flatMap((block) => block.children);
|
|
4697
4572
|
const startIndex = allRows.indexOf(startRow);
|
|
4698
4573
|
const endIndex = allRows.indexOf(endRow);
|
|
@@ -4737,7 +4612,7 @@ class RTETableSelection {
|
|
|
4737
4612
|
if (node.nodeType === Node.TEXT_NODE) {
|
|
4738
4613
|
const focusedNodeDto = codeBlock.stateEntityRenderingRegistry.getEntityByDOM(node.parentElement);
|
|
4739
4614
|
if (focusedNodeDto) {
|
|
4740
|
-
const cell =
|
|
4615
|
+
const cell = splitCellOperation.getParentBlockByType(focusedNodeDto.parent, splitCellOperation.RTETableCellBlock);
|
|
4741
4616
|
if (cell) {
|
|
4742
4617
|
selectedCells.add(cell);
|
|
4743
4618
|
return Array.from(selectedCells);
|
|
@@ -4815,25 +4690,113 @@ class RTETableSelection {
|
|
|
4815
4690
|
tableChildren.forEach((section) => {
|
|
4816
4691
|
section.children.forEach((row) => allRows.push(row));
|
|
4817
4692
|
});
|
|
4818
|
-
const
|
|
4819
|
-
const
|
|
4820
|
-
const
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
const
|
|
4825
|
-
const
|
|
4826
|
-
const
|
|
4693
|
+
const { grid, cellMeta } = RTETableSelection.buildCellGrid(allRows);
|
|
4694
|
+
const anchorMeta = cellMeta.get(anchor);
|
|
4695
|
+
const focusMeta = cellMeta.get(focus);
|
|
4696
|
+
if (!anchorMeta || !focusMeta) {
|
|
4697
|
+
return [];
|
|
4698
|
+
}
|
|
4699
|
+
const anchorStartRow = anchorMeta.row;
|
|
4700
|
+
const anchorEndRow = anchorMeta.row + anchorMeta.rowSpan - 1;
|
|
4701
|
+
const anchorStartCol = anchorMeta.col;
|
|
4702
|
+
const anchorEndCol = anchorMeta.col + anchorMeta.colSpan - 1;
|
|
4703
|
+
const focusStartRow = focusMeta.row;
|
|
4704
|
+
const focusEndRow = focusMeta.row + focusMeta.rowSpan - 1;
|
|
4705
|
+
const focusStartCol = focusMeta.col;
|
|
4706
|
+
const focusEndCol = focusMeta.col + focusMeta.colSpan - 1;
|
|
4707
|
+
const startRow = Math.min(anchorStartRow, focusStartRow);
|
|
4708
|
+
const endRow = Math.max(anchorEndRow, focusEndRow);
|
|
4709
|
+
const startCol = Math.min(anchorStartCol, focusStartCol);
|
|
4710
|
+
const endCol = Math.max(anchorEndCol, focusEndCol);
|
|
4711
|
+
const result = new Set();
|
|
4827
4712
|
for (let r = startRow; r <= endRow; r++) {
|
|
4828
|
-
const row =
|
|
4713
|
+
const row = grid[r];
|
|
4829
4714
|
for (let c = startCol; c <= endCol; c++) {
|
|
4830
|
-
const cell = row
|
|
4715
|
+
const cell = row[c];
|
|
4831
4716
|
if (cell) {
|
|
4832
|
-
result.
|
|
4717
|
+
result.add(cell);
|
|
4833
4718
|
}
|
|
4834
4719
|
}
|
|
4835
4720
|
}
|
|
4836
|
-
return result;
|
|
4721
|
+
return Array.from(result);
|
|
4722
|
+
}
|
|
4723
|
+
/**
|
|
4724
|
+
* Get the rowSpan and colSpan attributes from a cell's DOM element.
|
|
4725
|
+
*
|
|
4726
|
+
* @param {RTETableCellBlock} cell - The cell to get span values from.
|
|
4727
|
+
* @returns {CellSpanType} Object with rowSpan and colSpan properties.
|
|
4728
|
+
*/
|
|
4729
|
+
static getCellSpan(cell) {
|
|
4730
|
+
let rowSpan = 1;
|
|
4731
|
+
let colSpan = 1;
|
|
4732
|
+
// First, try to get from customAttribute annotation (this works even without DOM)
|
|
4733
|
+
const customAttr = cell.getAnnotationByType(codeBlock.CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE);
|
|
4734
|
+
if (customAttr && customAttr.customAttribute) {
|
|
4735
|
+
const attrs = customAttr.customAttribute;
|
|
4736
|
+
if (attrs.rowSpan) {
|
|
4737
|
+
rowSpan = parseInt(attrs.rowSpan, 10);
|
|
4738
|
+
}
|
|
4739
|
+
if (attrs.colSpan) {
|
|
4740
|
+
colSpan = parseInt(attrs.colSpan, 10);
|
|
4741
|
+
}
|
|
4742
|
+
}
|
|
4743
|
+
// Fallback to DOM attributes if annotation didn't have the values
|
|
4744
|
+
if (rowSpan === 1 && colSpan === 1) {
|
|
4745
|
+
const cellDOMElement = codeBlock.stateEntityRenderingRegistry.getDOMByEntity(cell);
|
|
4746
|
+
if (cellDOMElement) {
|
|
4747
|
+
const rowSpanAttr = cellDOMElement.getAttribute('rowSpan');
|
|
4748
|
+
const colSpanAttr = cellDOMElement.getAttribute('colSpan');
|
|
4749
|
+
if (rowSpanAttr) {
|
|
4750
|
+
rowSpan = parseInt(rowSpanAttr, 10);
|
|
4751
|
+
}
|
|
4752
|
+
if (colSpanAttr) {
|
|
4753
|
+
colSpan = parseInt(colSpanAttr, 10);
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
}
|
|
4757
|
+
return {
|
|
4758
|
+
rowSpan: Number.isFinite(rowSpan) && rowSpan > 0 ? rowSpan : 1,
|
|
4759
|
+
colSpan: Number.isFinite(colSpan) && colSpan > 0 ? colSpan : 1,
|
|
4760
|
+
};
|
|
4761
|
+
}
|
|
4762
|
+
/**
|
|
4763
|
+
* Build a grid representation of the table that accounts for rowSpan and colSpan.
|
|
4764
|
+
* Each cell in the grid array points to the actual cell block that occupies that position.
|
|
4765
|
+
*
|
|
4766
|
+
* @param {RTETableRowBlock[]} allRows - All rows in the table.
|
|
4767
|
+
* @returns {CellGridMetaType} Object with grid and cellMeta properties.
|
|
4768
|
+
*/
|
|
4769
|
+
static buildCellGrid(allRows) {
|
|
4770
|
+
const grid = [];
|
|
4771
|
+
const cellMeta = new Map();
|
|
4772
|
+
for (let r = 0; r < allRows.length; r++) {
|
|
4773
|
+
const row = allRows[r];
|
|
4774
|
+
if (!grid[r]) {
|
|
4775
|
+
grid[r] = [];
|
|
4776
|
+
}
|
|
4777
|
+
let col = 0;
|
|
4778
|
+
for (let c = 0; c < row.children.length; c++) {
|
|
4779
|
+
const cell = row.children[c];
|
|
4780
|
+
// Find the next available column (skip cells occupied by rowSpan from previous rows)
|
|
4781
|
+
while (grid[r][col]) {
|
|
4782
|
+
col += 1;
|
|
4783
|
+
}
|
|
4784
|
+
const { rowSpan, colSpan } = RTETableSelection.getCellSpan(cell);
|
|
4785
|
+
cellMeta.set(cell, { row: r, col, rowSpan, colSpan });
|
|
4786
|
+
// Fill the grid for all positions this cell occupies
|
|
4787
|
+
for (let rowOffset = 0; rowOffset < rowSpan; rowOffset++) {
|
|
4788
|
+
const targetRow = r + rowOffset;
|
|
4789
|
+
if (!grid[targetRow]) {
|
|
4790
|
+
grid[targetRow] = [];
|
|
4791
|
+
}
|
|
4792
|
+
for (let colOffset = 0; colOffset < colSpan; colOffset++) {
|
|
4793
|
+
grid[targetRow][col + colOffset] = cell;
|
|
4794
|
+
}
|
|
4795
|
+
}
|
|
4796
|
+
col += colSpan;
|
|
4797
|
+
}
|
|
4798
|
+
}
|
|
4799
|
+
return { grid, cellMeta };
|
|
4837
4800
|
}
|
|
4838
4801
|
/**
|
|
4839
4802
|
* Clean up event listeners.
|
|
@@ -4917,7 +4880,7 @@ class RTETableSelection {
|
|
|
4917
4880
|
* @param {RTETableCellBlock[]} cells - The current selected table cells.
|
|
4918
4881
|
*/
|
|
4919
4882
|
emitCellSelectionChange(firstCell, cells) {
|
|
4920
|
-
const table =
|
|
4883
|
+
const table = splitCellOperation.getParentBlockByType(firstCell, splitCellOperation.RTETableBlock);
|
|
4921
4884
|
if (table) {
|
|
4922
4885
|
const tableRef = codeBlock.stateEntityRenderingRegistry.getDOMByEntity(table);
|
|
4923
4886
|
if (tableRef) {
|
|
@@ -5077,7 +5040,7 @@ class ToggleHeaderRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5077
5040
|
const headerRows = [];
|
|
5078
5041
|
const bodyRows = [];
|
|
5079
5042
|
for (const row of selectedRows) {
|
|
5080
|
-
if (row.parent instanceof
|
|
5043
|
+
if (row.parent instanceof splitCellOperation.RTETableBodyBlock) {
|
|
5081
5044
|
bodyRows.push(row);
|
|
5082
5045
|
}
|
|
5083
5046
|
else {
|
|
@@ -5103,10 +5066,10 @@ class ToggleHeaderRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5103
5066
|
* @param {RTETableBlock} table - The table block containing the rows.
|
|
5104
5067
|
*/
|
|
5105
5068
|
convertToHeaderRows(rows, table) {
|
|
5106
|
-
let tableHead = table.children.find((block) => block instanceof
|
|
5069
|
+
let tableHead = table.children.find((block) => block instanceof splitCellOperation.RTETableHeadBlock);
|
|
5107
5070
|
const tableBody = rows[0].parent;
|
|
5108
5071
|
if (!tableHead) {
|
|
5109
|
-
tableHead =
|
|
5072
|
+
tableHead = splitCellOperation.RTETableHeadBlock.from({
|
|
5110
5073
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
5111
5074
|
type: 'table-head',
|
|
5112
5075
|
children: [],
|
|
@@ -5129,10 +5092,10 @@ class ToggleHeaderRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5129
5092
|
* @param {RTETableBlock} table - The table block containing the rows.
|
|
5130
5093
|
*/
|
|
5131
5094
|
revertToBodyRows(rows, table) {
|
|
5132
|
-
let tableBody = table.children.find((block) => block instanceof
|
|
5095
|
+
let tableBody = table.children.find((block) => block instanceof splitCellOperation.RTETableBodyBlock);
|
|
5133
5096
|
const tableHead = rows[0].parent;
|
|
5134
5097
|
if (!tableBody) {
|
|
5135
|
-
tableBody =
|
|
5098
|
+
tableBody = splitCellOperation.RTETableBodyBlock.from({
|
|
5136
5099
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
5137
5100
|
type: 'table-body',
|
|
5138
5101
|
children: [],
|
|
@@ -5161,10 +5124,10 @@ class ToggleHeaderRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5161
5124
|
* @returns {RTETableHeadCellBlock} The converted table header cell block.
|
|
5162
5125
|
*/
|
|
5163
5126
|
convertTdToTh(cell) {
|
|
5164
|
-
if (cell instanceof
|
|
5127
|
+
if (cell instanceof splitCellOperation.RTETableHeadCellBlock) {
|
|
5165
5128
|
return cell;
|
|
5166
5129
|
}
|
|
5167
|
-
const headCell =
|
|
5130
|
+
const headCell = splitCellOperation.RTETableHeadCellBlock.from(cell.toJSON());
|
|
5168
5131
|
headCell.parent = cell.parent;
|
|
5169
5132
|
return headCell;
|
|
5170
5133
|
}
|
|
@@ -5180,7 +5143,7 @@ class ToggleHeaderRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5180
5143
|
let bodyCell = cell;
|
|
5181
5144
|
if (!referenceRow || referenceRow.children[index].type !== cell.type) {
|
|
5182
5145
|
const cellJSON = cell.toJSON();
|
|
5183
|
-
bodyCell =
|
|
5146
|
+
bodyCell = splitCellOperation.RTETableCellBlock.from(cellJSON);
|
|
5184
5147
|
}
|
|
5185
5148
|
bodyCell.parent = row;
|
|
5186
5149
|
return bodyCell;
|
|
@@ -5191,16 +5154,16 @@ class ToggleHeaderRowStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5191
5154
|
/**
|
|
5192
5155
|
* Strategy to handle the insertion of a table column into the RTETable.
|
|
5193
5156
|
*/
|
|
5194
|
-
class InsertTableColumnStrategy extends
|
|
5157
|
+
class InsertTableColumnStrategy extends splitCellOperation.TableColumnStrategy {
|
|
5195
5158
|
/**
|
|
5196
5159
|
* @inheritDoc
|
|
5197
5160
|
*/
|
|
5198
5161
|
handleAction(action, target) {
|
|
5199
5162
|
const insertDirection = action.insertDirection;
|
|
5200
5163
|
const [startCellIndex, endCellIndex] = this.getBoundaryCellIndexOfRow(action.tableCellInsertRange);
|
|
5201
|
-
const allTableRows =
|
|
5164
|
+
const allTableRows = splitCellOperation.getAllTableRows(target);
|
|
5202
5165
|
allTableRows.forEach((row) => {
|
|
5203
|
-
if (insertDirection ===
|
|
5166
|
+
if (insertDirection === splitCellOperation.InsertTableColumnDirection.LEFT) {
|
|
5204
5167
|
const newCell = this.generateTableCell(row.children[startCellIndex]);
|
|
5205
5168
|
row.apply(new codeBlock.InsertChildrenBeforeAction(row.children[startCellIndex], newCell));
|
|
5206
5169
|
}
|
|
@@ -5217,17 +5180,17 @@ class InsertTableColumnStrategy extends styles_constants.TableColumnStrategy {
|
|
|
5217
5180
|
* @returns {RTETableCellBlock | RTETableHeadCellBlock} The newly generated table cell block.
|
|
5218
5181
|
*/
|
|
5219
5182
|
generateTableCell(originalCell) {
|
|
5220
|
-
if (originalCell instanceof
|
|
5221
|
-
return
|
|
5183
|
+
if (originalCell instanceof splitCellOperation.RTETableHeadCellBlock) {
|
|
5184
|
+
return splitCellOperation.RTETableHeadCellBlock.from(splitCellOperation.getDefaultCellBlockTemplate(originalCell.type));
|
|
5222
5185
|
}
|
|
5223
|
-
return
|
|
5186
|
+
return splitCellOperation.RTETableCellBlock.from(splitCellOperation.getDefaultCellBlockTemplate(originalCell.type));
|
|
5224
5187
|
}
|
|
5225
5188
|
}
|
|
5226
5189
|
|
|
5227
5190
|
/**
|
|
5228
5191
|
* Strategy to handle the deletion of table column from the parent.
|
|
5229
5192
|
*/
|
|
5230
|
-
class DeleteTableColumnStrategy extends
|
|
5193
|
+
class DeleteTableColumnStrategy extends splitCellOperation.TableColumnStrategy {
|
|
5231
5194
|
/**
|
|
5232
5195
|
* Deletes the specified table column and updates the cursor position.
|
|
5233
5196
|
*
|
|
@@ -5236,14 +5199,14 @@ class DeleteTableColumnStrategy extends styles_constants.TableColumnStrategy {
|
|
|
5236
5199
|
*/
|
|
5237
5200
|
handleAction(action, target) {
|
|
5238
5201
|
const [startCellIndex, endCellIndex] = this.getBoundaryCellIndexOfRow(action.tableCellDeleteRange);
|
|
5239
|
-
const allTableRows =
|
|
5202
|
+
const allTableRows = splitCellOperation.getAllTableRows(target);
|
|
5240
5203
|
// Find the next focusable cell before deletion
|
|
5241
5204
|
const nextFocusableCell = this.findNextFocusableCell(action.tableCellDeleteRange, [startCellIndex, endCellIndex]);
|
|
5242
5205
|
allTableRows.forEach((row) => {
|
|
5243
5206
|
this.deleteCellsInRow(row, startCellIndex, endCellIndex);
|
|
5244
5207
|
});
|
|
5245
5208
|
const root = this.getRootContent(target);
|
|
5246
|
-
const nextFocusNode =
|
|
5209
|
+
const nextFocusNode = splitCellOperation.getFirstNode(nextFocusableCell);
|
|
5247
5210
|
if (root && nextFocusNode) {
|
|
5248
5211
|
root.apply(new contentState.UpdateCursorPositionAction(nextFocusNode));
|
|
5249
5212
|
}
|
|
@@ -5281,13 +5244,13 @@ class DeleteTableColumnStrategy extends styles_constants.TableColumnStrategy {
|
|
|
5281
5244
|
/**
|
|
5282
5245
|
* Strategy to handle the selection of a table column.
|
|
5283
5246
|
*/
|
|
5284
|
-
class SelectTableColumnStrategy extends
|
|
5247
|
+
class SelectTableColumnStrategy extends splitCellOperation.TableColumnStrategy {
|
|
5285
5248
|
/**
|
|
5286
5249
|
* @inheritDoc
|
|
5287
5250
|
*/
|
|
5288
5251
|
handleAction(action, target) {
|
|
5289
5252
|
const [startCellIndex, endCellIndex] = this.getBoundaryCellIndexOfRow(action.tableCellSelectRange);
|
|
5290
|
-
const allTableRows =
|
|
5253
|
+
const allTableRows = splitCellOperation.getAllTableRows(target);
|
|
5291
5254
|
const allNeedSelectedCells = [];
|
|
5292
5255
|
allTableRows.forEach((row) => {
|
|
5293
5256
|
for (let cellIndex = startCellIndex; cellIndex <= endCellIndex; cellIndex++) {
|
|
@@ -5310,7 +5273,7 @@ class PreventRowInsertInterceptor extends ActionHandlerInterceptor {
|
|
|
5310
5273
|
* @returns {boolean} - true if the insertion should be intercepted, false otherwise
|
|
5311
5274
|
*/
|
|
5312
5275
|
canIntercept(action) {
|
|
5313
|
-
return action.childrenToBeInserted.some((item) => !(item instanceof
|
|
5276
|
+
return action.childrenToBeInserted.some((item) => !(item instanceof splitCellOperation.RTETableCellBlock));
|
|
5314
5277
|
}
|
|
5315
5278
|
/**
|
|
5316
5279
|
* @inheritDoc
|
|
@@ -5319,6 +5282,122 @@ class PreventRowInsertInterceptor extends ActionHandlerInterceptor {
|
|
|
5319
5282
|
}
|
|
5320
5283
|
}
|
|
5321
5284
|
|
|
5285
|
+
/**
|
|
5286
|
+
* Strategy to handle the merging of table cells.
|
|
5287
|
+
*/
|
|
5288
|
+
class MergeCellsStrategy extends codeBlock.ActionHandleStrategy {
|
|
5289
|
+
/**
|
|
5290
|
+
* Handles the merge cells action.
|
|
5291
|
+
*
|
|
5292
|
+
* @param {MergeCellsAction} action - The action containing merge details.
|
|
5293
|
+
* @param {RTETableBlock} target - The target table block.
|
|
5294
|
+
*/
|
|
5295
|
+
handleAction(action, target) {
|
|
5296
|
+
const { targetCell, mergeCells, colSpan, rowSpan, direction } = action;
|
|
5297
|
+
this.mergeContentToTargetCell(targetCell, mergeCells);
|
|
5298
|
+
splitCellOperation.setSpanAttributes(targetCell, colSpan, rowSpan, target);
|
|
5299
|
+
this.deleteOtherSelectedCells(mergeCells, targetCell);
|
|
5300
|
+
if (direction !== splitCellOperation.MergeCellsOperationType.MERGE_CELL_LEFT &&
|
|
5301
|
+
direction !== splitCellOperation.MergeCellsOperationType.MERGE_CELL_RIGHT &&
|
|
5302
|
+
rowSpan > 1) {
|
|
5303
|
+
this.clearRowSpanIfUniformAcrossRow(targetCell, target, rowSpan);
|
|
5304
|
+
}
|
|
5305
|
+
const root = this.getRootContent(target);
|
|
5306
|
+
const nextFocusNode = splitCellOperation.getFirstNode(targetCell);
|
|
5307
|
+
if (root && nextFocusNode) {
|
|
5308
|
+
root.apply(new contentState.UpdateCursorPositionAction(nextFocusNode));
|
|
5309
|
+
}
|
|
5310
|
+
}
|
|
5311
|
+
/**
|
|
5312
|
+
* Merge content from all selected cells to the target cell.
|
|
5313
|
+
*
|
|
5314
|
+
* @param {RTETableCellBlock | RTETableHeadCellBlock} targetCell - The target cell.
|
|
5315
|
+
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - All selected cells.
|
|
5316
|
+
*/
|
|
5317
|
+
mergeContentToTargetCell(targetCell, selectedCells) {
|
|
5318
|
+
const allChildren = selectedCells.flatMap((cell) => cell.children);
|
|
5319
|
+
const valueCells = allChildren.filter((child) => child.isNotEmpty());
|
|
5320
|
+
const allChildrenBlocks = valueCells.length > 0 ? valueCells : [allChildren[0]];
|
|
5321
|
+
targetCell.children = allChildrenBlocks.map((childBlock) => childBlock.clone(targetCell));
|
|
5322
|
+
}
|
|
5323
|
+
/**
|
|
5324
|
+
* Delete all selected cells except the target cell.
|
|
5325
|
+
*
|
|
5326
|
+
* @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - All selected cells.
|
|
5327
|
+
* @param {RTETableCellBlock | RTETableHeadCellBlock} targetCell - The target cell (should not be deleted).
|
|
5328
|
+
*/
|
|
5329
|
+
deleteOtherSelectedCells(selectedCells, targetCell) {
|
|
5330
|
+
selectedCells.forEach((cell) => {
|
|
5331
|
+
if (cell !== targetCell) {
|
|
5332
|
+
const row = cell.parent;
|
|
5333
|
+
row.apply(new codeBlock.RemoveChildrenAction(cell));
|
|
5334
|
+
}
|
|
5335
|
+
});
|
|
5336
|
+
}
|
|
5337
|
+
/**
|
|
5338
|
+
* Remove rowSpan from all cells in the target row when every cell shares the same rowSpan.
|
|
5339
|
+
* This avoids keeping stale row spans after a merge operation that no longer spans rows.
|
|
5340
|
+
*
|
|
5341
|
+
* @param {RTETableCellBlock | RTETableHeadCellBlock} targetCell - The target cell to set attributes on.
|
|
5342
|
+
* @param {RTETableBlock} table - The table block.
|
|
5343
|
+
* @param {number} targetCellRowSpan - The target cell rowSpan.
|
|
5344
|
+
*/
|
|
5345
|
+
clearRowSpanIfUniformAcrossRow(targetCell, table, targetCellRowSpan) {
|
|
5346
|
+
const targetRow = targetCell.parent;
|
|
5347
|
+
const allRows = targetRow.parent.children;
|
|
5348
|
+
const grid = splitCellOperation.buildTableGrid(allRows);
|
|
5349
|
+
const rowIndexes = [];
|
|
5350
|
+
for (let r = 0; r < grid.length; r++) {
|
|
5351
|
+
if (grid[r].includes(targetCell.id)) {
|
|
5352
|
+
rowIndexes.push(r);
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5355
|
+
if (rowIndexes.length > 1) {
|
|
5356
|
+
const windowStart = rowIndexes[0];
|
|
5357
|
+
const windowEnd = windowStart + targetCellRowSpan - 1;
|
|
5358
|
+
const uniformIds = new Set();
|
|
5359
|
+
let minRowSpan = Number.POSITIVE_INFINITY;
|
|
5360
|
+
for (let c = 0; c < grid[0].length; c++) {
|
|
5361
|
+
let firstId = grid[windowStart][c];
|
|
5362
|
+
let count = 1;
|
|
5363
|
+
let isRowSpan = false;
|
|
5364
|
+
for (let r = windowStart + 1; r <= windowEnd; r++) {
|
|
5365
|
+
if (grid[r][c] === firstId) {
|
|
5366
|
+
count++;
|
|
5367
|
+
continue;
|
|
5368
|
+
}
|
|
5369
|
+
if (count > 1) {
|
|
5370
|
+
isRowSpan = true;
|
|
5371
|
+
minRowSpan = Math.min(minRowSpan, count);
|
|
5372
|
+
uniformIds.add(firstId);
|
|
5373
|
+
}
|
|
5374
|
+
count = 1;
|
|
5375
|
+
firstId = grid[r][c];
|
|
5376
|
+
}
|
|
5377
|
+
if (count < 2 && !isRowSpan) {
|
|
5378
|
+
uniformIds.clear();
|
|
5379
|
+
break;
|
|
5380
|
+
}
|
|
5381
|
+
if (count > 1) {
|
|
5382
|
+
minRowSpan = Math.min(minRowSpan, count);
|
|
5383
|
+
uniformIds.add(firstId);
|
|
5384
|
+
}
|
|
5385
|
+
}
|
|
5386
|
+
if (uniformIds.size > 0) {
|
|
5387
|
+
allRows.forEach((row) => {
|
|
5388
|
+
row.children.forEach((cell) => {
|
|
5389
|
+
if (uniformIds.has(cell.id)) {
|
|
5390
|
+
const { rowSpan, colSpan } = splitCellOperation.getCellSpan(cell);
|
|
5391
|
+
const reducedRowSpan = rowSpan - minRowSpan + 1;
|
|
5392
|
+
splitCellOperation.setSpanAttributes(cell, colSpan, reducedRowSpan, table);
|
|
5393
|
+
}
|
|
5394
|
+
});
|
|
5395
|
+
});
|
|
5396
|
+
}
|
|
5397
|
+
}
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
|
|
5322
5401
|
/**
|
|
5323
5402
|
* Strategy to convert a native HTML table element into an RTETableBlock DTO.
|
|
5324
5403
|
*/
|
|
@@ -5334,10 +5413,10 @@ class TableToTableBlockStrategy extends contentState.ElementToDTOStrategy {
|
|
|
5334
5413
|
* @inheritDoc
|
|
5335
5414
|
*/
|
|
5336
5415
|
handle(elementsArray, options) {
|
|
5337
|
-
return
|
|
5416
|
+
return splitCellOperation.RTETableBlock.from({
|
|
5338
5417
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
5339
5418
|
type: 'table-block',
|
|
5340
|
-
annotations: contentState.htmlElementToAnnotationGenerator.generate(
|
|
5419
|
+
annotations: contentState.htmlElementToAnnotationGenerator.generate(splitCellOperation.RTETableBlock, elementsArray[0], options),
|
|
5341
5420
|
children: [],
|
|
5342
5421
|
}, options);
|
|
5343
5422
|
}
|
|
@@ -5373,10 +5452,10 @@ class TheadToTableHeadBlockStrategy extends contentState.BlockToRTEBlockStrategy
|
|
|
5373
5452
|
* @inheritDoc
|
|
5374
5453
|
*/
|
|
5375
5454
|
handle(elementsArray, options) {
|
|
5376
|
-
return
|
|
5455
|
+
return splitCellOperation.RTETableHeadBlock.from({
|
|
5377
5456
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
5378
5457
|
type: 'table-head',
|
|
5379
|
-
annotations: contentState.htmlElementToAnnotationGenerator.generate(
|
|
5458
|
+
annotations: contentState.htmlElementToAnnotationGenerator.generate(splitCellOperation.RTETableHeadBlock, elementsArray[0], options),
|
|
5380
5459
|
children: [],
|
|
5381
5460
|
}, options);
|
|
5382
5461
|
}
|
|
@@ -5412,10 +5491,10 @@ class TbodyToTableBodyBlockStrategy extends contentState.BlockToRTEBlockStrategy
|
|
|
5412
5491
|
* @inheritDoc
|
|
5413
5492
|
*/
|
|
5414
5493
|
handle(elementsArray, options) {
|
|
5415
|
-
return
|
|
5494
|
+
return splitCellOperation.RTETableBodyBlock.from({
|
|
5416
5495
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
5417
5496
|
type: 'table-body',
|
|
5418
|
-
annotations: contentState.htmlElementToAnnotationGenerator.generate(
|
|
5497
|
+
annotations: contentState.htmlElementToAnnotationGenerator.generate(splitCellOperation.RTETableBodyBlock, elementsArray[0], options),
|
|
5419
5498
|
children: [],
|
|
5420
5499
|
}, options);
|
|
5421
5500
|
}
|
|
@@ -5451,10 +5530,10 @@ class TrToTableRowBlockStrategy extends contentState.BlockToRTEBlockStrategyAbst
|
|
|
5451
5530
|
* @inheritDoc
|
|
5452
5531
|
*/
|
|
5453
5532
|
handle(elementsArray, options) {
|
|
5454
|
-
return
|
|
5533
|
+
return splitCellOperation.RTETableRowBlock.from({
|
|
5455
5534
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
5456
5535
|
type: 'table-row',
|
|
5457
|
-
annotations: contentState.htmlElementToAnnotationGenerator.generate(
|
|
5536
|
+
annotations: contentState.htmlElementToAnnotationGenerator.generate(splitCellOperation.RTETableRowBlock, elementsArray[0], options),
|
|
5458
5537
|
children: [],
|
|
5459
5538
|
}, options);
|
|
5460
5539
|
}
|
|
@@ -5511,17 +5590,17 @@ class TdToTableCellBlockStrategy extends contentState.BlockToRTEBlockStrategyAbs
|
|
|
5511
5590
|
},
|
|
5512
5591
|
];
|
|
5513
5592
|
if (element.tagName === 'TH') {
|
|
5514
|
-
return
|
|
5593
|
+
return splitCellOperation.RTETableHeadCellBlock.from({
|
|
5515
5594
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
5516
5595
|
type: 'table-head-cell',
|
|
5517
|
-
annotations: contentState.htmlElementToAnnotationGenerator.generate(
|
|
5596
|
+
annotations: contentState.htmlElementToAnnotationGenerator.generate(splitCellOperation.RTETableCellBlock, element, options),
|
|
5518
5597
|
children: defaultChildren,
|
|
5519
5598
|
}, options);
|
|
5520
5599
|
}
|
|
5521
|
-
return
|
|
5600
|
+
return splitCellOperation.RTETableCellBlock.from({
|
|
5522
5601
|
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
5523
5602
|
type: 'table-cell',
|
|
5524
|
-
annotations: contentState.htmlElementToAnnotationGenerator.generate(
|
|
5603
|
+
annotations: contentState.htmlElementToAnnotationGenerator.generate(splitCellOperation.RTETableHeadCellBlock, element, options),
|
|
5525
5604
|
children: defaultChildren,
|
|
5526
5605
|
}, options);
|
|
5527
5606
|
}
|
|
@@ -5601,7 +5680,7 @@ class TableAnnotationHandlerBase extends contentState.AnnotationGeneratorStrateg
|
|
|
5601
5680
|
*/
|
|
5602
5681
|
getBackgroundColor(element) {
|
|
5603
5682
|
if (element.style.backgroundColor) {
|
|
5604
|
-
return element.style.backgroundColor;
|
|
5683
|
+
return splitCellOperation.RTETableColorManager.getColorKey(element.style.backgroundColor);
|
|
5605
5684
|
}
|
|
5606
5685
|
return null;
|
|
5607
5686
|
}
|
|
@@ -5613,37 +5692,15 @@ class TableAnnotationHandlerBase extends contentState.AnnotationGeneratorStrateg
|
|
|
5613
5692
|
*/
|
|
5614
5693
|
getBorder(element) {
|
|
5615
5694
|
const style = element.style;
|
|
5616
|
-
// Check if border is defined
|
|
5617
|
-
if (style.border) {
|
|
5618
|
-
return this.parseBorderString(style.border);
|
|
5619
|
-
}
|
|
5620
5695
|
// Check individual border properties
|
|
5621
|
-
const borderStyle = style.borderStyle
|
|
5622
|
-
const borderWidth = style.borderWidth
|
|
5623
|
-
const borderColor = style.borderColor
|
|
5624
|
-
if (borderStyle
|
|
5625
|
-
return {
|
|
5626
|
-
style: borderStyle,
|
|
5627
|
-
width: borderWidth,
|
|
5628
|
-
color: borderColor,
|
|
5629
|
-
};
|
|
5630
|
-
}
|
|
5631
|
-
return null;
|
|
5632
|
-
}
|
|
5633
|
-
/**
|
|
5634
|
-
* Parse border string into structured border type.
|
|
5635
|
-
*
|
|
5636
|
-
* @param {string} borderStr - Border CSS string.
|
|
5637
|
-
* @returns {Nullable<VegaRTETableBorderType>} Parsed border properties.
|
|
5638
|
-
*/
|
|
5639
|
-
parseBorderString(borderStr) {
|
|
5640
|
-
// Expected format: "style width color" (e.g., "solid 1px #ddd")
|
|
5641
|
-
const parts = borderStr.trim().split(/\s+/);
|
|
5642
|
-
if (parts.length >= 3) {
|
|
5696
|
+
const borderStyle = style.borderStyle;
|
|
5697
|
+
const borderWidth = style.borderWidth;
|
|
5698
|
+
const borderColor = style.borderColor;
|
|
5699
|
+
if (borderColor || borderStyle || borderWidth) {
|
|
5643
5700
|
return {
|
|
5644
|
-
style:
|
|
5645
|
-
width:
|
|
5646
|
-
color:
|
|
5701
|
+
style: borderStyle === 'initial' ? '' : borderStyle,
|
|
5702
|
+
width: borderWidth === 'initial' ? '' : borderWidth,
|
|
5703
|
+
color: splitCellOperation.RTETableColorManager.getColorKey(borderColor === 'initial' ? '' : borderColor),
|
|
5647
5704
|
};
|
|
5648
5705
|
}
|
|
5649
5706
|
return null;
|
|
@@ -5779,11 +5836,37 @@ class TableCellAnnotationHandler extends TableAnnotationHandlerBase {
|
|
|
5779
5836
|
height: this.getHeight(element),
|
|
5780
5837
|
textAlign: this.getTextAlign(element),
|
|
5781
5838
|
verticalAlign: this.getVerticalAlign(element),
|
|
5839
|
+
minWidth: this.getMinWidth(element),
|
|
5840
|
+
boxSizing: this.getBoxSizing(element),
|
|
5782
5841
|
});
|
|
5783
5842
|
return Object.keys(cellAnnotation).length > 0
|
|
5784
5843
|
? { tableCell: cellAnnotation }
|
|
5785
5844
|
: {};
|
|
5786
5845
|
}
|
|
5846
|
+
/**
|
|
5847
|
+
* Extract minimum width from element.
|
|
5848
|
+
*
|
|
5849
|
+
* @param {HTMLElement} element - Table cell element.
|
|
5850
|
+
* @returns {Nullable<string>} Minimum width value.
|
|
5851
|
+
*/
|
|
5852
|
+
getMinWidth(element) {
|
|
5853
|
+
if (element.style.minWidth) {
|
|
5854
|
+
return element.style.minWidth;
|
|
5855
|
+
}
|
|
5856
|
+
return null;
|
|
5857
|
+
}
|
|
5858
|
+
/**
|
|
5859
|
+
* Extract box sizing from element.
|
|
5860
|
+
*
|
|
5861
|
+
* @param {HTMLElement} element - Table cell element.
|
|
5862
|
+
* @returns {Nullable<string>} Box sizing value.
|
|
5863
|
+
*/
|
|
5864
|
+
getBoxSizing(element) {
|
|
5865
|
+
if (element.style.boxSizing) {
|
|
5866
|
+
return element.style.boxSizing;
|
|
5867
|
+
}
|
|
5868
|
+
return null;
|
|
5869
|
+
}
|
|
5787
5870
|
/**
|
|
5788
5871
|
* Extract padding from element.
|
|
5789
5872
|
*
|
|
@@ -5862,8 +5945,8 @@ class UpdateTablePropertiesStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5862
5945
|
if (tableRef) {
|
|
5863
5946
|
// Update the table styles directly on the DOM element if possible to avoid the component re-render
|
|
5864
5947
|
const tableContainer = tableRef.closest('.v-rte--extension-table-container');
|
|
5865
|
-
const {
|
|
5866
|
-
tableRef.style.backgroundColor =
|
|
5948
|
+
const { backgroundColorAnnotation, width, height } = annotation;
|
|
5949
|
+
tableRef.style.backgroundColor = backgroundColorAnnotation.renderStyle().color;
|
|
5867
5950
|
tableRef.style.border = annotation.borderStr;
|
|
5868
5951
|
tableRef.style.width = width;
|
|
5869
5952
|
tableRef.style.height = height;
|
|
@@ -5889,7 +5972,8 @@ class UpdateTableCellPropertiesStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5889
5972
|
const annotation = action.toAnnotation();
|
|
5890
5973
|
const tableCellRef = this.getDOMByEntity(target);
|
|
5891
5974
|
if (tableCellRef) {
|
|
5892
|
-
const {
|
|
5975
|
+
const { width, height, borderStr, padding, textAlign, verticalAlign } = annotation;
|
|
5976
|
+
const backgroundColor = annotation.renderStyle().backgroundColor || '';
|
|
5893
5977
|
tableCellRef.style.backgroundColor = backgroundColor;
|
|
5894
5978
|
tableCellRef.style.border = borderStr;
|
|
5895
5979
|
tableCellRef.style.width = width;
|
|
@@ -5901,6 +5985,221 @@ class UpdateTableCellPropertiesStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
5901
5985
|
}
|
|
5902
5986
|
}
|
|
5903
5987
|
|
|
5988
|
+
/**
|
|
5989
|
+
* Strategy to handle horizontal split of a table cell (splits top/bottom).
|
|
5990
|
+
*/
|
|
5991
|
+
class SplitCellHorizontallyStrategy extends codeBlock.ActionHandleStrategy {
|
|
5992
|
+
/**
|
|
5993
|
+
* @inheritDoc
|
|
5994
|
+
*/
|
|
5995
|
+
handleAction(_action, target) {
|
|
5996
|
+
const row = target.parent;
|
|
5997
|
+
const section = row.parent;
|
|
5998
|
+
const table = splitCellOperation.getParentBlockByType(row, splitCellOperation.RTETableBlock);
|
|
5999
|
+
const allRows = splitCellOperation.getAllTableRows(table);
|
|
6000
|
+
const currentRowIndex = allRows.indexOf(row);
|
|
6001
|
+
const { colSpan, rowSpan } = splitCellOperation.getCellSpan(target);
|
|
6002
|
+
const cellColumnPosition = splitCellOperation.getActualColumnPosition(target, allRows);
|
|
6003
|
+
// When rowSpan=1, we need to insert a new row and both cells have rowSpan=1
|
|
6004
|
+
// When rowSpan>1, we split the existing rowSpan
|
|
6005
|
+
const topRowSpan = Math.ceil(rowSpan / 2);
|
|
6006
|
+
const bottomRowSpan = Math.max(1, rowSpan - topRowSpan);
|
|
6007
|
+
const needsNewRow = rowSpan === 1;
|
|
6008
|
+
// Update original cell's rowSpan (top cell)
|
|
6009
|
+
splitCellOperation.setSpanAttributes(target, colSpan, topRowSpan, table);
|
|
6010
|
+
// Determine where the bottom cell should be inserted
|
|
6011
|
+
const bottomCellRowIndex = currentRowIndex + topRowSpan;
|
|
6012
|
+
// Create the bottom cell with the same col span and type as the original
|
|
6013
|
+
const bottomCell = splitCellOperation.createNewCell(target.type);
|
|
6014
|
+
splitCellOperation.setSpanAttributes(bottomCell, colSpan, bottomRowSpan, table);
|
|
6015
|
+
if (needsNewRow) {
|
|
6016
|
+
// Need to create a new row for the bottom cell
|
|
6017
|
+
const newRow = this.createNewRowWithCell(section, bottomCell);
|
|
6018
|
+
// Find the correct position in the section to insert the new row
|
|
6019
|
+
const rowIndexInSection = section.children.indexOf(row);
|
|
6020
|
+
section.apply(new codeBlock.InsertChildrenAfterAction(section.children[rowIndexInSection], newRow));
|
|
6021
|
+
// Update allRows
|
|
6022
|
+
allRows.splice(bottomCellRowIndex, 0, newRow);
|
|
6023
|
+
// Update all cells from all previous rows that span through the insertion point
|
|
6024
|
+
// (except the split cell itself)
|
|
6025
|
+
this.updateCellsSpanningThroughInsertionPoint(allRows, bottomCellRowIndex, target, table);
|
|
6026
|
+
}
|
|
6027
|
+
else {
|
|
6028
|
+
// Row exists - insert the bottom cell at the correct position
|
|
6029
|
+
const targetRow = allRows[bottomCellRowIndex];
|
|
6030
|
+
const insertIndex = this.findInsertPosition(targetRow, cellColumnPosition, allRows, bottomCellRowIndex);
|
|
6031
|
+
targetRow.children.splice(insertIndex, 0, bottomCell);
|
|
6032
|
+
bottomCell.parent = targetRow;
|
|
6033
|
+
}
|
|
6034
|
+
}
|
|
6035
|
+
/**
|
|
6036
|
+
* Find the correct insertion position for a cell at a given column position in a row.
|
|
6037
|
+
* Accounts for cells from previous rows with rowspan extending into the target row.
|
|
6038
|
+
*
|
|
6039
|
+
* @param {RTETableRowBlock} targetRow - The row to insert into.
|
|
6040
|
+
* @param {number} targetColumnPosition - The target column position.
|
|
6041
|
+
* @param {RTETableRowBlock[]} allRows - All rows in the table.
|
|
6042
|
+
* @param {number} rowIndex - The index of the target row.
|
|
6043
|
+
* @returns {number} The physical cell index to insert at.
|
|
6044
|
+
*/
|
|
6045
|
+
findInsertPosition(targetRow, targetColumnPosition, allRows, rowIndex) {
|
|
6046
|
+
// Calculate columns occupied by cells from previous rows extending into this row
|
|
6047
|
+
let columnsOccupiedByPreviousRows = 0;
|
|
6048
|
+
for (let r = 0; r < rowIndex; r++) {
|
|
6049
|
+
const prevRow = allRows[r];
|
|
6050
|
+
for (const prevCell of prevRow.children) {
|
|
6051
|
+
const { colSpan, rowSpan } = splitCellOperation.getCellSpan(prevCell);
|
|
6052
|
+
// Check if this cell extends into the target row
|
|
6053
|
+
if (r + rowSpan > rowIndex) {
|
|
6054
|
+
const prevCellColumnPosition = splitCellOperation.getActualColumnPosition(prevCell, allRows);
|
|
6055
|
+
if (prevCellColumnPosition < targetColumnPosition) {
|
|
6056
|
+
columnsOccupiedByPreviousRows += colSpan;
|
|
6057
|
+
}
|
|
6058
|
+
}
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
6061
|
+
// Find the insertion position in the target row
|
|
6062
|
+
let currentColumn = columnsOccupiedByPreviousRows;
|
|
6063
|
+
for (let i = 0; i < targetRow.children.length; i++) {
|
|
6064
|
+
if (currentColumn >= targetColumnPosition) {
|
|
6065
|
+
return i;
|
|
6066
|
+
}
|
|
6067
|
+
const cell = targetRow.children[i];
|
|
6068
|
+
const { colSpan } = splitCellOperation.getCellSpan(cell);
|
|
6069
|
+
currentColumn += colSpan;
|
|
6070
|
+
}
|
|
6071
|
+
return targetRow.children.length;
|
|
6072
|
+
}
|
|
6073
|
+
/**
|
|
6074
|
+
* Create a new row with only the bottom cell.
|
|
6075
|
+
* Other columns will be covered by cells from the original row with increased rowSpan.
|
|
6076
|
+
*
|
|
6077
|
+
* @param {RTETableBodyBlock | RTETableHeadBlock} section - The section (thead or tbody).
|
|
6078
|
+
* @param {RTETableCellBlock | RTETableHeadCellBlock} bottomCell - The bottom cell to insert.
|
|
6079
|
+
* @returns {RTETableRowBlock} The newly created row.
|
|
6080
|
+
*/
|
|
6081
|
+
createNewRowWithCell(section, bottomCell) {
|
|
6082
|
+
const rowTemplate = {
|
|
6083
|
+
id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
|
|
6084
|
+
type: 'table-row',
|
|
6085
|
+
children: [],
|
|
6086
|
+
};
|
|
6087
|
+
const newRow = splitCellOperation.RTETableRowBlock.from(rowTemplate);
|
|
6088
|
+
newRow.parent = section;
|
|
6089
|
+
// Add the bottom cell to the row
|
|
6090
|
+
newRow.children.push(bottomCell);
|
|
6091
|
+
bottomCell.parent = newRow;
|
|
6092
|
+
return newRow;
|
|
6093
|
+
}
|
|
6094
|
+
/**
|
|
6095
|
+
* Update all cells from all previous rows that span through the newly inserted row.
|
|
6096
|
+
* When a new row is inserted at `insertionRowIndex`, any cell from a previous row
|
|
6097
|
+
* that has rowSpan extending to or beyond that position needs rowSpan increased by 1.
|
|
6098
|
+
*
|
|
6099
|
+
* @param {RTETableRowBlock[]} allRows - All rows in the table (after insertion).
|
|
6100
|
+
* @param {number} insertionRowIndex - The index where the new row was inserted.
|
|
6101
|
+
* @param {RTETableCellBlock | RTETableHeadCellBlock} splitCell - The cell that was split (skip this one).
|
|
6102
|
+
* @param {RTETableBlock} table - The table block.
|
|
6103
|
+
*/
|
|
6104
|
+
updateCellsSpanningThroughInsertionPoint(allRows, insertionRowIndex, splitCell, table) {
|
|
6105
|
+
// Check all rows before the insertion point (not including the inserted row itself)
|
|
6106
|
+
for (let r = 0; r < insertionRowIndex; r++) {
|
|
6107
|
+
const row = allRows[r];
|
|
6108
|
+
for (const cell of row.children) {
|
|
6109
|
+
// Skip the cell that was split - it already has the correct rowSpan
|
|
6110
|
+
if (cell === splitCell) {
|
|
6111
|
+
continue;
|
|
6112
|
+
}
|
|
6113
|
+
const { colSpan, rowSpan } = splitCellOperation.getCellSpan(cell);
|
|
6114
|
+
// Calculate where this cell ends
|
|
6115
|
+
const cellRowEnd = r + rowSpan;
|
|
6116
|
+
// If this cell extends to or past where we inserted the row,
|
|
6117
|
+
// it needs to span over the new row too
|
|
6118
|
+
if (cellRowEnd >= insertionRowIndex) {
|
|
6119
|
+
splitCellOperation.setSpanAttributes(cell, colSpan, rowSpan + 1, table);
|
|
6120
|
+
}
|
|
6121
|
+
}
|
|
6122
|
+
}
|
|
6123
|
+
}
|
|
6124
|
+
}
|
|
6125
|
+
|
|
6126
|
+
/**
|
|
6127
|
+
* Strategy to handle vertical split of a table cell (splits left/right).
|
|
6128
|
+
*/
|
|
6129
|
+
class SplitCellVerticallyStrategy extends codeBlock.ActionHandleStrategy {
|
|
6130
|
+
/**
|
|
6131
|
+
* @inheritDoc
|
|
6132
|
+
*/
|
|
6133
|
+
handleAction(_action, target) {
|
|
6134
|
+
const row = target.parent;
|
|
6135
|
+
const table = splitCellOperation.getParentBlockByType(row, splitCellOperation.RTETableBlock);
|
|
6136
|
+
const allRows = splitCellOperation.getAllTableRows(table);
|
|
6137
|
+
const currentRowIndex = allRows.indexOf(row);
|
|
6138
|
+
const { colSpan, rowSpan } = splitCellOperation.getCellSpan(target);
|
|
6139
|
+
// Get the actual column position of the cell being split
|
|
6140
|
+
const cellColumnStart = splitCellOperation.getActualColumnPosition(target, allRows);
|
|
6141
|
+
const cellColumnEnd = cellColumnStart + colSpan - 1;
|
|
6142
|
+
// Calculate new column spans (split the column span)
|
|
6143
|
+
const leftColSpan = Math.ceil(colSpan / 2);
|
|
6144
|
+
const rightColSpan = Math.floor(colSpan / 2);
|
|
6145
|
+
// Update original cell's column spans (left cell)
|
|
6146
|
+
splitCellOperation.setSpanAttributes(target, leftColSpan, rowSpan, table);
|
|
6147
|
+
// Create new cell (right cell) with same type as original
|
|
6148
|
+
const newCell = splitCellOperation.createNewCell(target.type);
|
|
6149
|
+
splitCellOperation.setSpanAttributes(newCell, rightColSpan, rowSpan, table);
|
|
6150
|
+
// Insert new cell after the original in the same row
|
|
6151
|
+
row.apply(new codeBlock.InsertChildrenAfterAction(target, newCell));
|
|
6152
|
+
// Only when splitting a cell with colSpan=1 do we add a new column to the table.
|
|
6153
|
+
// When colSpan>1, we're just redistributing existing columns.
|
|
6154
|
+
// For example:
|
|
6155
|
+
// colSpan=1: split into 1+1 → adds 1 new column
|
|
6156
|
+
// colSpan=2: split into 1+1 → just redistributes 2 existing columns
|
|
6157
|
+
// colSpan=3: split into 2+1 → just redistributes 3 existing columns
|
|
6158
|
+
const newColumnsAdded = colSpan === 1 ? 1 : 0;
|
|
6159
|
+
if (newColumnsAdded > 0) {
|
|
6160
|
+
this.updateOtherRowsCells(allRows, currentRowIndex, cellColumnStart, cellColumnEnd, rowSpan, newColumnsAdded, table);
|
|
6161
|
+
}
|
|
6162
|
+
}
|
|
6163
|
+
/**
|
|
6164
|
+
* Update cells in other rows to account for the new columns added by the split.
|
|
6165
|
+
* When a cell is split vertically and new columns are added to the table,
|
|
6166
|
+
* cells in other rows that span across the position where the split happened
|
|
6167
|
+
* need their colSpan increased.
|
|
6168
|
+
*
|
|
6169
|
+
* @param {RTETableRowBlock[]} allRows - All rows in the table.
|
|
6170
|
+
* @param {number} splitRowIndex - The index of the row containing the split cell.
|
|
6171
|
+
* @param {number} splitColumnStart - The starting column position of the split cell.
|
|
6172
|
+
* @param {number} splitColumnEnd - The ending column position of the split cell.
|
|
6173
|
+
* @param {number} splitCellRowSpan - The rowSpan of the split cell.
|
|
6174
|
+
* @param {number} newColumnsAdded - The number of new columns added by the split.
|
|
6175
|
+
* @param {RTETableBlock} table - The table block.
|
|
6176
|
+
*/
|
|
6177
|
+
updateOtherRowsCells(allRows, splitRowIndex, splitColumnStart, splitColumnEnd, splitCellRowSpan, newColumnsAdded, table) {
|
|
6178
|
+
// Iterate through all rows
|
|
6179
|
+
for (let rowIndex = 0; rowIndex < allRows.length; rowIndex++) {
|
|
6180
|
+
const currentRow = allRows[rowIndex];
|
|
6181
|
+
// Skip rows that are spanned by the split cell itself
|
|
6182
|
+
if (rowIndex >= splitRowIndex && rowIndex < splitRowIndex + splitCellRowSpan) {
|
|
6183
|
+
continue;
|
|
6184
|
+
}
|
|
6185
|
+
// Check each cell in the current row
|
|
6186
|
+
for (const cell of currentRow.children) {
|
|
6187
|
+
const cellColumnStart = splitCellOperation.getActualColumnPosition(cell, allRows);
|
|
6188
|
+
const { colSpan, rowSpan } = splitCellOperation.getCellSpan(cell);
|
|
6189
|
+
const cellColumnEnd = cellColumnStart + colSpan - 1;
|
|
6190
|
+
// Check if this cell spans across the columns where the split happened
|
|
6191
|
+
// A cell needs updating if its column range overlaps with the split cell's column range
|
|
6192
|
+
const overlaps = cellColumnEnd >= splitColumnStart && cellColumnStart <= splitColumnEnd;
|
|
6193
|
+
if (overlaps) {
|
|
6194
|
+
// Increase this cell's colSpan by the number of new columns added
|
|
6195
|
+
splitCellOperation.setSpanAttributes(cell, colSpan + newColumnsAdded, rowSpan, table);
|
|
6196
|
+
break; // No need to check other cells in this row
|
|
6197
|
+
}
|
|
6198
|
+
}
|
|
6199
|
+
}
|
|
6200
|
+
}
|
|
6201
|
+
}
|
|
6202
|
+
|
|
5904
6203
|
/**
|
|
5905
6204
|
* Function extension class for Vega Rich Text Editor.
|
|
5906
6205
|
*/
|
|
@@ -5908,9 +6207,9 @@ class VegaRTETableExtension extends VegaRTEExtension {
|
|
|
5908
6207
|
/**
|
|
5909
6208
|
* Instantiate the table extension
|
|
5910
6209
|
*
|
|
5911
|
-
* @param {
|
|
6210
|
+
* @param {VegaRTEColorSchema[]} colors - The table border color and background color list.
|
|
5912
6211
|
*/
|
|
5913
|
-
constructor(colors =
|
|
6212
|
+
constructor(colors = splitCellOperation.RTE_TABLE_DEFAULT_COLORS) {
|
|
5914
6213
|
super();
|
|
5915
6214
|
this.toolbarButtonRenderer = new RTETableToolbarButtonRenderer();
|
|
5916
6215
|
this.tableBlockRenderer = new RTETableBlockRenderer();
|
|
@@ -5918,13 +6217,14 @@ class VegaRTETableExtension extends VegaRTEExtension {
|
|
|
5918
6217
|
this.tableCellRenderer = new RTETableCellRenderer();
|
|
5919
6218
|
this.tableHeadCellRenderer = new RTETableHeadCellRenderer();
|
|
5920
6219
|
this.tableSelection = new RTETableSelection();
|
|
6220
|
+
splitCellOperation.RTETableColorManager.setTableColors(colors);
|
|
5921
6221
|
this.registerToolbarButtonRenderer('table', this.toolbarButtonRenderer);
|
|
5922
|
-
this.registerBlockBasicStrategies(
|
|
5923
|
-
this.registerBlockBasicStrategies(
|
|
5924
|
-
this.registerBlockBasicStrategies(
|
|
5925
|
-
this.registerBlockBasicStrategies(
|
|
5926
|
-
this.registerBlockBasicStrategies(
|
|
5927
|
-
this.registerBlockBasicStrategies(
|
|
6222
|
+
this.registerBlockBasicStrategies(splitCellOperation.RTETableBlock.name);
|
|
6223
|
+
this.registerBlockBasicStrategies(splitCellOperation.RTETableHeadBlock.name);
|
|
6224
|
+
this.registerBlockBasicStrategies(splitCellOperation.RTETableHeadCellBlock.name);
|
|
6225
|
+
this.registerBlockBasicStrategies(splitCellOperation.RTETableRowBlock.name);
|
|
6226
|
+
this.registerBlockBasicStrategies(splitCellOperation.RTETableCellBlock.name);
|
|
6227
|
+
this.registerBlockBasicStrategies(splitCellOperation.RTETableBodyBlock.name);
|
|
5928
6228
|
this.registerRenderer('table-block', this.tableBlockRenderer);
|
|
5929
6229
|
this.registerRenderer('table-head', new RTETableHeadRenderer());
|
|
5930
6230
|
this.registerRenderer('table-head-cell', this.tableHeadCellRenderer);
|
|
@@ -5932,12 +6232,12 @@ class VegaRTETableExtension extends VegaRTEExtension {
|
|
|
5932
6232
|
this.registerRenderer('table-cell', this.tableCellRenderer);
|
|
5933
6233
|
this.registerRenderer('table-body', new RTETableBodyRenderer());
|
|
5934
6234
|
this.registerRenderer('table-caption', new RTETableCaptionRenderer());
|
|
5935
|
-
this.registerNode('table-block',
|
|
5936
|
-
this.registerNode('table-head',
|
|
5937
|
-
this.registerNode('table-head-cell',
|
|
5938
|
-
this.registerNode('table-row',
|
|
5939
|
-
this.registerNode('table-cell',
|
|
5940
|
-
this.registerNode('table-body',
|
|
6235
|
+
this.registerNode('table-block', splitCellOperation.RTETableBlock);
|
|
6236
|
+
this.registerNode('table-head', splitCellOperation.RTETableHeadBlock);
|
|
6237
|
+
this.registerNode('table-head-cell', splitCellOperation.RTETableHeadCellBlock);
|
|
6238
|
+
this.registerNode('table-row', splitCellOperation.RTETableRowBlock);
|
|
6239
|
+
this.registerNode('table-cell', splitCellOperation.RTETableCellBlock);
|
|
6240
|
+
this.registerNode('table-body', splitCellOperation.RTETableBodyBlock);
|
|
5941
6241
|
this.registerNode('table-caption', RTETableCaptionBlock);
|
|
5942
6242
|
this.registerElementToBlockDTOClassStrategy(new TableToTableBlockStrategy());
|
|
5943
6243
|
this.registerElementToBlockDTOClassStrategy(new TheadToTableHeadBlockStrategy());
|
|
@@ -5949,7 +6249,6 @@ class VegaRTETableExtension extends VegaRTEExtension {
|
|
|
5949
6249
|
this.registerAnnotationHandler(new TableAnnotationHandler());
|
|
5950
6250
|
this.registerAnnotationHandler(new TableCellAnnotationHandler());
|
|
5951
6251
|
this.registerAnnotationHandler(new TableHeadCellAnnotationHandler());
|
|
5952
|
-
this.tableBlockRenderer.updateTableColorSchema(colors);
|
|
5953
6252
|
}
|
|
5954
6253
|
/**
|
|
5955
6254
|
* Initializes the extension with the given context
|
|
@@ -5977,24 +6276,29 @@ class VegaRTETableExtension extends VegaRTEExtension {
|
|
|
5977
6276
|
const deleteTableBlockStrategy = new DeleteTableBlockStrategy();
|
|
5978
6277
|
VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
5979
6278
|
VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
5980
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5981
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
6279
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
6280
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
5982
6281
|
VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
5983
6282
|
VegaRTEExtension.registerActionHandleStrategy(contentState.RTEImageBlock.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
5984
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5985
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5986
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5987
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5988
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5989
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5990
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5991
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5992
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
5993
|
-
VegaRTEExtension.registerActionHandleStrategy(
|
|
6283
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.INSERT_TABLE_ROW, new InsertTableRowStrategy());
|
|
6284
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.DELETE_TABLE_ROW, new DeleteTableRowStrategy());
|
|
6285
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.TOGGLE_HEADER_ROW, new ToggleHeaderRowStrategy());
|
|
6286
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.INSERT_TABLE_COLUMN, new InsertTableColumnStrategy());
|
|
6287
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.DELETE_TABLE_COLUMN, new DeleteTableColumnStrategy());
|
|
6288
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.TOGGLE_HEADER_TABLE_COLUMN, new splitCellOperation.ToggleHeaderTableColumnStrategy());
|
|
6289
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, splitCellOperation.SPLIT_CELL_HORIZONTALLY, new SplitCellHorizontallyStrategy());
|
|
6290
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, splitCellOperation.SPLIT_CELL_VERTICALLY, new SplitCellVerticallyStrategy());
|
|
6291
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, splitCellOperation.SPLIT_CELL_HORIZONTALLY, new SplitCellHorizontallyStrategy());
|
|
6292
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, splitCellOperation.SPLIT_CELL_VERTICALLY, new SplitCellVerticallyStrategy());
|
|
6293
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.SELECT_TABLE_COLUMN, new SelectTableColumnStrategy());
|
|
6294
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.MERGE_CELLS, new MergeCellsStrategy());
|
|
6295
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, UpdateTablePropertiesAction.name, new UpdateTablePropertiesStrategy());
|
|
6296
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, RTETableCellAnnotationsAction.name, new UpdateTableCellPropertiesStrategy());
|
|
6297
|
+
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, RTETableHeadCellAnnotationsAction.name, new UpdateTableCellPropertiesStrategy());
|
|
5994
6298
|
VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.DELETE_BLOCK_CONTENT, new PreventCellContentDeleteInterceptor());
|
|
5995
|
-
VegaRTEExtension.registerActionHandlerInterceptor(
|
|
5996
|
-
VegaRTEExtension.registerActionHandlerInterceptor(
|
|
5997
|
-
VegaRTEExtension.registerActionHandlerInterceptor(
|
|
6299
|
+
VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableRowBlock.name, codeBlock.ModifyContentActionType.INSERT_CHILDREN_BEFORE, new PreventRowInsertInterceptor());
|
|
6300
|
+
VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableCellBlock.name, codeBlock.ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
|
|
6301
|
+
VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableHeadCellBlock.name, codeBlock.ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
|
|
5998
6302
|
})();
|
|
5999
6303
|
|
|
6000
6304
|
exports.ActionHandlerInterceptor = ActionHandlerInterceptor;
|
|
@@ -6014,5 +6318,4 @@ exports.VegaRTETableExtension = VegaRTETableExtension;
|
|
|
6014
6318
|
exports.VegaRTETokenExtension = VegaRTETokenExtension;
|
|
6015
6319
|
exports.VegaRTEToolbarButtonRenderer = VegaRTEToolbarButtonRenderer;
|
|
6016
6320
|
exports.VegaSkeletonLoader = VegaSkeletonLoader;
|
|
6017
|
-
exports.VegaThemeManager = VegaThemeManager;
|
|
6018
6321
|
exports.VegaZIndexManager = VegaZIndexManager$1;
|