@arcgis/common-components 5.1.0-next.6 → 5.1.0-next.61

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 (70) hide show
  1. package/README.md +24 -1
  2. package/dist/cdn/{ZLXAKPUH.js → 3B5FXQSX.js} +1 -1
  3. package/dist/cdn/7AMLQYVM.js +4 -0
  4. package/dist/cdn/7JIHCVH3.js +2 -0
  5. package/dist/cdn/{4CW7U27R.js → 7OF5SF2A.js} +1 -1
  6. package/dist/cdn/{YVSTPEPS.js → ALWVIWUC.js} +1 -1
  7. package/dist/cdn/{C6JAR4IN.js → AQWVYBZF.js} +1 -1
  8. package/dist/cdn/{J5X5TNVW.js → DX3WIISQ.js} +1 -1
  9. package/dist/cdn/{7HQMPKZO.js → E4EVLDYS.js} +1 -1
  10. package/dist/cdn/{ZOWIFVL3.js → HEQCNDQR.js} +1 -1
  11. package/dist/cdn/{7CI55VCH.js → HYLC5GEB.js} +1 -1
  12. package/dist/cdn/{AXTSUI2Q.js → IQXW4J56.js} +1 -1
  13. package/dist/cdn/IRXTWEQW.js +2 -0
  14. package/dist/cdn/LYESES6I.js +2 -0
  15. package/dist/cdn/MB7UDGWW.js +2 -0
  16. package/dist/cdn/{3O7GAC23.js → N4R5SMWN.js} +1 -1
  17. package/dist/cdn/{4DCAUWTC.js → NHRIURQU.js} +1 -1
  18. package/dist/cdn/{7PB2GGQH.js → QH2547O7.js} +1 -1
  19. package/dist/cdn/QLSLMEU5.js +2 -0
  20. package/dist/cdn/{XEB2RUND.js → SF2NJOD3.js} +1 -1
  21. package/dist/cdn/{7Y42J3JI.js → YOEHJTF2.js} +1 -1
  22. package/dist/cdn/{23DDMSOB.js → ZCGHCFFN.js} +1 -1
  23. package/dist/cdn/index.js +1 -1
  24. package/dist/chunks/commonFunctions.js +7 -3
  25. package/dist/components/arcgis-ckeditor5/customElement.d.ts +1 -0
  26. package/dist/components/arcgis-ckeditor5/types.d.ts +9 -0
  27. package/dist/components/arcgis-ckeditor5-popover/customElement.d.ts +1 -0
  28. package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
  29. package/dist/components/arcgis-color-input/customElement.d.ts +1 -0
  30. package/dist/components/arcgis-field-info/customElement.d.ts +3 -2
  31. package/dist/components/arcgis-field-info/utils/basic.d.ts +21 -2
  32. package/dist/components/arcgis-field-pick-list/customElement.d.ts +4 -3
  33. package/dist/components/arcgis-field-pick-list/customElement.js +1 -1
  34. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +25 -3
  35. package/dist/components/arcgis-histogram/customElement.d.ts +21 -21
  36. package/dist/components/arcgis-histogram/customElement.js +81 -90
  37. package/dist/components/arcgis-histogram/types.d.ts +1 -3
  38. package/dist/components/arcgis-label-input/customElement.d.ts +6 -6
  39. package/dist/components/arcgis-label-input/customElement.js +22 -17
  40. package/dist/components/arcgis-picker-input/customElement.d.ts +1 -0
  41. package/dist/components/arcgis-picker-input/customElement.js +11 -11
  42. package/dist/components/arcgis-ramp-color/customElement.d.ts +2 -0
  43. package/dist/components/arcgis-ramp-color-break/customElement.d.ts +2 -0
  44. package/dist/components/arcgis-ramp-opacity/customElement.d.ts +1 -0
  45. package/dist/components/arcgis-slider/customElement.d.ts +53 -55
  46. package/dist/components/arcgis-slider/customElement.js +383 -343
  47. package/dist/components/arcgis-slider-input/customElement.d.ts +1 -0
  48. package/dist/components/arcgis-ticks/customElement.d.ts +17 -22
  49. package/dist/components/arcgis-ticks/customElement.js +1 -1
  50. package/dist/components/arcgis-ticks/types.d.ts +23 -0
  51. package/dist/components/arcgis-unique-values-list/customElement.d.ts +14 -5
  52. package/dist/components/arcgis-unique-values-list/customElement.js +158 -151
  53. package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +14 -2
  54. package/dist/docs/api.json +1 -1
  55. package/dist/docs/docs.json +1 -1
  56. package/dist/docs/vscode.html-custom-data.json +1 -1
  57. package/dist/docs/web-types.json +1 -1
  58. package/dist/loader.js +1 -1
  59. package/dist/types/lumina.d.ts +1 -1
  60. package/dist/types/preact.d.ts +1 -1
  61. package/dist/types/react.d.ts +1 -1
  62. package/dist/types/stencil.d.ts +1 -1
  63. package/dist/utils/types.d.ts +24 -7
  64. package/package.json +5 -5
  65. package/dist/cdn/2BDHDUXG.js +0 -2
  66. package/dist/cdn/57I35HLF.js +0 -2
  67. package/dist/cdn/6DQVLQL6.js +0 -2
  68. package/dist/cdn/EKKJN7WZ.js +0 -2
  69. package/dist/cdn/UTXWKXMT.js +0 -4
  70. package/dist/cdn/ZL3E4ZGE.js +0 -2
@@ -1,127 +1,127 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as M } from "../../chunks/runtime.js";
3
- import { css as P, html as q } from "lit";
4
- import { keyed as W } from "lit/directives/keyed.js";
5
- import { LitElement as z, createEvent as D } from "@arcgis/lumina";
2
+ import { c as _ } from "../../chunks/runtime.js";
3
+ import { css as M, html as S } from "lit";
4
+ import { keyed as P } from "lit/directives/keyed.js";
5
+ import { LitElement as W, createEvent as F } from "@arcgis/lumina";
6
6
  import { Task as H } from "@lit/task";
7
- import { createRef as j, ref as S } from "lit/directives/ref.js";
8
- import { log as V, composeMissingPropertyMessage as F } from "@arcgis/toolkit/log";
9
- import { formatDate as w, convertDateFormatToIntlOptions as v, formatDateOnly as G, formatTimeOnly as J, formatTimestamp as T, formatNumber as K } from "@arcgis/core/intl.js";
10
- import Q from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
11
- import { clone as N } from "@arcgis/core/core/lang.js";
12
- import { i as h } from "../../chunks/commonFunctions.js";
13
- import { u as X } from "../../chunks/useT9n.js";
14
- function x(i) {
7
+ import { createRef as G, ref as T } from "lit/directives/ref.js";
8
+ import { log as w, composeMissingPropertyMessage as N } from "@arcgis/toolkit/log";
9
+ import { formatDate as D, convertDateFormatToIntlOptions as b, formatDateOnly as J, formatTimeOnly as K, formatTimestamp as x, formatNumber as Q } from "@arcgis/core/intl.js";
10
+ import X from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
11
+ import { clone as I } from "@arcgis/core/core/lang.js";
12
+ import { g as Z, i as h } from "../../chunks/commonFunctions.js";
13
+ import { u as Y } from "../../chunks/useT9n.js";
14
+ function U(i) {
15
15
  return (/* @__PURE__ */ new Date(`1970-01-01T${i}Z`)).getTime();
16
16
  }
17
- function O(i) {
17
+ function L(i) {
18
18
  return (/* @__PURE__ */ new Date(`${i} 00:00:00`)).getTime();
19
19
  }
20
- function Y(i, e, t) {
21
- let o;
22
- return e === "unknown" ? o = w(i, {
23
- ...v("short-date-short-time"),
20
+ function ee(i, e, s) {
21
+ let t;
22
+ return e === "unknown" ? t = D(i, {
23
+ ...b("short-date-short-time"),
24
24
  timeZone: "utc",
25
25
  timeZoneName: "shortOffset"
26
- }) : o = w(i, {
27
- ...v("short-date-short-time"),
26
+ }) : t = D(i, {
27
+ ...b("short-date-short-time"),
28
28
  timeZone: e
29
- }), o;
30
- }
31
- function ee(i) {
32
- return i ? G(i, v("short-date")) : "";
29
+ }), t;
33
30
  }
34
31
  function te(i) {
32
+ return i ? J(i, b("short-date")) : "";
33
+ }
34
+ function ie(i) {
35
35
  let e;
36
- return typeof i == "string" ? e = J(i, v("short-date-long-time")) : e = w(i, {
37
- ...v("long-time"),
36
+ return typeof i == "string" ? e = K(i, b("short-date-long-time")) : e = D(i, {
37
+ ...b("long-time"),
38
38
  timeZone: "utc"
39
39
  }), e;
40
40
  }
41
- function ie(i, e) {
42
- return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ? T(i, {
43
- ...v("short-date-short-time"),
41
+ function se(i, e) {
42
+ return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ? x(i, {
43
+ ...b("short-date-short-time"),
44
44
  timeZone: "utc",
45
45
  timeZoneName: "shortOffset"
46
- }) : T(i, {
47
- ...v("short-date-short-time"),
46
+ }) : x(i, {
47
+ ...b("short-date-short-time"),
48
48
  timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
49
- }) : e && "timeZone" in e && e.timeZone === "unknown" ? w(i, {
50
- ...v("short-date-short-time"),
49
+ }) : e && "timeZone" in e && e.timeZone === "unknown" ? D(i, {
50
+ ...b("short-date-short-time"),
51
51
  timeZone: "utc",
52
52
  timeZoneName: "shortOffset"
53
- }) : w(i, {
54
- ...v("short-date-short-time"),
53
+ }) : D(i, {
54
+ ...b("short-date-short-time"),
55
55
  timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
56
56
  });
57
57
  }
58
- function U(i, e) {
58
+ function z(i, e, s) {
59
59
  if (i.type !== "feature" && i.type !== "subtype-group" && i.type !== "subtype-sublayer" && i.type !== "imagery")
60
60
  return;
61
61
  let t;
62
- return i.fields.forEach((o) => {
63
- const n = o.name, r = o.domain;
64
- if (i.type !== "imagery" && i.subtypeField === n) {
65
- let m;
66
- i.type === "subtype-group" || i.type === "feature" ? m = i.subtypes : m = i.parent.subtypes, m.forEach((u) => {
67
- i.type === "subtype-sublayer" && i.subtypeCode !== u.code || (e.name === n && (t = t || [], t.push({ code: u.code, name: u.name })), u.domains && Object.keys(u.domains).forEach((l) => {
68
- if (e.name === l) {
69
- const s = u.domains[l];
70
- s?.type === "coded-value" && s?.codedValues && s.codedValues.forEach((a) => {
71
- let p = !1;
72
- t = t || [], t.forEach((d) => {
73
- d.code === a.code && (p = !0, `| ${d.name} |`.includes(`| ${a.name} |`) || (d.name += ` | ${a.name}`));
74
- }), p || t.push({ code: a.code, name: a.name });
62
+ return Z(i, s).fields.forEach((p) => {
63
+ const a = p.name, r = "domain" in p ? p.domain : void 0;
64
+ if (i.type !== "imagery" && i.subtypeField === a) {
65
+ let c;
66
+ i.type === "subtype-group" || i.type === "feature" ? c = i.subtypes : c = i.parent.subtypes, c.forEach((l) => {
67
+ i.type === "subtype-sublayer" && 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
+ if (e.name === d) {
69
+ const o = l.domains[d];
70
+ o?.type === "coded-value" && o?.codedValues && o.codedValues.forEach((n) => {
71
+ let g = !1;
72
+ t = t || [], t.forEach((v) => {
73
+ v.code === n.code && (g = !0, `| ${v.name} |`.includes(`| ${n.name} |`) || (v.name += ` | ${n.name}`));
74
+ }), g || t.push({ code: n.code, name: n.name });
75
75
  });
76
76
  }
77
77
  }));
78
78
  });
79
79
  }
80
- if (e.name === n && (i.type === "feature" || i.type === "imagery")) {
81
- const m = i.type === "feature" ? i.typeIdField : void 0, u = i.type === "feature" ? i.types : void 0;
82
- i.type === "feature" && m && u ? (m === n ? t = u.map(
83
- (l) => (
80
+ if (e.name === a && (i.type === "feature" || i.type === "imagery")) {
81
+ const c = i.type === "feature" ? i.typeIdField : void 0, l = i.type === "feature" ? i.types : void 0;
82
+ i.type === "feature" && c && l ? (c === a ? t = l.map(
83
+ (d) => (
84
84
  // fake coded Values
85
85
  {
86
- code: l.id,
87
- name: l.name
86
+ code: d.id,
87
+ name: d.name
88
88
  }
89
89
  )
90
- ) : (t = t || [], u.forEach((l) => {
91
- if (!l.domains?.[n] || l.domains[n].type === "inherited") {
92
- const s = r;
93
- s?.codedValues && s.codedValues.forEach((a) => {
94
- let p = !1;
95
- t.forEach((d) => {
96
- d.code === a.code && (p = !0, `| ${d.name} |`.includes(`| ${a.name} |`) || (d.name += ` | ${a.name}`));
97
- }), p || t.push(N(a));
90
+ ) : (t = t || [], l.forEach((d) => {
91
+ if (!d.domains?.[a] || d.domains[a].type === "inherited") {
92
+ const o = r;
93
+ o?.codedValues && o.codedValues.forEach((n) => {
94
+ let g = !1;
95
+ t.forEach((v) => {
96
+ v.code === n.code && (g = !0, `| ${v.name} |`.includes(`| ${n.name} |`) || (v.name += ` | ${n.name}`));
97
+ }), g || t.push(I(n));
98
98
  });
99
- } else l.domains?.[n]?.codedValues && l.domains[n].codedValues.forEach((s) => {
100
- let a = !1;
101
- t.forEach((p) => {
102
- p.code === s.code && (a = !0, `| ${p.name} |`.includes(`| ${s.name} |`) || (p.name += ` | ${s.name}`));
103
- }), a || t.push(N(s));
99
+ } else d.domains?.[a]?.codedValues && d.domains[a].codedValues.forEach((o) => {
100
+ let n = !1;
101
+ t.forEach((g) => {
102
+ g.code === o.code && (n = !0, `| ${g.name} |`.includes(`| ${o.name} |`) || (g.name += ` | ${o.name}`));
103
+ }), n || t.push(I(o));
104
104
  });
105
- })), !t?.length && r?.codedValues && (t = N(r.codedValues))) : r?.codedValues && (t = r.codedValues);
105
+ })), !t?.length && r?.codedValues && (t = I(r.codedValues))) : r?.codedValues && (t = r.codedValues);
106
106
  }
107
107
  }), t;
108
108
  }
109
- function I(i, e) {
110
- const t = e;
111
- if (t) {
112
- let o = "";
113
- for (let n = 0; n < t.length; n++) {
114
- const r = t[n];
115
- r.code == i && (o += (o.length ? " | " : "") + r.name);
109
+ function O(i, e) {
110
+ const s = e;
111
+ if (s) {
112
+ let t = "";
113
+ for (let u = 0; u < s.length; u++) {
114
+ const p = s[u];
115
+ p.code == i && (t += (t.length ? " | " : "") + p.name);
116
116
  }
117
- return o.length || (o = `${i}`), o;
117
+ return t.length || (t = `${i}`), t;
118
118
  }
119
119
  return i;
120
120
  }
121
- function L(i) {
121
+ function B(i) {
122
122
  return ["small-integer", "big-integer", "integer", "single", "double", "long"].includes(i.type);
123
123
  }
124
- function B(i) {
124
+ function R(i) {
125
125
  switch (i.type) {
126
126
  case "small-integer":
127
127
  case "big-integer":
@@ -142,26 +142,33 @@ function B(i) {
142
142
  return i.type;
143
143
  }
144
144
  }
145
- const se = P`: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}`;
146
- class ne extends z {
145
+ const ne = M`: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}`;
146
+ class oe extends W {
147
147
  constructor() {
148
- super(...arguments), this.dropdownNode = j(), this._messages = X({ blocking: !0 }), this._propWatcherTask = new H(this, {
149
- task: async ([e, t, o]) => {
150
- const n = h(e) && h(t) || h(o);
151
- if (!h(o) && !h(e) && !h(t) ? V("error", this, F("uniqueValues")) : h(o) || (h(e) || V("error", this, F("layer")), h(t) || V("error", this, F("fieldName"))), h(e) && h(t) && !e.fields?.filter((m) => m.name === t))
152
- throw V("error", this, "Field could not be found."), new Error();
153
- if (!n)
148
+ super(...arguments), this.dropdownNode = G(), this._messages = Y({ blocking: !0 }), this._propWatcherTask = new H(this, {
149
+ task: async ([e, s, t]) => {
150
+ const u = h(e) && h(s) || h(t);
151
+ if (!h(t) && !h(e) && !h(s) ? w("error", this, N("uniqueValues")) : h(t) || (h(e) || w("error", this, N("layer")), h(s) || w("error", this, N("fieldName"))), h(e) && h(s)) {
152
+ const { visualizationSource: p } = this;
153
+ if (!Z(e, p).fields?.filter((c) => c.name === s))
154
+ throw w("error", this, "Field could not be found."), new Error();
155
+ }
156
+ if (!u)
154
157
  throw new Error();
155
158
  await this.processProps();
156
159
  },
157
- args: () => [this.layer, this.fieldName, this.uniqueValues]
158
- }), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange = D(), this.arcgisSortByChange = D(), this.arcgisLoad = D();
160
+ args: () => [
161
+ this.layer,
162
+ this.fieldName,
163
+ this.uniqueValues
164
+ ]
165
+ }), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange = F(), this.arcgisSortByChange = F(), this.arcgisLoad = F();
159
166
  }
160
167
  static {
161
- this.properties = { initialRender: 16, view: 0, layer: 0, fieldName: 1, uniqueValues: 0, numberFormatOptions: 0, selectedValues: 0, sortBy: 1, multiple: 5, partialUniqueValues: 5, showFilterLength: 9, maxHeight: 9 };
168
+ 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 };
162
169
  }
163
170
  static {
164
- this.styles = se;
171
+ this.styles = ne;
165
172
  }
166
173
  async setFocus() {
167
174
  this.listNode?.setFocus();
@@ -169,51 +176,51 @@ class ne extends z {
169
176
  async getUniqueValues() {
170
177
  const { fieldInfo: e } = this;
171
178
  if (h(e?.uniqueValueInfos)) {
172
- const { uniqueValueInfos: t, partialUniqueValues: o } = e;
173
- return { uniqueValues: t, partialUniqueValues: o };
179
+ const { uniqueValueInfos: s, partialUniqueValues: t } = e;
180
+ return { uniqueValues: s, partialUniqueValues: t };
174
181
  }
175
182
  }
176
183
  loaded() {
177
184
  this.layer && this.fieldInfo && (setTimeout(() => this.initialRender = !1, 800), this.listNode?.setFocus());
178
185
  }
179
186
  async processProps() {
180
- const { layer: e, fieldName: t, view: o } = this, n = e?.fields?.filter((r) => r.name === t)?.[0];
187
+ const { layer: e, fieldName: s, view: t, visualizationSource: u } = this, a = (e ? Z(e, u) : void 0)?.fields?.filter((r) => r.name === s)?.[0];
181
188
  if (h(this.uniqueValues))
182
189
  this.fieldInfo = {
183
- layerField: n,
184
- fieldDomains: e && n ? U(e, n) : void 0,
185
- simpleType: e && n ? B(n) : void 0,
190
+ layerField: a,
191
+ fieldDomains: e && a ? z(e, a, u) : void 0,
192
+ simpleType: e && a ? R(a) : void 0,
186
193
  partialUniqueValues: this.partialUniqueValues ?? !1,
187
194
  uniqueValueInfos: this.uniqueValues
188
195
  }, this.arcgisLoad.emit();
189
- else if (e && n) {
196
+ else if (e && a) {
190
197
  this.fieldInfo = {
191
- layerField: n,
192
- fieldDomains: U(e, n),
193
- simpleType: B(n),
198
+ layerField: a,
199
+ fieldDomains: z(e, a, u),
200
+ simpleType: R(a),
194
201
  partialUniqueValues: !1
195
202
  };
196
203
  const { fieldInfo: r } = this;
197
204
  try {
198
- const m = await Q({
205
+ const c = await X({
199
206
  layer: e,
200
- view: o,
201
- field: t,
207
+ view: t,
208
+ field: s,
202
209
  sqlWhere: "definitionExpression" in e ? e.definitionExpression ?? void 0 : void 0,
203
210
  forBinning: !1
204
- }), u = L(n), l = m.uniqueValueInfos.filter((s) => h(s.value) ? n.type === "string" && !u || n.type === "guid" ? s.value !== "<Null>" && `${s.value}`.trim() !== "" : (L(n) || n.type === "oid" || u, s.value !== "<Null>" && s.value !== "") : !1);
205
- l.sort((s, a) => s.count > a.count ? -1 : s.count < a.count ? 1 : 0), r.fieldDomains?.length && r.fieldDomains.forEach((s) => {
206
- l.find((a) => a.value === s.code) || l.push({
207
- value: s.code,
211
+ }), l = B(a), d = c.uniqueValueInfos.filter((o) => h(o.value) ? a.type === "string" && !l || a.type === "guid" ? o.value !== "<Null>" && `${o.value}`.trim() !== "" : (B(a) || a.type === "oid" || l, o.value !== "<Null>" && o.value !== "") : !1);
212
+ d.sort((o, n) => o.count > n.count ? -1 : o.count < n.count ? 1 : 0), r.fieldDomains?.length && r.fieldDomains.forEach((o) => {
213
+ d.find((n) => n.value === o.code) || d.push({
214
+ value: o.code,
208
215
  count: 0
209
216
  });
210
- }), r.uniqueValueInfos = l, r.partialUniqueValues = m.uniqueValueInfos.length === 2e3, this.arcgisLoad.emit();
211
- } catch (m) {
212
- if (V("error", this, `uniqueValues() - ${m.message}`), this.hasFieldDomains(r)) {
213
- const l = [];
214
- r.fieldDomains.forEach((s) => {
215
- l.find((a) => a.value === s.code) || l.push({
216
- value: s.code,
217
+ }), r.uniqueValueInfos = d, r.partialUniqueValues = c.uniqueValueInfos.length === 2e3, this.arcgisLoad.emit();
218
+ } catch (c) {
219
+ if (w("error", this, `uniqueValues() - ${c.message}`), this.hasFieldDomains(r)) {
220
+ const d = [];
221
+ r.fieldDomains.forEach((o) => {
222
+ d.find((n) => n.value === o.code) || d.push({
223
+ value: o.code,
217
224
  count: void 0
218
225
  });
219
226
  });
@@ -225,20 +232,20 @@ class ne extends z {
225
232
  }
226
233
  }
227
234
  setListRef(e) {
228
- const { maxHeight: t } = this;
229
- this.listNode = e, t && e?.setAttribute("style", `max-height: ${t || 400}px`);
235
+ const { maxHeight: s } = this;
236
+ this.listNode = e, s && e?.setAttribute("style", `max-height: ${s || 400}px`);
230
237
  }
231
238
  onSortMenuSelect(e) {
232
- const o = e.currentTarget.selectedItems?.[0].getAttribute("data-value");
233
- this.sortBy = o || void 0, this.arcgisSortByChange.emit(o || void 0);
239
+ const t = e.currentTarget.selectedItems?.[0].getAttribute("data-value");
240
+ this.sortBy = t || void 0, this.arcgisSortByChange.emit(t || void 0);
234
241
  }
235
- isSameLists(e, t) {
236
- if (!e && !t)
242
+ isSameLists(e, s) {
243
+ if (!e && !s)
237
244
  return !0;
238
- if (!e || !t || e?.length !== t?.length)
245
+ if (!e || !s || e?.length !== s?.length)
239
246
  return !1;
240
- for (let o = 0; o < e.length; o++)
241
- if (e[o] !== t[o])
247
+ for (let t = 0; t < e.length; t++)
248
+ if (e[t] !== s[t])
242
249
  return !1;
243
250
  return !0;
244
251
  }
@@ -248,50 +255,50 @@ class ne extends z {
248
255
  render() {
249
256
  return this._propWatcherTask.render({
250
257
  complete: () => {
251
- const { fieldInfo: e, selectedValues: t, sortBy: o, multiple: n, initialRender: r, showFilterLength: m, _messages: u } = this, { fieldDomains: l, uniqueValueInfos: s, partialUniqueValues: a, layerField: p } = e, d = p?.type;
252
- if (!s?.length)
258
+ 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;
259
+ if (!l?.length)
253
260
  return "";
254
- const Z = d ? ["small-integer", "big-integer", "integer", "single", "double", "long", "oid"].includes(d) : !1, R = d ? ["date", "date-only", "time-only"].includes(d) : !1, k = (g) => {
255
- g.sort((y, c) => y.count <= c.count ? 1 : -1);
256
- }, A = (g) => {
257
- const y = l?.length;
258
- g.sort((c, f) => {
259
- if (!y && Z)
260
- return (typeof c.value == "string" ? Number.parseFloat(c.value) : c.value) - (typeof f.value == "string" ? Number.parseFloat(f.value) : f.value);
261
+ 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, k = (y) => {
262
+ y.sort(($, m) => $.count <= m.count ? 1 : -1);
263
+ }, A = (y) => {
264
+ const $ = c?.length;
265
+ y.sort((m, f) => {
266
+ if (!$ && g)
267
+ return (typeof m.value == "string" ? Number.parseFloat(m.value) : m.value) - (typeof f.value == "string" ? Number.parseFloat(f.value) : f.value);
261
268
  {
262
- const $ = y ? I(c.value, l) : c.value, b = y ? I(f.value, l) : f.value;
263
- return `${$}`.startsWith("_") ? 1 : `${b}`.startsWith("_") ? -1 : `${$}`.localeCompare(`${b}`);
269
+ const q = $ ? O(m.value, c) : m.label ?? m.value, V = $ ? O(f.value, c) : f.label ?? f.value;
270
+ return `${q}`.startsWith("_") ? 1 : `${V}`.startsWith("_") ? -1 : `${q}`.localeCompare(`${V}`);
264
271
  }
265
272
  });
266
- }, C = (g, y) => {
267
- g.sort((c, f) => {
268
- const $ = y?.indexOf(c.value) ?? -1, b = y?.indexOf(f.value) ?? -1;
269
- return $ === b || $ > -1 && b > -1 ? 0 : $ > b ? -1 : 1;
273
+ }, C = (y, $) => {
274
+ y.sort((m, f) => {
275
+ const q = $?.indexOf(m.value) ?? -1, V = $?.indexOf(f.value) ?? -1;
276
+ return q === V || q > -1 && V > -1 ? 0 : q > V ? -1 : 1;
270
277
  });
271
278
  };
272
- A(s), !o || o === "count" ? k(s) : o === "selected" && C(s, t);
273
- const _ = s.map((g) => this.renderUniqueValue(g));
279
+ A(l), !t || t === "count" ? k(l) : t === "selected" && C(l, s);
280
+ const j = l.map((y) => this.renderUniqueValue(y));
274
281
  let E;
275
- return a && !r && (E = q`<div class="unique-values-content-list-msg">${u.errors.tooManyUniqueValues}</div>`), q`<div class="container"><calcite-list .label=${u.values} class="popover-unique-list" .filterEnabled=${s.length >= m} .selectionMode=${n ? "multiple" : "single"} .filterPlaceholder=${u.searchValues} @calciteListChange=${(g) => {
276
- let c = g.target.selectedItems.map((f) => f.value);
277
- !l && d === "date-only" ? c = c?.map((f) => O(f)) : !l && d === "time-only" ? c = c?.map((f) => x(f)) : d && ["date", "oid", "small-integer", "big-integer", "integer", "long"].includes(d) ? c = c?.map((f) => Number.parseInt(f)) : d && ["single", "double"].includes(d) && (c = c?.map((f) => Number.parseFloat(f))), !this.isSameLists(c, this.selectedValues) && (this.selectedValues = c, this.arcgisChange.emit(c));
282
+ return d && !p && (E = S`<div class="unique-values-content-list-msg">${r.errors.tooManyUniqueValues}</div>`), S`<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) => {
283
+ let m = y.target.selectedItems.map((f) => f.value);
284
+ !c && n === "date-only" ? m = m?.map((f) => L(f)) : !c && n === "time-only" ? m = m?.map((f) => U(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));
278
285
  }} @calciteListFilter=${() => {
279
286
  this.dropdownNode.value && (this.dropdownNode.value.disabled = this.listNode.filteredItems.length < 4);
280
- }} ${S(this.setListRef)}>${s.length >= m && !r ? this.renderSort(Z, R) : null}${_}</calcite-list>${E}</div>`;
287
+ }} ${T(this.setListRef)}>${l.length >= a && !p ? this.renderSort(g, v) : null}${j}</calcite-list>${E}</div>`;
281
288
  },
282
289
  error: () => ""
283
290
  });
284
291
  }
285
- renderSort(e, t) {
286
- const { sortBy: o, _messages: n } = this;
287
- return q`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${S(this.dropdownNode)}><calcite-action slot=trigger .label=${n.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${o === "count" || !h(o)} data-value=count>${n.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${o === "name"} data-value=name>${e || t ? n.sortAscending : n.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${o === "selected"} data-value=selected>${n.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
292
+ renderSort(e, s) {
293
+ const { sortBy: t, _messages: u } = this;
294
+ return S`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${T(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>`;
288
295
  }
289
296
  renderUniqueValue(e) {
290
- const { selectedValues: t, initialRender: o, view: n, fieldInfo: r, numberFormatOptions: m } = this, { fieldDomains: u, uniqueValueInfos: l, simpleType: s } = r, a = n && "timeZone" in n && n.timeZone || "system", p = u?.length ? I(e.value, u) : s === "date" ? Y(e.value, a) : s === "date-only" ? ee(e.value) : s === "time-only" ? te(e.value) : s === "timestamp-offset" ? ie(e.value, n) : typeof e.value == "number" ? K(e.value, m) : e.value, d = t ? s === "date-only" ? t.includes(u?.length ? e.value : O(e.value)) : s === "time-only" ? t.includes(u?.length ? e.value : x(e.value)) : t.includes(e.value) : !1;
291
- return W(`list-item_${e.value}`, q`<calcite-list-item .label=${`${p}`} .value=${`${e.value}`} .selected=${d}>${h(e.count) && (l.length > 200 && !o || l.length <= 200) ? q`<div class="count" slot=actions-end>${`${e.count}`}</div>` : null}</calcite-list-item>`);
297
+ 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 ? O(e.value, r) : l === "date" ? ee(e.value, d) : l === "date-only" ? te(e.value) : l === "time-only" ? ie(e.value) : l === "timestamp-offset" ? se(e.value, u) : typeof e.value == "number" ? Q(e.value, a) : e.label ?? e.value, n = s ? l === "date-only" ? s.includes(r?.length ? e.value : L(e.value)) : l === "time-only" ? s.includes(r?.length ? e.value : U(e.value)) : s.includes(e.value) : !1;
298
+ return P(`list-item_${e.value}`, S`<calcite-list-item .label=${`${o}`} .value=${`${e.value}`} .selected=${n}>${h(e.count) && (c.length > 200 && !t || c.length <= 200) ? S`<div class="count" slot=actions-end>${`${e.count}`}</div>` : null}</calcite-list-item>`);
292
299
  }
293
300
  }
294
- M("arcgis-unique-values-list", ne);
301
+ _("arcgis-unique-values-list", oe);
295
302
  export {
296
- ne as ArcgisUniqueValuesList
303
+ oe as ArcgisUniqueValuesList
297
304
  };
@@ -1,3 +1,15 @@
1
- /// <reference types="@arcgis/core/interfaces.d.ts" />
1
+ import type WFSLayer from "@arcgis/core/layers/WFSLayer.js";
2
+ import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer.js";
3
+ import type SubtypeGroupLayer from "@arcgis/core/layers/SubtypeGroupLayer.js";
4
+ import type StreamLayer from "@arcgis/core/layers/StreamLayer.js";
5
+ import type OrientedImageryLayer from "@arcgis/core/layers/OrientedImageryLayer.js";
6
+ import type KnowledgeGraphSublayer from "@arcgis/core/layers/knowledgeGraph/KnowledgeGraphSublayer.js";
7
+ import type ImageryLayer from "@arcgis/core/layers/ImageryLayer.js";
8
+ import type GeoJSONLayer from "@arcgis/core/layers/GeoJSONLayer.js";
9
+ import type FeatureLayer from "@arcgis/core/layers/FeatureLayer.js";
10
+ import type CSVLayer from "@arcgis/core/layers/CSVLayer.js";
11
+ import type CatalogLayer from "@arcgis/core/layers/CatalogLayer.js";
12
+ import type CatalogFootprintLayer from "@arcgis/core/layers/catalog/CatalogFootprintLayer.js";
2
13
 
3
- export type SupportedLayer = __esri.CatalogFootprintLayer | __esri.CatalogLayer | __esri.CSVLayer | __esri.FeatureLayer | __esri.GeoJSONLayer | __esri.ImageryLayer | __esri.KnowledgeGraphSublayer | __esri.OrientedImageryLayer | __esri.StreamLayer | __esri.SubtypeGroupLayer | __esri.SubtypeSublayer | __esri.WFSLayer;
14
+ /** @internal */
15
+ export type SupportedLayer = CatalogFootprintLayer | CatalogLayer | CSVLayer | FeatureLayer | GeoJSONLayer | ImageryLayer | KnowledgeGraphSublayer | OrientedImageryLayer | StreamLayer | SubtypeGroupLayer | SubtypeSublayer | WFSLayer;