@arcgis/common-components 5.2.0-next.66 → 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.
- package/dist/cdn/2C7SVAMP.js +2 -0
- package/dist/cdn/5WGBTOWN.js +2 -0
- package/dist/cdn/ETMH4DV6.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-color-input/customElement.d.ts +2 -1
- package/dist/components/arcgis-field-info/customElement.js +1 -3
- package/dist/components/arcgis-field-pick-list/customElement.js +23 -23
- package/dist/components/arcgis-unique-values-list/customElement.js +99 -79
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +3 -3
- package/dist/cdn/2NC4IS67.js +0 -2
- package/dist/cdn/7NUOY4MH.js +0 -2
- package/dist/cdn/TJOSKSQ7.js +0 -2
|
@@ -1,71 +1,72 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { createRef as X, ref as
|
|
8
|
-
import { log as
|
|
9
|
-
import { formatDate as
|
|
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
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
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
|
|
19
|
+
function B(i) {
|
|
19
20
|
return (/* @__PURE__ */ new Date(`${i} 00:00:00`)).getTime();
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function oe(i, e, s) {
|
|
22
23
|
let t;
|
|
23
|
-
return e === "unknown" ? t =
|
|
24
|
+
return e === "unknown" ? t = D(i, {
|
|
24
25
|
...$("short-date-short-time"),
|
|
25
26
|
timeZone: "utc",
|
|
26
27
|
timeZoneName: "shortOffset"
|
|
27
|
-
}) : t =
|
|
28
|
+
}) : t = D(i, {
|
|
28
29
|
...$("short-date-short-time"),
|
|
29
30
|
timeZone: e
|
|
30
31
|
}), t;
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function ae(i) {
|
|
33
34
|
return i ? Y(i, $("short-date")) : "";
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function le(i) {
|
|
36
37
|
let e;
|
|
37
|
-
return typeof i == "string" ? e = ee(i, $("short-date-long-time")) : e =
|
|
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
|
|
43
|
-
return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ?
|
|
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
|
-
}) :
|
|
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" ?
|
|
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
|
-
}) :
|
|
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
|
|
60
|
-
if (!
|
|
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
|
|
64
|
-
const a = p.name,
|
|
65
|
-
if (!
|
|
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
|
-
|
|
68
|
-
|
|
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 && (
|
|
82
|
-
const c =
|
|
83
|
-
|
|
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 =
|
|
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(
|
|
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(
|
|
105
|
+
}), n || t.push(I(o));
|
|
105
106
|
});
|
|
106
|
-
})), !t?.length &&
|
|
107
|
+
})), !t?.length && u?.codedValues && (t = I(u.codedValues))) : u?.codedValues && (t = u.codedValues);
|
|
107
108
|
}
|
|
108
109
|
}), t;
|
|
109
110
|
}
|
|
110
|
-
function
|
|
111
|
+
function x(i, e) {
|
|
111
112
|
const s = e;
|
|
112
113
|
if (s) {
|
|
113
114
|
let t = "";
|
|
114
|
-
for (let
|
|
115
|
-
const p = s[
|
|
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
|
|
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
|
|
147
|
-
class
|
|
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 =
|
|
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
|
|
152
|
-
if (!h(t) && !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 (!
|
|
155
|
-
throw
|
|
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 (!
|
|
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 =
|
|
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 =
|
|
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:
|
|
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 ?
|
|
193
|
-
simpleType: e && a ?
|
|
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:
|
|
201
|
-
simpleType:
|
|
214
|
+
fieldDomains: R(e, a, r),
|
|
215
|
+
simpleType: H(a),
|
|
202
216
|
partialUniqueValues: !1
|
|
203
217
|
};
|
|
204
|
-
const { fieldInfo:
|
|
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:
|
|
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),
|
|
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
|
-
}),
|
|
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 (
|
|
234
|
+
if (S("error", this, `uniqueValues() - ${c.message}`), this.hasFieldDomains(u)) {
|
|
221
235
|
const d = [];
|
|
222
|
-
|
|
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:
|
|
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
|
-
},
|
|
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 ?
|
|
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
|
-
},
|
|
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
|
-
|
|
300
|
+
j(l), !t || t === "count" ? _(l) : t === "selected" && M(l, s);
|
|
281
301
|
const W = l.map((y) => this.renderUniqueValue(y));
|
|
282
|
-
let
|
|
283
|
-
return d && !p && (
|
|
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) =>
|
|
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
|
-
}} ${
|
|
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:
|
|
295
|
-
return
|
|
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:
|
|
299
|
-
return
|
|
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
|
-
|
|
322
|
+
P("arcgis-unique-values-list", ce);
|
|
303
323
|
export {
|
|
304
|
-
|
|
324
|
+
ce as ArcgisUniqueValuesList
|
|
305
325
|
};
|