@esri/calcite-components 1.0.0-next.394 → 1.0.0-next.398
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/calcite/assets/icon/pinTear16F.json +1 -0
- package/dist/calcite/assets/icon/pinTear24F.json +1 -0
- package/dist/calcite/assets/icon/pinTear32F.json +1 -0
- package/dist/calcite/assets/icon/popUpBlank16F.json +1 -0
- package/dist/calcite/assets/icon/popUpBlank24F.json +1 -0
- package/dist/calcite/assets/icon/popUpBlank32F.json +1 -0
- package/dist/calcite/assets/icon/select16.json +1 -0
- package/dist/calcite/assets/icon/select24.json +1 -0
- package/dist/calcite/assets/icon/select32.json +1 -0
- package/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/{p-c27e520c.entry.js → p-240099ff.entry.js} +1 -1
- package/dist/calcite/p-26aea1cb.system.js +1 -1
- package/dist/calcite/p-49992d49.entry.js +5 -0
- package/dist/calcite/{p-dd8b6d4f.system.entry.js → p-69b126e0.system.entry.js} +1 -1
- package/dist/calcite/p-81bdea6f.entry.js +5 -0
- package/dist/calcite/{p-136ecbd7.system.entry.js → p-838a07fc.system.entry.js} +1 -1
- package/dist/calcite/{p-a61df17c.entry.js → p-a1a38c68.entry.js} +1 -1
- package/dist/calcite/{p-fb948ef5.system.entry.js → p-c3f5a7c2.system.entry.js} +1 -1
- package/dist/calcite/{p-d739bb5d.entry.js → p-caad6f3c.entry.js} +1 -1
- package/dist/calcite/{p-301ee662.system.entry.js → p-d75351e1.system.entry.js} +1 -1
- package/dist/calcite/{p-c9485802.system.entry.js → p-f6b0747a.system.entry.js} +1 -1
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +18 -13
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input.cjs.entry.js +1 -1
- package/dist/cjs/calcite-popover_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-tooltip_2.cjs.entry.js +1 -1
- package/dist/collection/components/combobox/combobox.js +18 -13
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
- package/dist/collection/components/icon/assets/icon/pinTear16F.json +1 -0
- package/dist/collection/components/icon/assets/icon/pinTear24F.json +1 -0
- package/dist/collection/components/icon/assets/icon/pinTear32F.json +1 -0
- package/dist/collection/components/icon/assets/icon/popUpBlank16F.json +1 -0
- package/dist/collection/components/icon/assets/icon/popUpBlank24F.json +1 -0
- package/dist/collection/components/icon/assets/icon/popUpBlank32F.json +1 -0
- package/dist/collection/components/icon/assets/icon/select16.json +1 -0
- package/dist/collection/components/icon/assets/icon/select24.json +1 -0
- package/dist/collection/components/icon/assets/icon/select32.json +1 -0
- package/dist/collection/components/input/input.js +1 -1
- package/dist/collection/components/panel/panel.js +2 -2
- package/dist/collection/components/popover-manager/popover-manager.css +1 -0
- package/dist/collection/components/shell-center-row/shell-center-row.js +2 -2
- package/dist/collection/components/shell-panel/shell-panel.js +2 -2
- package/dist/collection/components/tooltip-manager/tooltip-manager.css +1 -0
- package/dist/components/calcite-combobox.js +18 -13
- package/dist/components/calcite-popover-manager.js +1 -1
- package/dist/components/calcite-shell-center-row.js +1 -1
- package/dist/components/calcite-shell-panel.js +1 -1
- package/dist/components/date-picker-month-header.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/tooltip-manager.js +1 -1
- package/dist/custom-elements/index.js +24 -19
- package/dist/esm/calcite-combobox_3.entry.js +18 -13
- package/dist/esm/calcite-date-picker_4.entry.js +1 -1
- package/dist/esm/calcite-input.entry.js +1 -1
- package/dist/esm/calcite-popover_2.entry.js +1 -1
- package/dist/esm/calcite-shell_3.entry.js +2 -2
- package/dist/esm/calcite-tooltip_2.entry.js +1 -1
- package/dist/esm-es5/calcite-combobox_3.entry.js +1 -1
- package/dist/esm-es5/calcite-date-picker_4.entry.js +1 -1
- package/dist/esm-es5/calcite-input.entry.js +1 -1
- package/dist/esm-es5/calcite-popover_2.entry.js +1 -1
- package/dist/esm-es5/calcite-tooltip_2.entry.js +1 -1
- package/dist/extras/docs-json.json +5 -5
- package/dist/types/components/panel/panel.d.ts +2 -2
- package/dist/types/components/shell-center-row/shell-center-row.d.ts +1 -1
- package/dist/types/components/shell-panel/shell-panel.d.ts +1 -1
- package/dist/types/components.d.ts +7 -7
- package/hydrate/index.js +24 -19
- package/package.json +7 -7
- package/readme.md +5 -3
- package/dist/calcite/p-e66c335c.entry.js +0 -5
- package/dist/calcite/p-eb71c32f.entry.js +0 -5
|
@@ -6,7 +6,7 @@ import { HTMLElement, h, proxyCustomElement } from '@stencil/core/internal/clien
|
|
|
6
6
|
import { T as TOOLTIP_REFERENCE, a as TOOLTIP_DELAY_MS } from './resources2.js';
|
|
7
7
|
import { q as queryElementRoots } from './dom.js';
|
|
8
8
|
|
|
9
|
-
const tooltipManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";
|
|
9
|
+
const tooltipManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block}";
|
|
10
10
|
|
|
11
11
|
let TooltipManager = class extends HTMLElement {
|
|
12
12
|
constructor() {
|
|
@@ -9795,19 +9795,21 @@ let Combobox = class extends HTMLElement$1 {
|
|
|
9795
9795
|
return this.items.filter((item) => !item.hidden);
|
|
9796
9796
|
}
|
|
9797
9797
|
getSelectedItems() {
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
:
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
return
|
|
9810
|
-
}
|
|
9798
|
+
if (!this.isMulti()) {
|
|
9799
|
+
const match = this.items.find(({ selected }) => selected);
|
|
9800
|
+
return match ? [match] : [];
|
|
9801
|
+
}
|
|
9802
|
+
return (this.items
|
|
9803
|
+
.filter((item) => item.selected && (this.selectionMode !== "ancestors" || !hasActiveChildren(item)))
|
|
9804
|
+
/** Preserve order of entered tags */
|
|
9805
|
+
.sort((a, b) => {
|
|
9806
|
+
const aIdx = this.selectedItems.indexOf(a);
|
|
9807
|
+
const bIdx = this.selectedItems.indexOf(b);
|
|
9808
|
+
if (aIdx > -1 && bIdx > -1) {
|
|
9809
|
+
return aIdx - bIdx;
|
|
9810
|
+
}
|
|
9811
|
+
return bIdx - aIdx;
|
|
9812
|
+
}));
|
|
9811
9813
|
}
|
|
9812
9814
|
getData() {
|
|
9813
9815
|
return this.items.map((item) => ({
|
|
@@ -9839,6 +9841,9 @@ let Combobox = class extends HTMLElement$1 {
|
|
|
9839
9841
|
this.toggleSelection(existingItem, true);
|
|
9840
9842
|
}
|
|
9841
9843
|
else {
|
|
9844
|
+
if (!this.isMulti()) {
|
|
9845
|
+
this.toggleSelection(this.selectedItems[this.selectedItems.length - 1], false);
|
|
9846
|
+
}
|
|
9842
9847
|
const item = document.createElement(ComboboxItem$1);
|
|
9843
9848
|
item.value = value;
|
|
9844
9849
|
item.textLabel = value;
|
|
@@ -11393,7 +11398,7 @@ let DatePickerMonthHeader = class extends HTMLElement$1 {
|
|
|
11393
11398
|
return (h(Fragment, null, h("a", { "aria-disabled": (this.prevMonthDate.getMonth() === activeMonth).toString(), "aria-label": this.intlPrevMonth, class: "chevron", href: "#", onClick: this.prevMonthClick, onKeyDown: this.prevMonthKeydown, role: "button", tabindex: this.prevMonthDate.getMonth() === activeMonth ? -1 : 0 }, h("calcite-icon", { "flip-rtl": true, icon: "chevron-left", scale: iconScale })), h("div", { class: { text: true, "text--reverse": reverse } }, h(Heading, { class: "month", level: this.headingLevel }, localizedMonth), h("span", { class: "year-wrap" }, h("input", { "aria-label": this.intlYear, class: {
|
|
11394
11399
|
year: true,
|
|
11395
11400
|
"year--suffix": !!suffix
|
|
11396
|
-
}, inputmode: "numeric", maxlength: "4", minlength: "1",
|
|
11401
|
+
}, inputmode: "numeric", maxlength: "4", minlength: "1", onInput: this.yearChanged, onKeyDown: this.onYearKey, pattern: "\\d*", ref: (el) => (this.yearInput = el), type: "text", value: localizedYear }), suffix && (h("span", { class: "suffix" }, h("span", { "aria-hidden": "true", class: "suffix__invisible" }, localizedYear), " " + suffix)))), h("a", { "aria-disabled": (this.nextMonthDate.getMonth() === activeMonth).toString(), "aria-label": this.intlNextMonth, class: "chevron", href: "#", onClick: this.nextMonthClick, onKeyDown: this.nextMonthKeydown, role: "button", tabindex: this.nextMonthDate.getMonth() === activeMonth ? -1 : 0 }, h("calcite-icon", { "flip-rtl": true, icon: "chevron-right", scale: iconScale }))));
|
|
11397
11402
|
}
|
|
11398
11403
|
setNextPrevMonthDates() {
|
|
11399
11404
|
if (!this.activeDate) {
|
|
@@ -13325,7 +13330,7 @@ let Input = class extends HTMLElement$1 {
|
|
|
13325
13330
|
if (!this.internalValueChange) {
|
|
13326
13331
|
this.setValue({
|
|
13327
13332
|
origin: "external",
|
|
13328
|
-
value: newValue == null
|
|
13333
|
+
value: newValue == null || newValue == ""
|
|
13329
13334
|
? ""
|
|
13330
13335
|
: this.type === "number"
|
|
13331
13336
|
? isValidNumber(newValue)
|
|
@@ -16701,7 +16706,7 @@ let Popover = class extends HTMLElement$1 {
|
|
|
16701
16706
|
static get style() { return popoverCss; }
|
|
16702
16707
|
};
|
|
16703
16708
|
|
|
16704
|
-
const popoverManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";
|
|
16709
|
+
const popoverManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block}";
|
|
16705
16710
|
|
|
16706
16711
|
let PopoverManager = class extends HTMLElement$1 {
|
|
16707
16712
|
constructor() {
|
|
@@ -17877,7 +17882,7 @@ let ShellCenterRow = class extends HTMLElement$1 {
|
|
|
17877
17882
|
*/
|
|
17878
17883
|
this.detached = false;
|
|
17879
17884
|
/**
|
|
17880
|
-
* Specifies the
|
|
17885
|
+
* Specifies the maximum height of the row.
|
|
17881
17886
|
*/
|
|
17882
17887
|
this.heightScale = "s";
|
|
17883
17888
|
/**
|
|
@@ -17954,7 +17959,7 @@ let ShellPanel = class extends HTMLElement$1 {
|
|
|
17954
17959
|
*/
|
|
17955
17960
|
this.detached = false;
|
|
17956
17961
|
/**
|
|
17957
|
-
* Specifies the
|
|
17962
|
+
* Specifies the maximum height of the contents when detached.
|
|
17958
17963
|
*/
|
|
17959
17964
|
this.detachedHeightScale = "l";
|
|
17960
17965
|
/**
|
|
@@ -24582,7 +24587,7 @@ let Tooltip = class extends HTMLElement$1 {
|
|
|
24582
24587
|
static get style() { return tooltipCss; }
|
|
24583
24588
|
};
|
|
24584
24589
|
|
|
24585
|
-
const tooltipManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";
|
|
24590
|
+
const tooltipManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block}";
|
|
24586
24591
|
|
|
24587
24592
|
let TooltipManager = class extends HTMLElement$1 {
|
|
24588
24593
|
constructor() {
|
|
@@ -697,19 +697,21 @@ let Combobox = class {
|
|
|
697
697
|
return this.items.filter((item) => !item.hidden);
|
|
698
698
|
}
|
|
699
699
|
getSelectedItems() {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
:
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
return
|
|
712
|
-
}
|
|
700
|
+
if (!this.isMulti()) {
|
|
701
|
+
const match = this.items.find(({ selected }) => selected);
|
|
702
|
+
return match ? [match] : [];
|
|
703
|
+
}
|
|
704
|
+
return (this.items
|
|
705
|
+
.filter((item) => item.selected && (this.selectionMode !== "ancestors" || !hasActiveChildren(item)))
|
|
706
|
+
/** Preserve order of entered tags */
|
|
707
|
+
.sort((a, b) => {
|
|
708
|
+
const aIdx = this.selectedItems.indexOf(a);
|
|
709
|
+
const bIdx = this.selectedItems.indexOf(b);
|
|
710
|
+
if (aIdx > -1 && bIdx > -1) {
|
|
711
|
+
return aIdx - bIdx;
|
|
712
|
+
}
|
|
713
|
+
return bIdx - aIdx;
|
|
714
|
+
}));
|
|
713
715
|
}
|
|
714
716
|
getData() {
|
|
715
717
|
return this.items.map((item) => ({
|
|
@@ -741,6 +743,9 @@ let Combobox = class {
|
|
|
741
743
|
this.toggleSelection(existingItem, true);
|
|
742
744
|
}
|
|
743
745
|
else {
|
|
746
|
+
if (!this.isMulti()) {
|
|
747
|
+
this.toggleSelection(this.selectedItems[this.selectedItems.length - 1], false);
|
|
748
|
+
}
|
|
744
749
|
const item = document.createElement(ComboboxItem$1);
|
|
745
750
|
item.value = value;
|
|
746
751
|
item.textLabel = value;
|
|
@@ -817,7 +817,7 @@ let DatePickerMonthHeader = class {
|
|
|
817
817
|
return (h(Fragment, null, h("a", { "aria-disabled": (this.prevMonthDate.getMonth() === activeMonth).toString(), "aria-label": this.intlPrevMonth, class: "chevron", href: "#", onClick: this.prevMonthClick, onKeyDown: this.prevMonthKeydown, role: "button", tabindex: this.prevMonthDate.getMonth() === activeMonth ? -1 : 0 }, h("calcite-icon", { "flip-rtl": true, icon: "chevron-left", scale: iconScale })), h("div", { class: { text: true, "text--reverse": reverse } }, h(Heading, { class: "month", level: this.headingLevel }, localizedMonth), h("span", { class: "year-wrap" }, h("input", { "aria-label": this.intlYear, class: {
|
|
818
818
|
year: true,
|
|
819
819
|
"year--suffix": !!suffix
|
|
820
|
-
}, inputmode: "numeric", maxlength: "4", minlength: "1",
|
|
820
|
+
}, inputmode: "numeric", maxlength: "4", minlength: "1", onInput: this.yearChanged, onKeyDown: this.onYearKey, pattern: "\\d*", ref: (el) => (this.yearInput = el), type: "text", value: localizedYear }), suffix && (h("span", { class: "suffix" }, h("span", { "aria-hidden": "true", class: "suffix__invisible" }, localizedYear), " " + suffix)))), h("a", { "aria-disabled": (this.nextMonthDate.getMonth() === activeMonth).toString(), "aria-label": this.intlNextMonth, class: "chevron", href: "#", onClick: this.nextMonthClick, onKeyDown: this.nextMonthKeydown, role: "button", tabindex: this.nextMonthDate.getMonth() === activeMonth ? -1 : 0 }, h("calcite-icon", { "flip-rtl": true, icon: "chevron-right", scale: iconScale }))));
|
|
821
821
|
}
|
|
822
822
|
setNextPrevMonthDates() {
|
|
823
823
|
if (!this.activeDate) {
|
|
@@ -294,7 +294,7 @@ let Popover = class {
|
|
|
294
294
|
};
|
|
295
295
|
Popover.style = popoverCss;
|
|
296
296
|
|
|
297
|
-
const popoverManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";
|
|
297
|
+
const popoverManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block}";
|
|
298
298
|
|
|
299
299
|
let PopoverManager = class {
|
|
300
300
|
constructor(hostRef) {
|
|
@@ -118,7 +118,7 @@ let ShellCenterRow = class {
|
|
|
118
118
|
*/
|
|
119
119
|
this.detached = false;
|
|
120
120
|
/**
|
|
121
|
-
* Specifies the
|
|
121
|
+
* Specifies the maximum height of the row.
|
|
122
122
|
*/
|
|
123
123
|
this.heightScale = "s";
|
|
124
124
|
/**
|
|
@@ -193,7 +193,7 @@ let ShellPanel = class {
|
|
|
193
193
|
*/
|
|
194
194
|
this.detached = false;
|
|
195
195
|
/**
|
|
196
|
-
* Specifies the
|
|
196
|
+
* Specifies the maximum height of the contents when detached.
|
|
197
197
|
*/
|
|
198
198
|
this.detachedHeightScale = "l";
|
|
199
199
|
/**
|
|
@@ -201,7 +201,7 @@ let Tooltip = class {
|
|
|
201
201
|
};
|
|
202
202
|
Tooltip.style = tooltipCss;
|
|
203
203
|
|
|
204
|
-
const tooltipManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";
|
|
204
|
+
const tooltipManagerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block}";
|
|
205
205
|
|
|
206
206
|
let TooltipManager = class {
|
|
207
207
|
constructor(hostRef) {
|
|
@@ -2,4 +2,4 @@ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function a(e){return e ins
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
5
|
-
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-9de00868.js";import{a as isSymbol,S as Symbol,d as debounce}from"./debounce-79648d42.js";import{i as isArray,f as forIn}from"./forIn-48d8fb84.js";import{u as updatePopper,c as createPopper,C as CSS$2}from"./popper-ae231554.js";import{g as guid}from"./guid-196bd5ea.js";import{n as nodeListToArray,d as getElementProp,g as getSlotted}from"./dom-e7fa77b9.js";import{c as connectLabel,d as disconnectLabel,g as getLabelText}from"./label-2bffc9f4.js";import{c as connectForm,a as afterConnectDefaultValueSet,d as disconnectForm,H as HiddenFormInputSlot}from"./form-f90706b4.js";import{c as createObserver}from"./observers-46118290.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-9e7d8609.js";function arrayMap(e,t){var i=-1,n=e==null?0:e.length,a=Array(n);while(++i<n){a[i]=t(e[i],i,e)}return a}var INFINITY=1/0;var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function baseToString(e){if(typeof e=="string"){return e}if(isArray(e)){return arrayMap(e,baseToString)+""}if(isSymbol(e)){return symbolToString?symbolToString.call(e):""}var t=e+"";return t=="0"&&1/e==-INFINITY?"-0":t}function toString(e){return e==null?"":baseToString(e)}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);function escapeRegExp(e){e=toString(e);return e&&reHasRegExpChar.test(e)?e.replace(reRegExpChar,"\\$&"):e}var filter=function(e,t){var i=escapeRegExp(t);var n=new RegExp(i,"i");if(e.length===0){console.warn("No data was passed to the filter function.\n The data argument should be an array of objects")}var a=function(e,t){var i;if((i=e)===null||i===void 0?void 0:i.constant){return true}var n=false;forIn(e,(function(e){if(typeof e==="function"){return}if(Array.isArray(e)||typeof e==="object"&&e!==null){if(a(e,t)){n=true}}else if(t.test(e)){n=true}}));return n};var o=e.filter((function(e){return a(e,n)}));return o};var ComboboxItem$1="CALCITE-COMBOBOX-ITEM";var ComboboxItemGroup$1="CALCITE-COMBOBOX-ITEM-GROUP";var ComboboxChildSelector=ComboboxItem$1+", "+ComboboxItemGroup$1;var ComboboxDefaultPlacement="bottom-leading";var TEXT={removeTag:"Remove tag"};function getAncestors(e){var t,i;var n=(t=e.parentElement)===null||t===void 0?void 0:t.closest(ComboboxChildSelector);var a=(i=n===null||n===void 0?void 0:n.parentElement)===null||i===void 0?void 0:i.closest(ComboboxChildSelector);return[n,a].filter((function(e){return e}))}function getItemAncestors(e){var t;return((t=e.ancestors)===null||t===void 0?void 0:t.filter((function(e){return e.nodeName==="CALCITE-COMBOBOX-ITEM"})))||[]}function getItemChildren(e){return nodeListToArray(e.querySelectorAll("calcite-combobox-item"))}function hasActiveChildren(e){var t=nodeListToArray(e.querySelectorAll("calcite-combobox-item"));return t.filter((function(e){return e.selected})).length>0}function getDepth(e){var t=document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",e,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);return t.snapshotLength}var comboboxCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block}:host([disabled]){pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5}: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:-ms-flexbox;display:flex;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);padding:0 var(--calcite-combobox-item-spacing-unit-l) 0 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:0 var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.grid-input{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{-ms-flex-positive:1;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;height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-width:120px;margin-bottom:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-bottom:0px;margin-top:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.input-wrap--single{-ms-flex:1 1 0%;flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:-ms-flexbox;display:flex;max-width:100%;-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--spaced{padding-top:0px;padding-bottom:0px;padding-left:var(--calcite-combobox-item-spacing-unit-l);padding-right:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:-ms-flexbox;display:flex;width:1rem;cursor:pointer;-ms-flex-align:center;align-items:center}.icon-end{-ms-flex:none;flex:none}.popper-container{width:100%;display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.popper-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.popper-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.popper-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.popper-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.popper-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.popper-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.popper-container--active{pointer-events:initial;visibility:visible}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-height:100vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);width:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{height:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 2) 0;margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-width:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.chip:last-of-type{-webkit-margin-end:0;margin-inline-end:0}.item{display:block}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";var isGroup=function(e){return e.tagName===ComboboxItemGroup$1};var itemUidPrefix="combobox-item-";var chipUidPrefix="combobox-chip-";var labelUidPrefix="combobox-label-";var listboxUidPrefix="combobox-listbox-";var inputUidPrefix="combobox-input-";var Combobox=function(){function e(e){var t=this;registerInstance(this,e);this.calciteLookupChange=createEvent(this,"calciteLookupChange",7);this.calciteComboboxChange=createEvent(this,"calciteComboboxChange",7);this.calciteComboboxFilterChange=createEvent(this,"calciteComboboxFilterChange",7);this.calciteComboboxChipDismiss=createEvent(this,"calciteComboboxChipDismiss",7);this.calciteComboboxOpen=createEvent(this,"calciteComboboxOpen",7);this.calciteComboboxClose=createEvent(this,"calciteComboboxClose",7);this.active=false;this.disabled=false;this.maxItems=0;this.overlayPositioning="absolute";this.required=false;this.selectionMode="multi";this.scale="m";this.value=null;this.intlRemoveTag=TEXT.removeTag;this.internalValueChangeFlag=false;this.items=[];this.groupItems=[];this.selectedItems=[];this.visibleItems=[];this.hideList=!this.active;this.activeItemIndex=-1;this.activeChipIndex=-1;this.activeDescendant="";this.text="";this.open=this.active;this.textInput=null;this.mutationObserver=createObserver("mutation",(function(){return t.updateItems()}));this.resizeObserver=createObserver("resize",(function(){return t.setMaxScrollerHeight()}));this.guid=guid();this.inputHeight=0;this.ignoreSelectedEventsFlag=false;this.activeTransitionProp="opacity";this.getValue=function(){var e=t.selectedItems.map((function(e){return e===null||e===void 0?void 0:e.value.toString()}));return(e===null||e===void 0?void 0:e.length)?e.length>1?e:e[0]:""};this.onLabelClick=function(){t.setFocus()};this.keydownHandler=function(e){var i=e.key;switch(i){case"Tab":t.activeChipIndex=-1;t.activeItemIndex=-1;if(t.allowCustomValues&&t.text){t.addCustomChip(t.text,true);e.preventDefault()}else{t.active=false}break;case"ArrowLeft":t.previousChip();break;case"ArrowRight":t.nextChip();break;case"ArrowUp":e.preventDefault();t.active=true;t.shiftActiveItemIndex(-1);break;case"ArrowDown":e.preventDefault();t.active=true;t.shiftActiveItemIndex(1);break;case"Home":t.active=true;t.updateActiveItemIndex(0);break;case"End":t.active=true;t.updateActiveItemIndex(t.visibleItems.length-1);break;case"Escape":t.active=false;break;case"Enter":if(t.activeItemIndex>-1){t.toggleSelection(t.visibleItems[t.activeItemIndex])}else if(t.activeChipIndex>-1){t.removeActiveChip()}else if(t.allowCustomValues&&t.text){t.addCustomChip(t.text,true)}break;case"Delete":case"Backspace":if(t.activeChipIndex>-1){t.removeActiveChip()}else if(!t.text&&t.isMulti()){t.removeLastChip()}break;default:if(!t.active){t.setFocus()}break}};this.toggleCloseEnd=function(){t.hideList=true;t.el.removeEventListener("calciteComboboxClose",t.toggleCloseEnd)};this.toggleOpenEnd=function(){t.hideList=false;t.el.removeEventListener("calciteComboboxOpen",t.toggleOpenEnd)};this.transitionEnd=function(e){if(e.propertyName===t.activeTransitionProp){t.active?t.calciteComboboxOpen.emit():t.calciteComboboxClose.emit()}};this.setMaxScrollerHeight=function(){var e=t,i=e.active,n=e.listContainerEl;if(!n||!i){return}t.reposition();var a=t.getMaxScrollerHeight();n.style.maxHeight=a>0?a+"px":"";t.reposition()};this.calciteChipDismissHandler=function(e,i){t.active=false;var n=t.items.find((function(e){return e===i}));if(n){t.toggleSelection(n,false)}t.calciteComboboxChipDismiss.emit(e.detail)};this.setFocusClick=function(e){if(e.composedPath().some((function(e){return e.tagName==="CALCITE-CHIP"}))){return}t.setFocus()};this.setInactiveIfNotContained=function(e){var i=e.composedPath();if(!t.active&&!t.open||i.includes(t.el)||i.includes(t.referenceEl)){return}if(t.allowCustomValues&&t.text){t.addCustomChip(t.text)}if(t.selectionMode==="single"){if(t.textInput){t.textInput.value=""}t.text="";t.filterItems("");t.updateActiveItemIndex(-1)}t.active=false;t.open=false};this.setMenuEl=function(e){t.menuEl=e};this.setListContainerEl=function(e){t.resizeObserver.observe(e);t.listContainerEl=e};this.setReferenceEl=function(e){t.referenceEl=e};this.inputHandler=function(e){var i=e.target.value;t.text=i;t.filterItems(i);if(i){t.activeChipIndex=-1}};this.filterItems=function(){var e=function(e,t){return e&&t.some((function(t){var i=t.label,n=t.value;if(isGroup(e)){return n===e.label||n===e.label}return n===e.textLabel||n===e.value||i===e.textLabel||i===e.value}))};return debounce((function(i){var n=filter(t.data,i);var a=t.getCombinedItems();a.forEach((function(t){var i=!e(t,n);t.hidden=i;var a=t.ancestors,o=a[0],r=a[1];if(e(o,n)||e(r,n)){t.hidden=false}if(!i){t.ancestors.forEach((function(e){return e.hidden=false}))}}));t.visibleItems=t.getVisibleItems();t.calciteComboboxFilterChange.emit({visibleItems:__spreadArray([],t.visibleItems),text:i})}),100)}();this.internalCalciteLookupChangeEvent=function(){t.calciteLookupChange.emit(t.selectedItems)};this.emitCalciteLookupChange=debounce(this.internalCalciteLookupChangeEvent,0);this.internalComboboxChangeEvent=function(){var e=t.selectedItems;t.calciteComboboxChange.emit({selectedItems:e})};this.emitComboboxChange=debounce(this.internalComboboxChangeEvent,0);this.updateItems=function(){t.items=t.getItems();t.groupItems=t.getGroupItems();t.data=t.getData();t.selectedItems=t.getSelectedItems();t.visibleItems=t.getVisibleItems();t.needsIcon=t.getNeedsIcon();if(!t.allowCustomValues){t.setMaxScrollerHeight()}};this.comboboxFocusHandler=function(){var e;t.active=true;(e=t.textInput)===null||e===void 0?void 0:e.focus()};this.comboboxBlurHandler=function(e){t.setInactiveIfNotContained(e)}}e.prototype.activeHandler=function(e,t){if(t&&!e){this.el.addEventListener("calciteComboboxClose",this.toggleCloseEnd);this.open=false}else if(!t&&e){this.el.addEventListener("calciteComboboxOpen",this.toggleOpenEnd);this.open=true}this.reposition()};e.prototype.maxItemsHandler=function(){this.setMaxScrollerHeight()};e.prototype.valueHandler=function(e){if(!this.internalValueChangeFlag){var t=this.getItems();if(Array.isArray(e)){t.forEach((function(t){return t.selected=e.includes(t.value)}))}else if(e){t.forEach((function(t){return t.selected=e===t.value}))}else{t.forEach((function(e){return e.selected=false}))}this.updateItems()}};e.prototype.documentClickHandler=function(e){this.setInactiveIfNotContained(e)};e.prototype.calciteComboboxItemChangeHandler=function(e){if(this.ignoreSelectedEventsFlag){return}var t=e.target;this.toggleSelection(t,t.selected)};e.prototype.reposition=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,a;return __generator(this,(function(o){switch(o.label){case 0:e=this,t=e.popper,i=e.menuEl;n=this.getModifiers();if(!t)return[3,2];return[4,updatePopper({el:i,modifiers:n,placement:ComboboxDefaultPlacement,popper:t})];case 1:a=o.sent();return[3,3];case 2:a=this.createPopper();o.label=3;case 3:a;return[2]}}))}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){this.active=true;(e=this.textInput)===null||e===void 0?void 0:e.focus();this.activeChipIndex=-1;this.activeItemIndex=-1;return[2]}))}))};e.prototype.connectedCallback=function(){var e;this.internalValueChangeFlag=true;this.value=this.getValue();this.internalValueChangeFlag=false;(e=this.mutationObserver)===null||e===void 0?void 0:e.observe(this.el,{childList:true,subtree:true});this.createPopper();connectLabel(this);connectForm(this)};e.prototype.componentWillLoad=function(){this.updateItems()};e.prototype.componentDidLoad=function(){afterConnectDefaultValueSet(this,this.getValue())};e.prototype.componentDidRender=function(){if(this.el.offsetHeight!==this.inputHeight){this.reposition();this.inputHeight=this.el.offsetHeight}};e.prototype.disconnectedCallback=function(){var e,t;(e=this.mutationObserver)===null||e===void 0?void 0:e.disconnect();(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();this.destroyPopper();disconnectLabel(this);disconnectForm(this)};e.prototype.selectedItemsHandler=function(){this.internalValueChangeFlag=true;this.value=this.getValue();this.internalValueChangeFlag=false};e.prototype.textHandler=function(){this.updateActiveItemIndex(-1)};e.prototype.getModifiers=function(){var e={name:"flip",enabled:true};e.options={fallbackPlacements:["top-start","top","top-end","bottom-start","bottom","bottom-end"]};return[e]};e.prototype.createPopper=function(){this.destroyPopper();var e=this,t=e.menuEl,i=e.referenceEl,n=e.overlayPositioning;var a=this.getModifiers();this.popper=createPopper({el:t,modifiers:a,overlayPositioning:n,placement:ComboboxDefaultPlacement,referenceEl:i})};e.prototype.destroyPopper=function(){var e=this.popper;if(e){e.destroy()}this.popper=null};e.prototype.getMaxScrollerHeight=function(){var e=this;var t=this.getCombinedItems().filter((function(e){return!e.hidden}));var i=this.maxItems;var n=0;var a=0;if(t.length>i){t.forEach((function(t){if(n<i&&i>0){var o=e.calculateSingleItemHeight(t);if(o>0){a+=o;n++}}}))}return a};e.prototype.calculateSingleItemHeight=function(e){var t=e.offsetHeight;var i=Array.from(e.querySelectorAll(ComboboxChildSelector));i.map((function(e){return e===null||e===void 0?void 0:e.offsetHeight})).forEach((function(e){t-=e}));return t};e.prototype.getCombinedItems=function(){return __spreadArray(__spreadArray([],this.groupItems),this.items)};e.prototype.toggleSelection=function(e,t){if(t===void 0){t=!e.selected}if(!e){return}if(this.isMulti()){e.selected=t;this.updateAncestors(e);this.selectedItems=this.getSelectedItems();this.emitCalciteLookupChange();this.emitComboboxChange();this.resetText();this.filterItems("")}else{this.ignoreSelectedEventsFlag=true;this.items.forEach((function(i){return i.selected=i===e?t:false}));this.ignoreSelectedEventsFlag=false;this.selectedItems=this.getSelectedItems();this.emitComboboxChange();if(this.textInput){this.textInput.value=e.textLabel}this.active=false;this.updateActiveItemIndex(-1);this.resetText();this.filterItems("")}};e.prototype.updateAncestors=function(e){if(this.selectionMode!=="ancestors"){return}var t=getItemAncestors(e);var i=getItemChildren(e);if(e.selected){t.forEach((function(e){e.selected=true}))}else{i.forEach((function(e){return e.selected=false}));__spreadArray([],t).forEach((function(e){if(!hasActiveChildren(e)){e.selected=false}}))}};e.prototype.getVisibleItems=function(){return this.items.filter((function(e){return!e.hidden}))};e.prototype.getSelectedItems=function(){var e=this;return!this.isMulti()?[this.items.find((function(e){return e.selected}))]:this.items.filter((function(t){return t.selected&&(e.selectionMode!=="ancestors"||!hasActiveChildren(t))})).sort((function(t,i){var n=e.selectedItems.indexOf(t);var a=e.selectedItems.indexOf(i);if(n>-1&&a>-1){return n-a}return a-n}))};e.prototype.getData=function(){return this.items.map((function(e){return{constant:e.constant,value:e.value,label:e.textLabel,guid:e.guid}}))};e.prototype.getNeedsIcon=function(){return this.selectionMode==="single"&&this.items.some((function(e){return e.icon}))};e.prototype.resetText=function(){if(this.textInput){this.textInput.value=""}this.text=""};e.prototype.getItems=function(){var e=Array.from(this.el.querySelectorAll(ComboboxItem$1));return e.filter((function(e){return!e.disabled}))};e.prototype.getGroupItems=function(){return Array.from(this.el.querySelectorAll(ComboboxItemGroup$1))};e.prototype.addCustomChip=function(e,t){var i=this.items.find((function(t){return t.textLabel===e}));if(i){this.toggleSelection(i,true)}else{var n=document.createElement(ComboboxItem$1);n.value=e;n.textLabel=e;n.selected=true;this.el.appendChild(n);this.resetText();if(t){this.setFocus()}this.updateItems();this.filterItems("");this.emitCalciteLookupChange();this.emitComboboxChange()}};e.prototype.removeActiveChip=function(){this.toggleSelection(this.selectedItems[this.activeChipIndex],false);this.setFocus()};e.prototype.removeLastChip=function(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],false);this.setFocus()};e.prototype.previousChip=function(){if(this.text){return}var e=this.selectedItems.length-1;var t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0);this.updateActiveItemIndex(-1);this.focusChip()};e.prototype.nextChip=function(){if(this.text||this.activeChipIndex===-1){return}var e=this.selectedItems.length-1;var t=this.activeChipIndex+1;if(t>e){this.activeChipIndex=-1;this.setFocus()}else{this.activeChipIndex=t;this.focusChip()}this.updateActiveItemIndex(-1)};e.prototype.focusChip=function(){var e;var t=(e=this.selectedItems[this.activeChipIndex])===null||e===void 0?void 0:e.guid;var i=t?this.referenceEl.querySelector("#"+chipUidPrefix+t):null;i===null||i===void 0?void 0:i.setFocus()};e.prototype.shiftActiveItemIndex=function(e){var t=this.visibleItems.length;var i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i);var n=this.visibleItems[this.activeItemIndex];var a=this.calculateSingleItemHeight(n);var o=this.listContainerEl,r=o.offsetHeight,s=o.scrollTop;if(r+s<n.offsetTop+a){this.listContainerEl.scrollTop=n.offsetTop-r+a}else if(n.offsetTop<s){this.listContainerEl.scrollTop=n.offsetTop}};e.prototype.updateActiveItemIndex=function(e){var t;this.activeItemIndex=e;var i=null;this.visibleItems.forEach((function(t,n){if(n===e){t.active=true;i=t.guid}else{t.active=false}}));this.activeDescendant=i;if(this.activeItemIndex>-1){this.activeChipIndex=-1;(t=this.textInput)===null||t===void 0?void 0:t.focus()}};e.prototype.isMulti=function(){return this.selectionMode!=="single"};e.prototype.renderChips=function(){var e=this;var t=this,i=t.activeChipIndex,n=t.scale,a=t.selectionMode,o=t.intlRemoveTag;return this.selectedItems.map((function(t,r){var s={chip:true,"chip--active":i===r};var c=__spreadArray([],getItemAncestors(t)).reverse();var l=__spreadArray(__spreadArray([],c),[t]).map((function(e){return e.textLabel}));var m=a!=="ancestors"?t.textLabel:l.join(" / ");return h("calcite-chip",{class:s,dismissLabel:o,dismissible:true,icon:t.icon,id:t.guid?""+chipUidPrefix+t.guid:null,key:t.textLabel,onCalciteChipDismiss:function(i){return e.calciteChipDismissHandler(i,t)},scale:n,title:m,value:t.value},m)}))};e.prototype.renderInput=function(){var e=this;var t=this,i=t.guid,n=t.active,a=t.disabled,o=t.placeholder,r=t.selectionMode,s=t.needsIcon,c=t.selectedItems;var l=r==="single";var m=c[0];var p=!n&&l&&!!m;return h("span",{class:{"input-wrap":true,"input-wrap--single":l}},p&&h("span",{class:{label:true,"label--spaced":s},key:"label",onFocus:this.comboboxFocusHandler,tabindex:"0"},m.textLabel),h("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":""+listboxUidPrefix+i,"aria-label":getLabelText(this),class:{input:true,"input--single":true,"input--transparent":this.activeChipIndex>-1,"input--hidden":p,"input--icon":l&&s},disabled:a,id:""+inputUidPrefix+i,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:o,ref:function(t){return e.textInput=t},type:"text"}))};e.prototype.renderListBoxOptions=function(){return this.visibleItems.map((function(e){return h("li",{"aria-selected":(!!e.selected).toString(),id:e.guid?""+itemUidPrefix+e.guid:null,role:"option",tabindex:"-1"},e.textLabel)}))};e.prototype.renderPopperContainer=function(){var e;var t=this,i=t.active,n=t.setMenuEl,a=t.setListContainerEl,o=t.hideList,r=t.open;var s=(e={"list-container":true},e[CSS$2.animation]=true,e[CSS$2.animationActive]=i,e);return h("div",{"aria-hidden":"true",class:{"popper-container":true,"popper-container--active":r},ref:n},h("div",{class:s,onTransitionEnd:this.transitionEnd,ref:a},h("ul",{class:{list:true,"list--hide":o}},h("slot",null))))};e.prototype.renderIconStart=function(){var e=this,t=e.selectionMode,i=e.needsIcon,n=e.selectedItems;var a=n[0];return t==="single"&&i&&h("span",{class:"icon-start"},(a===null||a===void 0?void 0:a.icon)&&h("calcite-icon",{class:"selected-icon",icon:a.icon,scale:"s"}))};e.prototype.renderIconEnd=function(){return h("span",{class:"icon-end"},h("calcite-icon",{icon:"chevron-down",scale:"s"}))};e.prototype.render=function(){var e=this,t=e.guid,i=e.open,n=e.label;var a=this.selectionMode==="single";return h(Host,{onKeyDown:this.keydownHandler},h("div",{"aria-autocomplete":"list","aria-expanded":i.toString(),"aria-haspopup":"listbox","aria-labelledby":""+labelUidPrefix+t,"aria-owns":""+listboxUidPrefix+t,class:{wrapper:true,"wrapper--single":a||!this.selectedItems.length,"wrapper--active":i},onClick:this.setFocusClick,ref:this.setReferenceEl,role:"combobox"},h("div",{class:"grid-input"},this.renderIconStart(),!a&&this.renderChips(),h("label",{class:"screen-readers-only",htmlFor:""+inputUidPrefix+t,id:""+labelUidPrefix+t},n),this.renderInput()),this.renderIconEnd()),h("ul",{"aria-labelledby":""+labelUidPrefix+t,"aria-multiselectable":"true",class:"screen-readers-only",id:""+listboxUidPrefix+t,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderPopperContainer(),h(HiddenFormInputSlot,{component:this}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{active:["activeHandler"],maxItems:["maxItemsHandler"],value:["valueHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}},enumerable:false,configurable:true});return e}();Combobox.style=comboboxCss;var CSS$1={icon:"icon",iconActive:"icon--active",custom:"icon--custom",dot:"icon--dot",single:"label--single",label:"label",active:"label--active",selected:"label--selected",title:"title",textContainer:"text-container"};var comboboxItemCss='@charset "UTF-8";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host,ul{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:0px;outline:2px solid transparent;outline-offset:2px}.label{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;min-width:100%;cursor:pointer;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;padding:var(--calcite-combobox-item-spacing-unit-s) var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.icon{display:-ms-inline-flexbox;display:inline-flex;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{margin-top:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;width:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';var ComboboxItem=function(){function e(e){var t=this;registerInstance(this,e);this.calciteComboboxItemChange=createEvent(this,"calciteComboboxItemChange",7);this.disabled=false;this.selected=false;this.active=false;this.guid=guid();this.scale="m";this.itemClickHandler=function(e){e.preventDefault();if(t.disabled){return}t.selected=!t.selected}}e.prototype.selectedWatchHandler=function(){this.calciteComboboxItemChange.emit(this.el)};e.prototype.connectedCallback=function(){this.ancestors=getAncestors(this.el);this.scale=getElementProp(this.el,"scale",this.scale);connectConditionalSlotComponent(this)};e.prototype.disconnectedCallback=function(){disconnectConditionalSlotComponent(this)};e.prototype.toggleSelected=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.disabled){return[2]}this.selected=typeof e==="boolean"?e:!this.selected;return[2]}))}))};e.prototype.renderIcon=function(e){var t,i;var n=this,a=n.icon,o=n.disabled,r=n.selected;var s=CSS$1.icon+"--indent";var c=e?"dot":"check";var l=o?"circle-disallowed":c;var m=e&&!a&&!o;return m?h("span",{class:(t={},t[CSS$1.icon]=true,t[CSS$1.dot]=true,t[s]=true,t)}):h("calcite-icon",{class:(i={},i[CSS$1.icon]=!a,i[CSS$1.custom]=!!a,i[CSS$1.iconActive]=a&&r,i[s]=true,i),icon:a||l,scale:"s"})};e.prototype.renderChildren=function(){if(getSlotted(this.el)){return h("ul",{key:"default-slot-container"},h("slot",null))}return null};e.prototype.render=function(){var e;var t=getElementProp(this.el,"selection-mode","multi")==="single";var i=(e={},e[CSS$1.label]=true,e[CSS$1.selected]=this.selected,e[CSS$1.active]=this.active,e[CSS$1.single]=t,e);var n=getDepth(this.el);return h(Host,{"aria-hidden":"true"},h("div",{class:"container scale--"+this.scale,style:{"--calcite-combobox-item-spacing-indent-multiplier":""+n}},h("li",{class:i,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(t),h("span",{class:CSS$1.title},this.textLabel)),this.renderChildren()))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["selectedWatchHandler"]}},enumerable:false,configurable:true});return e}();ComboboxItem.style=comboboxItemCss;var CSS={list:"list",label:"label",title:"title"};var comboboxItemGroupCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent-1:0.5rem;--calcite-combobox-item-spacing-indent-2:1rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent-1:0.75rem;--calcite-combobox-item-spacing-indent-2:1.5rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent-1:1rem;--calcite-combobox-item-spacing-indent-2:2rem}:host,.list{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:0px;outline:2px solid transparent;outline-offset:2px}.label{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;min-width:0px;max-width:100%;color:var(--calcite-ui-text-3)}.label--indent-1{-webkit-padding-start:var(--calcite-combobox-item-spacing-indent-1);padding-inline-start:var(--calcite-combobox-item-spacing-indent-1)}.label--indent-2{-webkit-padding-start:var(--calcite-combobox-item-spacing-indent-2);padding-inline-start:var(--calcite-combobox-item-spacing-indent-2)}.title{border:0 solid;display:block;-ms-flex:1 1 0%;flex:1 1 0%;border-bottom-width:1px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2);word-wrap:break-word;word-break:break-word;border-bottom-color:var(--calcite-ui-border-3);padding:var(--calcite-combobox-item-spacing-unit-l) 0;margin-left:var(--calcite-combobox-item-spacing-unit-s);margin-right:var(--calcite-combobox-item-spacing-unit-s)}";var ComboboxItemGroup=function(){function e(e){registerInstance(this,e);this.guid=guid();this.scale="m"}e.prototype.connectedCallback=function(){this.ancestors=getAncestors(this.el);this.scale=getElementProp(this.el,"scale",this.scale)};e.prototype.render=function(){var e,t;var i=this,n=i.el,a=i.scale;var o=CSS.label+"--indent-"+getDepth(n);return h("ul",{"aria-labelledby":this.guid,class:(e={},e[CSS.list]=true,e["scale--"+a]=true,e),role:"group"},h("li",{class:(t={},t[CSS.label]=true,t[o]=true,t),id:this.guid,role:"presentation"},h("span",{class:CSS.title},this.label)),h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ComboboxItemGroup.style=comboboxItemGroupCss;export{Combobox as calcite_combobox,ComboboxItem as calcite_combobox_item,ComboboxItemGroup as calcite_combobox_item_group};
|
|
5
|
+
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-9de00868.js";import{a as isSymbol,S as Symbol,d as debounce}from"./debounce-79648d42.js";import{i as isArray,f as forIn}from"./forIn-48d8fb84.js";import{u as updatePopper,c as createPopper,C as CSS$2}from"./popper-ae231554.js";import{g as guid}from"./guid-196bd5ea.js";import{n as nodeListToArray,d as getElementProp,g as getSlotted}from"./dom-e7fa77b9.js";import{c as connectLabel,d as disconnectLabel,g as getLabelText}from"./label-2bffc9f4.js";import{c as connectForm,a as afterConnectDefaultValueSet,d as disconnectForm,H as HiddenFormInputSlot}from"./form-f90706b4.js";import{c as createObserver}from"./observers-46118290.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-9e7d8609.js";function arrayMap(e,t){var i=-1,n=e==null?0:e.length,a=Array(n);while(++i<n){a[i]=t(e[i],i,e)}return a}var INFINITY=1/0;var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function baseToString(e){if(typeof e=="string"){return e}if(isArray(e)){return arrayMap(e,baseToString)+""}if(isSymbol(e)){return symbolToString?symbolToString.call(e):""}var t=e+"";return t=="0"&&1/e==-INFINITY?"-0":t}function toString(e){return e==null?"":baseToString(e)}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);function escapeRegExp(e){e=toString(e);return e&&reHasRegExpChar.test(e)?e.replace(reRegExpChar,"\\$&"):e}var filter=function(e,t){var i=escapeRegExp(t);var n=new RegExp(i,"i");if(e.length===0){console.warn("No data was passed to the filter function.\n The data argument should be an array of objects")}var a=function(e,t){var i;if((i=e)===null||i===void 0?void 0:i.constant){return true}var n=false;forIn(e,(function(e){if(typeof e==="function"){return}if(Array.isArray(e)||typeof e==="object"&&e!==null){if(a(e,t)){n=true}}else if(t.test(e)){n=true}}));return n};var o=e.filter((function(e){return a(e,n)}));return o};var ComboboxItem$1="CALCITE-COMBOBOX-ITEM";var ComboboxItemGroup$1="CALCITE-COMBOBOX-ITEM-GROUP";var ComboboxChildSelector=ComboboxItem$1+", "+ComboboxItemGroup$1;var ComboboxDefaultPlacement="bottom-leading";var TEXT={removeTag:"Remove tag"};function getAncestors(e){var t,i;var n=(t=e.parentElement)===null||t===void 0?void 0:t.closest(ComboboxChildSelector);var a=(i=n===null||n===void 0?void 0:n.parentElement)===null||i===void 0?void 0:i.closest(ComboboxChildSelector);return[n,a].filter((function(e){return e}))}function getItemAncestors(e){var t;return((t=e.ancestors)===null||t===void 0?void 0:t.filter((function(e){return e.nodeName==="CALCITE-COMBOBOX-ITEM"})))||[]}function getItemChildren(e){return nodeListToArray(e.querySelectorAll("calcite-combobox-item"))}function hasActiveChildren(e){var t=nodeListToArray(e.querySelectorAll("calcite-combobox-item"));return t.filter((function(e){return e.selected})).length>0}function getDepth(e){var t=document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",e,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);return t.snapshotLength}var comboboxCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block}:host([disabled]){pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5}: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:-ms-flexbox;display:flex;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);padding:0 var(--calcite-combobox-item-spacing-unit-l) 0 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:0 var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.grid-input{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{-ms-flex-positive:1;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;height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-width:120px;margin-bottom:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-bottom:0px;margin-top:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.input-wrap--single{-ms-flex:1 1 0%;flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:-ms-flexbox;display:flex;max-width:100%;-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--spaced{padding-top:0px;padding-bottom:0px;padding-left:var(--calcite-combobox-item-spacing-unit-l);padding-right:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:-ms-flexbox;display:flex;width:1rem;cursor:pointer;-ms-flex-align:center;align-items:center}.icon-end{-ms-flex:none;flex:none}.popper-container{width:100%;display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.popper-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.popper-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.popper-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.popper-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.popper-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.popper-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.popper-container--active{pointer-events:initial;visibility:visible}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-height:100vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);width:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{height:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 2) 0;margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-width:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.chip:last-of-type{-webkit-margin-end:0;margin-inline-end:0}.item{display:block}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";var isGroup=function(e){return e.tagName===ComboboxItemGroup$1};var itemUidPrefix="combobox-item-";var chipUidPrefix="combobox-chip-";var labelUidPrefix="combobox-label-";var listboxUidPrefix="combobox-listbox-";var inputUidPrefix="combobox-input-";var Combobox=function(){function e(e){var t=this;registerInstance(this,e);this.calciteLookupChange=createEvent(this,"calciteLookupChange",7);this.calciteComboboxChange=createEvent(this,"calciteComboboxChange",7);this.calciteComboboxFilterChange=createEvent(this,"calciteComboboxFilterChange",7);this.calciteComboboxChipDismiss=createEvent(this,"calciteComboboxChipDismiss",7);this.calciteComboboxOpen=createEvent(this,"calciteComboboxOpen",7);this.calciteComboboxClose=createEvent(this,"calciteComboboxClose",7);this.active=false;this.disabled=false;this.maxItems=0;this.overlayPositioning="absolute";this.required=false;this.selectionMode="multi";this.scale="m";this.value=null;this.intlRemoveTag=TEXT.removeTag;this.internalValueChangeFlag=false;this.items=[];this.groupItems=[];this.selectedItems=[];this.visibleItems=[];this.hideList=!this.active;this.activeItemIndex=-1;this.activeChipIndex=-1;this.activeDescendant="";this.text="";this.open=this.active;this.textInput=null;this.mutationObserver=createObserver("mutation",(function(){return t.updateItems()}));this.resizeObserver=createObserver("resize",(function(){return t.setMaxScrollerHeight()}));this.guid=guid();this.inputHeight=0;this.ignoreSelectedEventsFlag=false;this.activeTransitionProp="opacity";this.getValue=function(){var e=t.selectedItems.map((function(e){return e===null||e===void 0?void 0:e.value.toString()}));return(e===null||e===void 0?void 0:e.length)?e.length>1?e:e[0]:""};this.onLabelClick=function(){t.setFocus()};this.keydownHandler=function(e){var i=e.key;switch(i){case"Tab":t.activeChipIndex=-1;t.activeItemIndex=-1;if(t.allowCustomValues&&t.text){t.addCustomChip(t.text,true);e.preventDefault()}else{t.active=false}break;case"ArrowLeft":t.previousChip();break;case"ArrowRight":t.nextChip();break;case"ArrowUp":e.preventDefault();t.active=true;t.shiftActiveItemIndex(-1);break;case"ArrowDown":e.preventDefault();t.active=true;t.shiftActiveItemIndex(1);break;case"Home":t.active=true;t.updateActiveItemIndex(0);break;case"End":t.active=true;t.updateActiveItemIndex(t.visibleItems.length-1);break;case"Escape":t.active=false;break;case"Enter":if(t.activeItemIndex>-1){t.toggleSelection(t.visibleItems[t.activeItemIndex])}else if(t.activeChipIndex>-1){t.removeActiveChip()}else if(t.allowCustomValues&&t.text){t.addCustomChip(t.text,true)}break;case"Delete":case"Backspace":if(t.activeChipIndex>-1){t.removeActiveChip()}else if(!t.text&&t.isMulti()){t.removeLastChip()}break;default:if(!t.active){t.setFocus()}break}};this.toggleCloseEnd=function(){t.hideList=true;t.el.removeEventListener("calciteComboboxClose",t.toggleCloseEnd)};this.toggleOpenEnd=function(){t.hideList=false;t.el.removeEventListener("calciteComboboxOpen",t.toggleOpenEnd)};this.transitionEnd=function(e){if(e.propertyName===t.activeTransitionProp){t.active?t.calciteComboboxOpen.emit():t.calciteComboboxClose.emit()}};this.setMaxScrollerHeight=function(){var e=t,i=e.active,n=e.listContainerEl;if(!n||!i){return}t.reposition();var a=t.getMaxScrollerHeight();n.style.maxHeight=a>0?a+"px":"";t.reposition()};this.calciteChipDismissHandler=function(e,i){t.active=false;var n=t.items.find((function(e){return e===i}));if(n){t.toggleSelection(n,false)}t.calciteComboboxChipDismiss.emit(e.detail)};this.setFocusClick=function(e){if(e.composedPath().some((function(e){return e.tagName==="CALCITE-CHIP"}))){return}t.setFocus()};this.setInactiveIfNotContained=function(e){var i=e.composedPath();if(!t.active&&!t.open||i.includes(t.el)||i.includes(t.referenceEl)){return}if(t.allowCustomValues&&t.text){t.addCustomChip(t.text)}if(t.selectionMode==="single"){if(t.textInput){t.textInput.value=""}t.text="";t.filterItems("");t.updateActiveItemIndex(-1)}t.active=false;t.open=false};this.setMenuEl=function(e){t.menuEl=e};this.setListContainerEl=function(e){t.resizeObserver.observe(e);t.listContainerEl=e};this.setReferenceEl=function(e){t.referenceEl=e};this.inputHandler=function(e){var i=e.target.value;t.text=i;t.filterItems(i);if(i){t.activeChipIndex=-1}};this.filterItems=function(){var e=function(e,t){return e&&t.some((function(t){var i=t.label,n=t.value;if(isGroup(e)){return n===e.label||n===e.label}return n===e.textLabel||n===e.value||i===e.textLabel||i===e.value}))};return debounce((function(i){var n=filter(t.data,i);var a=t.getCombinedItems();a.forEach((function(t){var i=!e(t,n);t.hidden=i;var a=t.ancestors,o=a[0],r=a[1];if(e(o,n)||e(r,n)){t.hidden=false}if(!i){t.ancestors.forEach((function(e){return e.hidden=false}))}}));t.visibleItems=t.getVisibleItems();t.calciteComboboxFilterChange.emit({visibleItems:__spreadArray([],t.visibleItems),text:i})}),100)}();this.internalCalciteLookupChangeEvent=function(){t.calciteLookupChange.emit(t.selectedItems)};this.emitCalciteLookupChange=debounce(this.internalCalciteLookupChangeEvent,0);this.internalComboboxChangeEvent=function(){var e=t.selectedItems;t.calciteComboboxChange.emit({selectedItems:e})};this.emitComboboxChange=debounce(this.internalComboboxChangeEvent,0);this.updateItems=function(){t.items=t.getItems();t.groupItems=t.getGroupItems();t.data=t.getData();t.selectedItems=t.getSelectedItems();t.visibleItems=t.getVisibleItems();t.needsIcon=t.getNeedsIcon();if(!t.allowCustomValues){t.setMaxScrollerHeight()}};this.comboboxFocusHandler=function(){var e;t.active=true;(e=t.textInput)===null||e===void 0?void 0:e.focus()};this.comboboxBlurHandler=function(e){t.setInactiveIfNotContained(e)}}e.prototype.activeHandler=function(e,t){if(t&&!e){this.el.addEventListener("calciteComboboxClose",this.toggleCloseEnd);this.open=false}else if(!t&&e){this.el.addEventListener("calciteComboboxOpen",this.toggleOpenEnd);this.open=true}this.reposition()};e.prototype.maxItemsHandler=function(){this.setMaxScrollerHeight()};e.prototype.valueHandler=function(e){if(!this.internalValueChangeFlag){var t=this.getItems();if(Array.isArray(e)){t.forEach((function(t){return t.selected=e.includes(t.value)}))}else if(e){t.forEach((function(t){return t.selected=e===t.value}))}else{t.forEach((function(e){return e.selected=false}))}this.updateItems()}};e.prototype.documentClickHandler=function(e){this.setInactiveIfNotContained(e)};e.prototype.calciteComboboxItemChangeHandler=function(e){if(this.ignoreSelectedEventsFlag){return}var t=e.target;this.toggleSelection(t,t.selected)};e.prototype.reposition=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,a;return __generator(this,(function(o){switch(o.label){case 0:e=this,t=e.popper,i=e.menuEl;n=this.getModifiers();if(!t)return[3,2];return[4,updatePopper({el:i,modifiers:n,placement:ComboboxDefaultPlacement,popper:t})];case 1:a=o.sent();return[3,3];case 2:a=this.createPopper();o.label=3;case 3:a;return[2]}}))}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){this.active=true;(e=this.textInput)===null||e===void 0?void 0:e.focus();this.activeChipIndex=-1;this.activeItemIndex=-1;return[2]}))}))};e.prototype.connectedCallback=function(){var e;this.internalValueChangeFlag=true;this.value=this.getValue();this.internalValueChangeFlag=false;(e=this.mutationObserver)===null||e===void 0?void 0:e.observe(this.el,{childList:true,subtree:true});this.createPopper();connectLabel(this);connectForm(this)};e.prototype.componentWillLoad=function(){this.updateItems()};e.prototype.componentDidLoad=function(){afterConnectDefaultValueSet(this,this.getValue())};e.prototype.componentDidRender=function(){if(this.el.offsetHeight!==this.inputHeight){this.reposition();this.inputHeight=this.el.offsetHeight}};e.prototype.disconnectedCallback=function(){var e,t;(e=this.mutationObserver)===null||e===void 0?void 0:e.disconnect();(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();this.destroyPopper();disconnectLabel(this);disconnectForm(this)};e.prototype.selectedItemsHandler=function(){this.internalValueChangeFlag=true;this.value=this.getValue();this.internalValueChangeFlag=false};e.prototype.textHandler=function(){this.updateActiveItemIndex(-1)};e.prototype.getModifiers=function(){var e={name:"flip",enabled:true};e.options={fallbackPlacements:["top-start","top","top-end","bottom-start","bottom","bottom-end"]};return[e]};e.prototype.createPopper=function(){this.destroyPopper();var e=this,t=e.menuEl,i=e.referenceEl,n=e.overlayPositioning;var a=this.getModifiers();this.popper=createPopper({el:t,modifiers:a,overlayPositioning:n,placement:ComboboxDefaultPlacement,referenceEl:i})};e.prototype.destroyPopper=function(){var e=this.popper;if(e){e.destroy()}this.popper=null};e.prototype.getMaxScrollerHeight=function(){var e=this;var t=this.getCombinedItems().filter((function(e){return!e.hidden}));var i=this.maxItems;var n=0;var a=0;if(t.length>i){t.forEach((function(t){if(n<i&&i>0){var o=e.calculateSingleItemHeight(t);if(o>0){a+=o;n++}}}))}return a};e.prototype.calculateSingleItemHeight=function(e){var t=e.offsetHeight;var i=Array.from(e.querySelectorAll(ComboboxChildSelector));i.map((function(e){return e===null||e===void 0?void 0:e.offsetHeight})).forEach((function(e){t-=e}));return t};e.prototype.getCombinedItems=function(){return __spreadArray(__spreadArray([],this.groupItems),this.items)};e.prototype.toggleSelection=function(e,t){if(t===void 0){t=!e.selected}if(!e){return}if(this.isMulti()){e.selected=t;this.updateAncestors(e);this.selectedItems=this.getSelectedItems();this.emitCalciteLookupChange();this.emitComboboxChange();this.resetText();this.filterItems("")}else{this.ignoreSelectedEventsFlag=true;this.items.forEach((function(i){return i.selected=i===e?t:false}));this.ignoreSelectedEventsFlag=false;this.selectedItems=this.getSelectedItems();this.emitComboboxChange();if(this.textInput){this.textInput.value=e.textLabel}this.active=false;this.updateActiveItemIndex(-1);this.resetText();this.filterItems("")}};e.prototype.updateAncestors=function(e){if(this.selectionMode!=="ancestors"){return}var t=getItemAncestors(e);var i=getItemChildren(e);if(e.selected){t.forEach((function(e){e.selected=true}))}else{i.forEach((function(e){return e.selected=false}));__spreadArray([],t).forEach((function(e){if(!hasActiveChildren(e)){e.selected=false}}))}};e.prototype.getVisibleItems=function(){return this.items.filter((function(e){return!e.hidden}))};e.prototype.getSelectedItems=function(){var e=this;if(!this.isMulti()){var t=this.items.find((function(e){var t=e.selected;return t}));return t?[t]:[]}return this.items.filter((function(t){return t.selected&&(e.selectionMode!=="ancestors"||!hasActiveChildren(t))})).sort((function(t,i){var n=e.selectedItems.indexOf(t);var a=e.selectedItems.indexOf(i);if(n>-1&&a>-1){return n-a}return a-n}))};e.prototype.getData=function(){return this.items.map((function(e){return{constant:e.constant,value:e.value,label:e.textLabel,guid:e.guid}}))};e.prototype.getNeedsIcon=function(){return this.selectionMode==="single"&&this.items.some((function(e){return e.icon}))};e.prototype.resetText=function(){if(this.textInput){this.textInput.value=""}this.text=""};e.prototype.getItems=function(){var e=Array.from(this.el.querySelectorAll(ComboboxItem$1));return e.filter((function(e){return!e.disabled}))};e.prototype.getGroupItems=function(){return Array.from(this.el.querySelectorAll(ComboboxItemGroup$1))};e.prototype.addCustomChip=function(e,t){var i=this.items.find((function(t){return t.textLabel===e}));if(i){this.toggleSelection(i,true)}else{if(!this.isMulti()){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],false)}var n=document.createElement(ComboboxItem$1);n.value=e;n.textLabel=e;n.selected=true;this.el.appendChild(n);this.resetText();if(t){this.setFocus()}this.updateItems();this.filterItems("");this.emitCalciteLookupChange();this.emitComboboxChange()}};e.prototype.removeActiveChip=function(){this.toggleSelection(this.selectedItems[this.activeChipIndex],false);this.setFocus()};e.prototype.removeLastChip=function(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],false);this.setFocus()};e.prototype.previousChip=function(){if(this.text){return}var e=this.selectedItems.length-1;var t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0);this.updateActiveItemIndex(-1);this.focusChip()};e.prototype.nextChip=function(){if(this.text||this.activeChipIndex===-1){return}var e=this.selectedItems.length-1;var t=this.activeChipIndex+1;if(t>e){this.activeChipIndex=-1;this.setFocus()}else{this.activeChipIndex=t;this.focusChip()}this.updateActiveItemIndex(-1)};e.prototype.focusChip=function(){var e;var t=(e=this.selectedItems[this.activeChipIndex])===null||e===void 0?void 0:e.guid;var i=t?this.referenceEl.querySelector("#"+chipUidPrefix+t):null;i===null||i===void 0?void 0:i.setFocus()};e.prototype.shiftActiveItemIndex=function(e){var t=this.visibleItems.length;var i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i);var n=this.visibleItems[this.activeItemIndex];var a=this.calculateSingleItemHeight(n);var o=this.listContainerEl,r=o.offsetHeight,s=o.scrollTop;if(r+s<n.offsetTop+a){this.listContainerEl.scrollTop=n.offsetTop-r+a}else if(n.offsetTop<s){this.listContainerEl.scrollTop=n.offsetTop}};e.prototype.updateActiveItemIndex=function(e){var t;this.activeItemIndex=e;var i=null;this.visibleItems.forEach((function(t,n){if(n===e){t.active=true;i=t.guid}else{t.active=false}}));this.activeDescendant=i;if(this.activeItemIndex>-1){this.activeChipIndex=-1;(t=this.textInput)===null||t===void 0?void 0:t.focus()}};e.prototype.isMulti=function(){return this.selectionMode!=="single"};e.prototype.renderChips=function(){var e=this;var t=this,i=t.activeChipIndex,n=t.scale,a=t.selectionMode,o=t.intlRemoveTag;return this.selectedItems.map((function(t,r){var s={chip:true,"chip--active":i===r};var c=__spreadArray([],getItemAncestors(t)).reverse();var l=__spreadArray(__spreadArray([],c),[t]).map((function(e){return e.textLabel}));var m=a!=="ancestors"?t.textLabel:l.join(" / ");return h("calcite-chip",{class:s,dismissLabel:o,dismissible:true,icon:t.icon,id:t.guid?""+chipUidPrefix+t.guid:null,key:t.textLabel,onCalciteChipDismiss:function(i){return e.calciteChipDismissHandler(i,t)},scale:n,title:m,value:t.value},m)}))};e.prototype.renderInput=function(){var e=this;var t=this,i=t.guid,n=t.active,a=t.disabled,o=t.placeholder,r=t.selectionMode,s=t.needsIcon,c=t.selectedItems;var l=r==="single";var m=c[0];var p=!n&&l&&!!m;return h("span",{class:{"input-wrap":true,"input-wrap--single":l}},p&&h("span",{class:{label:true,"label--spaced":s},key:"label",onFocus:this.comboboxFocusHandler,tabindex:"0"},m.textLabel),h("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":""+listboxUidPrefix+i,"aria-label":getLabelText(this),class:{input:true,"input--single":true,"input--transparent":this.activeChipIndex>-1,"input--hidden":p,"input--icon":l&&s},disabled:a,id:""+inputUidPrefix+i,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:o,ref:function(t){return e.textInput=t},type:"text"}))};e.prototype.renderListBoxOptions=function(){return this.visibleItems.map((function(e){return h("li",{"aria-selected":(!!e.selected).toString(),id:e.guid?""+itemUidPrefix+e.guid:null,role:"option",tabindex:"-1"},e.textLabel)}))};e.prototype.renderPopperContainer=function(){var e;var t=this,i=t.active,n=t.setMenuEl,a=t.setListContainerEl,o=t.hideList,r=t.open;var s=(e={"list-container":true},e[CSS$2.animation]=true,e[CSS$2.animationActive]=i,e);return h("div",{"aria-hidden":"true",class:{"popper-container":true,"popper-container--active":r},ref:n},h("div",{class:s,onTransitionEnd:this.transitionEnd,ref:a},h("ul",{class:{list:true,"list--hide":o}},h("slot",null))))};e.prototype.renderIconStart=function(){var e=this,t=e.selectionMode,i=e.needsIcon,n=e.selectedItems;var a=n[0];return t==="single"&&i&&h("span",{class:"icon-start"},(a===null||a===void 0?void 0:a.icon)&&h("calcite-icon",{class:"selected-icon",icon:a.icon,scale:"s"}))};e.prototype.renderIconEnd=function(){return h("span",{class:"icon-end"},h("calcite-icon",{icon:"chevron-down",scale:"s"}))};e.prototype.render=function(){var e=this,t=e.guid,i=e.open,n=e.label;var a=this.selectionMode==="single";return h(Host,{onKeyDown:this.keydownHandler},h("div",{"aria-autocomplete":"list","aria-expanded":i.toString(),"aria-haspopup":"listbox","aria-labelledby":""+labelUidPrefix+t,"aria-owns":""+listboxUidPrefix+t,class:{wrapper:true,"wrapper--single":a||!this.selectedItems.length,"wrapper--active":i},onClick:this.setFocusClick,ref:this.setReferenceEl,role:"combobox"},h("div",{class:"grid-input"},this.renderIconStart(),!a&&this.renderChips(),h("label",{class:"screen-readers-only",htmlFor:""+inputUidPrefix+t,id:""+labelUidPrefix+t},n),this.renderInput()),this.renderIconEnd()),h("ul",{"aria-labelledby":""+labelUidPrefix+t,"aria-multiselectable":"true",class:"screen-readers-only",id:""+listboxUidPrefix+t,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderPopperContainer(),h(HiddenFormInputSlot,{component:this}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{active:["activeHandler"],maxItems:["maxItemsHandler"],value:["valueHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}},enumerable:false,configurable:true});return e}();Combobox.style=comboboxCss;var CSS$1={icon:"icon",iconActive:"icon--active",custom:"icon--custom",dot:"icon--dot",single:"label--single",label:"label",active:"label--active",selected:"label--selected",title:"title",textContainer:"text-container"};var comboboxItemCss='@charset "UTF-8";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host,ul{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:0px;outline:2px solid transparent;outline-offset:2px}.label{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;min-width:100%;cursor:pointer;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;padding:var(--calcite-combobox-item-spacing-unit-s) var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.icon{display:-ms-inline-flexbox;display:inline-flex;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{margin-top:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;width:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';var ComboboxItem=function(){function e(e){var t=this;registerInstance(this,e);this.calciteComboboxItemChange=createEvent(this,"calciteComboboxItemChange",7);this.disabled=false;this.selected=false;this.active=false;this.guid=guid();this.scale="m";this.itemClickHandler=function(e){e.preventDefault();if(t.disabled){return}t.selected=!t.selected}}e.prototype.selectedWatchHandler=function(){this.calciteComboboxItemChange.emit(this.el)};e.prototype.connectedCallback=function(){this.ancestors=getAncestors(this.el);this.scale=getElementProp(this.el,"scale",this.scale);connectConditionalSlotComponent(this)};e.prototype.disconnectedCallback=function(){disconnectConditionalSlotComponent(this)};e.prototype.toggleSelected=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.disabled){return[2]}this.selected=typeof e==="boolean"?e:!this.selected;return[2]}))}))};e.prototype.renderIcon=function(e){var t,i;var n=this,a=n.icon,o=n.disabled,r=n.selected;var s=CSS$1.icon+"--indent";var c=e?"dot":"check";var l=o?"circle-disallowed":c;var m=e&&!a&&!o;return m?h("span",{class:(t={},t[CSS$1.icon]=true,t[CSS$1.dot]=true,t[s]=true,t)}):h("calcite-icon",{class:(i={},i[CSS$1.icon]=!a,i[CSS$1.custom]=!!a,i[CSS$1.iconActive]=a&&r,i[s]=true,i),icon:a||l,scale:"s"})};e.prototype.renderChildren=function(){if(getSlotted(this.el)){return h("ul",{key:"default-slot-container"},h("slot",null))}return null};e.prototype.render=function(){var e;var t=getElementProp(this.el,"selection-mode","multi")==="single";var i=(e={},e[CSS$1.label]=true,e[CSS$1.selected]=this.selected,e[CSS$1.active]=this.active,e[CSS$1.single]=t,e);var n=getDepth(this.el);return h(Host,{"aria-hidden":"true"},h("div",{class:"container scale--"+this.scale,style:{"--calcite-combobox-item-spacing-indent-multiplier":""+n}},h("li",{class:i,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(t),h("span",{class:CSS$1.title},this.textLabel)),this.renderChildren()))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["selectedWatchHandler"]}},enumerable:false,configurable:true});return e}();ComboboxItem.style=comboboxItemCss;var CSS={list:"list",label:"label",title:"title"};var comboboxItemGroupCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent-1:0.5rem;--calcite-combobox-item-spacing-indent-2:1rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent-1:0.75rem;--calcite-combobox-item-spacing-indent-2:1.5rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent-1:1rem;--calcite-combobox-item-spacing-indent-2:2rem}:host,.list{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:0px;outline:2px solid transparent;outline-offset:2px}.label{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;min-width:0px;max-width:100%;color:var(--calcite-ui-text-3)}.label--indent-1{-webkit-padding-start:var(--calcite-combobox-item-spacing-indent-1);padding-inline-start:var(--calcite-combobox-item-spacing-indent-1)}.label--indent-2{-webkit-padding-start:var(--calcite-combobox-item-spacing-indent-2);padding-inline-start:var(--calcite-combobox-item-spacing-indent-2)}.title{border:0 solid;display:block;-ms-flex:1 1 0%;flex:1 1 0%;border-bottom-width:1px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2);word-wrap:break-word;word-break:break-word;border-bottom-color:var(--calcite-ui-border-3);padding:var(--calcite-combobox-item-spacing-unit-l) 0;margin-left:var(--calcite-combobox-item-spacing-unit-s);margin-right:var(--calcite-combobox-item-spacing-unit-s)}";var ComboboxItemGroup=function(){function e(e){registerInstance(this,e);this.guid=guid();this.scale="m"}e.prototype.connectedCallback=function(){this.ancestors=getAncestors(this.el);this.scale=getElementProp(this.el,"scale",this.scale)};e.prototype.render=function(){var e,t;var i=this,n=i.el,a=i.scale;var o=CSS.label+"--indent-"+getDepth(n);return h("ul",{"aria-labelledby":this.guid,class:(e={},e[CSS.list]=true,e["scale--"+a]=true,e),role:"group"},h("li",{class:(t={},t[CSS.label]=true,t[o]=true,t),id:this.guid,role:"presentation"},h("span",{class:CSS.title},this.label)),h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ComboboxItemGroup.style=comboboxItemGroupCss;export{Combobox as calcite_combobox,ComboboxItem as calcite_combobox_item,ComboboxItemGroup as calcite_combobox_item_group};
|