@arcgis/common-components 5.2.0-next.65 → 5.2.0-next.67

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 (76) hide show
  1. package/dist/cdn/27EUJ42B.js +2 -0
  2. package/dist/cdn/2C7SVAMP.js +2 -0
  3. package/dist/cdn/2W6L7MWA.js +2 -0
  4. package/dist/cdn/2YGG7LXT.js +2 -0
  5. package/dist/cdn/4BK7PZE3.js +2 -0
  6. package/dist/cdn/5WGBTOWN.js +2 -0
  7. package/dist/cdn/{BMAH7QBK.js → 7KADEPAK.js} +1 -1
  8. package/dist/cdn/{TO6WMMK4.js → CA7QB7UT.js} +1 -1
  9. package/dist/cdn/CH6HYVI6.js +2 -0
  10. package/dist/cdn/ETMH4DV6.js +2 -0
  11. package/dist/cdn/FBLD2E3Y.js +2 -0
  12. package/dist/cdn/{I6VYJHWH.js → FJAIY6NX.js} +1 -1
  13. package/dist/cdn/{G3IYOM43.js → GPWZ4YLQ.js} +1 -1
  14. package/dist/cdn/JJY3CFBU.js +2 -0
  15. package/dist/cdn/{7SJH7FOK.js → OVZV6YGZ.js} +1 -1
  16. package/dist/cdn/{6DGHVYTV.js → PHM5ZZMN.js} +1 -1
  17. package/dist/cdn/PTJVWB67.js +2 -0
  18. package/dist/cdn/{ADYTRVI3.js → SJFYZOCS.js} +1 -1
  19. package/dist/cdn/{UI52HM3O.js → UK2G5LXU.js} +1 -1
  20. package/dist/cdn/VCZLD7ZT.js +2 -0
  21. package/dist/cdn/VOBBBIYC.js +2 -0
  22. package/dist/cdn/{L5RQNCAS.js → WVOAAHEV.js} +1 -1
  23. package/dist/cdn/{PFBJ5AAH.js → XQRXHSM5.js} +1 -1
  24. package/dist/cdn/XW5YJXMI.js +2 -0
  25. package/dist/cdn/YCQN4TJE.js +2 -0
  26. package/dist/cdn/index.js +1 -1
  27. package/dist/cdn/main.css +1 -1
  28. package/dist/chunks/element-reference-controller.js +17 -0
  29. package/dist/chunks/utils.js +69 -0
  30. package/dist/chunks/utils2.js +20 -0
  31. package/dist/chunks/utils3.js +7 -0
  32. package/dist/components/arcgis-color-input/customElement.d.ts +2 -1
  33. package/dist/components/arcgis-field-info/customElement.js +1 -3
  34. package/dist/components/arcgis-field-pick-list/customElement.js +23 -23
  35. package/dist/components/arcgis-toolbar/customElement.d.ts +47 -0
  36. package/dist/components/arcgis-toolbar/customElement.js +82 -0
  37. package/dist/components/arcgis-toolbar/index.d.ts +1 -0
  38. package/dist/components/arcgis-toolbar/index.js +2 -0
  39. package/dist/components/arcgis-toolbar/types.d.ts +10 -0
  40. package/dist/components/arcgis-toolbar-action/customElement.d.ts +97 -0
  41. package/dist/components/arcgis-toolbar-action/customElement.js +57 -0
  42. package/dist/components/arcgis-toolbar-action/index.d.ts +1 -0
  43. package/dist/components/arcgis-toolbar-action/index.js +3 -0
  44. package/dist/components/arcgis-toolbar-group/customElement.d.ts +38 -0
  45. package/dist/components/arcgis-toolbar-group/customElement.js +47 -0
  46. package/dist/components/arcgis-toolbar-group/index.d.ts +1 -0
  47. package/dist/components/arcgis-toolbar-group/index.js +2 -0
  48. package/dist/components/arcgis-toolbar-item/customElement.d.ts +83 -0
  49. package/dist/components/arcgis-toolbar-item/customElement.js +42 -0
  50. package/dist/components/arcgis-toolbar-item/index.d.ts +1 -0
  51. package/dist/components/arcgis-toolbar-item/index.js +4 -0
  52. package/dist/components/arcgis-toolbar-more-button/customElement.d.ts +52 -0
  53. package/dist/components/arcgis-toolbar-more-button/customElement.js +68 -0
  54. package/dist/components/arcgis-toolbar-more-button/index.d.ts +1 -0
  55. package/dist/components/arcgis-toolbar-more-button/index.js +6 -0
  56. package/dist/components/arcgis-toolbar-split-button/customElement.d.ts +51 -0
  57. package/dist/components/arcgis-toolbar-split-button/customElement.js +66 -0
  58. package/dist/components/arcgis-toolbar-split-button/index.d.ts +1 -0
  59. package/dist/components/arcgis-toolbar-split-button/index.js +6 -0
  60. package/dist/components/arcgis-unique-values-list/customElement.js +99 -79
  61. package/dist/docs/api.json +1 -1
  62. package/dist/docs/docs.json +1 -1
  63. package/dist/docs/vscode.html-custom-data.json +1 -1
  64. package/dist/docs/web-types.json +1 -1
  65. package/dist/index.d.ts +36 -0
  66. package/dist/loader.js +8 -2
  67. package/dist/types/lumina.d.ts +33 -0
  68. package/dist/types/preact.d.ts +39 -0
  69. package/dist/types/react.d.ts +45 -0
  70. package/dist/types/stencil.d.ts +33 -0
  71. package/package.json +4 -4
  72. package/dist/cdn/4S3TDYPJ.js +0 -2
  73. package/dist/cdn/DWUHV2MR.js +0 -2
  74. package/dist/cdn/EJYLPUWU.js +0 -2
  75. package/dist/cdn/NNP2GXAL.js +0 -2
  76. package/dist/cdn/WLDOB2AM.js +0 -2
@@ -1,71 +1,72 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as H } from "../../chunks/runtime.js";
3
- import { css as G, html as w } from "lit";
4
- import { keyed as J } from "lit/directives/keyed.js";
5
- import { LitElement as K, createEvent as I } from "@arcgis/lumina";
6
- import { Task as Q } from "@lit/task";
7
- import { createRef as X, ref as L } from "lit/directives/ref.js";
8
- import { log as D, composeMissingPropertyMessage as N } from "@arcgis/toolkit/log";
9
- import { formatDate as F, convertDateFormatToIntlOptions as $, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as U, formatNumber as te } from "@arcgis/core/intl.js";
2
+ import { c as P } from "../../chunks/runtime.js";
3
+ import { keyed as G } from "lit/directives/keyed.js";
4
+ import { LitElement as J, createEvent as T } from "@arcgis/lumina";
5
+ import { Task as K } from "@lit/task";
6
+ import { css as Q, html as F } from "lit";
7
+ import { createRef as X, ref as E } from "lit/directives/ref.js";
8
+ import { log as S, composeMissingPropertyMessage as Z } from "@arcgis/toolkit/log";
9
+ import { formatDate as D, convertDateFormatToIntlOptions as $, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as z, formatNumber as te } from "@arcgis/core/intl.js";
10
10
  import ie from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
11
- import { clone as O } from "@arcgis/core/core/lang.js";
12
- import { g as E, i as h } from "../../chunks/general.js";
13
- import { f as S, e as z, k as B, d as Z } from "../../chunks/layer-utils.js";
14
- import { u as se } from "../../chunks/useT9n.js";
11
+ import * as se from "@arcgis/core/core/reactiveUtils.js";
12
+ import { clone as I } from "@arcgis/core/core/lang.js";
13
+ import { g as O, i as h } from "../../chunks/general.js";
14
+ import { f as w, e as L, k as A, d as N } from "../../chunks/layer-utils.js";
15
+ import { u as ne } from "../../chunks/useT9n.js";
15
16
  function k(i) {
16
17
  return (/* @__PURE__ */ new Date(`1970-01-01T${i}Z`)).getTime();
17
18
  }
18
- function R(i) {
19
+ function B(i) {
19
20
  return (/* @__PURE__ */ new Date(`${i} 00:00:00`)).getTime();
20
21
  }
21
- function ne(i, e, s) {
22
+ function oe(i, e, s) {
22
23
  let t;
23
- return e === "unknown" ? t = F(i, {
24
+ return e === "unknown" ? t = D(i, {
24
25
  ...$("short-date-short-time"),
25
26
  timeZone: "utc",
26
27
  timeZoneName: "shortOffset"
27
- }) : t = F(i, {
28
+ }) : t = D(i, {
28
29
  ...$("short-date-short-time"),
29
30
  timeZone: e
30
31
  }), t;
31
32
  }
32
- function oe(i) {
33
+ function ae(i) {
33
34
  return i ? Y(i, $("short-date")) : "";
34
35
  }
35
- function ae(i) {
36
+ function le(i) {
36
37
  let e;
37
- return typeof i == "string" ? e = ee(i, $("short-date-long-time")) : e = F(i, {
38
+ return typeof i == "string" ? e = ee(i, $("short-date-long-time")) : e = D(i, {
38
39
  ...$("long-time"),
39
40
  timeZone: "utc"
40
41
  }), e;
41
42
  }
42
- function le(i, e) {
43
- return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ? U(i, {
43
+ function re(i, e) {
44
+ return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ? z(i, {
44
45
  ...$("short-date-short-time"),
45
46
  timeZone: "utc",
46
47
  timeZoneName: "shortOffset"
47
- }) : U(i, {
48
+ }) : z(i, {
48
49
  ...$("short-date-short-time"),
49
50
  timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
50
- }) : e && "timeZone" in e && e.timeZone === "unknown" ? F(i, {
51
+ }) : e && "timeZone" in e && e.timeZone === "unknown" ? D(i, {
51
52
  ...$("short-date-short-time"),
52
53
  timeZone: "utc",
53
54
  timeZoneName: "shortOffset"
54
- }) : F(i, {
55
+ }) : D(i, {
55
56
  ...$("short-date-short-time"),
56
57
  timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
57
58
  });
58
59
  }
59
- function A(i, e, s) {
60
- if (!S(i) && !z(i) && !B(i) && !Z(i))
60
+ function R(i, e, s) {
61
+ if (!w(i) && !L(i) && !A(i) && !N(i))
61
62
  return;
62
63
  let t;
63
- return E(i, s).fields.forEach((p) => {
64
- const a = p.name, r = "domain" in p ? p.domain : void 0;
65
- if (!Z(i) && i.subtypeField === a) {
64
+ return O(i, s).fields.forEach((p) => {
65
+ const a = p.name, u = "domain" in p ? p.domain : void 0;
66
+ if (!N(i) && i.subtypeField === a) {
66
67
  let c;
67
- B(i) || S(i) ? c = i.subtypes : c = i.parent.subtypes, c.forEach((l) => {
68
- z(i) && i.subtypeCode !== l.code || (e.name === a && (t = t || [], t.push({ code: l.code, name: l.name })), l.domains && Object.keys(l.domains).forEach((d) => {
68
+ A(i) || w(i) ? c = i.subtypes : c = i.parent.subtypes, c.forEach((l) => {
69
+ L(i) && i.subtypeCode !== l.code || (e.name === a && (t = t || [], t.push({ code: l.code, name: l.name })), l.domains && Object.keys(l.domains).forEach((d) => {
69
70
  if (e.name === d) {
70
71
  const o = l.domains[d];
71
72
  o?.type === "coded-value" && o?.codedValues && o.codedValues.forEach((n) => {
@@ -78,9 +79,9 @@ function A(i, e, s) {
78
79
  }));
79
80
  });
80
81
  }
81
- if (e.name === a && (S(i) || Z(i))) {
82
- const c = S(i) ? i.typeIdField : void 0, l = S(i) ? i.types : void 0;
83
- S(i) && c && l ? (c === a ? t = l.map(
82
+ if (e.name === a && (w(i) || N(i))) {
83
+ const c = w(i) ? i.typeIdField : void 0, l = w(i) ? i.types : void 0;
84
+ w(i) && c && l ? (c === a ? t = l.map(
84
85
  (d) => (
85
86
  // fake coded Values
86
87
  {
@@ -90,29 +91,29 @@ function A(i, e, s) {
90
91
  )
91
92
  ) : (t = t || [], l.forEach((d) => {
92
93
  if (!d.domains?.[a] || d.domains[a].type === "inherited") {
93
- const o = r;
94
+ const o = u;
94
95
  o?.codedValues && o.codedValues.forEach((n) => {
95
96
  let g = !1;
96
97
  t.forEach((v) => {
97
98
  v.code === n.code && (g = !0, `| ${v.name} |`.includes(`| ${n.name} |`) || (v.name += ` | ${n.name}`));
98
- }), g || t.push(O(n));
99
+ }), g || t.push(I(n));
99
100
  });
100
101
  } else d.domains?.[a]?.codedValues && d.domains[a].codedValues.forEach((o) => {
101
102
  let n = !1;
102
103
  t.forEach((g) => {
103
104
  g.code === o.code && (n = !0, `| ${g.name} |`.includes(`| ${o.name} |`) || (g.name += ` | ${o.name}`));
104
- }), n || t.push(O(o));
105
+ }), n || t.push(I(o));
105
106
  });
106
- })), !t?.length && r?.codedValues && (t = O(r.codedValues))) : r?.codedValues && (t = r.codedValues);
107
+ })), !t?.length && u?.codedValues && (t = I(u.codedValues))) : u?.codedValues && (t = u.codedValues);
107
108
  }
108
109
  }), t;
109
110
  }
110
- function T(i, e) {
111
+ function x(i, e) {
111
112
  const s = e;
112
113
  if (s) {
113
114
  let t = "";
114
- for (let u = 0; u < s.length; u++) {
115
- const p = s[u];
115
+ for (let r = 0; r < s.length; r++) {
116
+ const p = s[r];
116
117
  p.code == i && (t += (t.length ? " | " : "") + p.name);
117
118
  }
118
119
  return t.length || (t = `${i}`), t;
@@ -122,7 +123,7 @@ function T(i, e) {
122
123
  function C(i) {
123
124
  return ["small-integer", "big-integer", "integer", "single", "double", "long"].includes(i.type);
124
125
  }
125
- function j(i) {
126
+ function H(i) {
126
127
  switch (i.type) {
127
128
  case "small-integer":
128
129
  case "big-integer":
@@ -143,33 +144,33 @@ function j(i) {
143
144
  return i.type;
144
145
  }
145
146
  }
146
- const re = G`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`;
147
- class ue extends K {
147
+ const ue = Q`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`;
148
+ class ce extends J {
148
149
  constructor() {
149
- super(...arguments), this.dropdownNode = X(), this._messages = se({ blocking: !0 }), this._propWatcherTask = new Q(this, {
150
+ super(...arguments), this.dropdownNode = X(), this.initialized = !1, this._messages = ne({ blocking: !0 }), this._propWatcherTask = new K(this, {
150
151
  task: async ([e, s, t]) => {
151
- const u = h(e) && h(s) || h(t);
152
- if (!h(t) && !h(e) && !h(s) ? D("error", this, N("uniqueValues")) : h(t) || (h(e) || D("error", this, N("layer")), h(s) || D("error", this, N("fieldName"))), h(e) && h(s)) {
152
+ const r = h(e) && h(s) || h(t);
153
+ if (!h(t) && !h(e) && !h(s) ? S("error", this, Z("uniqueValues")) : h(t) || (h(e) || S("error", this, Z("layer")), h(s) || S("error", this, Z("fieldName"))), h(e) && h(s)) {
153
154
  const { visualizationSource: p } = this;
154
- if (!E(e, p).fields?.filter((c) => c.name === s))
155
- throw D("error", this, "Field could not be found."), new Error();
155
+ if (!O(e, p).fields?.filter((c) => c.name === s))
156
+ throw S("error", this, "Field could not be found."), new Error();
156
157
  }
157
- if (!u)
158
+ if (!r)
158
159
  throw new Error();
159
- await this.processProps();
160
+ await this.processProps(), this._propWatcherTask.autoRun = !1;
160
161
  },
161
162
  args: () => [
162
163
  this.layer,
163
164
  this.fieldName,
164
165
  this.uniqueValues
165
166
  ]
166
- }), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange = I(), this.arcgisSortByChange = I(), this.arcgisLoad = I();
167
+ }), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange = T(), this.arcgisSortByChange = T(), this.arcgisLoad = T();
167
168
  }
168
169
  static {
169
170
  this.properties = { initialRender: 16, view: 0, layer: 0, visualizationSource: 1, fieldName: 1, uniqueValues: 0, numberFormatOptions: 0, selectedValues: 0, sortBy: 1, multiple: 5, partialUniqueValues: 5, showFilterLength: 9, maxHeight: 9 };
170
171
  }
171
172
  static {
172
- this.styles = re;
173
+ this.styles = ue;
173
174
  }
174
175
  async setFocus() {
175
176
  this.listNode?.setFocus();
@@ -184,48 +185,62 @@ class ue extends K {
184
185
  loaded() {
185
186
  this.layer && this.fieldInfo && (setTimeout(() => this.initialRender = !1, 800), this.listNode?.setFocus());
186
187
  }
188
+ async willUpdate(e) {
189
+ this.initialized && (e.has("layer") || e.has("visualizationSource") || e.has("fieldName") || e.has("uniqueValues")) && (await this.processProps(), this.requestUpdate()), e.has("maxHeight") && this.maxHeight && this.listNode?.setAttribute("style", `max-height: ${this.maxHeight || 400}px`);
190
+ }
187
191
  async processProps() {
188
- const { layer: e, fieldName: s, view: t, visualizationSource: u } = this, a = (e ? E(e, u) : void 0)?.fields?.filter((r) => r.name === s)?.[0];
192
+ const { layer: e, fieldName: s, view: t, visualizationSource: r } = this, a = (e ? O(e, r) : void 0)?.fields?.filter((u) => u.name === s)?.[0];
193
+ if (!a) {
194
+ S("error", this, `Field '${s}' not found in layer`), this.fieldInfo = {
195
+ layerField: a,
196
+ fieldDomains: void 0,
197
+ simpleType: void 0,
198
+ partialUniqueValues: !1,
199
+ uniqueValueInfos: []
200
+ };
201
+ return;
202
+ }
189
203
  if (h(this.uniqueValues))
190
204
  this.fieldInfo = {
191
205
  layerField: a,
192
- fieldDomains: e && a ? A(e, a, u) : void 0,
193
- simpleType: e && a ? j(a) : void 0,
206
+ fieldDomains: e && a ? R(e, a, r) : void 0,
207
+ simpleType: e && a ? H(a) : void 0,
194
208
  partialUniqueValues: this.partialUniqueValues ?? !1,
195
209
  uniqueValueInfos: this.uniqueValues
196
210
  }, this.arcgisLoad.emit();
197
211
  else if (e && a) {
198
212
  this.fieldInfo = {
199
213
  layerField: a,
200
- fieldDomains: A(e, a, u),
201
- simpleType: j(a),
214
+ fieldDomains: R(e, a, r),
215
+ simpleType: H(a),
202
216
  partialUniqueValues: !1
203
217
  };
204
- const { fieldInfo: r } = this;
218
+ const { fieldInfo: u } = this;
205
219
  try {
206
220
  const c = await ie({
207
221
  layer: e,
208
222
  view: t,
209
223
  field: s,
210
224
  sqlWhere: "definitionExpression" in e ? e.definitionExpression ?? void 0 : void 0,
211
- forBinning: !1
225
+ forBinning: r === "feature-reduction"
212
226
  }), l = C(a), d = c.uniqueValueInfos.filter((o) => h(o.value) ? a.type === "string" && !l || a.type === "guid" ? o.value !== "<Null>" && `${o.value}`.trim() !== "" : (C(a) || a.type === "oid" || l, o.value !== "<Null>" && o.value !== "") : !1);
213
- d.sort((o, n) => o.count > n.count ? -1 : o.count < n.count ? 1 : 0), r.fieldDomains?.length && r.fieldDomains.forEach((o) => {
227
+ d.sort((o, n) => o.count > n.count ? -1 : o.count < n.count ? 1 : 0), u.fieldDomains?.length && u.fieldDomains.forEach((o) => {
214
228
  d.find((n) => n.value === o.code) || d.push({
215
229
  value: o.code,
216
230
  count: 0
217
231
  });
218
- }), r.uniqueValueInfos = d, r.partialUniqueValues = c.uniqueValueInfos.length === 2e3, this.arcgisLoad.emit();
232
+ }), u.uniqueValueInfos = d, u.partialUniqueValues = c.uniqueValueInfos.length === 2e3, this.initialized || this.arcgisLoad.emit(), this.setUpTimeZoneHandle(), this.initialized = !0;
219
233
  } catch (c) {
220
- if (D("error", this, `uniqueValues() - ${c.message}`), this.hasFieldDomains(r)) {
234
+ if (S("error", this, `uniqueValues() - ${c.message}`), this.hasFieldDomains(u)) {
221
235
  const d = [];
222
- r.fieldDomains.forEach((o) => {
236
+ u.fieldDomains.forEach((o) => {
223
237
  d.find((n) => n.value === o.code) || d.push({
224
238
  value: o.code,
225
239
  count: void 0
226
240
  });
227
241
  });
228
242
  }
243
+ this.initialized = !0;
229
244
  }
230
245
  setTimeout(() => {
231
246
  this.initialRender = !1, this.listNode?.setFocus();
@@ -240,6 +255,11 @@ class ue extends K {
240
255
  const t = e.currentTarget.selectedItems?.[0].getAttribute("data-value");
241
256
  this.sortBy = t || void 0, this.arcgisSortByChange.emit(t || void 0);
242
257
  }
258
+ setUpTimeZoneHandle() {
259
+ this.timeZoneHandle?.remove();
260
+ const { view: e, fieldInfo: s } = this;
261
+ s.simpleType && ["date", "timestamp-offset"].includes(s.simpleType) && (this.timeZoneHandle = se.watch(() => e?.timeZone, () => this.requestUpdate()));
262
+ }
243
263
  isSameLists(e, s) {
244
264
  if (!e && !s)
245
265
  return !0;
@@ -256,50 +276,50 @@ class ue extends K {
256
276
  render() {
257
277
  return this._propWatcherTask.render({
258
278
  complete: () => {
259
- const { fieldInfo: e, selectedValues: s, sortBy: t, multiple: u, initialRender: p, showFilterLength: a, _messages: r } = this, { fieldDomains: c, uniqueValueInfos: l, partialUniqueValues: d, layerField: o } = e, n = o?.type;
279
+ const { fieldInfo: e, selectedValues: s, sortBy: t, multiple: r, initialRender: p, showFilterLength: a, _messages: u } = this, { fieldDomains: c, uniqueValueInfos: l, partialUniqueValues: d, layerField: o } = e, n = o?.type;
260
280
  if (!l?.length)
261
281
  return "";
262
282
  const g = n ? ["small-integer", "big-integer", "integer", "single", "double", "long", "oid"].includes(n) : !1, v = n ? ["date", "date-only", "time-only"].includes(n) : !1, _ = (y) => {
263
283
  y.sort((m, f) => m.count <= f.count ? 1 : -1);
264
- }, M = (y) => {
284
+ }, j = (y) => {
265
285
  const m = c?.length;
266
286
  y.sort((f, b) => {
267
287
  if (!m && g)
268
288
  return (typeof f.value == "string" ? Number.parseFloat(f.value) : f.value) - (typeof b.value == "string" ? Number.parseFloat(b.value) : b.value);
269
289
  {
270
- const q = m ? T(f.value, c) : f.label ?? f.value, V = m ? T(b.value, c) : b.label ?? b.value;
290
+ const q = m ? x(f.value, c) : f.label ?? f.value, V = m ? x(b.value, c) : b.label ?? b.value;
271
291
  return `${q}`.startsWith("_") ? 1 : `${V}`.startsWith("_") ? -1 : `${q}`.localeCompare(`${V}`);
272
292
  }
273
293
  });
274
- }, P = (y, m) => {
294
+ }, M = (y, m) => {
275
295
  y.sort((f, b) => {
276
296
  const q = m?.indexOf(f.value) ?? -1, V = m?.indexOf(b.value) ?? -1;
277
297
  return q === V || q > -1 && V > -1 ? 0 : q > V ? -1 : 1;
278
298
  });
279
299
  };
280
- M(l), !t || t === "count" ? _(l) : t === "selected" && P(l, s);
300
+ j(l), !t || t === "count" ? _(l) : t === "selected" && M(l, s);
281
301
  const W = l.map((y) => this.renderUniqueValue(y));
282
- let x;
283
- return d && !p && (x = w`<div class="unique-values-content-list-msg">${r.errors.tooManyUniqueValues}</div>`), w`<div class="container"><calcite-list .label=${r.values} class="popover-unique-list" .filterEnabled=${l.length >= a} .selectionMode=${u ? "multiple" : "single"} .filterPlaceholder=${r.searchValues} @calciteListChange=${(y) => {
302
+ let U;
303
+ return d && !p && (U = F`<div class="unique-values-content-list-msg">${u.errors.tooManyUniqueValues}</div>`), F`<div class="container"><calcite-list .label=${u.values} class="popover-unique-list" .filterEnabled=${l.length >= a} .selectionMode=${r ? "multiple" : "single"} .filterPlaceholder=${u.searchValues} @calciteListChange=${(y) => {
284
304
  let m = y.currentTarget.selectedItems.map((f) => f.value);
285
- !c && n === "date-only" ? m = m?.map((f) => R(f)) : !c && n === "time-only" ? m = m?.map((f) => k(f)) : n && ["date", "oid", "small-integer", "big-integer", "integer", "long"].includes(n) ? m = m?.map((f) => Number.parseInt(f)) : n && ["single", "double"].includes(n) && (m = m?.map((f) => Number.parseFloat(f))), !this.isSameLists(m, this.selectedValues) && (this.selectedValues = m, this.arcgisChange.emit(m));
305
+ !c && n === "date-only" ? m = m?.map((f) => B(f)) : !c && n === "time-only" ? m = m?.map((f) => k(f)) : n && ["date", "oid", "small-integer", "big-integer", "integer", "long"].includes(n) ? m = m?.map((f) => Number.parseInt(f)) : n && ["single", "double"].includes(n) && (m = m?.map((f) => Number.parseFloat(f))), !this.isSameLists(m, this.selectedValues) && (this.selectedValues = m, this.arcgisChange.emit(m));
286
306
  }} @calciteListFilter=${() => {
287
307
  this.dropdownNode.value && (this.dropdownNode.value.disabled = this.listNode.filteredItems.length < 4);
288
- }} ${L(this.setListRef)}>${l.length >= a && !p ? this.renderSort(g, v) : null}${W}</calcite-list>${x}</div>`;
308
+ }} ${E(this.setListRef)}>${l.length >= a && !p ? this.renderSort(g, v) : null}${W}</calcite-list>${U}</div>`;
289
309
  },
290
310
  error: () => ""
291
311
  });
292
312
  }
293
313
  renderSort(e, s) {
294
- const { sortBy: t, _messages: u } = this;
295
- return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${L(this.dropdownNode)}><calcite-action slot=trigger .label=${u.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t === "count" || !h(t)} data-value=count>${u.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "name"} data-value=name>${e || s ? u.sortAscending : u.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "selected"} data-value=selected>${u.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
314
+ const { sortBy: t, _messages: r } = this;
315
+ return F`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${E(this.dropdownNode)}><calcite-action slot=trigger .label=${r.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t === "count" || !h(t)} data-value=count>${r.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "name"} data-value=name>${e || s ? r.sortAscending : r.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "selected"} data-value=selected>${r.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
296
316
  }
297
317
  renderUniqueValue(e) {
298
- const { selectedValues: s, initialRender: t, view: u, fieldInfo: p, numberFormatOptions: a } = this, { fieldDomains: r, uniqueValueInfos: c, simpleType: l } = p, d = u && "timeZone" in u && u.timeZone || "system", o = r?.length ? T(e.value, r) : l === "date" ? ne(e.value, d) : l === "date-only" ? oe(e.value) : l === "time-only" ? ae(e.value) : l === "timestamp-offset" ? le(e.value, u) : typeof e.value == "number" ? te(e.value, a) : e.label ?? e.value, n = s ? l === "date-only" ? s.includes(r?.length ? e.value : R(e.value)) : l === "time-only" ? s.includes(r?.length ? e.value : k(e.value)) : s.includes(e.value) : !1;
299
- return J(`list-item_${e.value}`, w`<calcite-list-item .label=${`${o}`} .value=${`${e.value}`} .selected=${n}>${h(e.count) && (c.length > 200 && !t || c.length <= 200) ? w`<div class="count" slot=actions-end>${`${e.count}`}</div>` : null}</calcite-list-item>`);
318
+ const { selectedValues: s, initialRender: t, view: r, fieldInfo: p, numberFormatOptions: a } = this, { fieldDomains: u, uniqueValueInfos: c, simpleType: l } = p, d = r && "timeZone" in r && r.timeZone || "system", o = u?.length ? x(e.value, u) : l === "date" ? oe(e.value, d) : l === "date-only" ? ae(e.value) : l === "time-only" ? le(e.value) : l === "timestamp-offset" ? re(e.value, r) : typeof e.value == "number" ? te(e.value, a) : e.label ?? e.value, n = s ? l === "date-only" ? s.includes(u?.length ? e.value : B(e.value)) : l === "time-only" ? s.includes(u?.length ? e.value : k(e.value)) : s.includes(e.value) : !1;
319
+ return G(`list-item_${e.value}`, F`<calcite-list-item .label=${`${o}`} .value=${`${e.value}`} .selected=${n}>${h(e.count) && (c.length > 200 && !t || c.length <= 200) ? F`<div class="count" slot=actions-end>${`${e.count}`}</div>` : null}</calcite-list-item>`);
300
320
  }
301
321
  }
302
- H("arcgis-unique-values-list", ue);
322
+ P("arcgis-unique-values-list", ce);
303
323
  export {
304
- ue as ArcgisUniqueValuesList
324
+ ce as ArcgisUniqueValuesList
305
325
  };