@arcgis/common-components 6.0.0-next.33 → 6.0.0-next.34

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.
Files changed (50) hide show
  1. package/dist/cdn/2K4XK5CC.js +2 -0
  2. package/dist/cdn/32JRESCI.js +2 -0
  3. package/dist/cdn/{7WN227WZ.js → 4L362IQJ.js} +24 -24
  4. package/dist/cdn/5TNOGXJJ.js +2 -0
  5. package/dist/cdn/D4JWM5PW.js +2 -0
  6. package/dist/cdn/E5VIZW6M.js +2 -0
  7. package/dist/cdn/{W7CWMG2O.js → HWVDNUPX.js} +1 -1
  8. package/dist/cdn/RYVWIAKZ.js +2 -0
  9. package/dist/cdn/UFSM3GRY.js +2 -0
  10. package/dist/cdn/WIOMW22N.js +2 -0
  11. package/dist/cdn/index.js +1 -1
  12. package/dist/chunks/intrinsic-sizing.js +18 -0
  13. package/dist/components/arcgis-ckeditor5/customElement.d.ts +0 -9
  14. package/dist/components/arcgis-ckeditor5/customElement.js +1207 -1207
  15. package/dist/components/arcgis-ckeditor5-popover/customElement.d.ts +0 -6
  16. package/dist/components/arcgis-ckeditor5-popover/customElement.js +14 -17
  17. package/dist/components/arcgis-color-input/customElement.d.ts +0 -20
  18. package/dist/components/arcgis-color-input/customElement.js +18 -18
  19. package/dist/components/arcgis-field-info/customElement.d.ts +0 -3
  20. package/dist/components/arcgis-field-info/customElement.js +41 -41
  21. package/dist/components/arcgis-field-pick-list/customElement.d.ts +0 -28
  22. package/dist/components/arcgis-field-pick-list/customElement.js +114 -127
  23. package/dist/components/arcgis-slider-input/customElement.d.ts +0 -3
  24. package/dist/components/arcgis-slider-input/customElement.js +13 -13
  25. package/dist/components/arcgis-toolbar/customElement.d.ts +20 -0
  26. package/dist/components/arcgis-toolbar/customElement.js +40 -37
  27. package/dist/components/arcgis-toolbar-stack/customElement.d.ts +9 -2
  28. package/dist/components/arcgis-toolbar-stack/customElement.js +49 -51
  29. package/dist/docs/api.json +1 -1
  30. package/dist/docs/docs.json +1 -1
  31. package/dist/docs/vscode.html-custom-data.json +1 -1
  32. package/dist/docs/web-types.json +1 -1
  33. package/dist/index.d.ts +0 -20
  34. package/dist/loader.js +4 -4
  35. package/dist/types/lumina.d.ts +4 -30
  36. package/dist/types/preact.d.ts +4 -30
  37. package/dist/types/react.d.ts +4 -30
  38. package/dist/types/stencil.d.ts +4 -30
  39. package/dist/utils/types.d.ts +0 -12
  40. package/package.json +7 -7
  41. package/dist/cdn/2S4SSY4K.js +0 -2
  42. package/dist/cdn/3UAY23XT.js +0 -2
  43. package/dist/cdn/BMR5AH6W.js +0 -2
  44. package/dist/cdn/GZVXOCN5.js +0 -2
  45. package/dist/cdn/KEQPWVA6.js +0 -2
  46. package/dist/cdn/OUPGMHLD.js +0 -2
  47. package/dist/cdn/U6OGOB7D.js +0 -2
  48. package/dist/cdn/VNC7X43V.js +0 -2
  49. package/dist/chunks/toolbar.js +0 -9
  50. /package/dist/cdn/{DAAON2UO.js → UOXUUCE7.js} +0 -0
@@ -1,15 +1,15 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as b } from "../../chunks/runtime.js";
2
+ import { c as I } from "../../chunks/runtime.js";
3
3
  import { keyed as v } from "lit/directives/keyed.js";
4
4
  import { repeat as y } from "lit/directives/repeat.js";
5
- import { LitElement as I, createEvent as h, renderElement as S, nothing as m, safeStyleMap as $, safeClassMap as L } from "@arcgis/lumina";
6
- import { createRef as p, ref as d } from "lit/directives/ref.js";
7
- import { html as n, css as x } from "lit";
5
+ import { LitElement as C, createEvent as f, renderElement as S, nothing as p, safeStyleMap as $, safeClassMap as b } from "@arcgis/lumina";
6
+ import { createRef as h, ref as d } from "lit/directives/ref.js";
7
+ import { html as o, css as x } from "lit";
8
8
  import { Task as T } from "@lit/task";
9
- import { log as w, composeMissingPropertyMessage as k } from "@arcgis/toolkit/log";
10
- import { F as C } from "../../chunks/internal-types.js";
11
- import { i as B } from "../../chunks/general.js";
12
- import { u as E } from "../../chunks/useT9n.js";
9
+ import { log as w, composeMissingPropertyMessage as B } from "@arcgis/toolkit/log";
10
+ import { F as L } from "../../chunks/internal-types.js";
11
+ import { i as E } from "../../chunks/general.js";
12
+ import { u as k } from "../../chunks/useT9n.js";
13
13
  const r = /* @__PURE__ */ new Map();
14
14
  r.set("oid", "key");
15
15
  r.set("guid", "key");
@@ -27,57 +27,57 @@ r.set("date-only", "calendar");
27
27
  r.set("time-only", "clock");
28
28
  r.set("timestamp-offset", "time-zone");
29
29
  r.set("string", "string");
30
- const N = ({ fieldType: o }) => n`<calcite-icon scale=s .icon=${r.get(o)}></calcite-icon>`;
31
- function P(o) {
32
- return !!o.length && "fields" in o[0];
30
+ const N = ({ fieldType: n }) => o`<calcite-icon scale=s .icon=${r.get(n)}></calcite-icon>`;
31
+ function _(n) {
32
+ return !!n.length && "fields" in n[0];
33
33
  }
34
- function u(o) {
35
- return !!o.length && "subFieldInfos" in o[0];
34
+ function u(n) {
35
+ return !!n.length && "subFieldInfos" in n[0];
36
36
  }
37
- function _(o) {
38
- return o.filter((e) => u(e.fields));
37
+ function O(n) {
38
+ return n.filter((e) => u(e.fields));
39
39
  }
40
- function O(o) {
41
- return o.flatMap((e) => e.fields);
40
+ function M(n) {
41
+ return n.flatMap((e) => e.fields);
42
42
  }
43
- function A(o) {
44
- return o.flatMap((e) => u(e.fields) ? [] : e.fields);
43
+ function A(n) {
44
+ return n.flatMap((e) => u(e.fields) ? [] : e.fields);
45
45
  }
46
- function f(o) {
47
- return o.flatMap(
46
+ function m(n) {
47
+ return n.flatMap(
48
48
  (e) => u(e.fields) ? e.fields.flatMap((t) => t.subFieldInfos) : e.fields
49
49
  );
50
50
  }
51
- function D(o, e) {
52
- return o.flatMap((t) => u(t.fields) ? t.fields.flatMap(
53
- (i) => i.subFieldInfos.filter((s) => g(s, e, !0))
54
- ) : t.fields.filter((i) => F(i, e)));
51
+ function H(n, e) {
52
+ return n.flatMap((t) => u(t.fields) ? t.fields.flatMap(
53
+ (s) => s.subFieldInfos.filter((i) => g(i, e, !0))
54
+ ) : t.fields.filter((s) => F(s, e)));
55
55
  }
56
- function F(o, e) {
57
- return e ? "subFieldInfos" in o ? g(o, e) || o.subFieldInfos.some((t) => g(t, e, !0)) : g(o, e) : !0;
56
+ function F(n, e) {
57
+ return e ? "subFieldInfos" in n ? g(n, e) || n.subFieldInfos.some((t) => g(t, e, !0)) : g(n, e) : !0;
58
58
  }
59
- function g(o, e, t = !1) {
60
- return [t ? o.name.split("/").pop() : o.name, o.alias, o.description].some(
61
- (s) => s?.toLocaleLowerCase().includes(e.toLocaleLowerCase())
59
+ function g(n, e, t = !1) {
60
+ return [t ? n.name.split("/").pop() : n.name, n.alias, n.description].some(
61
+ (i) => i?.toLocaleLowerCase().includes(e.toLocaleLowerCase())
62
62
  );
63
63
  }
64
- const M = x`.panel{min-height:250px}.list-wrapper{max-height:50vh;overflow:auto}.list-controls{display:grid;grid-template-columns:1fr auto}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`;
65
- class H extends I {
64
+ const D = x`.panel{min-height:250px}.list-wrapper{max-height:50vh;overflow:auto}.list-controls{display:grid;grid-template-columns:1fr auto}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`;
65
+ class P extends C {
66
66
  constructor() {
67
- super(...arguments), this._messages = E({ blocking: !0 }), this.popoverNode = p(), this.listWrapper = p(), this.listNode = p(), this.flowElement = p(), this.panelElement = p(), this.dropdownNode = p(), this.fieldInfoFlowItemEl = p(), this.allLists = [], this.filterText = "", this.panelCutOffHeight = 0, this.initialized = !1, this._propWatcherTask = new T(this, {
67
+ super(...arguments), this._messages = k({ blocking: !0 }), this.popoverNode = h(), this.listWrapper = h(), this.listNode = h(), this.flowElement = h(), this.panelElement = h(), this.dropdownNode = h(), this.fieldInfoFlowItemEl = h(), this.allLists = [], this.filterText = "", this.panelCutOffHeight = 0, this.initialized = !1, this._propWatcherTask = new T(this, {
68
68
  task: async ([e]) => {
69
- if (!this.listOnly && !B(e?.refElement))
70
- throw w("error", this, k("popoverProps")), new Error();
69
+ if (!this.listOnly && !E(e?.refElement))
70
+ throw w("error", this, B("popoverProps")), new Error();
71
71
  this._propWatcherTask.autoRun = !1;
72
72
  },
73
73
  args: () => [this.popoverProps]
74
- }), this.fields = [], this.selectedFields = [], this.listOnly = !1, this.showFieldInfo = !1, this.showFieldTypeIcon = !1, this.showFieldName = !1, this.showDescription = !1, this.showSelectionAll = !1, this.showCancel = !0, this.hideCancel = !1, this.showSort = !0, this.hideSort = !1, this.showFilterLength = 10, this.multiple = !1, this.sortBy = "default", this.groupFieldsAndExpressions = !1, this.arcgisChange = h(), this.arcgisClose = h(), this.arcgisDeleteField = h(), this.arcgisEditField = h(), this.arcgisFieldPickListChange = h(), this.arcgisFieldPickListDismissed = h(), this.arcgisFieldPickListSortByChange = h(), this.arcgisSortByChange = h();
74
+ }), this.fields = [], this.selectedFields = [], this.listOnly = !1, this.showFieldInfo = !1, this.showFieldTypeIcon = !1, this.showFieldName = !1, this.showDescription = !1, this.showSelectionAll = !1, this.hideCancel = !1, this.hideSort = !1, this.showFilterLength = 10, this.multiple = !1, this.sortBy = "default", this.arcgisChange = f(), this.arcgisClose = f(), this.arcgisDeleteField = f(), this.arcgisEditField = f(), this.arcgisSortByChange = f();
75
75
  }
76
76
  static {
77
- this.properties = { lastSortBy: 16, filterFields: 16, mapView: 0, view: 0, layer: 0, fields: 0, selectedFields: 0, listOnly: 5, popoverProps: 0, showFieldInfo: 5, showFieldTypeIcon: 5, showFieldName: 5, showDescription: 5, showSelectionAll: 5, showCancel: 5, hideCancel: 5, showSort: 5, hideSort: 5, showFilterLength: 9, multiple: 5, heading: 1, okBtnText: 1, filterPlaceholderText: 1, filterNoResultsText: 1, sortBy: 1, groupFieldsAndExpressions: 5, fieldsGroupHeading: 1, expressionsGroupHeading: 1, customExpressionCheck: 0 };
77
+ this.properties = { lastSortBy: 16, filterFields: 16, view: 0, layer: 0, fields: 0, selectedFields: 0, listOnly: 5, popoverProps: 0, showFieldInfo: 5, showFieldTypeIcon: 5, showFieldName: 5, showDescription: 5, showSelectionAll: 5, hideCancel: 5, hideSort: 5, showFilterLength: 9, multiple: 5, heading: 1, okBtnText: 1, filterPlaceholderText: 1, filterNoResultsText: 1, sortBy: 1, fieldsGroupHeading: 1, expressionsGroupHeading: 1, customExpressionCheck: 0 };
78
78
  }
79
79
  static {
80
- this.styles = M;
80
+ this.styles = D;
81
81
  }
82
82
  async reposition() {
83
83
  await this.popoverNode.value?.reposition();
@@ -91,7 +91,7 @@ class H extends I {
91
91
  }), 1);
92
92
  }
93
93
  load() {
94
- !this.view && this.mapView && (this.view = this.mapView), !this.showCancel && !this.hideCancel && (this.hideCancel = !0), !this.showSort && !this.hideSort && (this.hideSort = !0), this.listOnly && this.showFieldInfo && (this.showFieldInfo = !1, w("info", this, "showFieldInfo is not supported if listOnly is true.")), !this.multiple && this.selectedFields.length > 1 && (this.selectedFields = [this.selectedFields[0]]), this.lastSortBy = this.sortBy ?? this.lastSortBy, this.updateGroupedLists(), this.initialized = !0;
94
+ this.listOnly && this.showFieldInfo && (this.showFieldInfo = !1, w("info", this, "showFieldInfo is not supported if listOnly is true.")), !this.multiple && this.selectedFields.length > 1 && (this.selectedFields = [this.selectedFields[0]]), this.lastSortBy = this.sortBy ?? this.lastSortBy, this.updateGroupedLists(), this.initialized = !0;
95
95
  }
96
96
  willUpdate(e) {
97
97
  this.initialized && (e.has("fields") || e.has("sortBy") || e.has("lastSortBy") || e.has("customExpressionCheck")) && (e.has("sortBy") && (this.lastSortBy = this.sortBy ?? this.lastSortBy), this.updateGroupedLists());
@@ -123,14 +123,14 @@ class H extends I {
123
123
  }
124
124
  getSortedList(e) {
125
125
  let t = [...e];
126
- const i = t.filter((s) => s.type === "none");
127
- return t = t.filter((s) => s.type !== "none"), this.lastSortBy === "display" ? t.sort((s, l) => s.alias.localeCompare(l.alias)) : this.lastSortBy === "field" ? t.sort((s, l) => s.name.localeCompare(l.name)) : this.lastSortBy === "type" && t.sort((s, l) => s.type.localeCompare(l.type)), t = t.concat(i), t;
126
+ const s = t.filter((i) => i.type === "none");
127
+ return t = t.filter((i) => i.type !== "none"), this.lastSortBy === "display" ? t.sort((i, l) => i.alias.localeCompare(l.alias)) : this.lastSortBy === "field" ? t.sort((i, l) => i.name.localeCompare(l.name)) : this.lastSortBy === "type" && t.sort((i, l) => i.type.localeCompare(l.type)), t = t.concat(s), t;
128
128
  }
129
129
  isExpression(e) {
130
- return this.customExpressionCheck ? this.customExpressionCheck(e) : e.name.includes(C.expression);
130
+ return this.customExpressionCheck ? this.customExpressionCheck(e) : e.name.includes(L.expression);
131
131
  }
132
132
  canDeselectAll() {
133
- const e = f(this.allLists);
133
+ const e = m(this.allLists);
134
134
  return this.filterFields?.length ? this.filterContainsAll() : this.selectedFields.length === e.length;
135
135
  }
136
136
  filterContainsAll() {
@@ -138,11 +138,11 @@ class H extends I {
138
138
  }
139
139
  showFieldInfoCheck(e) {
140
140
  const { layer: t } = this;
141
- return this.showFieldInfo ? !(!t || this.isExpression(e) || e.name.includes(C.relationship) || e.type === "none") : !1;
141
+ return this.showFieldInfo ? !(!t || this.isExpression(e) || e.name.includes(L.relationship) || e.type === "none") : !1;
142
142
  }
143
143
  updateGroupedLists() {
144
144
  if (this.fields)
145
- if (this.allLists = [], P(this.fields))
145
+ if (this.allLists = [], _(this.fields))
146
146
  for (const e of this.fields) {
147
147
  if (this.listOnly && u(e.fields)) {
148
148
  w("error", this, "subFieldInfos are not supported if listOnly is true.");
@@ -154,16 +154,7 @@ class H extends I {
154
154
  });
155
155
  }
156
156
  else
157
- this.allLists = this.groupFieldsAndExpressions ? [
158
- {
159
- title: this.expressionsGroupHeading,
160
- fields: [...this.getSortedList(this.fields)].filter((e) => this.isExpression(e))
161
- },
162
- {
163
- title: this.fieldsGroupHeading,
164
- fields: [...this.getSortedList(this.fields)].filter((e) => !this.isExpression(e))
165
- }
166
- ] : [
157
+ this.allLists = [
167
158
  {
168
159
  title: void 0,
169
160
  fields: this.getSortedList(this.fields)
@@ -173,32 +164,32 @@ class H extends I {
173
164
  getSortedGroupFields(e) {
174
165
  return u(e) ? this.getSortedList(e).map((t) => ({
175
166
  ...t,
176
- subFieldInfos: this.getSortedList(t.subFieldInfos).map((i) => ({
177
- ...i,
167
+ subFieldInfos: this.getSortedList(t.subFieldInfos).map((s) => ({
168
+ ...s,
178
169
  // ensure uniqueness
179
- name: `${t.name}/${i.name}`
170
+ name: `${t.name}/${s.name}`
180
171
  }))
181
172
  })) : this.getSortedList(e);
182
173
  }
183
174
  addFieldInfoFlowItem(e, t) {
184
- const i = this.flowElement.value, s = S(n`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.name} class="panel" style=${$(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(l) => {
175
+ const s = this.flowElement.value, i = S(o`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.name} class="panel" style=${$(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(l) => {
185
176
  l.currentTarget.remove(), this.fieldInfoFlowItemEl.value.selected = !1, this.panelElement.value.selected = !0, setTimeout(() => {
186
177
  t.setFocus();
187
178
  }, 300);
188
- }} ${d(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang ?? m} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);
189
- i.appendChild(s), this.panelElement.value.selected = !1, setTimeout(() => {
179
+ }} ${d(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang ?? p} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);
180
+ s.appendChild(i), this.panelElement.value.selected = !1, setTimeout(() => {
190
181
  this.fieldInfoFlowItemEl?.value.setFocus();
191
182
  }, 1);
192
183
  }
193
184
  addSubFieldInfoFlowItem(e, t) {
194
- const i = this.flowElement.value, s = e.subFieldInfos.filter((a) => g(a, this.filterText, !0)), l = S(n`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.description ?? void 0} class="panel" style=${$(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(a) => {
185
+ const s = this.flowElement.value, i = e.subFieldInfos.filter((a) => g(a, this.filterText, !0)), l = S(o`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.description ?? void 0} class="panel" style=${$(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(a) => {
195
186
  a.currentTarget.remove(), this.fieldInfoFlowItemEl.value.selected = !1, this.panelElement.value.selected = !0, setTimeout(() => {
196
187
  t.setFocus();
197
188
  }, 300);
198
189
  }} ${d(this.fieldInfoFlowItemEl)}><calcite-list .label=${e.alias ?? e.name} .selectionMode=${this.multiple ? "multiple" : "single"} @calciteListChange=${(a) => {
199
- this.updateSelectedFieldsForList(a.currentTarget, e.subFieldInfos), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields }), this.multiple || (this.arcgisClose.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields }));
200
- }}>${s.map((a) => this.renderCalciteListItem(a, !1))}</calcite-list>${this.filterText && !s.length && this.filterNoResultsText?.length !== 0 ? n`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}</calcite-flow-item>`);
201
- i.appendChild(l), this.panelElement.value.selected = !1, setTimeout(() => {
190
+ this.updateSelectedFieldsForList(a.currentTarget, e.subFieldInfos), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.multiple || this.arcgisClose.emit({ selectedFields: this.selectedFields });
191
+ }}>${i.map((a) => this.renderCalciteListItem(a, !1))}</calcite-list>${this.filterText && !i.length && this.filterNoResultsText?.length !== 0 ? o`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}</calcite-flow-item>`);
192
+ s.appendChild(l), this.panelElement.value.selected = !1, setTimeout(() => {
202
193
  this.fieldInfoFlowItemEl.value?.setFocus();
203
194
  }, 1);
204
195
  }
@@ -206,24 +197,24 @@ class H extends I {
206
197
  return this.multiple && this.showSelectionAll && (!e || !this.filterText || !!this.filterFields?.length);
207
198
  }
208
199
  handleListSelectionChange(e) {
209
- this.updateSelectedFieldsForList(this.listNode.value, e), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields }), this.multiple || (this.arcgisClose.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields }));
200
+ this.updateSelectedFieldsForList(this.listNode.value, e), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.multiple || this.arcgisClose.emit({ selectedFields: this.selectedFields });
210
201
  }
211
202
  updateSelectedFieldsForList(e, t) {
212
- const i = new Set(t.map((c) => c.name)), s = e.selectedItems.map((c) => c.value), l = this.selectedFields.filter((c) => !i.has(c) || s.includes(c)), a = s.filter((c) => !this.selectedFields.includes(c));
213
- this.selectedFields = this.multiple ? [.../* @__PURE__ */ new Set([...l, ...a])] : s, this.reorderSelectedFieldsByCurrentListOrder();
203
+ const s = new Set(t.map((c) => c.name)), i = e.selectedItems.map((c) => c.value), l = this.selectedFields.filter((c) => !s.has(c) || i.includes(c)), a = i.filter((c) => !this.selectedFields.includes(c));
204
+ this.selectedFields = this.multiple ? [.../* @__PURE__ */ new Set([...l, ...a])] : i, this.reorderSelectedFieldsByCurrentListOrder();
214
205
  }
215
206
  setSortBy(e) {
216
- this.lastSortBy = e, this.updateGroupedLists(), this.arcgisSortByChange.emit(this.lastSortBy), this.arcgisFieldPickListSortByChange.emit(this.lastSortBy), this.reorderSelectedFieldsByCurrentListOrder() && (this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields }));
207
+ this.lastSortBy = e, this.updateGroupedLists(), this.arcgisSortByChange.emit(this.lastSortBy), this.reorderSelectedFieldsByCurrentListOrder() && this.arcgisChange.emit({ selectedFields: this.selectedFields });
217
208
  }
218
209
  reorderSelectedFieldsByCurrentListOrder() {
219
210
  if (!this.selectedFields.length)
220
211
  return !1;
221
- const e = f(this.allLists).map((l) => l.name), t = new Set(this.selectedFields), i = e.filter((l) => t.has(l)), s = (
212
+ const e = m(this.allLists).map((l) => l.name), t = new Set(this.selectedFields), s = e.filter((l) => t.has(l)), i = (
222
213
  // adding/removing fields
223
- i.length !== this.selectedFields.length || // reordering fields
224
- i.some((l, a) => l !== this.selectedFields[a])
214
+ s.length !== this.selectedFields.length || // reordering fields
215
+ s.some((l, a) => l !== this.selectedFields[a])
225
216
  );
226
- return s && (this.selectedFields = [...i]), s;
217
+ return i && (this.selectedFields = [...s]), i;
227
218
  }
228
219
  render() {
229
220
  return this._propWatcherTask.render({
@@ -231,80 +222,76 @@ class H extends I {
231
222
  if (this.listOnly)
232
223
  return this.renderList();
233
224
  const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = this.popoverProps;
234
- return this.el.classList.add("js-app-flyout"), v(`${t.autoClose}`, n`<calcite-popover .placement=${t.placement ?? "leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance ?? -Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding ?? 0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading ?? (this.multiple ? this._messages.headerSelect : this._messages.header) ?? ""} @calcitePopoverClose=${() => {
235
- this.arcgisClose.emit(), this.arcgisFieldPickListDismissed.emit();
236
- }} ${d(this.popoverNode)}><calcite-flow style=${$({
225
+ return this.el.classList.add("js-app-flyout"), v(`${t.autoClose}`, o`<calcite-popover .placement=${t.placement ?? "leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance ?? -Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding ?? 0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading ?? (this.multiple ? this._messages.headerSelect : this._messages.header) ?? ""} @calcitePopoverClose=${() => this.arcgisClose.emit()} ${d(this.popoverNode)}><calcite-flow style=${$({
237
226
  width: `${t.popoverWidth ?? t.refElement.getBoundingClientRect().width}px`,
238
227
  ...t.maxHeight && { maxHeight: t.maxHeight }
239
- })} ${d(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${() => {
240
- this.arcgisClose.emit(), this.arcgisFieldPickListDismissed.emit();
241
- }} ${d(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple || !this.hideCancel) && n`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple && !this.hideCancel ? n`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>` : n`${this.renderAddButton()}${this.renderCancelButton()}`}</div>` || ""}</calcite-flow-item></calcite-flow></calcite-popover>`);
228
+ })} ${d(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${() => this.arcgisClose.emit()} ${d(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple || !this.hideCancel) && o`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple && !this.hideCancel ? o`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>` : o`${this.renderAddButton()}${this.renderCancelButton()}`}</div>` || ""}</calcite-flow-item></calcite-flow></calcite-popover>`);
242
229
  },
243
230
  error: () => ""
244
231
  });
245
232
  }
246
233
  renderList() {
247
- const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = A(this.allLists), i = _(this.allLists), s = f(this.allLists).length >= this.showFilterLength;
248
- return t.length || i.length ? i.length ? this.renderSplitLists(t, i, s) : this.renderTopLevelOnlyFieldList(e, t, s) : n`<slot name=no-fields></slot>`;
234
+ const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = A(this.allLists), s = O(this.allLists), i = m(this.allLists).length >= this.showFilterLength;
235
+ return t.length || s.length ? s.length ? this.renderSplitLists(t, s, i) : this.renderTopLevelOnlyFieldList(e, t, i) : o`<slot name=no-fields></slot>`;
249
236
  }
250
- renderSplitLists(e, t, i) {
251
- const s = f(this.allLists), l = O(this.allLists).some((a) => F(a, this.filterText));
252
- return n`${i ? n`<div class="list-controls"><calcite-filter .items=${s} .filterProps=${["name", "alias", "description"]} .placeholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteFilterChange=${(a) => {
253
- this.filterText = a.currentTarget.value, this.filterFields = this.filterText ? D(this.allLists, this.filterText).map((c) => c.name) : void 0;
254
- }}></calcite-filter>${this.renderSortButton()}</div>` : null}<div class=${L(this.listOnly ? "" : "list-wrapper")} ${d(this.listWrapper)}>${this.shouldRenderSelectionButton(i) ? this.renderSelectionButton() : null}${this.renderSplitSubFieldLists(t)}${e.length ? this.renderSplitTopLevelFieldList(e, !0) : null}</div>${this.filterText && !l && this.filterNoResultsText?.length !== 0 ? n`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}`;
237
+ renderSplitLists(e, t, s) {
238
+ const i = m(this.allLists), l = M(this.allLists).some((a) => F(a, this.filterText));
239
+ return o`${s ? o`<div class="list-controls"><calcite-filter .items=${i} .filterProps=${["name", "alias", "description"]} .placeholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteFilterChange=${(a) => {
240
+ this.filterText = a.currentTarget.value, this.filterFields = this.filterText ? H(this.allLists, this.filterText).map((c) => c.name) : void 0;
241
+ }}></calcite-filter>${this.renderSortButton()}</div>` : null}<div class=${b(this.listOnly ? "" : "list-wrapper")} ${d(this.listWrapper)}>${this.shouldRenderSelectionButton(s) ? this.renderSelectionButton() : null}${this.renderSplitSubFieldLists(t)}${e.length ? this.renderSplitTopLevelFieldList(e, !0) : null}</div>${this.filterText && !l && this.filterNoResultsText?.length !== 0 ? o`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}`;
255
242
  }
256
243
  renderSplitSubFieldLists(e) {
257
- const t = e.map((i) => ({
258
- ...i,
259
- fields: i.fields.filter((s) => F(s, this.filterText))
260
- })).filter((i) => !!i.fields.length);
261
- return y(t, (i) => i.title, (i) => n`<calcite-list selection-mode=none .label=${i.title ?? this.heading ?? ""}><calcite-list-item-group .heading=${i.title}>${y(i.fields, (s) => s.name, (s) => n`<calcite-list-item .label=${s.alias || s.name} .description=${this.multiple ? this._messages.subFieldsSelected.replace("${count}", `${s.subFieldInfos.filter((l) => this.selectedFields.includes(l.name)).length}`) : void 0} .value=${s.name} @click=${(l) => this.addSubFieldInfoFlowItem(s, l.currentTarget)} @keydown=${(l) => {
262
- l.key === "Enter" && this.addSubFieldInfoFlowItem(s, l.currentTarget);
244
+ const t = e.map((s) => ({
245
+ ...s,
246
+ fields: s.fields.filter((i) => F(i, this.filterText))
247
+ })).filter((s) => !!s.fields.length);
248
+ return y(t, (s) => s.title, (s) => o`<calcite-list selection-mode=none .label=${s.title ?? this.heading ?? ""}><calcite-list-item-group .heading=${s.title}>${y(s.fields, (i) => i.name, (i) => o`<calcite-list-item .label=${i.alias || i.name} .description=${this.multiple ? this._messages.subFieldsSelected.replace("${count}", `${i.subFieldInfos.filter((l) => this.selectedFields.includes(l.name)).length}`) : void 0} .value=${i.name} @click=${(l) => this.addSubFieldInfoFlowItem(i, l.currentTarget)} @keydown=${(l) => {
249
+ l.key === "Enter" && this.addSubFieldInfoFlowItem(i, l.currentTarget);
263
250
  }}><calcite-icon slot=actions-end icon=chevron-right flip-rtl scale=s></calcite-icon></calcite-list-item>`)}</calcite-list-item-group></calcite-list>`);
264
251
  }
265
252
  renderSplitTopLevelFieldList(e, t) {
266
- return n`<calcite-list .label=${this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header)} .selectionMode=${this.multiple ? "multiple" : "single"} @calciteListChange=${() => this.handleListSelectionChange(e)} ${d(this.listNode)}><slot name=content-center></slot>${this.renderGroupedListItems(t)}</calcite-list>`;
253
+ return o`<calcite-list .label=${this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header)} .selectionMode=${this.multiple ? "multiple" : "single"} @calciteListChange=${() => this.handleListSelectionChange(e)} ${d(this.listNode)}><slot name=content-center></slot>${this.renderGroupedListItems(t)}</calcite-list>`;
267
254
  }
268
- renderTopLevelOnlyFieldList(e, t, i) {
269
- return n`<div class=${L(this.listOnly ? "" : "list-wrapper")} ${d(this.listWrapper)}><calcite-list .label=${e} .selectionMode=${this.multiple ? "multiple" : "single"} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteListChange=${() => this.handleListSelectionChange(t)} @calciteListFilter=${(s) => {
270
- s.stopPropagation(), this.filterFields = this.listNode.value.filteredItems?.map((l) => l.value), this.filterText = this.listNode.value.filterText;
271
- }} ${d(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(i) ? this.renderSelectionButton() : null}<slot name=content-center></slot>${this.renderGroupedListItems(!1)}</calcite-list></div>`;
255
+ renderTopLevelOnlyFieldList(e, t, s) {
256
+ return o`<div class=${b(this.listOnly ? "" : "list-wrapper")} ${d(this.listWrapper)}><calcite-list .label=${e} .selectionMode=${this.multiple ? "multiple" : "single"} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteListChange=${() => this.handleListSelectionChange(t)} @calciteListFilter=${(i) => {
257
+ i.stopPropagation(), this.filterFields = this.listNode.value.filteredItems?.map((l) => l.value), this.filterText = this.listNode.value.filterText;
258
+ }} ${d(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(s) ? this.renderSelectionButton() : null}<slot name=content-center></slot>${this.renderGroupedListItems(!1)}</calcite-list></div>`;
272
259
  }
273
260
  renderSortButton(e) {
274
- const t = f(this.allLists);
261
+ const t = m(this.allLists);
275
262
  if (!(t.length >= this.showFilterLength && !this.hideSort))
276
263
  return "";
277
- const s = t.every((l) => !!l.type);
278
- return n`<calcite-action id=sort-action slot=${e ?? m} .text=${this._messages.sort ?? ""} title=${this._messages.sort ?? m}><calcite-icon scale=s icon=sort-descending flip-rtl></calcite-icon></calcite-action><calcite-dropdown placement=bottom-end overlay-positioning=fixed reference-element=sort-action @calciteDropdownOpen=${() => {
264
+ const i = t.every((l) => !!l.type);
265
+ return o`<calcite-action id=sort-action slot=${e ?? p} .text=${this._messages.sort ?? ""} title=${this._messages.sort ?? p}><calcite-icon scale=s icon=sort-descending flip-rtl></calcite-icon></calcite-action><calcite-dropdown placement=bottom-end overlay-positioning=fixed reference-element=sort-action @calciteDropdownOpen=${() => {
279
266
  this.observer?.disconnect(), this.popoverNode.value && this.observer?.observe(this.popoverNode.value, { attributes: !0 });
280
- }} @calciteDropdownClose=${() => this.observer?.disconnect()} ${d(this.dropdownNode)}><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy === "default"} @calciteDropdownItemSelect=${() => this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy === "display"} @calciteDropdownItemSelect=${() => this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${s && n`<calcite-dropdown-item .selected=${this.lastSortBy === "type"} @calciteDropdownItemSelect=${() => this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>` || ""}<calcite-dropdown-item .selected=${this.lastSortBy === "field"} @calciteDropdownItemSelect=${() => this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
267
+ }} @calciteDropdownClose=${() => this.observer?.disconnect()} ${d(this.dropdownNode)}><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy === "default"} @calciteDropdownItemSelect=${() => this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy === "display"} @calciteDropdownItemSelect=${() => this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${i && o`<calcite-dropdown-item .selected=${this.lastSortBy === "type"} @calciteDropdownItemSelect=${() => this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>` || ""}<calcite-dropdown-item .selected=${this.lastSortBy === "field"} @calciteDropdownItemSelect=${() => this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
281
268
  }
282
269
  renderSelectionButton() {
283
- return n`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${() => {
270
+ return o`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${() => {
284
271
  if (this.canDeselectAll())
285
272
  this.selectedFields = this.filterFields?.length ? this.selectedFields.filter((e) => !this.filterFields?.includes(e)) : [];
286
273
  else if (this.filterFields?.length)
287
274
  this.selectedFields = [.../* @__PURE__ */ new Set([...this.selectedFields, ...this.filterFields])];
288
275
  else {
289
- const t = f(this.allLists);
290
- this.selectedFields = t.map((i) => i.name);
276
+ const t = m(this.allLists);
277
+ this.selectedFields = t.map((s) => s.name);
291
278
  }
292
- this.reorderSelectedFieldsByCurrentListOrder(), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields });
279
+ this.reorderSelectedFieldsByCurrentListOrder(), this.arcgisChange.emit({ selectedFields: this.selectedFields });
293
280
  }}>${this.canDeselectAll() ? this._messages.deselectAll : this._messages.selectAll}</calcite-button></div>`;
294
281
  }
295
282
  renderGroupedListItems(e) {
296
- const t = this.allLists.filter((i) => !!i.fields.length && !u(i.fields)).map((i) => ({
297
- ...i,
298
- fields: e ? i.fields.filter((s) => F(s, this.filterText)) : i.fields
299
- })).filter((i) => !!i.fields.length);
300
- return t.length === 1 && !t[0].title ? this.renderListItems(t[0].fields) : t.map((s) => n`<calcite-list-item-group .heading=${s.title}>${this.renderListItems(s.fields)}</calcite-list-item-group>`);
283
+ const t = this.allLists.filter((s) => !!s.fields.length && !u(s.fields)).map((s) => ({
284
+ ...s,
285
+ fields: e ? s.fields.filter((i) => F(i, this.filterText)) : s.fields
286
+ })).filter((s) => !!s.fields.length);
287
+ return t.length === 1 && !t[0].title ? this.renderListItems(t[0].fields) : t.map((i) => o`<calcite-list-item-group .heading=${i.title}>${this.renderListItems(i.fields)}</calcite-list-item-group>`);
301
288
  }
302
289
  renderListItems(e) {
303
290
  return e.map((t) => this.renderCalciteListItem(t));
304
291
  }
305
292
  renderCalciteListItem(e, t = !0) {
306
- const i = t && this.showFieldInfoCheck(e), s = this.showFieldTypeIcon && !!e.type;
307
- return v(e.name, n`<calcite-list-item .label=${e.alias || e.name} .description=${(() => {
293
+ const s = t && this.showFieldInfoCheck(e), i = this.showFieldTypeIcon && !!e.type;
294
+ return v(e.name, o`<calcite-list-item .label=${e.alias || e.name} .description=${(() => {
308
295
  if (this.showFieldName && e.hideFieldName !== !0)
309
296
  return `{${e.name}}`;
310
297
  if (this.showDescription && e.hideDescription !== !0 && e.description)
@@ -312,40 +299,40 @@ class H extends I {
312
299
  })()} .value=${e.name} .selected=${!this.multiple && e.name === this.selectedFields[0] || this.multiple && this.selectedFields.includes(e.name)} .metadata=${{
313
300
  label: e.alias,
314
301
  fieldName: e.name
315
- }}>${s && n`<div slot=actions-end class="field-icons">${N({ fieldType: e.type })}</div>` || ""}${this.renderInfoAction(e, i)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`);
302
+ }}>${i && o`<div slot=actions-end class="field-icons">${N({ fieldType: e.type })}</div>` || ""}${this.renderInfoAction(e, s)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`);
316
303
  }
317
304
  renderInfoAction(e, t) {
318
- const { _messages: i } = this;
319
- return t ? n`<calcite-action slot=actions-end .text=${i.info} title=${i.info ?? m} scale=s icon=information @click=${(s) => {
320
- s.stopPropagation();
321
- const l = s.currentTarget;
305
+ const { _messages: s } = this;
306
+ return t ? o`<calcite-action slot=actions-end .text=${s.info} title=${s.info ?? p} scale=s icon=information @click=${(i) => {
307
+ i.stopPropagation();
308
+ const l = i.currentTarget;
322
309
  this.addFieldInfoFlowItem(e, l);
323
310
  }}></calcite-action>` : "";
324
311
  }
325
312
  renderEditAction(e) {
326
313
  const { _messages: t } = this;
327
- return e.showEditAction ? n`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit ?? m} scale=s icon=pencil @click=${(i) => {
328
- i.stopPropagation(), this.arcgisEditField.emit({ fieldName: e.name });
314
+ return e.showEditAction ? o`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit ?? p} scale=s icon=pencil @click=${(s) => {
315
+ s.stopPropagation(), this.arcgisEditField.emit({ fieldName: e.name });
329
316
  }}></calcite-action>` : "";
330
317
  }
331
318
  renderDeleteAction(e) {
332
319
  const { _messages: t } = this;
333
- return e.showDeleteAction ? n`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete ?? m} scale=s icon=trash @click=${(i) => {
334
- i.stopPropagation(), this.arcgisDeleteField.emit({ fieldName: e.name });
320
+ return e.showDeleteAction ? o`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete ?? p} scale=s icon=trash @click=${(s) => {
321
+ s.stopPropagation(), this.arcgisDeleteField.emit({ fieldName: e.name });
335
322
  }}></calcite-action>` : "";
336
323
  }
337
324
  renderAddButton() {
338
- return this.multiple ? n`<calcite-button .appearance=${this.hideCancel ? "outline-fill" : "solid"} .width=${this.hideCancel ? "full" : "half"} @click=${() => {
339
- this.arcgisClose.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields });
325
+ return this.multiple ? o`<calcite-button .appearance=${this.hideCancel ? "outline-fill" : "solid"} .width=${this.hideCancel ? "full" : "half"} @click=${() => {
326
+ this.arcgisClose.emit({ selectedFields: this.selectedFields });
340
327
  }}>${this.okBtnText || (this.multiple ? this._messages.done : this._messages.ok)}</calcite-button>` : "";
341
328
  }
342
329
  renderCancelButton() {
343
- return this.hideCancel ? "" : n`<calcite-button appearance=outline-fill .width=${this.multiple ? "half" : "full"} @click=${() => {
344
- this.arcgisClose.emit(), this.arcgisFieldPickListDismissed.emit();
330
+ return this.hideCancel ? "" : o`<calcite-button appearance=outline-fill .width=${this.multiple ? "half" : "full"} @click=${() => {
331
+ this.arcgisClose.emit();
345
332
  }}>${this._messages.cancel}</calcite-button>`;
346
333
  }
347
334
  }
348
- b("arcgis-field-pick-list", H);
335
+ I("arcgis-field-pick-list", P);
349
336
  export {
350
- H as ArcgisFieldPickList
337
+ P as ArcgisFieldPickList
351
338
  };
@@ -55,12 +55,9 @@ export abstract class ArcgisSliderInput extends LitElement {
55
55
  * @default false
56
56
  */
57
57
  accessor withSteppers: boolean;
58
- /** @deprecated use arcgisValueChange instead. */
59
- readonly arcgisSliderInputValueChange: import("@arcgis/lumina").TargetedEvent<this, number>;
60
58
  /** Emitted when the value has changed. */
61
59
  readonly arcgisValueChange: import("@arcgis/lumina").TargetedEvent<this, number>;
62
60
  readonly "@eventTypes": {
63
- arcgisSliderInputValueChange: ArcgisSliderInput["arcgisSliderInputValueChange"]["detail"];
64
61
  arcgisValueChange: ArcgisSliderInput["arcgisValueChange"]["detail"];
65
62
  };
66
63
  }
@@ -1,29 +1,29 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  import { c as d } from "../../chunks/runtime.js";
3
- import { css as m, html as o } from "lit";
4
- import { LitElement as b, createEvent as p } from "@arcgis/lumina";
5
- import { debounce as g } from "@arcgis/toolkit/function";
6
- const $ = m`.container{display:flex;align-items:center;justify-content:space-between;position:relative}.slider{width:50%}.input{width:45%}`;
7
- class f extends b {
3
+ import { css as h, html as m } from "lit";
4
+ import { LitElement as o, createEvent as b } from "@arcgis/lumina";
5
+ import { debounce as $ } from "@arcgis/toolkit/function";
6
+ const f = h`.container{display:flex;align-items:center;justify-content:space-between;position:relative}.slider{width:50%}.input{width:45%}`;
7
+ class g extends o {
8
8
  constructor() {
9
- super(...arguments), this.debouncedApplyValueOnChange = g((e) => this.applyValueOnChange(e), 800), this.disabled = !1, this.flipLabels = !1, this.scale = "s", this.min = 0, this.max = 100, this.value = 50, this.step = 1, this.withSteppers = !1, this.arcgisSliderInputValueChange = p(), this.arcgisValueChange = p();
9
+ super(...arguments), this.debouncedApplyValueOnChange = $((e) => this.applyValueOnChange(e), 800), this.disabled = !1, this.flipLabels = !1, this.scale = "s", this.min = 0, this.max = 100, this.value = 50, this.step = 1, this.withSteppers = !1, this.arcgisValueChange = b();
10
10
  }
11
11
  static {
12
12
  this.properties = { disabled: 5, label: 1, flipLabels: 5, scale: 1, min: 9, max: 9, value: 9, step: 9, unitsLabel: 1, withSteppers: 5 };
13
13
  }
14
14
  static {
15
- this.styles = $;
15
+ this.styles = f;
16
16
  }
17
17
  applyValueOnChange(e) {
18
- const { min: i, max: a, value: n } = this, s = Number(e.value), t = i !== void 0 && a !== void 0 ? Math.min(a, Math.max(i, s)) : s;
19
- s !== n && (e.value = `${t}`, this.arcgisValueChange.emit(t), this.arcgisSliderInputValueChange.emit(t), this.value = t);
18
+ const { min: t, max: i, value: n } = this, s = Number(e.value), a = t !== void 0 && i !== void 0 ? Math.min(i, Math.max(t, s)) : s;
19
+ s !== n && (e.value = `${a}`, this.arcgisValueChange.emit(a), this.value = a);
20
20
  }
21
21
  render() {
22
- const { disabled: e, min: i, max: a, value: n, step: s, withSteppers: t, flipLabels: r, unitsLabel: c, label: u, scale: h } = this;
23
- return o`<div class="container"><calcite-slider class="slider" .disabled=${e} .min=${i} .max=${a} .value=${n} .step=${s} @calciteSliderInput=${(l) => this.debouncedApplyValueOnChange(l.currentTarget)}></calcite-slider><calcite-input class="input" .disabled=${e} .min=${i} .max=${a} .numberButtonType=${t ? "vertical" : "none"} .prefixText=${r ? c : ""} @calciteInputInput=${(l) => this.debouncedApplyValueOnChange(l.target)} @click=${(l) => l.stopPropagation()} .scale=${h} step=any .suffixText=${r ? "" : c} type=number .value=${`${n}`} .label=${u}></calcite-input></div>`;
22
+ const { disabled: e, min: t, max: i, value: n, step: s, withSteppers: a, flipLabels: c, unitsLabel: p, label: r, scale: u } = this;
23
+ return m`<div class="container"><calcite-slider class="slider" .disabled=${e} .min=${t} .max=${i} .value=${n} .step=${s} @calciteSliderInput=${(l) => this.debouncedApplyValueOnChange(l.currentTarget)}></calcite-slider><calcite-input class="input" .disabled=${e} .min=${t} .max=${i} .numberButtonType=${a ? "vertical" : "none"} .prefixText=${c ? p : ""} @calciteInputInput=${(l) => this.debouncedApplyValueOnChange(l.target)} @click=${(l) => l.stopPropagation()} .scale=${u} step=any .suffixText=${c ? "" : p} type=number .value=${`${n}`} .label=${r}></calcite-input></div>`;
24
24
  }
25
25
  }
26
- d("arcgis-slider-input", f);
26
+ d("arcgis-slider-input", g);
27
27
  export {
28
- f as ArcgisSliderInput
28
+ g as ArcgisSliderInput
29
29
  };
@@ -13,6 +13,14 @@ import type { ActionBar as ActionBar } from "@esri/calcite-components/components
13
13
  * @internal
14
14
  */
15
15
  export abstract class ArcgisToolbar extends LitElement {
16
+ /**
17
+ * Main-axis budget in pixels. Undefined (the default) enables intrinsic sizing:
18
+ * CSS determines the host's size, and its observed content box supplies the budget.
19
+ * Specifying a value, including zero, disables intrinsic sizing and directly controls
20
+ * the budget used to collapse groups. CSS can still constrain the host.
21
+ * When managed by a stack, the stack owns sizing and allocation instead.
22
+ */
23
+ accessor allocatedLength: number | undefined;
16
24
  get barElement(): ActionBar | undefined;
17
25
  /** Toolbar orientation. */
18
26
  accessor layout: "horizontal" | "vertical";
@@ -57,6 +65,18 @@ export abstract class ArcgisToolbar extends LitElement {
57
65
  * @internal
58
66
  */
59
67
  measure(context: MeasurementContext): number[];
68
+ /**
69
+ * Intrinsic sizing needs only the collapsed and fully allocated lengths, not
70
+ * every combination of intermediate group lengths. Use allocation for both
71
+ * endpoints so forced-collapse priorities follow the same rules as rendering.
72
+ *
73
+ * @param context
74
+ * @internal
75
+ */
76
+ measureIntrinsicSize(context: MeasurementContext): {
77
+ minimum: number;
78
+ maximum: number;
79
+ };
60
80
  /**
61
81
  * Render method used when the toolbar is managed by a toolbar stack.
62
82
  *