@esri/calcite-components 1.0.0-next.373 → 1.0.0-next.374
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/calcite.esm.js +1 -1
- package/dist/calcite/p-05ad8606.system.entry.js +5 -0
- package/dist/calcite/{p-32d61433.system.entry.js → p-2f0d280a.system.entry.js} +1 -1
- package/dist/calcite/{p-617c3f30.system.entry.js → p-3dd50bac.system.entry.js} +1 -1
- package/dist/calcite/p-4e258f5c.entry.js +5 -0
- package/dist/calcite/{p-82491929.entry.js → p-6e37af80.entry.js} +1 -1
- package/dist/calcite/p-7409e609.system.js +5 -0
- package/dist/calcite/p-76c53ab5.entry.js +5 -0
- package/dist/calcite/{p-f24ddc56.system.entry.js → p-80eb08b3.system.entry.js} +1 -1
- package/dist/calcite/p-8a413063.js +5 -0
- package/dist/calcite/{p-ee14736a.entry.js → p-8c126095.entry.js} +1 -1
- package/dist/calcite/{p-2e324a56.system.entry.js → p-92711575.system.entry.js} +2 -2
- package/dist/calcite/p-99b729f6.entry.js +5 -0
- package/dist/calcite/p-99d32fc3.system.js +1 -1
- package/dist/calcite/p-a49d1a11.system.entry.js +5 -0
- package/dist/calcite/p-a5660ba5.entry.js +5 -0
- package/dist/calcite/p-aceeb62f.entry.js +5 -0
- package/dist/calcite/p-b78f6de5.system.entry.js +5 -0
- package/dist/calcite/p-bab0c984.entry.js +5 -0
- package/dist/calcite/{p-39d4d1b1.system.entry.js → p-bd6cbbbd.system.entry.js} +1 -1
- package/dist/calcite/{p-8709d314.system.entry.js → p-c93dbb93.system.entry.js} +1 -1
- package/dist/calcite/p-d2bcb3ae.entry.js +5 -0
- package/dist/calcite/p-dd8b6d4f.system.entry.js +5 -0
- package/dist/calcite/p-e05aa070.entry.js +5 -0
- package/dist/calcite/p-e66c335c.entry.js +5 -0
- package/dist/calcite/p-f3102bbb.system.entry.js +5 -0
- package/dist/calcite/{p-3cdf0ad5.system.entry.js → p-fd3c4738.system.entry.js} +1 -1
- package/dist/calcite/p-fe6e3ff9.entry.js +5 -0
- package/dist/cjs/calcite-action-menu.cjs.entry.js +1 -4
- package/dist/cjs/calcite-alert.cjs.entry.js +4 -6
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-graph_2.cjs.entry.js +7 -3
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +38 -13
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input.cjs.entry.js +11 -7
- package/dist/cjs/calcite-modal.cjs.entry.js +1 -1
- package/dist/cjs/calcite-notice.cjs.entry.js +4 -6
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +13 -0
- package/dist/cjs/calcite-radio-button.cjs.entry.js +0 -4
- package/dist/cjs/{resources-11763017.js → resources-f70fb01b.js} +3 -0
- package/dist/collection/components/calcite-action-menu/calcite-action-menu.js +1 -4
- package/dist/collection/components/calcite-alert/calcite-alert.js +8 -7
- package/dist/collection/components/calcite-date-picker/utils.js +3 -0
- package/dist/collection/components/calcite-dropdown/calcite-dropdown.js +2 -2
- package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.js +39 -14
- package/dist/collection/components/calcite-input/calcite-input.js +12 -8
- package/dist/collection/components/calcite-modal/calcite-modal.js +1 -1
- package/dist/collection/components/calcite-notice/calcite-notice.js +4 -6
- package/dist/collection/components/calcite-radio-button/calcite-radio-button.js +0 -4
- package/dist/collection/components/calcite-radio-button-group/calcite-radio-button-group.js +13 -0
- package/dist/collection/components/calcite-slider/calcite-slider.js +7 -3
- package/dist/components/calcite-action-menu2.js +1 -4
- package/dist/components/calcite-alert.js +5 -7
- package/dist/components/calcite-date-picker2.js +3 -0
- package/dist/components/calcite-dropdown2.js +2 -2
- package/dist/components/calcite-inline-editable.js +39 -14
- package/dist/components/calcite-input2.js +12 -8
- package/dist/components/calcite-modal.js +1 -1
- package/dist/components/calcite-notice.js +4 -6
- package/dist/components/calcite-radio-button-group.js +13 -0
- package/dist/components/calcite-radio-button.js +0 -4
- package/dist/components/calcite-slider.js +7 -3
- package/dist/custom-elements/index.js +80 -45
- package/dist/esm/calcite-action-menu.entry.js +1 -4
- package/dist/esm/calcite-alert.entry.js +5 -7
- package/dist/esm/calcite-date-picker_4.entry.js +1 -1
- package/dist/esm/calcite-dropdown_3.entry.js +2 -2
- package/dist/esm/calcite-graph_2.entry.js +7 -3
- package/dist/esm/calcite-inline-editable.entry.js +39 -14
- package/dist/esm/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm/calcite-input.entry.js +12 -8
- package/dist/esm/calcite-modal.entry.js +1 -1
- package/dist/esm/calcite-notice.entry.js +4 -6
- package/dist/esm/calcite-radio-button-group.entry.js +13 -0
- package/dist/esm/calcite-radio-button.entry.js +0 -4
- package/dist/esm/{resources-c768953c.js → resources-f02a1ab5.js} +3 -0
- package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
- package/dist/esm-es5/calcite-alert.entry.js +1 -1
- package/dist/esm-es5/calcite-date-picker_4.entry.js +1 -1
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
- package/dist/esm-es5/calcite-inline-editable.entry.js +1 -1
- package/dist/esm-es5/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm-es5/calcite-input.entry.js +1 -1
- package/dist/esm-es5/calcite-modal.entry.js +1 -1
- package/dist/esm-es5/calcite-notice.entry.js +1 -1
- package/dist/esm-es5/calcite-radio-button-group.entry.js +1 -1
- package/dist/esm-es5/calcite-radio-button.entry.js +1 -1
- package/dist/esm-es5/resources-f02a1ab5.js +5 -0
- package/dist/extras/docs-json.json +1 -1
- package/dist/types/components/calcite-alert/calcite-alert.d.ts +0 -3
- package/dist/types/components/calcite-inline-editable/calcite-inline-editable.d.ts +3 -1
- package/dist/types/components/calcite-input/calcite-input.d.ts +2 -4
- package/dist/types/components/calcite-notice/calcite-notice.d.ts +0 -3
- package/dist/types/components/calcite-radio-button-group/calcite-radio-button-group.d.ts +2 -0
- package/dist/types/components/calcite-slider/calcite-slider.d.ts +1 -0
- package/hydrate/index.js +77 -45
- package/package.json +6 -2
- package/readme.md +0 -4
- package/dist/calcite/p-06fbc0f2.system.entry.js +0 -5
- package/dist/calcite/p-08be120f.entry.js +0 -5
- package/dist/calcite/p-0b552c00.system.entry.js +0 -5
- package/dist/calcite/p-500300b5.entry.js +0 -5
- package/dist/calcite/p-647d22ef.js +0 -5
- package/dist/calcite/p-64a5e88c.entry.js +0 -5
- package/dist/calcite/p-6969dabb.entry.js +0 -5
- package/dist/calcite/p-8ba8a357.system.js +0 -5
- package/dist/calcite/p-97375cc0.entry.js +0 -5
- package/dist/calcite/p-99422223.system.entry.js +0 -5
- package/dist/calcite/p-a50e52f1.entry.js +0 -5
- package/dist/calcite/p-abe7730b.entry.js +0 -5
- package/dist/calcite/p-c5b3d90c.entry.js +0 -5
- package/dist/calcite/p-cd9d106b.system.entry.js +0 -5
- package/dist/calcite/p-dba7c714.system.entry.js +0 -5
- package/dist/calcite/p-e5c2a6eb.entry.js +0 -5
- package/dist/calcite/p-e63f0806.entry.js +0 -5
- package/dist/esm-es5/resources-c768953c.js +0 -5
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
|
-
import { T as TEXT, s as setRequestedIcon, g as getElementProp, a as getElementDir, C as CSS_UTILITY } from './dom.js';
|
|
6
|
+
import { T as TEXT, b as getSlotted, s as setRequestedIcon, g as getElementProp, a as getElementDir, C as CSS_UTILITY } from './dom.js';
|
|
7
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label.js';
|
|
8
8
|
import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form.js';
|
|
9
9
|
import { d as delocalizeNumberString, g as getDecimalSeparator, l as localizeNumberString } from './locale.js';
|
|
10
10
|
import { i as isValidNumber, p as parseNumberString, s as sanitizeNumberString, n as numberKeys } from './number.js';
|
|
11
11
|
import { d as decimalPlaces } from './math.js';
|
|
12
|
+
import { c as createObserver } from './observers.js';
|
|
12
13
|
import { d as defineCustomElement$2 } from './calcite-icon2.js';
|
|
13
14
|
import { d as defineCustomElement$1 } from './calcite-progress2.js';
|
|
14
15
|
|
|
@@ -110,6 +111,7 @@ let CalciteInput = class extends HTMLElement {
|
|
|
110
111
|
this.childElType = "input";
|
|
111
112
|
/** whether the value of the input was changed as a result of user typing or not */
|
|
112
113
|
this.internalValueChange = false;
|
|
114
|
+
this.mutationObserver = createObserver("mutation", () => this.setDisabledAction());
|
|
113
115
|
//--------------------------------------------------------------------------
|
|
114
116
|
//
|
|
115
117
|
// Private Methods
|
|
@@ -148,7 +150,8 @@ let CalciteInput = class extends HTMLElement {
|
|
|
148
150
|
}
|
|
149
151
|
};
|
|
150
152
|
this.inputFocusHandler = (event) => {
|
|
151
|
-
|
|
153
|
+
const slottedActionEl = getSlotted(this.el, "action");
|
|
154
|
+
if (event.target !== slottedActionEl) {
|
|
152
155
|
this.setFocus();
|
|
153
156
|
}
|
|
154
157
|
this.calciteInputFocus.emit({
|
|
@@ -392,6 +395,7 @@ let CalciteInput = class extends HTMLElement {
|
|
|
392
395
|
//
|
|
393
396
|
//--------------------------------------------------------------------------
|
|
394
397
|
connectedCallback() {
|
|
398
|
+
var _a;
|
|
395
399
|
this.scale = getElementProp(this.el, "scale", this.scale);
|
|
396
400
|
this.status = getElementProp(this.el, "status", this.status);
|
|
397
401
|
this.inlineEditableEl = this.el.closest("calcite-inline-editable");
|
|
@@ -408,10 +412,14 @@ let CalciteInput = class extends HTMLElement {
|
|
|
408
412
|
}
|
|
409
413
|
connectLabel(this);
|
|
410
414
|
connectForm(this);
|
|
415
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
|
416
|
+
this.setDisabledAction();
|
|
411
417
|
}
|
|
412
418
|
disconnectedCallback() {
|
|
419
|
+
var _a;
|
|
413
420
|
disconnectLabel(this);
|
|
414
421
|
disconnectForm(this);
|
|
422
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
415
423
|
}
|
|
416
424
|
componentWillLoad() {
|
|
417
425
|
var _a, _b;
|
|
@@ -420,10 +428,6 @@ let CalciteInput = class extends HTMLElement {
|
|
|
420
428
|
this.minString = (_b = this.min) === null || _b === void 0 ? void 0 : _b.toString();
|
|
421
429
|
this.requestedIcon = setRequestedIcon(INPUT_TYPE_ICONS, this.icon, this.type);
|
|
422
430
|
}
|
|
423
|
-
componentDidLoad() {
|
|
424
|
-
this.slottedActionEl = this.el.querySelector("[slot=action]");
|
|
425
|
-
this.setDisabledAction();
|
|
426
|
-
}
|
|
427
431
|
componentShouldUpdate(newValue, oldValue, property) {
|
|
428
432
|
if (this.type === "number" && property === "value" && newValue && !isValidNumber(newValue)) {
|
|
429
433
|
this.setValue({
|
|
@@ -495,10 +499,10 @@ let CalciteInput = class extends HTMLElement {
|
|
|
495
499
|
}
|
|
496
500
|
}
|
|
497
501
|
setDisabledAction() {
|
|
498
|
-
|
|
502
|
+
const slottedActionEl = getSlotted(this.el, "action");
|
|
503
|
+
if (!slottedActionEl) {
|
|
499
504
|
return;
|
|
500
505
|
}
|
|
501
|
-
const slottedActionEl = this.slottedActionEl;
|
|
502
506
|
this.disabled
|
|
503
507
|
? slottedActionEl.setAttribute("disabled", "")
|
|
504
508
|
: slottedActionEl.removeAttribute("disabled");
|
|
@@ -227,7 +227,7 @@ let CalciteModal$1 = class extends HTMLElement {
|
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
this.updateFooterVisibility = () => {
|
|
230
|
-
this.hasFooter = !!this.el
|
|
230
|
+
this.hasFooter = !!getSlotted(this.el, [SLOTS.back, SLOTS.primary, SLOTS.secondary]);
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
//--------------------------------------------------------------------------
|
|
@@ -80,9 +80,6 @@ let CalciteNotice$1 = class extends HTMLElement {
|
|
|
80
80
|
componentWillLoad() {
|
|
81
81
|
this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
|
|
82
82
|
}
|
|
83
|
-
componentDidLoad() {
|
|
84
|
-
this.noticeLinkEl = this.el.querySelector("calcite-link");
|
|
85
|
-
}
|
|
86
83
|
render() {
|
|
87
84
|
const { el } = this;
|
|
88
85
|
const closeButton = (h("button", { "aria-label": this.intlClose, class: CSS.close, onClick: this.close, ref: (el) => (this.closeButton = el) }, h("calcite-icon", { icon: "x", scale: this.scale === "l" ? "m" : "s" })));
|
|
@@ -96,11 +93,12 @@ let CalciteNotice$1 = class extends HTMLElement {
|
|
|
96
93
|
//--------------------------------------------------------------------------
|
|
97
94
|
/** Sets focus on the component. */
|
|
98
95
|
async setFocus() {
|
|
99
|
-
|
|
96
|
+
const noticeLinkEl = this.el.querySelector("calcite-link");
|
|
97
|
+
if (!this.closeButton && !noticeLinkEl) {
|
|
100
98
|
return;
|
|
101
99
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
100
|
+
if (noticeLinkEl) {
|
|
101
|
+
noticeLinkEl.setFocus();
|
|
104
102
|
}
|
|
105
103
|
else if (this.closeButton) {
|
|
106
104
|
this.closeButton.focus();
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
|
+
import { c as createObserver } from './observers.js';
|
|
6
7
|
|
|
7
8
|
const calciteRadioButtonGroupCss = "@-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:-ms-flexbox;display:flex;max-width:100vw}:host([layout=horizontal]){-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}:host([layout=horizontal][scale=s]){gap:1rem}:host([layout=horizontal][scale=m]){gap:1.25rem}:host([layout=horizontal][scale=l]){gap:1.5rem}:host([layout=vertical]){-ms-flex-direction:column;flex-direction:column}";
|
|
8
9
|
|
|
@@ -27,6 +28,12 @@ let CalciteRadioButtonGroup$1 = class extends HTMLElement {
|
|
|
27
28
|
this.required = false;
|
|
28
29
|
/** The scale (size) of the radio button group. */
|
|
29
30
|
this.scale = "m";
|
|
31
|
+
// --------------------------------------------------------------------------
|
|
32
|
+
//
|
|
33
|
+
// Private Properties
|
|
34
|
+
//
|
|
35
|
+
// --------------------------------------------------------------------------
|
|
36
|
+
this.mutationObserver = createObserver("mutation", () => this.passPropsToRadioButtons());
|
|
30
37
|
//--------------------------------------------------------------------------
|
|
31
38
|
//
|
|
32
39
|
// Private Methods
|
|
@@ -63,7 +70,13 @@ let CalciteRadioButtonGroup$1 = class extends HTMLElement {
|
|
|
63
70
|
//
|
|
64
71
|
//--------------------------------------------------------------------------
|
|
65
72
|
connectedCallback() {
|
|
73
|
+
var _a;
|
|
66
74
|
this.passPropsToRadioButtons();
|
|
75
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
var _a;
|
|
79
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
67
80
|
}
|
|
68
81
|
//--------------------------------------------------------------------------
|
|
69
82
|
//
|
|
@@ -142,10 +142,6 @@ let CalciteRadioButton$1 = class extends HTMLElement {
|
|
|
142
142
|
}
|
|
143
143
|
nameChanged() {
|
|
144
144
|
this.checkLastRadioButton();
|
|
145
|
-
const currentValue = this.rootNode.querySelector(`input[name="${this.name}"]:checked`);
|
|
146
|
-
if (!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.value)) {
|
|
147
|
-
this.uncheckAllRadioButtonsInGroup();
|
|
148
|
-
}
|
|
149
145
|
}
|
|
150
146
|
//--------------------------------------------------------------------------
|
|
151
147
|
//
|
|
@@ -93,9 +93,7 @@ let CalciteSlider$1 = class extends HTMLElement {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
this.dragEnd = (event) => {
|
|
96
|
-
|
|
97
|
-
document.removeEventListener("pointerup", this.dragEnd);
|
|
98
|
-
document.removeEventListener("pointercancel", this.dragEnd);
|
|
96
|
+
this.removeDragListeners();
|
|
99
97
|
this.focusActiveHandle(event.clientX);
|
|
100
98
|
if (this.lastDragPropValue != this[this.dragProp]) {
|
|
101
99
|
this.emitChange();
|
|
@@ -130,6 +128,7 @@ let CalciteSlider$1 = class extends HTMLElement {
|
|
|
130
128
|
disconnectedCallback() {
|
|
131
129
|
disconnectLabel(this);
|
|
132
130
|
disconnectForm(this);
|
|
131
|
+
this.removeDragListeners();
|
|
133
132
|
}
|
|
134
133
|
componentWillLoad() {
|
|
135
134
|
this.isRange = !!(this.maxValue || this.maxValue === 0);
|
|
@@ -465,6 +464,11 @@ let CalciteSlider$1 = class extends HTMLElement {
|
|
|
465
464
|
emitChange() {
|
|
466
465
|
this.calciteSliderChange.emit();
|
|
467
466
|
}
|
|
467
|
+
removeDragListeners() {
|
|
468
|
+
document.removeEventListener("pointermove", this.dragUpdate);
|
|
469
|
+
document.removeEventListener("pointerup", this.dragEnd);
|
|
470
|
+
document.removeEventListener("pointercancel", this.dragEnd);
|
|
471
|
+
}
|
|
468
472
|
/**
|
|
469
473
|
* Set the prop value if changed at the component level
|
|
470
474
|
* @param valueProp
|
|
@@ -2393,10 +2393,7 @@ let CalciteActionMenu$1 = class extends HTMLElement$1 {
|
|
|
2393
2393
|
};
|
|
2394
2394
|
this.getActions = () => {
|
|
2395
2395
|
const { el } = this;
|
|
2396
|
-
const
|
|
2397
|
-
const actionElements = assignedActions.length
|
|
2398
|
-
? assignedActions
|
|
2399
|
-
: Array.from(el.querySelectorAll("calcite-action:not([slot=trigger])"));
|
|
2396
|
+
const actionElements = getSlotted(el, { all: true, matches: "calcite-action" });
|
|
2400
2397
|
this.updateActions(actionElements);
|
|
2401
2398
|
this.actionElements = actionElements;
|
|
2402
2399
|
this.connectMenuButtonEl();
|
|
@@ -2802,9 +2799,6 @@ let CalciteAlert$1 = class extends HTMLElement$1 {
|
|
|
2802
2799
|
componentWillLoad() {
|
|
2803
2800
|
this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
|
|
2804
2801
|
}
|
|
2805
|
-
componentDidLoad() {
|
|
2806
|
-
this.alertLinkEl = this.el.querySelectorAll("calcite-link")[0];
|
|
2807
|
-
}
|
|
2808
2802
|
disconnectedCallback() {
|
|
2809
2803
|
window.clearTimeout(this.autoDismissTimeoutId);
|
|
2810
2804
|
}
|
|
@@ -2845,11 +2839,12 @@ let CalciteAlert$1 = class extends HTMLElement$1 {
|
|
|
2845
2839
|
//--------------------------------------------------------------------------
|
|
2846
2840
|
/** Sets focus on the component. */
|
|
2847
2841
|
async setFocus() {
|
|
2848
|
-
|
|
2842
|
+
const alertLinkEl = getSlotted(this.el, { selector: "calcite-link" });
|
|
2843
|
+
if (!this.closeButton && !alertLinkEl) {
|
|
2849
2844
|
return;
|
|
2850
2845
|
}
|
|
2851
|
-
else if (
|
|
2852
|
-
|
|
2846
|
+
else if (alertLinkEl) {
|
|
2847
|
+
alertLinkEl.setFocus();
|
|
2853
2848
|
}
|
|
2854
2849
|
else if (this.closeButton) {
|
|
2855
2850
|
this.closeButton.focus();
|
|
@@ -10379,6 +10374,9 @@ function getSupportedLocale(lang = "") {
|
|
|
10379
10374
|
lang = lang.toLowerCase();
|
|
10380
10375
|
if (lang.includes("-")) {
|
|
10381
10376
|
lang = lang.replace(/(\w+)-(\w+)/, (_match, language, region) => `${language}-${region.toUpperCase()}`);
|
|
10377
|
+
if (!locales.includes(lang)) {
|
|
10378
|
+
lang = lang.split("-")[0];
|
|
10379
|
+
}
|
|
10382
10380
|
}
|
|
10383
10381
|
return locales.includes(lang) ? lang : "en";
|
|
10384
10382
|
}
|
|
@@ -11505,7 +11503,7 @@ let CalciteDropdown$1 = class extends HTMLElement$1 {
|
|
|
11505
11503
|
//--------------------------------------------------------------------------
|
|
11506
11504
|
this.updateItems = () => {
|
|
11507
11505
|
this.updateSelectedItems();
|
|
11508
|
-
this.triggers =
|
|
11506
|
+
this.triggers = getSlotted(this.el, "dropdown-trigger", { all: true });
|
|
11509
11507
|
this.items = Array.from(this.el.querySelectorAll("calcite-dropdown-item"));
|
|
11510
11508
|
this.reposition();
|
|
11511
11509
|
};
|
|
@@ -12796,26 +12794,31 @@ let CalciteInlineEditable$1 = class extends HTMLElement$1 {
|
|
|
12796
12794
|
* @default "Save"
|
|
12797
12795
|
*/
|
|
12798
12796
|
this.intlConfirmChanges = TEXT$c.intlConfirmChanges;
|
|
12797
|
+
this.mutationObserver = createObserver("mutation", () => this.mutationObserverCallback());
|
|
12799
12798
|
this.transitionEnd = () => {
|
|
12800
12799
|
if (!this.editingEnabled && !!this.shouldEmitCancel) {
|
|
12801
12800
|
this.calciteInlineEditableEditCancel.emit();
|
|
12802
12801
|
}
|
|
12803
12802
|
};
|
|
12804
12803
|
this.enableEditing = () => {
|
|
12805
|
-
|
|
12804
|
+
var _a, _b;
|
|
12805
|
+
this.valuePriorToEditing = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
12806
12806
|
this.editingEnabled = true;
|
|
12807
|
-
this.inputElement.setFocus();
|
|
12807
|
+
(_b = this.inputElement) === null || _b === void 0 ? void 0 : _b.setFocus();
|
|
12808
12808
|
this.calciteInlineEditableEnableEditingChange.emit();
|
|
12809
12809
|
};
|
|
12810
12810
|
this.disableEditing = () => {
|
|
12811
12811
|
this.editingEnabled = false;
|
|
12812
12812
|
};
|
|
12813
12813
|
this.cancelEditing = () => {
|
|
12814
|
-
this.inputElement
|
|
12814
|
+
if (this.inputElement) {
|
|
12815
|
+
this.inputElement.value = this.valuePriorToEditing;
|
|
12816
|
+
}
|
|
12815
12817
|
this.disableEditing();
|
|
12816
12818
|
this.enableEditingButton.setFocus();
|
|
12817
12819
|
};
|
|
12818
12820
|
this.escapeKeyHandler = async (e) => {
|
|
12821
|
+
var _a;
|
|
12819
12822
|
if (e.key !== "Escape") {
|
|
12820
12823
|
if (e.key === "Tab" && this.shouldShowControls) {
|
|
12821
12824
|
if (!e.shiftKey && e.target === this.inputElement) {
|
|
@@ -12825,7 +12828,7 @@ let CalciteInlineEditable$1 = class extends HTMLElement$1 {
|
|
|
12825
12828
|
if (!!e.shiftKey && e.target === this.cancelEditingButton) {
|
|
12826
12829
|
e.preventDefault();
|
|
12827
12830
|
e.stopPropagation();
|
|
12828
|
-
this.inputElement.setFocus();
|
|
12831
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.setFocus();
|
|
12829
12832
|
}
|
|
12830
12833
|
}
|
|
12831
12834
|
return;
|
|
@@ -12867,10 +12870,14 @@ let CalciteInlineEditable$1 = class extends HTMLElement$1 {
|
|
|
12867
12870
|
};
|
|
12868
12871
|
}
|
|
12869
12872
|
disabledWatcher(disabled) {
|
|
12870
|
-
this.inputElement
|
|
12873
|
+
if (this.inputElement) {
|
|
12874
|
+
this.inputElement.disabled = disabled;
|
|
12875
|
+
}
|
|
12871
12876
|
}
|
|
12872
12877
|
editingEnabledWatcher(newValue, oldValue) {
|
|
12873
|
-
this.inputElement
|
|
12878
|
+
if (this.inputElement) {
|
|
12879
|
+
this.inputElement.editingEnabled = newValue;
|
|
12880
|
+
}
|
|
12874
12881
|
if (!newValue && !!oldValue) {
|
|
12875
12882
|
this.shouldEmitCancel = true;
|
|
12876
12883
|
}
|
|
@@ -12881,17 +12888,15 @@ let CalciteInlineEditable$1 = class extends HTMLElement$1 {
|
|
|
12881
12888
|
//
|
|
12882
12889
|
//--------------------------------------------------------------------------
|
|
12883
12890
|
connectedCallback() {
|
|
12891
|
+
var _a;
|
|
12884
12892
|
connectLabel(this);
|
|
12893
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
|
12894
|
+
this.mutationObserverCallback();
|
|
12885
12895
|
}
|
|
12886
12896
|
disconnectedCallback() {
|
|
12897
|
+
var _a;
|
|
12887
12898
|
disconnectLabel(this);
|
|
12888
|
-
|
|
12889
|
-
componentWillLoad() {
|
|
12890
|
-
this.inputElement = this.el.querySelector("calcite-input");
|
|
12891
|
-
this.inputElement.disabled = this.disabled;
|
|
12892
|
-
this.inputElement.label = this.inputElement.label || getLabelText(this);
|
|
12893
|
-
this.scale =
|
|
12894
|
-
this.scale || this.inputElement.scale || getElementProp(this.el, "scale", undefined);
|
|
12899
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
12895
12900
|
}
|
|
12896
12901
|
render() {
|
|
12897
12902
|
return (h("div", { class: CSS$t.wrapper, onClick: this.enableEditingHandler, onKeyDown: this.escapeKeyHandler, onTransitionEnd: this.transitionEnd }, h("div", { class: CSS$t.inputWrapper }, h("slot", null)), h("div", { class: CSS$t.controlsWrapper }, h("calcite-button", { appearance: "transparent", class: CSS$t.enableEditingButton, color: "neutral", disabled: this.disabled, iconStart: "pencil", label: this.intlEnableEditing, onClick: this.enableEditingHandler, ref: (el) => (this.enableEditingButton = el), scale: this.scale, style: {
|
|
@@ -12931,9 +12936,26 @@ let CalciteInlineEditable$1 = class extends HTMLElement$1 {
|
|
|
12931
12936
|
// Private Methods
|
|
12932
12937
|
//
|
|
12933
12938
|
//--------------------------------------------------------------------------
|
|
12939
|
+
mutationObserverCallback() {
|
|
12940
|
+
var _a;
|
|
12941
|
+
this.updateSlottedInput();
|
|
12942
|
+
this.scale =
|
|
12943
|
+
this.scale || ((_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.scale) || getElementProp(this.el, "scale", undefined);
|
|
12944
|
+
}
|
|
12934
12945
|
onLabelClick() {
|
|
12935
12946
|
this.setFocus();
|
|
12936
12947
|
}
|
|
12948
|
+
updateSlottedInput() {
|
|
12949
|
+
const inputElement = getSlotted(this.el, {
|
|
12950
|
+
matches: "calcite-input"
|
|
12951
|
+
});
|
|
12952
|
+
this.inputElement = inputElement;
|
|
12953
|
+
if (!inputElement) {
|
|
12954
|
+
return;
|
|
12955
|
+
}
|
|
12956
|
+
this.inputElement.disabled = this.disabled;
|
|
12957
|
+
this.inputElement.label = this.inputElement.label || getLabelText(this);
|
|
12958
|
+
}
|
|
12937
12959
|
get shouldShowControls() {
|
|
12938
12960
|
return this.editingEnabled && this.controls;
|
|
12939
12961
|
}
|
|
@@ -13043,6 +13065,7 @@ let CalciteInput$1 = class extends HTMLElement$1 {
|
|
|
13043
13065
|
this.childElType = "input";
|
|
13044
13066
|
/** whether the value of the input was changed as a result of user typing or not */
|
|
13045
13067
|
this.internalValueChange = false;
|
|
13068
|
+
this.mutationObserver = createObserver("mutation", () => this.setDisabledAction());
|
|
13046
13069
|
//--------------------------------------------------------------------------
|
|
13047
13070
|
//
|
|
13048
13071
|
// Private Methods
|
|
@@ -13081,7 +13104,8 @@ let CalciteInput$1 = class extends HTMLElement$1 {
|
|
|
13081
13104
|
}
|
|
13082
13105
|
};
|
|
13083
13106
|
this.inputFocusHandler = (event) => {
|
|
13084
|
-
|
|
13107
|
+
const slottedActionEl = getSlotted(this.el, "action");
|
|
13108
|
+
if (event.target !== slottedActionEl) {
|
|
13085
13109
|
this.setFocus();
|
|
13086
13110
|
}
|
|
13087
13111
|
this.calciteInputFocus.emit({
|
|
@@ -13325,6 +13349,7 @@ let CalciteInput$1 = class extends HTMLElement$1 {
|
|
|
13325
13349
|
//
|
|
13326
13350
|
//--------------------------------------------------------------------------
|
|
13327
13351
|
connectedCallback() {
|
|
13352
|
+
var _a;
|
|
13328
13353
|
this.scale = getElementProp(this.el, "scale", this.scale);
|
|
13329
13354
|
this.status = getElementProp(this.el, "status", this.status);
|
|
13330
13355
|
this.inlineEditableEl = this.el.closest("calcite-inline-editable");
|
|
@@ -13341,10 +13366,14 @@ let CalciteInput$1 = class extends HTMLElement$1 {
|
|
|
13341
13366
|
}
|
|
13342
13367
|
connectLabel(this);
|
|
13343
13368
|
connectForm(this);
|
|
13369
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
|
13370
|
+
this.setDisabledAction();
|
|
13344
13371
|
}
|
|
13345
13372
|
disconnectedCallback() {
|
|
13373
|
+
var _a;
|
|
13346
13374
|
disconnectLabel(this);
|
|
13347
13375
|
disconnectForm(this);
|
|
13376
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
13348
13377
|
}
|
|
13349
13378
|
componentWillLoad() {
|
|
13350
13379
|
var _a, _b;
|
|
@@ -13353,10 +13382,6 @@ let CalciteInput$1 = class extends HTMLElement$1 {
|
|
|
13353
13382
|
this.minString = (_b = this.min) === null || _b === void 0 ? void 0 : _b.toString();
|
|
13354
13383
|
this.requestedIcon = setRequestedIcon(INPUT_TYPE_ICONS, this.icon, this.type);
|
|
13355
13384
|
}
|
|
13356
|
-
componentDidLoad() {
|
|
13357
|
-
this.slottedActionEl = this.el.querySelector("[slot=action]");
|
|
13358
|
-
this.setDisabledAction();
|
|
13359
|
-
}
|
|
13360
13385
|
componentShouldUpdate(newValue, oldValue, property) {
|
|
13361
13386
|
if (this.type === "number" && property === "value" && newValue && !isValidNumber(newValue)) {
|
|
13362
13387
|
this.setValue({
|
|
@@ -13428,10 +13453,10 @@ let CalciteInput$1 = class extends HTMLElement$1 {
|
|
|
13428
13453
|
}
|
|
13429
13454
|
}
|
|
13430
13455
|
setDisabledAction() {
|
|
13431
|
-
|
|
13456
|
+
const slottedActionEl = getSlotted(this.el, "action");
|
|
13457
|
+
if (!slottedActionEl) {
|
|
13432
13458
|
return;
|
|
13433
13459
|
}
|
|
13434
|
-
const slottedActionEl = this.slottedActionEl;
|
|
13435
13460
|
this.disabled
|
|
13436
13461
|
? slottedActionEl.setAttribute("disabled", "")
|
|
13437
13462
|
: slottedActionEl.removeAttribute("disabled");
|
|
@@ -14947,7 +14972,7 @@ let CalciteModal$1 = class extends HTMLElement$1 {
|
|
|
14947
14972
|
}
|
|
14948
14973
|
};
|
|
14949
14974
|
this.updateFooterVisibility = () => {
|
|
14950
|
-
this.hasFooter = !!this.el
|
|
14975
|
+
this.hasFooter = !!getSlotted(this.el, [SLOTS$e.back, SLOTS$e.primary, SLOTS$e.secondary]);
|
|
14951
14976
|
};
|
|
14952
14977
|
}
|
|
14953
14978
|
//--------------------------------------------------------------------------
|
|
@@ -15158,9 +15183,6 @@ let CalciteNotice$1 = class extends HTMLElement$1 {
|
|
|
15158
15183
|
componentWillLoad() {
|
|
15159
15184
|
this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
|
|
15160
15185
|
}
|
|
15161
|
-
componentDidLoad() {
|
|
15162
|
-
this.noticeLinkEl = this.el.querySelector("calcite-link");
|
|
15163
|
-
}
|
|
15164
15186
|
render() {
|
|
15165
15187
|
const { el } = this;
|
|
15166
15188
|
const closeButton = (h("button", { "aria-label": this.intlClose, class: CSS$m.close, onClick: this.close, ref: (el) => (this.closeButton = el) }, h("calcite-icon", { icon: "x", scale: this.scale === "l" ? "m" : "s" })));
|
|
@@ -15174,11 +15196,12 @@ let CalciteNotice$1 = class extends HTMLElement$1 {
|
|
|
15174
15196
|
//--------------------------------------------------------------------------
|
|
15175
15197
|
/** Sets focus on the component. */
|
|
15176
15198
|
async setFocus() {
|
|
15177
|
-
|
|
15199
|
+
const noticeLinkEl = this.el.querySelector("calcite-link");
|
|
15200
|
+
if (!this.closeButton && !noticeLinkEl) {
|
|
15178
15201
|
return;
|
|
15179
15202
|
}
|
|
15180
|
-
if (
|
|
15181
|
-
|
|
15203
|
+
if (noticeLinkEl) {
|
|
15204
|
+
noticeLinkEl.setFocus();
|
|
15182
15205
|
}
|
|
15183
15206
|
else if (this.closeButton) {
|
|
15184
15207
|
this.closeButton.focus();
|
|
@@ -16896,10 +16919,6 @@ let CalciteRadioButton$1 = class extends HTMLElement$1 {
|
|
|
16896
16919
|
}
|
|
16897
16920
|
nameChanged() {
|
|
16898
16921
|
this.checkLastRadioButton();
|
|
16899
|
-
const currentValue = this.rootNode.querySelector(`input[name="${this.name}"]:checked`);
|
|
16900
|
-
if (!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.value)) {
|
|
16901
|
-
this.uncheckAllRadioButtonsInGroup();
|
|
16902
|
-
}
|
|
16903
16922
|
}
|
|
16904
16923
|
//--------------------------------------------------------------------------
|
|
16905
16924
|
//
|
|
@@ -17043,6 +17062,12 @@ let CalciteRadioButtonGroup$1 = class extends HTMLElement$1 {
|
|
|
17043
17062
|
this.required = false;
|
|
17044
17063
|
/** The scale (size) of the radio button group. */
|
|
17045
17064
|
this.scale = "m";
|
|
17065
|
+
// --------------------------------------------------------------------------
|
|
17066
|
+
//
|
|
17067
|
+
// Private Properties
|
|
17068
|
+
//
|
|
17069
|
+
// --------------------------------------------------------------------------
|
|
17070
|
+
this.mutationObserver = createObserver("mutation", () => this.passPropsToRadioButtons());
|
|
17046
17071
|
//--------------------------------------------------------------------------
|
|
17047
17072
|
//
|
|
17048
17073
|
// Private Methods
|
|
@@ -17079,7 +17104,13 @@ let CalciteRadioButtonGroup$1 = class extends HTMLElement$1 {
|
|
|
17079
17104
|
//
|
|
17080
17105
|
//--------------------------------------------------------------------------
|
|
17081
17106
|
connectedCallback() {
|
|
17107
|
+
var _a;
|
|
17082
17108
|
this.passPropsToRadioButtons();
|
|
17109
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
|
17110
|
+
}
|
|
17111
|
+
disconnectedCallback() {
|
|
17112
|
+
var _a;
|
|
17113
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
17083
17114
|
}
|
|
17084
17115
|
//--------------------------------------------------------------------------
|
|
17085
17116
|
//
|
|
@@ -18190,9 +18221,7 @@ let CalciteSlider$1 = class extends HTMLElement$1 {
|
|
|
18190
18221
|
}
|
|
18191
18222
|
};
|
|
18192
18223
|
this.dragEnd = (event) => {
|
|
18193
|
-
|
|
18194
|
-
document.removeEventListener("pointerup", this.dragEnd);
|
|
18195
|
-
document.removeEventListener("pointercancel", this.dragEnd);
|
|
18224
|
+
this.removeDragListeners();
|
|
18196
18225
|
this.focusActiveHandle(event.clientX);
|
|
18197
18226
|
if (this.lastDragPropValue != this[this.dragProp]) {
|
|
18198
18227
|
this.emitChange();
|
|
@@ -18227,6 +18256,7 @@ let CalciteSlider$1 = class extends HTMLElement$1 {
|
|
|
18227
18256
|
disconnectedCallback() {
|
|
18228
18257
|
disconnectLabel(this);
|
|
18229
18258
|
disconnectForm(this);
|
|
18259
|
+
this.removeDragListeners();
|
|
18230
18260
|
}
|
|
18231
18261
|
componentWillLoad() {
|
|
18232
18262
|
this.isRange = !!(this.maxValue || this.maxValue === 0);
|
|
@@ -18562,6 +18592,11 @@ let CalciteSlider$1 = class extends HTMLElement$1 {
|
|
|
18562
18592
|
emitChange() {
|
|
18563
18593
|
this.calciteSliderChange.emit();
|
|
18564
18594
|
}
|
|
18595
|
+
removeDragListeners() {
|
|
18596
|
+
document.removeEventListener("pointermove", this.dragUpdate);
|
|
18597
|
+
document.removeEventListener("pointerup", this.dragEnd);
|
|
18598
|
+
document.removeEventListener("pointercancel", this.dragEnd);
|
|
18599
|
+
}
|
|
18565
18600
|
/**
|
|
18566
18601
|
* Set the prop value if changed at the component level
|
|
18567
18602
|
* @param valueProp
|
|
@@ -126,10 +126,7 @@ let CalciteActionMenu = class {
|
|
|
126
126
|
};
|
|
127
127
|
this.getActions = () => {
|
|
128
128
|
const { el } = this;
|
|
129
|
-
const
|
|
130
|
-
const actionElements = assignedActions.length
|
|
131
|
-
? assignedActions
|
|
132
|
-
: Array.from(el.querySelectorAll("calcite-action:not([slot=trigger])"));
|
|
129
|
+
const actionElements = getSlotted(el, { all: true, matches: "calcite-action" });
|
|
133
130
|
this.updateActions(actionElements);
|
|
134
131
|
this.actionElements = actionElements;
|
|
135
132
|
this.connectMenuButtonEl();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9de00868.js';
|
|
6
|
-
import { s as setRequestedIcon } from './dom-e7fa77b9.js';
|
|
6
|
+
import { s as setRequestedIcon, g as getSlotted } from './dom-e7fa77b9.js';
|
|
7
7
|
import { S as StatusIcons } from './interfaces-51dc4e1b.js';
|
|
8
8
|
import './guid-196bd5ea.js';
|
|
9
9
|
|
|
@@ -119,9 +119,6 @@ let CalciteAlert = class {
|
|
|
119
119
|
componentWillLoad() {
|
|
120
120
|
this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
|
|
121
121
|
}
|
|
122
|
-
componentDidLoad() {
|
|
123
|
-
this.alertLinkEl = this.el.querySelectorAll("calcite-link")[0];
|
|
124
|
-
}
|
|
125
122
|
disconnectedCallback() {
|
|
126
123
|
window.clearTimeout(this.autoDismissTimeoutId);
|
|
127
124
|
}
|
|
@@ -162,11 +159,12 @@ let CalciteAlert = class {
|
|
|
162
159
|
//--------------------------------------------------------------------------
|
|
163
160
|
/** Sets focus on the component. */
|
|
164
161
|
async setFocus() {
|
|
165
|
-
|
|
162
|
+
const alertLinkEl = getSlotted(this.el, { selector: "calcite-link" });
|
|
163
|
+
if (!this.closeButton && !alertLinkEl) {
|
|
166
164
|
return;
|
|
167
165
|
}
|
|
168
|
-
else if (
|
|
169
|
-
|
|
166
|
+
else if (alertLinkEl) {
|
|
167
|
+
alertLinkEl.setFocus();
|
|
170
168
|
}
|
|
171
169
|
else if (this.closeButton) {
|
|
172
170
|
this.closeButton.focus();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, F as Fragment } from './index-9de00868.js';
|
|
6
|
-
import { T as TEXT, c as getDaysDiff, d as dateToISO, a as dateFromISO, b as dateFromRange, g as getLocaleData, H as HEADING_LEVEL, s as sameDate, i as inRange, l as localizeNumber, e as getOrder, n as nextMonth, f as prevMonth, h as parseNumber } from './resources-
|
|
6
|
+
import { T as TEXT, c as getDaysDiff, d as dateToISO, a as dateFromISO, b as dateFromRange, g as getLocaleData, H as HEADING_LEVEL, s as sameDate, i as inRange, l as localizeNumber, e as getOrder, n as nextMonth, f as prevMonth, h as parseNumber } from './resources-f02a1ab5.js';
|
|
7
7
|
import { a as getElementDir, C as CSS_UTILITY } from './dom-e7fa77b9.js';
|
|
8
8
|
import { C as CalciteHeading } from './CalciteHeading-1d6cd311.js';
|
|
9
9
|
import './locale-fc850b7c.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9de00868.js';
|
|
6
|
-
import { f as focusElement, d as getElementProp } from './dom-e7fa77b9.js';
|
|
6
|
+
import { g as getSlotted, f as focusElement, d as getElementProp } from './dom-e7fa77b9.js';
|
|
7
7
|
import { C as CSS$2, u as updatePopper, c as createPopper } from './popper-ae231554.js';
|
|
8
8
|
import { c as createObserver } from './observers-46118290.js';
|
|
9
9
|
import './guid-196bd5ea.js';
|
|
@@ -75,7 +75,7 @@ let CalciteDropdown = class {
|
|
|
75
75
|
//--------------------------------------------------------------------------
|
|
76
76
|
this.updateItems = () => {
|
|
77
77
|
this.updateSelectedItems();
|
|
78
|
-
this.triggers =
|
|
78
|
+
this.triggers = getSlotted(this.el, "dropdown-trigger", { all: true });
|
|
79
79
|
this.items = Array.from(this.el.querySelectorAll("calcite-dropdown-item"));
|
|
80
80
|
this.reposition();
|
|
81
81
|
};
|
|
@@ -279,9 +279,7 @@ let CalciteSlider = class {
|
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
this.dragEnd = (event) => {
|
|
282
|
-
|
|
283
|
-
document.removeEventListener("pointerup", this.dragEnd);
|
|
284
|
-
document.removeEventListener("pointercancel", this.dragEnd);
|
|
282
|
+
this.removeDragListeners();
|
|
285
283
|
this.focusActiveHandle(event.clientX);
|
|
286
284
|
if (this.lastDragPropValue != this[this.dragProp]) {
|
|
287
285
|
this.emitChange();
|
|
@@ -316,6 +314,7 @@ let CalciteSlider = class {
|
|
|
316
314
|
disconnectedCallback() {
|
|
317
315
|
disconnectLabel(this);
|
|
318
316
|
disconnectForm(this);
|
|
317
|
+
this.removeDragListeners();
|
|
319
318
|
}
|
|
320
319
|
componentWillLoad() {
|
|
321
320
|
this.isRange = !!(this.maxValue || this.maxValue === 0);
|
|
@@ -651,6 +650,11 @@ let CalciteSlider = class {
|
|
|
651
650
|
emitChange() {
|
|
652
651
|
this.calciteSliderChange.emit();
|
|
653
652
|
}
|
|
653
|
+
removeDragListeners() {
|
|
654
|
+
document.removeEventListener("pointermove", this.dragUpdate);
|
|
655
|
+
document.removeEventListener("pointerup", this.dragEnd);
|
|
656
|
+
document.removeEventListener("pointercancel", this.dragEnd);
|
|
657
|
+
}
|
|
654
658
|
/**
|
|
655
659
|
* Set the prop value if changed at the component level
|
|
656
660
|
* @param valueProp
|