@globalpayments/vega 2.67.0 → 2.68.1
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-ab28f910.js → app-globals-f7106a22.js} +15 -14
- package/dist/cjs/{child-nodes-event-prevent-slimmer-eb803b14.js → child-nodes-event-prevent-slimmer-f8840f1b.js} +1 -1
- package/dist/cjs/{code-block-ab97a0a0.js → code-block-39074880.js} +514 -319
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-5630341e.js → component-value-history-controller-slimmer.abstract-ddedf543.js} +2 -2
- package/dist/cjs/{design-token-847739f1.js → design-token-e14a4e66.js} +1 -1
- package/dist/cjs/{dto-renderer-manager-d0f0f2c0.js → dto-renderer-manager-b7969d6c.js} +1587 -1563
- package/dist/cjs/{element-appender-slimmer-aead9bbb.js → element-appender-slimmer-7ee27ab3.js} +5 -5
- package/dist/cjs/{event-emit-slimmer-d21a0935.js → event-emit-slimmer-7afe8d78.js} +1 -1
- package/dist/cjs/{token-extension-aa8d5cce.js → function-extension-f0e845f2.js} +1019 -96
- package/dist/cjs/{image-annotation-action-d84de785.js → image-annotation-action-7f0626c8.js} +15 -25
- package/dist/cjs/index-58ea899e.js +2 -2
- package/dist/cjs/index.cjs.js +36 -24
- package/dist/cjs/{internal-vega-event-manager-4d1ce667.js → internal-vega-event-manager-45d451de.js} +5 -2
- package/dist/cjs/{language-extension-d257e65d.js → language-extension-d0103d1a.js} +5 -5
- package/dist/cjs/loader.cjs.js +8 -8
- package/dist/cjs/{public-rules-d2b9b8f0.js → public-rules-8b67eaba.js} +3 -3
- package/dist/cjs/{range-d610028e.js → range-002671b6.js} +1 -1
- package/dist/cjs/{responsive-format-facade-71e7b74c.js → responsive-format-facade-347db035.js} +3 -3
- package/dist/cjs/{rich-text-editor-required-rule-a8fe5f50.js → rich-text-editor-required-rule-5392bd8a.js} +1 -1
- package/dist/cjs/{style-formatter-6facb42b.js → style-formatter-0a09f0dd.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +7 -7
- package/dist/cjs/vega-app-header-button.cjs.entry.js +8 -8
- package/dist/cjs/vega-banner.cjs.entry.js +2 -2
- package/dist/cjs/vega-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-circle.cjs.entry.js +9 -9
- 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 +8 -8
- package/dist/cjs/vega-calendar_4.cjs.entry.js +313 -273
- package/dist/cjs/vega-card.cjs.entry.js +7 -7
- package/dist/cjs/vega-carousel.cjs.entry.js +7 -7
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-chip.cjs.entry.js +9 -9
- 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-combo-box.cjs.entry.js +3 -3
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-dialog_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-divider.cjs.entry.js +7 -7
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +9 -9
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +24 -5
- package/dist/cjs/vega-file-uploader.cjs.entry.js +2 -2
- package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -6
- package/dist/cjs/vega-flex.cjs.entry.js +8 -8
- package/dist/cjs/vega-font.cjs.entry.js +7 -7
- package/dist/cjs/vega-form.cjs.entry.js +3 -3
- package/dist/cjs/vega-grid.cjs.entry.js +7 -7
- package/dist/cjs/vega-icon.cjs.entry.js +6 -6
- package/dist/cjs/vega-image-uploader.cjs.entry.js +8 -8
- 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 +6 -6
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +38 -14
- package/dist/cjs/vega-input.cjs.entry.js +14 -3
- package/dist/cjs/vega-item-toggle.cjs.entry.js +2 -2
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +11 -11
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +7 -7
- package/dist/cjs/vega-popover_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +2 -2
- package/dist/cjs/vega-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +93 -16
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +107 -54
- package/dist/cjs/vega-segment-control.cjs.entry.js +2 -2
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +10 -10
- package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
- 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_8.cjs.entry.js → vega-table_11.cjs.entry.js} +750 -323
- package/dist/cjs/vega-textarea.cjs.entry.js +24 -4
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
- package/dist/cjs/vega.cjs.js +8 -8
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/calendar-event-sorter.js +3 -3
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-item-renderer.js +1 -1
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/day-view-timed-event-layout-column.js +3 -1
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/vega-calendar-day-event-layout-renderer.js +4 -4
- package/dist/collection/components/vega-calendar/vega-calendar-event/slimmers/renderers/vega-calendar-event-renderer.js +3 -4
- package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.js +11 -3
- package/dist/collection/components/vega-field-label/vega-field-label.js +42 -0
- package/dist/collection/components/vega-input/vega-input.js +48 -2
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.js +16 -5
- package/dist/collection/components/vega-input-select/vega-input-select.css +2 -44
- package/dist/collection/components/vega-input-select/vega-input-select.js +81 -1
- package/dist/collection/components/vega-rich-text-content/slimmers/controllers/vega-rich-text-content-extensions-styles-controller.js +60 -0
- package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +7 -1
- package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +17 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor-registry.js +61 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor.abstract.js +5 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.js +30 -6
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +10 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-or-decorator-node-strategy.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.js +28 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/paste-content-action.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/update-cursor-position-action.js +5 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/annotation-style.js +87 -0
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +27 -9
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +1 -12
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +14 -5
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +11 -0
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +7 -37
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +14 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +19 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +44 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +51 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-interceptor/prevent-new-paragraph-interceptor.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-interceptor/prevent-paste-content-interceptor.js +25 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/function-block-insert-paragraph-strategy.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/insert-function-block-strategy.js +99 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/paste-plain-text-strategy.js +68 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/actions/insert-function-block-action.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/actions/paste-plain-text-action.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +97 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.js +73 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.js +69 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +49 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-content-strategy.js +27 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-logic-control-block-strategy.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +75 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-block-renderer.js +38 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +71 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/logic-control-block-renderer.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/span-to-token-node-strategy.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node-renderer.js +5 -6
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/public-api.js +8 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/delete-selected-nodes-controller.js +9 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.js +0 -12
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +12 -10
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bold-toolbar-button-slimmer.js +2 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +30 -5
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/clear-style-toolbar-button-slimmer.js +1 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.js +10 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-toolbar-button-slimmer.js +2 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/horizontal-alignment-toolbar-button-slimmer.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +4 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/italic-toolbar-button-slimmer.js +2 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/less-indent-toolbar-button-slimmer.js +1 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.js +1 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/more-indent-toolbar-button-slimmer.js +1 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/strikethrough-toolbar-button-slimmer.js +2 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-color-toolbar-button-slimmer.js +2 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +2 -5
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/underline-toolbar-button-slimmer.js +2 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/visual-mode-toolbar-button-slimmer.abstract.js +11 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +4 -1
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.js +32 -2
- package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-delete-node-content-strategy.test.js +69 -0
- package/dist/collection/components/vega-rich-text-editor/test/dto/annotation-style.test.js +70 -0
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.css +3 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +1 -1
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-children-controller.js +25 -1
- package/dist/collection/components/vega-table/vega-table-foot/slimmers/controllers/vega-table-foot-state-controller.js +67 -0
- package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.css +34 -0
- package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.js +65 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/controllers/vega-table-foot-cell-state-controller.js +43 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.js +32 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.css +116 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +130 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/controllers/vega-table-foot-row-state-controller.js +77 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.js +41 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.css +52 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.js +71 -0
- package/dist/collection/components/vega-table/vega-table.css +12 -1
- package/dist/collection/components/vega-table/vega-table.js +1 -1
- package/dist/collection/components/vega-textarea/vega-textarea.js +88 -2
- package/dist/collection/global/scripts/before-vega-load.js +2 -0
- package/dist/collection/helpers/calendar/calendar-date-time.js +136 -0
- package/dist/collection/helpers/calendar/calendar-date.js +10 -4
- package/dist/collection/helpers/calendar/calendar-event.js +38 -193
- package/dist/collection/helpers/calendar/calendar-time.js +120 -0
- package/dist/collection/helpers/calendar/index.js +2 -0
- package/dist/collection/helpers/calendar/test/calendar-date-time.test.js +27 -0
- package/dist/collection/helpers/calendar/test/calendar-event.test.js +24 -22
- package/dist/collection/helpers/calendar/test/calendar-period/day-period.test.js +2 -2
- package/dist/collection/helpers/calendar/test/calendar-period/month-period.test.js +2 -2
- package/dist/collection/helpers/calendar/test/calendar-period/week-period.test.js +6 -6
- package/dist/collection/helpers/calendar/test/calendar-time.test.js +45 -0
- package/dist/collection/helpers/calendar/test/utils.test.js +1 -29
- package/dist/collection/helpers/calendar/utils.js +0 -66
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +5 -2
- package/dist/collection/helpers/rte-manager/dto-action-strategy-manager.js +2 -0
- package/dist/esm/{app-globals-37a60cc1.js → app-globals-2f689986.js} +6 -5
- package/dist/esm/{child-nodes-event-prevent-slimmer-735cb880.js → child-nodes-event-prevent-slimmer-76331524.js} +1 -1
- package/dist/esm/{code-block-11b2bc1c.js → code-block-e8839202.js} +511 -318
- package/dist/esm/{component-value-history-controller-slimmer.abstract-16c5cb96.js → component-value-history-controller-slimmer.abstract-c6f94113.js} +2 -2
- package/dist/esm/{design-token-297dc528.js → design-token-e9e6b011.js} +1 -1
- package/dist/esm/{dto-renderer-manager-a1a3b6d2.js → dto-renderer-manager-7abc53bf.js} +1587 -1565
- package/dist/esm/{element-appender-slimmer-f7233708.js → element-appender-slimmer-8dbc8387.js} +2 -2
- package/dist/esm/{event-emit-slimmer-28fd360c.js → event-emit-slimmer-4e28e9f8.js} +1 -1
- package/dist/esm/{token-extension-b690953f.js → function-extension-eb1d062f.js} +1018 -97
- package/dist/esm/{image-annotation-action-fc46c920.js → image-annotation-action-7957653a.js} +14 -24
- package/dist/esm/index-090d31ca.js +2 -2
- package/dist/esm/index.js +9 -9
- package/dist/esm/{internal-vega-event-manager-a5a5938d.js → internal-vega-event-manager-516aa721.js} +5 -2
- package/dist/esm/{language-extension-314a2b18.js → language-extension-3331131f.js} +3 -3
- package/dist/esm/loader.js +8 -8
- package/dist/esm/{public-rules-c6a6946d.js → public-rules-e613dead.js} +3 -3
- package/dist/esm/{range-b78254de.js → range-adf206fd.js} +1 -1
- package/dist/esm/{responsive-format-facade-a41e1be7.js → responsive-format-facade-b0712993.js} +3 -3
- package/dist/esm/{rich-text-editor-required-rule-d50c24da.js → rich-text-editor-required-rule-43857573.js} +1 -1
- package/dist/esm/{style-formatter-f7effaac.js → style-formatter-a20a1ef4.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +7 -7
- package/dist/esm/vega-app-header-button.entry.js +8 -8
- package/dist/esm/vega-banner.entry.js +2 -2
- package/dist/esm/vega-box.entry.js +8 -8
- package/dist/esm/vega-breadcrumb.entry.js +3 -3
- package/dist/esm/vega-button-circle.entry.js +9 -9
- package/dist/esm/vega-button-group_2.entry.js +3 -3
- package/dist/esm/vega-button-link.entry.js +3 -3
- package/dist/esm/vega-button.entry.js +8 -8
- package/dist/esm/vega-calendar_4.entry.js +313 -273
- package/dist/esm/vega-card.entry.js +7 -7
- package/dist/esm/vega-carousel.entry.js +7 -7
- package/dist/esm/vega-checkbox_2.entry.js +3 -3
- package/dist/esm/vega-chip.entry.js +9 -9
- package/dist/esm/vega-code-block.entry.js +6 -6
- package/dist/esm/vega-color-picker.entry.js +2 -2
- package/dist/esm/vega-combo-box.entry.js +3 -3
- package/dist/esm/vega-date-picker_2.entry.js +8 -8
- package/dist/esm/vega-dialog_2.entry.js +9 -9
- package/dist/esm/vega-divider.entry.js +7 -7
- package/dist/esm/vega-dropdown_5.entry.js +9 -9
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +24 -5
- package/dist/esm/vega-file-uploader.entry.js +2 -2
- package/dist/esm/vega-flag-icon.entry.js +6 -6
- package/dist/esm/vega-flex.entry.js +8 -8
- package/dist/esm/vega-font.entry.js +7 -7
- package/dist/esm/vega-form.entry.js +3 -3
- package/dist/esm/vega-grid.entry.js +7 -7
- package/dist/esm/vega-icon.entry.js +6 -6
- package/dist/esm/vega-image-uploader.entry.js +7 -7
- package/dist/esm/vega-input-credit-card.entry.js +3 -3
- package/dist/esm/vega-input-numeric.entry.js +3 -3
- package/dist/esm/vega-input-passcode.entry.js +3 -3
- package/dist/esm/vega-input-phone-number.entry.js +6 -6
- package/dist/esm/vega-input-range.entry.js +3 -3
- package/dist/esm/vega-input-select.entry.js +38 -14
- package/dist/esm/vega-input.entry.js +14 -3
- package/dist/esm/vega-item-toggle.entry.js +2 -2
- package/dist/esm/vega-left-nav_5.entry.js +7 -7
- package/dist/esm/vega-loader-wrapper_2.entry.js +6 -6
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination.entry.js +7 -7
- package/dist/esm/vega-popover_2.entry.js +9 -9
- package/dist/esm/vega-progress-tracker.entry.js +2 -2
- package/dist/esm/vega-radio_2.entry.js +3 -3
- package/dist/esm/vega-rich-text-content.entry.js +93 -16
- package/dist/esm/vega-rich-text-editor_4.entry.js +107 -54
- package/dist/esm/vega-segment-control.entry.js +2 -2
- package/dist/esm/vega-selection-chip_2.entry.js +8 -8
- package/dist/esm/vega-selection-tile_2.entry.js +3 -3
- package/dist/esm/vega-sidenav_3.entry.js +6 -6
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/vega-stepper.entry.js +3 -3
- package/dist/esm/vega-tab-group_2.entry.js +3 -3
- package/dist/esm/{vega-table_8.entry.js → vega-table_11.entry.js} +745 -321
- package/dist/esm/vega-textarea.entry.js +25 -5
- package/dist/esm/vega-time-picker_2.entry.js +9 -9
- package/dist/esm/vega-toggle-switch.entry.js +2 -2
- package/dist/esm/vega-tooltip_2.entry.js +7 -7
- package/dist/esm/vega.js +8 -8
- package/dist/sri/vega-sri-manifest.json +273 -273
- package/dist/types/components/vega-calendar/slimmers/day-view/renderers/timed-event/vega-calendar-day-event-layout-renderer.d.ts +1 -1
- package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.d.ts +1 -0
- package/dist/types/components/vega-field-label/types.d.ts +12 -0
- package/dist/types/components/vega-field-label/vega-field-label.d.ts +13 -1
- package/dist/types/components/vega-input/vega-input.d.ts +14 -2
- package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.d.ts +3 -0
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +25 -0
- package/dist/types/components/vega-rich-text-content/slimmers/controllers/vega-rich-text-content-extensions-styles-controller.d.ts +26 -0
- package/dist/types/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-content/vega-rich-text-content.d.ts +7 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor-registry.d.ts +42 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor.abstract.d.ts +26 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.d.ts +9 -2
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.d.ts +7 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/dto/actions/paste-content-action.d.ts +20 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/update-cursor-position-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation-style.d.ts +46 -0
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +10 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +3 -3
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +6 -0
- package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +0 -11
- package/dist/types/components/vega-rich-text-editor/extensions/base-extension-renderer.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +19 -3
- package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +36 -3
- package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-interceptor/prevent-new-paragraph-interceptor.d.ts +25 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-interceptor/prevent-paste-content-interceptor.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/function-block-insert-paragraph-strategy.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/insert-function-block-strategy.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/paste-plain-text-strategy.d.ts +26 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/actions/insert-function-block-action.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/actions/paste-plain-text-action.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +58 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.d.ts +55 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.d.ts +48 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-content-strategy.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-logic-control-block-strategy.d.ts +32 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/renderers/function-block-renderer.d.ts +25 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.d.ts +33 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/renderers/logic-control-block-renderer.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/extensions/languages/language-extension.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-extension.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node-renderer.d.ts +3 -4
- package/dist/types/components/vega-rich-text-editor/interface.d.ts +8 -2
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +8 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.d.ts +2 -11
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/state-entity-rendering-registry.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/visual-mode-toolbar-button-slimmer.abstract.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-delete-node-content-strategy.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/test/dto/annotation-style.test.d.ts +1 -0
- package/dist/types/components/vega-table/interface.d.ts +4 -0
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-children-controller.d.ts +9 -1
- package/dist/types/components/vega-table/vega-table-foot/slimmers/controllers/vega-table-foot-state-controller.d.ts +22 -0
- package/dist/types/components/vega-table/vega-table-foot/types.d.ts +4 -0
- package/dist/types/components/vega-table/vega-table-foot/vega-table-foot.d.ts +23 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/controllers/vega-table-foot-cell-state-controller.d.ts +10 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.d.ts +8 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.d.ts +45 -0
- package/dist/types/components/vega-table/vega-table-foot-row/slimmers/controllers/vega-table-foot-row-state-controller.d.ts +20 -0
- package/dist/types/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.d.ts +11 -0
- package/dist/types/components/vega-table/vega-table-foot-row/types.d.ts +4 -0
- package/dist/types/components/vega-table/vega-table-foot-row/vega-table-foot-row.d.ts +41 -0
- package/dist/types/components/vega-textarea/vega-textarea.d.ts +26 -0
- package/dist/types/components.d.ts +134 -3
- package/dist/types/helpers/calendar/calendar-date-time.d.ts +76 -0
- package/dist/types/helpers/calendar/calendar-event.d.ts +18 -57
- package/dist/types/helpers/calendar/calendar-time.d.ts +64 -0
- package/dist/types/helpers/calendar/index.d.ts +2 -0
- package/dist/types/helpers/calendar/test/calendar-date-time.test.d.ts +1 -0
- package/dist/types/helpers/calendar/test/calendar-time.test.d.ts +1 -0
- package/dist/types/helpers/calendar/utils.d.ts +0 -25
- package/dist/types/types/components.type.d.ts +1 -1
- package/dist/types/types/public-api.d.ts +2 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-6f7d42a0.entry.js → p-00376f71.entry.js} +1 -1
- package/dist/vega/p-018d70a5.js +1 -0
- package/dist/vega/p-0849f85e.js +1 -0
- package/dist/vega/{p-b431f9d5.entry.js → p-0a55f984.entry.js} +1 -1
- package/dist/vega/p-0f7dec29.entry.js +1 -0
- package/dist/vega/{p-47cae62d.entry.js → p-113d305b.entry.js} +1 -1
- package/dist/vega/{p-015cdbe7.entry.js → p-115b42e6.entry.js} +1 -1
- package/dist/vega/p-16358fec.entry.js +1 -0
- package/dist/vega/{p-af5bfe34.js → p-16d68187.js} +1 -1
- package/dist/vega/{p-92a22562.entry.js → p-18e8c54a.entry.js} +1 -1
- package/dist/vega/{p-6f6ccf67.entry.js → p-1922303e.entry.js} +1 -1
- package/dist/vega/{p-74d61782.entry.js → p-19256107.entry.js} +1 -1
- package/dist/vega/{p-59298f5e.entry.js → p-1dcb1fcd.entry.js} +2 -2
- package/dist/vega/{p-7f69081b.entry.js → p-1dd7f8b2.entry.js} +1 -1
- package/dist/vega/{p-d006e732.entry.js → p-22fe8c61.entry.js} +1 -1
- package/dist/vega/{p-524693d8.entry.js → p-238afe1b.entry.js} +1 -1
- package/dist/vega/p-240d9d35.entry.js +1 -0
- package/dist/vega/{p-b82d3915.entry.js → p-24419ebe.entry.js} +1 -1
- package/dist/vega/p-2478f65e.js +1 -0
- package/dist/vega/{p-358e9800.entry.js → p-2c945862.entry.js} +1 -1
- package/dist/vega/{p-5f58d1da.entry.js → p-2e32fbe6.entry.js} +1 -1
- package/dist/vega/p-2f04d2ac.js +1 -0
- package/dist/vega/{p-a73dc4b3.entry.js → p-30a8d9d6.entry.js} +1 -1
- package/dist/vega/{p-e6cccee4.js → p-369810ae.js} +1 -1
- package/dist/vega/p-3ad87199.entry.js +1 -0
- package/dist/vega/{p-fe2e859f.entry.js → p-3b800f1b.entry.js} +1 -1
- package/dist/vega/p-437f865f.js +1 -0
- package/dist/vega/{p-de624f7d.entry.js → p-48bc03fa.entry.js} +1 -1
- package/dist/vega/{p-46830028.entry.js → p-54ddd06f.entry.js} +1 -1
- package/dist/vega/{p-5a0524ab.entry.js → p-56636a58.entry.js} +1 -1
- package/dist/vega/{p-fc8c5869.entry.js → p-56f77466.entry.js} +1 -1
- package/dist/vega/p-5a555092.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-ab1001f5.entry.js → p-61d9cdf9.entry.js} +1 -1
- package/dist/vega/{p-39b9c57b.entry.js → p-626246b4.entry.js} +1 -1
- package/dist/vega/p-6609d87e.entry.js +1 -0
- package/dist/vega/p-69d27eaf.entry.js +1 -0
- package/dist/vega/{p-7efb5ebe.entry.js → p-705dad87.entry.js} +1 -1
- package/dist/vega/{p-8d574fbd.entry.js → p-75b5894f.entry.js} +1 -1
- package/dist/vega/{p-00071542.entry.js → p-76b1dae4.entry.js} +1 -1
- package/dist/vega/{p-54b62ecf.js → p-7747c163.js} +1 -1
- package/dist/vega/{p-0ed53cce.entry.js → p-787caad3.entry.js} +1 -1
- package/dist/vega/{p-129c0ce1.js → p-79e6e12c.js} +1 -1
- package/dist/vega/{p-cc519f53.entry.js → p-7dde3be9.entry.js} +1 -1
- package/dist/vega/p-82ef2de0.entry.js +1 -0
- package/dist/vega/{p-5e32866d.entry.js → p-83a50ac2.entry.js} +1 -1
- package/dist/vega/p-8506e8c3.js +1 -0
- package/dist/vega/{p-47fa359b.js → p-85407fb9.js} +1 -1
- package/dist/vega/{p-892cbe7c.entry.js → p-880569ec.entry.js} +1 -1
- package/dist/vega/{p-0113a83c.entry.js → p-8dba59a6.entry.js} +1 -1
- package/dist/vega/p-94e167b8.entry.js +1 -0
- package/dist/vega/{p-b2aaab66.entry.js → p-98fb9eaa.entry.js} +1 -1
- package/dist/vega/{p-3288a65b.entry.js → p-99bf5993.entry.js} +1 -1
- package/dist/vega/p-a211ae63.js +1 -0
- package/dist/vega/{p-fef846d5.entry.js → p-a2506cb5.entry.js} +1 -1
- package/dist/vega/{p-4e33fff6.entry.js → p-a6fb5a40.entry.js} +1 -1
- package/dist/vega/{p-bee1cc34.entry.js → p-b5060e84.entry.js} +1 -1
- package/dist/vega/{p-616cd622.entry.js → p-b78670c9.entry.js} +1 -1
- package/dist/vega/{p-d5761532.entry.js → p-b8558278.entry.js} +1 -1
- package/dist/vega/{p-8d655fd2.entry.js → p-bb0f2b5f.entry.js} +1 -1
- package/dist/vega/{p-a7631c6b.js → p-bb37a401.js} +1 -1
- package/dist/vega/p-bccee21e.js +1 -0
- package/dist/vega/{p-2553031f.entry.js → p-bd0e55a2.entry.js} +1 -1
- package/dist/vega/{p-65693321.entry.js → p-c0223a17.entry.js} +1 -1
- package/dist/vega/{p-2d430dc4.entry.js → p-c26332ae.entry.js} +1 -1
- package/dist/vega/{p-7f9ec104.entry.js → p-c54148fb.entry.js} +1 -1
- package/dist/vega/{p-276b1163.entry.js → p-d3905af1.entry.js} +2 -2
- package/dist/vega/p-d4893487.js +1 -0
- package/dist/vega/{p-d1dacaeb.entry.js → p-d67200e8.entry.js} +1 -1
- package/dist/vega/{p-725f0a2c.js → p-db57dddc.js} +1 -1
- package/dist/vega/{p-ed8bc4f0.entry.js → p-de02f404.entry.js} +1 -1
- package/dist/vega/{p-d4452dbc.entry.js → p-de8c5fae.entry.js} +1 -1
- package/dist/vega/{p-7b145620.js → p-de97c6d9.js} +1 -1
- package/dist/vega/{p-34800282.entry.js → p-e0979451.entry.js} +1 -1
- package/dist/vega/{p-1a3cb65e.entry.js → p-e6351dab.entry.js} +1 -1
- package/dist/vega/{p-8d096fea.entry.js → p-f0fb3fdd.entry.js} +1 -1
- package/dist/vega/{p-ea05a2fc.entry.js → p-f3399ef1.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-019f7f95.js +0 -1
- package/dist/vega/p-03a1e82e.entry.js +0 -1
- package/dist/vega/p-0d1eca78.entry.js +0 -1
- package/dist/vega/p-16370cfb.js +0 -1
- package/dist/vega/p-3a7f177a.entry.js +0 -1
- package/dist/vega/p-41c3fcb4.js +0 -1
- package/dist/vega/p-81105691.entry.js +0 -1
- package/dist/vega/p-822c6092.js +0 -1
- package/dist/vega/p-8edf3513.js +0 -1
- package/dist/vega/p-a1b7a179.entry.js +0 -1
- package/dist/vega/p-ab8f99e9.entry.js +0 -1
- package/dist/vega/p-bf7f755b.js +0 -1
- package/dist/vega/p-bf9476cd.entry.js +0 -1
- package/dist/vega/p-c6ce2869.js +0 -1
- package/dist/vega/p-d0e6454e.entry.js +0 -1
- package/dist/vega/p-d88e88a7.js +0 -1
- package/dist/vega/p-f360c9ba.js +0 -1
- package/dist/vega/p-ff3bb4e2.entry.js +0 -1
|
@@ -10,11 +10,11 @@ const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-facto
|
|
|
10
10
|
const internalIconManager = require('./internal-icon-manager-32f9ed63.js');
|
|
11
11
|
const accessibility = require('./accessibility-bfa227f6.js');
|
|
12
12
|
const date = require('./date-0a6bb035.js');
|
|
13
|
-
const eventEmitSlimmer = require('./event-emit-slimmer-
|
|
13
|
+
const eventEmitSlimmer = require('./event-emit-slimmer-7afe8d78.js');
|
|
14
14
|
const translation = require('./translation-f5adcb9f.js');
|
|
15
15
|
const stateBackgroundColorFormatter = require('./state-background-color-formatter-aa5570f6.js');
|
|
16
16
|
const typeGuard = require('./type-guard-f12b5bae.js');
|
|
17
|
-
const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-
|
|
17
|
+
const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-f8840f1b.js');
|
|
18
18
|
const vegaInternalEventId = require('./vega-internal-event-id-6d4a2c53.js');
|
|
19
19
|
const observer = require('./observer-f49483e8.js');
|
|
20
20
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
@@ -30,7 +30,7 @@ const subStateObserverSlimmer = require('./sub-state-observer-slimmer-73aecfff.j
|
|
|
30
30
|
const pixel = require('./pixel-98f2a10c.js');
|
|
31
31
|
const ui = require('./ui-9e181079.js');
|
|
32
32
|
require('./dynamic-slimmer-f31fdfd7.js');
|
|
33
|
-
require('./internal-vega-event-manager-
|
|
33
|
+
require('./internal-vega-event-manager-45d451de.js');
|
|
34
34
|
require('./try-get-document-c0ebd39a.js');
|
|
35
35
|
require('./static-subject-title-5829a298.js');
|
|
36
36
|
require('./breakpoints-ebde4837.js');
|
|
@@ -752,70 +752,6 @@ var WeekdayLongNames;
|
|
|
752
752
|
WeekdayLongNames["fri"] = "Friday";
|
|
753
753
|
WeekdayLongNames["sat"] = "Saturday";
|
|
754
754
|
})(WeekdayLongNames || (WeekdayLongNames = {}));
|
|
755
|
-
/**
|
|
756
|
-
* Format display time
|
|
757
|
-
*
|
|
758
|
-
* @param {TimeFormat} timeFormat - The time format (24-hour or 12-hour)
|
|
759
|
-
* @param {string} timeString - The time string to format
|
|
760
|
-
* @returns {string} - The formatted time string
|
|
761
|
-
*/
|
|
762
|
-
const formatDisplayTime = (timeFormat, timeString) => {
|
|
763
|
-
const [hour, minutes] = timeString.split(':');
|
|
764
|
-
if (timeFormat === '24-hour') {
|
|
765
|
-
return `${hour.padStart(2, '0')}:${minutes.padStart(2, '0')}`;
|
|
766
|
-
}
|
|
767
|
-
else {
|
|
768
|
-
const hourNum = Number(hour);
|
|
769
|
-
const amPm = hourNum >= 12 ? 'pm' : 'am';
|
|
770
|
-
const minutesResult = minutes.padStart(2, '0');
|
|
771
|
-
if (hourNum > 12) {
|
|
772
|
-
return `${hourNum - 12}:${minutesResult} ${translation.VegaInternalTranslation.t('pm')}`;
|
|
773
|
-
}
|
|
774
|
-
else if (hourNum === 0) {
|
|
775
|
-
return `12:${minutesResult} ${translation.VegaInternalTranslation.t('am')}`;
|
|
776
|
-
}
|
|
777
|
-
else {
|
|
778
|
-
return `${hourNum}:${minutesResult} ${translation.VegaInternalTranslation.t(amPm)}`;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
/**
|
|
783
|
-
* Gets current date parts in the specified timezone
|
|
784
|
-
*
|
|
785
|
-
* @param {string} timezone - The IANA timezone identifier
|
|
786
|
-
* @param {Date} date - The date to get parts for
|
|
787
|
-
* @returns {DateParts} - An object with year, month, and date properties for the specified timezone
|
|
788
|
-
*/
|
|
789
|
-
function getCurrentDatePartsInTimezone(timezone, date) {
|
|
790
|
-
if (timezone && timezone !== getSystemTimezone()) {
|
|
791
|
-
try {
|
|
792
|
-
const formatter = new Intl.DateTimeFormat([], {
|
|
793
|
-
timeZone: timezone,
|
|
794
|
-
year: 'numeric',
|
|
795
|
-
month: '2-digit',
|
|
796
|
-
day: '2-digit',
|
|
797
|
-
});
|
|
798
|
-
const parts = formatter.formatToParts(date);
|
|
799
|
-
const yearPart = parts.find((part) => part.type === 'year');
|
|
800
|
-
const monthPart = parts.find((part) => part.type === 'month');
|
|
801
|
-
const dayPart = parts.find((part) => part.type === 'day');
|
|
802
|
-
if (yearPart && monthPart && dayPart) {
|
|
803
|
-
const year = parseInt(yearPart.value, 10);
|
|
804
|
-
const month = parseInt(monthPart.value, 10);
|
|
805
|
-
const date = parseInt(dayPart.value, 10);
|
|
806
|
-
return { year, month, date };
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
catch (_a) {
|
|
810
|
-
globalSlimmerRegistry.LogUtility.warn('Invalid timezone:', timezone);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
return {
|
|
814
|
-
year: date.getFullYear(),
|
|
815
|
-
month: date.getMonth() + 1,
|
|
816
|
-
date: date.getDate(),
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
755
|
/**
|
|
820
756
|
* Get the system timezone identifier
|
|
821
757
|
*
|
|
@@ -904,6 +840,259 @@ class DayViewGenerator extends CalendarViewGenerator {
|
|
|
904
840
|
}
|
|
905
841
|
}
|
|
906
842
|
|
|
843
|
+
/**
|
|
844
|
+
* CalendarTime represents hours/minutes in 24-hour format and centralizes parsing/formatting logic.
|
|
845
|
+
*/
|
|
846
|
+
class CalendarTime {
|
|
847
|
+
constructor(hours, minutes) {
|
|
848
|
+
this._hours = hours;
|
|
849
|
+
this._minutes = minutes;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Parse a raw time string into a CalendarTime instance.
|
|
853
|
+
*
|
|
854
|
+
* @param {string} rawTime - Source time value such as "9:00" or "9am".
|
|
855
|
+
* @returns {CalendarTime} Parsed time.
|
|
856
|
+
*/
|
|
857
|
+
static fromString(rawTime) {
|
|
858
|
+
const normalized = this.convertTimeTo24Hour(rawTime);
|
|
859
|
+
const [hourPart, minutePart] = normalized.split(':');
|
|
860
|
+
return new CalendarTime(Number(hourPart), Number(minutePart));
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Build a CalendarTime from a Date instance while preserving hours/minutes.
|
|
864
|
+
*
|
|
865
|
+
* @param {Date} date - The source date.
|
|
866
|
+
* @returns {CalendarTime} Time representation extracted from the date.
|
|
867
|
+
*/
|
|
868
|
+
static fromDate(date) {
|
|
869
|
+
return new CalendarTime(date.getHours(), date.getMinutes());
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Calculate the duration in the requested precision between two CalendarTime values, accounting for overnight spans.
|
|
873
|
+
*
|
|
874
|
+
* @param {CalendarTime} start - Start time of the interval.
|
|
875
|
+
* @param {CalendarTime} end - End time of the interval.
|
|
876
|
+
* @param {'minutes' | 'hours'} precision - Desired unit of measure for the result (defaults to minutes).
|
|
877
|
+
* @returns {number} Duration expressed in the requested precision.
|
|
878
|
+
*/
|
|
879
|
+
static calculateDuration(start, end, precision = 'minutes') {
|
|
880
|
+
const startMinutes = start.totalMinutes;
|
|
881
|
+
let endMinutes = end.totalMinutes;
|
|
882
|
+
if (end.hours === 0 && start.hours !== 0) {
|
|
883
|
+
endMinutes += 24 * 60;
|
|
884
|
+
}
|
|
885
|
+
const durationMinutes = endMinutes - startMinutes;
|
|
886
|
+
return precision === 'hours' ? durationMinutes / 60 : durationMinutes;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Normalize various time inputs (e.g. 9am, 9:30 PM) to a 24-hour HH:mm string.
|
|
890
|
+
*
|
|
891
|
+
* @param {string} timeString - User supplied time value.
|
|
892
|
+
* @returns {string} 24-hour formatted string.
|
|
893
|
+
*/
|
|
894
|
+
static convertTimeTo24Hour(timeString) {
|
|
895
|
+
const normalized = timeString.toLocaleLowerCase();
|
|
896
|
+
if (normalized.includes('am') || normalized.includes('pm')) {
|
|
897
|
+
const isAm = normalized.includes('am');
|
|
898
|
+
const cleaned = normalized.replace('am', '').replace('pm', '').trim();
|
|
899
|
+
const [rawHour, rawMinutes] = cleaned.split(':');
|
|
900
|
+
const minutes = rawMinutes.padStart(2, '0');
|
|
901
|
+
if (isAm) {
|
|
902
|
+
return `${rawHour === '12' ? '00' : rawHour}:${minutes}`;
|
|
903
|
+
}
|
|
904
|
+
else {
|
|
905
|
+
const convertedHour = rawHour === '12' ? '12' : `${Number(rawHour) + 12}`;
|
|
906
|
+
return `${convertedHour}:${minutes}`;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
return timeString;
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* Hour component in 24-hour clock.
|
|
913
|
+
*
|
|
914
|
+
* @returns {number} Hours between 0-23.
|
|
915
|
+
*/
|
|
916
|
+
get hours() {
|
|
917
|
+
return this._hours;
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Minute component.
|
|
921
|
+
*
|
|
922
|
+
* @returns {number} Minutes between 0-59.
|
|
923
|
+
*/
|
|
924
|
+
get minutes() {
|
|
925
|
+
return this._minutes;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Total minutes elapsed since midnight for this time value.
|
|
929
|
+
*
|
|
930
|
+
* @returns {number} Minutes from 00:00.
|
|
931
|
+
*/
|
|
932
|
+
get totalMinutes() {
|
|
933
|
+
return this._hours * 60 + this._minutes;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Format the time into a string using a simple formatter.
|
|
937
|
+
*
|
|
938
|
+
* @param {TimeStringFormat} format - time string Format. Defaults to 'hh:mm'.
|
|
939
|
+
* @returns {string} Formatted time string.
|
|
940
|
+
*/
|
|
941
|
+
toString(format = 'hh:mm') {
|
|
942
|
+
const defaultHours = this._hours.toString().padStart(2, '0');
|
|
943
|
+
const defaultMinutes = this._minutes.toString().padStart(2, '0');
|
|
944
|
+
const normalizedFormat = format.toLowerCase();
|
|
945
|
+
switch (normalizedFormat) {
|
|
946
|
+
case 'hh:m':
|
|
947
|
+
return `${defaultHours}:${this._minutes}`;
|
|
948
|
+
case 'h:mm':
|
|
949
|
+
return `${this._hours}:${defaultMinutes}`;
|
|
950
|
+
case 'h:m':
|
|
951
|
+
return `${this._hours}:${this._minutes}`;
|
|
952
|
+
case '12-hour': {
|
|
953
|
+
const amPm = this._hours >= 12 ? 'pm' : 'am';
|
|
954
|
+
const hour12 = this._hours % 12 || 12;
|
|
955
|
+
return `${hour12}:${defaultMinutes} ${translation.VegaInternalTranslation.t(amPm)}`;
|
|
956
|
+
}
|
|
957
|
+
default:
|
|
958
|
+
return `${defaultHours}:${defaultMinutes}`;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* CalendarDateTime centralizes timezone-aware conversions between native Date instances and calendar helpers.
|
|
965
|
+
*/
|
|
966
|
+
class CalendarDateTime {
|
|
967
|
+
constructor(date, timezone) {
|
|
968
|
+
this.originalDate = date;
|
|
969
|
+
this.timezone = timezone;
|
|
970
|
+
this.syncDateTime();
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* Build a CalendarDateTime from a native Date while the specific timezone.
|
|
974
|
+
*
|
|
975
|
+
* @param {Date} date - The native Date object to convert.
|
|
976
|
+
* @param {string} timezone - The timezone to apply.
|
|
977
|
+
* @returns {CalendarDateTime} A timezone-aware CalendarDateTime instance.
|
|
978
|
+
*/
|
|
979
|
+
static fromDate(date, timezone) {
|
|
980
|
+
return new CalendarDateTime(date, timezone);
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Build a CalendarDateTime from a date input (Date or string) and optional time metadata.
|
|
984
|
+
*
|
|
985
|
+
* @param {string | Date} date - The input date value (string or Date).
|
|
986
|
+
* @param {CalendarDateTimeOptions} options - Additional options for time, timezone, seconds, etc.
|
|
987
|
+
* @returns {CalendarDateTime} A timezone-aware CalendarDateTime instance.
|
|
988
|
+
*/
|
|
989
|
+
static fromInitDataSource(date, options) {
|
|
990
|
+
const baseDate = new Date(date);
|
|
991
|
+
if (options.time) {
|
|
992
|
+
const calendarTime = CalendarTime.fromString(options.time);
|
|
993
|
+
baseDate.setHours(calendarTime.hours, calendarTime.minutes, 0, 0);
|
|
994
|
+
}
|
|
995
|
+
else if (options.endTimeMissing) {
|
|
996
|
+
baseDate.setHours(23, 59, 59, 0);
|
|
997
|
+
}
|
|
998
|
+
return CalendarDateTime.fromDate(baseDate, options.timezone);
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Get the CalendarDate instance representing the date portion.
|
|
1002
|
+
*
|
|
1003
|
+
* @returns {CalendarDate} The CalendarDate object.
|
|
1004
|
+
*/
|
|
1005
|
+
get calendarDate() {
|
|
1006
|
+
return this.date;
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* Get the CalendarTime instance representing the time portion.
|
|
1010
|
+
*
|
|
1011
|
+
* @returns {CalendarTime} The CalendarTime object.
|
|
1012
|
+
*/
|
|
1013
|
+
get calendarTime() {
|
|
1014
|
+
return this.time;
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Get a native Date object representing this CalendarDateTime.
|
|
1018
|
+
*
|
|
1019
|
+
* @returns {Date} The native Date object.
|
|
1020
|
+
*/
|
|
1021
|
+
toDate() {
|
|
1022
|
+
return this.date.toDate();
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Set a new timezone and update CalendarDate/CalendarTime accordingly.
|
|
1026
|
+
*
|
|
1027
|
+
* @param {string} newTimezone - The new timezone to set.
|
|
1028
|
+
*/
|
|
1029
|
+
setTimezone(newTimezone) {
|
|
1030
|
+
this.timezone = newTimezone;
|
|
1031
|
+
this.syncDateTime();
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Sync CalendarDate and CalendarTime with the current originalDate and timezone.
|
|
1035
|
+
*/
|
|
1036
|
+
syncDateTime() {
|
|
1037
|
+
const normalized = this.convertDateToTimezone(this.originalDate);
|
|
1038
|
+
this.date = new CalendarDate(normalized.getFullYear(), normalized.getMonth() + 1, normalized.getDate());
|
|
1039
|
+
this.time = CalendarTime.fromDate(normalized);
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* Convert a Date to the specific timezone.
|
|
1043
|
+
*
|
|
1044
|
+
* @param {Date} date - The date to convert.
|
|
1045
|
+
* @returns {Date} The date adjusted to the specific timezone.
|
|
1046
|
+
*/
|
|
1047
|
+
convertDateToTimezone(date) {
|
|
1048
|
+
if (this.timezone === getSystemTimezone()) {
|
|
1049
|
+
return date;
|
|
1050
|
+
}
|
|
1051
|
+
try {
|
|
1052
|
+
const formatter = new Intl.DateTimeFormat([], {
|
|
1053
|
+
timeZone: this.timezone,
|
|
1054
|
+
year: 'numeric',
|
|
1055
|
+
month: '2-digit',
|
|
1056
|
+
day: '2-digit',
|
|
1057
|
+
hour: '2-digit',
|
|
1058
|
+
minute: '2-digit',
|
|
1059
|
+
second: '2-digit',
|
|
1060
|
+
hour12: false,
|
|
1061
|
+
});
|
|
1062
|
+
const parts = formatter.formatToParts(date);
|
|
1063
|
+
const yearPart = this.findDateTimeFormatPart(parts, 'year');
|
|
1064
|
+
const monthPart = this.findDateTimeFormatPart(parts, 'month');
|
|
1065
|
+
const dayPart = this.findDateTimeFormatPart(parts, 'day');
|
|
1066
|
+
const hourPart = this.findDateTimeFormatPart(parts, 'hour');
|
|
1067
|
+
const minutePart = this.findDateTimeFormatPart(parts, 'minute');
|
|
1068
|
+
const secondPart = this.findDateTimeFormatPart(parts, 'second');
|
|
1069
|
+
if (yearPart && monthPart && dayPart && hourPart && minutePart && secondPart) {
|
|
1070
|
+
const year = parseInt(yearPart.value, 10);
|
|
1071
|
+
const month = parseInt(monthPart.value, 10);
|
|
1072
|
+
const day = parseInt(dayPart.value, 10);
|
|
1073
|
+
const hour = parseInt(hourPart.value, 10);
|
|
1074
|
+
const minute = parseInt(minutePart.value, 10);
|
|
1075
|
+
const second = parseInt(secondPart.value, 10);
|
|
1076
|
+
return new Date(year, month - 1, day, hour, minute, second);
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
catch (_a) {
|
|
1080
|
+
globalSlimmerRegistry.LogUtility.warn('Invalid timezone:', this.timezone);
|
|
1081
|
+
}
|
|
1082
|
+
return date;
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* Find a specific part in the Intl.DateTimeFormatPart array.
|
|
1086
|
+
*
|
|
1087
|
+
* @param {Intl.DateTimeFormatPart[]} parts - The array of date/time format parts.
|
|
1088
|
+
* @param {DateTimeFormatPartType} type - The type of part to find (e.g., 'year', 'month').
|
|
1089
|
+
* @returns {Intl.DateTimeFormatPart | undefined} The matching part, if found.
|
|
1090
|
+
*/
|
|
1091
|
+
findDateTimeFormatPart(parts, type) {
|
|
1092
|
+
return parts.find((part) => part.type === type);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
|
|
907
1096
|
/**
|
|
908
1097
|
* Calendar date class
|
|
909
1098
|
*/
|
|
@@ -921,8 +1110,7 @@ class CalendarDate {
|
|
|
921
1110
|
* @returns {CalendarDate} - Return a CalendarDate object
|
|
922
1111
|
*/
|
|
923
1112
|
static from(currentDate, timezone = getSystemTimezone()) {
|
|
924
|
-
|
|
925
|
-
return new CalendarDate(year, month, date);
|
|
1113
|
+
return CalendarDateTime.fromDate(currentDate, timezone).calendarDate;
|
|
926
1114
|
}
|
|
927
1115
|
/**
|
|
928
1116
|
* The year of the calendar date
|
|
@@ -964,7 +1152,13 @@ class CalendarDate {
|
|
|
964
1152
|
* @returns {boolean} - Return true if the calendar date is today. Otherwise, return false.
|
|
965
1153
|
*/
|
|
966
1154
|
isToday(timezone = getSystemTimezone()) {
|
|
967
|
-
|
|
1155
|
+
if (timezone === getSystemTimezone()) {
|
|
1156
|
+
const today = new Date();
|
|
1157
|
+
return (today.getFullYear() === this.year &&
|
|
1158
|
+
today.getMonth() + 1 === this.month &&
|
|
1159
|
+
today.getDate() === this.date);
|
|
1160
|
+
}
|
|
1161
|
+
const { year, month, date } = CalendarDateTime.fromDate(new Date(), timezone).calendarDate;
|
|
968
1162
|
return year === this.year && month === this.month && date === this.date;
|
|
969
1163
|
}
|
|
970
1164
|
/**
|
|
@@ -2519,7 +2713,7 @@ class CalendarEvent {
|
|
|
2519
2713
|
* @returns {Date} The `startDate` property of type `Date` is being returned.
|
|
2520
2714
|
*/
|
|
2521
2715
|
get startDate() {
|
|
2522
|
-
return this.
|
|
2716
|
+
return this._startDateTime.toDate();
|
|
2523
2717
|
}
|
|
2524
2718
|
/**
|
|
2525
2719
|
* The function returns the end date property of an object.
|
|
@@ -2527,23 +2721,23 @@ class CalendarEvent {
|
|
|
2527
2721
|
* @returns {Date} The `endDate` property of type `Date` is being returned.
|
|
2528
2722
|
*/
|
|
2529
2723
|
get endDate() {
|
|
2530
|
-
return this.
|
|
2724
|
+
return this._endDateTime.toDate();
|
|
2531
2725
|
}
|
|
2532
2726
|
/**
|
|
2533
|
-
* This function returns the start time as a
|
|
2727
|
+
* This function returns the start time as a CalendarTime.
|
|
2534
2728
|
*
|
|
2535
|
-
* @returns {
|
|
2729
|
+
* @returns {CalendarTime} The event start time.
|
|
2536
2730
|
*/
|
|
2537
2731
|
get startTime() {
|
|
2538
|
-
return this.
|
|
2732
|
+
return this._startDateTime.calendarTime;
|
|
2539
2733
|
}
|
|
2540
2734
|
/**
|
|
2541
|
-
* This function returns the end time as a
|
|
2735
|
+
* This function returns the end time as a CalendarTime.
|
|
2542
2736
|
*
|
|
2543
|
-
* @returns {
|
|
2737
|
+
* @returns {CalendarTime} The event end time.
|
|
2544
2738
|
*/
|
|
2545
2739
|
get endTime() {
|
|
2546
|
-
return this.
|
|
2740
|
+
return this._endDateTime.calendarTime;
|
|
2547
2741
|
}
|
|
2548
2742
|
/**
|
|
2549
2743
|
* This function returns the number of days that an event spans.
|
|
@@ -2568,7 +2762,7 @@ class CalendarEvent {
|
|
|
2568
2762
|
const endDate = this._eventSpansDays > 1
|
|
2569
2763
|
? new Date(startDate.year, startDate.month - 1, startDate.date + (this._eventSpansDays - 1))
|
|
2570
2764
|
: startDate.toDate();
|
|
2571
|
-
const result = new CalendarEvent(Object.assign(Object.assign({}, this._event), { startDate: startDate.toDate(), endDate: endDate, startTime: this.startTime, endTime: this.endTime }), eventKey);
|
|
2765
|
+
const result = new CalendarEvent(Object.assign(Object.assign({}, this._event), { startDate: startDate.toDate(), endDate: endDate, startTime: this.startTime.toString(), endTime: this.endTime.toString() }), eventKey);
|
|
2572
2766
|
return result;
|
|
2573
2767
|
}
|
|
2574
2768
|
/**
|
|
@@ -2611,8 +2805,8 @@ class CalendarEvent {
|
|
|
2611
2805
|
*/
|
|
2612
2806
|
generateDateTimeString(viewDate, timeFormat) {
|
|
2613
2807
|
const weekDay = translation.VegaInternalTranslation.t(Object.values(WeekdayLongNames)[viewDate.toDate().getDay()]);
|
|
2614
|
-
const startTime =
|
|
2615
|
-
const endTime =
|
|
2808
|
+
const startTime = this.startTime.toString(timeFormat);
|
|
2809
|
+
const endTime = this.endTime.toString(timeFormat);
|
|
2616
2810
|
return `${weekDay}, ${viewDate.date} ${viewDate.getMonthName(true)} ${viewDate.year} ${startTime} - ${endTime}`;
|
|
2617
2811
|
}
|
|
2618
2812
|
/**
|
|
@@ -2620,13 +2814,8 @@ class CalendarEvent {
|
|
|
2620
2814
|
*
|
|
2621
2815
|
* @returns {number} the minutes
|
|
2622
2816
|
*/
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
const [endHour, endMinutes] = this.endTime.split(':');
|
|
2626
|
-
const now = CalendarDate.from(new Date(), this._timezone);
|
|
2627
|
-
const startDate = new Date(now.year, now.month, now.date, Number(startHour), Number(startMinutes));
|
|
2628
|
-
const endDate = new Date(now.year, now.month, now.date, Number(endHour) === 0 && Number(startHour) !== 0 ? 24 : Number(endHour), Number(endMinutes));
|
|
2629
|
-
return (endDate.valueOf() - startDate.valueOf()) / (60 * 1000);
|
|
2817
|
+
getEventMinutes() {
|
|
2818
|
+
return CalendarTime.calculateDuration(this.startTime, this.endTime, 'minutes');
|
|
2630
2819
|
}
|
|
2631
2820
|
/**
|
|
2632
2821
|
* This function returns an array of repeat series based on a given calendar period.
|
|
@@ -2650,36 +2839,8 @@ class CalendarEvent {
|
|
|
2650
2839
|
*/
|
|
2651
2840
|
updateTimezone(timezone) {
|
|
2652
2841
|
this._timezone = timezone;
|
|
2653
|
-
this.
|
|
2654
|
-
this.
|
|
2655
|
-
this.initRepeatPattern();
|
|
2656
|
-
}
|
|
2657
|
-
/**
|
|
2658
|
-
* The function `convertTimeTo24Hour` converts a time string from 12-hour format to 24-hour format in TypeScript.
|
|
2659
|
-
*
|
|
2660
|
-
* @param {string} timeString - The `convertTimeTo24Hour` function you provided is used to convert a
|
|
2661
|
-
* time string from 12-hour format to 24-hour format. The function checks if the input time string is
|
|
2662
|
-
* in 12-hour format and contains either 'am' or 'pm'.
|
|
2663
|
-
* @returns {string} The `convertTimeTo24Hour` function returns a string representing the input time string
|
|
2664
|
-
* converted to 24-hour format. If the input time string is in 12-hour format and contains 'am' or
|
|
2665
|
-
* 'pm', it converts it to 24-hour format. If the input time string is not in 12-hour format or does
|
|
2666
|
-
* not contain 'am' or 'pm', it returns the original input
|
|
2667
|
-
*/
|
|
2668
|
-
convertTimeTo24Hour(timeString) {
|
|
2669
|
-
timeString = timeString.toLocaleLowerCase();
|
|
2670
|
-
if (timeString.indexOf('am') > 0 || timeString.indexOf('pm') > 0) {
|
|
2671
|
-
if (timeString.indexOf('am') > 0) {
|
|
2672
|
-
timeString = timeString.replace('am', '').trim();
|
|
2673
|
-
const [hour, minutes] = timeString.split(':');
|
|
2674
|
-
return `${hour === '12' ? '00' : hour}:${minutes}`;
|
|
2675
|
-
}
|
|
2676
|
-
else {
|
|
2677
|
-
timeString = timeString.replace('pm', '').trim();
|
|
2678
|
-
const [hour, minutes] = timeString.split(':');
|
|
2679
|
-
return `${hour === '12' ? '12' : Number(hour) + 12}:${minutes}`;
|
|
2680
|
-
}
|
|
2681
|
-
}
|
|
2682
|
-
return timeString;
|
|
2842
|
+
this._startDateTime.setTimezone(timezone);
|
|
2843
|
+
this._endDateTime.setTimezone(timezone);
|
|
2683
2844
|
}
|
|
2684
2845
|
/**
|
|
2685
2846
|
* The function `checkEventRequireField` validates the required fields of a calendar event item in TypeScript.
|
|
@@ -2711,164 +2872,41 @@ class CalendarEvent {
|
|
|
2711
2872
|
*/
|
|
2712
2873
|
initDate(eventOptions) {
|
|
2713
2874
|
const { startDate, startTime, endDate, endTime } = eventOptions;
|
|
2714
|
-
|
|
2715
|
-
this.
|
|
2716
|
-
this.processEndDate(endDate || '', endTime || '', originalDateParts);
|
|
2717
|
-
this._endTime = this.formatTimeForDisplay(this._endDate, endTime || '');
|
|
2875
|
+
this.processStartDate(startDate, startTime);
|
|
2876
|
+
this.processEndDate(endDate, endTime, startDate);
|
|
2718
2877
|
}
|
|
2719
2878
|
/**
|
|
2720
|
-
*
|
|
2879
|
+
* Parse the supplied start date/time, normalize into calendar wrappers.
|
|
2721
2880
|
*
|
|
2722
|
-
* @param {string | Date} startDate -
|
|
2723
|
-
* @param {string} startTime -
|
|
2724
|
-
* @returns {DateParts | undefined} originalDateParts information
|
|
2881
|
+
* @param {string | Date} startDate - Raw start date value from the event payload.
|
|
2882
|
+
* @param {string} startTime - Optional textual time component to parse.
|
|
2725
2883
|
*/
|
|
2726
2884
|
processStartDate(startDate, startTime) {
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
year: startDate.getFullYear(),
|
|
2732
|
-
month: startDate.getMonth(),
|
|
2733
|
-
date: startDate.getDate(),
|
|
2734
|
-
};
|
|
2735
|
-
tempDate = startDate;
|
|
2736
|
-
}
|
|
2737
|
-
else if (startDate && typeof startDate === 'string') {
|
|
2738
|
-
const [month, day, year] = startDate.split('/');
|
|
2739
|
-
originalDateParts = {
|
|
2740
|
-
year: Number(year),
|
|
2741
|
-
month: Number(month) - 1,
|
|
2742
|
-
date: Number(day),
|
|
2743
|
-
};
|
|
2744
|
-
tempDate = new Date(originalDateParts.year, originalDateParts.month, originalDateParts.date);
|
|
2745
|
-
}
|
|
2746
|
-
if (startTime && originalDateParts && tempDate) {
|
|
2747
|
-
const { timeHours, timeMinutes } = this.getCurrentHourAndMinutes(startTime);
|
|
2748
|
-
tempDate = new Date(originalDateParts.year, originalDateParts.month, originalDateParts.date, timeHours, timeMinutes, 0);
|
|
2749
|
-
}
|
|
2750
|
-
if (tempDate) {
|
|
2751
|
-
this._startDate = this.convertDateToTimezone(tempDate);
|
|
2752
|
-
}
|
|
2753
|
-
return originalDateParts;
|
|
2754
|
-
}
|
|
2755
|
-
/**
|
|
2756
|
-
* Process end date
|
|
2757
|
-
*
|
|
2758
|
-
* @param {string | Date} endDate - End date (string or Date object)
|
|
2759
|
-
* @param {string} endTime - End time string
|
|
2760
|
-
* @param {DateParts | undefined} fallbackDateParts - Default date parts to use when endDate is empty
|
|
2761
|
-
*/
|
|
2762
|
-
processEndDate(endDate, endTime, fallbackDateParts) {
|
|
2763
|
-
let tempDate;
|
|
2764
|
-
if (endDate && typeof endDate === 'object') {
|
|
2765
|
-
tempDate = endDate;
|
|
2766
|
-
}
|
|
2767
|
-
else if (endDate && typeof endDate === 'string') {
|
|
2768
|
-
const [month, day, year] = endDate.split('/');
|
|
2769
|
-
tempDate = new Date(Number(year), Number(month) - 1, Number(day), 23, 59, 59);
|
|
2770
|
-
}
|
|
2771
|
-
else {
|
|
2772
|
-
if (fallbackDateParts) {
|
|
2773
|
-
tempDate = new Date(fallbackDateParts.year, fallbackDateParts.month, fallbackDateParts.date, 23, 59, 59);
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
if (endTime && tempDate) {
|
|
2777
|
-
const { timeHours, timeMinutes } = this.getCurrentHourAndMinutes(endTime, 23, 59);
|
|
2778
|
-
tempDate = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate(), timeHours, timeMinutes, 59);
|
|
2779
|
-
}
|
|
2780
|
-
if (tempDate) {
|
|
2781
|
-
this._endDate = this.convertDateToTimezone(tempDate);
|
|
2782
|
-
}
|
|
2783
|
-
}
|
|
2784
|
-
/**
|
|
2785
|
-
* Format time for display
|
|
2786
|
-
*
|
|
2787
|
-
* @param {Date} date - Date object
|
|
2788
|
-
* @param {string} originalTime - Original time string
|
|
2789
|
-
* @returns {string} Formatted time string
|
|
2790
|
-
*/
|
|
2791
|
-
formatTimeForDisplay(date, originalTime) {
|
|
2792
|
-
const shouldUseOriginalTime = Boolean(originalTime) && this._timezone === getSystemTimezone();
|
|
2793
|
-
if (shouldUseOriginalTime) {
|
|
2794
|
-
const convertedTime = this.convertTimeTo24Hour(originalTime);
|
|
2795
|
-
const [hour, minutes] = convertedTime.split(':');
|
|
2796
|
-
return `${date.getHours().toString().padStart(hour.length, '0')}:${date
|
|
2797
|
-
.getMinutes()
|
|
2798
|
-
.toString()
|
|
2799
|
-
.padStart(minutes.length, '0')}`;
|
|
2800
|
-
}
|
|
2801
|
-
else {
|
|
2802
|
-
return `${date.getHours()}:${date.getMinutes()}`;
|
|
2803
|
-
}
|
|
2804
|
-
}
|
|
2805
|
-
/**
|
|
2806
|
-
* Parses a time string and extracts hour and minute values.
|
|
2807
|
-
* If the time string is empty or invalid, returns the provided default values.
|
|
2808
|
-
*
|
|
2809
|
-
* @param {string} time - The time string to parse (e.g., "14:30", "2:30 PM")
|
|
2810
|
-
* @param {number} defaultHours - Default hour value to use when time is empty (default: 0)
|
|
2811
|
-
* @param {number} defaultMinutes - Default minute value to use when time is empty (default: 0)
|
|
2812
|
-
* @returns {CalendarTimeHourMinutes} An object containing timeHours and timeMinutes as numbers
|
|
2813
|
-
*/
|
|
2814
|
-
getCurrentHourAndMinutes(time, defaultHours = 0, defaultMinutes = 0) {
|
|
2815
|
-
let timeHours = defaultHours;
|
|
2816
|
-
let timeMinutes = defaultMinutes;
|
|
2817
|
-
if (time) {
|
|
2818
|
-
const timeString = this.convertTimeTo24Hour(time).split(':');
|
|
2819
|
-
timeHours = Number(timeString[0]);
|
|
2820
|
-
timeMinutes = Number(timeString[1]);
|
|
2821
|
-
}
|
|
2822
|
-
return { timeHours, timeMinutes };
|
|
2885
|
+
this._startDateTime = CalendarDateTime.fromInitDataSource(startDate, {
|
|
2886
|
+
timezone: this._timezone,
|
|
2887
|
+
time: startTime,
|
|
2888
|
+
});
|
|
2823
2889
|
}
|
|
2824
2890
|
/**
|
|
2825
|
-
*
|
|
2891
|
+
* Parse the supplied end date/time, normalize into calendar wrappers.
|
|
2826
2892
|
*
|
|
2827
|
-
* @param {Date}
|
|
2828
|
-
* @
|
|
2893
|
+
* @param {string | Date | undefined} endDate - The raw end date value from the event payload.
|
|
2894
|
+
* @param {string | undefined} endTime - The optional textual end time component to parse.
|
|
2895
|
+
* @param {string | Date} originStartDate - The start date value to use as fallback if endDate is missing.
|
|
2829
2896
|
*/
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
month: '2-digit',
|
|
2837
|
-
day: '2-digit',
|
|
2838
|
-
hour: '2-digit',
|
|
2839
|
-
minute: '2-digit',
|
|
2840
|
-
second: '2-digit',
|
|
2841
|
-
hour12: false,
|
|
2842
|
-
});
|
|
2843
|
-
const targetParts = targetFormatter.formatToParts(date);
|
|
2844
|
-
const getYear = targetParts.find((part) => part.type === 'year');
|
|
2845
|
-
const getMonth = targetParts.find((part) => part.type === 'month');
|
|
2846
|
-
const getDay = targetParts.find((part) => part.type === 'day');
|
|
2847
|
-
const getHour = targetParts.find((part) => part.type === 'hour');
|
|
2848
|
-
const getMinute = targetParts.find((part) => part.type === 'minute');
|
|
2849
|
-
const getSecond = targetParts.find((part) => part.type === 'second');
|
|
2850
|
-
if (getYear && getMonth && getDay && getHour && getMinute && getSecond) {
|
|
2851
|
-
const year = parseInt(getYear.value, 10);
|
|
2852
|
-
const month = parseInt(getMonth.value, 10);
|
|
2853
|
-
const day = parseInt(getDay.value, 10);
|
|
2854
|
-
const hour = parseInt(getHour.value, 10);
|
|
2855
|
-
const minute = parseInt(getMinute.value, 10);
|
|
2856
|
-
const second = parseInt(getSecond.value, 10);
|
|
2857
|
-
return new Date(year, month - 1, day, hour, minute, second);
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
catch (error) {
|
|
2861
|
-
globalSlimmerRegistry.LogUtility.warn('Invalid timezone:', this._timezone);
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
return date;
|
|
2897
|
+
processEndDate(endDate, endTime, originStartDate) {
|
|
2898
|
+
this._endDateTime = CalendarDateTime.fromInitDataSource(endDate || originStartDate, {
|
|
2899
|
+
timezone: this._timezone,
|
|
2900
|
+
time: endTime,
|
|
2901
|
+
endTimeMissing: !endTime && !endDate,
|
|
2902
|
+
});
|
|
2865
2903
|
}
|
|
2866
2904
|
/**
|
|
2867
2905
|
* The function initializes a repeat pattern controller for a calendar event with specified start and end dates and repeat options.
|
|
2868
2906
|
*/
|
|
2869
2907
|
initRepeatPattern() {
|
|
2870
2908
|
if (this._event.repeatOptions && this._event.repeatOptions.frequency) {
|
|
2871
|
-
this.repeatPattern = calendarEventRepeatPatternFactory.getPattern(this.
|
|
2909
|
+
this.repeatPattern = calendarEventRepeatPatternFactory.getPattern(this.startDate, this._event.repeatOptions, this._timezone);
|
|
2872
2910
|
}
|
|
2873
2911
|
}
|
|
2874
2912
|
/**
|
|
@@ -3041,7 +3079,7 @@ class VegaCalendarEventItemRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
3041
3079
|
* @returns {HTMLVegaCalendarEventElement} calendar event element
|
|
3042
3080
|
*/
|
|
3043
3081
|
render(item, classMap, targetCalendarViewDate, isGroupEvent = false) {
|
|
3044
|
-
return (index.h("vega-calendar-event", { "data-calendar-ref": this.host, key: `${item.eventKey}-${item.startTime}-${item.endTime}`, calendarEvent: item, class: classMap, onKeyDown: accessibility.createEnterKeyHandlerToTriggerClick(),
|
|
3082
|
+
return (index.h("vega-calendar-event", { "data-calendar-ref": this.host, key: `${item.eventKey}-${item.startTime.toString()}-${item.endTime.toString()}`, calendarEvent: item, class: classMap, onKeyDown: accessibility.createEnterKeyHandlerToTriggerClick(),
|
|
3045
3083
|
// eslint-disable-next-line react/jsx-no-bind
|
|
3046
3084
|
onClick: () => {
|
|
3047
3085
|
this.handleEventClick(item);
|
|
@@ -3286,7 +3324,7 @@ class VegaCalendarDayViewEventLayoutRenderer extends globalSlimmerRegistry.VegaS
|
|
|
3286
3324
|
layoutColumns.forEach((columns, index$1) => {
|
|
3287
3325
|
let renderEvent = columns.getEventBySlotIndex(0);
|
|
3288
3326
|
let start = 0;
|
|
3289
|
-
for (let i = 0; i
|
|
3327
|
+
for (let i = 0; i <= VegaCalendarDayViewEventLayoutRenderer.TOTAL_NUMBER_OF_CELLS; i++) {
|
|
3290
3328
|
const currentEvent = columns.getEventBySlotIndex(i);
|
|
3291
3329
|
if (currentEvent !== renderEvent) {
|
|
3292
3330
|
if (renderEvent) {
|
|
@@ -3321,14 +3359,14 @@ class VegaCalendarDayViewEventLayoutRenderer extends globalSlimmerRegistry.VegaS
|
|
|
3321
3359
|
return {
|
|
3322
3360
|
position: 'absolute',
|
|
3323
3361
|
left: `${left * 100}%`,
|
|
3324
|
-
top: `${(100 / VegaCalendarDayViewEventLayoutRenderer.
|
|
3362
|
+
top: `${(100 / VegaCalendarDayViewEventLayoutRenderer.TOTAL_NUMBER_OF_CELLS) * startIndex}%`,
|
|
3325
3363
|
width: `calc(100% - ${left * 100}%)`,
|
|
3326
|
-
height: `${(100 / VegaCalendarDayViewEventLayoutRenderer.
|
|
3364
|
+
height: `${(100 / VegaCalendarDayViewEventLayoutRenderer.TOTAL_NUMBER_OF_CELLS) * (endIndex - startIndex)}%`,
|
|
3327
3365
|
zIndex: columnIndex > 0 ? `${columnIndex}` : undefined,
|
|
3328
3366
|
};
|
|
3329
3367
|
}
|
|
3330
3368
|
}
|
|
3331
|
-
VegaCalendarDayViewEventLayoutRenderer.
|
|
3369
|
+
VegaCalendarDayViewEventLayoutRenderer.TOTAL_NUMBER_OF_CELLS = 24 * 4;
|
|
3332
3370
|
__decorate$h([
|
|
3333
3371
|
globalSlimmerRegistry.MapToComponentField()
|
|
3334
3372
|
], VegaCalendarDayViewEventLayoutRenderer.prototype, "eventItemRenderer", void 0);
|
|
@@ -3495,7 +3533,9 @@ class VegaCalendarDayViewTimedEventLayoutColumn extends VegaCalendarBaseEventLay
|
|
|
3495
3533
|
*/
|
|
3496
3534
|
getIndexRangeFromEvent(eventItem) {
|
|
3497
3535
|
const { startTime, endTime } = eventItem;
|
|
3498
|
-
|
|
3536
|
+
const startIndex = getTimeIndex(startTime.toString());
|
|
3537
|
+
const endIndex = getTimeIndex(endTime.toString());
|
|
3538
|
+
return [startIndex, Math.max(endIndex, startIndex + 1)];
|
|
3499
3539
|
}
|
|
3500
3540
|
}
|
|
3501
3541
|
VegaCalendarDayViewTimedEventLayoutColumn.defaultSlots = Array(96).fill(null);
|
|
@@ -3579,10 +3619,10 @@ class VegaCalendarEventSorter {
|
|
|
3579
3619
|
*/
|
|
3580
3620
|
sortCalendarEventByTime(events) {
|
|
3581
3621
|
return events.sort((eventA, eventB) => {
|
|
3582
|
-
const eventAStartIndex = getTimeIndex(eventA.startTime);
|
|
3583
|
-
const eventBStartIndex = getTimeIndex(eventB.startTime);
|
|
3622
|
+
const eventAStartIndex = getTimeIndex(eventA.startTime.toString());
|
|
3623
|
+
const eventBStartIndex = getTimeIndex(eventB.startTime.toString());
|
|
3584
3624
|
if (eventAStartIndex === eventBStartIndex) {
|
|
3585
|
-
return getTimeIndex(eventB.endTime) - getTimeIndex(eventA.endTime);
|
|
3625
|
+
return getTimeIndex(eventB.endTime.toString()) - getTimeIndex(eventA.endTime.toString());
|
|
3586
3626
|
}
|
|
3587
3627
|
else {
|
|
3588
3628
|
return eventAStartIndex - eventBStartIndex;
|
|
@@ -4783,7 +4823,7 @@ class VegaCalendarEventRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
4783
4823
|
this.slotMode ? this.getSlotElement() : this.defaultNormalMonthEventContentRender()));
|
|
4784
4824
|
}
|
|
4785
4825
|
else {
|
|
4786
|
-
const eventDuration = this.calendarEvent.
|
|
4826
|
+
const eventDuration = this.calendarEvent.getEventMinutes();
|
|
4787
4827
|
return (index.h("div", { part: "event-container", class: Object.assign(Object.assign({}, classMap), { 'vertical': eventDuration > 30, 'duration-half-an-hour': eventDuration === 30, 'event-bg-color': !disabled, 'bg-disabled': disabled }), role: "button", tabIndex: 0, ref: (node) => (this.slotContainerRef = node) },
|
|
4788
4828
|
!this.slotMode && this.renderEventStatus(),
|
|
4789
4829
|
index.h("div", { class: "cover-block" }),
|
|
@@ -4817,7 +4857,7 @@ class VegaCalendarEventRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
4817
4857
|
*/
|
|
4818
4858
|
defaultNormalMonthEventContentRender() {
|
|
4819
4859
|
const { startTime, title } = this.calendarEvent;
|
|
4820
|
-
return index.h("div", { class: "event-title" }, `${
|
|
4860
|
+
return index.h("div", { class: "event-title" }, `${startTime.toString(this.timeFormat)} ${title}`);
|
|
4821
4861
|
}
|
|
4822
4862
|
/**
|
|
4823
4863
|
* Render the day view timed event.
|
|
@@ -4834,7 +4874,7 @@ class VegaCalendarEventRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
4834
4874
|
}, ref: (node) => (this.eventTitleContainerRef = node) }, title),
|
|
4835
4875
|
index.h("div", { class: "event-time" },
|
|
4836
4876
|
index.h("vega-icon", { size: "size-12", icon: internalIconManager.VegaInternalIconManager.getIconKey('clock-three') }),
|
|
4837
|
-
index.h("span", null, `${
|
|
4877
|
+
index.h("span", null, `${startTime.toString(this.timeFormat)} - ${endTime.toString(this.timeFormat)}`))));
|
|
4838
4878
|
}
|
|
4839
4879
|
/**
|
|
4840
4880
|
* Return a slot element if the calendar is not a repeat event
|