@arcgis/common-components 5.2.0-next.5 → 5.2.0-next.50
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/4KRPPRHW.js +2 -0
- package/dist/cdn/{232BH3SJ.js → 5WP36RAW.js} +1 -1
- package/dist/cdn/{YVCGEEMG.js → 7PL77HAZ.js} +1 -1
- package/dist/cdn/7ZUWFAYH.js +2 -0
- package/dist/cdn/B6C7ZZDN.js +2 -0
- package/dist/cdn/{YG4PY2H3.js → CYZGEP6V.js} +1 -1
- package/dist/cdn/E3SVPX4L.js +2 -0
- package/dist/cdn/EVYGOWCG.js +2 -0
- package/dist/cdn/EX3AW7Q2.js +2 -0
- package/dist/cdn/FKHGUT45.js +2 -0
- package/dist/cdn/FKO67W3F.js +2 -0
- package/dist/cdn/FZ4Q7EMA.js +2 -0
- package/dist/cdn/GTMCT5DS.js +2 -0
- package/dist/cdn/H6QXW6NX.js +2 -0
- package/dist/cdn/KZFC5ZBH.js +2 -0
- package/dist/cdn/LFOKTAGH.js +2 -0
- package/dist/cdn/MKKGMWEJ.js +2 -0
- package/dist/cdn/{OOBX2C2L.js → MW6TDS35.js} +1 -1
- package/dist/cdn/QISJWNH5.js +2 -0
- package/dist/cdn/TDGIURLY.js +2 -0
- package/dist/cdn/TWW63D32.js +2 -0
- package/dist/cdn/{6XE5JNJ7.js → UG7AGGLT.js} +3 -3
- package/dist/cdn/V43FDQ7C.js +2 -0
- package/dist/cdn/WC3RM7YK.js +2 -0
- package/dist/cdn/X4EYTR3Z.js +2 -0
- package/dist/cdn/XS3YRTYG.js +2 -0
- package/dist/cdn/{WJ3TYWP2.js → YJFSSORL.js} +1 -1
- package/dist/cdn/Z5QBBHLD.js +2 -0
- package/dist/cdn/{MINFRX4Y.js → ZTXNPEHL.js} +1 -1
- package/dist/cdn/assets/value-picker/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-utils.js +52 -40
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +6 -1
- package/dist/components/arcgis-ckeditor5/customElement.js +2 -2
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.js +6 -6
- package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +6 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.js +245 -213
- package/dist/components/arcgis-field-info/index.js +1 -0
- package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
- package/dist/components/arcgis-field-pick-list/customElement.js +43 -51
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
- package/dist/components/arcgis-histogram/customElement.js +13 -9
- package/dist/components/arcgis-picker-input/customElement.d.ts +6 -2
- package/dist/components/arcgis-picker-input/customElement.js +7 -7
- package/dist/components/arcgis-slider/customElement.d.ts +4 -3
- package/dist/components/arcgis-slider/customElement.js +304 -284
- package/dist/components/arcgis-ticks/customElement.js +100 -79
- package/dist/components/arcgis-unique-values-list/customElement.js +26 -26
- package/dist/components/arcgis-value-picker/customElement.d.ts +377 -0
- package/dist/components/arcgis-value-picker/customElement.js +87 -0
- package/dist/components/arcgis-value-picker/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker/index.js +3 -0
- package/dist/components/arcgis-value-picker/types.d.ts +69 -0
- package/dist/components/arcgis-value-picker-collection/customElement.d.ts +113 -0
- package/dist/components/arcgis-value-picker-collection/customElement.js +43 -0
- package/dist/components/arcgis-value-picker-collection/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-collection/index.js +1 -0
- package/dist/components/arcgis-value-picker-combobox/customElement.d.ts +90 -0
- package/dist/components/arcgis-value-picker-combobox/customElement.js +55 -0
- package/dist/components/arcgis-value-picker-combobox/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-combobox/index.js +3 -0
- package/dist/components/arcgis-value-picker-label/customElement.d.ts +81 -0
- package/dist/components/arcgis-value-picker-label/customElement.js +51 -0
- package/dist/components/arcgis-value-picker-label/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-label/index.js +1 -0
- package/dist/components/arcgis-value-picker-slider/customElement.d.ts +173 -0
- package/dist/components/arcgis-value-picker-slider/customElement.js +60 -0
- package/dist/components/arcgis-value-picker-slider/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-slider/index.js +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +50 -0
- package/dist/loader.js +8 -3
- package/dist/types/lumina.d.ts +36 -0
- package/dist/types/preact.d.ts +41 -0
- package/dist/types/react.d.ts +46 -0
- package/dist/types/stencil.d.ts +36 -0
- package/package.json +5 -5
- package/dist/cdn/2MN6S2HH.js +0 -2
- package/dist/cdn/4BJYJUMR.js +0 -2
- package/dist/cdn/5I5ODGDD.js +0 -2
- package/dist/cdn/AGGCAE6P.js +0 -2
- package/dist/cdn/BDF4ZLUF.js +0 -2
- package/dist/cdn/F45Q3BRT.js +0 -2
- package/dist/cdn/GEWXC2ZR.js +0 -2
- package/dist/cdn/HWEOBUAY.js +0 -2
- package/dist/cdn/IRIB5DXG.js +0 -2
- package/dist/cdn/KPJCYYYQ.js +0 -2
- package/dist/cdn/ORSF6IOL.js +0 -2
- package/dist/cdn/QEW7H22O.js +0 -2
- package/dist/cdn/UMIMGOKS.js +0 -2
- package/dist/cdn/VUQJROFR.js +0 -2
- package/dist/cdn/YSXFXVP6.js +0 -2
- package/dist/cdn/YVWFGK4M.js +0 -2
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
- /package/dist/cdn/{ECNI2A4K.js → XEK22IDA.js} +0 -0
- /package/dist/chunks/{commonFunctions.js → general.js} +0 -0
|
@@ -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 {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
2
|
+
import { c as H } from "../../chunks/runtime.js";
|
|
3
|
+
import { keyed as S } from "lit/directives/keyed.js";
|
|
4
|
+
import { ref as b } from "lit/directives/ref.js";
|
|
5
|
+
import { LitElement as Q, createEvent as D, safeClassMap as I } from "@arcgis/lumina";
|
|
6
|
+
import { Task as J } from "@lit/task";
|
|
7
|
+
import { log as C, composeMissingPropertyMessage as L } from "@arcgis/toolkit/log";
|
|
8
|
+
import { css as j, html as c } from "lit";
|
|
9
|
+
import z from "@arcgis/core/config.js";
|
|
10
10
|
import * as x from "@arcgis/core/core/reactiveUtils.js";
|
|
11
11
|
import * as h from "@arcgis/core/intl.js";
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { i as f } from "../../chunks/
|
|
17
|
-
import
|
|
18
|
-
import ee from "
|
|
19
|
-
import
|
|
20
|
-
|
|
12
|
+
import * as A from "@arcgis/core/applications/PortalApp/layerUtils.js";
|
|
13
|
+
import * as _ from "@arcgis/core/core/lang.js";
|
|
14
|
+
import B from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
15
|
+
import K from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
16
|
+
import { i as f } from "../../chunks/general.js";
|
|
17
|
+
import R from "@arcgis/core/layers/support/CodedValue.js";
|
|
18
|
+
import { i as y, a as $, b as w, c as Z, d as V, e as M, f as v, g as F, h as U, j as X, k as Y, l as ee, m as te, n as O, o as ie, p as W, q as se, r as k, s as E } from "../../chunks/layer-utils.js";
|
|
19
|
+
import ae from "@arcgis/core/rest/support/Query.js";
|
|
20
|
+
import { u as re } from "../../chunks/useT9n.js";
|
|
21
|
+
function ne(a) {
|
|
21
22
|
return a.associatedLayer?.url;
|
|
22
23
|
}
|
|
23
|
-
const
|
|
24
|
+
const oe = {
|
|
24
25
|
dateStyle: "short",
|
|
25
26
|
timeStyle: "short"
|
|
26
|
-
},
|
|
27
|
+
}, le = {
|
|
27
28
|
timeStyle: "medium"
|
|
28
29
|
};
|
|
29
|
-
function
|
|
30
|
+
function ue(a) {
|
|
30
31
|
const { layer: e, fieldName: t } = a;
|
|
31
32
|
let i;
|
|
32
|
-
const
|
|
33
|
+
const r = A.supportsFieldConfiguration(e);
|
|
33
34
|
let s;
|
|
34
35
|
"popupTemplate" in e && (s = e.popupTemplate);
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
const
|
|
38
|
-
/^raster.(item|service)pixelvalue/iu.test(t) && (
|
|
39
|
-
const
|
|
40
|
-
layerField:
|
|
41
|
-
label:
|
|
36
|
+
const n = s ? s.fieldInfos : [];
|
|
37
|
+
return G(a)?.filter((d) => d.name === t).forEach((d) => {
|
|
38
|
+
const l = !r && n ? n.filter((g) => g.fieldName === d.name) : void 0, o = r ? e.getFieldAlias(t) : l?.length ? l[0].label : d.alias;
|
|
39
|
+
/^raster.(item|service)pixelvalue/iu.test(t) && (d.type = "double");
|
|
40
|
+
const u = {
|
|
41
|
+
layerField: d,
|
|
42
|
+
label: o || d.name
|
|
42
43
|
};
|
|
43
|
-
|
|
44
|
+
u.codedValues = fe(t, a), me(u), u.simpleFieldType && (i = u);
|
|
44
45
|
}), i;
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function G(a) {
|
|
47
48
|
const { layer: e } = a;
|
|
48
|
-
return y(e) ||
|
|
49
|
+
return y(e) || $(e) || V(e) && e.rasterFields.length ? e.rasterFields : e.fields;
|
|
49
50
|
}
|
|
50
|
-
async function
|
|
51
|
+
async function P(a) {
|
|
51
52
|
a.statisticsStatus = "in-progress";
|
|
52
53
|
const { layer: e, view: t } = a;
|
|
53
|
-
if (y(e) ||
|
|
54
|
+
if (y(e) || $(e) || F(e) || w(e))
|
|
54
55
|
throw new Error("could not get feature count");
|
|
55
56
|
try {
|
|
56
|
-
return await
|
|
57
|
+
return await ge(e, t);
|
|
57
58
|
} catch {
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
|
-
async function
|
|
62
|
-
const { layer: e, view: t, fieldName: i, fieldInfo:
|
|
63
|
-
if (y(e) ||
|
|
62
|
+
async function ce(a) {
|
|
63
|
+
const { layer: e, view: t, fieldName: i, fieldInfo: r } = a;
|
|
64
|
+
if (y(e) || $(e) || w(e))
|
|
64
65
|
throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");
|
|
65
|
-
if (!
|
|
66
|
-
return { totalCount: await
|
|
66
|
+
if (!r || r.layerField.type === "oid" || r.layerField.type === "guid" || r.layerField.type === "global-id")
|
|
67
|
+
return { totalCount: await P(a), nullcount: 0 };
|
|
67
68
|
try {
|
|
68
|
-
const s = await
|
|
69
|
+
const s = await B({
|
|
69
70
|
layer: e,
|
|
70
71
|
view: t,
|
|
71
72
|
field: i,
|
|
@@ -73,24 +74,24 @@ async function ne(a) {
|
|
|
73
74
|
});
|
|
74
75
|
if (!f(s.count))
|
|
75
76
|
throw new Error("could not get statistics");
|
|
76
|
-
const
|
|
77
|
-
if (f(s.nullcount) && !
|
|
77
|
+
const n = "sourceJSON" in e && e.sourceJSON.maxRecordCount === s.count;
|
|
78
|
+
if (f(s.nullcount) && !n)
|
|
78
79
|
return { ...s, totalCount: s.count + s.nullcount };
|
|
79
80
|
{
|
|
80
|
-
const m = await
|
|
81
|
+
const m = await P(a);
|
|
81
82
|
return { ...s, totalCount: m };
|
|
82
83
|
}
|
|
83
84
|
} catch {
|
|
84
85
|
throw new Error("could not get statistics");
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
async function
|
|
88
|
+
async function de(a) {
|
|
88
89
|
const { layer: e, view: t, fieldName: i } = a;
|
|
89
|
-
if (y(e) ||
|
|
90
|
+
if (y(e) || $(e) || w(e))
|
|
90
91
|
throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");
|
|
91
|
-
|
|
92
|
+
Z(e) && (e.outFields = ["*"]);
|
|
92
93
|
try {
|
|
93
|
-
return await
|
|
94
|
+
return await K({
|
|
94
95
|
layer: e,
|
|
95
96
|
view: t,
|
|
96
97
|
field: i
|
|
@@ -99,7 +100,7 @@ async function oe(a) {
|
|
|
99
100
|
throw new Error("could not get unique values");
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
function
|
|
103
|
+
function me(a) {
|
|
103
104
|
switch (a.layerField.type) {
|
|
104
105
|
case "string":
|
|
105
106
|
a.simpleFieldType = "string";
|
|
@@ -131,96 +132,99 @@ function le(a) {
|
|
|
131
132
|
case "long":
|
|
132
133
|
a.simpleFieldType = "number";
|
|
133
134
|
break;
|
|
135
|
+
default:
|
|
136
|
+
a.simpleFieldType = "string";
|
|
134
137
|
}
|
|
135
138
|
}
|
|
136
|
-
function
|
|
139
|
+
function fe(a, e) {
|
|
137
140
|
const { layer: t } = e;
|
|
138
|
-
if (
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
return [{ code:
|
|
141
|
+
if (M(t) && t.subtypeField === a) {
|
|
142
|
+
const l = t.parent?.subtypes?.find((o) => o.code === t.subtypeCode);
|
|
143
|
+
if (l)
|
|
144
|
+
return [new R({ code: l.code, name: l.name })];
|
|
142
145
|
}
|
|
143
|
-
if (!v(t) && !
|
|
146
|
+
if (!v(t) && !V(t))
|
|
144
147
|
return;
|
|
145
|
-
const i = v(t) ? t.typeIdField : void 0,
|
|
148
|
+
const i = v(t) ? t.typeIdField : void 0, r = v(t) ? t.types : void 0;
|
|
146
149
|
let s;
|
|
147
|
-
const m =
|
|
148
|
-
return v(t) && i &&
|
|
149
|
-
(
|
|
150
|
+
const m = G(e)?.find((l) => l.name === a), d = m?.domain;
|
|
151
|
+
return v(t) && i && r ? (i === a ? s = r.map(
|
|
152
|
+
(l) => (
|
|
150
153
|
// fake coded values
|
|
151
|
-
{
|
|
152
|
-
code:
|
|
153
|
-
name:
|
|
154
|
-
}
|
|
154
|
+
new R({
|
|
155
|
+
code: l.id,
|
|
156
|
+
name: l.name
|
|
157
|
+
})
|
|
155
158
|
)
|
|
156
|
-
) : (s = [],
|
|
157
|
-
if (!
|
|
158
|
-
const
|
|
159
|
-
|
|
159
|
+
) : (s = [], r.forEach((l) => {
|
|
160
|
+
if (!l.domains[a] || l.domains[a].type === "inherited") {
|
|
161
|
+
const o = d;
|
|
162
|
+
o?.codedValues && o.codedValues.forEach((u) => {
|
|
160
163
|
let g = !1;
|
|
161
164
|
s.forEach((p) => {
|
|
162
|
-
p.code ===
|
|
163
|
-
}), g || s.push(
|
|
165
|
+
p.code === u.code && (g = !0, `, ${p.name},`.includes(`, ${u.name},`) || (p.name += `, ${u.name}`));
|
|
166
|
+
}), g || s.push(_.clone(u));
|
|
164
167
|
});
|
|
165
|
-
} else
|
|
166
|
-
let
|
|
168
|
+
} else l.domains[a].codedValues && l.domains[a].codedValues.forEach((o) => {
|
|
169
|
+
let u = !1;
|
|
167
170
|
s.forEach((g) => {
|
|
168
|
-
g.code ===
|
|
169
|
-
}),
|
|
171
|
+
g.code === o.code && (u = !0, `, ${g.name},`.includes(`, ${o.name},`) || (g.name += `, ${o.name}`));
|
|
172
|
+
}), u || s.push(_.clone(o));
|
|
170
173
|
});
|
|
171
|
-
})), !s.length &&
|
|
174
|
+
})), !s.length && d?.codedValues && (s = _.clone(d.codedValues))) : d?.codedValues && (s = m?.domain?.codedValues), s?.length ? s : void 0;
|
|
172
175
|
}
|
|
173
|
-
async function
|
|
176
|
+
async function pe(a) {
|
|
174
177
|
const { view: e, layer: t } = a;
|
|
175
|
-
if (
|
|
178
|
+
if (V(t) || y(t) || $(t))
|
|
176
179
|
throw new Error("could not get feature");
|
|
177
|
-
if (v(t) && !t.url ||
|
|
180
|
+
if (v(t) && !t.url || U(t)) {
|
|
178
181
|
const i = t.createQuery();
|
|
179
182
|
i.start = 0, i.num = 5, i.outFields = ["*"];
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
return
|
|
183
|
+
const r = await t.queryFeatures(i);
|
|
184
|
+
if (r.features.length)
|
|
185
|
+
return r;
|
|
183
186
|
throw new Error("could not get feature");
|
|
184
187
|
} else {
|
|
185
188
|
if (!e)
|
|
186
|
-
return await
|
|
189
|
+
return await q(a);
|
|
187
190
|
let i;
|
|
188
|
-
if (
|
|
191
|
+
if (M(t) || X(t)) {
|
|
189
192
|
let s = t.parent;
|
|
190
|
-
for (;
|
|
193
|
+
for (; Y(s) || ee(s); )
|
|
191
194
|
s = s.parent;
|
|
192
|
-
i = await e.whenLayerView(s);
|
|
195
|
+
te(s) && (i = await e.whenLayerView(s));
|
|
193
196
|
} else
|
|
194
197
|
i = await e.whenLayerView(t);
|
|
195
|
-
|
|
198
|
+
const r = i.availableFields.length === t.fields.length;
|
|
199
|
+
if (i && (r || (F(t) || O(t)) && i.availableFields.length > 0)) {
|
|
196
200
|
const s = i.createQuery();
|
|
197
201
|
s.start = 0, s.num = 5, s.outFields = ["*"];
|
|
198
|
-
const
|
|
199
|
-
return
|
|
202
|
+
const n = await i.queryFeatures(s);
|
|
203
|
+
return n.features?.length ? n : await q(a);
|
|
200
204
|
} else
|
|
201
|
-
return await
|
|
205
|
+
return await q(a);
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
|
-
async function
|
|
208
|
+
async function q(a) {
|
|
205
209
|
const { layer: e } = a;
|
|
206
|
-
if (
|
|
210
|
+
if (V(e) || y(e) || F(e) || O(e))
|
|
207
211
|
throw new Error("cannot get feature from service");
|
|
208
|
-
const t = new
|
|
212
|
+
const t = new ae({
|
|
209
213
|
where: "1=1",
|
|
210
214
|
outFields: ["*"],
|
|
211
215
|
returnGeometry: !1
|
|
212
216
|
});
|
|
213
217
|
return "sourceJSON" in e && e.sourceJSON?.advancedQueryCapabilities?.supportsPagination && (t.num = 1), await e.queryFeatures(t);
|
|
214
218
|
}
|
|
215
|
-
async function
|
|
216
|
-
if (
|
|
217
|
-
return await
|
|
218
|
-
if (v(a) ||
|
|
219
|
+
async function ge(a, e) {
|
|
220
|
+
if (Z(a))
|
|
221
|
+
return await he(a);
|
|
222
|
+
if (v(a) || ie(a) || W(a) || U(a) || se(a))
|
|
219
223
|
return await a.queryFeatureCount();
|
|
220
|
-
if (e && (F(a) ||
|
|
221
|
-
return await
|
|
224
|
+
if (e && (F(a) || O(a)))
|
|
225
|
+
return await ve(a, e);
|
|
222
226
|
}
|
|
223
|
-
async function
|
|
227
|
+
async function he(a) {
|
|
224
228
|
const e = a.createQuery();
|
|
225
229
|
e.outFields = ["*"];
|
|
226
230
|
const t = await a.queryFeatures(e);
|
|
@@ -228,16 +232,16 @@ async function me(a) {
|
|
|
228
232
|
return t.features.length;
|
|
229
233
|
throw new Error("could not get feature count");
|
|
230
234
|
}
|
|
231
|
-
async function
|
|
235
|
+
async function ve(a, e) {
|
|
232
236
|
return await (await e.whenLayerView(a)).queryFeatureCount();
|
|
233
237
|
}
|
|
234
|
-
const
|
|
235
|
-
class
|
|
238
|
+
const ye = j`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-surface-2)}.title{font-weight:700;padding:5px 0}.missing,.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:var(--calcite-space-xs) 0}.statistics-row{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding:var(--calcite-space-xs) 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:var(--calcite-border-width-sm) solid var(--calctie-color-border-2);padding:20px 0 var(--calcite-space-xs) 0;display:flex;justify-content:space-between}`;
|
|
239
|
+
class Fe extends Q {
|
|
236
240
|
constructor() {
|
|
237
|
-
super(...arguments), this._messages =
|
|
241
|
+
super(...arguments), this._messages = re({ blocking: !0 }), this.initialized = !1, this._propWatcherTask = new J(this, {
|
|
238
242
|
task: async ([e, t]) => {
|
|
239
243
|
const i = f(e) && f(t);
|
|
240
|
-
if (f(e) ||
|
|
244
|
+
if (f(e) || C("error", this, L("layer")), f(t) || C("error", this, L("fieldName")), !i)
|
|
241
245
|
throw new Error();
|
|
242
246
|
await this.processProps(), this._propWatcherTask.autoRun = !1;
|
|
243
247
|
},
|
|
@@ -248,78 +252,93 @@ class ge extends W {
|
|
|
248
252
|
this.properties = { oneFeatureResponseStatus: 16, oneFeatureResponse: 16, statisticsStatus: 16, statistics: 16, uniqueValuesStatus: 16, uniqueValues: 16, view: 0, layer: 0, fieldName: 1, hideAlias: 5, hideNumericFormat: 5, hideStatistics: 5 };
|
|
249
253
|
}
|
|
250
254
|
static {
|
|
251
|
-
this.styles =
|
|
255
|
+
this.styles = ye;
|
|
252
256
|
}
|
|
253
257
|
async refresh() {
|
|
254
258
|
await this.processProps(), this.requestUpdate();
|
|
255
259
|
}
|
|
260
|
+
async willUpdate(e) {
|
|
261
|
+
this.initialized && (e.has("fieldName") || e.has("layer")) && await this.processProps();
|
|
262
|
+
}
|
|
256
263
|
disconnectedCallback() {
|
|
257
264
|
super.disconnectedCallback(), this.timeZoneHandle?.remove();
|
|
258
265
|
}
|
|
259
266
|
async processProps() {
|
|
260
|
-
const { view: e, layer: t, fieldName: i, hideStatistics:
|
|
267
|
+
const { view: e, layer: t, fieldName: i, hideStatistics: r } = this;
|
|
261
268
|
if (!t || !i)
|
|
262
269
|
return;
|
|
263
270
|
let s;
|
|
264
271
|
if (t.declaredClass === "esri.layers.support.Sublayer") {
|
|
265
|
-
const
|
|
266
|
-
e && await x.whenOnce(() => !e.updating), s = await
|
|
272
|
+
const n = t;
|
|
273
|
+
e && await x.whenOnce(() => !e.updating), s = await n.createFeatureLayer(), await s?.load();
|
|
267
274
|
}
|
|
268
|
-
this.props = {
|
|
275
|
+
if (this.oneFeatureResponseStatus = "missing", this.oneFeatureResponse = void 0, this.statisticsStatus = "missing", this.statistics = void 0, this.uniqueValuesStatus = "missing", this.uniqueValues = void 0, this.props = {
|
|
269
276
|
view: e,
|
|
270
277
|
layer: s ?? t,
|
|
271
278
|
fieldName: i,
|
|
272
|
-
hideStatistics:
|
|
273
|
-
}, this.props.fieldInfo =
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
279
|
+
hideStatistics: r
|
|
280
|
+
}, this.props.fieldInfo = ue(this.props), !this.props.fieldInfo) {
|
|
281
|
+
C("error", this, `Field ${i} does not exist in layer.`);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
W(t) && z.request.interceptors?.push({
|
|
285
|
+
urls: `${ne(t)}/${t.layerId}`,
|
|
286
|
+
before(n) {
|
|
287
|
+
n.requestOptions.authMode = "no-prompt";
|
|
277
288
|
}
|
|
278
|
-
}), this.
|
|
289
|
+
}), this.processPropsPart2();
|
|
290
|
+
}
|
|
291
|
+
async processPropsPart2() {
|
|
292
|
+
const { layer: e, hideStatistics: t } = this;
|
|
293
|
+
if (await this.requestOneFeature(), F(e) || k(e) || E(e)) {
|
|
294
|
+
this.uniqueValuesStatus = "failed", this.statisticsStatus = "failed";
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
t ? this.uniqueValuesStatus = "failed" : await this.requestUniqueValues(), t ? this.statisticsStatus = "failed" : await this.requestStatistics(), this.setUpTimeZoneHandle(), this.initialized = !0;
|
|
298
|
+
}
|
|
299
|
+
async requestOneFeature() {
|
|
300
|
+
this.oneFeatureResponseStatus = "in-progress";
|
|
279
301
|
try {
|
|
280
|
-
const
|
|
281
|
-
this.oneFeatureResponse =
|
|
302
|
+
const e = await pe(this.props);
|
|
303
|
+
this.oneFeatureResponse = e, this.oneFeatureResponseStatus = "success";
|
|
282
304
|
} catch {
|
|
283
305
|
this.oneFeatureResponseStatus = "failed";
|
|
284
306
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
if (n)
|
|
290
|
-
this.uniqueValuesStatus = "failed";
|
|
291
|
-
else {
|
|
292
|
-
this.uniqueValuesStatus = "in-progress";
|
|
307
|
+
}
|
|
308
|
+
async requestUniqueValues() {
|
|
309
|
+
return this.uniqueValuesStatus = "in-progress", await new Promise(async (e) => {
|
|
293
310
|
try {
|
|
294
|
-
const
|
|
295
|
-
this.uniqueValues =
|
|
311
|
+
const t = await de(this.props);
|
|
312
|
+
this.uniqueValues = t, t?.uniqueValueInfos?.length ? this.uniqueValuesStatus = "success" : this.uniqueValuesStatus = "failed";
|
|
296
313
|
} catch {
|
|
297
314
|
this.uniqueValuesStatus = "failed";
|
|
315
|
+
} finally {
|
|
316
|
+
e();
|
|
298
317
|
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
this.statisticsStatus = "in-progress";
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
async requestStatistics() {
|
|
321
|
+
return await new Promise(async (e) => {
|
|
304
322
|
try {
|
|
305
|
-
const
|
|
306
|
-
if (!f(
|
|
307
|
-
const
|
|
308
|
-
for (let
|
|
309
|
-
const
|
|
310
|
-
if (
|
|
311
|
-
|
|
323
|
+
const t = await ce(this.props);
|
|
324
|
+
if (!f(t.totalCount) && f(t.count) && this.uniqueValuesStatus === "success") {
|
|
325
|
+
const i = this.uniqueValues?.uniqueValueInfos ?? [];
|
|
326
|
+
for (let r = 0; r < i.length; r++) {
|
|
327
|
+
const s = i[r];
|
|
328
|
+
if (s.value === null) {
|
|
329
|
+
t.totalCount = s.count + t.count;
|
|
312
330
|
break;
|
|
313
331
|
}
|
|
314
332
|
}
|
|
315
|
-
|
|
333
|
+
t.totalCount ??= t.count;
|
|
316
334
|
}
|
|
317
|
-
this.statistics =
|
|
335
|
+
this.statistics = t, this.statisticsStatus = "success";
|
|
318
336
|
} catch {
|
|
319
337
|
this.statisticsStatus = "failed";
|
|
338
|
+
} finally {
|
|
339
|
+
e();
|
|
320
340
|
}
|
|
321
|
-
}
|
|
322
|
-
this.setUpTimeZoneHandle();
|
|
341
|
+
});
|
|
323
342
|
}
|
|
324
343
|
setUpTimeZoneHandle() {
|
|
325
344
|
this.timeZoneHandle?.remove();
|
|
@@ -427,8 +446,8 @@ class ge extends W {
|
|
|
427
446
|
}
|
|
428
447
|
}
|
|
429
448
|
_getDisplayString(e, t) {
|
|
430
|
-
const { props: i } = this, { fieldInfo:
|
|
431
|
-
switch (
|
|
449
|
+
const { props: i } = this, { fieldInfo: r } = i;
|
|
450
|
+
switch (r.simpleFieldType) {
|
|
432
451
|
case "date":
|
|
433
452
|
return this._getDateString(e, t);
|
|
434
453
|
case "date-only":
|
|
@@ -487,8 +506,13 @@ class ge extends W {
|
|
|
487
506
|
_printNumValue(e, t) {
|
|
488
507
|
return f(e) ? this._getNumberString(e, t) : "--";
|
|
489
508
|
}
|
|
490
|
-
_setCompleteRef() {
|
|
491
|
-
this.
|
|
509
|
+
_setCompleteRef(e) {
|
|
510
|
+
if (this.completeRefHandler && clearInterval(this.completeRefHandler), e) {
|
|
511
|
+
let t = 0;
|
|
512
|
+
this.completeRefHandler = setInterval(() => {
|
|
513
|
+
(t > 130 || this.isFinished(this.uniqueValuesStatus) && this.isFinished(this.statisticsStatus)) && (clearInterval(this.completeRefHandler), this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit()), t++;
|
|
514
|
+
}, 1e3);
|
|
515
|
+
}
|
|
492
516
|
}
|
|
493
517
|
getCurrentFieldFormat() {
|
|
494
518
|
const { props: e } = this, { layer: t, fieldName: i } = e;
|
|
@@ -509,17 +533,17 @@ class ge extends W {
|
|
|
509
533
|
} : void 0;
|
|
510
534
|
if (i)
|
|
511
535
|
return i;
|
|
512
|
-
const
|
|
536
|
+
const r = this.getPopupTemplateFieldInfo();
|
|
513
537
|
return h.convertNumberFormatToIntlOptions({
|
|
514
|
-
digitSeparator:
|
|
515
|
-
places:
|
|
538
|
+
digitSeparator: r?.format?.digitSeparator ?? !0,
|
|
539
|
+
places: r?.format?.places ?? 2
|
|
516
540
|
});
|
|
517
541
|
}
|
|
518
542
|
getIntlDateTimeFormattingOptions(e, t) {
|
|
519
543
|
const i = this.getCurrentFieldFormat();
|
|
520
544
|
if (!t?.useFieldFormatting)
|
|
521
|
-
return i ? t?.isTimeOnly ?
|
|
522
|
-
const
|
|
545
|
+
return i ? t?.isTimeOnly ? le : oe : h.convertDateFormatToIntlOptions(e);
|
|
546
|
+
const r = i ? {
|
|
523
547
|
dateStyle: t?.isTimeOnly ? void 0 : i.dateStyle ?? void 0,
|
|
524
548
|
// year/month is overridden if dateStyle is set
|
|
525
549
|
year: i.dateStyle ? void 0 : i.year ?? void 0,
|
|
@@ -527,21 +551,25 @@ class ge extends W {
|
|
|
527
551
|
timeStyle: i.timeStyle ?? void 0,
|
|
528
552
|
hourCycle: i.hour12 === "never" ? "h23" : "h11"
|
|
529
553
|
} : void 0;
|
|
530
|
-
if (
|
|
531
|
-
return
|
|
554
|
+
if (r)
|
|
555
|
+
return r;
|
|
532
556
|
const s = this.getPopupTemplateFieldInfo();
|
|
533
557
|
return h.convertDateFormatToIntlOptions(s?.format?.dateFormat ?? e);
|
|
534
558
|
}
|
|
535
559
|
originalLayerSupportsFieldConfigs() {
|
|
536
560
|
const { layer: e } = this;
|
|
537
|
-
return
|
|
561
|
+
return A.supportsFieldConfiguration(e);
|
|
538
562
|
}
|
|
539
563
|
getPopupTemplateFieldInfo() {
|
|
540
564
|
const { props: e } = this, { layer: t, fieldName: i } = e;
|
|
541
565
|
return ("popupTemplate" in t ? t.popupTemplate : void 0)?.fieldInfos?.find((s) => s.fieldName === i);
|
|
542
566
|
}
|
|
567
|
+
isFinished(e) {
|
|
568
|
+
return ["success", "failed"].includes(e);
|
|
569
|
+
}
|
|
543
570
|
render() {
|
|
544
571
|
return this._propWatcherTask.render({
|
|
572
|
+
pending: () => c`<calcite-scrim loading></calcite-scrim>`,
|
|
545
573
|
complete: () => {
|
|
546
574
|
const { props: e } = this, { fieldInfo: t } = e;
|
|
547
575
|
return t ? c`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>` : "";
|
|
@@ -550,19 +578,19 @@ class ge extends W {
|
|
|
550
578
|
});
|
|
551
579
|
}
|
|
552
580
|
renderFieldType() {
|
|
553
|
-
const { _messages: e, props: t } = this, { fieldInfo: i } = t,
|
|
554
|
-
return c`<div class="section"><div class="title">${e.fieldType}</div><div>${
|
|
581
|
+
const { _messages: e, props: t } = this, { fieldInfo: i } = t, r = this._getFieldTypeLabel(i.layerField.type);
|
|
582
|
+
return c`<div class="section"><div class="title">${e.fieldType}</div><div>${r}</div></div>`;
|
|
555
583
|
}
|
|
556
584
|
renderFieldAlias() {
|
|
557
|
-
const { _messages: e, props: t, hideAlias: i } = this, { fieldInfo:
|
|
558
|
-
return i ? "" : c`<div class="section"><div class="title">${e.fieldAlias}</div><div>${
|
|
585
|
+
const { _messages: e, props: t, hideAlias: i } = this, { fieldInfo: r } = t;
|
|
586
|
+
return i ? "" : c`<div class="section"><div class="title">${e.fieldAlias}</div><div>${r.label}</div></div>`;
|
|
559
587
|
}
|
|
560
588
|
renderFieldDescription() {
|
|
561
589
|
const { _messages: e, props: t } = this, { layer: i } = t;
|
|
562
590
|
if (!v(i))
|
|
563
591
|
return "";
|
|
564
|
-
const { fieldInfo:
|
|
565
|
-
return c`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${
|
|
592
|
+
const { fieldInfo: r } = t, s = r.layerField.description;
|
|
593
|
+
return c`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${I({
|
|
566
594
|
missing: !s
|
|
567
595
|
})}>${s || e.fieldDescriptionNotSet}</div></div>`;
|
|
568
596
|
}
|
|
@@ -570,49 +598,53 @@ class ge extends W {
|
|
|
570
598
|
const { _messages: e, props: t } = this, { layer: i } = t;
|
|
571
599
|
if (!v(i))
|
|
572
600
|
return "";
|
|
573
|
-
const { fieldInfo:
|
|
574
|
-
return c`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${
|
|
601
|
+
const { fieldInfo: r } = t, s = this._getFieldValueTypeCamelCase(r);
|
|
602
|
+
return c`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${I(s ? "" : "missing")}>${s ? e.fieldValueTypes[s] : e.fieldValueTypeNotSet}</div></div>`;
|
|
575
603
|
}
|
|
576
604
|
renderFieldSampleValue() {
|
|
577
|
-
const { oneFeatureResponse: e, oneFeatureResponseStatus: t, statisticsStatus: i, statistics:
|
|
605
|
+
const { oneFeatureResponse: e, oneFeatureResponseStatus: t, statisticsStatus: i, statistics: r, uniqueValuesStatus: s, uniqueValues: n, _messages: m, props: d } = this, { layer: l, fieldName: o, fieldInfo: u } = d, { statistics: g } = m;
|
|
578
606
|
let p;
|
|
579
|
-
if (y(
|
|
607
|
+
if (y(l) || w(l) || !F(l) && ["string", "oid", "guid"].includes(this._getStatisticsType(u)) && s !== "failed")
|
|
580
608
|
return "";
|
|
581
|
-
t === "success" ? e.features.forEach((
|
|
582
|
-
(p === void 0 || p === null &&
|
|
583
|
-
}) : i === "success" ? p =
|
|
584
|
-
const N =
|
|
585
|
-
return f(p) && (N ? p = N.find((
|
|
609
|
+
t === "success" ? e.features.forEach((T) => {
|
|
610
|
+
(p === void 0 || p === null && T.attributes[o] !== null) && (p = T.attributes[o]);
|
|
611
|
+
}) : i === "success" ? p = r?.min ?? void 0 : s === "success" && (p = n?.uniqueValueInfos?.[0]?.value ?? n?.uniqueValueInfos?.[1]?.value ?? void 0);
|
|
612
|
+
const N = u.codedValues;
|
|
613
|
+
return f(p) && (N ? p = N.find((T) => p === T.code)?.name || p : p = this._getDisplayString(p, { useFieldFormatting: !0 })), c`<div class="section"><div class="title">${m.fieldSampleValue}</div><div class=${I(t === "failed" && i === "failed" && s === "failed" || !f(p) ? "missing" : "")}>${t === "success" || i === "success" || s === "success" ? p?.toString() ?? g.allNulls : t === "failed" && i === "failed" && s === "failed" ? m.fieldSampleNotAvailable : m.fieldSampleRetrieving}</div></div>`;
|
|
586
614
|
}
|
|
587
615
|
renderFieldNumericFormat() {
|
|
588
|
-
const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName:
|
|
616
|
+
const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName: r, fieldInfo: s, layer: n } = t;
|
|
589
617
|
if (i || !["double", "long", "single"].includes(s.layerField.type))
|
|
590
618
|
return "";
|
|
591
|
-
const m = this.originalLayerSupportsFieldConfigs() ?
|
|
619
|
+
const m = this.originalLayerSupportsFieldConfigs() ? n.getFieldConfiguration(r) : void 0;
|
|
592
620
|
if (m?.fieldFormat) {
|
|
593
|
-
const { minimumFractionDigits:
|
|
594
|
-
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",
|
|
621
|
+
const { minimumFractionDigits: l, maximumFractionDigits: o } = m.fieldFormat;
|
|
622
|
+
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}", l.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}", o.toString())}</div></div>`;
|
|
595
623
|
}
|
|
596
|
-
const
|
|
597
|
-
if (
|
|
598
|
-
const
|
|
599
|
-
if (
|
|
600
|
-
const
|
|
601
|
-
if (f(
|
|
602
|
-
const
|
|
603
|
-
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",
|
|
624
|
+
const d = "popupTemplate" in n ? n.popupTemplate : void 0;
|
|
625
|
+
if (d?.fieldInfos) {
|
|
626
|
+
const l = d.fieldInfos?.filter((o) => o.fieldName === r);
|
|
627
|
+
if (l?.length) {
|
|
628
|
+
const o = l[0];
|
|
629
|
+
if (f(o?.format?.places)) {
|
|
630
|
+
const u = o.format.places;
|
|
631
|
+
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}", u.toString())}</div></div>`;
|
|
604
632
|
}
|
|
605
633
|
}
|
|
606
634
|
}
|
|
607
635
|
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`;
|
|
608
636
|
}
|
|
609
637
|
renderFieldStatistics() {
|
|
610
|
-
const { statisticsStatus: e, uniqueValuesStatus: t, hideStatistics: i, _messages:
|
|
611
|
-
return i ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") :
|
|
638
|
+
const { statisticsStatus: e, uniqueValuesStatus: t, hideStatistics: i, _messages: r, props: s } = this, { layer: n, fieldInfo: m } = s;
|
|
639
|
+
return i ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") : k(n) || E(n) || F(n) || y(n) || w(n) || ["long"].includes(m.layerField.type) ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") : c`<div class="section"><div class="title">${r.fieldStatistics}</div>${!this.isFinished(t) && !this.isFinished(e) ? this.renderWaitingForStatistics() : e === "failed" && t === "failed" ? this.renderNoStatistics() : this.renderStatistics()}</div>`;
|
|
640
|
+
}
|
|
641
|
+
renderWaitingForStatistics() {
|
|
642
|
+
const { _messages: e } = this;
|
|
643
|
+
return S("field-info-statistics-content", c`<div class="missing">${e.fieldStatisticsRetrieving}</div>`);
|
|
612
644
|
}
|
|
613
645
|
renderNoStatistics() {
|
|
614
646
|
const { _messages: e } = this;
|
|
615
|
-
return
|
|
647
|
+
return S("field-info-statistics-content", c`<div class="missing" ${b(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`);
|
|
616
648
|
}
|
|
617
649
|
renderStatistics() {
|
|
618
650
|
const { props: e } = this, { fieldInfo: t } = e;
|
|
@@ -635,58 +667,58 @@ class ge extends W {
|
|
|
635
667
|
renderNumberStatistics() {
|
|
636
668
|
const { statistics: e, _messages: t } = this;
|
|
637
669
|
if (!e)
|
|
638
|
-
return this.
|
|
670
|
+
return this.renderWaitingForStatistics();
|
|
639
671
|
const { statistics: i } = t;
|
|
640
|
-
return c`<div><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${f(e.sum) ? c`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>` : null}${f(e.min) ? c`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>` : null}${f(e.max) ? c`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>` : null}${f(e.avg) ? c`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>` : null}${f(e.stddev) ? c`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>` : null}${this.renderNullValues()}</div
|
|
672
|
+
return S("field-info-statistics-content", c`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${f(e.sum) ? c`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>` : null}${f(e.min) ? c`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>` : null}${f(e.max) ? c`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>` : null}${f(e.avg) ? c`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>` : null}${f(e.stddev) ? c`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>` : null}${this.renderNullValues()}</div>`);
|
|
641
673
|
}
|
|
642
674
|
renderStringStatistics() {
|
|
643
|
-
const { statistics: e, uniqueValuesStatus: t, _messages: i } = this, { statistics:
|
|
644
|
-
return c`<div><div class="statistics-row"><div>${
|
|
675
|
+
const { statistics: e, uniqueValuesStatus: t, _messages: i } = this, { statistics: r } = i;
|
|
676
|
+
return S("field-info-statistics-content", c`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${r.numberOfValues}</div>${t !== "success" ? c`<div class="missing">--</div>` : c`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`);
|
|
645
677
|
}
|
|
646
678
|
renderDateStatistics() {
|
|
647
|
-
const { statistics: e, view: t, props: i, _messages:
|
|
679
|
+
const { statistics: e, view: t, props: i, _messages: r } = this, { fieldInfo: s } = i;
|
|
648
680
|
if (!e || !f(e.max) || !f(e.min))
|
|
649
|
-
return this.
|
|
650
|
-
const { statistics:
|
|
651
|
-
let
|
|
652
|
-
|
|
653
|
-
let
|
|
654
|
-
|
|
681
|
+
return this.renderWaitingForStatistics();
|
|
682
|
+
const { statistics: n } = r, m = e.max - e.min, d = Math.floor(m / 31536e6);
|
|
683
|
+
let l = Math.floor((m - d * 31536e6) / 2628e6), o = Math.ceil((m - l * 2628e6) / 864e5);
|
|
684
|
+
o >= 30 && (l += 1, o = 0);
|
|
685
|
+
let u = d === 1 ? n.timeSpanOptions.year : d > 1 ? n.timeSpanOptions.years.replace("${years}", d.toString()) : "";
|
|
686
|
+
u += d > 0 && (l > 0 || o > 0) ? ", " : "", u += l === 1 ? n.timeSpanOptions.month : l > 1 ? n.timeSpanOptions.months.replace("${months}", l.toString()) : "", u += l > 0 && o > 0 ? ", " : "", u += o === 1 ? n.timeSpanOptions.day : o > 1 ? n.timeSpanOptions.days.replace("${days}", o.toString()) : "";
|
|
655
687
|
const g = s.simpleFieldType !== "timestamp-offset" || !t || t.timeZone !== "unknown", p = s.simpleFieldType === "time-only";
|
|
656
|
-
return c`<div><div class="statistics-row"><div>${
|
|
688
|
+
return S("field-info-statistics-content", c`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${g && f(e.min) ? c`<div class="statistics-row"><div>${p ? n.minimumTime : n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>` : null}${g && f(e.max) ? c`<div class="statistics-row"><div>${p ? n.maximumTime : n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>` : null}${g && f(e.avg) ? c`<div class="statistics-row"><div>${p ? n.averageTime : n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>` : null}${g && !p && f(e.min) && f(e.max) && m > 0 ? c`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${u}</div></div>` : null}${this.renderNullValues()}</div>`);
|
|
657
689
|
}
|
|
658
690
|
renderTopValues() {
|
|
659
|
-
const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props:
|
|
691
|
+
const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props: r } = this, { fieldInfo: s } = r, { statistics: n } = i;
|
|
660
692
|
if (e?.uniqueValueInfos?.length) {
|
|
661
693
|
const m = e.uniqueValueInfos;
|
|
662
|
-
m.sort((
|
|
663
|
-
const
|
|
664
|
-
let
|
|
665
|
-
return
|
|
666
|
-
|
|
667
|
-
}) :
|
|
694
|
+
m.sort((o, u) => o.count < u.count ? 1 : o.count > u.count ? -1 : 0);
|
|
695
|
+
const d = s.codedValues, l = m.filter((o) => o.value !== null).filter((o, u) => o && u < 10).map((o) => {
|
|
696
|
+
let u = o.value;
|
|
697
|
+
return d ? d.forEach((g) => {
|
|
698
|
+
u === g.code && (u = g.name);
|
|
699
|
+
}) : u = this._getDisplayString(u), c`<div class="statistics-row"><div class="data">${`${u}`}</div><div class="count">${this._printNumValue(o.count)}</div></div>`;
|
|
668
700
|
});
|
|
669
|
-
return
|
|
701
|
+
return l.length ? c`<div><div class="statistics-row-top-values"><div>${m.length > 10 ? n.topTenValues : n.topValues}</div><div>${n.count}</div></div>${l}</div>` : "";
|
|
670
702
|
} else
|
|
671
|
-
return c`<div><div class="statistics-row-top-values"><div>${
|
|
703
|
+
return c`<div><div class="statistics-row-top-values"><div>${n.topValues}</div><div>${n.count}</div></div><div class="statistics-row"><div class="missing">${t === "failed" ? i.fieldUniqueValuesNotAvailable : i.fieldSampleRetrieving}</div></div></div>`;
|
|
672
704
|
}
|
|
673
705
|
renderNullValues() {
|
|
674
|
-
const { statistics: e, uniqueValues: t, _messages: i } = this, { statistics:
|
|
706
|
+
const { statistics: e, uniqueValues: t, _messages: i } = this, { statistics: r } = i;
|
|
675
707
|
let s = e?.nullcount;
|
|
676
708
|
if (!f(s) && t) {
|
|
677
|
-
const
|
|
678
|
-
for (let m = 0; m <
|
|
679
|
-
const
|
|
680
|
-
if (
|
|
681
|
-
s =
|
|
709
|
+
const n = t.uniqueValueInfos;
|
|
710
|
+
for (let m = 0; m < n.length; m++) {
|
|
711
|
+
const d = n[m];
|
|
712
|
+
if (d.value === null) {
|
|
713
|
+
s = d.count;
|
|
682
714
|
break;
|
|
683
715
|
}
|
|
684
716
|
}
|
|
685
717
|
}
|
|
686
|
-
return c`<div class="statistics-row"><div>${
|
|
718
|
+
return c`<div class="statistics-row"><div>${r.numberOfNulls}</div>${f(s) ? c`<div class="data">${this._printNumValue(s)}</div>` : c`<div class="missing">--</div>`}</div>`;
|
|
687
719
|
}
|
|
688
720
|
}
|
|
689
|
-
|
|
721
|
+
H("arcgis-field-info", Fe);
|
|
690
722
|
export {
|
|
691
|
-
|
|
723
|
+
Fe as ArcgisFieldInfo
|
|
692
724
|
};
|