@esri/solutions-components 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/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,243 +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, h, Host } from '@stencil/core/internal/client';
|
|
7
|
-
import { p as pdfUtils } from './labelFormats.js';
|
|
8
|
-
import { g as getLocaleComponentStrings } from './locale.js';
|
|
9
|
-
import { b as queryFeaturesByID } from './queryUtils.js';
|
|
10
|
-
import { d as defineCustomElement$3 } from './icon.js';
|
|
11
|
-
import { d as defineCustomElement$2 } from './option.js';
|
|
12
|
-
import { d as defineCustomElement$1 } from './select.js';
|
|
13
|
-
|
|
14
|
-
// May change this but doing this for now so the download button will do something
|
|
15
|
-
/**
|
|
16
|
-
* Export a csv of the attributes from the features that match the provided ids
|
|
17
|
-
*
|
|
18
|
-
* @param layerView layer view to query
|
|
19
|
-
* @param ids number array of ids to export to csv
|
|
20
|
-
*
|
|
21
|
-
* @returns Promise when the function has completed
|
|
22
|
-
*/
|
|
23
|
-
async function exportCSV(layerView, ids) {
|
|
24
|
-
const featureSet = await queryFeaturesByID(ids, layerView.layer);
|
|
25
|
-
const attributes = featureSet.features.map(f => f.attributes);
|
|
26
|
-
const fieldNames = {};
|
|
27
|
-
const entry = attributes[0];
|
|
28
|
-
Object.keys(entry).forEach(k => {
|
|
29
|
-
if (entry.hasOwnProperty(k)) {
|
|
30
|
-
fieldNames[k] = k;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
_downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Download the CSV file
|
|
37
|
-
*
|
|
38
|
-
* @param fieldNames the names for each of the features fields
|
|
39
|
-
* @param attributes the features attributes
|
|
40
|
-
*
|
|
41
|
-
* Based on:
|
|
42
|
-
* https://medium.com/@danny.pule/export-json-to-csv-file-using-javascript-a0b7bc5b00d2
|
|
43
|
-
*
|
|
44
|
-
* @returns void
|
|
45
|
-
*/
|
|
46
|
-
function _downloadCSVFile(fieldNames, attributes, fileTitle) {
|
|
47
|
-
if (fieldNames) {
|
|
48
|
-
attributes.unshift(fieldNames);
|
|
49
|
-
}
|
|
50
|
-
// format values to string so it doesn't get tripped up when a value has a comma
|
|
51
|
-
// another option could be to export with a different delimiter
|
|
52
|
-
const csv = attributes.reduce((prev, cur) => {
|
|
53
|
-
return prev + Object.values(cur).map(v => `"${v}"`).join(",") + "\r\n";
|
|
54
|
-
}, "");
|
|
55
|
-
const link = document.createElement("a");
|
|
56
|
-
if (link.download !== undefined) {
|
|
57
|
-
link.href = URL.createObjectURL(new Blob([csv], { type: "text/csv;charset=utf-8;" }));
|
|
58
|
-
link.download = `${fileTitle}.csv` || "export.csv";
|
|
59
|
-
link.style.visibility = "hidden";
|
|
60
|
-
document.body.appendChild(link);
|
|
61
|
-
link.click();
|
|
62
|
-
document.body.removeChild(link);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const pdfDownloadCss = ":host{display:block}";
|
|
67
|
-
|
|
68
|
-
const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
69
|
-
constructor() {
|
|
70
|
-
super();
|
|
71
|
-
this.__registerHost();
|
|
72
|
-
this.__attachShadow();
|
|
73
|
-
this.disabled = true;
|
|
74
|
-
this.layerView = undefined;
|
|
75
|
-
this._translations = undefined;
|
|
76
|
-
}
|
|
77
|
-
//--------------------------------------------------------------------------
|
|
78
|
-
//
|
|
79
|
-
// Watch handlers
|
|
80
|
-
//
|
|
81
|
-
//--------------------------------------------------------------------------
|
|
82
|
-
//--------------------------------------------------------------------------
|
|
83
|
-
//
|
|
84
|
-
// Methods (public)
|
|
85
|
-
//
|
|
86
|
-
//--------------------------------------------------------------------------
|
|
87
|
-
/**
|
|
88
|
-
* Downloads pdf of mailing labels for the provided list of ids
|
|
89
|
-
*
|
|
90
|
-
* @param ids List of ids to download
|
|
91
|
-
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
92
|
-
* @returns Promise resolving when function is done
|
|
93
|
-
*/
|
|
94
|
-
async downloadPDF(ids, removeDuplicates) {
|
|
95
|
-
return this._downloadPDF(ids, removeDuplicates);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Downloads csv of mailing labels for the provided list of ids
|
|
99
|
-
*
|
|
100
|
-
* @param ids List of ids to download
|
|
101
|
-
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
102
|
-
* @returns Promise resolving when function is done
|
|
103
|
-
*/
|
|
104
|
-
async downloadCSV(ids, removeDuplicates) {
|
|
105
|
-
return this._downloadCSV(ids, removeDuplicates);
|
|
106
|
-
}
|
|
107
|
-
//--------------------------------------------------------------------------
|
|
108
|
-
//
|
|
109
|
-
// Events (public)
|
|
110
|
-
//
|
|
111
|
-
//--------------------------------------------------------------------------
|
|
112
|
-
//--------------------------------------------------------------------------
|
|
113
|
-
//
|
|
114
|
-
// Functions (lifecycle)
|
|
115
|
-
//
|
|
116
|
-
//--------------------------------------------------------------------------
|
|
117
|
-
/**
|
|
118
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
119
|
-
*/
|
|
120
|
-
async componentWillLoad() {
|
|
121
|
-
await this._getTranslations();
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Renders the component.
|
|
125
|
-
*/
|
|
126
|
-
render() {
|
|
127
|
-
return (h(Host, null, h("calcite-select", { disabled: this.disabled, label: "", ref: (el) => { this._labelInfoElement = el; } }, this._renderItems())));
|
|
128
|
-
}
|
|
129
|
-
//--------------------------------------------------------------------------
|
|
130
|
-
//
|
|
131
|
-
// Functions (protected)
|
|
132
|
-
//
|
|
133
|
-
//--------------------------------------------------------------------------
|
|
134
|
-
/**
|
|
135
|
-
* Renders the pdf export size options
|
|
136
|
-
*
|
|
137
|
-
* @returns Node array of size options
|
|
138
|
-
*
|
|
139
|
-
* @protected
|
|
140
|
-
*/
|
|
141
|
-
_renderItems() {
|
|
142
|
-
const s = pdfUtils;
|
|
143
|
-
const sortedPdfIndo = (s.default || s).sort((a, b) => {
|
|
144
|
-
const _a = parseInt(a.descriptionPDF.labelsPerPageDisplay, 10);
|
|
145
|
-
const _b = parseInt(b.descriptionPDF.labelsPerPageDisplay, 10);
|
|
146
|
-
return _a < _b ? -1 : _a > _b ? 1 : 0;
|
|
147
|
-
});
|
|
148
|
-
return sortedPdfIndo.map((l) => {
|
|
149
|
-
return (h("calcite-option", { value: l }, this._getLabelSizeText(l)));
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Downloads pdf of mailing labels for the provided list of ids
|
|
154
|
-
*
|
|
155
|
-
* @param ids List of ids to download
|
|
156
|
-
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
157
|
-
*
|
|
158
|
-
* @returns Promise resolving when function is done
|
|
159
|
-
* @protected
|
|
160
|
-
*/
|
|
161
|
-
async _downloadPDF(ids, removeDuplicates) {
|
|
162
|
-
const l = this._labelInfoElement.selectedOption.value;
|
|
163
|
-
alert(`PDF download: (${this._getLabelSizeText(l)}) (remove dups: ${removeDuplicates}) ${ids.join(", ")}`);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Downloads csv of mailing labels for the provided list of ids
|
|
167
|
-
*
|
|
168
|
-
* @param ids List of ids to download
|
|
169
|
-
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
170
|
-
* @returns Promise resolving when function is done
|
|
171
|
-
*
|
|
172
|
-
* @returns Promise that will resolve when the download is complete
|
|
173
|
-
* @protected
|
|
174
|
-
*/
|
|
175
|
-
async _downloadCSV(ids, removeDuplicates) {
|
|
176
|
-
// TODO this will be leveraged when we do the real implementation of this
|
|
177
|
-
console.log(removeDuplicates);
|
|
178
|
-
await exportCSV(this.layerView, ids);
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Gets the formatted pdf export size text
|
|
182
|
-
*
|
|
183
|
-
* @param labelInfo current user selected label info
|
|
184
|
-
*
|
|
185
|
-
* @returns the pdf label as a string
|
|
186
|
-
* @protected
|
|
187
|
-
*/
|
|
188
|
-
_getLabelSizeText(labelInfo) {
|
|
189
|
-
const lNum = labelInfo.descriptionPDF.labelsPerPageDisplay;
|
|
190
|
-
const lSize = `${labelInfo.descriptionPDF.labelWidthDisplay} x ${labelInfo.descriptionPDF.labelHeightDisplay}`;
|
|
191
|
-
return this._translations.pdfLabel.replace("{{n}}", lNum).replace("{{labelSize}}", lSize);
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Fetches the component's translations
|
|
195
|
-
*
|
|
196
|
-
* @protected
|
|
197
|
-
*/
|
|
198
|
-
async _getTranslations() {
|
|
199
|
-
const translations = await getLocaleComponentStrings(this.el);
|
|
200
|
-
this._translations = translations[0];
|
|
201
|
-
}
|
|
202
|
-
get el() { return this; }
|
|
203
|
-
static get style() { return pdfDownloadCss; }
|
|
204
|
-
}, [1, "pdf-download", {
|
|
205
|
-
"disabled": [4],
|
|
206
|
-
"layerView": [16],
|
|
207
|
-
"_translations": [32],
|
|
208
|
-
"downloadPDF": [64],
|
|
209
|
-
"downloadCSV": [64]
|
|
210
|
-
}]);
|
|
211
|
-
function defineCustomElement() {
|
|
212
|
-
if (typeof customElements === "undefined") {
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
const components = ["pdf-download", "calcite-icon", "calcite-option", "calcite-select"];
|
|
216
|
-
components.forEach(tagName => { switch (tagName) {
|
|
217
|
-
case "pdf-download":
|
|
218
|
-
if (!customElements.get(tagName)) {
|
|
219
|
-
customElements.define(tagName, PdfDownload);
|
|
220
|
-
}
|
|
221
|
-
break;
|
|
222
|
-
case "calcite-icon":
|
|
223
|
-
if (!customElements.get(tagName)) {
|
|
224
|
-
defineCustomElement$3();
|
|
225
|
-
}
|
|
226
|
-
break;
|
|
227
|
-
case "calcite-option":
|
|
228
|
-
if (!customElements.get(tagName)) {
|
|
229
|
-
defineCustomElement$2();
|
|
230
|
-
}
|
|
231
|
-
break;
|
|
232
|
-
case "calcite-select":
|
|
233
|
-
if (!customElements.get(tagName)) {
|
|
234
|
-
defineCustomElement$1();
|
|
235
|
-
}
|
|
236
|
-
break;
|
|
237
|
-
} });
|
|
238
|
-
}
|
|
239
|
-
defineCustomElement();
|
|
240
|
-
|
|
241
|
-
export { PdfDownload as P, defineCustomElement as d };
|
|
242
|
-
|
|
243
|
-
//# sourceMappingURL=pdf-download2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"pdf-download2.js","mappings":";;;;;;;;;;;;;AAAA;AAIA;;;;;;;;AAQO,eAAe,SAAS,CAC7B,SAAkC,EAClC,GAAa;EAEb,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;EACjE,MAAM,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;EAC9D,MAAM,UAAU,GAAG,EAAE,CAAC;EACtB,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;EAC5B,MAAM,C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&encapsulation=shadow","./src/components/pdf-download/pdf-download.tsx"],"sourcesContent":["// May change this but doing this for now so the download button will do something\r\n\r\nimport { queryFeaturesByID } from \"./queryUtils\";\r\n\r\n/**\r\n * Export a csv of the attributes from the features that match the provided ids\r\n *\r\n * @param layerView layer view to query\r\n * @param ids number array of ids to export to csv\r\n *\r\n * @returns Promise when the function has completed\r\n */\r\nexport async function exportCSV(\r\n layerView: __esri.FeatureLayerView,\r\n ids: number[]\r\n): Promise<void> {\r\n const featureSet = await queryFeaturesByID(ids, layerView.layer);\r\n const attributes = featureSet.features.map(f => f.attributes);\r\n const fieldNames = {};\r\n const entry = attributes[0];\r\n Object.keys(entry).forEach(k => {\r\n if (entry.hasOwnProperty(k)) {\r\n fieldNames[k] = k;\r\n }\r\n });\r\n _downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`);\r\n}\r\n\r\n/**\r\n * Download the CSV file\r\n *\r\n * @param fieldNames the names for each of the features fields\r\n * @param attributes the features attributes\r\n *\r\n * Based on:\r\n * https://medium.com/@danny.pule/export-json-to-csv-file-using-javascript-a0b7bc5b00d2\r\n *\r\n * @returns void\r\n */\r\nfunction _downloadCSVFile(\r\n fieldNames: {[key: string]: string},\r\n attributes: {[key: string]: string}[],\r\n fileTitle: string\r\n): void {\r\n if (fieldNames) {\r\n attributes.unshift(fieldNames);\r\n }\r\n // format values to string so it doesn't get tripped up when a value has a comma\r\n // another option could be to export with a different delimiter\r\n const csv = attributes.reduce((prev, cur) => {\r\n return prev + Object.values(cur).map(v => `\"${v}\"`).join(\",\") + \"\\r\\n\";\r\n }, \"\");\r\n const link = document.createElement(\"a\");\r\n if (link.download !== undefined) {\r\n link.href = URL.createObjectURL(new Blob([csv], { type: \"text/csv;charset=utf-8;\" }));\r\n link.download = `${fileTitle}.csv` || \"export.csv\";\r\n link.style.visibility = \"hidden\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n }\r\n}\r\n","/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n:host {\r\n display: block;\r\n}\r\n","/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\nimport { Component, Element, Host, h, Method, Prop, State, VNode } from \"@stencil/core\";\r\nimport * as pdfUtils from \"../../assets/data/labelFormats.json\";\r\nimport \"@esri/calcite-components\";\r\nimport PdfDownload_T9n from \"../../assets/t9n/pdf-download/resources.json\";\r\nimport { getLocaleComponentStrings } from \"../../utils/locale\";\r\nimport { exportCSV } from \"../../utils/csvUtils\";\r\n\r\n@Component({\r\n tag: \"pdf-download\",\r\n styleUrl: \"pdf-download.css\",\r\n shadow: true,\r\n})\r\nexport class PdfDownload {\r\n //--------------------------------------------------------------------------\r\n //\r\n // Host element access\r\n //\r\n //--------------------------------------------------------------------------\r\n @Element() el: HTMLPdfDownloadElement;\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Properties (public)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * boolean: Controls the enabled/disabled state of download\r\n */\r\n @Prop() disabled = true;\r\n\r\n /**\r\n * esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html\r\n */\r\n @Prop() layerView: __esri.FeatureLayerView;\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Properties (protected)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Contains the translations for this component.\r\n * All UI strings should be defined here.\r\n */\r\n @State() protected _translations: typeof PdfDownload_T9n;\r\n\r\n /**\r\n * HTMLCalciteSelectElement: The html element for selecting buffer unit\r\n */\r\n protected _labelInfoElement: HTMLCalciteSelectElement;\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Watch handlers\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Methods (public)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Downloads pdf of mailing labels for the provided list of ids\r\n *\r\n * @param ids List of ids to download\r\n * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value\r\n * @returns Promise resolving when function is done\r\n */\r\n @Method()\r\n async downloadPDF(\r\n ids: number[],\r\n removeDuplicates: boolean\r\n ): Promise<void> {\r\n return this._downloadPDF(ids, removeDuplicates);\r\n }\r\n\r\n /**\r\n * Downloads csv of mailing labels for the provided list of ids\r\n *\r\n * @param ids List of ids to download\r\n * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value\r\n * @returns Promise resolving when function is done\r\n */\r\n @Method()\r\n async downloadCSV(\r\n ids: number[],\r\n removeDuplicates: boolean\r\n ): Promise<void> {\r\n return this._downloadCSV(ids, removeDuplicates);\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Events (public)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Functions (lifecycle)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * StencilJS: Called once just after the component is first connected to the DOM.\r\n */\r\n async componentWillLoad(): Promise<void> {\r\n await this._getTranslations();\r\n }\r\n\r\n /**\r\n * Renders the component.\r\n */\r\n render(): VNode {\r\n return (\r\n <Host>\r\n <calcite-select\r\n disabled={this.disabled}\r\n label=\"\"\r\n ref={(el) => { this._labelInfoElement = el }}\r\n >\r\n {this._renderItems()}\r\n </calcite-select>\r\n </Host>\r\n );\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Functions (protected)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Renders the pdf export size options\r\n *\r\n * @returns Node array of size options\r\n *\r\n * @protected\r\n */\r\n protected _renderItems(): VNode[] {\r\n const s: any = pdfUtils;\r\n const sortedPdfIndo = (s.default || s).sort((a, b) => {\r\n const _a = parseInt(a.descriptionPDF.labelsPerPageDisplay, 10);\r\n const _b = parseInt(b.descriptionPDF.labelsPerPageDisplay, 10);\r\n return _a < _b ? -1 : _a > _b ? 1 : 0\r\n });\r\n return sortedPdfIndo.map((l) => {\r\n return (<calcite-option value={l}>{this._getLabelSizeText(l)}</calcite-option>)\r\n });\r\n }\r\n\r\n /**\r\n * Downloads pdf of mailing labels for the provided list of ids\r\n *\r\n * @param ids List of ids to download\r\n * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value\r\n *\r\n * @returns Promise resolving when function is done\r\n * @protected\r\n */\r\n protected async _downloadPDF(\r\n ids: number[],\r\n removeDuplicates: boolean\r\n ): Promise<void> {\r\n const l = this._labelInfoElement.selectedOption.value;\r\n alert(`PDF download: (${this._getLabelSizeText(l)}) (remove dups: ${removeDuplicates}) ${ids.join(\", \")}`);\r\n }\r\n\r\n /**\r\n * Downloads csv of mailing labels for the provided list of ids\r\n *\r\n * @param ids List of ids to download\r\n * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value\r\n * @returns Promise resolving when function is done\r\n *\r\n * @returns Promise that will resolve when the download is complete\r\n * @protected\r\n */\r\n protected async _downloadCSV(\r\n ids: number[],\r\n removeDuplicates: boolean\r\n ): Promise<void> {\r\n // TODO this will be leveraged when we do the real implementation of this\r\n console.log(removeDuplicates)\r\n await exportCSV(this.layerView, ids);\r\n }\r\n\r\n /**\r\n * Gets the formatted pdf export size text\r\n *\r\n * @param labelInfo current user selected label info\r\n *\r\n * @returns the pdf label as a string\r\n * @protected\r\n */\r\n protected _getLabelSizeText(\r\n labelInfo: any\r\n ): string {\r\n const lNum = labelInfo.descriptionPDF.labelsPerPageDisplay;\r\n const lSize = `${labelInfo.descriptionPDF.labelWidthDisplay} x ${labelInfo.descriptionPDF.labelHeightDisplay}`;\r\n return this._translations.pdfLabel.replace(\"{{n}}\", lNum).replace(\"{{labelSize}}\", lSize);\r\n }\r\n\r\n /**\r\n * Fetches the component's translations\r\n *\r\n * @protected\r\n */\r\n protected async _getTranslations(): Promise<void> {\r\n const translations = await getLocaleComponentStrings(this.el);\r\n this._translations = translations[0] as typeof PdfDownload_T9n;\r\n }\r\n\r\n}\r\n"],"version":3}
|
|
@@ -1,257 +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, Fragment } from '@stencil/core/internal/client';
|
|
7
|
-
import { I as ICON_TYPES } from './resources.js';
|
|
8
|
-
import { b as getSlotted, t as toAriaBoolean } from './dom.js';
|
|
9
|
-
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
|
|
10
|
-
import { u as updateHostInteraction } from './interactive.js';
|
|
11
|
-
import { d as defineCustomElement$3 } from './action.js';
|
|
12
|
-
import { d as defineCustomElement$2 } from './icon.js';
|
|
13
|
-
import { d as defineCustomElement$1 } from './loader.js';
|
|
14
|
-
|
|
15
|
-
/*!
|
|
16
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
17
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
18
|
-
* v1.0.0-beta.97
|
|
19
|
-
*/
|
|
20
|
-
const CSS = {
|
|
21
|
-
actions: "actions",
|
|
22
|
-
actionsEnd: "actions--end",
|
|
23
|
-
actionsStart: "actions--start",
|
|
24
|
-
description: "description",
|
|
25
|
-
handle: "handle",
|
|
26
|
-
handleActivated: "handle--activated",
|
|
27
|
-
highlight: "highlight",
|
|
28
|
-
icon: "icon",
|
|
29
|
-
iconDot: "icon-dot",
|
|
30
|
-
label: "label",
|
|
31
|
-
remove: "remove",
|
|
32
|
-
title: "title",
|
|
33
|
-
textContainer: "text-container"
|
|
34
|
-
};
|
|
35
|
-
const ICONS = {
|
|
36
|
-
checked: "check",
|
|
37
|
-
remove: "x"
|
|
38
|
-
};
|
|
39
|
-
const SLOTS = {
|
|
40
|
-
actionsEnd: "actions-end",
|
|
41
|
-
actionsStart: "actions-start"
|
|
42
|
-
};
|
|
43
|
-
const TEXT = {
|
|
44
|
-
remove: "Remove"
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const pickListItemCss = "@charset \"UTF-8\";@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{margin:0px;-webkit-margin-after:1px;margin-block-end:1px;box-sizing:border-box;display:flex;align-items:stretch;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing);animation:calcite-fade-in var(--calcite-animation-timing)}:host *{box-sizing:border-box}.label{display:flex;flex:1 1 auto;cursor:pointer;align-items:center;background-color:transparent;outline-color:transparent}.label:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover{background-color:var(--calcite-ui-foreground-2)}:host([non-interactive]:hover){background-color:var(--calcite-ui-foreground-1)}:host([non-interactive]) .label,:host([non-interactive]) .icon{pointer-events:none}.icon{margin-block:0px;display:flex;cursor:pointer;align-items:center;padding:0.25rem;color:var(--calcite-ui-brand);flex:0 0 auto;line-height:0}.icon:hover{background-color:var(--calcite-ui-foreground-2)}.icon-dot{display:flex;inline-size:1.5rem;align-items:center;padding:0.5rem}.icon-dot:before{opacity:0;content:\"•\"}.icon calcite-icon{opacity:0}:host([selected]) .icon-dot:before,:host([selected]) .icon calcite-icon{transition:opacity var(--calcite-animation-timing);opacity:1}.text-container{pointer-events:none;display:flex;flex-direction:column;flex-wrap:nowrap;overflow:hidden;padding-block:0.5rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--2);line-height:1.375;word-wrap:break-word;word-break:break-word}.title{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}.description{-webkit-margin-before:0.125rem;margin-block-start:0.125rem;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}.actions{margin:0px;display:flex;flex:0 1 auto;align-items:stretch;justify-content:flex-end}.actions--start~.label{-webkit-padding-start:0.25rem;padding-inline-start:0.25rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";
|
|
48
|
-
|
|
49
|
-
const PickListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
50
|
-
constructor() {
|
|
51
|
-
super();
|
|
52
|
-
this.__registerHost();
|
|
53
|
-
this.__attachShadow();
|
|
54
|
-
this.calciteListItemChange = createEvent(this, "calciteListItemChange", 6);
|
|
55
|
-
this.calciteListItemRemove = createEvent(this, "calciteListItemRemove", 7);
|
|
56
|
-
this.calciteInternalListItemPropsChange = createEvent(this, "calciteInternalListItemPropsChange", 6);
|
|
57
|
-
this.calciteInternalListItemValueChange = createEvent(this, "calciteInternalListItemValueChange", 6);
|
|
58
|
-
/**
|
|
59
|
-
* When `true`, interaction is prevented and the component is displayed with lower opacity.
|
|
60
|
-
*/
|
|
61
|
-
this.disabled = false;
|
|
62
|
-
/**
|
|
63
|
-
* When `false`, the component cannot be deselected by user interaction.
|
|
64
|
-
*/
|
|
65
|
-
this.disableDeselect = false;
|
|
66
|
-
/**
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
this.nonInteractive = false;
|
|
70
|
-
/**
|
|
71
|
-
* Determines the icon SVG symbol that will be shown. Options are `"circle"`, `"square"`, `"grip"` or `null`.
|
|
72
|
-
*
|
|
73
|
-
* @see [ICON_TYPES](https://github.com/Esri/calcite-components/blob/master/src/components/pick-list/resources.ts#L5)
|
|
74
|
-
*/
|
|
75
|
-
this.icon = null;
|
|
76
|
-
/**
|
|
77
|
-
* When `true`, displays a remove action that removes the item from the list.
|
|
78
|
-
*/
|
|
79
|
-
this.removable = false;
|
|
80
|
-
/**
|
|
81
|
-
* When `true`, selects an item. Toggles when an item is checked/unchecked.
|
|
82
|
-
*/
|
|
83
|
-
this.selected = false;
|
|
84
|
-
/**
|
|
85
|
-
* When `removable` is `true`, the accessible name for the component's remove button.
|
|
86
|
-
*
|
|
87
|
-
* @default "Remove"
|
|
88
|
-
*/
|
|
89
|
-
this.intlRemove = TEXT.remove;
|
|
90
|
-
// --------------------------------------------------------------------------
|
|
91
|
-
//
|
|
92
|
-
// Private Methods
|
|
93
|
-
//
|
|
94
|
-
// --------------------------------------------------------------------------
|
|
95
|
-
this.pickListClickHandler = (event) => {
|
|
96
|
-
if (this.disabled || (this.disableDeselect && this.selected) || this.nonInteractive) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
this.shiftPressed = event.shiftKey;
|
|
100
|
-
this.selected = !this.selected;
|
|
101
|
-
};
|
|
102
|
-
this.pickListKeyDownHandler = (event) => {
|
|
103
|
-
if (event.key === " ") {
|
|
104
|
-
event.preventDefault();
|
|
105
|
-
if ((this.disableDeselect && this.selected) || this.nonInteractive) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
this.selected = !this.selected;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
this.removeClickHandler = () => {
|
|
112
|
-
this.calciteListItemRemove.emit();
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
descriptionWatchHandler() {
|
|
116
|
-
this.calciteInternalListItemPropsChange.emit();
|
|
117
|
-
}
|
|
118
|
-
labelWatchHandler() {
|
|
119
|
-
this.calciteInternalListItemPropsChange.emit();
|
|
120
|
-
}
|
|
121
|
-
metadataWatchHandler() {
|
|
122
|
-
this.calciteInternalListItemPropsChange.emit();
|
|
123
|
-
}
|
|
124
|
-
selectedWatchHandler() {
|
|
125
|
-
this.calciteListItemChange.emit({
|
|
126
|
-
item: this.el,
|
|
127
|
-
value: this.value,
|
|
128
|
-
selected: this.selected,
|
|
129
|
-
shiftPressed: this.shiftPressed
|
|
130
|
-
});
|
|
131
|
-
this.shiftPressed = false;
|
|
132
|
-
}
|
|
133
|
-
valueWatchHandler(newValue, oldValue) {
|
|
134
|
-
this.calciteInternalListItemValueChange.emit({ oldValue, newValue });
|
|
135
|
-
}
|
|
136
|
-
// --------------------------------------------------------------------------
|
|
137
|
-
//
|
|
138
|
-
// Lifecycle
|
|
139
|
-
//
|
|
140
|
-
// --------------------------------------------------------------------------
|
|
141
|
-
connectedCallback() {
|
|
142
|
-
connectConditionalSlotComponent(this);
|
|
143
|
-
}
|
|
144
|
-
disconnectedCallback() {
|
|
145
|
-
disconnectConditionalSlotComponent(this);
|
|
146
|
-
}
|
|
147
|
-
componentDidRender() {
|
|
148
|
-
updateHostInteraction(this, this.el.closest("calcite-pick-list") ? "managed" : false);
|
|
149
|
-
}
|
|
150
|
-
// --------------------------------------------------------------------------
|
|
151
|
-
//
|
|
152
|
-
// Public Methods
|
|
153
|
-
//
|
|
154
|
-
// --------------------------------------------------------------------------
|
|
155
|
-
/**
|
|
156
|
-
* Toggles the selection state. By default this won't trigger an event.
|
|
157
|
-
* The first argument allows the value to be coerced, rather than swapping values.
|
|
158
|
-
*
|
|
159
|
-
* @param coerce
|
|
160
|
-
*/
|
|
161
|
-
async toggleSelected(coerce) {
|
|
162
|
-
this.selected = typeof coerce === "boolean" ? coerce : !this.selected;
|
|
163
|
-
}
|
|
164
|
-
/** Sets focus on the component. */
|
|
165
|
-
async setFocus() {
|
|
166
|
-
var _a;
|
|
167
|
-
(_a = this.focusEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
168
|
-
}
|
|
169
|
-
// --------------------------------------------------------------------------
|
|
170
|
-
//
|
|
171
|
-
// Render Methods
|
|
172
|
-
//
|
|
173
|
-
// --------------------------------------------------------------------------
|
|
174
|
-
renderIcon() {
|
|
175
|
-
const { icon } = this;
|
|
176
|
-
if (!icon) {
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
return (h("span", { class: {
|
|
180
|
-
[CSS.icon]: true,
|
|
181
|
-
[CSS.iconDot]: icon === ICON_TYPES.circle
|
|
182
|
-
}, onClick: this.pickListClickHandler }, icon === ICON_TYPES.square ? h("calcite-icon", { icon: ICONS.checked, scale: "s" }) : null));
|
|
183
|
-
}
|
|
184
|
-
renderRemoveAction() {
|
|
185
|
-
return this.removable ? (h("calcite-action", { class: CSS.remove, icon: ICONS.remove, onCalciteActionClick: this.removeClickHandler, slot: SLOTS.actionsEnd, text: this.intlRemove })) : null;
|
|
186
|
-
}
|
|
187
|
-
renderActionsStart() {
|
|
188
|
-
const { el } = this;
|
|
189
|
-
const hasActionsStart = getSlotted(el, SLOTS.actionsStart);
|
|
190
|
-
return hasActionsStart ? (h("div", { class: { [CSS.actions]: true, [CSS.actionsStart]: true } }, h("slot", { name: SLOTS.actionsStart }))) : null;
|
|
191
|
-
}
|
|
192
|
-
renderActionsEnd() {
|
|
193
|
-
const { el, removable } = this;
|
|
194
|
-
const hasActionsEnd = getSlotted(el, SLOTS.actionsEnd);
|
|
195
|
-
return hasActionsEnd || removable ? (h("div", { class: { [CSS.actions]: true, [CSS.actionsEnd]: true } }, h("slot", { name: SLOTS.actionsEnd }), this.renderRemoveAction())) : null;
|
|
196
|
-
}
|
|
197
|
-
render() {
|
|
198
|
-
const { description, label } = this;
|
|
199
|
-
return (h(Fragment, null, this.renderIcon(), this.renderActionsStart(), h("label", { "aria-label": label, class: CSS.label, onClick: this.pickListClickHandler, onKeyDown: this.pickListKeyDownHandler, ref: (focusEl) => (this.focusEl = focusEl), tabIndex: 0 }, h("div", { "aria-checked": toAriaBoolean(this.selected), class: CSS.textContainer, role: "menuitemcheckbox" }, h("span", { class: CSS.title }, label), description ? h("span", { class: CSS.description }, description) : null)), this.renderActionsEnd()));
|
|
200
|
-
}
|
|
201
|
-
get el() { return this; }
|
|
202
|
-
static get watchers() { return {
|
|
203
|
-
"description": ["descriptionWatchHandler"],
|
|
204
|
-
"label": ["labelWatchHandler"],
|
|
205
|
-
"metadata": ["metadataWatchHandler"],
|
|
206
|
-
"selected": ["selectedWatchHandler"],
|
|
207
|
-
"value": ["valueWatchHandler"]
|
|
208
|
-
}; }
|
|
209
|
-
static get style() { return pickListItemCss; }
|
|
210
|
-
}, [1, "calcite-pick-list-item", {
|
|
211
|
-
"description": [513],
|
|
212
|
-
"disabled": [516],
|
|
213
|
-
"disableDeselect": [516, "disable-deselect"],
|
|
214
|
-
"nonInteractive": [516, "non-interactive"],
|
|
215
|
-
"icon": [513],
|
|
216
|
-
"label": [513],
|
|
217
|
-
"metadata": [16],
|
|
218
|
-
"removable": [516],
|
|
219
|
-
"selected": [1540],
|
|
220
|
-
"intlRemove": [513, "intl-remove"],
|
|
221
|
-
"value": [8],
|
|
222
|
-
"toggleSelected": [64],
|
|
223
|
-
"setFocus": [64]
|
|
224
|
-
}]);
|
|
225
|
-
function defineCustomElement() {
|
|
226
|
-
if (typeof customElements === "undefined") {
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
const components = ["calcite-pick-list-item", "calcite-action", "calcite-icon", "calcite-loader"];
|
|
230
|
-
components.forEach(tagName => { switch (tagName) {
|
|
231
|
-
case "calcite-pick-list-item":
|
|
232
|
-
if (!customElements.get(tagName)) {
|
|
233
|
-
customElements.define(tagName, PickListItem);
|
|
234
|
-
}
|
|
235
|
-
break;
|
|
236
|
-
case "calcite-action":
|
|
237
|
-
if (!customElements.get(tagName)) {
|
|
238
|
-
defineCustomElement$3();
|
|
239
|
-
}
|
|
240
|
-
break;
|
|
241
|
-
case "calcite-icon":
|
|
242
|
-
if (!customElements.get(tagName)) {
|
|
243
|
-
defineCustomElement$2();
|
|
244
|
-
}
|
|
245
|
-
break;
|
|
246
|
-
case "calcite-loader":
|
|
247
|
-
if (!customElements.get(tagName)) {
|
|
248
|
-
defineCustomElement$1();
|
|
249
|
-
}
|
|
250
|
-
break;
|
|
251
|
-
} });
|
|
252
|
-
}
|
|
253
|
-
defineCustomElement();
|
|
254
|
-
|
|
255
|
-
export { CSS as C, PickListItem as P, SLOTS as S, defineCustomElement as d };
|
|
256
|
-
|
|
257
|
-
//# sourceMappingURL=pick-list-item.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"pick-list-item.js","mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG;AACnB,EAAE,OAAO,EAAE,SAAS;AACpB,EAAE,UAAU,EAAE,cAAc;AAC5B,EAAE,YAAY,EAAE,gBAAgB;AAChC,EAAE,WAAW,EAAE,aAAa;AAC5B,EAAE,MAAM,EAAE,QAAQ;AAClB,EAAE,eAAe,EAAE,mBAAmB;AACtC,EAAE,SAAS,EAAE,WAAW;AACxB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,OAAO,EAAE,UAAU;AACrB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,MAAM,EAAE,QAAQ;AAClB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,aAAa,EAAE,gBAAgB;AACjC,EAAE;AACK,MAAM,KAAK,GAAG;AACrB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,MAAM,EAAE,GAAG;AACb,CAAC,CAAC;AACU,MAAC,KAAK,GAAG;AACrB,EAAE,UAAU,EAAE,aAAa;AAC3B,EAAE,YAAY,EAAE,eAAe;AAC/B,EAAE;AACK,MAAM,IAAI,GAAG;AACpB,EAAE,MAAM,EAAE,QAAQ;AAClB,CAAC;;AC9BD,MAAM,eAAe,GAAG,mqHAAmqH;;MCe9qH,YAAY;EACvB;;;;;;;;;;;IAIE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;;;;IAItB,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;;;;IAI7B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;;;;;;IAM5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;;;IAIjB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;;;;IAIv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CAAC,IAAI,IAAI,CAAC;GACrL;EACD,MAAM;IACJ,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,cAAc,EAAE,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,WAAW,EAAE,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,EAAE;GAChgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./node_modules/@esri/calcite-components/dist/collection/components/pick-list-item/resources.js","./node_modules/@esri/calcite-components/dist/collection/components/pick-list-item/pick-list-item.css?tag=calcite-pick-list-item&encapsulation=shadow","./node_modules/@esri/calcite-components/dist/collection/components/pick-list-item/pick-list-item.js"],"sourcesContent":["/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.\n * v1.0.0-beta.97\n */\nexport const CSS = {\n actions: \"actions\",\n actionsEnd: \"actions--end\",\n actionsStart: \"actions--start\",\n description: \"description\",\n handle: \"handle\",\n handleActivated: \"handle--activated\",\n highlight: \"highlight\",\n icon: \"icon\",\n iconDot: \"icon-dot\",\n label: \"label\",\n remove: \"remove\",\n title: \"title\",\n textContainer: \"text-container\"\n};\nexport const ICONS = {\n checked: \"check\",\n remove: \"x\"\n};\nexport const SLOTS = {\n actionsEnd: \"actions-end\",\n actionsStart: \"actions-start\"\n};\nexport const TEXT = {\n remove: \"Remove\"\n};\n","@charset \"UTF-8\";\n/* mixins & extensions */\n@keyframes in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes in-down {\n 0% {\n opacity: 0;\n transform: translate3D(0, -5px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3D(0, 0, 0);\n }\n}\n@keyframes in-up {\n 0% {\n opacity: 0;\n transform: translate3D(0, 5px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3D(0, 0, 0);\n }\n}\n@keyframes in-scale {\n 0% {\n opacity: 0;\n transform: scale3D(0.95, 0.95, 1);\n }\n 100% {\n opacity: 1;\n transform: scale3D(1, 1, 1);\n }\n}\n:root {\n --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));\n --calcite-internal-duration-factor: var(--calcite-duration-factor, 1);\n --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));\n --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));\n --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));\n}\n\n.calcite-animate {\n opacity: 0;\n animation-fill-mode: both;\n animation-duration: var(--calcite-animation-timing);\n}\n\n.calcite-animate__in {\n animation-name: in;\n}\n\n.calcite-animate__in-down {\n animation-name: in-down;\n}\n\n.calcite-animate__in-up {\n animation-name: in-up;\n}\n\n.calcite-animate__in-scale {\n animation-name: in-scale;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :root {\n --calcite-internal-duration-factor: 0.01;\n }\n}\n/**\n* Currently only used in Checkbox.\n*/\n:root {\n --calcite-floating-ui-transition: var(--calcite-animation-timing);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host([disabled]){\n pointer-events: none;\n cursor: default;\n -webkit-user-select: none;\n user-select: none;\n opacity: var(--calcite-ui-opacity-disabled);\n}\n\n:host{\n margin: 0px;\n margin-block-end: 1px;\n box-sizing: border-box;\n display: flex;\n align-items: stretch;\n background-color: var(--calcite-ui-foreground-1);\n font-size: var(--calcite-font-size--1);\n line-height: 1rem;\n color: var(--calcite-ui-text-1);\n --tw-shadow: 0 1px 0 var(--calcite-ui-border-3);\n --tw-shadow-colored: 0 1px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n transition: background-color var(--calcite-animation-timing);\n animation: calcite-fade-in var(--calcite-animation-timing);\n}\n:host *{\n box-sizing: border-box;\n}\n\n.label{\n display: flex;\n flex: 1 1 auto;\n cursor: pointer;\n align-items: center;\n background-color: transparent;\n outline-color: transparent;\n}\n.label:focus{\n outline: 2px solid var(--calcite-ui-brand);\n outline-offset: -2px;\n}\n.label:hover{\n background-color: var(--calcite-ui-foreground-2);\n}\n\n:host([non-interactive]:hover){\n background-color: var(--calcite-ui-foreground-1);\n}\n\n:host([non-interactive]) .label, \n:host([non-interactive]) .icon{\n pointer-events: none;\n}\n\n.icon{\n margin-block: 0px;\n display: flex;\n cursor: pointer;\n align-items: center;\n padding: 0.25rem;\n color: var(--calcite-ui-brand);\n flex: 0 0 auto;\n line-height: 0;\n}\n.icon:hover{\n background-color: var(--calcite-ui-foreground-2);\n}\n\n.icon-dot{\n display: flex;\n inline-size: 1.5rem;\n align-items: center;\n padding: 0.5rem;\n}\n.icon-dot:before{\n opacity: 0;\n content: \"•\";\n}\n\n.icon calcite-icon{\n opacity: 0;\n}\n\n:host([selected]) .icon-dot:before,\n:host([selected]) .icon calcite-icon {\n transition: opacity var(--calcite-animation-timing);\n opacity: 1;\n}\n\n.text-container{\n pointer-events: none;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n overflow: hidden;\n padding-block: 0.5rem;\n padding-inline: 0.75rem;\n font-size: var(--calcite-font-size--2);\n line-height: 1.375;\n word-wrap: break-word;\n word-break: break-word;\n}\n\n.title{\n font-weight: var(--calcite-font-weight-normal);\n color: var(--calcite-ui-text-1);\n}\n\n.description{\n margin-block-start: 0.125rem;\n font-weight: var(--calcite-font-weight-normal);\n color: var(--calcite-ui-text-3);\n}\n\n.actions{\n margin: 0px;\n display: flex;\n flex: 0 1 auto;\n align-items: stretch;\n justify-content: flex-end;\n}\n\n.actions--start ~ .label {\n padding-inline-start: 0.25rem;\n}\n\n:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled] {\n /* prevent opacity stacking */\n opacity: 1;\n}","/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.\n * v1.0.0-beta.97\n */\nimport { Fragment, h } from \"@stencil/core\";\nimport { CSS, ICONS, SLOTS, TEXT } from \"./resources\";\nimport { ICON_TYPES } from \"../pick-list/resources\";\nimport { getSlotted, toAriaBoolean } from \"../../utils/dom\";\nimport { connectConditionalSlotComponent, disconnectConditionalSlotComponent } from \"../../utils/conditionalSlot\";\nimport { updateHostInteraction } from \"../../utils/interactive\";\n/**\n * @slot actions-end - A slot for adding `calcite-action`s or content to the end side of the component.\n * @slot actions-start - A slot for adding `calcite-action`s or content to the start side of the component.\n */\nexport class PickListItem {\n constructor() {\n /**\n * When `true`, interaction is prevented and the component is displayed with lower opacity.\n */\n this.disabled = false;\n /**\n * When `false`, the component cannot be deselected by user interaction.\n */\n this.disableDeselect = false;\n /**\n * @internal\n */\n this.nonInteractive = false;\n /**\n * Determines the icon SVG symbol that will be shown. Options are `\"circle\"`, `\"square\"`, `\"grip\"` or `null`.\n *\n * @see [ICON_TYPES](https://github.com/Esri/calcite-components/blob/master/src/components/pick-list/resources.ts#L5)\n */\n this.icon = null;\n /**\n * When `true`, displays a remove action that removes the item from the list.\n */\n this.removable = false;\n /**\n * When `true`, selects an item. Toggles when an item is checked/unchecked.\n */\n this.selected = false;\n /**\n * When `removable` is `true`, the accessible name for the component's remove button.\n *\n * @default \"Remove\"\n */\n this.intlRemove = TEXT.remove;\n // --------------------------------------------------------------------------\n //\n // Private Methods\n //\n // --------------------------------------------------------------------------\n this.pickListClickHandler = (event) => {\n if (this.disabled || (this.disableDeselect && this.selected) || this.nonInteractive) {\n return;\n }\n this.shiftPressed = event.shiftKey;\n this.selected = !this.selected;\n };\n this.pickListKeyDownHandler = (event) => {\n if (event.key === \" \") {\n event.preventDefault();\n if ((this.disableDeselect && this.selected) || this.nonInteractive) {\n return;\n }\n this.selected = !this.selected;\n }\n };\n this.removeClickHandler = () => {\n this.calciteListItemRemove.emit();\n };\n }\n descriptionWatchHandler() {\n this.calciteInternalListItemPropsChange.emit();\n }\n labelWatchHandler() {\n this.calciteInternalListItemPropsChange.emit();\n }\n metadataWatchHandler() {\n this.calciteInternalListItemPropsChange.emit();\n }\n selectedWatchHandler() {\n this.calciteListItemChange.emit({\n item: this.el,\n value: this.value,\n selected: this.selected,\n shiftPressed: this.shiftPressed\n });\n this.shiftPressed = false;\n }\n valueWatchHandler(newValue, oldValue) {\n this.calciteInternalListItemValueChange.emit({ oldValue, newValue });\n }\n // --------------------------------------------------------------------------\n //\n // Lifecycle\n //\n // --------------------------------------------------------------------------\n connectedCallback() {\n connectConditionalSlotComponent(this);\n }\n disconnectedCallback() {\n disconnectConditionalSlotComponent(this);\n }\n componentDidRender() {\n updateHostInteraction(this, this.el.closest(\"calcite-pick-list\") ? \"managed\" : false);\n }\n // --------------------------------------------------------------------------\n //\n // Public Methods\n //\n // --------------------------------------------------------------------------\n /**\n * Toggles the selection state. By default this won't trigger an event.\n * The first argument allows the value to be coerced, rather than swapping values.\n *\n * @param coerce\n */\n async toggleSelected(coerce) {\n this.selected = typeof coerce === \"boolean\" ? coerce : !this.selected;\n }\n /** Sets focus on the component. */\n async setFocus() {\n var _a;\n (_a = this.focusEl) === null || _a === void 0 ? void 0 : _a.focus();\n }\n // --------------------------------------------------------------------------\n //\n // Render Methods\n //\n // --------------------------------------------------------------------------\n renderIcon() {\n const { icon } = this;\n if (!icon) {\n return null;\n }\n return (h(\"span\", { class: {\n [CSS.icon]: true,\n [CSS.iconDot]: icon === ICON_TYPES.circle\n }, onClick: this.pickListClickHandler }, icon === ICON_TYPES.square ? h(\"calcite-icon\", { icon: ICONS.checked, scale: \"s\" }) : null));\n }\n renderRemoveAction() {\n return this.removable ? (h(\"calcite-action\", { class: CSS.remove, icon: ICONS.remove, onCalciteActionClick: this.removeClickHandler, slot: SLOTS.actionsEnd, text: this.intlRemove })) : null;\n }\n renderActionsStart() {\n const { el } = this;\n const hasActionsStart = getSlotted(el, SLOTS.actionsStart);\n return hasActionsStart ? (h(\"div\", { class: { [CSS.actions]: true, [CSS.actionsStart]: true } }, h(\"slot\", { name: SLOTS.actionsStart }))) : null;\n }\n renderActionsEnd() {\n const { el, removable } = this;\n const hasActionsEnd = getSlotted(el, SLOTS.actionsEnd);\n return hasActionsEnd || removable ? (h(\"div\", { class: { [CSS.actions]: true, [CSS.actionsEnd]: true } }, h(\"slot\", { name: SLOTS.actionsEnd }), this.renderRemoveAction())) : null;\n }\n render() {\n const { description, label } = this;\n return (h(Fragment, null, this.renderIcon(), this.renderActionsStart(), h(\"label\", { \"aria-label\": label, class: CSS.label, onClick: this.pickListClickHandler, onKeyDown: this.pickListKeyDownHandler, ref: (focusEl) => (this.focusEl = focusEl), tabIndex: 0 }, h(\"div\", { \"aria-checked\": toAriaBoolean(this.selected), class: CSS.textContainer, role: \"menuitemcheckbox\" }, h(\"span\", { class: CSS.title }, label), description ? h(\"span\", { class: CSS.description }, description) : null)), this.renderActionsEnd()));\n }\n static get is() { return \"calcite-pick-list-item\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"pick-list-item.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"pick-list-item.css\"]\n };\n }\n static get properties() {\n return {\n \"description\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"A description for the component that displays below the label text.\"\n },\n \"attribute\": \"description\",\n \"reflect\": true\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When `true`, interaction is prevented and the component is displayed with lower opacity.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"disableDeselect\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When `false`, the component cannot be deselected by user interaction.\"\n },\n \"attribute\": \"disable-deselect\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"nonInteractive\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": undefined\n }],\n \"text\": \"\"\n },\n \"attribute\": \"non-interactive\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"icon\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ICON_TYPES | null\",\n \"resolved\": \"ICON_TYPES.circle | ICON_TYPES.grip | ICON_TYPES.square\",\n \"references\": {\n \"ICON_TYPES\": {\n \"location\": \"import\",\n \"path\": \"../pick-list/resources\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"see\",\n \"text\": \"[ICON_TYPES](https://github.com/Esri/calcite-components/blob/master/src/components/pick-list/resources.ts#L5)\"\n }],\n \"text\": \"Determines the icon SVG symbol that will be shown. Options are `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"grip\\\"` or `null`.\"\n },\n \"attribute\": \"icon\",\n \"reflect\": true,\n \"defaultValue\": \"null\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Label and accessible name for the component. Appears next to the icon.\"\n },\n \"attribute\": \"label\",\n \"reflect\": true\n },\n \"metadata\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Record<string, unknown>\",\n \"resolved\": \"{ [x: string]: unknown; }\",\n \"references\": {\n \"Record\": {\n \"location\": \"global\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Provides additional metadata to the component. Primary use is for a filter on the parent list.\"\n }\n },\n \"removable\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When `true`, displays a remove action that removes the item from the list.\"\n },\n \"attribute\": \"removable\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"selected\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When `true`, selects an item. Toggles when an item is checked/unchecked.\"\n },\n \"attribute\": \"selected\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"intlRemove\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"default\",\n \"text\": \"\\\"Remove\\\"\"\n }],\n \"text\": \"When `removable` is `true`, the accessible name for the component's remove button.\"\n },\n \"attribute\": \"intl-remove\",\n \"reflect\": true,\n \"defaultValue\": \"TEXT.remove\"\n },\n \"value\": {\n \"type\": \"any\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The component's value.\"\n },\n \"attribute\": \"value\",\n \"reflect\": false\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"calciteListItemChange\",\n \"name\": \"calciteListItemChange\",\n \"bubbles\": true,\n \"cancelable\": false,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Fires when the component is selected or unselected.\"\n },\n \"complexType\": {\n \"original\": \"{\\n item: HTMLCalcitePickListItemElement;\\n value: any;\\n selected: boolean;\\n shiftPressed: boolean;\\n }\",\n \"resolved\": \"{ item: HTMLCalcitePickListItemElement; value: any; selected: boolean; shiftPressed: boolean; }\",\n \"references\": {\n \"HTMLCalcitePickListItemElement\": {\n \"location\": \"global\"\n }\n }\n }\n }, {\n \"method\": \"calciteListItemRemove\",\n \"name\": \"calciteListItemRemove\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Fires when the remove button is pressed.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"calciteInternalListItemPropsChange\",\n \"name\": \"calciteInternalListItemPropsChange\",\n \"bubbles\": true,\n \"cancelable\": false,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": undefined\n }],\n \"text\": \"Emits when the component's label, description, value, or metadata properties are modified.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"calciteInternalListItemValueChange\",\n \"name\": \"calciteInternalListItemValueChange\",\n \"bubbles\": true,\n \"cancelable\": false,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": undefined\n }],\n \"text\": \"Emits when the component's value property is modified.\"\n },\n \"complexType\": {\n \"original\": \"{\\n oldValue: any;\\n newValue: any;\\n }\",\n \"resolved\": \"{ oldValue: any; newValue: any; }\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"toggleSelected\": {\n \"complexType\": {\n \"signature\": \"(coerce?: boolean) => Promise<void>\",\n \"parameters\": [{\n \"tags\": [{\n \"name\": \"param\",\n \"text\": \"coerce\"\n }],\n \"text\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Toggles the selection state. By default this won't trigger an event.\\nThe first argument allows the value to be coerced, rather than swapping values.\",\n \"tags\": [{\n \"name\": \"param\",\n \"text\": \"coerce\"\n }]\n }\n },\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the component.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"description\",\n \"methodName\": \"descriptionWatchHandler\"\n }, {\n \"propName\": \"label\",\n \"methodName\": \"labelWatchHandler\"\n }, {\n \"propName\": \"metadata\",\n \"methodName\": \"metadataWatchHandler\"\n }, {\n \"propName\": \"selected\",\n \"methodName\": \"selectedWatchHandler\"\n }, {\n \"propName\": \"value\",\n \"methodName\": \"valueWatchHandler\"\n }];\n }\n}\n"],"version":3}
|