@esri/calcite-components 1.0.0-next.372 → 1.0.0-next.376
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/calcite-date-picker/nls/pt-BR.json +31 -0
- package/dist/calcite/assets/calcite-date-picker/nls/pt-PT.json +3 -3
- 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-f12c35de.system.entry.js → p-4d81b84b.system.entry.js} +2 -2
- package/dist/calcite/{p-7a6c932d.system.entry.js → p-4d88c604.system.entry.js} +1 -1
- package/dist/calcite/p-4e258f5c.entry.js +5 -0
- package/dist/calcite/{p-92d9b81d.system.entry.js → p-6a2ac09a.system.entry.js} +1 -1
- package/dist/calcite/{p-82491929.entry.js → p-6e37af80.entry.js} +1 -1
- package/dist/calcite/p-6eb1302b.entry.js +5 -0
- package/dist/calcite/p-7409e609.system.js +5 -0
- package/dist/calcite/p-7415264e.system.entry.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-b3e034cb.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-c39e7451.entry.js +5 -0
- package/dist/calcite/{p-8709d314.system.entry.js → p-c93dbb93.system.entry.js} +1 -1
- package/dist/calcite/{p-baca86e3.entry.js → p-cb3a8861.entry.js} +1 -1
- package/dist/calcite/p-d2bcb3ae.entry.js +5 -0
- package/dist/calcite/p-d6f6b6c1.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-f3a85d19.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-accordion_2.cjs.entry.js +6 -3
- 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-time-picker_2.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-panel.cjs.entry.js +17 -1
- 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/calcite-shell_3.cjs.entry.js +7 -4
- package/dist/cjs/calcite-tree_2.cjs.entry.js +14 -7
- package/dist/cjs/calcite.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{resources-11763017.js → resources-f70fb01b.js} +3 -0
- package/dist/collection/components/calcite-accordion/calcite-accordion.css +5 -5
- package/dist/collection/components/calcite-accordion/calcite-accordion.js +5 -1
- package/dist/collection/components/calcite-accordion-item/calcite-accordion-item.css +2 -16
- 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/assets/calcite-date-picker/nls/pt-BR.json +31 -0
- package/dist/collection/components/calcite-date-picker/assets/calcite-date-picker/nls/pt-PT.json +3 -3
- 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-panel/calcite-panel.js +41 -5
- 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-shell/calcite-shell.js +9 -7
- package/dist/collection/components/calcite-slider/calcite-slider.js +7 -3
- package/dist/collection/components/calcite-time-picker/calcite-time-picker.js +1 -1
- package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +16 -7
- package/dist/components/calcite-accordion-item.js +1 -1
- package/dist/components/calcite-accordion.js +5 -2
- 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-panel.js +19 -2
- package/dist/components/calcite-radio-button-group.js +13 -0
- package/dist/components/calcite-radio-button.js +0 -4
- package/dist/components/calcite-shell.js +7 -4
- package/dist/components/calcite-slider.js +7 -3
- package/dist/components/calcite-time-picker2.js +1 -1
- package/dist/components/calcite-tree-item.js +14 -7
- package/dist/custom-elements/index.js +125 -61
- package/dist/esm/calcite-accordion_2.entry.js +6 -3
- 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-time-picker_2.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-panel.entry.js +17 -1
- package/dist/esm/calcite-radio-button-group.entry.js +13 -0
- package/dist/esm/calcite-radio-button.entry.js +0 -4
- package/dist/esm/calcite-shell_3.entry.js +7 -4
- package/dist/esm/calcite-tree_2.entry.js +14 -7
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{resources-c768953c.js → resources-f02a1ab5.js} +3 -0
- package/dist/esm-es5/calcite-accordion_2.entry.js +1 -1
- 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-time-picker_2.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-panel.entry.js +2 -2
- 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/calcite-shell_3.entry.js +1 -1
- package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
- package/dist/esm-es5/calcite.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/resources-f02a1ab5.js +5 -0
- package/dist/extras/docs-json.json +12 -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-panel/calcite-panel.d.ts +12 -0
- 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/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +2 -0
- package/dist/types/components.d.ts +4 -0
- package/hydrate/index.js +124 -62
- package/package.json +6 -2
- package/readme.md +2 -6
- 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-20e3fc50.entry.js +0 -5
- package/dist/calcite/p-500300b5.entry.js +0 -5
- package/dist/calcite/p-5f5bfaa5.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-9716c57c.entry.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-b9adf89d.system.entry.js +0 -5
- package/dist/calcite/p-c5b3d90c.entry.js +0 -5
- package/dist/calcite/p-c6cb0aa2.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/calcite/p-fbd68dbf.system.entry.js +0 -5
- package/dist/esm-es5/resources-c768953c.js +0 -5
|
@@ -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
|
|
@@ -3,8 +3,9 @@
|
|
|
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, g as getElement } from './index-9de00868.js';
|
|
6
|
-
import { d as getElementProp } from './dom-e7fa77b9.js';
|
|
6
|
+
import { d as getElementProp, g as getSlotted } from './dom-e7fa77b9.js';
|
|
7
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-2bffc9f4.js';
|
|
8
|
+
import { c as createObserver } from './observers-46118290.js';
|
|
8
9
|
import './guid-196bd5ea.js';
|
|
9
10
|
|
|
10
11
|
const CSS = {
|
|
@@ -55,26 +56,31 @@ let CalciteInlineEditable = class {
|
|
|
55
56
|
* @default "Save"
|
|
56
57
|
*/
|
|
57
58
|
this.intlConfirmChanges = TEXT.intlConfirmChanges;
|
|
59
|
+
this.mutationObserver = createObserver("mutation", () => this.mutationObserverCallback());
|
|
58
60
|
this.transitionEnd = () => {
|
|
59
61
|
if (!this.editingEnabled && !!this.shouldEmitCancel) {
|
|
60
62
|
this.calciteInlineEditableEditCancel.emit();
|
|
61
63
|
}
|
|
62
64
|
};
|
|
63
65
|
this.enableEditing = () => {
|
|
64
|
-
|
|
66
|
+
var _a, _b;
|
|
67
|
+
this.valuePriorToEditing = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
65
68
|
this.editingEnabled = true;
|
|
66
|
-
this.inputElement.setFocus();
|
|
69
|
+
(_b = this.inputElement) === null || _b === void 0 ? void 0 : _b.setFocus();
|
|
67
70
|
this.calciteInlineEditableEnableEditingChange.emit();
|
|
68
71
|
};
|
|
69
72
|
this.disableEditing = () => {
|
|
70
73
|
this.editingEnabled = false;
|
|
71
74
|
};
|
|
72
75
|
this.cancelEditing = () => {
|
|
73
|
-
this.inputElement
|
|
76
|
+
if (this.inputElement) {
|
|
77
|
+
this.inputElement.value = this.valuePriorToEditing;
|
|
78
|
+
}
|
|
74
79
|
this.disableEditing();
|
|
75
80
|
this.enableEditingButton.setFocus();
|
|
76
81
|
};
|
|
77
82
|
this.escapeKeyHandler = async (e) => {
|
|
83
|
+
var _a;
|
|
78
84
|
if (e.key !== "Escape") {
|
|
79
85
|
if (e.key === "Tab" && this.shouldShowControls) {
|
|
80
86
|
if (!e.shiftKey && e.target === this.inputElement) {
|
|
@@ -84,7 +90,7 @@ let CalciteInlineEditable = class {
|
|
|
84
90
|
if (!!e.shiftKey && e.target === this.cancelEditingButton) {
|
|
85
91
|
e.preventDefault();
|
|
86
92
|
e.stopPropagation();
|
|
87
|
-
this.inputElement.setFocus();
|
|
93
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.setFocus();
|
|
88
94
|
}
|
|
89
95
|
}
|
|
90
96
|
return;
|
|
@@ -126,10 +132,14 @@ let CalciteInlineEditable = class {
|
|
|
126
132
|
};
|
|
127
133
|
}
|
|
128
134
|
disabledWatcher(disabled) {
|
|
129
|
-
this.inputElement
|
|
135
|
+
if (this.inputElement) {
|
|
136
|
+
this.inputElement.disabled = disabled;
|
|
137
|
+
}
|
|
130
138
|
}
|
|
131
139
|
editingEnabledWatcher(newValue, oldValue) {
|
|
132
|
-
this.inputElement
|
|
140
|
+
if (this.inputElement) {
|
|
141
|
+
this.inputElement.editingEnabled = newValue;
|
|
142
|
+
}
|
|
133
143
|
if (!newValue && !!oldValue) {
|
|
134
144
|
this.shouldEmitCancel = true;
|
|
135
145
|
}
|
|
@@ -140,17 +150,15 @@ let CalciteInlineEditable = class {
|
|
|
140
150
|
//
|
|
141
151
|
//--------------------------------------------------------------------------
|
|
142
152
|
connectedCallback() {
|
|
153
|
+
var _a;
|
|
143
154
|
connectLabel(this);
|
|
155
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
|
156
|
+
this.mutationObserverCallback();
|
|
144
157
|
}
|
|
145
158
|
disconnectedCallback() {
|
|
159
|
+
var _a;
|
|
146
160
|
disconnectLabel(this);
|
|
147
|
-
|
|
148
|
-
componentWillLoad() {
|
|
149
|
-
this.inputElement = this.el.querySelector("calcite-input");
|
|
150
|
-
this.inputElement.disabled = this.disabled;
|
|
151
|
-
this.inputElement.label = this.inputElement.label || getLabelText(this);
|
|
152
|
-
this.scale =
|
|
153
|
-
this.scale || this.inputElement.scale || getElementProp(this.el, "scale", undefined);
|
|
161
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
154
162
|
}
|
|
155
163
|
render() {
|
|
156
164
|
return (h("div", { class: CSS.wrapper, onClick: this.enableEditingHandler, onKeyDown: this.escapeKeyHandler, onTransitionEnd: this.transitionEnd }, h("div", { class: CSS.inputWrapper }, h("slot", null)), h("div", { class: CSS.controlsWrapper }, h("calcite-button", { appearance: "transparent", class: CSS.enableEditingButton, color: "neutral", disabled: this.disabled, iconStart: "pencil", label: this.intlEnableEditing, onClick: this.enableEditingHandler, ref: (el) => (this.enableEditingButton = el), scale: this.scale, style: {
|
|
@@ -190,9 +198,26 @@ let CalciteInlineEditable = class {
|
|
|
190
198
|
// Private Methods
|
|
191
199
|
//
|
|
192
200
|
//--------------------------------------------------------------------------
|
|
201
|
+
mutationObserverCallback() {
|
|
202
|
+
var _a;
|
|
203
|
+
this.updateSlottedInput();
|
|
204
|
+
this.scale =
|
|
205
|
+
this.scale || ((_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.scale) || getElementProp(this.el, "scale", undefined);
|
|
206
|
+
}
|
|
193
207
|
onLabelClick() {
|
|
194
208
|
this.setFocus();
|
|
195
209
|
}
|
|
210
|
+
updateSlottedInput() {
|
|
211
|
+
const inputElement = getSlotted(this.el, {
|
|
212
|
+
matches: "calcite-input"
|
|
213
|
+
});
|
|
214
|
+
this.inputElement = inputElement;
|
|
215
|
+
if (!inputElement) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
this.inputElement.disabled = this.disabled;
|
|
219
|
+
this.inputElement.label = this.inputElement.label || getLabelText(this);
|
|
220
|
+
}
|
|
196
221
|
get shouldShowControls() {
|
|
197
222
|
return this.editingEnabled && this.controls;
|
|
198
223
|
}
|
|
@@ -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 { T as TEXT, d as dateToISO, a as dateFromISO, b as dateFromRange, g as getLocaleData, s as sameDate, p as parseDateString, i as inRange } from './resources-
|
|
6
|
+
import { T as TEXT, d as dateToISO, a as dateFromISO, b as dateFromRange, g as getLocaleData, s as sameDate, p as parseDateString, i as inRange } from './resources-f02a1ab5.js';
|
|
7
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-2bffc9f4.js';
|
|
8
8
|
import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-f90706b4.js';
|
|
9
9
|
import { u as updatePopper, C as CSS, c as createPopper } from './popper-ae231554.js';
|
|
@@ -936,7 +936,7 @@ let CalciteTimePicker = class {
|
|
|
936
936
|
[CSS.showMeridiem]: showMeridiem,
|
|
937
937
|
[CSS.showSecond]: this.showSecond,
|
|
938
938
|
[CSS[`scale-${this.scale}`]]: true
|
|
939
|
-
} }, h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlHourUp, class: {
|
|
939
|
+
}, dir: "ltr" }, h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlHourUp, class: {
|
|
940
940
|
[CSS.button]: true,
|
|
941
941
|
[CSS.buttonHourUp]: true,
|
|
942
942
|
[CSS.buttonTopLeft]: true
|
|
@@ -3,12 +3,13 @@
|
|
|
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 { T as TEXT, s as setRequestedIcon, d as getElementProp, a as getElementDir, C as CSS_UTILITY } from './dom-e7fa77b9.js';
|
|
6
|
+
import { T as TEXT, g as getSlotted, s as setRequestedIcon, d as getElementProp, a as getElementDir, C as CSS_UTILITY } from './dom-e7fa77b9.js';
|
|
7
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-2bffc9f4.js';
|
|
8
8
|
import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-f90706b4.js';
|
|
9
9
|
import { d as delocalizeNumberString, g as getDecimalSeparator, l as localizeNumberString } from './locale-fc850b7c.js';
|
|
10
10
|
import { i as isValidNumber, p as parseNumberString, s as sanitizeNumberString, n as numberKeys } from './number-8779395f.js';
|
|
11
11
|
import { d as decimalPlaces } from './math-456207f5.js';
|
|
12
|
+
import { c as createObserver } from './observers-46118290.js';
|
|
12
13
|
import './guid-196bd5ea.js';
|
|
13
14
|
|
|
14
15
|
const CSS = {
|
|
@@ -107,6 +108,7 @@ let CalciteInput = class {
|
|
|
107
108
|
this.childElType = "input";
|
|
108
109
|
/** whether the value of the input was changed as a result of user typing or not */
|
|
109
110
|
this.internalValueChange = false;
|
|
111
|
+
this.mutationObserver = createObserver("mutation", () => this.setDisabledAction());
|
|
110
112
|
//--------------------------------------------------------------------------
|
|
111
113
|
//
|
|
112
114
|
// Private Methods
|
|
@@ -145,7 +147,8 @@ let CalciteInput = class {
|
|
|
145
147
|
}
|
|
146
148
|
};
|
|
147
149
|
this.inputFocusHandler = (event) => {
|
|
148
|
-
|
|
150
|
+
const slottedActionEl = getSlotted(this.el, "action");
|
|
151
|
+
if (event.target !== slottedActionEl) {
|
|
149
152
|
this.setFocus();
|
|
150
153
|
}
|
|
151
154
|
this.calciteInputFocus.emit({
|
|
@@ -389,6 +392,7 @@ let CalciteInput = class {
|
|
|
389
392
|
//
|
|
390
393
|
//--------------------------------------------------------------------------
|
|
391
394
|
connectedCallback() {
|
|
395
|
+
var _a;
|
|
392
396
|
this.scale = getElementProp(this.el, "scale", this.scale);
|
|
393
397
|
this.status = getElementProp(this.el, "status", this.status);
|
|
394
398
|
this.inlineEditableEl = this.el.closest("calcite-inline-editable");
|
|
@@ -405,10 +409,14 @@ let CalciteInput = class {
|
|
|
405
409
|
}
|
|
406
410
|
connectLabel(this);
|
|
407
411
|
connectForm(this);
|
|
412
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
|
413
|
+
this.setDisabledAction();
|
|
408
414
|
}
|
|
409
415
|
disconnectedCallback() {
|
|
416
|
+
var _a;
|
|
410
417
|
disconnectLabel(this);
|
|
411
418
|
disconnectForm(this);
|
|
419
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
412
420
|
}
|
|
413
421
|
componentWillLoad() {
|
|
414
422
|
var _a, _b;
|
|
@@ -417,10 +425,6 @@ let CalciteInput = class {
|
|
|
417
425
|
this.minString = (_b = this.min) === null || _b === void 0 ? void 0 : _b.toString();
|
|
418
426
|
this.requestedIcon = setRequestedIcon(INPUT_TYPE_ICONS, this.icon, this.type);
|
|
419
427
|
}
|
|
420
|
-
componentDidLoad() {
|
|
421
|
-
this.slottedActionEl = this.el.querySelector("[slot=action]");
|
|
422
|
-
this.setDisabledAction();
|
|
423
|
-
}
|
|
424
428
|
componentShouldUpdate(newValue, oldValue, property) {
|
|
425
429
|
if (this.type === "number" && property === "value" && newValue && !isValidNumber(newValue)) {
|
|
426
430
|
this.setValue({
|
|
@@ -492,10 +496,10 @@ let CalciteInput = class {
|
|
|
492
496
|
}
|
|
493
497
|
}
|
|
494
498
|
setDisabledAction() {
|
|
495
|
-
|
|
499
|
+
const slottedActionEl = getSlotted(this.el, "action");
|
|
500
|
+
if (!slottedActionEl) {
|
|
496
501
|
return;
|
|
497
502
|
}
|
|
498
|
-
const slottedActionEl = this.slottedActionEl;
|
|
499
503
|
this.disabled
|
|
500
504
|
? slottedActionEl.setAttribute("disabled", "")
|
|
501
505
|
: slottedActionEl.removeAttribute("disabled");
|
|
@@ -223,7 +223,7 @@ let CalciteModal = class {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
this.updateFooterVisibility = () => {
|
|
226
|
-
this.hasFooter = !!this.el
|
|
226
|
+
this.hasFooter = !!getSlotted(this.el, [SLOTS.back, SLOTS.primary, SLOTS.secondary]);
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
//--------------------------------------------------------------------------
|
|
@@ -79,9 +79,6 @@ let CalciteNotice = class {
|
|
|
79
79
|
componentWillLoad() {
|
|
80
80
|
this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
|
|
81
81
|
}
|
|
82
|
-
componentDidLoad() {
|
|
83
|
-
this.noticeLinkEl = this.el.querySelector("calcite-link");
|
|
84
|
-
}
|
|
85
82
|
render() {
|
|
86
83
|
const { el } = this;
|
|
87
84
|
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" })));
|
|
@@ -95,11 +92,12 @@ let CalciteNotice = class {
|
|
|
95
92
|
//--------------------------------------------------------------------------
|
|
96
93
|
/** Sets focus on the component. */
|
|
97
94
|
async setFocus() {
|
|
98
|
-
|
|
95
|
+
const noticeLinkEl = this.el.querySelector("calcite-link");
|
|
96
|
+
if (!this.closeButton && !noticeLinkEl) {
|
|
99
97
|
return;
|
|
100
98
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
99
|
+
if (noticeLinkEl) {
|
|
100
|
+
noticeLinkEl.setFocus();
|
|
103
101
|
}
|
|
104
102
|
else if (this.closeButton) {
|
|
105
103
|
this.closeButton.focus();
|
|
@@ -151,6 +151,20 @@ let CalcitePanel = class {
|
|
|
151
151
|
}
|
|
152
152
|
(_c = this.containerEl) === null || _c === void 0 ? void 0 : _c.focus();
|
|
153
153
|
}
|
|
154
|
+
/** Scrolls panel content to a particular set of coordinates.
|
|
155
|
+
*
|
|
156
|
+
* ```
|
|
157
|
+
* myCalcitePanel.scrollContentTo({
|
|
158
|
+
* left: 0, // Specifies the number of pixels along the X axis to scroll the window or element.
|
|
159
|
+
* top: 0, // Specifies the number of pixels along the Y axis to scroll the window or element
|
|
160
|
+
* behavior: "auto" // Specifies whether the scrolling should animate smoothly (smooth), or happen instantly in a single jump (auto, the default value).
|
|
161
|
+
* });
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
async scrollContentTo(options) {
|
|
165
|
+
var _a;
|
|
166
|
+
(_a = this.panelScrollEl) === null || _a === void 0 ? void 0 : _a.scrollTo(options);
|
|
167
|
+
}
|
|
154
168
|
// --------------------------------------------------------------------------
|
|
155
169
|
//
|
|
156
170
|
// Render Methods
|
|
@@ -219,7 +233,9 @@ let CalcitePanel = class {
|
|
|
219
233
|
renderContent() {
|
|
220
234
|
const { el } = this;
|
|
221
235
|
const hasFab = getSlotted(el, SLOTS.fab);
|
|
222
|
-
|
|
236
|
+
const defaultSlotNode = h("slot", { key: "default-slot" });
|
|
237
|
+
const contentWrapperKey = "content-wrapper";
|
|
238
|
+
return hasFab ? (h("div", { class: { [CSS.contentWrapper]: true, [CSS.contentHeight]: true }, key: contentWrapperKey, onScroll: this.panelScrollHandler, ref: (el) => (this.panelScrollEl = el), tabIndex: 0 }, h("section", { class: CSS.contentContainer }, defaultSlotNode), this.renderFab())) : (h("section", { class: { [CSS.contentWrapper]: true, [CSS.contentContainer]: true }, key: contentWrapperKey, onScroll: this.panelScrollHandler, ref: (el) => (this.panelScrollEl = el), tabIndex: 0 }, defaultSlotNode));
|
|
223
239
|
}
|
|
224
240
|
renderFab() {
|
|
225
241
|
return (h("div", { class: CSS.fabContainer }, h("slot", { name: SLOTS.fab })));
|
|
@@ -3,6 +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 { c as createObserver } from './observers-46118290.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
|
|
|
@@ -25,6 +26,12 @@ let CalciteRadioButtonGroup = class {
|
|
|
25
26
|
this.required = false;
|
|
26
27
|
/** The scale (size) of the radio button group. */
|
|
27
28
|
this.scale = "m";
|
|
29
|
+
// --------------------------------------------------------------------------
|
|
30
|
+
//
|
|
31
|
+
// Private Properties
|
|
32
|
+
//
|
|
33
|
+
// --------------------------------------------------------------------------
|
|
34
|
+
this.mutationObserver = createObserver("mutation", () => this.passPropsToRadioButtons());
|
|
28
35
|
//--------------------------------------------------------------------------
|
|
29
36
|
//
|
|
30
37
|
// Private Methods
|
|
@@ -61,7 +68,13 @@ let CalciteRadioButtonGroup = class {
|
|
|
61
68
|
//
|
|
62
69
|
//--------------------------------------------------------------------------
|
|
63
70
|
connectedCallback() {
|
|
71
|
+
var _a;
|
|
64
72
|
this.passPropsToRadioButtons();
|
|
73
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
|
74
|
+
}
|
|
75
|
+
disconnectedCallback() {
|
|
76
|
+
var _a;
|
|
77
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
65
78
|
}
|
|
66
79
|
//--------------------------------------------------------------------------
|
|
67
80
|
//
|
|
@@ -140,10 +140,6 @@ let CalciteRadioButton = class {
|
|
|
140
140
|
}
|
|
141
141
|
nameChanged() {
|
|
142
142
|
this.checkLastRadioButton();
|
|
143
|
-
const currentValue = this.rootNode.querySelector(`input[name="${this.name}"]:checked`);
|
|
144
|
-
if (!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.value)) {
|
|
145
|
-
this.uncheckAllRadioButtonsInGroup();
|
|
146
|
-
}
|
|
147
143
|
}
|
|
148
144
|
//--------------------------------------------------------------------------
|
|
149
145
|
//
|
|
@@ -60,16 +60,19 @@ let CalciteShell = class {
|
|
|
60
60
|
return hasHeader ? h("slot", { key: "header", name: SLOTS$2.header }) : null;
|
|
61
61
|
}
|
|
62
62
|
renderContent() {
|
|
63
|
+
const defaultSlotNode = h("slot", { key: "default-slot" });
|
|
64
|
+
const centerRowSlotNode = h("slot", { key: "center-row-slot", name: SLOTS$2.centerRow });
|
|
65
|
+
const contentContainerKey = "content-container";
|
|
63
66
|
const content = !!this.contentBehind
|
|
64
67
|
? [
|
|
65
68
|
h("div", { class: {
|
|
66
69
|
[CSS$2.content]: true,
|
|
67
|
-
[CSS$2.contentBehind]:
|
|
68
|
-
} },
|
|
69
|
-
|
|
70
|
+
[CSS$2.contentBehind]: true
|
|
71
|
+
}, key: contentContainerKey }, defaultSlotNode),
|
|
72
|
+
centerRowSlotNode
|
|
70
73
|
]
|
|
71
74
|
: [
|
|
72
|
-
h("div", { class: CSS$2.content
|
|
75
|
+
h("div", { class: CSS$2.content, key: contentContainerKey }, defaultSlotNode, centerRowSlotNode)
|
|
73
76
|
];
|
|
74
77
|
return content;
|
|
75
78
|
}
|
|
@@ -246,7 +246,7 @@ let CalciteTreeItem = class {
|
|
|
246
246
|
this.expanded = !this.expanded;
|
|
247
247
|
if (this.selectionMode !== TreeSelectionMode.Ancestors) {
|
|
248
248
|
this.calciteTreeItemSelect.emit({
|
|
249
|
-
modifyCurrentSelection:
|
|
249
|
+
modifyCurrentSelection: this.isSelectionMultiLike,
|
|
250
250
|
forceToggle: true
|
|
251
251
|
});
|
|
252
252
|
}
|
|
@@ -280,6 +280,11 @@ let CalciteTreeItem = class {
|
|
|
280
280
|
expandedHandler(newValue) {
|
|
281
281
|
this.updateParentIsExpanded(this.el, newValue);
|
|
282
282
|
}
|
|
283
|
+
getselectionMode() {
|
|
284
|
+
this.isSelectionMultiLike =
|
|
285
|
+
this.selectionMode === TreeSelectionMode.Multi ||
|
|
286
|
+
this.selectionMode === TreeSelectionMode.MultiChildren;
|
|
287
|
+
}
|
|
283
288
|
//--------------------------------------------------------------------------
|
|
284
289
|
//
|
|
285
290
|
// Lifecycle
|
|
@@ -331,7 +336,8 @@ let CalciteTreeItem = class {
|
|
|
331
336
|
[CSS.chevron]: true,
|
|
332
337
|
[CSS_UTILITY.rtl]: rtl
|
|
333
338
|
}, "data-test-id": "icon", icon: ICONS.chevronRight, onClick: this.iconClickHandler, scale: "s" })) : null;
|
|
334
|
-
const
|
|
339
|
+
const defaultSlotNode = h("slot", { key: "default-slot" });
|
|
340
|
+
const checkbox = this.selectionMode === TreeSelectionMode.Ancestors ? (h("label", { class: CSS.checkboxLabel, key: "checkbox-label" }, h("calcite-checkbox", { checked: this.selected, class: CSS.checkbox, "data-test-id": "checkbox", indeterminate: this.hasChildren && this.indeterminate, scale: this.scale, tabIndex: -1 }), defaultSlotNode)) : null;
|
|
335
341
|
const selectedIcon = showBulletPoint
|
|
336
342
|
? ICONS.bulletPoint
|
|
337
343
|
: showCheckmark
|
|
@@ -346,7 +352,7 @@ let CalciteTreeItem = class {
|
|
|
346
352
|
return (h(Host, { "aria-expanded": this.hasChildren ? this.expanded.toString() : undefined, "aria-hidden": hidden.toString(), "aria-selected": this.selected ? "true" : showCheckmark ? "false" : undefined, "calcite-hydrated-hidden": hidden, role: "treeitem", tabindex: this.parentExpanded || this.depth === 1 ? "0" : "-1" }, h("div", { class: {
|
|
347
353
|
[CSS.nodeContainer]: true,
|
|
348
354
|
[CSS_UTILITY.rtl]: rtl
|
|
349
|
-
}, "data-selection-mode": this.selectionMode, ref: (el) => (this.defaultSlotWrapper = el) }, chevron, bulletOrCheckIcon, checkbox ? checkbox :
|
|
355
|
+
}, "data-selection-mode": this.selectionMode, ref: (el) => (this.defaultSlotWrapper = el) }, chevron, bulletOrCheckIcon, checkbox ? checkbox : defaultSlotNode), h("div", { class: {
|
|
350
356
|
[CSS.childrenContainer]: true,
|
|
351
357
|
[CSS_UTILITY.rtl]: rtl
|
|
352
358
|
}, "data-test-id": "calcite-tree-children", onClick: this.childrenClickHandler, ref: (el) => (this.childrenSlotWrapper = el), role: this.hasChildren ? "group" : undefined }, h("slot", { name: SLOTS.children }))));
|
|
@@ -365,7 +371,7 @@ let CalciteTreeItem = class {
|
|
|
365
371
|
window.open(link.href, target);
|
|
366
372
|
}
|
|
367
373
|
this.calciteTreeItemSelect.emit({
|
|
368
|
-
modifyCurrentSelection:
|
|
374
|
+
modifyCurrentSelection: this.selectionMode === TreeSelectionMode.Ancestors || this.isSelectionMultiLike,
|
|
369
375
|
forceToggle: false
|
|
370
376
|
});
|
|
371
377
|
}
|
|
@@ -374,7 +380,7 @@ let CalciteTreeItem = class {
|
|
|
374
380
|
switch (e.key) {
|
|
375
381
|
case " ":
|
|
376
382
|
this.calciteTreeItemSelect.emit({
|
|
377
|
-
modifyCurrentSelection:
|
|
383
|
+
modifyCurrentSelection: this.isSelectionMultiLike,
|
|
378
384
|
forceToggle: false
|
|
379
385
|
});
|
|
380
386
|
e.preventDefault();
|
|
@@ -389,7 +395,7 @@ let CalciteTreeItem = class {
|
|
|
389
395
|
}
|
|
390
396
|
else {
|
|
391
397
|
this.calciteTreeItemSelect.emit({
|
|
392
|
-
modifyCurrentSelection:
|
|
398
|
+
modifyCurrentSelection: this.isSelectionMultiLike,
|
|
393
399
|
forceToggle: false
|
|
394
400
|
});
|
|
395
401
|
}
|
|
@@ -460,7 +466,8 @@ let CalciteTreeItem = class {
|
|
|
460
466
|
}
|
|
461
467
|
get el() { return getElement(this); }
|
|
462
468
|
static get watchers() { return {
|
|
463
|
-
"expanded": ["expandedHandler"]
|
|
469
|
+
"expanded": ["expandedHandler"],
|
|
470
|
+
"selectionMode": ["getselectionMode"]
|
|
464
471
|
}; }
|
|
465
472
|
};
|
|
466
473
|
CalciteTreeItem.style = calciteTreeItemCss;
|