@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,914 +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, Host } from '@stencil/core/internal/client';
|
7
|
-
import { f as filter } from './filter.js';
|
8
|
-
import { d as defaultMenuPlacement, f as filterComputedPlacements, c as connectFloatingUI, u as updateAfterClose, r as reposition, a as disconnectFloatingUI, F as FloatingCSS } from './floating-ui.js';
|
9
|
-
import { g as guid } from './guid.js';
|
10
|
-
import { T as TEXT, C as ComboboxItemGroup, b as ComboboxChildSelector, c as getItemAncestors, d as getItemChildren, h as hasActiveChildren, e as ComboboxItem } from './utils2.js';
|
11
|
-
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label2.js';
|
12
|
-
import { s as submitForm, c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from './form.js';
|
13
|
-
import { c as createObserver } from './observers.js';
|
14
|
-
import { u as updateHostInteraction } from './interactive.js';
|
15
|
-
import { i as isPrimaryPointerButton, t as toAriaBoolean } from './dom.js';
|
16
|
-
import { c as connectOpenCloseComponent, d as disconnectOpenCloseComponent } from './openCloseComponent.js';
|
17
|
-
import { d as defineCustomElement$2 } from './chip.js';
|
18
|
-
import { d as defineCustomElement$1 } from './icon.js';
|
19
|
-
import { d as debounce } from './debounce.js';
|
20
|
-
|
21
|
-
const comboboxCss = "@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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;-webkit-margin-after:var(--calcite-combobox-item-spacing-unit-s);margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}.floating-ui-container--active{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
|
22
|
-
|
23
|
-
const isGroup = (el) => el.tagName === ComboboxItemGroup;
|
24
|
-
const itemUidPrefix = "combobox-item-";
|
25
|
-
const chipUidPrefix = "combobox-chip-";
|
26
|
-
const labelUidPrefix = "combobox-label-";
|
27
|
-
const listboxUidPrefix = "combobox-listbox-";
|
28
|
-
const inputUidPrefix = "combobox-input-";
|
29
|
-
const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
30
|
-
constructor() {
|
31
|
-
super();
|
32
|
-
this.__registerHost();
|
33
|
-
this.__attachShadow();
|
34
|
-
this.calciteLookupChange = createEvent(this, "calciteLookupChange", 6);
|
35
|
-
this.calciteComboboxChange = createEvent(this, "calciteComboboxChange", 6);
|
36
|
-
this.calciteComboboxFilterChange = createEvent(this, "calciteComboboxFilterChange", 6);
|
37
|
-
this.calciteComboboxChipDismiss = createEvent(this, "calciteComboboxChipDismiss", 6);
|
38
|
-
this.calciteComboboxBeforeClose = createEvent(this, "calciteComboboxBeforeClose", 6);
|
39
|
-
this.calciteComboboxClose = createEvent(this, "calciteComboboxClose", 6);
|
40
|
-
this.calciteComboboxBeforeOpen = createEvent(this, "calciteComboboxBeforeOpen", 6);
|
41
|
-
this.calciteComboboxOpen = createEvent(this, "calciteComboboxOpen", 6);
|
42
|
-
//--------------------------------------------------------------------------
|
43
|
-
//
|
44
|
-
// Public Properties
|
45
|
-
//
|
46
|
-
//--------------------------------------------------------------------------
|
47
|
-
/**
|
48
|
-
* When `true`, displays and positions the component.
|
49
|
-
*
|
50
|
-
* @deprecated use `open` instead.
|
51
|
-
*/
|
52
|
-
this.active = false;
|
53
|
-
/**When `true`, displays and positions the component. */
|
54
|
-
this.open = false;
|
55
|
-
/** When `true`, interaction is prevented and the component is displayed with lower opacity. */
|
56
|
-
this.disabled = false;
|
57
|
-
/** Specifies the maximum number of `calcite-combobox-item`s (including nested children) to display before displaying a scrollbar. */
|
58
|
-
this.maxItems = 0;
|
59
|
-
/**
|
60
|
-
* Determines the type of positioning to use for the overlaid content.
|
61
|
-
*
|
62
|
-
* Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout.
|
63
|
-
*
|
64
|
-
* `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`.
|
65
|
-
*
|
66
|
-
*/
|
67
|
-
this.overlayPositioning = "absolute";
|
68
|
-
/**
|
69
|
-
* When `true`, the component must have a value in order for the form to submit.
|
70
|
-
*
|
71
|
-
* @internal
|
72
|
-
*/
|
73
|
-
this.required = false;
|
74
|
-
/**
|
75
|
-
* Specifies the selection mode -
|
76
|
-
* `"multi"` (allow any number of selected items),
|
77
|
-
* `"single"` (allow only one selection), or
|
78
|
-
* `"ancestors"` (like `"multi"`, but show ancestors of selected items as selected. Only the deepest children are shown in `calcite-chip`s).
|
79
|
-
*/
|
80
|
-
this.selectionMode = "multi";
|
81
|
-
/** Specifies the size of the component. */
|
82
|
-
this.scale = "m";
|
83
|
-
/** The component's value(s) from the selected `calcite-combobox-item`(s). */
|
84
|
-
this.value = null;
|
85
|
-
/**
|
86
|
-
* Accessible name for the component's remove tag when a `calcite-combobox-item` is selected.
|
87
|
-
*
|
88
|
-
* @default "Remove tag"
|
89
|
-
*/
|
90
|
-
this.intlRemoveTag = TEXT.removeTag;
|
91
|
-
//--------------------------------------------------------------------------
|
92
|
-
//
|
93
|
-
// Private State/Props
|
94
|
-
//
|
95
|
-
//--------------------------------------------------------------------------
|
96
|
-
this.placement = defaultMenuPlacement;
|
97
|
-
this.internalValueChangeFlag = false;
|
98
|
-
this.items = [];
|
99
|
-
this.groupItems = [];
|
100
|
-
this.selectedItems = [];
|
101
|
-
this.visibleItems = [];
|
102
|
-
this.activeItemIndex = -1;
|
103
|
-
this.activeChipIndex = -1;
|
104
|
-
this.activeDescendant = "";
|
105
|
-
this.text = "";
|
106
|
-
this.textInput = null;
|
107
|
-
this.mutationObserver = createObserver("mutation", () => this.updateItems());
|
108
|
-
this.resizeObserver = createObserver("resize", () => this.setMaxScrollerHeight());
|
109
|
-
this.guid = guid();
|
110
|
-
this.inputHeight = 0;
|
111
|
-
this.ignoreSelectedEventsFlag = false;
|
112
|
-
this.openTransitionProp = "opacity";
|
113
|
-
// --------------------------------------------------------------------------
|
114
|
-
//
|
115
|
-
// Private Methods
|
116
|
-
//
|
117
|
-
// --------------------------------------------------------------------------
|
118
|
-
this.setFilteredPlacements = () => {
|
119
|
-
const { el, flipPlacements } = this;
|
120
|
-
this.filteredFlipPlacements = flipPlacements
|
121
|
-
? filterComputedPlacements(flipPlacements, el)
|
122
|
-
: null;
|
123
|
-
};
|
124
|
-
this.getValue = () => {
|
125
|
-
const items = this.selectedItems.map((item) => { var _a; return (_a = item === null || item === void 0 ? void 0 : item.value) === null || _a === void 0 ? void 0 : _a.toString(); });
|
126
|
-
return (items === null || items === void 0 ? void 0 : items.length) ? (items.length > 1 ? items : items[0]) : "";
|
127
|
-
};
|
128
|
-
this.onLabelClick = () => {
|
129
|
-
this.setFocus();
|
130
|
-
};
|
131
|
-
this.keydownHandler = (event) => {
|
132
|
-
const { key } = event;
|
133
|
-
switch (key) {
|
134
|
-
case "Tab":
|
135
|
-
this.activeChipIndex = -1;
|
136
|
-
this.activeItemIndex = -1;
|
137
|
-
if (this.allowCustomValues && this.text) {
|
138
|
-
this.addCustomChip(this.text, true);
|
139
|
-
event.preventDefault();
|
140
|
-
}
|
141
|
-
else if (this.open) {
|
142
|
-
this.open = false;
|
143
|
-
event.preventDefault();
|
144
|
-
}
|
145
|
-
break;
|
146
|
-
case "ArrowLeft":
|
147
|
-
this.previousChip();
|
148
|
-
event.preventDefault();
|
149
|
-
break;
|
150
|
-
case "ArrowRight":
|
151
|
-
this.nextChip();
|
152
|
-
event.preventDefault();
|
153
|
-
break;
|
154
|
-
case "ArrowUp":
|
155
|
-
event.preventDefault();
|
156
|
-
this.shiftActiveItemIndex(-1);
|
157
|
-
if (!this.comboboxInViewport()) {
|
158
|
-
this.el.scrollIntoView();
|
159
|
-
}
|
160
|
-
break;
|
161
|
-
case "ArrowDown":
|
162
|
-
event.preventDefault();
|
163
|
-
if (!this.open) {
|
164
|
-
this.open = true;
|
165
|
-
}
|
166
|
-
this.shiftActiveItemIndex(1);
|
167
|
-
if (!this.comboboxInViewport()) {
|
168
|
-
this.el.scrollIntoView();
|
169
|
-
}
|
170
|
-
break;
|
171
|
-
case " ":
|
172
|
-
if (!this.textInput.value) {
|
173
|
-
event.preventDefault();
|
174
|
-
this.open = true;
|
175
|
-
this.shiftActiveItemIndex(1);
|
176
|
-
}
|
177
|
-
break;
|
178
|
-
case "Home":
|
179
|
-
if (!this.open) {
|
180
|
-
return;
|
181
|
-
}
|
182
|
-
event.preventDefault();
|
183
|
-
this.updateActiveItemIndex(0);
|
184
|
-
this.scrollToActiveItem();
|
185
|
-
if (!this.comboboxInViewport()) {
|
186
|
-
this.el.scrollIntoView();
|
187
|
-
}
|
188
|
-
break;
|
189
|
-
case "End":
|
190
|
-
if (!this.open) {
|
191
|
-
return;
|
192
|
-
}
|
193
|
-
event.preventDefault();
|
194
|
-
this.updateActiveItemIndex(this.visibleItems.length - 1);
|
195
|
-
this.scrollToActiveItem();
|
196
|
-
if (!this.comboboxInViewport()) {
|
197
|
-
this.el.scrollIntoView();
|
198
|
-
}
|
199
|
-
break;
|
200
|
-
case "Escape":
|
201
|
-
this.open = false;
|
202
|
-
event.preventDefault();
|
203
|
-
break;
|
204
|
-
case "Enter":
|
205
|
-
if (this.activeItemIndex > -1) {
|
206
|
-
this.toggleSelection(this.visibleItems[this.activeItemIndex]);
|
207
|
-
event.preventDefault();
|
208
|
-
}
|
209
|
-
else if (this.activeChipIndex > -1) {
|
210
|
-
this.removeActiveChip();
|
211
|
-
event.preventDefault();
|
212
|
-
}
|
213
|
-
else if (this.allowCustomValues && this.text) {
|
214
|
-
this.addCustomChip(this.text, true);
|
215
|
-
event.preventDefault();
|
216
|
-
}
|
217
|
-
else if (!event.defaultPrevented) {
|
218
|
-
if (submitForm(this)) {
|
219
|
-
event.preventDefault();
|
220
|
-
}
|
221
|
-
}
|
222
|
-
break;
|
223
|
-
case "Delete":
|
224
|
-
case "Backspace":
|
225
|
-
if (this.activeChipIndex > -1) {
|
226
|
-
event.preventDefault();
|
227
|
-
this.removeActiveChip();
|
228
|
-
}
|
229
|
-
else if (!this.text && this.isMulti()) {
|
230
|
-
event.preventDefault();
|
231
|
-
this.removeLastChip();
|
232
|
-
}
|
233
|
-
break;
|
234
|
-
}
|
235
|
-
};
|
236
|
-
this.toggleCloseEnd = () => {
|
237
|
-
this.open = false;
|
238
|
-
this.el.removeEventListener("calciteComboboxClose", this.toggleCloseEnd);
|
239
|
-
};
|
240
|
-
this.toggleOpenEnd = () => {
|
241
|
-
this.open = false;
|
242
|
-
this.el.removeEventListener("calciteComboboxOpen", this.toggleOpenEnd);
|
243
|
-
};
|
244
|
-
this.setMaxScrollerHeight = async () => {
|
245
|
-
const { listContainerEl, open, referenceEl } = this;
|
246
|
-
if (!listContainerEl || !open) {
|
247
|
-
return;
|
248
|
-
}
|
249
|
-
await this.reposition(true);
|
250
|
-
const maxScrollerHeight = this.getMaxScrollerHeight();
|
251
|
-
listContainerEl.style.maxHeight = maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : "";
|
252
|
-
listContainerEl.style.minWidth = `${referenceEl.clientWidth}px`;
|
253
|
-
await this.reposition(true);
|
254
|
-
};
|
255
|
-
this.calciteChipDismissHandler = (event, comboboxItem) => {
|
256
|
-
this.open = false;
|
257
|
-
const selection = this.items.find((item) => item === comboboxItem);
|
258
|
-
if (selection) {
|
259
|
-
this.toggleSelection(selection, false);
|
260
|
-
}
|
261
|
-
this.calciteComboboxChipDismiss.emit(event.detail);
|
262
|
-
};
|
263
|
-
this.clickHandler = (event) => {
|
264
|
-
if (event.composedPath().some((node) => node.tagName === "CALCITE-CHIP")) {
|
265
|
-
return;
|
266
|
-
}
|
267
|
-
this.open = !this.open;
|
268
|
-
this.updateActiveItemIndex(0);
|
269
|
-
this.setFocus();
|
270
|
-
};
|
271
|
-
this.setInactiveIfNotContained = (event) => {
|
272
|
-
const composedPath = event.composedPath();
|
273
|
-
if (!this.open || composedPath.includes(this.el) || composedPath.includes(this.referenceEl)) {
|
274
|
-
return;
|
275
|
-
}
|
276
|
-
if (this.allowCustomValues && this.text.trim().length) {
|
277
|
-
this.addCustomChip(this.text);
|
278
|
-
}
|
279
|
-
if (this.selectionMode === "single") {
|
280
|
-
if (this.textInput) {
|
281
|
-
this.textInput.value = "";
|
282
|
-
}
|
283
|
-
this.text = "";
|
284
|
-
this.filterItems("");
|
285
|
-
this.updateActiveItemIndex(-1);
|
286
|
-
}
|
287
|
-
this.open = false;
|
288
|
-
};
|
289
|
-
this.setFloatingEl = (el) => {
|
290
|
-
this.floatingEl = el;
|
291
|
-
connectFloatingUI(this, this.referenceEl, this.floatingEl);
|
292
|
-
};
|
293
|
-
this.setContainerEl = (el) => {
|
294
|
-
this.resizeObserver.observe(el);
|
295
|
-
this.listContainerEl = el;
|
296
|
-
this.transitionEl = el;
|
297
|
-
connectOpenCloseComponent(this);
|
298
|
-
};
|
299
|
-
this.setReferenceEl = (el) => {
|
300
|
-
this.referenceEl = el;
|
301
|
-
connectFloatingUI(this, this.referenceEl, this.floatingEl);
|
302
|
-
};
|
303
|
-
this.inputHandler = (event) => {
|
304
|
-
const value = event.target.value;
|
305
|
-
this.text = value;
|
306
|
-
this.filterItems(value);
|
307
|
-
if (value) {
|
308
|
-
this.activeChipIndex = -1;
|
309
|
-
}
|
310
|
-
};
|
311
|
-
this.filterItems = (() => {
|
312
|
-
const find = (item, filteredData) => item &&
|
313
|
-
filteredData.some(({ label, value }) => {
|
314
|
-
if (isGroup(item)) {
|
315
|
-
return value === item.label;
|
316
|
-
}
|
317
|
-
return (value === item.textLabel ||
|
318
|
-
value === item.value ||
|
319
|
-
label === item.textLabel ||
|
320
|
-
label === item.value);
|
321
|
-
});
|
322
|
-
return debounce((text) => {
|
323
|
-
const filteredData = filter(this.data, text);
|
324
|
-
const items = this.getCombinedItems();
|
325
|
-
items.forEach((item) => {
|
326
|
-
const hidden = !find(item, filteredData);
|
327
|
-
item.hidden = hidden;
|
328
|
-
const [parent, grandparent] = item.ancestors;
|
329
|
-
if (find(parent, filteredData) || find(grandparent, filteredData)) {
|
330
|
-
item.hidden = false;
|
331
|
-
}
|
332
|
-
if (!hidden) {
|
333
|
-
item.ancestors.forEach((ancestor) => (ancestor.hidden = false));
|
334
|
-
}
|
335
|
-
});
|
336
|
-
this.visibleItems = this.getVisibleItems();
|
337
|
-
this.calciteComboboxFilterChange.emit({ visibleItems: [...this.visibleItems], text: text });
|
338
|
-
}, 100);
|
339
|
-
})();
|
340
|
-
this.internalCalciteLookupChangeEvent = () => {
|
341
|
-
this.calciteLookupChange.emit(this.selectedItems);
|
342
|
-
};
|
343
|
-
this.emitCalciteLookupChange = debounce(this.internalCalciteLookupChangeEvent, 0);
|
344
|
-
this.internalComboboxChangeEvent = () => {
|
345
|
-
const { selectedItems } = this;
|
346
|
-
this.calciteComboboxChange.emit({ selectedItems });
|
347
|
-
};
|
348
|
-
this.emitComboboxChange = debounce(this.internalComboboxChangeEvent, 0);
|
349
|
-
this.updateItems = () => {
|
350
|
-
this.items = this.getItems();
|
351
|
-
this.groupItems = this.getGroupItems();
|
352
|
-
this.data = this.getData();
|
353
|
-
this.selectedItems = this.getSelectedItems();
|
354
|
-
this.visibleItems = this.getVisibleItems();
|
355
|
-
this.needsIcon = this.getNeedsIcon();
|
356
|
-
if (!this.allowCustomValues) {
|
357
|
-
this.setMaxScrollerHeight();
|
358
|
-
}
|
359
|
-
};
|
360
|
-
this.scrollToActiveItem = () => {
|
361
|
-
const activeItem = this.visibleItems[this.activeItemIndex];
|
362
|
-
const height = this.calculateSingleItemHeight(activeItem);
|
363
|
-
const { offsetHeight, scrollTop } = this.listContainerEl;
|
364
|
-
if (offsetHeight + scrollTop < activeItem.offsetTop + height) {
|
365
|
-
this.listContainerEl.scrollTop = activeItem.offsetTop - offsetHeight + height;
|
366
|
-
}
|
367
|
-
else if (activeItem.offsetTop < scrollTop) {
|
368
|
-
this.listContainerEl.scrollTop = activeItem.offsetTop;
|
369
|
-
}
|
370
|
-
};
|
371
|
-
this.comboboxFocusHandler = () => {
|
372
|
-
var _a;
|
373
|
-
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
374
|
-
};
|
375
|
-
this.comboboxBlurHandler = (event) => {
|
376
|
-
this.setInactiveIfNotContained(event);
|
377
|
-
};
|
378
|
-
}
|
379
|
-
activeHandler(value) {
|
380
|
-
if (this.disabled) {
|
381
|
-
this.active = false;
|
382
|
-
this.open = false;
|
383
|
-
return;
|
384
|
-
}
|
385
|
-
this.open = value;
|
386
|
-
}
|
387
|
-
openHandler(value) {
|
388
|
-
if (!value) {
|
389
|
-
updateAfterClose(this.floatingEl);
|
390
|
-
}
|
391
|
-
if (this.disabled) {
|
392
|
-
this.active = false;
|
393
|
-
this.open = false;
|
394
|
-
return;
|
395
|
-
}
|
396
|
-
this.active = value;
|
397
|
-
this.setMaxScrollerHeight();
|
398
|
-
}
|
399
|
-
handleDisabledChange(value) {
|
400
|
-
if (!value) {
|
401
|
-
this.active = false;
|
402
|
-
this.open = false;
|
403
|
-
}
|
404
|
-
}
|
405
|
-
maxItemsHandler() {
|
406
|
-
this.setMaxScrollerHeight();
|
407
|
-
}
|
408
|
-
overlayPositioningHandler() {
|
409
|
-
this.reposition(true);
|
410
|
-
}
|
411
|
-
valueHandler(value) {
|
412
|
-
if (!this.internalValueChangeFlag) {
|
413
|
-
const items = this.getItems();
|
414
|
-
if (Array.isArray(value)) {
|
415
|
-
items.forEach((item) => (item.selected = value.includes(item.value)));
|
416
|
-
}
|
417
|
-
else if (value) {
|
418
|
-
items.forEach((item) => (item.selected = value === item.value));
|
419
|
-
}
|
420
|
-
else {
|
421
|
-
items.forEach((item) => (item.selected = false));
|
422
|
-
}
|
423
|
-
this.updateItems();
|
424
|
-
}
|
425
|
-
}
|
426
|
-
flipPlacementsHandler() {
|
427
|
-
this.setFilteredPlacements();
|
428
|
-
this.reposition(true);
|
429
|
-
}
|
430
|
-
//--------------------------------------------------------------------------
|
431
|
-
//
|
432
|
-
// Event Listeners
|
433
|
-
//
|
434
|
-
//--------------------------------------------------------------------------
|
435
|
-
documentClickHandler(event) {
|
436
|
-
if (!isPrimaryPointerButton(event)) {
|
437
|
-
return;
|
438
|
-
}
|
439
|
-
this.setInactiveIfNotContained(event);
|
440
|
-
}
|
441
|
-
calciteComboboxItemChangeHandler(event) {
|
442
|
-
if (this.ignoreSelectedEventsFlag) {
|
443
|
-
return;
|
444
|
-
}
|
445
|
-
const target = event.target;
|
446
|
-
const newIndex = this.visibleItems.indexOf(target);
|
447
|
-
this.updateActiveItemIndex(newIndex);
|
448
|
-
this.toggleSelection(target, target.selected);
|
449
|
-
}
|
450
|
-
//--------------------------------------------------------------------------
|
451
|
-
//
|
452
|
-
// Public Methods
|
453
|
-
//
|
454
|
-
//--------------------------------------------------------------------------
|
455
|
-
/**
|
456
|
-
* Updates the position of the component.
|
457
|
-
*
|
458
|
-
* @param delayed
|
459
|
-
*/
|
460
|
-
async reposition(delayed = false) {
|
461
|
-
const { floatingEl, referenceEl, placement, overlayPositioning, filteredFlipPlacements } = this;
|
462
|
-
return reposition(this, {
|
463
|
-
floatingEl,
|
464
|
-
referenceEl,
|
465
|
-
overlayPositioning,
|
466
|
-
placement,
|
467
|
-
flipPlacements: filteredFlipPlacements,
|
468
|
-
type: "menu"
|
469
|
-
}, delayed);
|
470
|
-
}
|
471
|
-
/** Sets focus on the component. */
|
472
|
-
async setFocus() {
|
473
|
-
var _a;
|
474
|
-
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
475
|
-
this.activeChipIndex = -1;
|
476
|
-
this.activeItemIndex = -1;
|
477
|
-
}
|
478
|
-
// --------------------------------------------------------------------------
|
479
|
-
//
|
480
|
-
// Lifecycle
|
481
|
-
//
|
482
|
-
// --------------------------------------------------------------------------
|
483
|
-
connectedCallback() {
|
484
|
-
var _a;
|
485
|
-
this.internalValueChangeFlag = true;
|
486
|
-
this.value = this.getValue();
|
487
|
-
this.internalValueChangeFlag = false;
|
488
|
-
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
489
|
-
connectLabel(this);
|
490
|
-
connectForm(this);
|
491
|
-
connectOpenCloseComponent(this);
|
492
|
-
this.setFilteredPlacements();
|
493
|
-
this.reposition(true);
|
494
|
-
if (this.active) {
|
495
|
-
this.activeHandler(this.active);
|
496
|
-
}
|
497
|
-
if (this.open) {
|
498
|
-
this.openHandler(this.open);
|
499
|
-
}
|
500
|
-
}
|
501
|
-
componentWillLoad() {
|
502
|
-
this.updateItems();
|
503
|
-
}
|
504
|
-
componentDidLoad() {
|
505
|
-
afterConnectDefaultValueSet(this, this.getValue());
|
506
|
-
this.reposition(true);
|
507
|
-
}
|
508
|
-
componentDidRender() {
|
509
|
-
if (this.el.offsetHeight !== this.inputHeight) {
|
510
|
-
this.reposition(true);
|
511
|
-
this.inputHeight = this.el.offsetHeight;
|
512
|
-
}
|
513
|
-
updateHostInteraction(this);
|
514
|
-
}
|
515
|
-
disconnectedCallback() {
|
516
|
-
var _a, _b;
|
517
|
-
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
518
|
-
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
519
|
-
disconnectLabel(this);
|
520
|
-
disconnectForm(this);
|
521
|
-
disconnectFloatingUI(this, this.referenceEl, this.floatingEl);
|
522
|
-
disconnectOpenCloseComponent(this);
|
523
|
-
}
|
524
|
-
selectedItemsHandler() {
|
525
|
-
this.internalValueChangeFlag = true;
|
526
|
-
this.value = this.getValue();
|
527
|
-
this.internalValueChangeFlag = false;
|
528
|
-
}
|
529
|
-
/** when search text is cleared, reset active to */
|
530
|
-
textHandler() {
|
531
|
-
this.updateActiveItemIndex(-1);
|
532
|
-
}
|
533
|
-
comboboxInViewport() {
|
534
|
-
const bounding = this.el.getBoundingClientRect();
|
535
|
-
return (bounding.top >= 0 &&
|
536
|
-
bounding.left >= 0 &&
|
537
|
-
bounding.right <= (window.innerWidth || document.documentElement.clientWidth) &&
|
538
|
-
bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight));
|
539
|
-
}
|
540
|
-
onBeforeOpen() {
|
541
|
-
this.calciteComboboxBeforeOpen.emit();
|
542
|
-
}
|
543
|
-
onOpen() {
|
544
|
-
this.calciteComboboxOpen.emit();
|
545
|
-
}
|
546
|
-
onBeforeClose() {
|
547
|
-
this.calciteComboboxBeforeClose.emit();
|
548
|
-
}
|
549
|
-
onClose() {
|
550
|
-
this.calciteComboboxClose.emit();
|
551
|
-
}
|
552
|
-
getMaxScrollerHeight() {
|
553
|
-
const items = this.getCombinedItems().filter((item) => !item.hidden);
|
554
|
-
const { maxItems } = this;
|
555
|
-
let itemsToProcess = 0;
|
556
|
-
let maxScrollerHeight = 0;
|
557
|
-
if (items.length > maxItems) {
|
558
|
-
items.forEach((item) => {
|
559
|
-
if (itemsToProcess < maxItems && maxItems > 0) {
|
560
|
-
const height = this.calculateSingleItemHeight(item);
|
561
|
-
if (height > 0) {
|
562
|
-
maxScrollerHeight += height;
|
563
|
-
itemsToProcess++;
|
564
|
-
}
|
565
|
-
}
|
566
|
-
});
|
567
|
-
}
|
568
|
-
return maxScrollerHeight;
|
569
|
-
}
|
570
|
-
calculateSingleItemHeight(item) {
|
571
|
-
let height = item.offsetHeight;
|
572
|
-
// if item has children items, don't count their height twice
|
573
|
-
const children = Array.from(item.querySelectorAll(ComboboxChildSelector));
|
574
|
-
children
|
575
|
-
.map((child) => child === null || child === void 0 ? void 0 : child.offsetHeight)
|
576
|
-
.forEach((offsetHeight) => {
|
577
|
-
height -= offsetHeight;
|
578
|
-
});
|
579
|
-
return height;
|
580
|
-
}
|
581
|
-
getCombinedItems() {
|
582
|
-
return [...this.groupItems, ...this.items];
|
583
|
-
}
|
584
|
-
toggleSelection(item, value = !item.selected) {
|
585
|
-
if (!item) {
|
586
|
-
return;
|
587
|
-
}
|
588
|
-
if (this.isMulti()) {
|
589
|
-
item.selected = value;
|
590
|
-
this.updateAncestors(item);
|
591
|
-
this.selectedItems = this.getSelectedItems();
|
592
|
-
this.emitCalciteLookupChange();
|
593
|
-
this.emitComboboxChange();
|
594
|
-
this.resetText();
|
595
|
-
this.filterItems("");
|
596
|
-
}
|
597
|
-
else {
|
598
|
-
this.ignoreSelectedEventsFlag = true;
|
599
|
-
this.items.forEach((el) => (el.selected = el === item ? value : false));
|
600
|
-
this.ignoreSelectedEventsFlag = false;
|
601
|
-
this.selectedItems = this.getSelectedItems();
|
602
|
-
this.emitComboboxChange();
|
603
|
-
if (this.textInput) {
|
604
|
-
this.textInput.value = item.textLabel;
|
605
|
-
}
|
606
|
-
this.open = false;
|
607
|
-
this.updateActiveItemIndex(-1);
|
608
|
-
this.resetText();
|
609
|
-
this.filterItems("");
|
610
|
-
}
|
611
|
-
}
|
612
|
-
updateAncestors(item) {
|
613
|
-
if (this.selectionMode !== "ancestors") {
|
614
|
-
return;
|
615
|
-
}
|
616
|
-
const ancestors = getItemAncestors(item);
|
617
|
-
const children = getItemChildren(item);
|
618
|
-
if (item.selected) {
|
619
|
-
ancestors.forEach((el) => {
|
620
|
-
el.selected = true;
|
621
|
-
});
|
622
|
-
}
|
623
|
-
else {
|
624
|
-
children.forEach((el) => (el.selected = false));
|
625
|
-
[...ancestors].forEach((el) => {
|
626
|
-
if (!hasActiveChildren(el)) {
|
627
|
-
el.selected = false;
|
628
|
-
}
|
629
|
-
});
|
630
|
-
}
|
631
|
-
}
|
632
|
-
getVisibleItems() {
|
633
|
-
return this.items.filter((item) => !item.hidden);
|
634
|
-
}
|
635
|
-
getSelectedItems() {
|
636
|
-
if (!this.isMulti()) {
|
637
|
-
const match = this.items.find(({ selected }) => selected);
|
638
|
-
return match ? [match] : [];
|
639
|
-
}
|
640
|
-
return (this.items
|
641
|
-
.filter((item) => item.selected && (this.selectionMode !== "ancestors" || !hasActiveChildren(item)))
|
642
|
-
/** Preserve order of entered tags */
|
643
|
-
.sort((a, b) => {
|
644
|
-
const aIdx = this.selectedItems.indexOf(a);
|
645
|
-
const bIdx = this.selectedItems.indexOf(b);
|
646
|
-
if (aIdx > -1 && bIdx > -1) {
|
647
|
-
return aIdx - bIdx;
|
648
|
-
}
|
649
|
-
return bIdx - aIdx;
|
650
|
-
}));
|
651
|
-
}
|
652
|
-
getData() {
|
653
|
-
return this.items.map((item) => ({
|
654
|
-
constant: item.constant,
|
655
|
-
filterDisabled: item.filterDisabled,
|
656
|
-
value: item.value,
|
657
|
-
label: item.textLabel
|
658
|
-
}));
|
659
|
-
}
|
660
|
-
getNeedsIcon() {
|
661
|
-
return this.selectionMode === "single" && this.items.some((item) => item.icon);
|
662
|
-
}
|
663
|
-
resetText() {
|
664
|
-
if (this.textInput) {
|
665
|
-
this.textInput.value = "";
|
666
|
-
}
|
667
|
-
this.text = "";
|
668
|
-
}
|
669
|
-
getItems() {
|
670
|
-
const items = Array.from(this.el.querySelectorAll(ComboboxItem));
|
671
|
-
return items.filter((item) => !item.disabled);
|
672
|
-
}
|
673
|
-
getGroupItems() {
|
674
|
-
return Array.from(this.el.querySelectorAll(ComboboxItemGroup));
|
675
|
-
}
|
676
|
-
addCustomChip(value, focus) {
|
677
|
-
const existingItem = this.items.find((el) => el.textLabel === value);
|
678
|
-
if (existingItem) {
|
679
|
-
this.toggleSelection(existingItem, true);
|
680
|
-
}
|
681
|
-
else {
|
682
|
-
if (!this.isMulti()) {
|
683
|
-
this.toggleSelection(this.selectedItems[this.selectedItems.length - 1], false);
|
684
|
-
}
|
685
|
-
const item = document.createElement(ComboboxItem);
|
686
|
-
item.value = value;
|
687
|
-
item.textLabel = value;
|
688
|
-
item.selected = true;
|
689
|
-
this.el.appendChild(item);
|
690
|
-
this.resetText();
|
691
|
-
if (focus) {
|
692
|
-
this.setFocus();
|
693
|
-
}
|
694
|
-
this.updateItems();
|
695
|
-
this.filterItems("");
|
696
|
-
this.emitCalciteLookupChange();
|
697
|
-
this.emitComboboxChange();
|
698
|
-
}
|
699
|
-
}
|
700
|
-
removeActiveChip() {
|
701
|
-
this.toggleSelection(this.selectedItems[this.activeChipIndex], false);
|
702
|
-
this.setFocus();
|
703
|
-
}
|
704
|
-
removeLastChip() {
|
705
|
-
this.toggleSelection(this.selectedItems[this.selectedItems.length - 1], false);
|
706
|
-
this.setFocus();
|
707
|
-
}
|
708
|
-
previousChip() {
|
709
|
-
if (this.text) {
|
710
|
-
return;
|
711
|
-
}
|
712
|
-
const length = this.selectedItems.length - 1;
|
713
|
-
const active = this.activeChipIndex;
|
714
|
-
this.activeChipIndex = active === -1 ? length : Math.max(active - 1, 0);
|
715
|
-
this.updateActiveItemIndex(-1);
|
716
|
-
this.focusChip();
|
717
|
-
}
|
718
|
-
nextChip() {
|
719
|
-
if (this.text || this.activeChipIndex === -1) {
|
720
|
-
return;
|
721
|
-
}
|
722
|
-
const last = this.selectedItems.length - 1;
|
723
|
-
const newIndex = this.activeChipIndex + 1;
|
724
|
-
if (newIndex > last) {
|
725
|
-
this.activeChipIndex = -1;
|
726
|
-
this.setFocus();
|
727
|
-
}
|
728
|
-
else {
|
729
|
-
this.activeChipIndex = newIndex;
|
730
|
-
this.focusChip();
|
731
|
-
}
|
732
|
-
this.updateActiveItemIndex(-1);
|
733
|
-
}
|
734
|
-
focusChip() {
|
735
|
-
var _a;
|
736
|
-
const guid = (_a = this.selectedItems[this.activeChipIndex]) === null || _a === void 0 ? void 0 : _a.guid;
|
737
|
-
const chip = guid
|
738
|
-
? this.referenceEl.querySelector(`#${chipUidPrefix}${guid}`)
|
739
|
-
: null;
|
740
|
-
chip === null || chip === void 0 ? void 0 : chip.setFocus();
|
741
|
-
}
|
742
|
-
shiftActiveItemIndex(delta) {
|
743
|
-
const { length } = this.visibleItems;
|
744
|
-
const newIndex = (this.activeItemIndex + length + delta) % length;
|
745
|
-
this.updateActiveItemIndex(newIndex);
|
746
|
-
this.scrollToActiveItem();
|
747
|
-
}
|
748
|
-
updateActiveItemIndex(index) {
|
749
|
-
var _a;
|
750
|
-
this.activeItemIndex = index;
|
751
|
-
let activeDescendant = null;
|
752
|
-
this.visibleItems.forEach((el, i) => {
|
753
|
-
if (i === index) {
|
754
|
-
el.active = true;
|
755
|
-
activeDescendant = `${itemUidPrefix}${el.guid}`;
|
756
|
-
}
|
757
|
-
else {
|
758
|
-
el.active = false;
|
759
|
-
}
|
760
|
-
});
|
761
|
-
this.activeDescendant = activeDescendant;
|
762
|
-
if (this.activeItemIndex > -1) {
|
763
|
-
this.activeChipIndex = -1;
|
764
|
-
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
765
|
-
}
|
766
|
-
}
|
767
|
-
isMulti() {
|
768
|
-
return this.selectionMode !== "single";
|
769
|
-
}
|
770
|
-
//--------------------------------------------------------------------------
|
771
|
-
//
|
772
|
-
// Render Methods
|
773
|
-
//
|
774
|
-
//--------------------------------------------------------------------------
|
775
|
-
renderChips() {
|
776
|
-
const { activeChipIndex, scale, selectionMode, intlRemoveTag } = this;
|
777
|
-
return this.selectedItems.map((item, i) => {
|
778
|
-
const chipClasses = {
|
779
|
-
chip: true,
|
780
|
-
"chip--active": activeChipIndex === i
|
781
|
-
};
|
782
|
-
const ancestors = [...getItemAncestors(item)].reverse();
|
783
|
-
const pathLabel = [...ancestors, item].map((el) => el.textLabel);
|
784
|
-
const label = selectionMode !== "ancestors" ? item.textLabel : pathLabel.join(" / ");
|
785
|
-
return (h("calcite-chip", { class: chipClasses, dismissLabel: intlRemoveTag, dismissible: true, icon: item.icon, id: item.guid ? `${chipUidPrefix}${item.guid}` : null, key: item.textLabel, onCalciteChipDismiss: (event) => this.calciteChipDismissHandler(event, item), scale: scale, title: label, value: item.value }, label));
|
786
|
-
});
|
787
|
-
}
|
788
|
-
renderInput() {
|
789
|
-
const { guid, active, disabled, placeholder, selectionMode, selectedItems, open } = this;
|
790
|
-
const single = selectionMode === "single";
|
791
|
-
const selectedItem = selectedItems[0];
|
792
|
-
const showLabel = !(open || active) && single && !!selectedItem;
|
793
|
-
return (h("span", { class: {
|
794
|
-
"input-wrap": true,
|
795
|
-
"input-wrap--single": single
|
796
|
-
} }, showLabel && (h("span", { class: {
|
797
|
-
label: true,
|
798
|
-
"label--icon": !!(selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.icon)
|
799
|
-
}, key: "label" }, selectedItem.textLabel)), h("input", { "aria-activedescendant": this.activeDescendant, "aria-autocomplete": "list", "aria-controls": `${listboxUidPrefix}${guid}`, "aria-label": getLabelText(this), class: {
|
800
|
-
input: true,
|
801
|
-
"input--single": true,
|
802
|
-
"input--transparent": this.activeChipIndex > -1,
|
803
|
-
"input--hidden": showLabel,
|
804
|
-
"input--icon": !!this.placeholderIcon
|
805
|
-
}, disabled: disabled, id: `${inputUidPrefix}${guid}`, key: "input", onBlur: this.comboboxBlurHandler, onFocus: this.comboboxFocusHandler, onInput: this.inputHandler, placeholder: placeholder, ref: (el) => (this.textInput = el), type: "text" })));
|
806
|
-
}
|
807
|
-
renderListBoxOptions() {
|
808
|
-
return this.visibleItems.map((item) => (h("li", { "aria-selected": toAriaBoolean(item.selected), id: item.guid ? `${itemUidPrefix}${item.guid}` : null, role: "option", tabindex: "-1" }, item.textLabel)));
|
809
|
-
}
|
810
|
-
renderFloatingUIContainer() {
|
811
|
-
const { active, setFloatingEl, setContainerEl, open } = this;
|
812
|
-
const classes = {
|
813
|
-
"list-container": true,
|
814
|
-
[FloatingCSS.animation]: true,
|
815
|
-
[FloatingCSS.animationActive]: open || active
|
816
|
-
};
|
817
|
-
return (h("div", { "aria-hidden": "true", class: {
|
818
|
-
"floating-ui-container": true,
|
819
|
-
"floating-ui-container--active": open || active
|
820
|
-
}, ref: setFloatingEl }, h("div", { class: classes, ref: setContainerEl }, h("ul", { class: { list: true, "list--hide": !(open || active) } }, h("slot", null)))));
|
821
|
-
}
|
822
|
-
renderIconStart() {
|
823
|
-
const { selectedItems, placeholderIcon, selectionMode } = this;
|
824
|
-
const selectedItem = selectedItems[0];
|
825
|
-
const selectedIcon = selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.icon;
|
826
|
-
const singleSelectionMode = selectionMode === "single";
|
827
|
-
const iconAtStart = !this.open && selectedItem
|
828
|
-
? !!selectedIcon && singleSelectionMode
|
829
|
-
: !!this.placeholderIcon && (!selectedItem || singleSelectionMode);
|
830
|
-
return (iconAtStart && (h("span", { class: "icon-start" }, h("calcite-icon", { class: "selected-icon", icon: !this.open && selectedItem ? selectedIcon : placeholderIcon, scale: "s" }))));
|
831
|
-
}
|
832
|
-
renderIconEnd() {
|
833
|
-
const { active, open } = this;
|
834
|
-
return (h("span", { class: "icon-end" }, h("calcite-icon", { icon: active || open ? "chevron-up" : "chevron-down", scale: "s" })));
|
835
|
-
}
|
836
|
-
render() {
|
837
|
-
const { active, guid, label, open } = this;
|
838
|
-
const single = this.selectionMode === "single";
|
839
|
-
return (h(Host, null, h("div", { "aria-autocomplete": "list", "aria-controls": `${listboxUidPrefix}${guid}`, "aria-expanded": toAriaBoolean(open || active), "aria-haspopup": "listbox", "aria-labelledby": `${labelUidPrefix}${guid}`, "aria-live": "polite", "aria-owns": `${listboxUidPrefix}${guid}`, class: {
|
840
|
-
wrapper: true,
|
841
|
-
"wrapper--single": single || !this.selectedItems.length,
|
842
|
-
"wrapper--active": open || active
|
843
|
-
}, onClick: this.clickHandler, onKeyDown: this.keydownHandler, ref: this.setReferenceEl, role: "combobox" }, h("div", { class: "grid-input" }, this.renderIconStart(), !single && this.renderChips(), h("label", { class: "screen-readers-only", htmlFor: `${inputUidPrefix}${guid}`, id: `${labelUidPrefix}${guid}` }, label), this.renderInput()), this.renderIconEnd()), h("ul", { "aria-labelledby": `${labelUidPrefix}${guid}`, "aria-multiselectable": "true", class: "screen-readers-only", id: `${listboxUidPrefix}${guid}`, role: "listbox", tabIndex: -1 }, this.renderListBoxOptions()), this.renderFloatingUIContainer(), h(HiddenFormInputSlot, { component: this })));
|
844
|
-
}
|
845
|
-
get el() { return this; }
|
846
|
-
static get watchers() { return {
|
847
|
-
"active": ["activeHandler"],
|
848
|
-
"open": ["openHandler"],
|
849
|
-
"disabled": ["handleDisabledChange"],
|
850
|
-
"maxItems": ["maxItemsHandler"],
|
851
|
-
"overlayPositioning": ["overlayPositioningHandler"],
|
852
|
-
"value": ["valueHandler"],
|
853
|
-
"flipPlacements": ["flipPlacementsHandler"],
|
854
|
-
"selectedItems": ["selectedItemsHandler"],
|
855
|
-
"text": ["textHandler"]
|
856
|
-
}; }
|
857
|
-
static get style() { return comboboxCss; }
|
858
|
-
}, [1, "calcite-combobox", {
|
859
|
-
"active": [1540],
|
860
|
-
"open": [1540],
|
861
|
-
"disabled": [516],
|
862
|
-
"label": [1],
|
863
|
-
"placeholder": [1],
|
864
|
-
"placeholderIcon": [513, "placeholder-icon"],
|
865
|
-
"maxItems": [514, "max-items"],
|
866
|
-
"name": [513],
|
867
|
-
"allowCustomValues": [516, "allow-custom-values"],
|
868
|
-
"overlayPositioning": [513, "overlay-positioning"],
|
869
|
-
"required": [516],
|
870
|
-
"selectionMode": [513, "selection-mode"],
|
871
|
-
"scale": [513],
|
872
|
-
"value": [1025],
|
873
|
-
"intlRemoveTag": [1, "intl-remove-tag"],
|
874
|
-
"flipPlacements": [16],
|
875
|
-
"items": [32],
|
876
|
-
"groupItems": [32],
|
877
|
-
"selectedItems": [32],
|
878
|
-
"visibleItems": [32],
|
879
|
-
"needsIcon": [32],
|
880
|
-
"activeItemIndex": [32],
|
881
|
-
"activeChipIndex": [32],
|
882
|
-
"activeDescendant": [32],
|
883
|
-
"text": [32],
|
884
|
-
"reposition": [64],
|
885
|
-
"setFocus": [64]
|
886
|
-
}, [[5, "pointerdown", "documentClickHandler"], [0, "calciteComboboxItemChange", "calciteComboboxItemChangeHandler"]]]);
|
887
|
-
function defineCustomElement() {
|
888
|
-
if (typeof customElements === "undefined") {
|
889
|
-
return;
|
890
|
-
}
|
891
|
-
const components = ["calcite-combobox", "calcite-chip", "calcite-icon"];
|
892
|
-
components.forEach(tagName => { switch (tagName) {
|
893
|
-
case "calcite-combobox":
|
894
|
-
if (!customElements.get(tagName)) {
|
895
|
-
customElements.define(tagName, Combobox);
|
896
|
-
}
|
897
|
-
break;
|
898
|
-
case "calcite-chip":
|
899
|
-
if (!customElements.get(tagName)) {
|
900
|
-
defineCustomElement$2();
|
901
|
-
}
|
902
|
-
break;
|
903
|
-
case "calcite-icon":
|
904
|
-
if (!customElements.get(tagName)) {
|
905
|
-
defineCustomElement$1();
|
906
|
-
}
|
907
|
-
break;
|
908
|
-
} });
|
909
|
-
}
|
910
|
-
defineCustomElement();
|
911
|
-
|
912
|
-
export { Combobox as C, defineCustomElement as d };
|
913
|
-
|
914
|
-
//# sourceMappingURL=combobox.js.map
|