@esri/solutions-components 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +16 -6
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js.map +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +1095 -4
- package/dist/cjs/solution-configuration.cjs.entry.js.map +1 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js +3 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js.map +1 -1
- package/dist/cjs/{solution-store-f0547fe7.js → solution-store-893499a5.js} +8 -1
- package/dist/cjs/solution-store-893499a5.js.map +1 -0
- package/dist/collection/components/solution-configuration/solution-configuration.js +14 -11
- package/dist/collection/components/solution-configuration/solution-configuration.js.map +1 -1
- package/dist/collection/components/solution-item/solution-item.js +2 -0
- package/dist/collection/components/solution-item/solution-item.js.map +1 -1
- package/dist/collection/components/solution-item-details/solution-item-details.js +15 -5
- package/dist/collection/components/solution-item-details/solution-item-details.js.map +1 -1
- package/dist/collection/utils/solution-store.js +2 -0
- package/dist/collection/utils/solution-store.js.map +1 -1
- package/dist/collection/utils/solution-store.ts +2 -0
- package/dist/esm/calcite-shell-panel_14.entry.js +16 -6
- package/dist/esm/calcite-shell-panel_14.entry.js.map +1 -1
- package/dist/esm/solution-configuration.entry.js +1095 -4
- package/dist/esm/solution-configuration.entry.js.map +1 -1
- package/dist/esm/solution-contents_3.entry.js +3 -1
- package/dist/esm/solution-contents_3.entry.js.map +1 -1
- package/dist/esm/{solution-store-c1f6173a.js → solution-store-0c58c852.js} +4 -2
- package/dist/esm/solution-store-0c58c852.js.map +1 -0
- package/dist/solutions-components/{p-065830b8.js → p-659edb14.js} +4 -2
- package/dist/solutions-components/p-659edb14.js.map +1 -0
- package/dist/solutions-components/{p-ee9be0ef.entry.js → p-77c75f3a.entry.js} +4 -2
- package/dist/solutions-components/p-77c75f3a.entry.js.map +1 -0
- package/dist/solutions-components/p-90629c1d.entry.js +1986 -0
- package/dist/solutions-components/p-90629c1d.entry.js.map +1 -0
- package/dist/solutions-components/{p-0e7a0839.entry.js → p-984cb687.entry.js} +17 -7
- package/dist/solutions-components/p-984cb687.entry.js.map +1 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/solution-store.ts +2 -0
- package/dist/solutions-components_commit.txt +9 -7
- package/dist/types/components/solution-item-details/solution-item-details.d.ts +2 -1
- package/package.json +1 -1
- package/dist/cjs/solution-store-f0547fe7.js.map +0 -1
- package/dist/components/ExpandToggle.js +0 -112
- package/dist/components/ExpandToggle.js.map +0 -1
- package/dist/components/Heading.js +0 -24
- package/dist/components/Heading.js.map +0 -1
- package/dist/components/_commonjsHelpers.js +0 -24
- package/dist/components/_commonjsHelpers.js.map +0 -1
- package/dist/components/action-bar.js +0 -278
- package/dist/components/action-bar.js.map +0 -1
- package/dist/components/action-group.js +0 -151
- package/dist/components/action-group.js.map +0 -1
- package/dist/components/action-menu.js +0 -358
- package/dist/components/action-menu.js.map +0 -1
- package/dist/components/action.js +0 -216
- package/dist/components/action.js.map +0 -1
- package/dist/components/array.js +0 -17
- package/dist/components/array.js.map +0 -1
- package/dist/components/buffer-tools.d.ts +0 -11
- package/dist/components/buffer-tools.js +0 -13
- package/dist/components/buffer-tools.js.map +0 -1
- package/dist/components/buffer-tools2.js +0 -256
- package/dist/components/buffer-tools2.js.map +0 -1
- package/dist/components/button.js +0 -265
- package/dist/components/button.js.map +0 -1
- package/dist/components/calcite-accordion-item.js +0 -246
- package/dist/components/calcite-accordion-item.js.map +0 -1
- package/dist/components/calcite-accordion.js +0 -182
- package/dist/components/calcite-accordion.js.map +0 -1
- package/dist/components/calcite-action-bar.js +0 -13
- package/dist/components/calcite-action-bar.js.map +0 -1
- package/dist/components/calcite-action-group.js +0 -13
- package/dist/components/calcite-action-group.js.map +0 -1
- package/dist/components/calcite-action-menu.js +0 -13
- package/dist/components/calcite-action-menu.js.map +0 -1
- package/dist/components/calcite-action-pad.js +0 -199
- package/dist/components/calcite-action-pad.js.map +0 -1
- package/dist/components/calcite-action.js +0 -13
- package/dist/components/calcite-action.js.map +0 -1
- package/dist/components/calcite-alert.js +0 -299
- package/dist/components/calcite-alert.js.map +0 -1
- package/dist/components/calcite-avatar.js +0 -184
- package/dist/components/calcite-avatar.js.map +0 -1
- package/dist/components/calcite-block-section.js +0 -157
- package/dist/components/calcite-block-section.js.map +0 -1
- package/dist/components/calcite-block.js +0 -277
- package/dist/components/calcite-block.js.map +0 -1
- package/dist/components/calcite-button.js +0 -13
- package/dist/components/calcite-button.js.map +0 -1
- package/dist/components/calcite-card.js +0 -189
- package/dist/components/calcite-card.js.map +0 -1
- package/dist/components/calcite-checkbox.js +0 -13
- package/dist/components/calcite-checkbox.js.map +0 -1
- package/dist/components/calcite-chip.js +0 -13
- package/dist/components/calcite-chip.js.map +0 -1
- package/dist/components/calcite-color-picker-hex-input.js +0 -13
- package/dist/components/calcite-color-picker-hex-input.js.map +0 -1
- package/dist/components/calcite-color-picker-swatch.js +0 -13
- package/dist/components/calcite-color-picker-swatch.js.map +0 -1
- package/dist/components/calcite-color-picker.js +0 -1038
- package/dist/components/calcite-color-picker.js.map +0 -1
- package/dist/components/calcite-combobox-item-group.js +0 -77
- package/dist/components/calcite-combobox-item-group.js.map +0 -1
- package/dist/components/calcite-combobox-item.js +0 -13
- package/dist/components/calcite-combobox-item.js.map +0 -1
- package/dist/components/calcite-combobox.js +0 -13
- package/dist/components/calcite-combobox.js.map +0 -1
- package/dist/components/calcite-date-picker-day.js +0 -13
- package/dist/components/calcite-date-picker-day.js.map +0 -1
- package/dist/components/calcite-date-picker-month-header.js +0 -13
- package/dist/components/calcite-date-picker-month-header.js.map +0 -1
- package/dist/components/calcite-date-picker-month.js +0 -13
- package/dist/components/calcite-date-picker-month.js.map +0 -1
- package/dist/components/calcite-date-picker.js +0 -13
- package/dist/components/calcite-date-picker.js.map +0 -1
- package/dist/components/calcite-dropdown-group.js +0 -101
- package/dist/components/calcite-dropdown-group.js.map +0 -1
- package/dist/components/calcite-dropdown-item.js +0 -237
- package/dist/components/calcite-dropdown-item.js.map +0 -1
- package/dist/components/calcite-dropdown.js +0 -13
- package/dist/components/calcite-dropdown.js.map +0 -1
- package/dist/components/calcite-fab.js +0 -146
- package/dist/components/calcite-fab.js.map +0 -1
- package/dist/components/calcite-filter.js +0 -197
- package/dist/components/calcite-filter.js.map +0 -1
- package/dist/components/calcite-flow-item.js +0 -245
- package/dist/components/calcite-flow-item.js.map +0 -1
- package/dist/components/calcite-flow.js +0 -149
- package/dist/components/calcite-flow.js.map +0 -1
- package/dist/components/calcite-graph.js +0 -13
- package/dist/components/calcite-graph.js.map +0 -1
- package/dist/components/calcite-handle.js +0 -13
- package/dist/components/calcite-handle.js.map +0 -1
- package/dist/components/calcite-icon.js +0 -13
- package/dist/components/calcite-icon.js.map +0 -1
- package/dist/components/calcite-inline-editable.js +0 -296
- package/dist/components/calcite-inline-editable.js.map +0 -1
- package/dist/components/calcite-input-date-picker.js +0 -715
- package/dist/components/calcite-input-date-picker.js.map +0 -1
- package/dist/components/calcite-input-message.js +0 -13
- package/dist/components/calcite-input-message.js.map +0 -1
- package/dist/components/calcite-input-number.js +0 -639
- package/dist/components/calcite-input-number.js.map +0 -1
- package/dist/components/calcite-input-text.js +0 -402
- package/dist/components/calcite-input-text.js.map +0 -1
- package/dist/components/calcite-input-time-picker.js +0 -436
- package/dist/components/calcite-input-time-picker.js.map +0 -1
- package/dist/components/calcite-input.js +0 -13
- package/dist/components/calcite-input.js.map +0 -1
- package/dist/components/calcite-label.js +0 -13
- package/dist/components/calcite-label.js.map +0 -1
- package/dist/components/calcite-link.js +0 -13
- package/dist/components/calcite-link.js.map +0 -1
- package/dist/components/calcite-list-item-group.js +0 -67
- package/dist/components/calcite-list-item-group.js.map +0 -1
- package/dist/components/calcite-list-item.js +0 -13
- package/dist/components/calcite-list-item.js.map +0 -1
- package/dist/components/calcite-list.js +0 -13
- package/dist/components/calcite-list.js.map +0 -1
- package/dist/components/calcite-loader.js +0 -13
- package/dist/components/calcite-loader.js.map +0 -1
- package/dist/components/calcite-modal.js +0 -500
- package/dist/components/calcite-modal.js.map +0 -1
- package/dist/components/calcite-notice.js +0 -13
- package/dist/components/calcite-notice.js.map +0 -1
- package/dist/components/calcite-option-group.js +0 -66
- package/dist/components/calcite-option-group.js.map +0 -1
- package/dist/components/calcite-option.js +0 -13
- package/dist/components/calcite-option.js.map +0 -1
- package/dist/components/calcite-pagination.js +0 -260
- package/dist/components/calcite-pagination.js.map +0 -1
- package/dist/components/calcite-panel.js +0 -13
- package/dist/components/calcite-panel.js.map +0 -1
- package/dist/components/calcite-pick-list-group.js +0 -76
- package/dist/components/calcite-pick-list-group.js.map +0 -1
- package/dist/components/calcite-pick-list-item.js +0 -13
- package/dist/components/calcite-pick-list-item.js.map +0 -1
- package/dist/components/calcite-pick-list.js +0 -175
- package/dist/components/calcite-pick-list.js.map +0 -1
- package/dist/components/calcite-popover-manager.js +0 -96
- package/dist/components/calcite-popover-manager.js.map +0 -1
- package/dist/components/calcite-popover.js +0 -13
- package/dist/components/calcite-popover.js.map +0 -1
- package/dist/components/calcite-progress.js +0 -13
- package/dist/components/calcite-progress.js.map +0 -1
- package/dist/components/calcite-radio-button-group.js +0 -134
- package/dist/components/calcite-radio-button-group.js.map +0 -1
- package/dist/components/calcite-radio-button.js +0 -312
- package/dist/components/calcite-radio-button.js.map +0 -1
- package/dist/components/calcite-radio-group-item.js +0 -13
- package/dist/components/calcite-radio-group-item.js.map +0 -1
- package/dist/components/calcite-radio-group.js +0 -13
- package/dist/components/calcite-radio-group.js.map +0 -1
- package/dist/components/calcite-rating.js +0 -203
- package/dist/components/calcite-rating.js.map +0 -1
- package/dist/components/calcite-scrim.js +0 -13
- package/dist/components/calcite-scrim.js.map +0 -1
- package/dist/components/calcite-select.js +0 -13
- package/dist/components/calcite-select.js.map +0 -1
- package/dist/components/calcite-shell-center-row.js +0 -102
- package/dist/components/calcite-shell-center-row.js.map +0 -1
- package/dist/components/calcite-shell-panel.js +0 -13
- package/dist/components/calcite-shell-panel.js.map +0 -1
- package/dist/components/calcite-shell.js +0 -13
- package/dist/components/calcite-shell.js.map +0 -1
- package/dist/components/calcite-slider.js +0 -13
- package/dist/components/calcite-slider.js.map +0 -1
- package/dist/components/calcite-sortable-list.js +0 -204
- package/dist/components/calcite-sortable-list.js.map +0 -1
- package/dist/components/calcite-split-button.js +0 -170
- package/dist/components/calcite-split-button.js.map +0 -1
- package/dist/components/calcite-stepper-item.js +0 -273
- package/dist/components/calcite-stepper-item.js.map +0 -1
- package/dist/components/calcite-stepper.js +0 -258
- package/dist/components/calcite-stepper.js.map +0 -1
- package/dist/components/calcite-switch.js +0 -13
- package/dist/components/calcite-switch.js.map +0 -1
- package/dist/components/calcite-tab-nav.js +0 -13
- package/dist/components/calcite-tab-nav.js.map +0 -1
- package/dist/components/calcite-tab-title.js +0 -13
- package/dist/components/calcite-tab-title.js.map +0 -1
- package/dist/components/calcite-tab.js +0 -13
- package/dist/components/calcite-tab.js.map +0 -1
- package/dist/components/calcite-tabs.js +0 -13
- package/dist/components/calcite-tabs.js.map +0 -1
- package/dist/components/calcite-tile-select-group.js +0 -67
- package/dist/components/calcite-tile-select-group.js.map +0 -1
- package/dist/components/calcite-tile-select.js +0 -268
- package/dist/components/calcite-tile-select.js.map +0 -1
- package/dist/components/calcite-tile.js +0 -13
- package/dist/components/calcite-tile.js.map +0 -1
- package/dist/components/calcite-time-picker.js +0 -13
- package/dist/components/calcite-time-picker.js.map +0 -1
- package/dist/components/calcite-tip-group.js +0 -43
- package/dist/components/calcite-tip-group.js.map +0 -1
- package/dist/components/calcite-tip-manager.js +0 -225
- package/dist/components/calcite-tip-manager.js.map +0 -1
- package/dist/components/calcite-tip.js +0 -164
- package/dist/components/calcite-tip.js.map +0 -1
- package/dist/components/calcite-tooltip-manager.js +0 -59
- package/dist/components/calcite-tooltip-manager.js.map +0 -1
- package/dist/components/calcite-tooltip.js +0 -13
- package/dist/components/calcite-tooltip.js.map +0 -1
- package/dist/components/calcite-tree-item.js +0 -13
- package/dist/components/calcite-tree-item.js.map +0 -1
- package/dist/components/calcite-tree.js +0 -13
- package/dist/components/calcite-tree.js.map +0 -1
- package/dist/components/calcite-value-list-item.js +0 -13
- package/dist/components/calcite-value-list-item.js.map +0 -1
- package/dist/components/calcite-value-list.js +0 -13
- package/dist/components/calcite-value-list.js.map +0 -1
- package/dist/components/check-list.d.ts +0 -11
- package/dist/components/check-list.js +0 -13
- package/dist/components/check-list.js.map +0 -1
- package/dist/components/check-list2.js +0 -128
- package/dist/components/check-list2.js.map +0 -1
- package/dist/components/checkbox.js +0 -167
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/chip.js +0 -172
- package/dist/components/chip.js.map +0 -1
- package/dist/components/color-picker-hex-input.js +0 -365
- package/dist/components/color-picker-hex-input.js.map +0 -1
- package/dist/components/color-picker-swatch.js +0 -2036
- package/dist/components/color-picker-swatch.js.map +0 -1
- package/dist/components/combobox-item.js +0 -184
- package/dist/components/combobox-item.js.map +0 -1
- package/dist/components/combobox.js +0 -914
- package/dist/components/combobox.js.map +0 -1
- package/dist/components/conditionalSlot.js +0 -52
- package/dist/components/conditionalSlot.js.map +0 -1
- package/dist/components/config-buffer-tools.d.ts +0 -11
- package/dist/components/config-buffer-tools.js +0 -185
- package/dist/components/config-buffer-tools.js.map +0 -1
- package/dist/components/config-draw-tools.d.ts +0 -11
- package/dist/components/config-draw-tools.js +0 -124
- package/dist/components/config-draw-tools.js.map +0 -1
- package/dist/components/config-layer-picker.d.ts +0 -11
- package/dist/components/config-layer-picker.js +0 -148
- package/dist/components/config-layer-picker.js.map +0 -1
- package/dist/components/config-pdf-download.d.ts +0 -11
- package/dist/components/config-pdf-download.js +0 -157
- package/dist/components/config-pdf-download.js.map +0 -1
- package/dist/components/date-picker-day.js +0 -113
- package/dist/components/date-picker-day.js.map +0 -1
- package/dist/components/date-picker-month-header.js +0 -226
- package/dist/components/date-picker-month-header.js.map +0 -1
- package/dist/components/date-picker-month.js +0 -346
- package/dist/components/date-picker-month.js.map +0 -1
- package/dist/components/date-picker.js +0 -577
- package/dist/components/date-picker.js.map +0 -1
- package/dist/components/date.js +0 -182
- package/dist/components/date.js.map +0 -1
- package/dist/components/debounce.js +0 -489
- package/dist/components/debounce.js.map +0 -1
- package/dist/components/dom.js +0 -233
- package/dist/components/dom.js.map +0 -1
- package/dist/components/dropdown.js +0 -507
- package/dist/components/dropdown.js.map +0 -1
- package/dist/components/filter.js +0 -765
- package/dist/components/filter.js.map +0 -1
- package/dist/components/floating-ui.js +0 -1787
- package/dist/components/floating-ui.js.map +0 -1
- package/dist/components/form.js +0 -230
- package/dist/components/form.js.map +0 -1
- package/dist/components/graph.js +0 -256
- package/dist/components/graph.js.map +0 -1
- package/dist/components/guid.js +0 -26
- package/dist/components/guid.js.map +0 -1
- package/dist/components/handle.js +0 -121
- package/dist/components/handle.js.map +0 -1
- package/dist/components/icon.js +0 -204
- package/dist/components/icon.js.map +0 -1
- package/dist/components/index.d.ts +0 -48
- package/dist/components/index.js +0 -190
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js +0 -201
- package/dist/components/index2.js.map +0 -1
- package/dist/components/input-message.js +0 -103
- package/dist/components/input-message.js.map +0 -1
- package/dist/components/input.js +0 -742
- package/dist/components/input.js.map +0 -1
- package/dist/components/interactive.js +0 -53
- package/dist/components/interactive.js.map +0 -1
- package/dist/components/interfaces.js +0 -21
- package/dist/components/interfaces.js.map +0 -1
- package/dist/components/interfaces2.js +0 -23
- package/dist/components/interfaces2.js.map +0 -1
- package/dist/components/interfaces3.js +0 -72
- package/dist/components/interfaces3.js.map +0 -1
- package/dist/components/json-editor.d.ts +0 -11
- package/dist/components/json-editor.js +0 -13
- package/dist/components/json-editor.js.map +0 -1
- package/dist/components/json-editor2.js +0 -443
- package/dist/components/json-editor2.js.map +0 -1
- package/dist/components/key.js +0 -18
- package/dist/components/key.js.map +0 -1
- package/dist/components/label.js +0 -108
- package/dist/components/label.js.map +0 -1
- package/dist/components/label2.js +0 -133
- package/dist/components/label2.js.map +0 -1
- package/dist/components/labelFormats.js +0 -212
- package/dist/components/labelFormats.js.map +0 -1
- package/dist/components/link.js +0 -125
- package/dist/components/link.js.map +0 -1
- package/dist/components/list-item.js +0 -151
- package/dist/components/list-item.js.map +0 -1
- package/dist/components/list.js +0 -85
- package/dist/components/list.js.map +0 -1
- package/dist/components/loadModules.js +0 -30
- package/dist/components/loadModules.js.map +0 -1
- package/dist/components/loader.js +0 -118
- package/dist/components/loader.js.map +0 -1
- package/dist/components/locale.js +0 -414
- package/dist/components/locale.js.map +0 -1
- package/dist/components/locale2.js +0 -415
- package/dist/components/locale2.js.map +0 -1
- package/dist/components/map-draw-tools.d.ts +0 -11
- package/dist/components/map-draw-tools.js +0 -13
- package/dist/components/map-draw-tools.js.map +0 -1
- package/dist/components/map-draw-tools2.js +0 -230
- package/dist/components/map-draw-tools2.js.map +0 -1
- package/dist/components/map-layer-picker.d.ts +0 -11
- package/dist/components/map-layer-picker.js +0 -13
- package/dist/components/map-layer-picker.js.map +0 -1
- package/dist/components/map-layer-picker2.js +0 -190
- package/dist/components/map-layer-picker2.js.map +0 -1
- package/dist/components/map-search.d.ts +0 -11
- package/dist/components/map-search.js +0 -157
- package/dist/components/map-search.js.map +0 -1
- package/dist/components/map-select-tools.d.ts +0 -11
- package/dist/components/map-select-tools.js +0 -13
- package/dist/components/map-select-tools.js.map +0 -1
- package/dist/components/map-select-tools2.js +0 -555
- package/dist/components/map-select-tools2.js.map +0 -1
- package/dist/components/mapViewUtils.js +0 -131
- package/dist/components/mapViewUtils.js.map +0 -1
- package/dist/components/math.js +0 -26
- package/dist/components/math.js.map +0 -1
- package/dist/components/nonChromiumPlatformUtils.js +0 -505
- package/dist/components/nonChromiumPlatformUtils.js.map +0 -1
- package/dist/components/notice.js +0 -194
- package/dist/components/notice.js.map +0 -1
- package/dist/components/observers.js +0 -58
- package/dist/components/observers.js.map +0 -1
- package/dist/components/openCloseComponent.js +0 -58
- package/dist/components/openCloseComponent.js.map +0 -1
- package/dist/components/option.js +0 -111
- package/dist/components/option.js.map +0 -1
- package/dist/components/panel.js +0 -461
- package/dist/components/panel.js.map +0 -1
- package/dist/components/pdf-download.d.ts +0 -11
- package/dist/components/pdf-download.js +0 -13
- package/dist/components/pdf-download.js.map +0 -1
- package/dist/components/pdf-download2.js +0 -243
- package/dist/components/pdf-download2.js.map +0 -1
- package/dist/components/pick-list-item.js +0 -257
- package/dist/components/pick-list-item.js.map +0 -1
- package/dist/components/popover.js +0 -502
- package/dist/components/popover.js.map +0 -1
- package/dist/components/progress.js +0 -62
- package/dist/components/progress.js.map +0 -1
- package/dist/components/public-notification.d.ts +0 -11
- package/dist/components/public-notification.js +0 -784
- package/dist/components/public-notification.js.map +0 -1
- package/dist/components/publicNotificationStore.js +0 -40
- package/dist/components/publicNotificationStore.js.map +0 -1
- package/dist/components/queryUtils.js +0 -163
- package/dist/components/queryUtils.js.map +0 -1
- package/dist/components/radio-group-item.js +0 -103
- package/dist/components/radio-group-item.js.map +0 -1
- package/dist/components/radio-group.js +0 -237
- package/dist/components/radio-group.js.map +0 -1
- package/dist/components/refine-selection-tools.d.ts +0 -11
- package/dist/components/refine-selection-tools.js +0 -13
- package/dist/components/refine-selection-tools.js.map +0 -1
- package/dist/components/refine-selection-tools2.js +0 -500
- package/dist/components/refine-selection-tools2.js.map +0 -1
- package/dist/components/refine-selection.d.ts +0 -11
- package/dist/components/refine-selection.js +0 -13
- package/dist/components/refine-selection.js.map +0 -1
- package/dist/components/refine-selection2.js +0 -369
- package/dist/components/refine-selection2.js.map +0 -1
- package/dist/components/resources.js +0 -26
- package/dist/components/resources.js.map +0 -1
- package/dist/components/resources2.js +0 -23
- package/dist/components/resources2.js.map +0 -1
- package/dist/components/resources3.js +0 -40
- package/dist/components/resources3.js.map +0 -1
- package/dist/components/scrim.js +0 -85
- package/dist/components/scrim.js.map +0 -1
- package/dist/components/select.js +0 -261
- package/dist/components/select.js.map +0 -1
- package/dist/components/shared-list-render.js +0 -321
- package/dist/components/shared-list-render.js.map +0 -1
- package/dist/components/shell-panel.js +0 -283
- package/dist/components/shell-panel.js.map +0 -1
- package/dist/components/shell.js +0 -123
- package/dist/components/shell.js.map +0 -1
- package/dist/components/slider.js +0 -898
- package/dist/components/slider.js.map +0 -1
- package/dist/components/solution-configuration.d.ts +0 -11
- package/dist/components/solution-configuration.js +0 -1141
- package/dist/components/solution-configuration.js.map +0 -1
- package/dist/components/solution-contents.d.ts +0 -11
- package/dist/components/solution-contents.js +0 -13
- package/dist/components/solution-contents.js.map +0 -1
- package/dist/components/solution-contents2.js +0 -130
- package/dist/components/solution-contents2.js.map +0 -1
- package/dist/components/solution-item-details.d.ts +0 -11
- package/dist/components/solution-item-details.js +0 -13
- package/dist/components/solution-item-details.js.map +0 -1
- package/dist/components/solution-item-details2.js +0 -236
- package/dist/components/solution-item-details2.js.map +0 -1
- package/dist/components/solution-item-icon.d.ts +0 -11
- package/dist/components/solution-item-icon.js +0 -13
- package/dist/components/solution-item-icon.js.map +0 -1
- package/dist/components/solution-item-icon2.js +0 -344
- package/dist/components/solution-item-icon2.js.map +0 -1
- package/dist/components/solution-item-sharing.d.ts +0 -11
- package/dist/components/solution-item-sharing.js +0 -13
- package/dist/components/solution-item-sharing.js.map +0 -1
- package/dist/components/solution-item-sharing2.js +0 -169
- package/dist/components/solution-item-sharing2.js.map +0 -1
- package/dist/components/solution-item.d.ts +0 -11
- package/dist/components/solution-item.js +0 -13
- package/dist/components/solution-item.js.map +0 -1
- package/dist/components/solution-item2.js +0 -317
- package/dist/components/solution-item2.js.map +0 -1
- package/dist/components/solution-organization-variables.d.ts +0 -11
- package/dist/components/solution-organization-variables.js +0 -13
- package/dist/components/solution-organization-variables.js.map +0 -1
- package/dist/components/solution-organization-variables2.js +0 -134
- package/dist/components/solution-organization-variables2.js.map +0 -1
- package/dist/components/solution-resource-item.d.ts +0 -11
- package/dist/components/solution-resource-item.js +0 -13
- package/dist/components/solution-resource-item.js.map +0 -1
- package/dist/components/solution-resource-item2.js +0 -358
- package/dist/components/solution-resource-item2.js.map +0 -1
- package/dist/components/solution-spatial-ref.d.ts +0 -11
- package/dist/components/solution-spatial-ref.js +0 -13
- package/dist/components/solution-spatial-ref.js.map +0 -1
- package/dist/components/solution-spatial-ref2.js +0 -21448
- package/dist/components/solution-spatial-ref2.js.map +0 -1
- package/dist/components/solution-store.js +0 -4094
- package/dist/components/solution-store.js.map +0 -1
- package/dist/components/solution-template-data.d.ts +0 -11
- package/dist/components/solution-template-data.js +0 -13
- package/dist/components/solution-template-data.js.map +0 -1
- package/dist/components/solution-template-data2.js +0 -235
- package/dist/components/solution-template-data2.js.map +0 -1
- package/dist/components/solution-variables.d.ts +0 -11
- package/dist/components/solution-variables.js +0 -13
- package/dist/components/solution-variables.js.map +0 -1
- package/dist/components/solution-variables2.js +0 -152
- package/dist/components/solution-variables2.js.map +0 -1
- package/dist/components/sortable.esm.js +0 -3028
- package/dist/components/sortable.esm.js.map +0 -1
- package/dist/components/store-manager.d.ts +0 -11
- package/dist/components/store-manager.js +0 -85
- package/dist/components/store-manager.js.map +0 -1
- package/dist/components/switch.js +0 -141
- package/dist/components/switch.js.map +0 -1
- package/dist/components/tab-nav.js +0 -243
- package/dist/components/tab-nav.js.map +0 -1
- package/dist/components/tab-title.js +0 -278
- package/dist/components/tab-title.js.map +0 -1
- package/dist/components/tab.js +0 -156
- package/dist/components/tab.js.map +0 -1
- package/dist/components/tabs.js +0 -190
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/tile.js +0 -131
- package/dist/components/tile.js.map +0 -1
- package/dist/components/time-picker.js +0 -945
- package/dist/components/time-picker.js.map +0 -1
- package/dist/components/tooltip.js +0 -401
- package/dist/components/tooltip.js.map +0 -1
- package/dist/components/tree-item.js +0 -296
- package/dist/components/tree-item.js.map +0 -1
- package/dist/components/tree.js +0 -329
- package/dist/components/tree.js.map +0 -1
- package/dist/components/utils.js +0 -121
- package/dist/components/utils.js.map +0 -1
- package/dist/components/utils2.js +0 -53
- package/dist/components/utils2.js.map +0 -1
- package/dist/components/value-list-item.js +0 -206
- package/dist/components/value-list-item.js.map +0 -1
- package/dist/components/value-list.js +0 -335
- package/dist/components/value-list.js.map +0 -1
- package/dist/esm/solution-store-c1f6173a.js.map +0 -1
- package/dist/solutions-components/p-065830b8.js.map +0 -1
- package/dist/solutions-components/p-0e7a0839.entry.js.map +0 -1
- package/dist/solutions-components/p-401541a5.entry.js +0 -895
- package/dist/solutions-components/p-401541a5.entry.js.map +0 -1
- package/dist/solutions-components/p-ee9be0ef.entry.js.map +0 -1
@@ -1,945 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
7
|
-
import { n as numberKeys, i as isActivationKey } from './key.js';
|
8
|
-
import { i as isValidNumber, g as getSupportedLocale, b as getSupportedNumberingSystem, u as updateEffectiveLocale, c as connectLocalized, d as disconnectLocalized } from './locale2.js';
|
9
|
-
import { d as defineCustomElement$1 } from './icon.js';
|
10
|
-
|
11
|
-
/*!
|
12
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
13
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
14
|
-
* v1.0.0-beta.97
|
15
|
-
*/
|
16
|
-
const maxTenthForMinuteAndSecond = 5;
|
17
|
-
function createLocaleDateTimeFormatter(locale, numberingSystem, includeSeconds = true) {
|
18
|
-
try {
|
19
|
-
const options = {
|
20
|
-
hour: "2-digit",
|
21
|
-
minute: "2-digit",
|
22
|
-
timeZone: "UTC",
|
23
|
-
numberingSystem: getSupportedNumberingSystem(numberingSystem)
|
24
|
-
};
|
25
|
-
if (includeSeconds) {
|
26
|
-
options.second = "2-digit";
|
27
|
-
}
|
28
|
-
return new Intl.DateTimeFormat(getSupportedLocale(locale), options);
|
29
|
-
}
|
30
|
-
catch (error) {
|
31
|
-
throw new Error(`Invalid locale supplied while attempting to create a DateTime formatter: ${locale}`);
|
32
|
-
}
|
33
|
-
}
|
34
|
-
function formatTimePart(number) {
|
35
|
-
const numberAsString = number.toString();
|
36
|
-
return number >= 0 && number <= 9 ? numberAsString.padStart(2, "0") : numberAsString;
|
37
|
-
}
|
38
|
-
function formatTimeString(value) {
|
39
|
-
if (!isValidTime(value)) {
|
40
|
-
return null;
|
41
|
-
}
|
42
|
-
const [hourString, minuteString, secondString] = value.split(":");
|
43
|
-
const hour = formatTimePart(parseInt(hourString));
|
44
|
-
const minute = formatTimePart(parseInt(minuteString));
|
45
|
-
if (secondString) {
|
46
|
-
const second = formatTimePart(parseInt(secondString));
|
47
|
-
return `${hour}:${minute}:${second}`;
|
48
|
-
}
|
49
|
-
return `${hour}:${minute}`;
|
50
|
-
}
|
51
|
-
function getLocaleHourCycle(locale, numberingSystem) {
|
52
|
-
const formatter = createLocaleDateTimeFormatter(locale, numberingSystem);
|
53
|
-
const parts = formatter.formatToParts(new Date(Date.UTC(0, 0, 0, 0, 0, 0)));
|
54
|
-
return getLocalizedTimePart("meridiem", parts) ? "12" : "24";
|
55
|
-
}
|
56
|
-
function getLocalizedTimePart(part, parts) {
|
57
|
-
var _a, _b, _c, _d;
|
58
|
-
if (!part || !parts) {
|
59
|
-
return null;
|
60
|
-
}
|
61
|
-
if (part === "hourSuffix") {
|
62
|
-
const hourIndex = parts.indexOf(parts.find(({ type }) => type === "hour"));
|
63
|
-
const minuteIndex = parts.indexOf(parts.find(({ type }) => type === "minute"));
|
64
|
-
const hourSuffix = parts[hourIndex + 1];
|
65
|
-
return hourSuffix && hourSuffix.type === "literal" && minuteIndex - hourIndex === 2
|
66
|
-
? ((_a = hourSuffix.value) === null || _a === void 0 ? void 0 : _a.trim()) || null
|
67
|
-
: null;
|
68
|
-
}
|
69
|
-
if (part === "minuteSuffix") {
|
70
|
-
const minuteIndex = parts.indexOf(parts.find(({ type }) => type === "minute"));
|
71
|
-
const secondIndex = parts.indexOf(parts.find(({ type }) => type === "second"));
|
72
|
-
const minuteSuffix = parts[minuteIndex + 1];
|
73
|
-
return minuteSuffix && minuteSuffix.type === "literal" && secondIndex - minuteIndex === 2
|
74
|
-
? ((_b = minuteSuffix.value) === null || _b === void 0 ? void 0 : _b.trim()) || null
|
75
|
-
: null;
|
76
|
-
}
|
77
|
-
if (part === "secondSuffix") {
|
78
|
-
const secondIndex = parts.indexOf(parts.find(({ type }) => type === "second"));
|
79
|
-
const secondSuffix = parts[secondIndex + 1];
|
80
|
-
return secondSuffix && secondSuffix.type === "literal" ? ((_c = secondSuffix.value) === null || _c === void 0 ? void 0 : _c.trim()) || null : null;
|
81
|
-
}
|
82
|
-
return ((_d = parts.find(({ type }) => (part == "meridiem" ? type === "dayPeriod" : type === part))) === null || _d === void 0 ? void 0 : _d.value) || null;
|
83
|
-
}
|
84
|
-
function getMeridiem(hour) {
|
85
|
-
if (!isValidNumber(hour)) {
|
86
|
-
return null;
|
87
|
-
}
|
88
|
-
const hourAsNumber = parseInt(hour);
|
89
|
-
return hourAsNumber >= 0 && hourAsNumber <= 11 ? "AM" : "PM";
|
90
|
-
}
|
91
|
-
function isValidTime(value) {
|
92
|
-
if (!value || value.startsWith(":") || value.endsWith(":")) {
|
93
|
-
return false;
|
94
|
-
}
|
95
|
-
const splitValue = value.split(":");
|
96
|
-
const validLength = splitValue.length > 1 && splitValue.length < 4;
|
97
|
-
if (!validLength) {
|
98
|
-
return false;
|
99
|
-
}
|
100
|
-
const [hour, minute, second] = splitValue;
|
101
|
-
const hourAsNumber = parseInt(splitValue[0]);
|
102
|
-
const minuteAsNumber = parseInt(splitValue[1]);
|
103
|
-
const secondAsNumber = parseInt(splitValue[2]);
|
104
|
-
const hourValid = isValidNumber(hour) && hourAsNumber >= 0 && hourAsNumber < 24;
|
105
|
-
const minuteValid = isValidNumber(minute) && minuteAsNumber >= 0 && minuteAsNumber < 60;
|
106
|
-
const secondValid = isValidNumber(second) && secondAsNumber >= 0 && secondAsNumber < 60;
|
107
|
-
if ((hourValid && minuteValid && !second) || (hourValid && minuteValid && secondValid)) {
|
108
|
-
return true;
|
109
|
-
}
|
110
|
-
}
|
111
|
-
function isValidTimePart(value, part) {
|
112
|
-
if (part === "meridiem") {
|
113
|
-
return value === "AM" || value === "PM";
|
114
|
-
}
|
115
|
-
if (!isValidNumber(value)) {
|
116
|
-
return false;
|
117
|
-
}
|
118
|
-
const valueAsNumber = Number(value);
|
119
|
-
return part === "hour" ? valueAsNumber >= 0 && valueAsNumber < 24 : valueAsNumber >= 0 && valueAsNumber < 60;
|
120
|
-
}
|
121
|
-
function localizeTimePart({ value, part, locale, numberingSystem }) {
|
122
|
-
if (!isValidTimePart(value, part)) {
|
123
|
-
return;
|
124
|
-
}
|
125
|
-
const valueAsNumber = parseInt(value);
|
126
|
-
const date = new Date(Date.UTC(0, 0, 0, part === "hour" ? valueAsNumber : part === "meridiem" ? (value === "AM" ? 0 : 12) : 0, part === "minute" ? valueAsNumber : 0, part === "second" ? valueAsNumber : 0));
|
127
|
-
if (!date) {
|
128
|
-
return;
|
129
|
-
}
|
130
|
-
const formatter = createLocaleDateTimeFormatter(locale, numberingSystem);
|
131
|
-
const parts = formatter.formatToParts(date);
|
132
|
-
return getLocalizedTimePart(part, parts);
|
133
|
-
}
|
134
|
-
function localizeTimeString({ value, locale, numberingSystem, includeSeconds = true }) {
|
135
|
-
if (!isValidTime(value)) {
|
136
|
-
return null;
|
137
|
-
}
|
138
|
-
const { hour, minute, second = "0" } = parseTimeString(value);
|
139
|
-
const dateFromTimeString = new Date(Date.UTC(0, 0, 0, parseInt(hour), parseInt(minute), parseInt(second)));
|
140
|
-
const formatter = createLocaleDateTimeFormatter(locale, numberingSystem, includeSeconds);
|
141
|
-
return (formatter === null || formatter === void 0 ? void 0 : formatter.format(dateFromTimeString)) || null;
|
142
|
-
}
|
143
|
-
function localizeTimeStringToParts({ value, locale, numberingSystem }) {
|
144
|
-
if (!isValidTime(value)) {
|
145
|
-
return null;
|
146
|
-
}
|
147
|
-
const { hour, minute, second = "0" } = parseTimeString(value);
|
148
|
-
const dateFromTimeString = new Date(Date.UTC(0, 0, 0, parseInt(hour), parseInt(minute), parseInt(second)));
|
149
|
-
if (dateFromTimeString) {
|
150
|
-
const formatter = createLocaleDateTimeFormatter(locale, numberingSystem);
|
151
|
-
const parts = formatter.formatToParts(dateFromTimeString);
|
152
|
-
return {
|
153
|
-
localizedHour: getLocalizedTimePart("hour", parts),
|
154
|
-
localizedHourSuffix: getLocalizedTimePart("hourSuffix", parts),
|
155
|
-
localizedMinute: getLocalizedTimePart("minute", parts),
|
156
|
-
localizedMinuteSuffix: getLocalizedTimePart("minuteSuffix", parts),
|
157
|
-
localizedSecond: getLocalizedTimePart("second", parts),
|
158
|
-
localizedSecondSuffix: getLocalizedTimePart("secondSuffix", parts),
|
159
|
-
localizedMeridiem: getLocalizedTimePart("meridiem", parts)
|
160
|
-
};
|
161
|
-
}
|
162
|
-
return null;
|
163
|
-
}
|
164
|
-
function getTimeParts({ value, locale, numberingSystem }) {
|
165
|
-
if (!isValidTime(value)) {
|
166
|
-
return null;
|
167
|
-
}
|
168
|
-
const { hour, minute, second = "0" } = parseTimeString(value);
|
169
|
-
const dateFromTimeString = new Date(Date.UTC(0, 0, 0, parseInt(hour), parseInt(minute), parseInt(second)));
|
170
|
-
if (dateFromTimeString) {
|
171
|
-
const formatter = createLocaleDateTimeFormatter(locale, numberingSystem);
|
172
|
-
const parts = formatter.formatToParts(dateFromTimeString);
|
173
|
-
return parts;
|
174
|
-
}
|
175
|
-
return null;
|
176
|
-
}
|
177
|
-
function parseTimeString(value) {
|
178
|
-
if (isValidTime(value)) {
|
179
|
-
const [hour, minute, second] = value.split(":");
|
180
|
-
return {
|
181
|
-
hour,
|
182
|
-
minute,
|
183
|
-
second
|
184
|
-
};
|
185
|
-
}
|
186
|
-
return {
|
187
|
-
hour: null,
|
188
|
-
minute: null,
|
189
|
-
second: null
|
190
|
-
};
|
191
|
-
}
|
192
|
-
|
193
|
-
/*!
|
194
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
195
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
196
|
-
* v1.0.0-beta.97
|
197
|
-
*/
|
198
|
-
const CSS = {
|
199
|
-
button: "button",
|
200
|
-
buttonBottomLeft: "button--bottom-left",
|
201
|
-
buttonBottomRight: "button--bottom-right",
|
202
|
-
buttonHourDown: "button--hour-down",
|
203
|
-
buttonHourUp: "button--hour-up",
|
204
|
-
buttonMeridiemDown: "button--meridiem-down",
|
205
|
-
buttonMeridiemUp: "button--meridiem-up",
|
206
|
-
buttonMinuteDown: "button--minute-down",
|
207
|
-
buttonMinuteUp: "button--minute-up",
|
208
|
-
buttonSecondDown: "button--second-down",
|
209
|
-
buttonSecondUp: "button--second-up",
|
210
|
-
buttonTopLeft: "button--top-left",
|
211
|
-
buttonTopRight: "button--top-right",
|
212
|
-
column: "column",
|
213
|
-
delimiter: "delimiter",
|
214
|
-
hour: "hour",
|
215
|
-
input: "input",
|
216
|
-
meridiem: "meridiem",
|
217
|
-
minute: "minute",
|
218
|
-
second: "second",
|
219
|
-
showMeridiem: "show-meridiem",
|
220
|
-
showSecond: "show-second",
|
221
|
-
"scale-s": "scale-s",
|
222
|
-
"scale-m": "scale-m",
|
223
|
-
"scale-l": "scale-l",
|
224
|
-
timePicker: "time-picker",
|
225
|
-
meridiemStart: "meridiem--start"
|
226
|
-
};
|
227
|
-
const TEXT = {
|
228
|
-
hour: "Hour",
|
229
|
-
hourDown: "Decrease hour",
|
230
|
-
hourUp: "Increase hour",
|
231
|
-
meridiem: "AM/PM",
|
232
|
-
meridiemDown: "Decrease AM/PM",
|
233
|
-
meridiemUp: "Increase AM/PM",
|
234
|
-
minute: "Minute",
|
235
|
-
minuteDown: "Decrease minute",
|
236
|
-
minuteUp: "Increase minute",
|
237
|
-
second: "Second",
|
238
|
-
secondDown: "Decrease second",
|
239
|
-
secondUp: "Increase second"
|
240
|
-
};
|
241
|
-
|
242
|
-
const timePickerCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);border-radius:var(--calcite-border-radius)}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-ui-foreground-1)}.time-picker .button:hover,.time-picker .button:focus{background-color:var(--calcite-ui-foreground-2);outline:2px solid transparent;outline-offset:2px}.time-picker .button:active{background-color:var(--calcite-ui-foreground-3)}.time-picker .button.top-left{border-start-start-radius:var(--calcite-border-radius)}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-border-radius)}.time-picker .button.top-right{border-start-end-radius:var(--calcite-border-radius)}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-border-radius)}.time-picker .button calcite-icon{color:var(--calcite-ui-text-3)}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium)}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-2)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}.time-picker.scale-s{font-size:var(--calcite-font-size--1)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:0.75rem;padding-block:0.25rem}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{-webkit-padding-end:0.75rem;padding-inline-end:0.75rem}.time-picker.scale-m{font-size:var(--calcite-font-size-0)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:1rem;padding-block:0.5rem}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{-webkit-padding-end:1rem;padding-inline-end:1rem}.time-picker.scale-l{font-size:var(--calcite-font-size-1)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:1.25rem;padding-block:0.75rem}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{-webkit-padding-end:1.25rem;padding-inline-end:1.25rem}";
|
243
|
-
|
244
|
-
function capitalize(str) {
|
245
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
246
|
-
}
|
247
|
-
const TimePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
248
|
-
constructor() {
|
249
|
-
super();
|
250
|
-
this.__registerHost();
|
251
|
-
this.__attachShadow();
|
252
|
-
this.calciteInternalTimePickerBlur = createEvent(this, "calciteInternalTimePickerBlur", 6);
|
253
|
-
this.calciteInternalTimePickerChange = createEvent(this, "calciteInternalTimePickerChange", 6);
|
254
|
-
this.calciteInternalTimePickerFocus = createEvent(this, "calciteInternalTimePickerFocus", 6);
|
255
|
-
//--------------------------------------------------------------------------
|
256
|
-
//
|
257
|
-
// Properties
|
258
|
-
//
|
259
|
-
//--------------------------------------------------------------------------
|
260
|
-
/**
|
261
|
-
* Accessible name for the component's hour input.
|
262
|
-
*
|
263
|
-
* @default "Hour"
|
264
|
-
*/
|
265
|
-
this.intlHour = TEXT.hour;
|
266
|
-
/**
|
267
|
-
* Accessible name for the component's hour down button.
|
268
|
-
*
|
269
|
-
* @default "Decrease hour"
|
270
|
-
*/
|
271
|
-
this.intlHourDown = TEXT.hourDown;
|
272
|
-
/**
|
273
|
-
* Accessible name for the component's hour up button.
|
274
|
-
*
|
275
|
-
* @default "Increase hour"
|
276
|
-
*/
|
277
|
-
this.intlHourUp = TEXT.hourUp;
|
278
|
-
/**
|
279
|
-
* Accessible name for the component's meridiem (AM/PM) input.
|
280
|
-
*
|
281
|
-
* @default "AM/PM"
|
282
|
-
*/
|
283
|
-
this.intlMeridiem = TEXT.meridiem;
|
284
|
-
/**
|
285
|
-
* Accessible name for the component's meridiem (AM/PM) down button.
|
286
|
-
*
|
287
|
-
* @default "Decrease AM/PM"
|
288
|
-
*/
|
289
|
-
this.intlMeridiemDown = TEXT.meridiemDown;
|
290
|
-
/**
|
291
|
-
* Accessible name for the component's meridiem (AM/PM) up button.
|
292
|
-
*
|
293
|
-
* @default "Increase AM/PM"
|
294
|
-
*/
|
295
|
-
this.intlMeridiemUp = TEXT.meridiemUp;
|
296
|
-
/**
|
297
|
-
* Accessible name for the component's minute input.
|
298
|
-
*
|
299
|
-
* @default "Minute"
|
300
|
-
*/
|
301
|
-
this.intlMinute = TEXT.minute;
|
302
|
-
/**
|
303
|
-
* Accessible name for the component's minute down button.
|
304
|
-
*
|
305
|
-
* @default "Decrease minute"
|
306
|
-
*/
|
307
|
-
this.intlMinuteDown = TEXT.minuteDown;
|
308
|
-
/**
|
309
|
-
* Accessible name for the component's minute up button.
|
310
|
-
*
|
311
|
-
* @default "Increase minute"
|
312
|
-
*/
|
313
|
-
this.intlMinuteUp = TEXT.minuteUp;
|
314
|
-
/**
|
315
|
-
* Accessible name for the component's second input.
|
316
|
-
*
|
317
|
-
* @default "Second"
|
318
|
-
*/
|
319
|
-
this.intlSecond = TEXT.second;
|
320
|
-
/**
|
321
|
-
* Accessible name for the component's second down button.
|
322
|
-
*
|
323
|
-
* @default "Decrease second"
|
324
|
-
*/
|
325
|
-
this.intlSecondDown = TEXT.secondDown;
|
326
|
-
/**
|
327
|
-
* Accessible name for the component's second up button.
|
328
|
-
*
|
329
|
-
* @default "Increase second"
|
330
|
-
*/
|
331
|
-
this.intlSecondUp = TEXT.secondUp;
|
332
|
-
/** Specifies the size of the component. */
|
333
|
-
this.scale = "m";
|
334
|
-
/** Specifies the granularity the `value` must adhere to (in seconds). */
|
335
|
-
this.step = 60;
|
336
|
-
/** The component's value in UTC (always 24-hour format). */
|
337
|
-
this.value = null;
|
338
|
-
// --------------------------------------------------------------------------
|
339
|
-
//
|
340
|
-
// State
|
341
|
-
//
|
342
|
-
// --------------------------------------------------------------------------
|
343
|
-
this.effectiveLocale = "";
|
344
|
-
this.showSecond = this.step < 60;
|
345
|
-
this.decrementHour = () => {
|
346
|
-
const newHour = !this.hour ? 0 : this.hour === "00" ? 23 : parseInt(this.hour) - 1;
|
347
|
-
this.setValuePart("hour", newHour);
|
348
|
-
};
|
349
|
-
this.decrementMeridiem = () => {
|
350
|
-
const newMeridiem = this.meridiem === "PM" ? "AM" : "PM";
|
351
|
-
this.setValuePart("meridiem", newMeridiem);
|
352
|
-
};
|
353
|
-
this.decrementMinuteOrSecond = (key) => {
|
354
|
-
let newValue;
|
355
|
-
if (isValidNumber(this[key])) {
|
356
|
-
const valueAsNumber = parseInt(this[key]);
|
357
|
-
newValue = valueAsNumber === 0 ? 59 : valueAsNumber - 1;
|
358
|
-
}
|
359
|
-
else {
|
360
|
-
newValue = 59;
|
361
|
-
}
|
362
|
-
this.setValuePart(key, newValue);
|
363
|
-
};
|
364
|
-
this.decrementMinute = () => {
|
365
|
-
this.decrementMinuteOrSecond("minute");
|
366
|
-
};
|
367
|
-
this.decrementSecond = () => {
|
368
|
-
this.decrementMinuteOrSecond("second");
|
369
|
-
};
|
370
|
-
this.focusHandler = (event) => {
|
371
|
-
this.activeEl = event.currentTarget;
|
372
|
-
};
|
373
|
-
this.hourDownButtonKeyDownHandler = (event) => {
|
374
|
-
if (this.buttonActivated(event)) {
|
375
|
-
this.decrementHour();
|
376
|
-
}
|
377
|
-
};
|
378
|
-
this.hourKeyDownHandler = (event) => {
|
379
|
-
const { key } = event;
|
380
|
-
if (numberKeys.includes(key)) {
|
381
|
-
const keyAsNumber = parseInt(key);
|
382
|
-
let newHour;
|
383
|
-
if (isValidNumber(this.hour)) {
|
384
|
-
switch (this.hourCycle) {
|
385
|
-
case "12":
|
386
|
-
newHour =
|
387
|
-
this.hour === "01" && keyAsNumber >= 0 && keyAsNumber <= 2
|
388
|
-
? `1${keyAsNumber}`
|
389
|
-
: keyAsNumber;
|
390
|
-
break;
|
391
|
-
case "24":
|
392
|
-
if (this.hour === "01") {
|
393
|
-
newHour = `1${keyAsNumber}`;
|
394
|
-
}
|
395
|
-
else if (this.hour === "02" && keyAsNumber >= 0 && keyAsNumber <= 3) {
|
396
|
-
newHour = `2${keyAsNumber}`;
|
397
|
-
}
|
398
|
-
else {
|
399
|
-
newHour = keyAsNumber;
|
400
|
-
}
|
401
|
-
break;
|
402
|
-
}
|
403
|
-
}
|
404
|
-
else {
|
405
|
-
newHour = keyAsNumber;
|
406
|
-
}
|
407
|
-
this.setValuePart("hour", newHour);
|
408
|
-
}
|
409
|
-
else {
|
410
|
-
switch (key) {
|
411
|
-
case "Backspace":
|
412
|
-
case "Delete":
|
413
|
-
this.setValuePart("hour", null);
|
414
|
-
break;
|
415
|
-
case "ArrowDown":
|
416
|
-
event.preventDefault();
|
417
|
-
this.decrementHour();
|
418
|
-
break;
|
419
|
-
case "ArrowUp":
|
420
|
-
event.preventDefault();
|
421
|
-
this.incrementHour();
|
422
|
-
break;
|
423
|
-
case " ":
|
424
|
-
event.preventDefault();
|
425
|
-
break;
|
426
|
-
}
|
427
|
-
}
|
428
|
-
};
|
429
|
-
this.hourUpButtonKeyDownHandler = (event) => {
|
430
|
-
if (this.buttonActivated(event)) {
|
431
|
-
this.incrementHour();
|
432
|
-
}
|
433
|
-
};
|
434
|
-
this.incrementMeridiem = () => {
|
435
|
-
const newMeridiem = this.meridiem === "AM" ? "PM" : "AM";
|
436
|
-
this.setValuePart("meridiem", newMeridiem);
|
437
|
-
};
|
438
|
-
this.incrementHour = () => {
|
439
|
-
const newHour = isValidNumber(this.hour)
|
440
|
-
? this.hour === "23"
|
441
|
-
? 0
|
442
|
-
: parseInt(this.hour) + 1
|
443
|
-
: 1;
|
444
|
-
this.setValuePart("hour", newHour);
|
445
|
-
};
|
446
|
-
this.incrementMinuteOrSecond = (key) => {
|
447
|
-
const newValue = isValidNumber(this[key])
|
448
|
-
? this[key] === "59"
|
449
|
-
? 0
|
450
|
-
: parseInt(this[key]) + 1
|
451
|
-
: 0;
|
452
|
-
this.setValuePart(key, newValue);
|
453
|
-
};
|
454
|
-
this.incrementMinute = () => {
|
455
|
-
this.incrementMinuteOrSecond("minute");
|
456
|
-
};
|
457
|
-
this.incrementSecond = () => {
|
458
|
-
this.incrementMinuteOrSecond("second");
|
459
|
-
};
|
460
|
-
this.meridiemDownButtonKeyDownHandler = (event) => {
|
461
|
-
if (this.buttonActivated(event)) {
|
462
|
-
this.decrementMeridiem();
|
463
|
-
}
|
464
|
-
};
|
465
|
-
this.meridiemKeyDownHandler = (event) => {
|
466
|
-
switch (event.key) {
|
467
|
-
case "a":
|
468
|
-
this.setValuePart("meridiem", "AM");
|
469
|
-
break;
|
470
|
-
case "p":
|
471
|
-
this.setValuePart("meridiem", "PM");
|
472
|
-
break;
|
473
|
-
case "Backspace":
|
474
|
-
case "Delete":
|
475
|
-
this.setValuePart("meridiem", null);
|
476
|
-
break;
|
477
|
-
case "ArrowUp":
|
478
|
-
event.preventDefault();
|
479
|
-
this.incrementMeridiem();
|
480
|
-
break;
|
481
|
-
case "ArrowDown":
|
482
|
-
event.preventDefault();
|
483
|
-
this.decrementMeridiem();
|
484
|
-
break;
|
485
|
-
case " ":
|
486
|
-
event.preventDefault();
|
487
|
-
break;
|
488
|
-
}
|
489
|
-
};
|
490
|
-
this.meridiemUpButtonKeyDownHandler = (event) => {
|
491
|
-
if (this.buttonActivated(event)) {
|
492
|
-
this.incrementMeridiem();
|
493
|
-
}
|
494
|
-
};
|
495
|
-
this.minuteDownButtonKeyDownHandler = (event) => {
|
496
|
-
if (this.buttonActivated(event)) {
|
497
|
-
this.decrementMinute();
|
498
|
-
}
|
499
|
-
};
|
500
|
-
this.minuteKeyDownHandler = (event) => {
|
501
|
-
const { key } = event;
|
502
|
-
if (numberKeys.includes(key)) {
|
503
|
-
const keyAsNumber = parseInt(key);
|
504
|
-
let newMinute;
|
505
|
-
if (isValidNumber(this.minute) && this.minute.startsWith("0")) {
|
506
|
-
const minuteAsNumber = parseInt(this.minute);
|
507
|
-
newMinute =
|
508
|
-
minuteAsNumber > maxTenthForMinuteAndSecond
|
509
|
-
? keyAsNumber
|
510
|
-
: `${minuteAsNumber}${keyAsNumber}`;
|
511
|
-
}
|
512
|
-
else {
|
513
|
-
newMinute = keyAsNumber;
|
514
|
-
}
|
515
|
-
this.setValuePart("minute", newMinute);
|
516
|
-
}
|
517
|
-
else {
|
518
|
-
switch (key) {
|
519
|
-
case "Backspace":
|
520
|
-
case "Delete":
|
521
|
-
this.setValuePart("minute", null);
|
522
|
-
break;
|
523
|
-
case "ArrowDown":
|
524
|
-
event.preventDefault();
|
525
|
-
this.decrementMinute();
|
526
|
-
break;
|
527
|
-
case "ArrowUp":
|
528
|
-
event.preventDefault();
|
529
|
-
this.incrementMinute();
|
530
|
-
break;
|
531
|
-
case " ":
|
532
|
-
event.preventDefault();
|
533
|
-
break;
|
534
|
-
}
|
535
|
-
}
|
536
|
-
};
|
537
|
-
this.minuteUpButtonKeyDownHandler = (event) => {
|
538
|
-
if (this.buttonActivated(event)) {
|
539
|
-
this.incrementMinute();
|
540
|
-
}
|
541
|
-
};
|
542
|
-
this.secondDownButtonKeyDownHandler = (event) => {
|
543
|
-
if (this.buttonActivated(event)) {
|
544
|
-
this.decrementSecond();
|
545
|
-
}
|
546
|
-
};
|
547
|
-
this.secondKeyDownHandler = (event) => {
|
548
|
-
const { key } = event;
|
549
|
-
if (numberKeys.includes(key)) {
|
550
|
-
const keyAsNumber = parseInt(key);
|
551
|
-
let newSecond;
|
552
|
-
if (isValidNumber(this.second) && this.second.startsWith("0")) {
|
553
|
-
const secondAsNumber = parseInt(this.second);
|
554
|
-
newSecond =
|
555
|
-
secondAsNumber > maxTenthForMinuteAndSecond
|
556
|
-
? keyAsNumber
|
557
|
-
: `${secondAsNumber}${keyAsNumber}`;
|
558
|
-
}
|
559
|
-
else {
|
560
|
-
newSecond = keyAsNumber;
|
561
|
-
}
|
562
|
-
this.setValuePart("second", newSecond);
|
563
|
-
}
|
564
|
-
else {
|
565
|
-
switch (key) {
|
566
|
-
case "Backspace":
|
567
|
-
case "Delete":
|
568
|
-
this.setValuePart("second", null);
|
569
|
-
break;
|
570
|
-
case "ArrowDown":
|
571
|
-
event.preventDefault();
|
572
|
-
this.decrementSecond();
|
573
|
-
break;
|
574
|
-
case "ArrowUp":
|
575
|
-
event.preventDefault();
|
576
|
-
this.incrementSecond();
|
577
|
-
break;
|
578
|
-
case " ":
|
579
|
-
event.preventDefault();
|
580
|
-
break;
|
581
|
-
}
|
582
|
-
}
|
583
|
-
};
|
584
|
-
this.secondUpButtonKeyDownHandler = (event) => {
|
585
|
-
if (this.buttonActivated(event)) {
|
586
|
-
this.incrementSecond();
|
587
|
-
}
|
588
|
-
};
|
589
|
-
this.setHourEl = (el) => (this.hourEl = el);
|
590
|
-
this.setMeridiemEl = (el) => (this.meridiemEl = el);
|
591
|
-
this.setMinuteEl = (el) => (this.minuteEl = el);
|
592
|
-
this.setSecondEl = (el) => (this.secondEl = el);
|
593
|
-
this.setValue = (value, emit = true) => {
|
594
|
-
if (isValidTime(value)) {
|
595
|
-
const { hour, minute, second } = parseTimeString(value);
|
596
|
-
const { effectiveLocale: locale, numberingSystem } = this;
|
597
|
-
const { localizedHour, localizedHourSuffix, localizedMinute, localizedMinuteSuffix, localizedSecond, localizedSecondSuffix, localizedMeridiem } = localizeTimeStringToParts({ value, locale, numberingSystem });
|
598
|
-
this.localizedHour = localizedHour;
|
599
|
-
this.localizedHourSuffix = localizedHourSuffix;
|
600
|
-
this.localizedMinute = localizedMinute;
|
601
|
-
this.localizedMinuteSuffix = localizedMinuteSuffix;
|
602
|
-
this.localizedSecond = localizedSecond;
|
603
|
-
this.localizedSecondSuffix = localizedSecondSuffix;
|
604
|
-
this.hour = hour;
|
605
|
-
this.minute = minute;
|
606
|
-
this.second = second;
|
607
|
-
if (localizedMeridiem) {
|
608
|
-
this.localizedMeridiem = localizedMeridiem;
|
609
|
-
this.meridiem = getMeridiem(this.hour);
|
610
|
-
const formatParts = getTimeParts({ value, locale, numberingSystem });
|
611
|
-
this.meridiemOrder = this.getMeridiemOrder(formatParts);
|
612
|
-
}
|
613
|
-
}
|
614
|
-
else {
|
615
|
-
this.hour = null;
|
616
|
-
this.localizedHour = null;
|
617
|
-
this.localizedHourSuffix = null;
|
618
|
-
this.localizedMeridiem = null;
|
619
|
-
this.localizedMinute = null;
|
620
|
-
this.localizedMinuteSuffix = null;
|
621
|
-
this.localizedSecond = null;
|
622
|
-
this.localizedSecondSuffix = null;
|
623
|
-
this.meridiem = null;
|
624
|
-
this.minute = null;
|
625
|
-
this.second = null;
|
626
|
-
this.value = null;
|
627
|
-
}
|
628
|
-
if (emit) {
|
629
|
-
this.calciteInternalTimePickerChange.emit();
|
630
|
-
}
|
631
|
-
};
|
632
|
-
this.setValuePart = (key, value, emit = true) => {
|
633
|
-
var _a;
|
634
|
-
const { effectiveLocale: locale, numberingSystem } = this;
|
635
|
-
if (key === "meridiem") {
|
636
|
-
this.meridiem = value;
|
637
|
-
if (isValidNumber(this.hour)) {
|
638
|
-
const hourAsNumber = parseInt(this.hour);
|
639
|
-
switch (value) {
|
640
|
-
case "AM":
|
641
|
-
if (hourAsNumber >= 12) {
|
642
|
-
this.hour = formatTimePart(hourAsNumber - 12);
|
643
|
-
}
|
644
|
-
break;
|
645
|
-
case "PM":
|
646
|
-
if (hourAsNumber < 12) {
|
647
|
-
this.hour = formatTimePart(hourAsNumber + 12);
|
648
|
-
}
|
649
|
-
break;
|
650
|
-
}
|
651
|
-
this.localizedHour = localizeTimePart({
|
652
|
-
value: this.hour,
|
653
|
-
part: "hour",
|
654
|
-
locale,
|
655
|
-
numberingSystem
|
656
|
-
});
|
657
|
-
}
|
658
|
-
}
|
659
|
-
else {
|
660
|
-
this[key] = typeof value === "number" ? formatTimePart(value) : value;
|
661
|
-
this[`localized${capitalize(key)}`] = localizeTimePart({
|
662
|
-
value: this[key],
|
663
|
-
part: key,
|
664
|
-
locale,
|
665
|
-
numberingSystem
|
666
|
-
});
|
667
|
-
}
|
668
|
-
if (this.hour && this.minute) {
|
669
|
-
const showSeconds = this.second && this.showSecond;
|
670
|
-
this.value = `${this.hour}:${this.minute}:${showSeconds ? this.second : "00"}`;
|
671
|
-
}
|
672
|
-
else {
|
673
|
-
this.value = null;
|
674
|
-
}
|
675
|
-
this.localizedMeridiem = this.value
|
676
|
-
? ((_a = localizeTimeStringToParts({ value: this.value, locale, numberingSystem })) === null || _a === void 0 ? void 0 : _a.localizedMeridiem) || null
|
677
|
-
: localizeTimePart({ value: this.meridiem, part: "meridiem", locale, numberingSystem });
|
678
|
-
if (emit) {
|
679
|
-
this.calciteInternalTimePickerChange.emit();
|
680
|
-
}
|
681
|
-
};
|
682
|
-
}
|
683
|
-
localeChanged() {
|
684
|
-
updateEffectiveLocale(this);
|
685
|
-
}
|
686
|
-
valueWatcher(newValue) {
|
687
|
-
this.setValue(newValue, false);
|
688
|
-
}
|
689
|
-
effectiveLocaleWatcher() {
|
690
|
-
this.updateLocale();
|
691
|
-
}
|
692
|
-
//--------------------------------------------------------------------------
|
693
|
-
//
|
694
|
-
// Event Listeners
|
695
|
-
//
|
696
|
-
//--------------------------------------------------------------------------
|
697
|
-
hostBlurHandler() {
|
698
|
-
this.calciteInternalTimePickerBlur.emit();
|
699
|
-
}
|
700
|
-
hostFocusHandler() {
|
701
|
-
this.calciteInternalTimePickerFocus.emit();
|
702
|
-
}
|
703
|
-
keyDownHandler(event) {
|
704
|
-
const { defaultPrevented, key } = event;
|
705
|
-
if (defaultPrevented) {
|
706
|
-
return;
|
707
|
-
}
|
708
|
-
switch (this.activeEl) {
|
709
|
-
case this.hourEl:
|
710
|
-
if (key === "ArrowRight") {
|
711
|
-
this.setFocus("minute");
|
712
|
-
event.preventDefault();
|
713
|
-
}
|
714
|
-
break;
|
715
|
-
case this.minuteEl:
|
716
|
-
switch (key) {
|
717
|
-
case "ArrowLeft":
|
718
|
-
this.setFocus("hour");
|
719
|
-
event.preventDefault();
|
720
|
-
break;
|
721
|
-
case "ArrowRight":
|
722
|
-
if (this.step !== 60) {
|
723
|
-
this.setFocus("second");
|
724
|
-
event.preventDefault();
|
725
|
-
}
|
726
|
-
else if (this.hourCycle === "12") {
|
727
|
-
this.setFocus("meridiem");
|
728
|
-
event.preventDefault();
|
729
|
-
}
|
730
|
-
break;
|
731
|
-
}
|
732
|
-
break;
|
733
|
-
case this.secondEl:
|
734
|
-
switch (key) {
|
735
|
-
case "ArrowLeft":
|
736
|
-
this.setFocus("minute");
|
737
|
-
event.preventDefault();
|
738
|
-
break;
|
739
|
-
case "ArrowRight":
|
740
|
-
if (this.hourCycle === "12") {
|
741
|
-
this.setFocus("meridiem");
|
742
|
-
event.preventDefault();
|
743
|
-
}
|
744
|
-
break;
|
745
|
-
}
|
746
|
-
break;
|
747
|
-
case this.meridiemEl:
|
748
|
-
switch (key) {
|
749
|
-
case "ArrowLeft":
|
750
|
-
if (this.step !== 60) {
|
751
|
-
this.setFocus("second");
|
752
|
-
event.preventDefault();
|
753
|
-
}
|
754
|
-
else {
|
755
|
-
this.setFocus("minute");
|
756
|
-
event.preventDefault();
|
757
|
-
}
|
758
|
-
break;
|
759
|
-
}
|
760
|
-
break;
|
761
|
-
}
|
762
|
-
}
|
763
|
-
//--------------------------------------------------------------------------
|
764
|
-
//
|
765
|
-
// Public Methods
|
766
|
-
//
|
767
|
-
//--------------------------------------------------------------------------
|
768
|
-
/**
|
769
|
-
* Sets focus on the component.
|
770
|
-
*
|
771
|
-
* @param target
|
772
|
-
*/
|
773
|
-
async setFocus(target) {
|
774
|
-
var _a;
|
775
|
-
(_a = this[`${target || "hour"}El`]) === null || _a === void 0 ? void 0 : _a.focus();
|
776
|
-
}
|
777
|
-
// --------------------------------------------------------------------------
|
778
|
-
//
|
779
|
-
// Private Methods
|
780
|
-
//
|
781
|
-
// --------------------------------------------------------------------------
|
782
|
-
buttonActivated(event) {
|
783
|
-
const { key } = event;
|
784
|
-
if (key === " ") {
|
785
|
-
event.preventDefault();
|
786
|
-
}
|
787
|
-
return isActivationKey(key);
|
788
|
-
}
|
789
|
-
getMeridiemOrder(formatParts) {
|
790
|
-
const locale = this.effectiveLocale;
|
791
|
-
const isRTLKind = locale === "ar" || locale === "he";
|
792
|
-
if (formatParts && !isRTLKind) {
|
793
|
-
const index = formatParts.findIndex((parts) => {
|
794
|
-
return parts.value === this.localizedMeridiem;
|
795
|
-
});
|
796
|
-
return index;
|
797
|
-
}
|
798
|
-
return 0;
|
799
|
-
}
|
800
|
-
updateLocale() {
|
801
|
-
this.hourCycle = getLocaleHourCycle(this.effectiveLocale, this.numberingSystem);
|
802
|
-
this.setValue(this.value, false);
|
803
|
-
}
|
804
|
-
// --------------------------------------------------------------------------
|
805
|
-
//
|
806
|
-
// Lifecycle
|
807
|
-
//
|
808
|
-
// --------------------------------------------------------------------------
|
809
|
-
connectedCallback() {
|
810
|
-
connectLocalized(this);
|
811
|
-
this.updateLocale();
|
812
|
-
this.meridiemOrder = this.getMeridiemOrder(getTimeParts({
|
813
|
-
value: "0:00:00",
|
814
|
-
locale: this.effectiveLocale,
|
815
|
-
numberingSystem: this.numberingSystem
|
816
|
-
}));
|
817
|
-
}
|
818
|
-
disconnectedCallback() {
|
819
|
-
disconnectLocalized(this);
|
820
|
-
}
|
821
|
-
// --------------------------------------------------------------------------
|
822
|
-
//
|
823
|
-
// Render Methods
|
824
|
-
//
|
825
|
-
// --------------------------------------------------------------------------
|
826
|
-
render() {
|
827
|
-
const hourIsNumber = isValidNumber(this.hour);
|
828
|
-
const iconScale = this.scale === "s" || this.scale === "m" ? "s" : "m";
|
829
|
-
const minuteIsNumber = isValidNumber(this.minute);
|
830
|
-
const secondIsNumber = isValidNumber(this.second);
|
831
|
-
const showMeridiem = this.hourCycle === "12";
|
832
|
-
return (h("div", { class: {
|
833
|
-
[CSS.timePicker]: true,
|
834
|
-
[CSS.showMeridiem]: showMeridiem,
|
835
|
-
[CSS.showSecond]: this.showSecond,
|
836
|
-
[CSS[`scale-${this.scale}`]]: true
|
837
|
-
}, dir: "ltr" }, h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlHourUp, class: {
|
838
|
-
[CSS.button]: true,
|
839
|
-
[CSS.buttonHourUp]: true,
|
840
|
-
[CSS.buttonTopLeft]: true
|
841
|
-
}, onClick: this.incrementHour, onKeyDown: this.hourUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlHour, "aria-valuemax": "23", "aria-valuemin": "1", "aria-valuenow": (hourIsNumber && parseInt(this.hour)) || "0", "aria-valuetext": this.hour, class: {
|
842
|
-
[CSS.input]: true,
|
843
|
-
[CSS.hour]: true
|
844
|
-
}, onFocus: this.focusHandler, onKeyDown: this.hourKeyDownHandler, ref: this.setHourEl, role: "spinbutton", tabIndex: 0 }, this.localizedHour || "--"), h("span", { "aria-label": this.intlHourDown, class: {
|
845
|
-
[CSS.button]: true,
|
846
|
-
[CSS.buttonHourDown]: true,
|
847
|
-
[CSS.buttonBottomLeft]: true
|
848
|
-
}, onClick: this.decrementHour, onKeyDown: this.hourDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale }))), h("span", { class: CSS.delimiter }, this.localizedHourSuffix), h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlMinuteUp, class: {
|
849
|
-
[CSS.button]: true,
|
850
|
-
[CSS.buttonMinuteUp]: true
|
851
|
-
}, onClick: this.incrementMinute, onKeyDown: this.minuteUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlMinute, "aria-valuemax": "12", "aria-valuemin": "1", "aria-valuenow": (minuteIsNumber && parseInt(this.minute)) || "0", "aria-valuetext": this.minute, class: {
|
852
|
-
[CSS.input]: true,
|
853
|
-
[CSS.minute]: true
|
854
|
-
}, onFocus: this.focusHandler, onKeyDown: this.minuteKeyDownHandler, ref: this.setMinuteEl, role: "spinbutton", tabIndex: 0 }, this.localizedMinute || "--"), h("span", { "aria-label": this.intlMinuteDown, class: {
|
855
|
-
[CSS.button]: true,
|
856
|
-
[CSS.buttonMinuteDown]: true
|
857
|
-
}, onClick: this.decrementMinute, onKeyDown: this.minuteDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale }))), this.showSecond && h("span", { class: CSS.delimiter }, this.localizedMinuteSuffix), this.showSecond && (h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlSecondUp, class: {
|
858
|
-
[CSS.button]: true,
|
859
|
-
[CSS.buttonSecondUp]: true
|
860
|
-
}, onClick: this.incrementSecond, onKeyDown: this.secondUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlSecond, "aria-valuemax": "59", "aria-valuemin": "0", "aria-valuenow": (secondIsNumber && parseInt(this.second)) || "0", "aria-valuetext": this.second, class: {
|
861
|
-
[CSS.input]: true,
|
862
|
-
[CSS.second]: true
|
863
|
-
}, onFocus: this.focusHandler, onKeyDown: this.secondKeyDownHandler, ref: this.setSecondEl, role: "spinbutton", tabIndex: 0 }, this.localizedSecond || "--"), h("span", { "aria-label": this.intlSecondDown, class: {
|
864
|
-
[CSS.button]: true,
|
865
|
-
[CSS.buttonSecondDown]: true
|
866
|
-
}, onClick: this.decrementSecond, onKeyDown: this.secondDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale })))), this.localizedSecondSuffix && (h("span", { class: CSS.delimiter }, this.localizedSecondSuffix)), showMeridiem && (h("div", { class: {
|
867
|
-
[CSS.column]: true,
|
868
|
-
[CSS.meridiemStart]: this.meridiemOrder === 0
|
869
|
-
}, role: "group" }, h("span", { "aria-label": this.intlMeridiemUp, class: {
|
870
|
-
[CSS.button]: true,
|
871
|
-
[CSS.buttonMeridiemUp]: true,
|
872
|
-
[CSS.buttonTopRight]: true
|
873
|
-
}, onClick: this.incrementMeridiem, onKeyDown: this.meridiemUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlMeridiem, "aria-valuemax": "2", "aria-valuemin": "1", "aria-valuenow": (this.meridiem === "PM" && "2") || "1", "aria-valuetext": this.meridiem, class: {
|
874
|
-
[CSS.input]: true,
|
875
|
-
[CSS.meridiem]: true
|
876
|
-
}, onFocus: this.focusHandler, onKeyDown: this.meridiemKeyDownHandler, ref: this.setMeridiemEl, role: "spinbutton", tabIndex: 0 }, this.localizedMeridiem || "--"), h("span", { "aria-label": this.intlMeridiemDown, class: {
|
877
|
-
[CSS.button]: true,
|
878
|
-
[CSS.buttonMeridiemDown]: true,
|
879
|
-
[CSS.buttonBottomRight]: true
|
880
|
-
}, onClick: this.decrementMeridiem, onKeyDown: this.meridiemDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale }))))));
|
881
|
-
}
|
882
|
-
get el() { return this; }
|
883
|
-
static get watchers() { return {
|
884
|
-
"locale": ["localeChanged"],
|
885
|
-
"value": ["valueWatcher"],
|
886
|
-
"effectiveLocale": ["effectiveLocaleWatcher"]
|
887
|
-
}; }
|
888
|
-
static get style() { return timePickerCss; }
|
889
|
-
}, [1, "calcite-time-picker", {
|
890
|
-
"intlHour": [1, "intl-hour"],
|
891
|
-
"intlHourDown": [1, "intl-hour-down"],
|
892
|
-
"intlHourUp": [1, "intl-hour-up"],
|
893
|
-
"intlMeridiem": [1, "intl-meridiem"],
|
894
|
-
"intlMeridiemDown": [1, "intl-meridiem-down"],
|
895
|
-
"intlMeridiemUp": [1, "intl-meridiem-up"],
|
896
|
-
"intlMinute": [1, "intl-minute"],
|
897
|
-
"intlMinuteDown": [1, "intl-minute-down"],
|
898
|
-
"intlMinuteUp": [1, "intl-minute-up"],
|
899
|
-
"intlSecond": [1, "intl-second"],
|
900
|
-
"intlSecondDown": [1, "intl-second-down"],
|
901
|
-
"intlSecondUp": [1, "intl-second-up"],
|
902
|
-
"locale": [1025],
|
903
|
-
"scale": [513],
|
904
|
-
"step": [514],
|
905
|
-
"numberingSystem": [1, "numbering-system"],
|
906
|
-
"value": [1025],
|
907
|
-
"effectiveLocale": [32],
|
908
|
-
"hour": [32],
|
909
|
-
"hourCycle": [32],
|
910
|
-
"localizedHour": [32],
|
911
|
-
"localizedHourSuffix": [32],
|
912
|
-
"localizedMeridiem": [32],
|
913
|
-
"localizedMinute": [32],
|
914
|
-
"localizedMinuteSuffix": [32],
|
915
|
-
"localizedSecond": [32],
|
916
|
-
"localizedSecondSuffix": [32],
|
917
|
-
"meridiem": [32],
|
918
|
-
"minute": [32],
|
919
|
-
"second": [32],
|
920
|
-
"showSecond": [32],
|
921
|
-
"setFocus": [64]
|
922
|
-
}, [[0, "blur", "hostBlurHandler"], [0, "focus", "hostFocusHandler"], [0, "keydown", "keyDownHandler"]]]);
|
923
|
-
function defineCustomElement() {
|
924
|
-
if (typeof customElements === "undefined") {
|
925
|
-
return;
|
926
|
-
}
|
927
|
-
const components = ["calcite-time-picker", "calcite-icon"];
|
928
|
-
components.forEach(tagName => { switch (tagName) {
|
929
|
-
case "calcite-time-picker":
|
930
|
-
if (!customElements.get(tagName)) {
|
931
|
-
customElements.define(tagName, TimePicker);
|
932
|
-
}
|
933
|
-
break;
|
934
|
-
case "calcite-icon":
|
935
|
-
if (!customElements.get(tagName)) {
|
936
|
-
defineCustomElement$1();
|
937
|
-
}
|
938
|
-
break;
|
939
|
-
} });
|
940
|
-
}
|
941
|
-
defineCustomElement();
|
942
|
-
|
943
|
-
export { TimePicker as T, defineCustomElement as d, formatTimeString as f, isValidTime as i, localizeTimeString as l };
|
944
|
-
|
945
|
-
//# sourceMappingURL=time-picker.js.map
|