@arcgis/common-components 5.1.0-next.103 → 5.1.0-next.105
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/BYGHEIBE.js +2 -0
- package/dist/cdn/SII4OH3Z.js +2 -0
- package/dist/cdn/VLR56OSS.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/layer-utils.js +70 -0
- package/dist/components/arcgis-field-info/customElement.js +168 -167
- package/dist/components/arcgis-field-info/utils/basic.d.ts +10 -20
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +4 -18
- package/dist/components/arcgis-unique-values-list/customElement.js +73 -72
- package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +9 -13
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +3 -3
- package/dist/cdn/5KIT22UZ.js +0 -2
- package/dist/cdn/UQQWSK4Z.js +0 -2
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import type SceneLayer from "@arcgis/core/layers/SceneLayer.js";
|
|
2
|
-
import type OGCFeatureLayer from "@arcgis/core/layers/OGCFeatureLayer.js";
|
|
3
|
-
import type FeatureLayer from "@arcgis/core/layers/FeatureLayer.js";
|
|
4
|
-
import type WFSLayer from "@arcgis/core/layers/WFSLayer.js";
|
|
5
|
-
import type WCSLayer from "@arcgis/core/layers/WCSLayer.js";
|
|
6
|
-
import type VoxelLayer from "@arcgis/core/layers/VoxelLayer.js";
|
|
7
|
-
import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer.js";
|
|
8
|
-
import type SubtypeGroupLayer from "@arcgis/core/layers/SubtypeGroupLayer.js";
|
|
9
1
|
import type Sublayer from "@arcgis/core/layers/support/Sublayer.js";
|
|
10
|
-
import type
|
|
11
|
-
import type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import type CatalogFootprintLayer from "@arcgis/core/layers/catalog/CatalogFootprintLayer.js";
|
|
2
|
+
import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer.js";
|
|
3
|
+
import type Layer from "@arcgis/core/layers/Layer.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* All supported layer types
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export type FieldInfoLayer = Sublayer | SubtypeSublayer | (Layer & { type: FieldInfoLayerTypes; });
|
|
20
11
|
|
|
21
|
-
|
|
22
|
-
export type FieldInfoLayer = CatalogFootprintLayer | CatalogLayer | CSVLayer | FeatureLayer | GeoJSONLayer | ImageryLayer | ImageryTileLayer | KnowledgeGraphSublayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | SceneLayer | StreamLayer | Sublayer | SubtypeGroupLayer | SubtypeSublayer | VoxelLayer | WCSLayer | WFSLayer;
|
|
12
|
+
export type FieldInfoLayerTypes = "catalog-footprint" | "catalog" | "csv" | "feature" | "geojson" | "imagery-tile" | "imagery" | "knowledge-graph-sublayer" | "ogc-feature" | "oriented-imagery" | "parquet" | "scene" | "stream" | "subtype-group" | "voxel" | "wcs" | "wfs";
|
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type WCSLayer from "@arcgis/core/layers/WCSLayer.js";
|
|
3
|
-
import type VoxelLayer from "@arcgis/core/layers/VoxelLayer.js";
|
|
1
|
+
import type Layer from "@arcgis/core/layers/Layer.js";
|
|
4
2
|
import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer.js";
|
|
5
|
-
import type SubtypeGroupLayer from "@arcgis/core/layers/SubtypeGroupLayer.js";
|
|
6
3
|
import type Sublayer from "@arcgis/core/layers/support/Sublayer.js";
|
|
7
|
-
import type StreamLayer from "@arcgis/core/layers/StreamLayer.js";
|
|
8
|
-
import type SceneLayer from "@arcgis/core/layers/SceneLayer.js";
|
|
9
|
-
import type ParquetLayer from "@arcgis/core/layers/ParquetLayer.js";
|
|
10
|
-
import type OrientedImageryLayer from "@arcgis/core/layers/OrientedImageryLayer.js";
|
|
11
|
-
import type OGCFeatureLayer from "@arcgis/core/layers/OGCFeatureLayer.js";
|
|
12
|
-
import type KnowledgeGraphSublayer from "@arcgis/core/layers/knowledgeGraph/KnowledgeGraphSublayer.js";
|
|
13
|
-
import type ImageryTileLayer from "@arcgis/core/layers/ImageryTileLayer.js";
|
|
14
|
-
import type ImageryLayer from "@arcgis/core/layers/ImageryLayer.js";
|
|
15
|
-
import type GeoJSONLayer from "@arcgis/core/layers/GeoJSONLayer.js";
|
|
16
|
-
import type FeatureLayer from "@arcgis/core/layers/FeatureLayer.js";
|
|
17
|
-
import type CSVLayer from "@arcgis/core/layers/CSVLayer.js";
|
|
18
|
-
import type CatalogLayer from "@arcgis/core/layers/CatalogLayer.js";
|
|
19
|
-
import type CatalogFootprintLayer from "@arcgis/core/layers/catalog/CatalogFootprintLayer.js";
|
|
20
4
|
|
|
21
5
|
/**
|
|
22
6
|
* All supported layer types
|
|
23
7
|
*
|
|
24
8
|
* @internal
|
|
25
9
|
*/
|
|
26
|
-
export type FieldPickListLayer =
|
|
10
|
+
export type FieldPickListLayer = Sublayer | SubtypeSublayer | (Layer & { type: FieldPickListLayerTypes; });
|
|
11
|
+
|
|
12
|
+
export type FieldPickListLayerTypes = "catalog-footprint" | "catalog" | "csv" | "feature" | "geojson" | "imagery-tile" | "imagery" | "knowledge-graph-sublayer" | "ogc-feature" | "oriented-imagery" | "parquet" | "scene" | "stream" | "subtype-group" | "voxel" | "wcs" | "wfs";
|
|
@@ -1,70 +1,71 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { keyed as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { Task as
|
|
7
|
-
import { createRef as
|
|
8
|
-
import { log as
|
|
9
|
-
import { formatDate as
|
|
10
|
-
import
|
|
11
|
-
import { clone as
|
|
12
|
-
import { g as
|
|
13
|
-
import {
|
|
14
|
-
|
|
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 b, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as U, formatNumber as te } from "@arcgis/core/intl.js";
|
|
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 T, i as h } from "../../chunks/commonFunctions.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";
|
|
15
|
+
function k(i) {
|
|
15
16
|
return (/* @__PURE__ */ new Date(`1970-01-01T${i}Z`)).getTime();
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function R(i) {
|
|
18
19
|
return (/* @__PURE__ */ new Date(`${i} 00:00:00`)).getTime();
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function ne(i, e, s) {
|
|
21
22
|
let t;
|
|
22
|
-
return e === "unknown" ? t =
|
|
23
|
+
return e === "unknown" ? t = F(i, {
|
|
23
24
|
...b("short-date-short-time"),
|
|
24
25
|
timeZone: "utc",
|
|
25
26
|
timeZoneName: "shortOffset"
|
|
26
|
-
}) : t =
|
|
27
|
+
}) : t = F(i, {
|
|
27
28
|
...b("short-date-short-time"),
|
|
28
29
|
timeZone: e
|
|
29
30
|
}), t;
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
return i ?
|
|
32
|
+
function oe(i) {
|
|
33
|
+
return i ? Y(i, b("short-date")) : "";
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function ae(i) {
|
|
35
36
|
let e;
|
|
36
|
-
return typeof i == "string" ? e =
|
|
37
|
+
return typeof i == "string" ? e = ee(i, b("short-date-long-time")) : e = F(i, {
|
|
37
38
|
...b("long-time"),
|
|
38
39
|
timeZone: "utc"
|
|
39
40
|
}), e;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ?
|
|
42
|
+
function le(i, e) {
|
|
43
|
+
return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ? U(i, {
|
|
43
44
|
...b("short-date-short-time"),
|
|
44
45
|
timeZone: "utc",
|
|
45
46
|
timeZoneName: "shortOffset"
|
|
46
|
-
}) :
|
|
47
|
+
}) : U(i, {
|
|
47
48
|
...b("short-date-short-time"),
|
|
48
49
|
timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
|
|
49
|
-
}) : e && "timeZone" in e && e.timeZone === "unknown" ?
|
|
50
|
+
}) : e && "timeZone" in e && e.timeZone === "unknown" ? F(i, {
|
|
50
51
|
...b("short-date-short-time"),
|
|
51
52
|
timeZone: "utc",
|
|
52
53
|
timeZoneName: "shortOffset"
|
|
53
|
-
}) :
|
|
54
|
+
}) : F(i, {
|
|
54
55
|
...b("short-date-short-time"),
|
|
55
56
|
timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
if (i
|
|
59
|
+
function A(i, e, s) {
|
|
60
|
+
if (!S(i) && !z(i) && !B(i) && !Z(i))
|
|
60
61
|
return;
|
|
61
62
|
let t;
|
|
62
|
-
return
|
|
63
|
+
return T(i, s).fields.forEach((p) => {
|
|
63
64
|
const a = p.name, r = "domain" in p ? p.domain : void 0;
|
|
64
|
-
if (i
|
|
65
|
+
if (!Z(i) && i.subtypeField === a) {
|
|
65
66
|
let c;
|
|
66
|
-
i
|
|
67
|
-
i
|
|
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
69
|
if (e.name === d) {
|
|
69
70
|
const o = l.domains[d];
|
|
70
71
|
o?.type === "coded-value" && o?.codedValues && o.codedValues.forEach((n) => {
|
|
@@ -77,9 +78,9 @@ function z(i, e, s) {
|
|
|
77
78
|
}));
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
|
-
if (e.name === a && (i
|
|
81
|
-
const c = i
|
|
82
|
-
i
|
|
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(
|
|
83
84
|
(d) => (
|
|
84
85
|
// fake coded Values
|
|
85
86
|
{
|
|
@@ -94,19 +95,19 @@ function z(i, e, s) {
|
|
|
94
95
|
let g = !1;
|
|
95
96
|
t.forEach((v) => {
|
|
96
97
|
v.code === n.code && (g = !0, `| ${v.name} |`.includes(`| ${n.name} |`) || (v.name += ` | ${n.name}`));
|
|
97
|
-
}), g || t.push(
|
|
98
|
+
}), g || t.push(O(n));
|
|
98
99
|
});
|
|
99
100
|
} else d.domains?.[a]?.codedValues && d.domains[a].codedValues.forEach((o) => {
|
|
100
101
|
let n = !1;
|
|
101
102
|
t.forEach((g) => {
|
|
102
103
|
g.code === o.code && (n = !0, `| ${g.name} |`.includes(`| ${o.name} |`) || (g.name += ` | ${o.name}`));
|
|
103
|
-
}), n || t.push(
|
|
104
|
+
}), n || t.push(O(o));
|
|
104
105
|
});
|
|
105
|
-
})), !t?.length && r?.codedValues && (t =
|
|
106
|
+
})), !t?.length && r?.codedValues && (t = O(r.codedValues))) : r?.codedValues && (t = r.codedValues);
|
|
106
107
|
}
|
|
107
108
|
}), t;
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
+
function E(i, e) {
|
|
110
111
|
const s = e;
|
|
111
112
|
if (s) {
|
|
112
113
|
let t = "";
|
|
@@ -118,10 +119,10 @@ function O(i, e) {
|
|
|
118
119
|
}
|
|
119
120
|
return i;
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
+
function C(i) {
|
|
122
123
|
return ["small-integer", "big-integer", "integer", "single", "double", "long"].includes(i.type);
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
+
function j(i) {
|
|
125
126
|
switch (i.type) {
|
|
126
127
|
case "small-integer":
|
|
127
128
|
case "big-integer":
|
|
@@ -142,16 +143,16 @@ function R(i) {
|
|
|
142
143
|
return i.type;
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
|
-
const
|
|
146
|
-
class
|
|
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
148
|
constructor() {
|
|
148
|
-
super(...arguments), this.dropdownNode =
|
|
149
|
+
super(...arguments), this.dropdownNode = X(), this._messages = se({ blocking: !0 }), this._propWatcherTask = new Q(this, {
|
|
149
150
|
task: async ([e, s, t]) => {
|
|
150
151
|
const u = h(e) && h(s) || h(t);
|
|
151
|
-
if (!h(t) && !h(e) && !h(s) ?
|
|
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
153
|
const { visualizationSource: p } = this;
|
|
153
|
-
if (!
|
|
154
|
-
throw
|
|
154
|
+
if (!T(e, p).fields?.filter((c) => c.name === s))
|
|
155
|
+
throw D("error", this, "Field could not be found."), new Error();
|
|
155
156
|
}
|
|
156
157
|
if (!u)
|
|
157
158
|
throw new Error();
|
|
@@ -162,13 +163,13 @@ class oe extends W {
|
|
|
162
163
|
this.fieldName,
|
|
163
164
|
this.uniqueValues
|
|
164
165
|
]
|
|
165
|
-
}), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange =
|
|
166
|
+
}), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange = I(), this.arcgisSortByChange = I(), this.arcgisLoad = I();
|
|
166
167
|
}
|
|
167
168
|
static {
|
|
168
169
|
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 };
|
|
169
170
|
}
|
|
170
171
|
static {
|
|
171
|
-
this.styles =
|
|
172
|
+
this.styles = re;
|
|
172
173
|
}
|
|
173
174
|
async setFocus() {
|
|
174
175
|
this.listNode?.setFocus();
|
|
@@ -184,31 +185,31 @@ class oe extends W {
|
|
|
184
185
|
this.layer && this.fieldInfo && (setTimeout(() => this.initialRender = !1, 800), this.listNode?.setFocus());
|
|
185
186
|
}
|
|
186
187
|
async processProps() {
|
|
187
|
-
const { layer: e, fieldName: s, view: t, visualizationSource: u } = this, a = (e ?
|
|
188
|
+
const { layer: e, fieldName: s, view: t, visualizationSource: u } = this, a = (e ? T(e, u) : void 0)?.fields?.filter((r) => r.name === s)?.[0];
|
|
188
189
|
if (h(this.uniqueValues))
|
|
189
190
|
this.fieldInfo = {
|
|
190
191
|
layerField: a,
|
|
191
|
-
fieldDomains: e && a ?
|
|
192
|
-
simpleType: e && a ?
|
|
192
|
+
fieldDomains: e && a ? A(e, a, u) : void 0,
|
|
193
|
+
simpleType: e && a ? j(a) : void 0,
|
|
193
194
|
partialUniqueValues: this.partialUniqueValues ?? !1,
|
|
194
195
|
uniqueValueInfos: this.uniqueValues
|
|
195
196
|
}, this.arcgisLoad.emit();
|
|
196
197
|
else if (e && a) {
|
|
197
198
|
this.fieldInfo = {
|
|
198
199
|
layerField: a,
|
|
199
|
-
fieldDomains:
|
|
200
|
-
simpleType:
|
|
200
|
+
fieldDomains: A(e, a, u),
|
|
201
|
+
simpleType: j(a),
|
|
201
202
|
partialUniqueValues: !1
|
|
202
203
|
};
|
|
203
204
|
const { fieldInfo: r } = this;
|
|
204
205
|
try {
|
|
205
|
-
const c = await
|
|
206
|
+
const c = await ie({
|
|
206
207
|
layer: e,
|
|
207
208
|
view: t,
|
|
208
209
|
field: s,
|
|
209
210
|
sqlWhere: "definitionExpression" in e ? e.definitionExpression ?? void 0 : void 0,
|
|
210
211
|
forBinning: !1
|
|
211
|
-
}), l =
|
|
212
|
+
}), 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);
|
|
212
213
|
d.sort((o, n) => o.count > n.count ? -1 : o.count < n.count ? 1 : 0), r.fieldDomains?.length && r.fieldDomains.forEach((o) => {
|
|
213
214
|
d.find((n) => n.value === o.code) || d.push({
|
|
214
215
|
value: o.code,
|
|
@@ -216,7 +217,7 @@ class oe extends W {
|
|
|
216
217
|
});
|
|
217
218
|
}), r.uniqueValueInfos = d, r.partialUniqueValues = c.uniqueValueInfos.length === 2e3, this.arcgisLoad.emit();
|
|
218
219
|
} catch (c) {
|
|
219
|
-
if (
|
|
220
|
+
if (D("error", this, `uniqueValues() - ${c.message}`), this.hasFieldDomains(r)) {
|
|
220
221
|
const d = [];
|
|
221
222
|
r.fieldDomains.forEach((o) => {
|
|
222
223
|
d.find((n) => n.value === o.code) || d.push({
|
|
@@ -258,47 +259,47 @@ class oe extends W {
|
|
|
258
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;
|
|
259
260
|
if (!l?.length)
|
|
260
261
|
return "";
|
|
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,
|
|
262
|
+
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) => {
|
|
262
263
|
y.sort(($, m) => $.count <= m.count ? 1 : -1);
|
|
263
|
-
},
|
|
264
|
+
}, M = (y) => {
|
|
264
265
|
const $ = c?.length;
|
|
265
266
|
y.sort((m, f) => {
|
|
266
267
|
if (!$ && g)
|
|
267
268
|
return (typeof m.value == "string" ? Number.parseFloat(m.value) : m.value) - (typeof f.value == "string" ? Number.parseFloat(f.value) : f.value);
|
|
268
269
|
{
|
|
269
|
-
const q = $ ?
|
|
270
|
+
const q = $ ? E(m.value, c) : m.label ?? m.value, V = $ ? E(f.value, c) : f.label ?? f.value;
|
|
270
271
|
return `${q}`.startsWith("_") ? 1 : `${V}`.startsWith("_") ? -1 : `${q}`.localeCompare(`${V}`);
|
|
271
272
|
}
|
|
272
273
|
});
|
|
273
|
-
},
|
|
274
|
+
}, P = (y, $) => {
|
|
274
275
|
y.sort((m, f) => {
|
|
275
276
|
const q = $?.indexOf(m.value) ?? -1, V = $?.indexOf(f.value) ?? -1;
|
|
276
277
|
return q === V || q > -1 && V > -1 ? 0 : q > V ? -1 : 1;
|
|
277
278
|
});
|
|
278
279
|
};
|
|
279
|
-
|
|
280
|
-
const
|
|
281
|
-
let
|
|
282
|
-
return d && !p && (
|
|
280
|
+
M(l), !t || t === "count" ? _(l) : t === "selected" && P(l, s);
|
|
281
|
+
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) => {
|
|
283
284
|
let m = y.target.selectedItems.map((f) => f.value);
|
|
284
|
-
!c && n === "date-only" ? m = m?.map((f) =>
|
|
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));
|
|
285
286
|
}} @calciteListFilter=${() => {
|
|
286
287
|
this.dropdownNode.value && (this.dropdownNode.value.disabled = this.listNode.filteredItems.length < 4);
|
|
287
|
-
}} ${
|
|
288
|
+
}} ${L(this.setListRef)}>${l.length >= a && !p ? this.renderSort(g, v) : null}${W}</calcite-list>${x}</div>`;
|
|
288
289
|
},
|
|
289
290
|
error: () => ""
|
|
290
291
|
});
|
|
291
292
|
}
|
|
292
293
|
renderSort(e, s) {
|
|
293
294
|
const { sortBy: t, _messages: u } = this;
|
|
294
|
-
return
|
|
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>`;
|
|
295
296
|
}
|
|
296
297
|
renderUniqueValue(e) {
|
|
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 ?
|
|
298
|
-
return
|
|
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 ? E(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>`);
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
|
-
|
|
302
|
+
H("arcgis-unique-values-list", ue);
|
|
302
303
|
export {
|
|
303
|
-
|
|
304
|
+
ue as ArcgisUniqueValuesList
|
|
304
305
|
};
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import type WFSLayer from "@arcgis/core/layers/WFSLayer.js";
|
|
2
1
|
import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer.js";
|
|
3
|
-
import type
|
|
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
|
+
import type Layer from "@arcgis/core/layers/Layer.js";
|
|
13
3
|
|
|
14
|
-
/**
|
|
15
|
-
|
|
4
|
+
/**
|
|
5
|
+
* All supported layer types
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export type SupportedLayer = SubtypeSublayer | (Layer & { type: SupportedLayerTypes; });
|
|
10
|
+
|
|
11
|
+
export type SupportedLayerTypes = "catalog-footprint" | "catalog" | "csv" | "feature" | "geojson" | "imagery" | "knowledge-graph-sublayer" | "ogc-feature" | "oriented-imagery" | "parquet" | "scene" | "stream" | "subtype-group" | "wfs";
|