@heartlandone/vega 2.94.0 → 2.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-d05c3410.js → app-globals-38afea36.js} +7 -7
- package/dist/cjs/{child-nodes-event-prevent-slimmer-e67ee84c.js → child-nodes-event-prevent-slimmer-e0ac8467.js} +1 -1
- package/dist/cjs/{code-block-493c7ce7.js → code-block-4126dc3b.js} +1501 -55
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-ab21fcbf.js → component-value-history-controller-slimmer.abstract-38ba956e.js} +2 -2
- package/dist/cjs/{content-state-fc34a814.js → content-state-50e8a03c.js} +142 -580
- package/dist/cjs/{element-appender-slimmer-1d6323c2.js → element-appender-slimmer-7773fdab.js} +115 -0
- package/dist/cjs/{event-emit-slimmer-d234a619.js → event-emit-slimmer-34aa195e.js} +1 -1
- package/dist/cjs/{image-annotation-action-7c4cd316.js → image-annotation-action-89363de8.js} +2 -2
- package/dist/cjs/{image-extension-30a7c10f.js → image-extension-c881c454.js} +2 -2
- package/dist/cjs/index.cjs.js +11 -11
- package/dist/cjs/{internal-vega-event-manager-13c4012b.js → internal-vega-event-manager-7003c84a.js} +10 -2
- package/dist/cjs/{link-extension-92a63cb7.js → link-extension-b7f99a52.js} +2 -2
- package/dist/cjs/loader.cjs.js +9 -9
- package/dist/cjs/{public-rules-9e1ea1d9.js → public-rules-72894208.js} +3 -3
- package/dist/cjs/{range-30219330.js → range-95d41dea.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-23bf7485.js → rich-text-editor-required-rule-4d6d2493.js} +1 -1
- package/dist/cjs/shared-backdrop-manager-71e54fdb.js +199 -0
- package/dist/cjs/{split-cell-operation-43752212.js → split-cell-operation-70be116d.js} +2 -2
- package/dist/cjs/{token-extension-ea891d54.js → token-extension-eb828948.js} +36 -12
- package/dist/cjs/vega-accordion.cjs.entry.js +2 -2
- package/dist/cjs/vega-app-footer.cjs.entry.js +2 -2
- package/dist/cjs/vega-app-header-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-banner.cjs.entry.js +2 -2
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-circle.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
- package/dist/cjs/vega-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-calendar_5.cjs.entry.js +3 -3
- package/dist/cjs/vega-carousel.cjs.entry.js +2 -2
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-chip.cjs.entry.js +3 -3
- package/dist/cjs/vega-code-block.cjs.entry.js +6 -6
- package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
- package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +22 -4
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-dialog_2.cjs.entry.js +160 -70
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +41 -13
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +2 -2
- package/dist/cjs/vega-form.cjs.entry.js +3 -3
- package/dist/cjs/vega-image-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-numeric.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-passcode.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +54 -5
- package/dist/cjs/vega-input.cjs.entry.js +2 -2
- package/dist/cjs/vega-item-toggle.cjs.entry.js +2 -2
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +32 -193
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +3 -3
- package/dist/cjs/vega-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +13 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +58 -9
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +611 -93
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +5 -5
- package/dist/cjs/vega-section-title.cjs.entry.js +896 -14
- package/dist/cjs/vega-segment-control.cjs.entry.js +2 -2
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +2 -2
- package/dist/cjs/vega-signature-capture.cjs.entry.js +2 -2
- package/dist/cjs/vega-stepper.cjs.entry.js +3 -3
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-table_11.cjs.entry.js +3 -3
- package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +1 -1
- package/dist/cjs/vega.cjs.js +9 -9
- package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +5 -1
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +52 -1
- package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-render-mode-controller.js +7 -6
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +36 -8
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.js +11 -1
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-items-slot-controler.js +23 -2
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +4 -0
- package/dist/collection/components/vega-input-select/vega-input-select.js +53 -2
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-backdrop-manager.js +141 -0
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +10 -17
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-z-index-controller.js +2 -2
- package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +3 -2
- package/dist/collection/components/vega-modal/vega-modal.js +77 -8
- package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-steps-controller.js +7 -0
- package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +6 -0
- package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.css +4 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +29 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-or-decorator-node-strategy.js +10 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.js +8 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-annotation-strategy.abstract.js +60 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +36 -4
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-items-strategy.abstract.js +27 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-nest-items-strategy.js +74 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +81 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-selection.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +160 -9
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +376 -10
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-unnest-items-strategy.js +104 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +2 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/nest-list-items-action.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/unnest-list-items-action.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/list-annotation.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +10 -1
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +11 -3
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +7 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +8 -4
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +34 -1
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +20 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +25 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +2 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +29 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +30 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/abstract-list-keyboard-handler.js +204 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-shift-tab-outdent-handler.js +42 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-tab-indent-handler.js +34 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/list-keyboard-slimmer.js +180 -0
- package/dist/collection/components/vega-section-title/slimmers/a11y-tree/build-section-title-a11y-tree.js +54 -0
- package/dist/collection/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.js +4 -4
- package/dist/collection/components/vega-section-title/vega-section-title.js +18 -2
- package/dist/collection/helpers/a11y-tree/a11y-node-dto.js +210 -0
- package/dist/collection/helpers/a11y-tree/a11y-tree-applier.js +189 -0
- package/dist/collection/helpers/a11y-tree/a11y-tree.types.js +48 -0
- package/dist/collection/helpers/a11y-tree/strategies/baseline-strategy.js +78 -0
- package/dist/collection/helpers/a11y-tree/strategies/firefox-nvda-strategy.js +56 -0
- package/dist/collection/helpers/a11y-tree/strategies/webkit-voiceover-strategy.js +140 -0
- package/dist/collection/helpers/a11y-tree/strategy-resolver.js +172 -0
- package/dist/collection/helpers/backdrop/shared-backdrop-manager.js +32 -1
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +11 -3
- package/dist/collection/helpers/slimmers/a11y-tree-slimmer.js +54 -0
- package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +29 -0
- package/dist/collection/helpers/slimmers/element-appender/visibility-modifiers/clip-on-scroll-modifier.js +70 -0
- package/dist/collection/helpers/slimmers/element-appender/visibility-modifiers/visibility-modifier.interface.js +1 -0
- package/dist/collection/helpers/ui/element-appender.js +16 -0
- package/dist/esm/{app-globals-f2336686.js → app-globals-d7b651c1.js} +7 -7
- package/dist/esm/{child-nodes-event-prevent-slimmer-96c14f5a.js → child-nodes-event-prevent-slimmer-82626871.js} +1 -1
- package/dist/esm/{code-block-e12588fe.js → code-block-0a88b481.js} +1495 -51
- package/dist/esm/{component-value-history-controller-slimmer.abstract-4e8eb313.js → component-value-history-controller-slimmer.abstract-6846edfa.js} +2 -2
- package/dist/esm/{content-state-8032467a.js → content-state-79ca99e5.js} +105 -541
- package/dist/esm/{element-appender-slimmer-7fcb944b.js → element-appender-slimmer-73ad10ae.js} +115 -0
- package/dist/esm/{event-emit-slimmer-db4a82e0.js → event-emit-slimmer-2452278f.js} +1 -1
- package/dist/esm/{image-annotation-action-b3b6c308.js → image-annotation-action-bb299ef1.js} +3 -3
- package/dist/esm/{image-extension-b6c7e4a7.js → image-extension-48a96f98.js} +2 -2
- package/dist/esm/index.js +10 -10
- package/dist/esm/{internal-vega-event-manager-48690e5b.js → internal-vega-event-manager-2ecc9186.js} +11 -3
- package/dist/esm/{link-extension-97fcb8fb.js → link-extension-09534514.js} +2 -2
- package/dist/esm/loader.js +10 -10
- package/dist/esm/{public-rules-c06f0d2a.js → public-rules-5eb03ef0.js} +3 -3
- package/dist/esm/{range-e999837f.js → range-d4deb7df.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-71f8ee98.js → rich-text-editor-required-rule-5bbbce23.js} +1 -1
- package/dist/esm/shared-backdrop-manager-a7c63838.js +197 -0
- package/dist/esm/{split-cell-operation-359f8082.js → split-cell-operation-7f3058ad.js} +2 -2
- package/dist/esm/{token-extension-9896879b.js → token-extension-40c32bcc.js} +32 -8
- package/dist/esm/vega-accordion.entry.js +3 -3
- package/dist/esm/vega-app-footer.entry.js +3 -3
- package/dist/esm/vega-app-header-button.entry.js +4 -4
- package/dist/esm/vega-banner.entry.js +3 -3
- package/dist/esm/vega-breadcrumb.entry.js +4 -4
- package/dist/esm/vega-button-circle.entry.js +4 -4
- package/dist/esm/vega-button-group_2.entry.js +4 -4
- package/dist/esm/vega-button-link.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +4 -4
- package/dist/esm/vega-calendar_5.entry.js +4 -4
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +4 -4
- package/dist/esm/vega-chip.entry.js +4 -4
- package/dist/esm/vega-code-block.entry.js +7 -7
- package/dist/esm/vega-color-picker.entry.js +3 -3
- package/dist/esm/vega-color-swatch-picker.entry.js +4 -4
- package/dist/esm/vega-color-swatch.entry.js +3 -3
- package/dist/esm/vega-combo-box.entry.js +23 -5
- package/dist/esm/vega-date-picker_2.entry.js +5 -5
- package/dist/esm/vega-dialog_2.entry.js +161 -71
- package/dist/esm/vega-dropdown_5.entry.js +42 -14
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-270fe47e.js → vega-event-id-f55f6977.js} +1 -1
- package/dist/esm/vega-field-label.entry.js +3 -3
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-form.entry.js +4 -4
- package/dist/esm/vega-image-uploader.entry.js +4 -4
- package/dist/esm/vega-input-credit-card.entry.js +4 -4
- package/dist/esm/vega-input-numeric.entry.js +4 -4
- package/dist/esm/vega-input-passcode.entry.js +4 -4
- package/dist/esm/vega-input-phone-number.entry.js +4 -4
- package/dist/esm/vega-input-range.entry.js +4 -4
- package/dist/esm/vega-input-select.entry.js +55 -6
- package/dist/esm/vega-input.entry.js +3 -3
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +32 -193
- 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 +4 -4
- package/dist/esm/vega-popover_2.entry.js +4 -4
- package/dist/esm/vega-progress-tracker_2.entry.js +14 -4
- package/dist/esm/vega-radio_2.entry.js +4 -4
- package/dist/esm/vega-rich-text-content.entry.js +59 -10
- package/dist/esm/vega-rich-text-editor_4.entry.js +608 -90
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +3 -3
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +3 -3
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +6 -6
- package/dist/esm/vega-section-title.entry.js +897 -15
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +4 -4
- package/dist/esm/vega-selection-tile_2.entry.js +4 -4
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +3 -3
- package/dist/esm/vega-stepper.entry.js +4 -4
- package/dist/esm/vega-tab-group_2.entry.js +4 -4
- package/dist/esm/vega-table_11.entry.js +4 -4
- package/dist/esm/vega-textarea.entry.js +4 -4
- package/dist/esm/vega-time-picker_2.entry.js +5 -5
- package/dist/esm/vega-toggle-switch.entry.js +3 -3
- package/dist/esm/vega-tooltip_2.entry.js +1 -1
- package/dist/esm/vega.js +10 -10
- package/dist/sri/vega-sri-manifest.json +272 -268
- package/dist/types/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.d.ts +1 -0
- package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +21 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-render-mode-controller.d.ts +2 -1
- package/dist/types/components/vega-dropdown/types.d.ts +2 -2
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +36 -9
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.d.ts +2 -0
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-items-slot-controler.d.ts +10 -0
- package/dist/types/components/vega-input-select/types.d.ts +1 -0
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +21 -0
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-backdrop-manager.d.ts +66 -0
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +1 -5
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-z-index-controller.d.ts +1 -1
- package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +1 -1
- package/dist/types/components/vega-modal/vega-modal.d.ts +34 -6
- package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-steps-controller.d.ts +2 -0
- package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-annotation-strategy.abstract.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.d.ts +14 -2
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-items-strategy.abstract.d.ts +22 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-nest-items-strategy.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-selection.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.d.ts +30 -3
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.d.ts +99 -3
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-unnest-items-strategy.d.ts +22 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/nest-list-items-action.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/unnest-list-items-action.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/list-annotation.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +6 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +5 -1
- package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/abstract-list-keyboard-handler.d.ts +99 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-shift-tab-outdent-handler.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-tab-indent-handler.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/list-keyboard-slimmer.d.ts +73 -0
- package/dist/types/components/vega-section-title/slimmers/a11y-tree/build-section-title-a11y-tree.d.ts +41 -0
- package/dist/types/components/vega-section-title/vega-section-title.d.ts +9 -0
- package/dist/types/components.d.ts +42 -8
- package/dist/types/helpers/a11y-tree/a11y-node-dto.d.ts +173 -0
- package/dist/types/helpers/a11y-tree/a11y-tree-applier.d.ts +28 -0
- package/dist/types/helpers/a11y-tree/a11y-tree.types.d.ts +137 -0
- package/dist/types/helpers/a11y-tree/strategies/baseline-strategy.d.ts +18 -0
- package/dist/types/helpers/a11y-tree/strategies/firefox-nvda-strategy.d.ts +16 -0
- package/dist/types/helpers/a11y-tree/strategies/webkit-voiceover-strategy.d.ts +23 -0
- package/dist/types/helpers/a11y-tree/strategy-resolver.d.ts +59 -0
- package/dist/types/helpers/backdrop/shared-backdrop-manager.d.ts +16 -0
- package/dist/types/helpers/slimmers/a11y-tree-slimmer.d.ts +49 -0
- package/dist/types/helpers/slimmers/element-appender/element-appender-slimmer.d.ts +9 -0
- package/dist/types/helpers/slimmers/element-appender/visibility-modifiers/clip-on-scroll-modifier.d.ts +37 -0
- package/dist/types/helpers/slimmers/element-appender/visibility-modifiers/visibility-modifier.interface.d.ts +56 -0
- package/dist/types/helpers/ui/element-appender.d.ts +7 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-3e8baeac.entry.js → p-0512308f.entry.js} +1 -1
- package/dist/vega/{p-46fe3154.entry.js → p-1d8312d3.entry.js} +1 -1
- package/dist/vega/{p-f5d7b89f.entry.js → p-1dfbc542.entry.js} +1 -1
- package/dist/vega/{p-fbd3be00.entry.js → p-200c8914.entry.js} +1 -1
- package/dist/vega/{p-e235020b.entry.js → p-22cc174e.entry.js} +1 -1
- package/dist/vega/{p-b1ff70bf.js → p-2c737fc8.js} +1 -1
- package/dist/vega/{p-782eb312.entry.js → p-2d77ae73.entry.js} +1 -1
- package/dist/vega/{p-cb90163a.entry.js → p-2d8d4d5b.entry.js} +1 -1
- package/dist/vega/{p-f651df3b.entry.js → p-2df5d59b.entry.js} +1 -1
- package/dist/vega/p-31216140.js +1 -0
- package/dist/vega/{p-f7e459cd.js → p-312d8205.js} +1 -1
- package/dist/vega/{p-a7209700.js → p-3345d903.js} +1 -1
- package/dist/vega/{p-44439ecc.entry.js → p-36d2df7a.entry.js} +1 -1
- package/dist/vega/{p-02355de8.js → p-3c23ec90.js} +1 -1
- package/dist/vega/{p-2bf17505.entry.js → p-3d6f761a.entry.js} +1 -1
- package/dist/vega/p-4151f53a.entry.js +1 -0
- package/dist/vega/{p-a057285e.entry.js → p-49e1cf4d.entry.js} +1 -1
- package/dist/vega/{p-698fbd73.js → p-5447a8e8.js} +1 -1
- package/dist/vega/p-55e0014a.js +3 -0
- package/dist/vega/{p-45e8424a.entry.js → p-56d19601.entry.js} +1 -1
- package/dist/vega/{p-addbca58.entry.js → p-5924adae.entry.js} +1 -1
- package/dist/vega/{p-9dca874d.entry.js → p-5e4517eb.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-65fee02f.entry.js +1 -0
- package/dist/vega/{p-140616fe.js → p-66647244.js} +1 -1
- package/dist/vega/{p-62d6e063.entry.js → p-6680ba17.entry.js} +1 -1
- package/dist/vega/p-6a51d720.js +1 -0
- package/dist/vega/{p-fe24b459.js → p-6c7b6d45.js} +1 -1
- package/dist/vega/{p-288d65ad.entry.js → p-6fcec7c7.entry.js} +1 -1
- package/dist/vega/{p-d08ffdf1.entry.js → p-74f86ff9.entry.js} +1 -1
- package/dist/vega/{p-6ad7144a.entry.js → p-775ecfad.entry.js} +1 -1
- package/dist/vega/{p-6f70a10f.entry.js → p-7950f3e2.entry.js} +1 -1
- package/dist/vega/{p-f246f125.entry.js → p-80b7945a.entry.js} +1 -1
- package/dist/vega/p-8354cff0.entry.js +1 -0
- package/dist/vega/{p-5db61a12.entry.js → p-841b3281.entry.js} +1 -1
- package/dist/vega/{p-579cdeae.js → p-84b7a775.js} +1 -1
- package/dist/vega/p-87e5cb56.entry.js +1 -0
- package/dist/vega/p-8c30a60d.js +1 -0
- package/dist/vega/{p-f8a29127.entry.js → p-8d96f0e8.entry.js} +1 -1
- package/dist/vega/{p-95913e3c.entry.js → p-91303402.entry.js} +1 -1
- package/dist/vega/p-96da7d30.entry.js +1 -0
- package/dist/vega/{p-51b68d25.js → p-9d3f69cb.js} +1 -1
- package/dist/vega/{p-ed103a1a.entry.js → p-9d96d83f.entry.js} +1 -1
- package/dist/vega/{p-6dfe2407.js → p-9f11b579.js} +1 -1
- package/dist/vega/p-9f201152.entry.js +1 -0
- package/dist/vega/{p-48ee3e24.entry.js → p-a775825e.entry.js} +1 -1
- package/dist/vega/{p-9d18ba7f.entry.js → p-acaff62d.entry.js} +1 -1
- package/dist/vega/{p-b8f8e480.entry.js → p-ae146458.entry.js} +1 -1
- package/dist/vega/{p-e8ee70c5.entry.js → p-b3a2ce06.entry.js} +1 -1
- package/dist/vega/{p-5107277d.entry.js → p-b4c26035.entry.js} +1 -1
- package/dist/vega/p-b63319e9.entry.js +1 -0
- package/dist/vega/{p-c9daabe1.entry.js → p-b660f38c.entry.js} +1 -1
- package/dist/vega/{p-8c083255.entry.js → p-b8c13ac9.entry.js} +1 -1
- package/dist/vega/p-b8ffa42f.entry.js +1 -0
- package/dist/vega/{p-7b57a845.entry.js → p-b9e72de2.entry.js} +1 -1
- package/dist/vega/{p-0af32f31.entry.js → p-bb60e381.entry.js} +1 -1
- package/dist/vega/p-bbad318e.entry.js +1 -0
- package/dist/vega/p-c0e42c03.entry.js +1 -0
- package/dist/vega/{p-c67b9aba.entry.js → p-c41f5684.entry.js} +1 -1
- package/dist/vega/{p-4fe40b76.js → p-c4564904.js} +1 -1
- package/dist/vega/{p-341a6b32.entry.js → p-c54b5a8f.entry.js} +1 -1
- package/dist/vega/p-cd1e976c.entry.js +1 -0
- package/dist/vega/p-d9158512.js +1 -0
- package/dist/vega/{p-2dc5edd0.entry.js → p-db11134b.entry.js} +1 -1
- package/dist/vega/{p-14559974.entry.js → p-e1737c8e.entry.js} +1 -1
- package/dist/vega/{p-0b311599.entry.js → p-e1b57e8f.entry.js} +1 -1
- package/dist/vega/{p-9f38448c.entry.js → p-e5ff77f7.entry.js} +1 -1
- package/dist/vega/p-e62d41ee.js +1 -0
- package/dist/vega/{p-6f01a71a.entry.js → p-ebe32b25.entry.js} +1 -1
- package/dist/vega/p-ec162599.entry.js +1 -0
- package/dist/vega/{p-9f7154d2.js → p-ec5dee32.js} +1 -1
- package/dist/vega/{p-d3a36d19.entry.js → p-ec64cc59.entry.js} +1 -1
- package/dist/vega/p-f29d9707.entry.js +1 -0
- package/dist/vega/{p-5df2d6a1.entry.js → p-f78944d7.entry.js} +1 -1
- package/dist/vega/{p-c9c6daa6.entry.js → p-f9bfee81.entry.js} +1 -1
- package/dist/vega/{p-26c7fe8b.entry.js → p-fa65956c.entry.js} +1 -1
- package/dist/vega/{p-f96d0503.entry.js → p-fc7e4c8a.entry.js} +1 -1
- package/dist/vega/{p-b39d4a88.entry.js → p-fd23c365.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +3 -2
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.js +0 -73
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.d.ts +0 -27
- package/dist/vega/p-0b9c7c79.entry.js +0 -1
- package/dist/vega/p-0be4df0a.js +0 -1
- package/dist/vega/p-2364be92.entry.js +0 -1
- package/dist/vega/p-270697c0.entry.js +0 -1
- package/dist/vega/p-282b37cb.js +0 -1
- package/dist/vega/p-38c9d782.js +0 -1
- package/dist/vega/p-52c6a399.entry.js +0 -1
- package/dist/vega/p-73f2c3c0.entry.js +0 -1
- package/dist/vega/p-762ea523.entry.js +0 -1
- package/dist/vega/p-7a88a3d3.entry.js +0 -1
- package/dist/vega/p-83a16285.entry.js +0 -1
- package/dist/vega/p-91287214.entry.js +0 -1
- package/dist/vega/p-c66d2a1e.js +0 -1
- package/dist/vega/p-cad5222a.entry.js +0 -1
- package/dist/vega/p-d25ca0c3.entry.js +0 -1
- package/dist/vega/p-f05a193e.entry.js +0 -1
- package/dist/vega/p-f4da615a.js +0 -3
- package/dist/vega/p-f906a7bc.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as r,g as s}from"./p-6b2342e0.js";import{R as o}from"./p-8bc15ed0.js";import{c as a}from"./p-3a620268.js";import{s as n}from"./p-519a7d55.js";import{a as p,h as l,c as h}from"./p-528748fa.js";import{F as d}from"./p-320091b7.js";import{I as c}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-8ce9e214.js";import{F as g}from"./p-cb378636.js";import{c as x}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i,H as r,g as s}from"./p-6b2342e0.js";import{R as o}from"./p-8bc15ed0.js";import{c as a}from"./p-3a620268.js";import{s as n}from"./p-519a7d55.js";import{a as p,h as l,c as h}from"./p-528748fa.js";import{F as d}from"./p-320091b7.js";import{I as c}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-8ce9e214.js";import{F as g}from"./p-cb378636.js";import{c as x}from"./p-66647244.js";import{C as b}from"./p-2d0d575f.js";import{d as v}from"./p-5447a8e8.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-526e3634.js";import"./p-3a68b729.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-29e3eb12.js";import"./p-8c30a60d.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const j=class{constructor(r){e(this,r),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.globalSlimmers={},this.formFieldController=new d({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.colorPickerContainerRef,touchableAreaGetter:()=>[this.colorPickerTouchableAreaRef]}),this.changeEventEmitter=x(j,v),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(u),this.value="",this.hint="",this.disabled=!1,this.required=!1,this.optional=!1,this.label="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.colors=["#73E6DC","#806BFF","#FFDC83","#FF9571","#00BBFF","#FF82C9","#259F9F","#563D82"],this.isInline=!1,this.columns=8,this.renderColorPickerContainer=()=>{const e=this.getValidColumns();return i("div",{class:p([this.isInline?null:"color-picker-inline"]),ref:e=>this.colorPickerContainerRef=e},i("vega-flex",{direction:"row",gap:"size-8",alignItems:"center",style:{maxWidth:34*e-8+"px"}},this.colors.map((e=>{const t=this.value===e;return i("div",{id:e,class:{"color-picker-inline-items":!0,selected:t},ref:e=>this.colorPickerTouchableAreaRef=e,style:{backgroundColor:e},onClick:this.updateValueProp,role:"button",tabIndex:0,"aria-label":"color",onKeyDown:a()},t?i("vega-icon",{icon:"checkmark",size:"size-16",class:{"v-text-black":this.isDarkColorCheckmark(this.value),"v-text-white":!this.isDarkColorCheckmark(this.value)}}):null)}))))},this.renderHintMessage=()=>i("vega-text",{text:this.hint}),this.updateValueProp=async e=>{this.disabled||(this.value=String(e.currentTarget.getAttribute("id")))}}watchValue(){this.resetValueIfInvalid(),this.changeEventEmitter.emit(this.value),b.notify(g,{host:this.host,detail:this.value})}watchValidationRules(){}connectedCallback(){this.resetValueIfInvalid()}render(){return n(i(r,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderColorPickerContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{"is-field-required":this.required,optional:this.optional,disabled:this.disabled,label:this.label})}getValidColumns(){const e=Math.floor(this.columns);return Number.isFinite(e)&&e>0?e:1}isDarkColorCheckmark(e,t="#fcfcfc",i="#203645"){const r=this.getLuminance(e),s=this.getLuminance(t),o=this.getLuminance(i);return r>Math.sqrt((s+.05)*(o+.05))-.05}getLuminance(e){const t=[l(e).r/255,l(e).g/255,l(e).b/255].map((e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4));return.2126*t[0]+.7152*t[1]+.0722*t[2]}resetValueIfInvalid(){this.colors.some((e=>h(e).toUpperCase()==h(this.value).toUpperCase()))||(this.value="")}get host(){return s(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([f()],j.prototype,"globalSlimmers",void 0),w([c()],j.prototype,"formFieldController",void 0),w([c()],j.prototype,"changeEventEmitter",void 0),w([c()],j.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j.style=':host{display:inline-block;text-align:left;line-height:normal}:host vega-field-label{margin-bottom:8px}:host(.disabled) .color-picker-inline{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.disabled) .color-picker-inline-items:hover{box-shadow:none}:host(.disabled) .color-picker-inline-items:focus-within{box-shadow:none}:host .color-picker-inline{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding:12px;max-width:max-content}:host .color-picker-inline-items{display:flex;border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1));border-radius:4px;width:24px;height:24px;cursor:pointer;align-items:center;justify-content:center}:host .color-picker-inline-items.selected{border-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1))}:host .color-picker-inline-items:hover{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host .color-picker-inline-items:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));box-shadow:0px 0px 0px 1px rgba(var(--v-bg-primary, 252, 252, 252, 1)) inset;border:1px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host .checkmark-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .checkmark-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host vega-text{padding-left:8px;padding-right:8px;padding-top:4px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .color-picker-inline.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-hidden{display:none}:host vega-flex{flex-wrap:wrap}';export{j as vega_color_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as t,a as e,M as s,C as n,l as r,f as i,d as o}from"./p-38c9d782.js";import{c as a}from"./p-a841cf13.js";import{V as c}from"./p-3e09aeed.js";import"./p-6e1ab235.js";import{I as l,c as h}from"./p-afcd8f04.js";import{r as u}from"./p-528748fa.js";import{i as d}from"./p-8db904dc.js";import{g as p}from"./p-8b5d3a52.js";import{U as E,V as f}from"./p-f4da615a.js";const L=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"overrideColors"===e,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"reset"===e,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"toggleDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"isDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"applyBranding"===e,payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"validateColorAccessibility"===e,payloadValue:()=>!0}];class b{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=h(b,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],L,"ThemeManager")}async overrideColors(t){c.overrideColors(t)}async reset(){c.reset()}toggleDarkMode(t){c.toggleDarkMode(t)}isDarkMode(){return c.isDarkMode()}applyBranding(t){c.applyBranding(t)}async validateColorAccessibility(t){return c.validateColorAccessibility(t)}}!function(t,e,s,n){var r,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,s,o):r(e,s))||o);i>3&&o&&Object.defineProperty(e,s,o)}([l()],b.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const g=new b,C=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],T=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],_={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class m{static getTableColors(){return m.TABLE_COLORS}static setTableColors(t){m.TABLE_COLORS=t}static getColorKey(t,e=!1){var s;let n=null;const r=m.TABLE_COLORS,i=e?[...r,_]:r;if(i){const e=null===(s=u(t))||void 0===s?void 0:s.toUpperCase();if(e)n=i.find((t=>g.isDarkMode()?t.dark===e:t.light===e));else for(const e of i)if(e.key===t){n=e;break}}return n?n.key:""}}m.TABLE_COLORS=T;class O extends t{constructor(t){super(),this.type=A.COLOR,this.colorKey=t,t&&(this.color=this.formatColor(t))}renderStyle(){return{color:this.color?c.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var t;return{color:(null===(t=this.color)||void 0===t?void 0:t.key)||this.colorKey||""}}clone(){return new O(this.colorKey)}formatColor(t){return m.getTableColors().find((e=>e.key===t))}}var A,S;!function(t){t.TABLE="EXTENSION_TABLE",t.CELL="EXTENSION_TABLE_CELL",t.CAPTION="EXTENSION_TABLE_CAPTION",t.COLOR="EXTENSION_TABLE_COLOR"}(A||(A={}));class y extends t{constructor({backgroundColor:t,border:e,width:s,height:n,alignment:r,borderCollapse:i}={},o=!0){super(),this.type=A.TABLE,this.useInternalStyle=o,this.backgroundColor=t,this.border=e,this.width=s,this.height=n,this.alignment=o&&void 0===r?y.DEFAULT_ALIGNMENT:r,this.backgroundColorAnnotation=new O(t),this.borderColorAnnotation=new O(null==e?void 0:e.color),this.borderCollapse=o&&void 0===i?y.DEFAULT_BORDER_COLLAPSE:i}static from(t,e=!0){return[A.TABLE,new y(t,e)]}static getDefaultStyles(){return{borderCollapse:y.DEFAULT_BORDER_COLLAPSE,margin:y.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new y({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:a({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const t=this.backgroundColorAnnotation.renderStyle().color,e=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return t&&(e.backgroundColor=t),a(e)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:"center"===this.alignment?y.DEFAULT_ALIGNMENT_STYLE_VALUE:"left"===this.alignment?"0":"0 0 0 auto"}:{}}}y.DEFAULT_BORDER_COLLAPSE="collapse",y.DEFAULT_ALIGNMENT="center",y.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class w extends e{constructor(t,e){super(t),this.dtoName=w.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.TABLE,new y)}static from(t,e){var s;const n=new w(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),(null===(s=t.annotations)||void 0===s?void 0:s.table)&&n.annotationMap.set(...y.from(t.annotations.table,null==e?void 0:e.autoMatchFormat)),n}clone(t){const e=new w(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<table${super.generateAttributeString(t)}>${e}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCaption(){const t=this.children.find((t=>"table-caption"===t.type));return null!=t?t:null}setCaption(t){const e=this.children.findIndex((t=>"table-caption"===t.type));t?(t.parent=this,e>=0?this.children[e]=t:this.children.unshift(t)):e>=0&&this.children.splice(e,1)}hasCaption(){return d(this.getCaption())}}w.dtoName="RTETableBlock",function(t){t.ROW="ROW",t.CAPTION="CAPTION",t.COLUMN="COLUMN",t.MERGE_CELLS="MERGE_CELLS",t.TABLE="TABLE",t.CELL="CELL",t.SPLIT_CELL="SPLIT_CELL"}(S||(S={}));class R{syncCursorPosition(t,e){const s=this.findRootContent(t);if(e&&s){const t=e.getRangeEndOffset();s.apply(new E(e,t))}}findRootContent(t){let e=t.parent;for(;e;){if(e instanceof f)return e;e=e.parent}}}const N="DELETE_TABLE_ROW";class M extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_ROW",this.rowsToBeRemoved=t}}const I="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class D extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const v="INSERT_TABLE_ROW_INTO_SAME_SECTION";var x;!function(t){t.ABOVE="ABOVE",t.BELOW="BELOW"}(x||(x={}));class k extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_SAME_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const B="TOGGLE_HEADER_ROW";class j extends s{constructor(t){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_ROW",this.selectedRows=t}}class H extends e{constructor(t){super(t),this.dtoName=H.dtoName,this.type="table-body",this.children=[]}static from(t,e){const s=new H(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new H(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tbody${super.generateAttributeString(t)}>${e}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}H.dtoName="RTETableBodyBlock";class F extends e{constructor(t){super(t),this.dtoName=F.dtoName,this.type="table-head",this.children=[]}static from(t,e){const s=new F(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new F(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<thead${super.generateAttributeString(t)}>${e}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}F.dtoName="RTETableHeadBlock";class $ extends e{constructor(t){super(t),this.dtoName=$.dtoName,this.type="table-row",this.children=[]}static from(t,e){const s=new $(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new $(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tr${super.generateAttributeString(t)}>${e}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}$.dtoName="RTETableRowBlock";class P extends t{constructor({backgroundColor:t,padding:e,border:s,width:n,height:r,textAlign:i,verticalAlign:o,minWidth:a,boxSizing:c}={},l=!0){super(),this.type=A.CELL,this.useInternalStyle=l,this.backgroundColor=t,this.width=n,this.height=r,this.border=l&&void 0===s?P.DEFAULT_BORDER:s,this.padding=l&&void 0===e?P.DEFAULT_PADDING:e,this.textAlign=l&&void 0===i?P.DEFAULT_HORIZONTAL_TEXT_ALIGN:i,this.verticalAlign=l&&void 0===o?P.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=l&&void 0===a?P.DEFAULT_CELL_MIN_WIDTH:a,this.boxSizing=l&&void 0===c?P.DEFAULT_BOX_SIZING:c}static from(t,e){return[A.CELL,new P(t,e)]}static getDefaultStyles(t=!0){return{padding:P.DEFAULT_PADDING,textAlign:P.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:P.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:P.DEFAULT_CELL_MIN_WIDTH,boxSizing:P.DEFAULT_BOX_SIZING,border:`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${t?P.DEFAULT_BORDER.color:P.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(t){this._backgroundColor=t,this.backgroundColorAnnotation=new O(t)}get backgroundColor(){return this._backgroundColor}set border(t){this._border=t,this.borderColorAnnotation=new O(null==t?void 0:t.color)}get border(){return this._border}clone(){return new P({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:a({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(t){const e=this.backgroundColorAnnotation.renderStyle().color,s={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return e&&(s.backgroundColor=e),a((null==t?void 0:t.standalone)?s:this.removeDefaultValues(s),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(t){const e=Object.assign({},t);return e.padding===P.DEFAULT_PADDING&&delete e.padding,e.border===`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${P.DEFAULT_BORDER.color}`&&delete e.border,e.textAlign===P.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete e.textAlign,e.verticalAlign===P.DEFAULT_VERTICAL_TEXT_ALIGN&&delete e.verticalAlign,e.minWidth===P.DEFAULT_CELL_MIN_WIDTH&&delete e.minWidth,e.boxSizing===P.DEFAULT_BOX_SIZING&&delete e.boxSizing,e}}P.DEFAULT_PADDING="12px",P.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"},P.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)",P.DEFAULT_HORIZONTAL_TEXT_ALIGN="left",P.DEFAULT_VERTICAL_TEXT_ALIGN="middle",P.DEFAULT_CELL_MIN_WIDTH="55px",P.DEFAULT_BOX_SIZING="border-box";class W extends e{constructor(t,e){super(t),this.dtoName=W.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new P)}static from(t,e){var s;const n=new W(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...P.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new W(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const t=this.getCustomAttributeByName("rowspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}get colSpan(){const t=this.getCustomAttributeByName("colspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<td${super.generateAttributeString(t)}>${e}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCustomAttributeByName(t){const e=this.getCustomAttributesAnnotation();if(e)return(e.toJSON().customAttribute||{})[t]}}W.dtoName="RTETableCellBlock";class G extends P{constructor(t={},e=!0){super(t,e)}static from(t,e){return[A.CELL,new G(t,e)]}static getDefaultBackgroundColor(){return c.isDarkMode()?_.dark:_.light}clone(){return new G({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(t){var e;const s=super.renderStyle(t);return a(Object.assign(Object.assign({},s),{backgroundColor:null!==(e=s.backgroundColor)&&void 0!==e?e:G.getDefaultBackgroundColor()}))}}class V extends W{constructor(t,e){super(t,e),this.dtoName=V.dtoName,this.type="table-head-cell";const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new G)}static from(t,e){var s;const n=new V(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...G.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new V(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<th${super.generateAttributeString(t)}>${e}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}V.dtoName="RTETableHeadCellBlock";const U="MERGE_CELLS";class J extends s{constructor(t,e,s,n,r){super(),this.type="MERGE_CELLS",this.isFlushable=!0,this.targetCell=t,this.mergeCells=e,this.colSpan=s,this.rowSpan=n,this.direction=r}}var K,Y;!function(t){t.MERGE_CELLS="MERGE_CELLS",t.MERGE_CELL_UP="MERGE_CELL_UP",t.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",t.MERGE_CELL_DOWN="MERGE_CELL_DOWN",t.MERGE_CELL_LEFT="MERGE_CELL_LEFT"}(K||(K={}));class z extends R{canHandle(t){return t[0]===S.MERGE_CELLS}execute(t,e){const s=e.tableSelection.getSelectedCells(),n=t[1];switch(n){case K.MERGE_CELL_UP:case K.MERGE_CELL_RIGHT:case K.MERGE_CELL_DOWN:case K.MERGE_CELL_LEFT:{const t=this.getDirectionMergeCells(n,s[0]);this.handleMergeCells(t,n)}break;default:s.length>1&&this.handleMergeCells(s,K.MERGE_CELLS)}}getDirectionMergeCells(t,e){const s=it(e,t);if(!s)return[e];switch(t){case K.MERGE_CELL_UP:return[s,e];case K.MERGE_CELL_DOWN:return[e,s];case K.MERGE_CELL_LEFT:return[s,e];default:return[e,s]}}handleMergeCells(t,e){if(t.length<2)return;const s=ot(t),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:a}=s,c=new J(a,t,o-i+1,r-n+1,e);this.applyActionOnTable(c,a)}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}function X(t,e){return t?t instanceof e?t:X(t.parent,e):null}function Z(t,e){return{id:p(),type:"table-body",children:Array.from({length:t},(()=>function(t){return{id:p(),type:"table-row",children:Array.from({length:t},(()=>et("table-cell")))}}(e)))}}function q(t){return t.children.filter((t=>t instanceof H||t instanceof F)).flatMap((t=>t.children))}function Q(t){if(!t||!t.children||!t.children[0])return null;const e=t.children[0];return e instanceof i?e:Q(e)}function tt(t,e){for(const s of t){const t=s.children.find((t=>t.id===e));if(t)return t}return null}function et(t){const e=p();return{id:e,type:t,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function st(t){return{colSpan:t.colSpan,rowSpan:t.rowSpan}}function nt(t,e,s){const n=null!=s?s:rt(e);for(let e=0;e<n.length;e++){const s=n[e];for(let e=0;e<s.length;e++)if(s[e]===t.id)return e}return-1}function rt(t){const e=[];return t.forEach(((t,s)=>{e[s]||(e[s]=[]);let n=0;t.children.forEach((t=>{const{colSpan:r,rowSpan:i}=st(t);for(;void 0!==e[s][n];)n++;for(let o=0;o<i;o++)for(let i=0;i<r;i++)e[s+o]||(e[s+o]=[]),e[s+o][n+i]=t.id;n+=r}))})),e}function it(t,e){if(!t)return null;const s=t.parent,n=s.parent.children,r=n.indexOf(s),{colSpan:i,rowSpan:o}=st(t),a=nt(t,n);let c=r,l=a;switch(e){case K.MERGE_CELL_LEFT:l=a-1;break;case K.MERGE_CELL_RIGHT:l=a+i;break;case K.MERGE_CELL_UP:c=r-1;break;default:c=r+o}return function(t,e,s){const n=rt(t);for(let r=0;r<t.length;r++){const i=t[r];for(const o of i.children){const{colSpan:i,rowSpan:a}=st(o),c=nt(o,t,n),l=r+a-1,h=c+i-1,u=s>=c&&s<=h;if(e>=r&&e<=l&&u)return o}}return null}(n,c,l)}function ot(t){const e=t[0].parent.parent.children,s=rt(e);let n=Number.POSITIVE_INFINITY,r=-1,i=Number.POSITIVE_INFINITY,o=-1;const a=new Set;return t.forEach((t=>{const c=e.indexOf(t.parent),l=nt(t,e,s),{colSpan:h,rowSpan:u}=st(t),d=c,p=c+u-1,E=l,f=l+h-1;for(let t=d;t<=p;t++)for(let e=E;e<=f;e++)a.add(`${t},${e}`);n=Math.min(n,d),r=Math.max(r,p),i=Math.min(i,E),o=Math.max(o,f)})),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:t[0],coveredPositions:a}}function at(t){let e=0;const s=q(t)[0];for(const t of s.children){const{colSpan:s}=st(t);e+=s}return e}function ct(t){if(1===t.length)return!0;const e=ot(t),{minRow:s,maxRow:n,minCol:r,maxCol:i,coveredPositions:o}=e;return o.size===(n-s+1)*(i-r+1)}function lt(t,e,s,i,o){const a=t.annotationMap.get(n.CUSTOM_ATTRIBUTE),c=a?Object.assign({},a.customAttribute):{};delete c.colspan,delete c.rowspan,e>1&&(c.colspan=String(e));const l=at(i)+(o?1:0);if(s>1&&e!==l&&(c.rowspan=String(s)),Object.keys(c).length>0){const e=new r(c);t.annotationMap.set(n.CUSTOM_ATTRIBUTE,e)}else t.annotationMap.delete(n.CUSTOM_ATTRIBUTE)}function ht(t){const e=et(t);return"table-head-cell"===t?V.from(e):W.from(e)}function ut(t,e,s){for(let n=0;n<s;n++){const s=t[n],r=e.children.find((t=>t.id===s));if(r&&!(r instanceof V))return n}return-1}function dt(t){const e=new Map;return t.forEach((t=>{for(let s=0;s<t.length;s++){const n=t[s];n&&!e.has(n)&&e.set(n,s)}})),e}function pt(t,e,s,n){if(0===t.length)return[0,-1];const r=s||q(e),i=null!=n?n:rt(r);let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const e=nt(t,r,i);o=Math.min(o,e),a=Math.max(a,e)})),[o,a]}!function(t){t.HEADER_ROW="HEADER_ROW",t.ADD_ROW_ABOVE="ADD_ROW_ABOVE",t.ADD_ROW_BELOW="ADD_ROW_BELOW",t.DELETE_ROW="DELETE_ROW",t.SELECT_ROW="SELECT_ROW"}(Y||(Y={}));class Et extends R{canHandle(t){return t[0]===S.ROW}execute(t,e){const s=t[1];switch(s){case Y.ADD_ROW_ABOVE:case Y.ADD_ROW_BELOW:this.handleInsertRow(s,e);break;case Y.DELETE_ROW:this.handleDeleteRow(e);break;case Y.HEADER_ROW:this.handleToggleHeader(e);break;case Y.SELECT_ROW:this.handleSelectRow(e)}}handleInsertRow(t,e){const s=this.getAllSelectedRows(e);if(s.length>0){const e=t===Y.ADD_ROW_ABOVE?x.ABOVE:x.BELOW,n=e===x.ABOVE?s[0]:s[s.length-1],r=n.parent instanceof H,i=this.shouldInsertHeaderRow(n,e)||r?new k(e,s):new D(e,s);this.applyActionToTable(s[0],i)}}shouldInsertHeaderRow(t,e){if(e===x.ABOVE)return t.parent instanceof F;{const e=t.parent;return e instanceof F&&e.children[e.children.length-1]!==t}}handleDeleteRow(t){const e=this.getAllSelectedRows(t);if(e.length){const t=new M(e);this.applyActionToTable(e[0],t)}}handleToggleHeader(t){const e=this.getAllSelectedRows(t);if(e.length>0){const t=new j(e);this.applyActionToTable(e[0],t)}}handleSelectRow(t){const e=this.getAllSelectedRows(t);if(e.length>0&&t&&t.tableSelection){const s=e.flatMap((t=>t.children));t.tableSelection.setSelectedCells(s)}}getAllSelectedRows(t){const e=new Set;if(t&&t.tableSelection){const{tableSelection:s}=t;s.getSelectedCells().forEach((t=>{const s=X(t,$);s&&e.add(s)}))}return Array.from(e)}applyActionToTable(t,e){const s=X(t,w);s&&s.apply(e)}}const ft="REPLACE_TABLE_CELL";class Lt extends s{constructor(t){super(),this.isFlushable=!0,this.type="REPLACE_TABLE_CELL",this.payload=t}}const bt="SPLIT_TABLE_CELL";class gt extends s{constructor(t){super(),this.isFlushable=!0,this.type="SPLIT_TABLE_CELL",this.payload=t}}class Ct extends o{getBoundaryCellColumnRange(t,e,s){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const i=nt(t,e,s);n=Math.min(n,i),r=Math.max(r,i)})),[n,r]}}class Tt extends Ct{static isFullHeaderSelection(t){if(0===t.length)return!1;const e=X(t[0],w);if(e){const s=q(e),n=rt(s),r=new Map;s.forEach((t=>{t.children.forEach((t=>r.set(t.id,t)))}));const[i,o]=pt(t,e,s,n);for(const t of n)for(let e=i;e<=o;e++){const s=r.get(t[e]);if(s&&!(s instanceof V))return!1}return!0}return!1}handleAction(t,e){const s=t.headerOn,n=q(e),r=rt(n),[i,o]=this.getBoundaryCellColumnRange(t.tableCellHeaderRange,n,r);(s||!s&&i>0)&&this.toggleHeadRows(e,n,r,s,o,i),this.toggleBodyRows(e,n,r,s,i,o);const a=this.getRootContent(e);if(a&&t.tableCellHeaderRange[0].parent){const e=t.tableCellHeaderRange[0].parent.getFirstNode();e&&a.apply(new E(e,0))}}toggleHeadRows(t,e,s,n,r,i){var o;const a=((null===(o=t.children.find((t=>t instanceof F)))||void 0===o?void 0:o.children)||[]).length;for(let o=0;o<a;o++)this.toggleCellType(t,e[o],s[o],0,n?r:i-1,(()=>!0),(t=>V.from(t.toJSON())))}toggleBodyRows(t,e,s,n,r,i){var o;const a=s[0].length,c=(null===(o=t.children.find((t=>t instanceof H)))||void 0===o?void 0:o.children)||[],l=e.length-c.length;for(let o=0;o<c.length;o++){const c=o+l,h=e[c],u=s[c],d=ut(u,h,a);n?d>-1&&this.toggleCellType(t,h,u,d,i,(t=>!(t instanceof V)),(t=>V.from(t.toJSON()))):this.toggleCellType(t,h,u,r,-1===d?a-1:d-1,(t=>t instanceof V),(t=>W.from(t.toJSON())))}}toggleCellType(t,e,s,n,r,i,o){for(let a=n;a<=r;a++){const n=s[a],c=e.children.find((t=>t.id===n));if(c&&i(c)){const i=s.indexOf(n),l={table:t,cell:c,col:a,cellStartCol:i,endCol:r,targetCellType:o(c).type},h=i+c.colSpan-1;if(h>r||i<a){if(e.apply(new gt(l)),h>r)return;a=h;continue}e.apply(new Lt(l))}c&&(a+=c.colSpan-1)}}}const _t="DELETE_TABLE_COLUMN";class mt extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_COLUMN",this.tableCellDeleteRange=t}}const Ot="INSERT_TABLE_COLUMN";var At;!function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={}));class St extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="INSERT_TABLE_COLUMN",this.tableCellInsertRange=e,this.insertDirection=t}}const yt="SELECT_TABLE_COLUMN";class wt extends s{constructor(t,e){super(),this.type="SELECT_TABLE_COLUMN",this.tableCellSelectRange=t,this.selectCellCallback=e}}const Rt="TOGGLE_HEADER_TABLE_COLUMN";class Nt extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_TABLE_COLUMN",this.headerOn=!1,this.tableCellHeaderRange=t,this.headerOn=e}}var Mt;!function(t){t.HEADER_COLUMN="HEADER_COLUMN",t.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",t.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",t.DELETE_COLUMN="DELETE_COLUMN",t.SELECT_COLUMN="SELECT_COLUMN"}(Mt||(Mt={}));class It extends R{canHandle(t){return t[0]===S.COLUMN}execute(t,e){const s=e.tableSelection.getSelectedCells();if(!s||0===s.length)return;const n=t[1];switch(n){case Mt.ADD_COLUMN_LEFT:case Mt.ADD_COLUMN_RIGHT:this.handleInsertColumn(n,s);break;case Mt.DELETE_COLUMN:this.handleDeleteColumn(s);break;case Mt.SELECT_COLUMN:this.handleSelectColumn(s,e);break;case Mt.HEADER_COLUMN:this.handleToggleHeaderColumn(s)}}handleInsertColumn(t,e){const s=new St(t===Mt.ADD_COLUMN_LEFT?At.LEFT:At.RIGHT,e);this.applyActionOnTable(s,e[0])}handleDeleteColumn(t){const e=new mt(t);this.applyActionOnTable(e,t[0])}handleSelectColumn(t,e){const s=new wt(t,(t=>{e.tableSelection.setSelectedCells(t)}));this.applyActionOnTable(s,t[0])}handleToggleHeaderColumn(t){const e=!Tt.isFullHeaderSelection(t),s=new Nt(t,e);this.applyActionOnTable(s,t[0])}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}const Dt="SPLIT_CELL_HORIZONTALLY";class vt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_HORIZONTALLY"}}const xt="SPLIT_CELL_VERTICALLY";class kt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_VERTICALLY"}}var Bt;!function(t){t.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",t.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"}(Bt||(Bt={}));class jt extends R{canHandle(t){return t[0]===S.SPLIT_CELL}execute(t,e){const s=e.tableSelection.getSelectedCells();if(s&&1===s.length){const e=s[0];switch(t[1]){case Bt.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(e);break;case Bt.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(e)}}}handleSplitCellHorizontally(t){const e=new vt;t.apply(e)}handleSplitCellVertically(t){const e=new kt;t.apply(e)}}export{pt as $,$ as A,nt as B,It as C,x as D,T as E,I as F,v as G,N as H,At as I,B as J,Ot as K,_t as L,z as M,Rt as N,Tt as O,bt as P,ft as Q,A as R,R as S,S as T,Dt as U,g as V,xt as W,yt as X,U as Y,C as Z,Mt as _,_ as a,Y as a0,Bt as a1,ct as a2,it as a3,y as b,P as c,V as d,Et as e,jt as f,m as g,w as h,Z as i,W as j,F as k,H as l,X as m,G as n,Ct as o,q as p,rt as q,tt as r,lt as s,et as t,dt as u,at as v,Q as w,st as x,ht as y,K as z}
|
|
1
|
+
import{B as t,a as e,M as s,C as n,l as r,f as i,d as o}from"./p-e62d41ee.js";import{c as a}from"./p-a841cf13.js";import{V as c}from"./p-3e09aeed.js";import"./p-6e1ab235.js";import{I as l,c as h}from"./p-afcd8f04.js";import{r as u}from"./p-528748fa.js";import{i as d}from"./p-8db904dc.js";import{g as p}from"./p-8b5d3a52.js";import{U as E,V as f}from"./p-55e0014a.js";const L=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"overrideColors"===e,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"reset"===e,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"toggleDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"isDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"applyBranding"===e,payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"validateColorAccessibility"===e,payloadValue:()=>!0}];class b{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=h(b,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],L,"ThemeManager")}async overrideColors(t){c.overrideColors(t)}async reset(){c.reset()}toggleDarkMode(t){c.toggleDarkMode(t)}isDarkMode(){return c.isDarkMode()}applyBranding(t){c.applyBranding(t)}async validateColorAccessibility(t){return c.validateColorAccessibility(t)}}!function(t,e,s,n){var r,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,s,o):r(e,s))||o);i>3&&o&&Object.defineProperty(e,s,o)}([l()],b.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const g=new b,C=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],T=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],_={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class m{static getTableColors(){return m.TABLE_COLORS}static setTableColors(t){m.TABLE_COLORS=t}static getColorKey(t,e=!1){var s;let n=null;const r=m.TABLE_COLORS,i=e?[...r,_]:r;if(i){const e=null===(s=u(t))||void 0===s?void 0:s.toUpperCase();if(e)n=i.find((t=>g.isDarkMode()?t.dark===e:t.light===e));else for(const e of i)if(e.key===t){n=e;break}}return n?n.key:""}}m.TABLE_COLORS=T;class O extends t{constructor(t){super(),this.type=A.COLOR,this.colorKey=t,t&&(this.color=this.formatColor(t))}renderStyle(){return{color:this.color?c.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var t;return{color:(null===(t=this.color)||void 0===t?void 0:t.key)||this.colorKey||""}}clone(){return new O(this.colorKey)}formatColor(t){return m.getTableColors().find((e=>e.key===t))}}var A,S;!function(t){t.TABLE="EXTENSION_TABLE",t.CELL="EXTENSION_TABLE_CELL",t.CAPTION="EXTENSION_TABLE_CAPTION",t.COLOR="EXTENSION_TABLE_COLOR"}(A||(A={}));class y extends t{constructor({backgroundColor:t,border:e,width:s,height:n,alignment:r,borderCollapse:i}={},o=!0){super(),this.type=A.TABLE,this.useInternalStyle=o,this.backgroundColor=t,this.border=e,this.width=s,this.height=n,this.alignment=o&&void 0===r?y.DEFAULT_ALIGNMENT:r,this.backgroundColorAnnotation=new O(t),this.borderColorAnnotation=new O(null==e?void 0:e.color),this.borderCollapse=o&&void 0===i?y.DEFAULT_BORDER_COLLAPSE:i}static from(t,e=!0){return[A.TABLE,new y(t,e)]}static getDefaultStyles(){return{borderCollapse:y.DEFAULT_BORDER_COLLAPSE,margin:y.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new y({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:a({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const t=this.backgroundColorAnnotation.renderStyle().color,e=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return t&&(e.backgroundColor=t),a(e)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:"center"===this.alignment?y.DEFAULT_ALIGNMENT_STYLE_VALUE:"left"===this.alignment?"0":"0 0 0 auto"}:{}}}y.DEFAULT_BORDER_COLLAPSE="collapse",y.DEFAULT_ALIGNMENT="center",y.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class w extends e{constructor(t,e){super(t),this.dtoName=w.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.TABLE,new y)}static from(t,e){var s;const n=new w(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),(null===(s=t.annotations)||void 0===s?void 0:s.table)&&n.annotationMap.set(...y.from(t.annotations.table,null==e?void 0:e.autoMatchFormat)),n}clone(t){const e=new w(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<table${super.generateAttributeString(t)}>${e}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCaption(){const t=this.children.find((t=>"table-caption"===t.type));return null!=t?t:null}setCaption(t){const e=this.children.findIndex((t=>"table-caption"===t.type));t?(t.parent=this,e>=0?this.children[e]=t:this.children.unshift(t)):e>=0&&this.children.splice(e,1)}hasCaption(){return d(this.getCaption())}}w.dtoName="RTETableBlock",function(t){t.ROW="ROW",t.CAPTION="CAPTION",t.COLUMN="COLUMN",t.MERGE_CELLS="MERGE_CELLS",t.TABLE="TABLE",t.CELL="CELL",t.SPLIT_CELL="SPLIT_CELL"}(S||(S={}));class R{syncCursorPosition(t,e){const s=this.findRootContent(t);if(e&&s){const t=e.getRangeEndOffset();s.apply(new E(e,t))}}findRootContent(t){let e=t.parent;for(;e;){if(e instanceof f)return e;e=e.parent}}}const N="DELETE_TABLE_ROW";class M extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_ROW",this.rowsToBeRemoved=t}}const I="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class D extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const v="INSERT_TABLE_ROW_INTO_SAME_SECTION";var x;!function(t){t.ABOVE="ABOVE",t.BELOW="BELOW"}(x||(x={}));class k extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_SAME_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const B="TOGGLE_HEADER_ROW";class j extends s{constructor(t){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_ROW",this.selectedRows=t}}class H extends e{constructor(t){super(t),this.dtoName=H.dtoName,this.type="table-body",this.children=[]}static from(t,e){const s=new H(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new H(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tbody${super.generateAttributeString(t)}>${e}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}H.dtoName="RTETableBodyBlock";class F extends e{constructor(t){super(t),this.dtoName=F.dtoName,this.type="table-head",this.children=[]}static from(t,e){const s=new F(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new F(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<thead${super.generateAttributeString(t)}>${e}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}F.dtoName="RTETableHeadBlock";class $ extends e{constructor(t){super(t),this.dtoName=$.dtoName,this.type="table-row",this.children=[]}static from(t,e){const s=new $(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new $(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tr${super.generateAttributeString(t)}>${e}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}$.dtoName="RTETableRowBlock";class P extends t{constructor({backgroundColor:t,padding:e,border:s,width:n,height:r,textAlign:i,verticalAlign:o,minWidth:a,boxSizing:c}={},l=!0){super(),this.type=A.CELL,this.useInternalStyle=l,this.backgroundColor=t,this.width=n,this.height=r,this.border=l&&void 0===s?P.DEFAULT_BORDER:s,this.padding=l&&void 0===e?P.DEFAULT_PADDING:e,this.textAlign=l&&void 0===i?P.DEFAULT_HORIZONTAL_TEXT_ALIGN:i,this.verticalAlign=l&&void 0===o?P.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=l&&void 0===a?P.DEFAULT_CELL_MIN_WIDTH:a,this.boxSizing=l&&void 0===c?P.DEFAULT_BOX_SIZING:c}static from(t,e){return[A.CELL,new P(t,e)]}static getDefaultStyles(t=!0){return{padding:P.DEFAULT_PADDING,textAlign:P.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:P.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:P.DEFAULT_CELL_MIN_WIDTH,boxSizing:P.DEFAULT_BOX_SIZING,border:`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${t?P.DEFAULT_BORDER.color:P.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(t){this._backgroundColor=t,this.backgroundColorAnnotation=new O(t)}get backgroundColor(){return this._backgroundColor}set border(t){this._border=t,this.borderColorAnnotation=new O(null==t?void 0:t.color)}get border(){return this._border}clone(){return new P({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:a({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(t){const e=this.backgroundColorAnnotation.renderStyle().color,s={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return e&&(s.backgroundColor=e),a((null==t?void 0:t.standalone)?s:this.removeDefaultValues(s),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(t){const e=Object.assign({},t);return e.padding===P.DEFAULT_PADDING&&delete e.padding,e.border===`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${P.DEFAULT_BORDER.color}`&&delete e.border,e.textAlign===P.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete e.textAlign,e.verticalAlign===P.DEFAULT_VERTICAL_TEXT_ALIGN&&delete e.verticalAlign,e.minWidth===P.DEFAULT_CELL_MIN_WIDTH&&delete e.minWidth,e.boxSizing===P.DEFAULT_BOX_SIZING&&delete e.boxSizing,e}}P.DEFAULT_PADDING="12px",P.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"},P.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)",P.DEFAULT_HORIZONTAL_TEXT_ALIGN="left",P.DEFAULT_VERTICAL_TEXT_ALIGN="middle",P.DEFAULT_CELL_MIN_WIDTH="55px",P.DEFAULT_BOX_SIZING="border-box";class W extends e{constructor(t,e){super(t),this.dtoName=W.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new P)}static from(t,e){var s;const n=new W(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...P.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new W(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const t=this.getCustomAttributeByName("rowspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}get colSpan(){const t=this.getCustomAttributeByName("colspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<td${super.generateAttributeString(t)}>${e}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCustomAttributeByName(t){const e=this.getCustomAttributesAnnotation();if(e)return(e.toJSON().customAttribute||{})[t]}}W.dtoName="RTETableCellBlock";class G extends P{constructor(t={},e=!0){super(t,e)}static from(t,e){return[A.CELL,new G(t,e)]}static getDefaultBackgroundColor(){return c.isDarkMode()?_.dark:_.light}clone(){return new G({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(t){var e;const s=super.renderStyle(t);return a(Object.assign(Object.assign({},s),{backgroundColor:null!==(e=s.backgroundColor)&&void 0!==e?e:G.getDefaultBackgroundColor()}))}}class V extends W{constructor(t,e){super(t,e),this.dtoName=V.dtoName,this.type="table-head-cell";const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new G)}static from(t,e){var s;const n=new V(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...G.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new V(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<th${super.generateAttributeString(t)}>${e}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}V.dtoName="RTETableHeadCellBlock";const U="MERGE_CELLS";class J extends s{constructor(t,e,s,n,r){super(),this.type="MERGE_CELLS",this.isFlushable=!0,this.targetCell=t,this.mergeCells=e,this.colSpan=s,this.rowSpan=n,this.direction=r}}var K,Y;!function(t){t.MERGE_CELLS="MERGE_CELLS",t.MERGE_CELL_UP="MERGE_CELL_UP",t.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",t.MERGE_CELL_DOWN="MERGE_CELL_DOWN",t.MERGE_CELL_LEFT="MERGE_CELL_LEFT"}(K||(K={}));class z extends R{canHandle(t){return t[0]===S.MERGE_CELLS}execute(t,e){const s=e.tableSelection.getSelectedCells(),n=t[1];switch(n){case K.MERGE_CELL_UP:case K.MERGE_CELL_RIGHT:case K.MERGE_CELL_DOWN:case K.MERGE_CELL_LEFT:{const t=this.getDirectionMergeCells(n,s[0]);this.handleMergeCells(t,n)}break;default:s.length>1&&this.handleMergeCells(s,K.MERGE_CELLS)}}getDirectionMergeCells(t,e){const s=it(e,t);if(!s)return[e];switch(t){case K.MERGE_CELL_UP:return[s,e];case K.MERGE_CELL_DOWN:return[e,s];case K.MERGE_CELL_LEFT:return[s,e];default:return[e,s]}}handleMergeCells(t,e){if(t.length<2)return;const s=ot(t),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:a}=s,c=new J(a,t,o-i+1,r-n+1,e);this.applyActionOnTable(c,a)}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}function X(t,e){return t?t instanceof e?t:X(t.parent,e):null}function Z(t,e){return{id:p(),type:"table-body",children:Array.from({length:t},(()=>function(t){return{id:p(),type:"table-row",children:Array.from({length:t},(()=>et("table-cell")))}}(e)))}}function q(t){return t.children.filter((t=>t instanceof H||t instanceof F)).flatMap((t=>t.children))}function Q(t){if(!t||!t.children||!t.children[0])return null;const e=t.children[0];return e instanceof i?e:Q(e)}function tt(t,e){for(const s of t){const t=s.children.find((t=>t.id===e));if(t)return t}return null}function et(t){const e=p();return{id:e,type:t,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function st(t){return{colSpan:t.colSpan,rowSpan:t.rowSpan}}function nt(t,e,s){const n=null!=s?s:rt(e);for(let e=0;e<n.length;e++){const s=n[e];for(let e=0;e<s.length;e++)if(s[e]===t.id)return e}return-1}function rt(t){const e=[];return t.forEach(((t,s)=>{e[s]||(e[s]=[]);let n=0;t.children.forEach((t=>{const{colSpan:r,rowSpan:i}=st(t);for(;void 0!==e[s][n];)n++;for(let o=0;o<i;o++)for(let i=0;i<r;i++)e[s+o]||(e[s+o]=[]),e[s+o][n+i]=t.id;n+=r}))})),e}function it(t,e){if(!t)return null;const s=t.parent,n=s.parent.children,r=n.indexOf(s),{colSpan:i,rowSpan:o}=st(t),a=nt(t,n);let c=r,l=a;switch(e){case K.MERGE_CELL_LEFT:l=a-1;break;case K.MERGE_CELL_RIGHT:l=a+i;break;case K.MERGE_CELL_UP:c=r-1;break;default:c=r+o}return function(t,e,s){const n=rt(t);for(let r=0;r<t.length;r++){const i=t[r];for(const o of i.children){const{colSpan:i,rowSpan:a}=st(o),c=nt(o,t,n),l=r+a-1,h=c+i-1,u=s>=c&&s<=h;if(e>=r&&e<=l&&u)return o}}return null}(n,c,l)}function ot(t){const e=t[0].parent.parent.children,s=rt(e);let n=Number.POSITIVE_INFINITY,r=-1,i=Number.POSITIVE_INFINITY,o=-1;const a=new Set;return t.forEach((t=>{const c=e.indexOf(t.parent),l=nt(t,e,s),{colSpan:h,rowSpan:u}=st(t),d=c,p=c+u-1,E=l,f=l+h-1;for(let t=d;t<=p;t++)for(let e=E;e<=f;e++)a.add(`${t},${e}`);n=Math.min(n,d),r=Math.max(r,p),i=Math.min(i,E),o=Math.max(o,f)})),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:t[0],coveredPositions:a}}function at(t){let e=0;const s=q(t)[0];for(const t of s.children){const{colSpan:s}=st(t);e+=s}return e}function ct(t){if(1===t.length)return!0;const e=ot(t),{minRow:s,maxRow:n,minCol:r,maxCol:i,coveredPositions:o}=e;return o.size===(n-s+1)*(i-r+1)}function lt(t,e,s,i,o){const a=t.annotationMap.get(n.CUSTOM_ATTRIBUTE),c=a?Object.assign({},a.customAttribute):{};delete c.colspan,delete c.rowspan,e>1&&(c.colspan=String(e));const l=at(i)+(o?1:0);if(s>1&&e!==l&&(c.rowspan=String(s)),Object.keys(c).length>0){const e=new r(c);t.annotationMap.set(n.CUSTOM_ATTRIBUTE,e)}else t.annotationMap.delete(n.CUSTOM_ATTRIBUTE)}function ht(t){const e=et(t);return"table-head-cell"===t?V.from(e):W.from(e)}function ut(t,e,s){for(let n=0;n<s;n++){const s=t[n],r=e.children.find((t=>t.id===s));if(r&&!(r instanceof V))return n}return-1}function dt(t){const e=new Map;return t.forEach((t=>{for(let s=0;s<t.length;s++){const n=t[s];n&&!e.has(n)&&e.set(n,s)}})),e}function pt(t,e,s,n){if(0===t.length)return[0,-1];const r=s||q(e),i=null!=n?n:rt(r);let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const e=nt(t,r,i);o=Math.min(o,e),a=Math.max(a,e)})),[o,a]}!function(t){t.HEADER_ROW="HEADER_ROW",t.ADD_ROW_ABOVE="ADD_ROW_ABOVE",t.ADD_ROW_BELOW="ADD_ROW_BELOW",t.DELETE_ROW="DELETE_ROW",t.SELECT_ROW="SELECT_ROW"}(Y||(Y={}));class Et extends R{canHandle(t){return t[0]===S.ROW}execute(t,e){const s=t[1];switch(s){case Y.ADD_ROW_ABOVE:case Y.ADD_ROW_BELOW:this.handleInsertRow(s,e);break;case Y.DELETE_ROW:this.handleDeleteRow(e);break;case Y.HEADER_ROW:this.handleToggleHeader(e);break;case Y.SELECT_ROW:this.handleSelectRow(e)}}handleInsertRow(t,e){const s=this.getAllSelectedRows(e);if(s.length>0){const e=t===Y.ADD_ROW_ABOVE?x.ABOVE:x.BELOW,n=e===x.ABOVE?s[0]:s[s.length-1],r=n.parent instanceof H,i=this.shouldInsertHeaderRow(n,e)||r?new k(e,s):new D(e,s);this.applyActionToTable(s[0],i)}}shouldInsertHeaderRow(t,e){if(e===x.ABOVE)return t.parent instanceof F;{const e=t.parent;return e instanceof F&&e.children[e.children.length-1]!==t}}handleDeleteRow(t){const e=this.getAllSelectedRows(t);if(e.length){const t=new M(e);this.applyActionToTable(e[0],t)}}handleToggleHeader(t){const e=this.getAllSelectedRows(t);if(e.length>0){const t=new j(e);this.applyActionToTable(e[0],t)}}handleSelectRow(t){const e=this.getAllSelectedRows(t);if(e.length>0&&t&&t.tableSelection){const s=e.flatMap((t=>t.children));t.tableSelection.setSelectedCells(s)}}getAllSelectedRows(t){const e=new Set;if(t&&t.tableSelection){const{tableSelection:s}=t;s.getSelectedCells().forEach((t=>{const s=X(t,$);s&&e.add(s)}))}return Array.from(e)}applyActionToTable(t,e){const s=X(t,w);s&&s.apply(e)}}const ft="REPLACE_TABLE_CELL";class Lt extends s{constructor(t){super(),this.isFlushable=!0,this.type="REPLACE_TABLE_CELL",this.payload=t}}const bt="SPLIT_TABLE_CELL";class gt extends s{constructor(t){super(),this.isFlushable=!0,this.type="SPLIT_TABLE_CELL",this.payload=t}}class Ct extends o{getBoundaryCellColumnRange(t,e,s){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const i=nt(t,e,s);n=Math.min(n,i),r=Math.max(r,i)})),[n,r]}}class Tt extends Ct{static isFullHeaderSelection(t){if(0===t.length)return!1;const e=X(t[0],w);if(e){const s=q(e),n=rt(s),r=new Map;s.forEach((t=>{t.children.forEach((t=>r.set(t.id,t)))}));const[i,o]=pt(t,e,s,n);for(const t of n)for(let e=i;e<=o;e++){const s=r.get(t[e]);if(s&&!(s instanceof V))return!1}return!0}return!1}handleAction(t,e){const s=t.headerOn,n=q(e),r=rt(n),[i,o]=this.getBoundaryCellColumnRange(t.tableCellHeaderRange,n,r);(s||!s&&i>0)&&this.toggleHeadRows(e,n,r,s,o,i),this.toggleBodyRows(e,n,r,s,i,o);const a=this.getRootContent(e);if(a&&t.tableCellHeaderRange[0].parent){const e=t.tableCellHeaderRange[0].parent.getFirstNode();e&&a.apply(new E(e,0))}}toggleHeadRows(t,e,s,n,r,i){var o;const a=((null===(o=t.children.find((t=>t instanceof F)))||void 0===o?void 0:o.children)||[]).length;for(let o=0;o<a;o++)this.toggleCellType(t,e[o],s[o],0,n?r:i-1,(()=>!0),(t=>V.from(t.toJSON())))}toggleBodyRows(t,e,s,n,r,i){var o;const a=s[0].length,c=(null===(o=t.children.find((t=>t instanceof H)))||void 0===o?void 0:o.children)||[],l=e.length-c.length;for(let o=0;o<c.length;o++){const c=o+l,h=e[c],u=s[c],d=ut(u,h,a);n?d>-1&&this.toggleCellType(t,h,u,d,i,(t=>!(t instanceof V)),(t=>V.from(t.toJSON()))):this.toggleCellType(t,h,u,r,-1===d?a-1:d-1,(t=>t instanceof V),(t=>W.from(t.toJSON())))}}toggleCellType(t,e,s,n,r,i,o){for(let a=n;a<=r;a++){const n=s[a],c=e.children.find((t=>t.id===n));if(c&&i(c)){const i=s.indexOf(n),l={table:t,cell:c,col:a,cellStartCol:i,endCol:r,targetCellType:o(c).type},h=i+c.colSpan-1;if(h>r||i<a){if(e.apply(new gt(l)),h>r)return;a=h;continue}e.apply(new Lt(l))}c&&(a+=c.colSpan-1)}}}const _t="DELETE_TABLE_COLUMN";class mt extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_COLUMN",this.tableCellDeleteRange=t}}const Ot="INSERT_TABLE_COLUMN";var At;!function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={}));class St extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="INSERT_TABLE_COLUMN",this.tableCellInsertRange=e,this.insertDirection=t}}const yt="SELECT_TABLE_COLUMN";class wt extends s{constructor(t,e){super(),this.type="SELECT_TABLE_COLUMN",this.tableCellSelectRange=t,this.selectCellCallback=e}}const Rt="TOGGLE_HEADER_TABLE_COLUMN";class Nt extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_TABLE_COLUMN",this.headerOn=!1,this.tableCellHeaderRange=t,this.headerOn=e}}var Mt;!function(t){t.HEADER_COLUMN="HEADER_COLUMN",t.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",t.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",t.DELETE_COLUMN="DELETE_COLUMN",t.SELECT_COLUMN="SELECT_COLUMN"}(Mt||(Mt={}));class It extends R{canHandle(t){return t[0]===S.COLUMN}execute(t,e){const s=e.tableSelection.getSelectedCells();if(!s||0===s.length)return;const n=t[1];switch(n){case Mt.ADD_COLUMN_LEFT:case Mt.ADD_COLUMN_RIGHT:this.handleInsertColumn(n,s);break;case Mt.DELETE_COLUMN:this.handleDeleteColumn(s);break;case Mt.SELECT_COLUMN:this.handleSelectColumn(s,e);break;case Mt.HEADER_COLUMN:this.handleToggleHeaderColumn(s)}}handleInsertColumn(t,e){const s=new St(t===Mt.ADD_COLUMN_LEFT?At.LEFT:At.RIGHT,e);this.applyActionOnTable(s,e[0])}handleDeleteColumn(t){const e=new mt(t);this.applyActionOnTable(e,t[0])}handleSelectColumn(t,e){const s=new wt(t,(t=>{e.tableSelection.setSelectedCells(t)}));this.applyActionOnTable(s,t[0])}handleToggleHeaderColumn(t){const e=!Tt.isFullHeaderSelection(t),s=new Nt(t,e);this.applyActionOnTable(s,t[0])}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}const Dt="SPLIT_CELL_HORIZONTALLY";class vt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_HORIZONTALLY"}}const xt="SPLIT_CELL_VERTICALLY";class kt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_VERTICALLY"}}var Bt;!function(t){t.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",t.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"}(Bt||(Bt={}));class jt extends R{canHandle(t){return t[0]===S.SPLIT_CELL}execute(t,e){const s=e.tableSelection.getSelectedCells();if(s&&1===s.length){const e=s[0];switch(t[1]){case Bt.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(e);break;case Bt.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(e)}}}handleSplitCellHorizontally(t){const e=new vt;t.apply(e)}handleSplitCellVertically(t){const e=new kt;t.apply(e)}}export{pt as $,$ as A,nt as B,It as C,x as D,T as E,I as F,v as G,N as H,At as I,B as J,Ot as K,_t as L,z as M,Rt as N,Tt as O,bt as P,ft as Q,A as R,R as S,S as T,Dt as U,g as V,xt as W,yt as X,U as Y,C as Z,Mt as _,_ as a,Y as a0,Bt as a1,ct as a2,it as a3,y as b,P as c,V as d,Et as e,jt as f,m as g,w as h,Z as i,W as j,F as k,H as l,X as m,G as n,Ct as o,q as p,rt as q,tt as r,lt as s,et as t,dt as u,at as v,Q as w,st as x,ht as y,K as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,F as t,r as o,c as r,H as i,g as a}from"./p-6b2342e0.js";import{s as l}from"./p-519a7d55.js";import{c as s,V as n,M as d,I as c}from"./p-6e1ab235.js";import{V as v,I as p}from"./p-8ce9e214.js";import{V as h}from"./p-6031bed1.js";import{D as f}from"./p-526e3634.js";import{a as g,d as u,D as b,r as m,E as x,F as w}from"./p-698fbd73.js";import{g as C}from"./p-8b5d3a52.js";import{c as y}from"./p-3a620268.js";import{t as j}from"./p-aacf6920.js";import{c as F}from"./p-140616fe.js";import{C as R}from"./p-2d0d575f.js";import{F as L}from"./p-cb378636.js";import{F as k}from"./p-320091b7.js";import{F as z}from"./p-fd70418f.js";import{D as E}from"./p-b19b1c08.js";import{T as M}from"./p-6cde45fc.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-282b37cb.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-3a68b729.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-29e3eb12.js";import"./p-8bc15ed0.js";import"./p-87a4d75f.js";import"./p-982747ef.js";var V=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class I extends n{render(){return e(t,null,e("vega-field-label",{isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label}),this.vegaFileUploaderContainerRenderer.render(),this.hint?e("vega-hint",null,this.hint):null,this.vegaFileUploaderFileListRenderer.render())}}V([s()],I.prototype,"required",void 0),V([s()],I.prototype,"optional",void 0),V([s()],I.prototype,"disabled",void 0),V([s()],I.prototype,"label",void 0),V([s()],I.prototype,"hint",void 0),V([s()],I.prototype,"vegaFileUploaderContainerRenderer",void 0),V([s()],I.prototype,"vegaFileUploaderFileListRenderer",void 0);var U=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class O extends n{constructor(){super(...arguments),this.handleDropAreaClick=e=>{e.stopPropagation(),this.shouldDisableUploadButton()||this.triggerFileInputClick()},this.triggerFileInputClick=()=>{this.inputElementRef.click()},this.inputChangeHandler=e=>{e.stopPropagation();const t=this.getVegaFilesFromFileList(e.target.files);this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(t)),this.inputElementRef.value=""},this.dropHandler=e=>{var t;if(e.preventDefault(),!this.shouldDisableUploadButton()){const o=this.getVegaFilesFromFileList(this.dropFileFilterController.process(null===(t=e.dataTransfer)||void 0===t?void 0:t.files));this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(o))}}}getUploaderContainerRef(){return this.uploaderContainerRef}render(){return e("div",{class:"vega-file-uploader-container",ref:e=>this.uploaderContainerRef=e},e("input",{onChange:this.inputChangeHandler,type:"file",multiple:!this.fileLimitController.isSingleMode(),accept:this.accept,style:{display:"none"},ref:e=>this.inputElementRef=e}),"uploadButton"===this.variant?this.renderUploadButton():this.renderUploadDropArea())}renderUploadButton(){return e("vega-button",{label:"Upload Document",icon:h.getIconKey("arrow-up-from-line"),variant:"secondary",size:"small",disabled:this.shouldDisableUploadButton(),ref:e=>{f.addUniqueObserverToNode(e,g,this.triggerFileInputClick)}})}renderUploadDropArea(){return e("vega-box",{class:{"vega-file-upload-area":!0,disabled:this.shouldDisableUploadButton()},padding:"size-24",border:"border-input-field",borderStyle:"dashed",backgroundColor:"bg-tertiary",corners:"rounded-8",tabIndex:0,onDrop:this.dropHandler,onDragEnter:this.preventDefaultBehavior,onDragOver:this.preventDefaultBehavior,onClick:this.handleDropAreaClick,onKeyDown:y()},e("vega-flex",{gap:"size-8",alignItems:"center",justifyContent:"center"},e("vega-icon",{color:"text-link",icon:h.getIconKey("arrow-up-from-line")}),e("vega-font",{color:"text-link",variant:"font-btn-label"},this.translationSlimmer.t("Select or drop your file here"))))}preventDefaultBehavior(e){e.preventDefault()}selectFileChangeEventEmitHandler(e){e&&e.length&&(this.selectFileChangeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value&&this.value.length?(new Array).concat(this.value,e):e))}getVegaFilesFromFileList(e){const t=[];return e&&e.length&&Array.from(e).map((e=>{t.push({key:C(),name:e.name,url:e})})),t}shouldDisableUploadButton(){return this.disabled||!!(this.value&&this.maxCount&&this.value.length>=this.maxCount)}filterExceedLimitFiles(e){const t=Number(this.maxCount);if(!isNaN(t)&&t&&e.length){const o=Math.max(0,t-(this.value?this.value.length:0));return e.slice(0,o)}return e}}h.register({"arrow-up-from-line":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.3V208 320c0 17.7 14.3 32 32 32s32-14.3 32-32V208 141.3l73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"/></svg>'}}),U([s()],O.prototype,"variant",void 0),U([s()],O.prototype,"accept",void 0),U([s()],O.prototype,"disabled",void 0),U([s()],O.prototype,"value",void 0),U([s()],O.prototype,"selectFileChangeEventEmitter",void 0),U([s()],O.prototype,"vegaFileUploaderValueController",void 0),U([s()],O.prototype,"dropFileFilterController",void 0),U([s()],O.prototype,"translationSlimmer",void 0),U([s()],O.prototype,"fileLimitController",void 0),U([s()],O.prototype,"maxCount",void 0);var D=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class A extends n{constructor(){super(...arguments),this.fileRemoveHandler=e=>{this.removeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value.filter((t=>t!==e)))},this.fileReUploadHandler=e=>{this.retryEventEmitter.emit(e)},this.filePreviewHandler=e=>{this.previewEventEmitter.emit(e)}}render(){const t=!this.value||this.value.length<1;return e("div",{class:{"vega-file-uploader-file-list":!0,"vega-file-list-hidden":t}},!t&&this.value.map((t=>e("vega-box",{key:t.key,class:"vega-file-uploader-file",padding:"size-8",corners:"rounded-8"},e("vega-flex",{alignItems:"start",justifyContent:"space-between"},e("vega-flex",{class:"vega-file-status-and-name",gap:"size-8",alignItems:"start"},e("div",{style:{paddingTop:"3px"}},this.vegaFileUploaderFileStatusRenderer.render(t.status,t.uploadingPercent)),e("vega-flex",{gap:"size-4",direction:"col"},e("vega-font",{color:"done"===t.status||"error"===t.status?"text-primary":"text-secondary",variant:"font-field-label"},t.name),"error"===t.status&&t.errorMessage&&e("vega-font",{color:"text-error",variant:"font-footnote1-short"},t.errorMessage))),e("vega-flex",{gap:"size-4",class:"vega-file-list-buttons",justifyContent:"end"},t.previewable&&e("vega-button-circle",{class:"vega-file-preview-button",variant:"icon-only",size:"small",icon:"zoom-in",iconColor:"text-secondary",label:"Preview",tooltip:{disableInteractive:!0},ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.filePreviewHandler(t)}))}}),"error"===t.status&&e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("arrow-rotate-right"),iconColor:"text-secondary",label:"Retry",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileReUploadHandler(t)}))}}),e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("trash-can"),iconColor:"text-secondary",label:"Delete",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileRemoveHandler(t)}))}})))))))}}h.register({"trash-can":j,"arrow-rotate-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M456 224c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24s-24 10.7-24 24v80.1l-20-23.5C371 63.4 309.1 32 240 32C116.3 32 16 132.3 16 256s100.3 224 224 224c50.4 0 97-16.7 134.4-44.8c10.6-8 12.7-23 4.8-33.6s-23-12.7-33.6-4.8C316.2 418.9 279.7 432 240 432c-97.2 0-176-78.8-176-176s78.8-176 176-176c54.3 0 102.9 24.6 135.2 63.4l.1 .2 0 0L402.9 176H312c-13.3 0-24 10.7-24 24s10.7 24 24 24H456z"/></svg>'}}),D([s()],A.prototype,"value",void 0),D([s()],A.prototype,"disabled",void 0),D([s()],A.prototype,"vegaFileUploaderFileStatusRenderer",void 0),D([s()],A.prototype,"removeEventEmitter",void 0),D([s()],A.prototype,"vegaFileUploaderValueController",void 0),D([s()],A.prototype,"retryEventEmitter",void 0),D([s()],A.prototype,"previewEventEmitter",void 0);class S extends n{render(t,o){switch(t){case"uploading":return e("vega-loading-indicator",Object.assign({class:"vega-file-list-status",mode:o?"determinate":"indeterminate",size:"micro"},o?{percent:o}:{}));case"done":return e("vega-icon",{class:"vega-file-list-status",color:"text-success",icon:h.getIconKey("circle-check-regular")});case"error":return e("vega-icon",{class:"vega-file-list-status",color:"text-error",icon:h.getIconKey("circle-xmark")});default:return e("vega-loading-indicator",{class:"vega-file-list-status",mode:"determinate",size:"micro"})}}}h.register({"circle-check-regular":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'},"circle-xmark":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M175 175C184.4 165.7 199.6 165.7 208.1 175L255.1 222.1L303 175C312.4 165.7 327.6 165.7 336.1 175C346.3 184.4 346.3 199.6 336.1 208.1L289.9 255.1L336.1 303C346.3 312.4 346.3 327.6 336.1 336.1C327.6 346.3 312.4 346.3 303 336.1L255.1 289.9L208.1 336.1C199.6 346.3 184.4 346.3 175 336.1C165.7 327.6 165.7 312.4 175 303L222.1 255.1L175 208.1C165.7 199.6 165.7 184.4 175 175V175zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'}});var B=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class H extends n{valueChangeHandler(e){!e||Array.isArray(e)?(this.changeEventEmitter.emit(e),R.notify(L,{host:this.host,detail:this.value})):e&&!Array.isArray(e)&&this.setValue(null)}setValue(e){this.value=e}}B([s()],H.prototype,"host",void 0),B([s({writable:!0})],H.prototype,"value",void 0),B([s()],H.prototype,"changeEventEmitter",void 0),B([d("watchValue")],H.prototype,"valueChangeHandler",null);var N=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class P extends n{isSingleMode(){return 1===Number(this.maxCount)}checkMaxCount(){null!==this.maxCount&&this.maxCount<1&&(this.maxCount=null)}}N([s({writable:!0})],P.prototype,"maxCount",void 0),N([d("componentDidLoad"),d("watchMaxCount")],P.prototype,"checkMaxCount",null);var q=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};const G=class{constructor(e){o(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaSelectedFileChange=r(this,"vegaSelectedFileChange",7),this.selectedFileChange=r(this,"selectedFileChange",7),this.vegaRemove=r(this,"vegaRemove",7),this.remove=r(this,"remove",7),this.vegaRetry=r(this,"vegaRetry",7),this.retry=r(this,"retry",7),this.vegaPreview=r(this,"vegaPreview",7),this.preview=r(this,"preview",7),this.globalSlimmers={},this.translationSlimmer=new M,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new z:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaFileUploaderContainerRenderer.getUploaderContainerRef(),touchableAreaGetter:()=>[this.vegaFileUploaderContainerRenderer.getUploaderContainerRef()]}),this.vegaFileUploaderRenderer=new I,this.vegaFileUploaderContainerRenderer=new O,this.vegaFileUploaderFileListRenderer=new A,this.vegaFileUploaderFileStatusRenderer=new S,this.vegaFileUploaderValueController=new H,this.dropFileFilterController=new E,this.fileLimitController=new P,this.changeEventEmitter=F(G,u),this.selectFileChangeEventEmitter=F(G,b),this.removeEventEmitter=F(G,m),this.retryEventEmitter=F(G,x),this.previewEventEmitter=F(G,w),this.label="",this.variant="uploadArea",this.hint="",this.value=[],this.disabled=!1,this.maxCount=null,this.required=!1,this.optional=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchValue(e){}watchMaxCount(){}watchValidationRules(){}render(){return l(e(i,null,this.vegaFileUploaderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],maxCount:["watchMaxCount"],validationRules:["watchValidationRules"]}}};q([p()],G.prototype,"globalSlimmers",void 0),q([c()],G.prototype,"translationSlimmer",void 0),q([c()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([c()],G.prototype,"formFieldController",void 0),q([c()],G.prototype,"vegaFileUploaderRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderContainerRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderFileListRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderFileStatusRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderValueController",void 0),q([c()],G.prototype,"dropFileFilterController",void 0),q([c()],G.prototype,"fileLimitController",void 0),q([c()],G.prototype,"changeEventEmitter",void 0),q([c()],G.prototype,"selectFileChangeEventEmitter",void 0),q([c()],G.prototype,"removeEventEmitter",void 0),q([c()],G.prototype,"retryEventEmitter",void 0),q([c()],G.prototype,"previewEventEmitter",void 0),G.style=':host{display:inline-block;text-align:left;width:100%;line-height:normal}:host .vega-file-uploader-container .vega-file-upload-area{text-align:center}:host .vega-file-uploader-container .vega-file-upload-area:hover{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-input-field-hover, 115, 160, 190, 1))}:host .vega-file-uploader-container .vega-file-upload-area:hover vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:hover vega-font{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-file-uploader-container .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-file-uploader-container .vega-file-upload-area:active{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area:active vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:active vega-font{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area.disabled{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1));outline:none}:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-icon,:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-file-uploader-container vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error .vega-file-upload-area{border-color:rgba(var(--v-border-color-input-field-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:hover{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-file-uploader-container.error .vega-file-upload-area:active{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error vega-button::part(button),:host .vega-file-uploader-container.error vega-button::part(button):hover{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1));border-color:rgba(var(--v-border-color-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error vega-button::part(button):hover{background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-file-uploader-container.error vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error vega-button::part(button):active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-file-uploader-file-list .vega-file-uploader-file .vega-file-preview-button{visibility:hidden}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover{background-color:rgba(var(--v-bg-action-tertiary-hover, 4, 4, 28, 0.05))}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover .vega-file-preview-button{visibility:visible}:host .vega-file-uploader-file-list .vega-file-list-buttons{margin-left:8px;flex-shrink:0}:host .vega-file-uploader-file-list .vega-file-list-status svg{width:16px;height:16px}:host .vega-file-uploader-file-list .vega-file-status-and-name{padding-top:5px}:host .vega-file-uploader-file-list .vega-file-status-and-name vega-font{word-break:break-word}:host vega-field-label{margin-bottom:8px}:host .vega-file-uploader-file-list{margin-top:8px}:host .vega-file-uploader-file-list.vega-file-list-hidden{display:none}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{G as vega_file_uploader}
|
|
1
|
+
import{h as e,F as t,r as o,c as r,H as i,g as a}from"./p-6b2342e0.js";import{s as l}from"./p-519a7d55.js";import{c as s,V as n,M as d,I as c}from"./p-6e1ab235.js";import{V as v,I as p}from"./p-8ce9e214.js";import{V as h}from"./p-6031bed1.js";import{D as f}from"./p-526e3634.js";import{a as g,d as u,D as b,r as m,E as x,F as w}from"./p-5447a8e8.js";import{g as C}from"./p-8b5d3a52.js";import{c as y}from"./p-3a620268.js";import{t as j}from"./p-aacf6920.js";import{c as F}from"./p-66647244.js";import{C as R}from"./p-2d0d575f.js";import{F as L}from"./p-cb378636.js";import{F as k}from"./p-320091b7.js";import{F as z}from"./p-fd70418f.js";import{D as E}from"./p-b19b1c08.js";import{T as M}from"./p-6cde45fc.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-8c30a60d.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-3a68b729.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-29e3eb12.js";import"./p-8bc15ed0.js";import"./p-87a4d75f.js";import"./p-982747ef.js";var V=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class I extends n{render(){return e(t,null,e("vega-field-label",{isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label}),this.vegaFileUploaderContainerRenderer.render(),this.hint?e("vega-hint",null,this.hint):null,this.vegaFileUploaderFileListRenderer.render())}}V([s()],I.prototype,"required",void 0),V([s()],I.prototype,"optional",void 0),V([s()],I.prototype,"disabled",void 0),V([s()],I.prototype,"label",void 0),V([s()],I.prototype,"hint",void 0),V([s()],I.prototype,"vegaFileUploaderContainerRenderer",void 0),V([s()],I.prototype,"vegaFileUploaderFileListRenderer",void 0);var U=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class O extends n{constructor(){super(...arguments),this.handleDropAreaClick=e=>{e.stopPropagation(),this.shouldDisableUploadButton()||this.triggerFileInputClick()},this.triggerFileInputClick=()=>{this.inputElementRef.click()},this.inputChangeHandler=e=>{e.stopPropagation();const t=this.getVegaFilesFromFileList(e.target.files);this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(t)),this.inputElementRef.value=""},this.dropHandler=e=>{var t;if(e.preventDefault(),!this.shouldDisableUploadButton()){const o=this.getVegaFilesFromFileList(this.dropFileFilterController.process(null===(t=e.dataTransfer)||void 0===t?void 0:t.files));this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(o))}}}getUploaderContainerRef(){return this.uploaderContainerRef}render(){return e("div",{class:"vega-file-uploader-container",ref:e=>this.uploaderContainerRef=e},e("input",{onChange:this.inputChangeHandler,type:"file",multiple:!this.fileLimitController.isSingleMode(),accept:this.accept,style:{display:"none"},ref:e=>this.inputElementRef=e}),"uploadButton"===this.variant?this.renderUploadButton():this.renderUploadDropArea())}renderUploadButton(){return e("vega-button",{label:"Upload Document",icon:h.getIconKey("arrow-up-from-line"),variant:"secondary",size:"small",disabled:this.shouldDisableUploadButton(),ref:e=>{f.addUniqueObserverToNode(e,g,this.triggerFileInputClick)}})}renderUploadDropArea(){return e("vega-box",{class:{"vega-file-upload-area":!0,disabled:this.shouldDisableUploadButton()},padding:"size-24",border:"border-input-field",borderStyle:"dashed",backgroundColor:"bg-tertiary",corners:"rounded-8",tabIndex:0,onDrop:this.dropHandler,onDragEnter:this.preventDefaultBehavior,onDragOver:this.preventDefaultBehavior,onClick:this.handleDropAreaClick,onKeyDown:y()},e("vega-flex",{gap:"size-8",alignItems:"center",justifyContent:"center"},e("vega-icon",{color:"text-link",icon:h.getIconKey("arrow-up-from-line")}),e("vega-font",{color:"text-link",variant:"font-btn-label"},this.translationSlimmer.t("Select or drop your file here"))))}preventDefaultBehavior(e){e.preventDefault()}selectFileChangeEventEmitHandler(e){e&&e.length&&(this.selectFileChangeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value&&this.value.length?(new Array).concat(this.value,e):e))}getVegaFilesFromFileList(e){const t=[];return e&&e.length&&Array.from(e).map((e=>{t.push({key:C(),name:e.name,url:e})})),t}shouldDisableUploadButton(){return this.disabled||!!(this.value&&this.maxCount&&this.value.length>=this.maxCount)}filterExceedLimitFiles(e){const t=Number(this.maxCount);if(!isNaN(t)&&t&&e.length){const o=Math.max(0,t-(this.value?this.value.length:0));return e.slice(0,o)}return e}}h.register({"arrow-up-from-line":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.3V208 320c0 17.7 14.3 32 32 32s32-14.3 32-32V208 141.3l73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"/></svg>'}}),U([s()],O.prototype,"variant",void 0),U([s()],O.prototype,"accept",void 0),U([s()],O.prototype,"disabled",void 0),U([s()],O.prototype,"value",void 0),U([s()],O.prototype,"selectFileChangeEventEmitter",void 0),U([s()],O.prototype,"vegaFileUploaderValueController",void 0),U([s()],O.prototype,"dropFileFilterController",void 0),U([s()],O.prototype,"translationSlimmer",void 0),U([s()],O.prototype,"fileLimitController",void 0),U([s()],O.prototype,"maxCount",void 0);var D=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class A extends n{constructor(){super(...arguments),this.fileRemoveHandler=e=>{this.removeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value.filter((t=>t!==e)))},this.fileReUploadHandler=e=>{this.retryEventEmitter.emit(e)},this.filePreviewHandler=e=>{this.previewEventEmitter.emit(e)}}render(){const t=!this.value||this.value.length<1;return e("div",{class:{"vega-file-uploader-file-list":!0,"vega-file-list-hidden":t}},!t&&this.value.map((t=>e("vega-box",{key:t.key,class:"vega-file-uploader-file",padding:"size-8",corners:"rounded-8"},e("vega-flex",{alignItems:"start",justifyContent:"space-between"},e("vega-flex",{class:"vega-file-status-and-name",gap:"size-8",alignItems:"start"},e("div",{style:{paddingTop:"3px"}},this.vegaFileUploaderFileStatusRenderer.render(t.status,t.uploadingPercent)),e("vega-flex",{gap:"size-4",direction:"col"},e("vega-font",{color:"done"===t.status||"error"===t.status?"text-primary":"text-secondary",variant:"font-field-label"},t.name),"error"===t.status&&t.errorMessage&&e("vega-font",{color:"text-error",variant:"font-footnote1-short"},t.errorMessage))),e("vega-flex",{gap:"size-4",class:"vega-file-list-buttons",justifyContent:"end"},t.previewable&&e("vega-button-circle",{class:"vega-file-preview-button",variant:"icon-only",size:"small",icon:"zoom-in",iconColor:"text-secondary",label:"Preview",tooltip:{disableInteractive:!0},ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.filePreviewHandler(t)}))}}),"error"===t.status&&e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("arrow-rotate-right"),iconColor:"text-secondary",label:"Retry",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileReUploadHandler(t)}))}}),e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("trash-can"),iconColor:"text-secondary",label:"Delete",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileRemoveHandler(t)}))}})))))))}}h.register({"trash-can":j,"arrow-rotate-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M456 224c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24s-24 10.7-24 24v80.1l-20-23.5C371 63.4 309.1 32 240 32C116.3 32 16 132.3 16 256s100.3 224 224 224c50.4 0 97-16.7 134.4-44.8c10.6-8 12.7-23 4.8-33.6s-23-12.7-33.6-4.8C316.2 418.9 279.7 432 240 432c-97.2 0-176-78.8-176-176s78.8-176 176-176c54.3 0 102.9 24.6 135.2 63.4l.1 .2 0 0L402.9 176H312c-13.3 0-24 10.7-24 24s10.7 24 24 24H456z"/></svg>'}}),D([s()],A.prototype,"value",void 0),D([s()],A.prototype,"disabled",void 0),D([s()],A.prototype,"vegaFileUploaderFileStatusRenderer",void 0),D([s()],A.prototype,"removeEventEmitter",void 0),D([s()],A.prototype,"vegaFileUploaderValueController",void 0),D([s()],A.prototype,"retryEventEmitter",void 0),D([s()],A.prototype,"previewEventEmitter",void 0);class S extends n{render(t,o){switch(t){case"uploading":return e("vega-loading-indicator",Object.assign({class:"vega-file-list-status",mode:o?"determinate":"indeterminate",size:"micro"},o?{percent:o}:{}));case"done":return e("vega-icon",{class:"vega-file-list-status",color:"text-success",icon:h.getIconKey("circle-check-regular")});case"error":return e("vega-icon",{class:"vega-file-list-status",color:"text-error",icon:h.getIconKey("circle-xmark")});default:return e("vega-loading-indicator",{class:"vega-file-list-status",mode:"determinate",size:"micro"})}}}h.register({"circle-check-regular":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'},"circle-xmark":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M175 175C184.4 165.7 199.6 165.7 208.1 175L255.1 222.1L303 175C312.4 165.7 327.6 165.7 336.1 175C346.3 184.4 346.3 199.6 336.1 208.1L289.9 255.1L336.1 303C346.3 312.4 346.3 327.6 336.1 336.1C327.6 346.3 312.4 346.3 303 336.1L255.1 289.9L208.1 336.1C199.6 346.3 184.4 346.3 175 336.1C165.7 327.6 165.7 312.4 175 303L222.1 255.1L175 208.1C165.7 199.6 165.7 184.4 175 175V175zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'}});var B=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class H extends n{valueChangeHandler(e){!e||Array.isArray(e)?(this.changeEventEmitter.emit(e),R.notify(L,{host:this.host,detail:this.value})):e&&!Array.isArray(e)&&this.setValue(null)}setValue(e){this.value=e}}B([s()],H.prototype,"host",void 0),B([s({writable:!0})],H.prototype,"value",void 0),B([s()],H.prototype,"changeEventEmitter",void 0),B([d("watchValue")],H.prototype,"valueChangeHandler",null);var N=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class P extends n{isSingleMode(){return 1===Number(this.maxCount)}checkMaxCount(){null!==this.maxCount&&this.maxCount<1&&(this.maxCount=null)}}N([s({writable:!0})],P.prototype,"maxCount",void 0),N([d("componentDidLoad"),d("watchMaxCount")],P.prototype,"checkMaxCount",null);var q=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};const G=class{constructor(e){o(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaSelectedFileChange=r(this,"vegaSelectedFileChange",7),this.selectedFileChange=r(this,"selectedFileChange",7),this.vegaRemove=r(this,"vegaRemove",7),this.remove=r(this,"remove",7),this.vegaRetry=r(this,"vegaRetry",7),this.retry=r(this,"retry",7),this.vegaPreview=r(this,"vegaPreview",7),this.preview=r(this,"preview",7),this.globalSlimmers={},this.translationSlimmer=new M,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new z:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaFileUploaderContainerRenderer.getUploaderContainerRef(),touchableAreaGetter:()=>[this.vegaFileUploaderContainerRenderer.getUploaderContainerRef()]}),this.vegaFileUploaderRenderer=new I,this.vegaFileUploaderContainerRenderer=new O,this.vegaFileUploaderFileListRenderer=new A,this.vegaFileUploaderFileStatusRenderer=new S,this.vegaFileUploaderValueController=new H,this.dropFileFilterController=new E,this.fileLimitController=new P,this.changeEventEmitter=F(G,u),this.selectFileChangeEventEmitter=F(G,b),this.removeEventEmitter=F(G,m),this.retryEventEmitter=F(G,x),this.previewEventEmitter=F(G,w),this.label="",this.variant="uploadArea",this.hint="",this.value=[],this.disabled=!1,this.maxCount=null,this.required=!1,this.optional=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchValue(e){}watchMaxCount(){}watchValidationRules(){}render(){return l(e(i,null,this.vegaFileUploaderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],maxCount:["watchMaxCount"],validationRules:["watchValidationRules"]}}};q([p()],G.prototype,"globalSlimmers",void 0),q([c()],G.prototype,"translationSlimmer",void 0),q([c()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([c()],G.prototype,"formFieldController",void 0),q([c()],G.prototype,"vegaFileUploaderRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderContainerRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderFileListRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderFileStatusRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderValueController",void 0),q([c()],G.prototype,"dropFileFilterController",void 0),q([c()],G.prototype,"fileLimitController",void 0),q([c()],G.prototype,"changeEventEmitter",void 0),q([c()],G.prototype,"selectFileChangeEventEmitter",void 0),q([c()],G.prototype,"removeEventEmitter",void 0),q([c()],G.prototype,"retryEventEmitter",void 0),q([c()],G.prototype,"previewEventEmitter",void 0),G.style=':host{display:inline-block;text-align:left;width:100%;line-height:normal}:host .vega-file-uploader-container .vega-file-upload-area{text-align:center}:host .vega-file-uploader-container .vega-file-upload-area:hover{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-input-field-hover, 115, 160, 190, 1))}:host .vega-file-uploader-container .vega-file-upload-area:hover vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:hover vega-font{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-file-uploader-container .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-file-uploader-container .vega-file-upload-area:active{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area:active vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:active vega-font{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area.disabled{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1));outline:none}:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-icon,:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-file-uploader-container vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error .vega-file-upload-area{border-color:rgba(var(--v-border-color-input-field-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:hover{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-file-uploader-container.error .vega-file-upload-area:active{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error vega-button::part(button),:host .vega-file-uploader-container.error vega-button::part(button):hover{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1));border-color:rgba(var(--v-border-color-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error vega-button::part(button):hover{background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-file-uploader-container.error vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error vega-button::part(button):active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-file-uploader-file-list .vega-file-uploader-file .vega-file-preview-button{visibility:hidden}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover{background-color:rgba(var(--v-bg-action-tertiary-hover, 4, 4, 28, 0.05))}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover .vega-file-preview-button{visibility:visible}:host .vega-file-uploader-file-list .vega-file-list-buttons{margin-left:8px;flex-shrink:0}:host .vega-file-uploader-file-list .vega-file-list-status svg{width:16px;height:16px}:host .vega-file-uploader-file-list .vega-file-status-and-name{padding-top:5px}:host .vega-file-uploader-file-list .vega-file-status-and-name vega-font{word-break:break-word}:host vega-field-label{margin-bottom:8px}:host .vega-file-uploader-file-list{margin-top:8px}:host .vega-file-uploader-file-list.vega-file-list-hidden{display:none}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{G as vega_file_uploader}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,H as t,r as i,c as o,g as a}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as s,M as l,V as n,I as d,L as c}from"./p-6e1ab235.js";import{V as h,I as p}from"./p-8ce9e214.js";import{R as v}from"./p-3dee1e55.js";import{c as g}from"./p-3a620268.js";import{S as b}from"./p-29e3eb12.js";import{O as f}from"./p-331a62d5.js";import{d as m}from"./p-526e3634.js";import{i as u}from"./p-3a68b729.js";import{f as x}from"./p-528748fa.js";import{C as w}from"./p-2d0d575f.js";import{P as j}from"./p-81dd00d0.js";import{g as y}from"./p-49a2e141.js";import{d as k}from"./p-5447a8e8.js";import{c as C}from"./p-66647244.js";import{F as R}from"./p-cb378636.js";import{M as z}from"./p-78a57a17.js";import{a as S}from"./p-52b8f2d2.js";import{i as O}from"./p-d27ae9ff.js";import{c as E}from"./p-3f183b52.js";import{C as T}from"./p-2c737fc8.js";import{F as I}from"./p-320091b7.js";import{R as V}from"./p-8bc15ed0.js";import"./p-8db904dc.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-0d18368b.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-b75ee3ba.js";import"./p-6a334573.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-f0e828d8.js";import"./p-abd7aeaa.js";var N=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class L extends n{componentWillRender(){this.currentSize=v.formatCustom(this.size)}render(){return e(t,{class:{block:this.block}},this.renderTooltip())}renderTooltip(){return e("vega-tooltip",Object.assign({trigger:this.disabled&&this.disabledTooltip?"hover":"none",alignment:"center"},this.disabledTooltip),this.renderSelectionChip())}renderSelectionChip(){return e("vega-box",{corners:"rounded-full",class:{"vega-selection-chip":!0,[`size-${this.currentSize}`]:!0,[`variant-${this.variant||"text"}`]:!0,checked:this.checked,error:this.showError,disabled:this.disabled},"aria-label":this.label||"No label defined",onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:g(),tabIndex:this.disabled?-1:0},this.renderContent())}renderContent(){return e("vega-flex",{gap:L.gapSizeMap[this.currentSize],"align-items":"center","justify-content":"text"===this.variant?"center":"start"},"swatch"===this.variant&&this.renderSwatch(),this.renderLabel())}renderLabel(){return e("vega-font",{color:"text-primary",class:"label vega-flex-grow",variant:L.labelFontMap[this.currentSize]},this.label)}renderSwatch(){return e("vega-box",{"background-color":"bg-primary",corners:"rounded-full",class:"swatch vega-flex-shrink-0"},e("vega-box",{"background-color":this.swatchColor,corners:"rounded-full"}))}}L.gapSizeMap={"extra-small":"size-4",small:"size-4",medium:"size-8",large:"size-8"},L.labelFontMap={"extra-small":"font-field-label-xs",small:"font-field-label-sm",medium:"font-field-label",large:"font-field-label-lg"},N([s()],L.prototype,"host",void 0),N([s()],L.prototype,"label",void 0),N([s()],L.prototype,"block",void 0),N([s()],L.prototype,"size",void 0),N([s()],L.prototype,"variant",void 0),N([s()],L.prototype,"swatchColor",void 0),N([s()],L.prototype,"disabledTooltip",void 0),N([s()],L.prototype,"disabled",void 0),N([s()],L.prototype,"selectType",void 0),N([s()],L.prototype,"checked",void 0),N([s()],L.prototype,"checkedController",void 0),N([s()],L.prototype,"showError",void 0),N([l("componentWillRender")],L.prototype,"componentWillRender",null);var A=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class F extends n{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.setChecked(e),this.changeEventEmitter.emit(t)}}A([s()],F.prototype,"host",void 0),A([s({writable:!0})],F.prototype,"checked",void 0),A([s()],F.prototype,"changeEventEmitter",void 0),A([s()],F.prototype,"value",void 0);var D=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class G extends b{constructor(){super({parent:"vega-selection-chip-group",subStates:[{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"selectType",parentStateName:"selectType",callback:e=>{this.selectType="checkbox"===e?"checkbox":"radio"}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}D([s()],G.prototype,"host",void 0),D([s({writable:!0})],G.prototype,"disabled",void 0),D([s({writable:!0})],G.prototype,"selectType",void 0),D([s()],G.prototype,"value",void 0),D([s()],G.prototype,"checkedController",void 0);var W=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class M extends n{connectedCallback(){this.selectionChipGroup=x(this.host,"vega-selection-chip-group"),this.selectionChipGroup&&(this.fieldErrorObserver=new f(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),w.register(m.getSubject(this.selectionChipGroup,u),this.fieldErrorObserver))}disconnectedCallback(){this.selectionChipGroup&&w.unregister(m.getSubject(this.selectionChipGroup,u),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}W([s({writable:!0})],M.prototype,"showError",void 0),W([s()],M.prototype,"host",void 0),W([l("connectedCallback")],M.prototype,"connectedCallback",null),W([l("disconnectedCallback")],M.prototype,"disconnectedCallback",null);var _=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const H=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.checkedController=new F,this.stateController=new G,this.showErrorController=new M,this.pageResizeObserverSlimmer=new j,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(H,k),this.showError=!1,this.currentBreakpoint=y(),this.label="",this.size="medium",this.variant="text",this.disabled=!1,this.block=!1,this.swatchColor="bg-status-info"}watchSize(){}componentWillRender(){}render(){return r(this.renderer.render(),this.host)}get host(){return a(this)}static get watchers(){return{size:["watchSize"]}}};_([p()],H.prototype,"globalSlimmers",void 0),_([d()],H.prototype,"renderer",void 0),_([d()],H.prototype,"checkedController",void 0),_([d()],H.prototype,"stateController",void 0),_([d()],H.prototype,"showErrorController",void 0),_([d()],H.prototype,"pageResizeObserverSlimmer",void 0),_([d()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([d()],H.prototype,"changeEventEmitter",void 0),H.style=":host(.block){display:block}:host(.block) vega-tooltip{display:block}:host{max-width:100%;display:inline-block;vertical-align:middle;line-height:0}:host vega-tooltip{max-width:100%}:host .swatch{margin:2px;padding:1px;box-sizing:border-box}:host .swatch vega-box{width:100%;height:100%}:host .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .vega-selection-chip{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));cursor:pointer;margin:1px}:host .variant-text .label{text-align:center}:host .size-extra-small.variant-swatch.vega-selection-chip{padding-top:2px;padding-bottom:2px;padding-left:2px;padding-right:12px}:host .size-extra-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:2px;padding-bottom:2px}:host .size-extra-small vega-flex{height:16px}:host .size-extra-small .swatch{width:12px;height:12px}:host .size-small.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:12px}:host .size-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:4px;padding-bottom:4px}:host .size-small vega-flex{height:24px}:host .size-small .swatch{width:20px;height:20px}:host .size-medium.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:16px}:host .size-medium.variant-text.vega-selection-chip{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .size-medium vega-flex{height:32px}:host .size-medium .swatch{width:28px;height:28px}:host .size-large.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:20px}:host .size-large.variant-text.vega-selection-chip{padding-left:20px;padding-right:20px;padding-top:4px;padding-bottom:4px}:host .size-large vega-flex{height:40px}:host .size-large .swatch{width:36px;height:36px}:host .vega-selection-chip:not(.disabled){background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))}:host .vega-selection-chip:not(.disabled):hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))}:host .vega-selection-chip:not(.disabled):focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .vega-selection-chip:not(.disabled).checked:hover{background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))}:host .vega-selection-chip:not(.disabled).checked:focus-visible{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).error{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-selection-chip:not(.disabled).error:hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-selection-chip:not(.disabled).error:focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}:host .vega-selection-chip.disabled{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));pointer-events:none;color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled:focus-visible{outline:none}:host .vega-selection-chip.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled .swatch{opacity:0.5}";var P=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class $ extends n{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,optional:this.optional,label:this.label})}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("slot",null))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([s()],$.prototype,"host",void 0),P([s()],$.prototype,"label",void 0),P([s()],$.prototype,"required",void 0),P([s()],$.prototype,"optional",void 0),P([s()],$.prototype,"hint",void 0),P([s()],$.prototype,"disabled",void 0);var q=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class U extends n{watchValue(){this.changeEventEmitter.emit(this.value),w.notify(R,{host:this.host,detail:this.value})}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"radio":return"string"==typeof e;case"checkbox":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid selection chip group value ${e} for ${this.selectType} mode`),!1}}}q([s()],U.prototype,"host",void 0),q([s({writable:!0})],U.prototype,"value",void 0),q([s()],U.prototype,"changeEventEmitter",void 0),q([s()],U.prototype,"selectType",void 0),q([l("watchValue")],U.prototype,"watchValue",null);var K=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class B extends n{constructor(){super(...arguments),this.mutationObserver=new z({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked"]},mutationFilter:S("VEGA-SELECTION-CHIP"),callback:this.syncChipArrayAndValue.bind(this)}),this.selectionChipArray=[]}disconnectedCallback(){}componentWillLoad(){this.value&&0!==this.value.length||this.syncChipArrayAndValue()}componentDidLoad(){}watchSelectType(){this.syncChipArrayAndValue()}getSelectionChipArray(){return this.selectionChipArray}syncChipArrayAndValue(e){this.selectionChipArray=Array.from(this.host.querySelectorAll("vega-selection-chip")),"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems(e)}setValueFromCheckboxItems(){const e=this.selectionChipArray.filter((e=>e.checked)).map((e=>e.value));O(this.value,e,!0)||this.valueController.setValue(e)}setValueFromRadioItems(e){const t=this.findAttributeMutation(e);if(t){const e=this.getCurrentChip(t);e&&e.checked&&this.valueController.setValue(e.value)}else{const e=this.getFirstCheckedChip();this.valueController.setValue(e?e.value:"")}}findAttributeMutation(e){return e&&e.find((e=>e.attributeName))}getCurrentChip(e){if(e&&"VEGA-SELECTION-CHIP"===e.target.tagName&&"checked"===e.attributeName)return e.target}getFirstCheckedChip(){return this.selectionChipArray.find((e=>e.checked))}}K([s()],B.prototype,"host",void 0),K([s()],B.prototype,"selectType",void 0),K([s()],B.prototype,"valueController",void 0),K([s()],B.prototype,"value",void 0),K([d()],B.prototype,"mutationObserver",void 0),K([l("disconnectedCallback")],B.prototype,"disconnectedCallback",null),K([l("componentWillLoad")],B.prototype,"componentWillLoad",null),K([l("componentDidLoad")],B.prototype,"componentDidLoad",null),K([l("watchSelectType")],B.prototype,"watchSelectType",null);var J=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Q=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new $,this.itemsController=new B,this.valueController=new U,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.getSelectionChipArray(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(Q,k),this.valueNotifySlimmer=E(Q,"value","watchValue"),this.disabledNotifySlimmer=E(Q,"disabled","watchDisabled"),this.selectTypeNotifySlimmer=E(Q,"selectType","watchSelectType"),this.changeEventPrevent=new T([k],(()=>this.host),!0),this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.optional=!1,this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(t,null,this.renderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};J([p()],Q.prototype,"globalSlimmers",void 0),J([d()],Q.prototype,"renderer",void 0),J([d()],Q.prototype,"itemsController",void 0),J([d()],Q.prototype,"valueController",void 0),J([d()],Q.prototype,"formFieldController",void 0),J([d()],Q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J([d()],Q.prototype,"changeEventEmitter",void 0),J([d()],Q.prototype,"valueNotifySlimmer",void 0),J([d()],Q.prototype,"disabledNotifySlimmer",void 0),J([d()],Q.prototype,"selectTypeNotifySlimmer",void 0),J([d()],Q.prototype,"changeEventPrevent",void 0),Q.style=':host{display:block}:host vega-field-label{margin-bottom:8px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:4px;padding-left:8px;padding-right:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:block;margin-top:12px;margin-left:8px;margin-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{H as vega_selection_chip,Q as vega_selection_chip_group}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as s,i as t}from"./p-e62d41ee.js";import{b as e}from"./p-312d8205.js";class r extends s{constructor(s,e){super(),this.type=t.REPLACE_SELECTED_TEXT,this.textToBeInsert="",this.textToBeInsert=s,this.currentRange=e}}class o extends e{constructor(s={}){super(),this.config=s}prepareBeforeLoad(s){o.configStore.set(s,this.config)}destroyExtension(){var s;(null===(s=this.extensionContext)||void 0===s?void 0:s.host)&&o.configStore.delete(this.extensionContext.host)}}o.configStore=o.createStateStore();export{r as R,o as V}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as e,g as n}from"./p-6b2342e0.js";import{c as a}from"./p-3a620268.js";import{s as o}from"./p-519a7d55.js";import{g as s,D as r,a as p}from"./p-528748fa.js";import{I as g}from"./p-6e1ab235.js";import{V as f,I as c}from"./p-8ce9e214.js";import{D as h}from"./p-526e3634.js";import{a as l}from"./p-698fbd73.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";var x=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const m={success:"checkmark-circle",warning:"warning-triangle-filled",error:"help-filled",info:"info-circle-filled"},d=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.isMobileDevice=s()===r.MOBILE,this.notificationTitle="",this.message="",this.type="info",this.duration=5e3,this.showCloseButton=!0,this.actionButtons=[],this.renderPrefixIcon=()=>i("div",{class:"vega-page-notification-prefix"},i("vega-icon",{icon:m[this.type],size:this.isMobileDevice?"size-16":"size-24"})),this.renderContent=()=>i("div",{class:"vega-page-notification-content"},this.notificationTitle&&i("div",{class:"vega-page-notification-title"},this.notificationTitle),i("div",{class:"vega-page-notification-message"},this.message)),this.autoCloseAfterDuration=()=>{this.duration>0&&setTimeout((()=>{this.close()}),this.duration)}}componentDidLoad(){this.autoCloseAfterDuration()}async close(){this.host.classList.add("vega-page-notification-fade-out"),setTimeout((()=>{this.host.remove()}),300)}render(){const t=p([this.type,this.isMobileDevice&&"mobile"].filter(Boolean));return o(i(e,{class:t},i("vega-box",{padding:this.isMobileDevice?"size-16":"size-24"},i("vega-flex",{gap:"size-16"},this.renderPrefixIcon(),this.renderContent(),this.renderCloseButtons()),this.renderActionButtons())),this.host)}renderCloseButtons(){if(this.showCloseButton)return i("div",{"aria-label":"Close Button",class:"vega-page-notification-close-btn",onClick:()=>this.close(),role:"button",tabIndex:0,onKeyDown:a()},i("vega-icon",{icon:"close",size:this.isMobileDevice?"size-12":"size-16"}))}renderActionButtons(){if(this.actionButtons&&0!==this.actionButtons.length)return i("div",{class:"vega-page-notification-actions-container"},this.actionButtons.map((t=>i("vega-button",{size:this.isMobileDevice?"small":"default",label:t.label,variant:"secondary",ref:i=>{h.addUniqueObserverToNode(i,l,t.onVegaClick)}}))))}get host(){return n(this)}};x([c()],d.prototype,"globalSlimmers",void 0),x([g()],d.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),d.style=':host{display:inline-block;box-sizing:border-box;border-radius:12px;max-width:480px;box-shadow:0 4px 8px rgba(2, 2, 15, 0.1), 0 12px 20px rgba(2, 2, 15, 0.15);animation:fade-in-right 300ms ease-in-out}:host(.mobile){width:100%;max-width:100%;animation:fade-in-up 300ms ease-in-out}:host(.vega-page-notification-fade-out){opacity:0;animation:fade-out 300ms ease-in-out}:host vega-icon{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1))}:host .vega-page-notification-prefix{display:flex}:host(.mobile) .vega-page-notification-prefix{padding-top:4px}:host .vega-page-notification-content{flex:1 1 0%;overflow:auto}:host .vega-page-notification-close-btn{cursor:pointer;display:inline-flex;margin-top:4px}:host(.mobile) .vega-page-notification-close-btn{padding:2px}:host .vega-page-notification-actions-container{display:flex;align-items:flex-end;flex-wrap:wrap;gap:16px;justify-content:flex-end;margin-top:24px}:host(.mobile) .vega-page-notification-actions-container{margin-top:16px}:host .vega-page-notification-title{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-page-notification-message{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;overflow-wrap:break-word;margin-top:2px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));border:2px solid rgba(var(--v-text-page-notification-content, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.success){background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.warning){background-color:rgba(var(--v-bg-status-warning, 255, 220, 131, 1))}:host(.error){background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.info){background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1))}.vega-page-notification-list{display:flex;flex-direction:column;align-items:flex-end;position:fixed}.vega-page-notification-list-topRight{top:24px;right:24px}.vega-page-notification-list-bottom{left:0px;right:0px;padding-left:16px;padding-right:16px;align-items:center;bottom:0px}@keyframes fade-in-right{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:none}}@keyframes fade-in-up{from{opacity:0;transform:translateY(100%)}to{opacity:1;transform:none}}@keyframes fade-out{from{opacity:1}to{opacity:0}}';var v=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const b=class{constructor(i){t(this,i),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f}render(){return i(e,null,i("slot",null))}get host(){return n(this)}};v([c()],b.prototype,"globalSlimmers",void 0),v([g()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=":host{position:fixed;display:flex;flex-direction:column;align-items:flex-end}:host(.vega-page-notification-list-topRight){top:24px;right:24px}:host(.vega-page-notification-list-bottom){align-items:center;padding-left:16px;padding-right:16px;left:0px;right:0px;bottom:0px}";export{d as vega_page_notification,b as vega_page_notification_list}
|
|
1
|
+
import{r as t,h as i,H as e,g as n}from"./p-6b2342e0.js";import{c as a}from"./p-3a620268.js";import{s as o}from"./p-519a7d55.js";import{g as s,D as r,a as p}from"./p-528748fa.js";import{I as g}from"./p-6e1ab235.js";import{V as f,I as c}from"./p-8ce9e214.js";import{D as h}from"./p-526e3634.js";import{a as l}from"./p-5447a8e8.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";var x=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const m={success:"checkmark-circle",warning:"warning-triangle-filled",error:"help-filled",info:"info-circle-filled"},d=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.isMobileDevice=s()===r.MOBILE,this.notificationTitle="",this.message="",this.type="info",this.duration=5e3,this.showCloseButton=!0,this.actionButtons=[],this.renderPrefixIcon=()=>i("div",{class:"vega-page-notification-prefix"},i("vega-icon",{icon:m[this.type],size:this.isMobileDevice?"size-16":"size-24"})),this.renderContent=()=>i("div",{class:"vega-page-notification-content"},this.notificationTitle&&i("div",{class:"vega-page-notification-title"},this.notificationTitle),i("div",{class:"vega-page-notification-message"},this.message)),this.autoCloseAfterDuration=()=>{this.duration>0&&setTimeout((()=>{this.close()}),this.duration)}}componentDidLoad(){this.autoCloseAfterDuration()}async close(){this.host.classList.add("vega-page-notification-fade-out"),setTimeout((()=>{this.host.remove()}),300)}render(){const t=p([this.type,this.isMobileDevice&&"mobile"].filter(Boolean));return o(i(e,{class:t},i("vega-box",{padding:this.isMobileDevice?"size-16":"size-24"},i("vega-flex",{gap:"size-16"},this.renderPrefixIcon(),this.renderContent(),this.renderCloseButtons()),this.renderActionButtons())),this.host)}renderCloseButtons(){if(this.showCloseButton)return i("div",{"aria-label":"Close Button",class:"vega-page-notification-close-btn",onClick:()=>this.close(),role:"button",tabIndex:0,onKeyDown:a()},i("vega-icon",{icon:"close",size:this.isMobileDevice?"size-12":"size-16"}))}renderActionButtons(){if(this.actionButtons&&0!==this.actionButtons.length)return i("div",{class:"vega-page-notification-actions-container"},this.actionButtons.map((t=>i("vega-button",{size:this.isMobileDevice?"small":"default",label:t.label,variant:"secondary",ref:i=>{h.addUniqueObserverToNode(i,l,t.onVegaClick)}}))))}get host(){return n(this)}};x([c()],d.prototype,"globalSlimmers",void 0),x([g()],d.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),d.style=':host{display:inline-block;box-sizing:border-box;border-radius:12px;max-width:480px;box-shadow:0 4px 8px rgba(2, 2, 15, 0.1), 0 12px 20px rgba(2, 2, 15, 0.15);animation:fade-in-right 300ms ease-in-out}:host(.mobile){width:100%;max-width:100%;animation:fade-in-up 300ms ease-in-out}:host(.vega-page-notification-fade-out){opacity:0;animation:fade-out 300ms ease-in-out}:host vega-icon{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1))}:host .vega-page-notification-prefix{display:flex}:host(.mobile) .vega-page-notification-prefix{padding-top:4px}:host .vega-page-notification-content{flex:1 1 0%;overflow:auto}:host .vega-page-notification-close-btn{cursor:pointer;display:inline-flex;margin-top:4px}:host(.mobile) .vega-page-notification-close-btn{padding:2px}:host .vega-page-notification-actions-container{display:flex;align-items:flex-end;flex-wrap:wrap;gap:16px;justify-content:flex-end;margin-top:24px}:host(.mobile) .vega-page-notification-actions-container{margin-top:16px}:host .vega-page-notification-title{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-page-notification-message{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;overflow-wrap:break-word;margin-top:2px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));border:2px solid rgba(var(--v-text-page-notification-content, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.success){background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.warning){background-color:rgba(var(--v-bg-status-warning, 255, 220, 131, 1))}:host(.error){background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.info){background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1))}.vega-page-notification-list{display:flex;flex-direction:column;align-items:flex-end;position:fixed}.vega-page-notification-list-topRight{top:24px;right:24px}.vega-page-notification-list-bottom{left:0px;right:0px;padding-left:16px;padding-right:16px;align-items:center;bottom:0px}@keyframes fade-in-right{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:none}}@keyframes fade-in-up{from{opacity:0;transform:translateY(100%)}to{opacity:1;transform:none}}@keyframes fade-out{from{opacity:1}to{opacity:0}}';var v=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const b=class{constructor(i){t(this,i),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f}render(){return i(e,null,i("slot",null))}get host(){return n(this)}};v([c()],b.prototype,"globalSlimmers",void 0),v([g()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=":host{position:fixed;display:flex;flex-direction:column;align-items:flex-end}:host(.vega-page-notification-list-topRight){top:24px;right:24px}:host(.vega-page-notification-list-bottom){align-items:center;padding-left:16px;padding-right:16px;left:0px;right:0px;bottom:0px}";export{d as vega_page_notification,b as vega_page_notification_list}
|