@arcgis/common-components 5.1.0-next.99 → 5.1.0
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/README.md +2 -2
- package/dist/cdn/2PVT6EXO.js +2 -0
- package/dist/cdn/{DDJDHAHT.js → 4QMKUU52.js} +1 -1
- package/dist/cdn/{O3CBCQNL.js → 6VNQBMLG.js} +1 -1
- package/dist/cdn/CL22U6KJ.js +2 -0
- package/dist/cdn/{MNN3QF54.js → F656IS64.js} +1 -1
- package/dist/cdn/{OQF4LYVE.js → F6JAAKQK.js} +1 -1
- package/dist/cdn/{JRF33N6C.js → HUFWK3KQ.js} +1 -1
- package/dist/cdn/{JJZBCHU4.js → HXMYYN6V.js} +2 -2
- package/dist/cdn/{GPVWNUMW.js → I6VIEGIZ.js} +1 -1
- package/dist/cdn/IHF3GKDG.js +2 -0
- package/dist/cdn/{YZGTCNEQ.js → KLJNUBIC.js} +1 -1
- package/dist/cdn/KWGVNEYU.js +2 -0
- package/dist/cdn/L4DAWBCA.js +2 -0
- package/dist/cdn/{P4CF7V4U.js → PKYZFAIY.js} +1 -1
- package/dist/cdn/{GSNPEBGQ.js → PP2HCXTR.js} +2 -2
- package/dist/cdn/S3PANRN4.js +2 -0
- package/dist/cdn/{WG5GA6QX.js → U4GXIFGD.js} +1 -1
- package/dist/cdn/UAC6OWZ2.js +2 -0
- package/dist/cdn/VHYBQSUR.js +2 -0
- package/dist/cdn/{QEPJM6XG.js → Y77B4DB6.js} +1 -1
- package/dist/cdn/{3Y4H3CAQ.js → Z7WR3HDB.js} +1 -1
- package/dist/cdn/{GFUGR2W7.js → ZJXP3TWP.js} +1 -1
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/{spatial-reference-picker → coordinate-system-picker}/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/field-info/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-utils.js +78 -0
- package/dist/chunks/runtime.js +3 -3
- package/dist/components/arcgis-ckeditor5/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.d.ts +1 -0
- package/dist/components/arcgis-color-input/customElement.js +11 -8
- package/dist/components/{arcgis-spatial-reference-picker → arcgis-coordinate-system-picker}/customElement.d.ts +8 -4
- package/dist/components/{arcgis-spatial-reference-picker → arcgis-coordinate-system-picker}/customElement.js +6 -5
- package/dist/components/arcgis-coordinate-system-picker/index.js +3 -0
- package/dist/components/{arcgis-spatial-reference-picker-tree → arcgis-coordinate-system-picker-tree}/customElement.d.ts +2 -2
- package/dist/components/{arcgis-spatial-reference-picker-tree → arcgis-coordinate-system-picker-tree}/customElement.js +8 -8
- package/dist/components/arcgis-field-info/customElement.d.ts +2 -0
- package/dist/components/arcgis-field-info/customElement.js +211 -208
- package/dist/components/arcgis-field-info/utils/basic.d.ts +23 -17
- package/dist/components/arcgis-field-pick-list/customElement.js +72 -75
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +19 -17
- 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.js +48 -48
- package/dist/components/arcgis-ticks/customElement.js +21 -21
- package/dist/components/arcgis-unique-values-list/customElement.js +73 -72
- package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +19 -12
- 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/dist/index.d.ts +20 -20
- package/dist/loader.js +5 -5
- package/dist/types/lumina.d.ts +12 -12
- package/dist/types/preact.d.ts +14 -14
- package/dist/types/react.d.ts +16 -16
- package/dist/types/stencil.d.ts +12 -12
- package/package.json +8 -8
- package/dist/cdn/43KGVFBF.js +0 -2
- package/dist/cdn/B43M633Q.js +0 -2
- package/dist/cdn/H74W6KYI.js +0 -2
- package/dist/cdn/LVSH5I3Q.js +0 -2
- package/dist/cdn/MHJWVKG5.js +0 -2
- package/dist/cdn/O6ZASYX6.js +0 -2
- package/dist/cdn/TTV4Z2RR.js +0 -2
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ar.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.bg.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.bs.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ca.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.cs.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.da.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.de.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.el.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.es.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.et.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.fi.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.fr.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.he.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.hr.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.hu.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.id.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.it.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ja.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ko.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.lt.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.lv.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.nl.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.no.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pl.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pt-BR.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pt-PT.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ro.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ru.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sk.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sl.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sr.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sv.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.th.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.tr.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.uk.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.vi.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-CN.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-HK.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-TW.json +0 -1
- package/dist/components/arcgis-spatial-reference-picker/index.js +0 -3
- /package/dist/cdn/assets/{spatial-reference-picker → coordinate-system-picker}/t9n/messages.en-US.json +0 -0
- /package/dist/components/{arcgis-spatial-reference-picker → arcgis-coordinate-system-picker}/index.d.ts +0 -0
- /package/dist/components/{arcgis-spatial-reference-picker-tree → arcgis-coordinate-system-picker-tree}/index.d.ts +0 -0
- /package/dist/components/{arcgis-spatial-reference-picker-tree → arcgis-coordinate-system-picker-tree}/index.js +0 -0
|
@@ -1,95 +1,96 @@
|
|
|
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 { ref as
|
|
6
|
-
import { LitElement as
|
|
7
|
-
import { Task as
|
|
8
|
-
import { log as
|
|
9
|
-
import
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { i as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
import { c as W } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as Q, html as c } from "lit";
|
|
4
|
+
import { keyed as b } from "lit/directives/keyed.js";
|
|
5
|
+
import { ref as O } from "lit/directives/ref.js";
|
|
6
|
+
import { LitElement as H, createEvent as D, safeClassMap as V } from "@arcgis/lumina";
|
|
7
|
+
import { Task as J } from "@lit/task";
|
|
8
|
+
import { log as q, composeMissingPropertyMessage as L } from "@arcgis/toolkit/log";
|
|
9
|
+
import j from "@arcgis/core/config.js";
|
|
10
|
+
import * as x from "@arcgis/core/core/reactiveUtils.js";
|
|
11
|
+
import * as h from "@arcgis/core/intl.js";
|
|
12
|
+
import * as A from "@arcgis/core/applications/PortalApp/layerUtils.js";
|
|
13
|
+
import * as I from "@arcgis/core/core/lang.js";
|
|
14
|
+
import z from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
15
|
+
import B from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
16
|
+
import { i as f } from "../../chunks/commonFunctions.js";
|
|
17
|
+
import { i as y, a as w, b as S, c as Z, d as T, e as P, f as v, g as F, h as M, j as K, k as X, l as Y, m as _, n as ee, o as G, p as te, q as k, r as E } from "../../chunks/layer-utils.js";
|
|
18
|
+
import ie from "@arcgis/core/rest/support/Query.js";
|
|
19
|
+
import { u as se } from "../../chunks/useT9n.js";
|
|
20
|
+
function ae(r) {
|
|
21
|
+
return r.associatedLayer?.url;
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
+
const re = {
|
|
23
24
|
dateStyle: "short",
|
|
24
25
|
timeStyle: "short"
|
|
25
|
-
},
|
|
26
|
+
}, ne = {
|
|
26
27
|
timeStyle: "medium"
|
|
27
28
|
};
|
|
28
|
-
function
|
|
29
|
-
const { layer: e, fieldName: t } =
|
|
29
|
+
function oe(r) {
|
|
30
|
+
const { layer: e, fieldName: t } = r;
|
|
30
31
|
let i;
|
|
31
|
-
const n =
|
|
32
|
+
const n = A.supportsFieldConfiguration(e);
|
|
32
33
|
let s;
|
|
33
34
|
"popupTemplate" in e && (s = e.popupTemplate);
|
|
34
|
-
const
|
|
35
|
-
return
|
|
36
|
-
const
|
|
35
|
+
const a = s ? s.fieldInfos : [];
|
|
36
|
+
return U(r)?.filter((u) => u.name === t).forEach((u) => {
|
|
37
|
+
const o = !n && a ? a.filter((g) => g.fieldName === u.name) : void 0, l = n ? e.getFieldAlias(t) : o?.length ? o[0].label : u.alias;
|
|
37
38
|
/^raster.(item|service)pixelvalue/iu.test(t) && (u.type = "double");
|
|
38
|
-
const
|
|
39
|
+
const d = {
|
|
39
40
|
layerField: u,
|
|
40
|
-
label:
|
|
41
|
+
label: l || u.name
|
|
41
42
|
};
|
|
42
|
-
|
|
43
|
+
d.codedValues = ce(t, r), de(d), d.simpleFieldType && (i = d);
|
|
43
44
|
}), i;
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
const { layer: e } =
|
|
47
|
-
return e
|
|
46
|
+
function U(r) {
|
|
47
|
+
const { layer: e } = r;
|
|
48
|
+
return y(e) || w(e) || T(e) && e.rasterFields.length ? e.rasterFields : e.fields;
|
|
48
49
|
}
|
|
49
|
-
async function
|
|
50
|
-
|
|
51
|
-
const { layer: e, view: t } =
|
|
52
|
-
if (e
|
|
50
|
+
async function R(r) {
|
|
51
|
+
r.statisticsStatus = "in-progress";
|
|
52
|
+
const { layer: e, view: t } = r;
|
|
53
|
+
if (y(e) || w(e) || F(e) || S(e))
|
|
53
54
|
throw new Error("could not get feature count");
|
|
54
55
|
try {
|
|
55
|
-
return await
|
|
56
|
+
return await fe(e, t);
|
|
56
57
|
} catch {
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
async function
|
|
61
|
-
const { layer: e, view: t, fieldName: i, fieldInfo: n } =
|
|
62
|
-
if (e
|
|
61
|
+
async function le(r) {
|
|
62
|
+
const { layer: e, view: t, fieldName: i, fieldInfo: n } = r;
|
|
63
|
+
if (y(e) || w(e) || S(e))
|
|
63
64
|
throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");
|
|
64
65
|
if (!n || n.layerField.type === "oid" || n.layerField.type === "guid" || n.layerField.type === "global-id")
|
|
65
|
-
return { totalCount: await
|
|
66
|
+
return { totalCount: await R(r), nullcount: 0 };
|
|
66
67
|
try {
|
|
67
|
-
const s = await
|
|
68
|
+
const s = await z({
|
|
68
69
|
layer: e,
|
|
69
70
|
view: t,
|
|
70
71
|
field: i,
|
|
71
72
|
outStatisticTypes: { exclude: ["median"] }
|
|
72
73
|
});
|
|
73
|
-
if (!
|
|
74
|
+
if (!f(s.count))
|
|
74
75
|
throw new Error("could not get statistics");
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
76
|
+
const a = "sourceJSON" in e && e.sourceJSON.maxRecordCount === s.count;
|
|
77
|
+
if (f(s.nullcount) && !a)
|
|
77
78
|
return { ...s, totalCount: s.count + s.nullcount };
|
|
78
79
|
{
|
|
79
|
-
const m = await
|
|
80
|
+
const m = await R(r);
|
|
80
81
|
return { ...s, totalCount: m };
|
|
81
82
|
}
|
|
82
83
|
} catch {
|
|
83
84
|
throw new Error("could not get statistics");
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
async function
|
|
87
|
-
const { layer: e, view: t, fieldName: i } =
|
|
88
|
-
if (e
|
|
87
|
+
async function ue(r) {
|
|
88
|
+
const { layer: e, view: t, fieldName: i } = r;
|
|
89
|
+
if (y(e) || w(e) || S(e))
|
|
89
90
|
throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");
|
|
90
|
-
e
|
|
91
|
+
Z(e) && (e.outFields = ["*"]);
|
|
91
92
|
try {
|
|
92
|
-
return await
|
|
93
|
+
return await B({
|
|
93
94
|
layer: e,
|
|
94
95
|
view: t,
|
|
95
96
|
field: i
|
|
@@ -98,29 +99,29 @@ async function W(a) {
|
|
|
98
99
|
throw new Error("could not get unique values");
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
function
|
|
102
|
-
switch (
|
|
102
|
+
function de(r) {
|
|
103
|
+
switch (r.layerField.type) {
|
|
103
104
|
case "string":
|
|
104
|
-
|
|
105
|
+
r.simpleFieldType = "string";
|
|
105
106
|
break;
|
|
106
107
|
case "date":
|
|
107
|
-
|
|
108
|
+
r.simpleFieldType = "date";
|
|
108
109
|
break;
|
|
109
110
|
case "timestamp-offset":
|
|
110
|
-
|
|
111
|
+
r.simpleFieldType = "timestamp-offset";
|
|
111
112
|
break;
|
|
112
113
|
case "date-only":
|
|
113
|
-
|
|
114
|
+
r.simpleFieldType = "date-only";
|
|
114
115
|
break;
|
|
115
116
|
case "time-only":
|
|
116
|
-
|
|
117
|
+
r.simpleFieldType = "time-only";
|
|
117
118
|
break;
|
|
118
119
|
case "oid":
|
|
119
|
-
|
|
120
|
+
r.simpleFieldType = "oid";
|
|
120
121
|
break;
|
|
121
122
|
case "guid":
|
|
122
123
|
case "global-id":
|
|
123
|
-
|
|
124
|
+
r.simpleFieldType = "guid";
|
|
124
125
|
break;
|
|
125
126
|
case "small-integer":
|
|
126
127
|
case "big-integer":
|
|
@@ -128,52 +129,52 @@ function H(a) {
|
|
|
128
129
|
case "single":
|
|
129
130
|
case "double":
|
|
130
131
|
case "long":
|
|
131
|
-
|
|
132
|
+
r.simpleFieldType = "number";
|
|
132
133
|
break;
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
+
function ce(r, e) {
|
|
136
137
|
const { layer: t } = e;
|
|
137
|
-
if (t
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
return [{ code:
|
|
138
|
+
if (P(t) && t.subtypeField === r) {
|
|
139
|
+
const o = t.parent?.subtypes?.find((l) => l.code === t.subtypeCode);
|
|
140
|
+
if (o)
|
|
141
|
+
return [{ code: o.code, name: o.name }];
|
|
141
142
|
}
|
|
142
|
-
if (t
|
|
143
|
+
if (!v(t) && !T(t))
|
|
143
144
|
return;
|
|
144
|
-
const i = t
|
|
145
|
+
const i = v(t) ? t.typeIdField : void 0, n = v(t) ? t.types : void 0;
|
|
145
146
|
let s;
|
|
146
|
-
const m =
|
|
147
|
-
return t
|
|
148
|
-
(
|
|
147
|
+
const m = U(e)?.find((o) => o.name === r), u = m?.domain;
|
|
148
|
+
return v(t) && i && n ? (i === r ? s = n.map(
|
|
149
|
+
(o) => (
|
|
149
150
|
// fake coded values
|
|
150
151
|
{
|
|
151
|
-
code:
|
|
152
|
-
name:
|
|
152
|
+
code: o.id,
|
|
153
|
+
name: o.name
|
|
153
154
|
}
|
|
154
155
|
)
|
|
155
|
-
) : (s = [], n.forEach((
|
|
156
|
-
if (!
|
|
157
|
-
const
|
|
158
|
-
|
|
156
|
+
) : (s = [], n.forEach((o) => {
|
|
157
|
+
if (!o.domains[r] || o.domains[r].type === "inherited") {
|
|
158
|
+
const l = u;
|
|
159
|
+
l?.codedValues && l.codedValues.forEach((d) => {
|
|
159
160
|
let g = !1;
|
|
160
|
-
s.forEach((
|
|
161
|
-
|
|
162
|
-
}), g || s.push(
|
|
161
|
+
s.forEach((p) => {
|
|
162
|
+
p.code === d.code && (g = !0, `, ${p.name},`.includes(`, ${d.name},`) || (p.name += `, ${d.name}`));
|
|
163
|
+
}), g || s.push(I.clone(d));
|
|
163
164
|
});
|
|
164
|
-
} else
|
|
165
|
-
let
|
|
165
|
+
} else o.domains[r].codedValues && o.domains[r].codedValues.forEach((l) => {
|
|
166
|
+
let d = !1;
|
|
166
167
|
s.forEach((g) => {
|
|
167
|
-
g.code ===
|
|
168
|
-
}),
|
|
168
|
+
g.code === l.code && (d = !0, `, ${g.name},`.includes(`, ${l.name},`) || (g.name += `, ${l.name}`));
|
|
169
|
+
}), d || s.push(I.clone(l));
|
|
169
170
|
});
|
|
170
|
-
})), !s.length && u?.codedValues && (s =
|
|
171
|
+
})), !s.length && u?.codedValues && (s = I.clone(u.codedValues))) : u?.codedValues && (s = m.domain.codedValues), s?.length ? s : void 0;
|
|
171
172
|
}
|
|
172
|
-
async function
|
|
173
|
-
const { view: e, layer: t } =
|
|
174
|
-
if (t
|
|
173
|
+
async function me(r) {
|
|
174
|
+
const { view: e, layer: t } = r;
|
|
175
|
+
if (T(t) || y(t) || w(t))
|
|
175
176
|
throw new Error("could not get feature");
|
|
176
|
-
if (t
|
|
177
|
+
if (v(t) && !t.url || M(t)) {
|
|
177
178
|
const i = t.createQuery();
|
|
178
179
|
i.start = 0, i.num = 5, i.outFields = ["*"];
|
|
179
180
|
const n = await t.queryFeatures(i);
|
|
@@ -182,72 +183,72 @@ async function J(a) {
|
|
|
182
183
|
throw new Error("could not get feature");
|
|
183
184
|
} else {
|
|
184
185
|
if (!e)
|
|
185
|
-
return await
|
|
186
|
+
return await C(r);
|
|
186
187
|
let i;
|
|
187
|
-
if (t
|
|
188
|
+
if (P(t) || K(t)) {
|
|
188
189
|
let s = t.parent;
|
|
189
|
-
for (;
|
|
190
|
+
for (; X(s) || Y(s); )
|
|
190
191
|
s = s.parent;
|
|
191
192
|
i = await e.whenLayerView(s);
|
|
192
193
|
} else
|
|
193
194
|
i = await e.whenLayerView(t);
|
|
194
|
-
if (i.availableFields.length === t.fields.length ||
|
|
195
|
-
const s =
|
|
195
|
+
if (i.availableFields.length === t.fields.length || (F(t) || _(t)) && i.availableFields.length > 0) {
|
|
196
|
+
const s = i.createQuery();
|
|
196
197
|
s.start = 0, s.num = 5, s.outFields = ["*"];
|
|
197
|
-
const
|
|
198
|
-
return
|
|
198
|
+
const a = await i.queryFeatures(s);
|
|
199
|
+
return a.features?.length ? a : await C(r);
|
|
199
200
|
} else
|
|
200
|
-
return await
|
|
201
|
+
return await C(r);
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
|
-
async function
|
|
204
|
-
const { layer: e } =
|
|
205
|
-
if (
|
|
204
|
+
async function C(r) {
|
|
205
|
+
const { layer: e } = r;
|
|
206
|
+
if (T(e) || y(e) || F(e) || _(e))
|
|
206
207
|
throw new Error("cannot get feature from service");
|
|
207
|
-
const t = new
|
|
208
|
+
const t = new ie({
|
|
208
209
|
where: "1=1",
|
|
209
210
|
outFields: ["*"],
|
|
210
211
|
returnGeometry: !1
|
|
211
212
|
});
|
|
212
213
|
return "sourceJSON" in e && e.sourceJSON?.advancedQueryCapabilities?.supportsPagination && (t.num = 1), await e.queryFeatures(t);
|
|
213
214
|
}
|
|
214
|
-
async function
|
|
215
|
-
if (
|
|
216
|
-
return await
|
|
217
|
-
if (
|
|
218
|
-
return await
|
|
219
|
-
if (e && (
|
|
220
|
-
return await
|
|
215
|
+
async function fe(r, e) {
|
|
216
|
+
if (Z(r))
|
|
217
|
+
return await pe(r);
|
|
218
|
+
if (v(r) || ee(r) || G(r) || M(r) || te(r))
|
|
219
|
+
return await r.queryFeatureCount();
|
|
220
|
+
if (e && (F(r) || _(r)))
|
|
221
|
+
return await ge(r, e);
|
|
221
222
|
}
|
|
222
|
-
async function
|
|
223
|
-
const e =
|
|
223
|
+
async function pe(r) {
|
|
224
|
+
const e = r.createQuery();
|
|
224
225
|
e.outFields = ["*"];
|
|
225
|
-
const t = await
|
|
226
|
+
const t = await r.queryFeatures(e);
|
|
226
227
|
if (t.features.length)
|
|
227
228
|
return t.features.length;
|
|
228
229
|
throw new Error("could not get feature count");
|
|
229
230
|
}
|
|
230
|
-
async function
|
|
231
|
-
return await (await e.whenLayerView(
|
|
231
|
+
async function ge(r, e) {
|
|
232
|
+
return await (await e.whenLayerView(r)).queryFeatureCount();
|
|
232
233
|
}
|
|
233
|
-
const
|
|
234
|
-
class
|
|
234
|
+
const he = Q`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-foreground-1)}.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}`;
|
|
235
|
+
class ve extends H {
|
|
235
236
|
constructor() {
|
|
236
|
-
super(...arguments), this._messages =
|
|
237
|
+
super(...arguments), this._messages = se({ blocking: !0 }), this._propWatcherTask = new J(this, {
|
|
237
238
|
task: async ([e, t]) => {
|
|
238
|
-
const i =
|
|
239
|
-
if (
|
|
239
|
+
const i = f(e) && f(t);
|
|
240
|
+
if (f(e) || q("error", this, L("layer")), f(t) || q("error", this, L("fieldName")), !i)
|
|
240
241
|
throw new Error();
|
|
241
242
|
await this.processProps(), this._propWatcherTask.autoRun = !1;
|
|
242
243
|
},
|
|
243
244
|
args: () => [this.layer, this.fieldName]
|
|
244
|
-
}), this.oneFeatureResponseStatus = "missing", this.statisticsStatus = "missing", this.uniqueValuesStatus = "missing", this.hideAlias = !1, this.hideNumericFormat = !1, this.hideStatistics = !1, this.arcgisComplete =
|
|
245
|
+
}), this.oneFeatureResponseStatus = "missing", this.statisticsStatus = "missing", this.uniqueValuesStatus = "missing", this.hideAlias = !1, this.hideNumericFormat = !1, this.hideStatistics = !1, this.arcgisComplete = D(), this.arcgisFieldInfoComplete = D();
|
|
245
246
|
}
|
|
246
247
|
static {
|
|
247
248
|
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 };
|
|
248
249
|
}
|
|
249
250
|
static {
|
|
250
|
-
this.styles =
|
|
251
|
+
this.styles = he;
|
|
251
252
|
}
|
|
252
253
|
async refresh() {
|
|
253
254
|
await this.processProps(), this.requestUpdate();
|
|
@@ -261,27 +262,27 @@ class Y extends x {
|
|
|
261
262
|
return;
|
|
262
263
|
let s;
|
|
263
264
|
if (t.declaredClass === "esri.layers.support.Sublayer") {
|
|
264
|
-
const
|
|
265
|
-
e && await
|
|
265
|
+
const a = t;
|
|
266
|
+
e && await x.whenOnce(() => !e.updating), s = await a.createFeatureLayer(), await s?.load();
|
|
266
267
|
}
|
|
267
268
|
this.props = {
|
|
268
269
|
view: e,
|
|
269
270
|
layer: s ?? t,
|
|
270
271
|
fieldName: i,
|
|
271
272
|
hideStatistics: n
|
|
272
|
-
}, this.props.fieldInfo =
|
|
273
|
-
urls: `${
|
|
274
|
-
before(
|
|
275
|
-
|
|
273
|
+
}, this.props.fieldInfo = oe(this.props), G(t) && j.request.interceptors?.push({
|
|
274
|
+
urls: `${ae(t)}/${t.layerId}`,
|
|
275
|
+
before(a) {
|
|
276
|
+
a.requestOptions.authMode = "no-prompt";
|
|
276
277
|
}
|
|
277
278
|
}), this.oneFeatureResponseStatus = "in-progress";
|
|
278
279
|
try {
|
|
279
|
-
const
|
|
280
|
-
this.oneFeatureResponse =
|
|
280
|
+
const a = await me(this.props);
|
|
281
|
+
this.oneFeatureResponse = a, this.oneFeatureResponseStatus = "success";
|
|
281
282
|
} catch {
|
|
282
283
|
this.oneFeatureResponseStatus = "failed";
|
|
283
284
|
}
|
|
284
|
-
if (t
|
|
285
|
+
if (F(t) || k(t) || E(t)) {
|
|
285
286
|
this.uniqueValuesStatus = "failed", this.statisticsStatus = "failed";
|
|
286
287
|
return;
|
|
287
288
|
}
|
|
@@ -290,8 +291,8 @@ class Y extends x {
|
|
|
290
291
|
else {
|
|
291
292
|
this.uniqueValuesStatus = "in-progress";
|
|
292
293
|
try {
|
|
293
|
-
const
|
|
294
|
-
this.uniqueValues =
|
|
294
|
+
const a = await ue(this.props);
|
|
295
|
+
this.uniqueValues = a, a?.uniqueValueInfos?.length ? this.uniqueValuesStatus = "success" : this.uniqueValuesStatus = "failed";
|
|
295
296
|
} catch {
|
|
296
297
|
this.uniqueValuesStatus = "failed";
|
|
297
298
|
}
|
|
@@ -301,19 +302,19 @@ class Y extends x {
|
|
|
301
302
|
else {
|
|
302
303
|
this.statisticsStatus = "in-progress";
|
|
303
304
|
try {
|
|
304
|
-
const
|
|
305
|
-
if (!
|
|
305
|
+
const a = await le(this.props);
|
|
306
|
+
if (!f(a.totalCount) && f(a.count) && this.uniqueValuesStatus === "success") {
|
|
306
307
|
const m = this.uniqueValues?.uniqueValueInfos ?? [];
|
|
307
308
|
for (let u = 0; u < m.length; u++) {
|
|
308
|
-
const
|
|
309
|
-
if (
|
|
310
|
-
|
|
309
|
+
const o = m[u];
|
|
310
|
+
if (o.value === null) {
|
|
311
|
+
a.totalCount = o.count + a.count;
|
|
311
312
|
break;
|
|
312
313
|
}
|
|
313
314
|
}
|
|
314
|
-
|
|
315
|
+
a.totalCount ??= a.count;
|
|
315
316
|
}
|
|
316
|
-
this.statistics =
|
|
317
|
+
this.statistics = a, this.statisticsStatus = "success";
|
|
317
318
|
} catch {
|
|
318
319
|
this.statisticsStatus = "failed";
|
|
319
320
|
}
|
|
@@ -323,7 +324,7 @@ class Y extends x {
|
|
|
323
324
|
setUpTimeZoneHandle() {
|
|
324
325
|
this.timeZoneHandle?.remove();
|
|
325
326
|
const { props: e } = this, { view: t, fieldInfo: i } = e;
|
|
326
|
-
["date", "timestamp-offset"].includes(this._getStatisticsType(i)) && (this.timeZoneHandle =
|
|
327
|
+
["date", "timestamp-offset"].includes(this._getStatisticsType(i)) && (this.timeZoneHandle = x.watch(() => t?.timeZone, () => {
|
|
327
328
|
this.requestUpdate();
|
|
328
329
|
}));
|
|
329
330
|
}
|
|
@@ -372,6 +373,8 @@ class Y extends x {
|
|
|
372
373
|
if (e.codedValues)
|
|
373
374
|
return "string";
|
|
374
375
|
switch (e.layerField.valueType) {
|
|
376
|
+
// @ts-ignore - waiting on typings...
|
|
377
|
+
case "url":
|
|
375
378
|
case "binary":
|
|
376
379
|
case "description":
|
|
377
380
|
case "location-or-place-name":
|
|
@@ -444,29 +447,29 @@ class Y extends x {
|
|
|
444
447
|
}
|
|
445
448
|
_getDateString(e, t) {
|
|
446
449
|
const { view: i } = this.props;
|
|
447
|
-
return i && i.timeZone === "unknown" ?
|
|
450
|
+
return i && i.timeZone === "unknown" ? h.formatDate(e, {
|
|
448
451
|
...this.getIntlDateTimeFormattingOptions("short-date-short-time", t),
|
|
449
452
|
timeZone: "utc"
|
|
450
|
-
}) :
|
|
453
|
+
}) : h.formatDate(e, {
|
|
451
454
|
...this.getIntlDateTimeFormattingOptions("short-date-short-time", t),
|
|
452
455
|
timeZone: i?.timeZone || "system"
|
|
453
456
|
});
|
|
454
457
|
}
|
|
455
458
|
_getTimestampOffsetString(e, t) {
|
|
456
459
|
const { view: i } = this.props;
|
|
457
|
-
return typeof e == "string" ? i && i.timeZone === "unknown" ?
|
|
460
|
+
return typeof e == "string" ? i && i.timeZone === "unknown" ? h.formatTimestamp(e, {
|
|
458
461
|
...this.getIntlDateTimeFormattingOptions("short-date-short-time", t),
|
|
459
462
|
timeZone: "utc"
|
|
460
|
-
}) :
|
|
463
|
+
}) : h.formatTimestamp(e, {
|
|
461
464
|
...this.getIntlDateTimeFormattingOptions("short-date-short-time", t),
|
|
462
465
|
timeZone: i?.timeZone || "system"
|
|
463
466
|
}) : this._getDateString(e, t);
|
|
464
467
|
}
|
|
465
468
|
_getDateOnlyString(e, t) {
|
|
466
|
-
return
|
|
469
|
+
return h.formatDateOnly(e, this.getIntlDateTimeFormattingOptions("short-date", t));
|
|
467
470
|
}
|
|
468
471
|
_getTimeOnlyString(e, t) {
|
|
469
|
-
return typeof e == "string" ?
|
|
472
|
+
return typeof e == "string" ? h.formatTimeOnly(e, this.getIntlDateTimeFormattingOptions("short-date-long-time", t)) : h.formatDate(e, {
|
|
470
473
|
...this.getIntlDateTimeFormattingOptions("long-time", {
|
|
471
474
|
...t,
|
|
472
475
|
isTimeOnly: !0
|
|
@@ -479,10 +482,10 @@ class Y extends x {
|
|
|
479
482
|
}
|
|
480
483
|
_getNumberString(e, t) {
|
|
481
484
|
const i = t?.useFieldFormatting ? e : Math.round(e * 100) / 100;
|
|
482
|
-
return
|
|
485
|
+
return h.formatNumber(i, this.getIntlNumberFormattingOptions(t));
|
|
483
486
|
}
|
|
484
487
|
_printNumValue(e, t) {
|
|
485
|
-
return
|
|
488
|
+
return f(e) ? this._getNumberString(e, t) : "--";
|
|
486
489
|
}
|
|
487
490
|
_setCompleteRef() {
|
|
488
491
|
this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit();
|
|
@@ -496,7 +499,7 @@ class Y extends x {
|
|
|
496
499
|
if (!e?.useFieldFormatting)
|
|
497
500
|
return t ? {
|
|
498
501
|
useGrouping: ["always", "auto"].includes(t.useGrouping)
|
|
499
|
-
} :
|
|
502
|
+
} : h.convertNumberFormatToIntlOptions({
|
|
500
503
|
digitSeparator: this.getPopupTemplateFieldInfo()?.format?.digitSeparator ?? !0
|
|
501
504
|
});
|
|
502
505
|
const i = t ? {
|
|
@@ -507,7 +510,7 @@ class Y extends x {
|
|
|
507
510
|
if (i)
|
|
508
511
|
return i;
|
|
509
512
|
const n = this.getPopupTemplateFieldInfo();
|
|
510
|
-
return
|
|
513
|
+
return h.convertNumberFormatToIntlOptions({
|
|
511
514
|
digitSeparator: n?.format?.digitSeparator ?? !0,
|
|
512
515
|
places: n?.format?.places ?? 2
|
|
513
516
|
});
|
|
@@ -515,7 +518,7 @@ class Y extends x {
|
|
|
515
518
|
getIntlDateTimeFormattingOptions(e, t) {
|
|
516
519
|
const i = this.getCurrentFieldFormat();
|
|
517
520
|
if (!t?.useFieldFormatting)
|
|
518
|
-
return i ? t?.isTimeOnly ?
|
|
521
|
+
return i ? t?.isTimeOnly ? ne : re : h.convertDateFormatToIntlOptions(e);
|
|
519
522
|
const n = i ? {
|
|
520
523
|
dateStyle: t?.isTimeOnly ? void 0 : i.dateStyle ?? void 0,
|
|
521
524
|
// year/month is overridden if dateStyle is set
|
|
@@ -527,11 +530,11 @@ class Y extends x {
|
|
|
527
530
|
if (n)
|
|
528
531
|
return n;
|
|
529
532
|
const s = this.getPopupTemplateFieldInfo();
|
|
530
|
-
return
|
|
533
|
+
return h.convertDateFormatToIntlOptions(s?.format?.dateFormat ?? e);
|
|
531
534
|
}
|
|
532
535
|
originalLayerSupportsFieldConfigs() {
|
|
533
536
|
const { layer: e } = this;
|
|
534
|
-
return
|
|
537
|
+
return A.supportsFieldConfiguration(e);
|
|
535
538
|
}
|
|
536
539
|
getPopupTemplateFieldInfo() {
|
|
537
540
|
const { props: e } = this, { layer: t, fieldName: i } = e;
|
|
@@ -541,75 +544,75 @@ class Y extends x {
|
|
|
541
544
|
return this._propWatcherTask.render({
|
|
542
545
|
complete: () => {
|
|
543
546
|
const { props: e } = this, { fieldInfo: t } = e;
|
|
544
|
-
return t ?
|
|
547
|
+
return t ? c`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>` : "";
|
|
545
548
|
},
|
|
546
549
|
error: () => ""
|
|
547
550
|
});
|
|
548
551
|
}
|
|
549
552
|
renderFieldType() {
|
|
550
553
|
const { _messages: e, props: t } = this, { fieldInfo: i } = t, n = this._getFieldTypeLabel(i.layerField.type);
|
|
551
|
-
return
|
|
554
|
+
return c`<div class="section"><div class="title">${e.fieldType}</div><div>${n}</div></div>`;
|
|
552
555
|
}
|
|
553
556
|
renderFieldAlias() {
|
|
554
557
|
const { _messages: e, props: t, hideAlias: i } = this, { fieldInfo: n } = t;
|
|
555
|
-
return i ? "" :
|
|
558
|
+
return i ? "" : c`<div class="section"><div class="title">${e.fieldAlias}</div><div>${n.label}</div></div>`;
|
|
556
559
|
}
|
|
557
560
|
renderFieldDescription() {
|
|
558
561
|
const { _messages: e, props: t } = this, { layer: i } = t;
|
|
559
|
-
if (i
|
|
562
|
+
if (!v(i))
|
|
560
563
|
return "";
|
|
561
564
|
const { fieldInfo: n } = t, s = n.layerField.description;
|
|
562
|
-
return
|
|
565
|
+
return c`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${V({
|
|
563
566
|
missing: !s
|
|
564
567
|
})}>${s || e.fieldDescriptionNotSet}</div></div>`;
|
|
565
568
|
}
|
|
566
569
|
renderFieldValueType() {
|
|
567
570
|
const { _messages: e, props: t } = this, { layer: i } = t;
|
|
568
|
-
if (i
|
|
571
|
+
if (!v(i))
|
|
569
572
|
return "";
|
|
570
573
|
const { fieldInfo: n } = t, s = this._getFieldValueTypeCamelCase(n);
|
|
571
|
-
return
|
|
574
|
+
return c`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${V(s ? "" : "missing")}>${s ? e.fieldValueTypes[s] : e.fieldValueTypeNotSet}</div></div>`;
|
|
572
575
|
}
|
|
573
576
|
renderFieldSampleValue() {
|
|
574
|
-
const { oneFeatureResponse: e, oneFeatureResponseStatus: t, statisticsStatus: i, statistics: n, uniqueValuesStatus: s, uniqueValues:
|
|
575
|
-
let
|
|
576
|
-
if (
|
|
577
|
+
const { oneFeatureResponse: e, oneFeatureResponseStatus: t, statisticsStatus: i, statistics: n, uniqueValuesStatus: s, uniqueValues: a, _messages: m, props: u } = this, { layer: o, fieldName: l, fieldInfo: d } = u, { statistics: g } = m;
|
|
578
|
+
let p;
|
|
579
|
+
if (y(o) || S(o) || !F(o) && ["string", "oid", "guid"].includes(this._getStatisticsType(d)) && s !== "failed")
|
|
577
580
|
return "";
|
|
578
|
-
t === "success" ? e.features.forEach((
|
|
579
|
-
(
|
|
580
|
-
}) : i === "success" ?
|
|
581
|
-
const
|
|
582
|
-
return p
|
|
581
|
+
t === "success" ? e.features.forEach(($) => {
|
|
582
|
+
(p === void 0 || p === null && $.attributes[l] !== null) && (p = $.attributes[l]);
|
|
583
|
+
}) : i === "success" ? p = n?.min ?? void 0 : s === "success" && (p = a?.uniqueValueInfos?.[0]?.value ?? a?.uniqueValueInfos?.[1]?.value ?? void 0);
|
|
584
|
+
const N = d.codedValues;
|
|
585
|
+
return f(p) && (N ? p = N.find(($) => p === $.code)?.name || p : p = this._getDisplayString(p, { useFieldFormatting: !0 })), c`<div class="section"><div class="title">${m.fieldSampleValue}</div><div class=${V(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>`;
|
|
583
586
|
}
|
|
584
587
|
renderFieldNumericFormat() {
|
|
585
|
-
const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName: n, fieldInfo: s, layer:
|
|
588
|
+
const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName: n, fieldInfo: s, layer: a } = t;
|
|
586
589
|
if (i || !["double", "long", "single"].includes(s.layerField.type))
|
|
587
590
|
return "";
|
|
588
|
-
const m = this.originalLayerSupportsFieldConfigs() ?
|
|
591
|
+
const m = this.originalLayerSupportsFieldConfigs() ? a.getFieldConfiguration(n) : void 0;
|
|
589
592
|
if (m?.fieldFormat) {
|
|
590
|
-
const { minimumFractionDigits:
|
|
591
|
-
return
|
|
593
|
+
const { minimumFractionDigits: o, maximumFractionDigits: l } = m.fieldFormat;
|
|
594
|
+
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}", o.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}", l.toString())}</div></div>`;
|
|
592
595
|
}
|
|
593
|
-
const u = "popupTemplate" in
|
|
596
|
+
const u = "popupTemplate" in a ? a.popupTemplate : void 0;
|
|
594
597
|
if (u?.fieldInfos) {
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
const
|
|
598
|
-
if (
|
|
599
|
-
const
|
|
600
|
-
return
|
|
598
|
+
const o = u.fieldInfos?.filter((l) => l.fieldName === n);
|
|
599
|
+
if (o?.length) {
|
|
600
|
+
const l = o[0];
|
|
601
|
+
if (f(l?.format?.places)) {
|
|
602
|
+
const d = l.format.places;
|
|
603
|
+
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}", d.toString())}</div></div>`;
|
|
601
604
|
}
|
|
602
605
|
}
|
|
603
606
|
}
|
|
604
|
-
return
|
|
607
|
+
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`;
|
|
605
608
|
}
|
|
606
609
|
renderFieldStatistics() {
|
|
607
|
-
const { statisticsStatus: e, uniqueValuesStatus: t, hideStatistics: i, _messages: n, props: s } = this, { layer:
|
|
608
|
-
return i ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") :
|
|
610
|
+
const { statisticsStatus: e, uniqueValuesStatus: t, hideStatistics: i, _messages: n, props: s } = this, { layer: a, fieldInfo: m } = s;
|
|
611
|
+
return i ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") : k(a) || E(a) || F(a) || y(a) || S(a) || ["long"].includes(m.layerField.type) ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") : c`<div class="section"><div class="title">${n.fieldStatistics}</div>${!e || e === "missing" || e === "in-progress" ? b("field-info-statistics-content", c`<div class="missing">${n.fieldStatisticsRetrieving}</div>`) : e === "failed" && t !== "success" ? this.renderNoStatistics() : b("field-info-statistics-content", c`<div ${O(this._setCompleteRef)}>${this.renderStatistics()}</div>`)}</div>`;
|
|
609
612
|
}
|
|
610
613
|
renderNoStatistics() {
|
|
611
614
|
const { _messages: e } = this;
|
|
612
|
-
return
|
|
615
|
+
return b("field-info-statistics-content", c`<div class="missing" ${O(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`);
|
|
613
616
|
}
|
|
614
617
|
renderStatistics() {
|
|
615
618
|
const { props: e } = this, { fieldInfo: t } = e;
|
|
@@ -634,56 +637,56 @@ class Y extends x {
|
|
|
634
637
|
if (!e)
|
|
635
638
|
return this.renderNoStatistics();
|
|
636
639
|
const { statistics: i } = t;
|
|
637
|
-
return
|
|
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>`;
|
|
638
641
|
}
|
|
639
642
|
renderStringStatistics() {
|
|
640
643
|
const { statistics: e, uniqueValuesStatus: t, _messages: i } = this, { statistics: n } = i;
|
|
641
|
-
return
|
|
644
|
+
return c`<div><div class="statistics-row"><div>${n.numberOfValues}</div>${t !== "success" ? c`<div class="missing">--</div>` : c`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`;
|
|
642
645
|
}
|
|
643
646
|
renderDateStatistics() {
|
|
644
647
|
const { statistics: e, view: t, props: i, _messages: n } = this, { fieldInfo: s } = i;
|
|
645
|
-
if (!e || !
|
|
648
|
+
if (!e || !f(e.max) || !f(e.min))
|
|
646
649
|
return this.renderNoStatistics();
|
|
647
|
-
const { statistics:
|
|
648
|
-
let
|
|
649
|
-
|
|
650
|
-
let
|
|
651
|
-
|
|
652
|
-
const g = s.simpleFieldType !== "timestamp-offset" || !t || t.timeZone !== "unknown",
|
|
653
|
-
return
|
|
650
|
+
const { statistics: a } = n, m = e.max - e.min, u = Math.floor(m / 31536e6);
|
|
651
|
+
let o = Math.floor((m - u * 31536e6) / 2628e6), l = Math.ceil((m - o * 2628e6) / 864e5);
|
|
652
|
+
l >= 30 && (o += 1, l = 0);
|
|
653
|
+
let d = u === 1 ? a.timeSpanOptions.year : u > 1 ? a.timeSpanOptions.years.replace("${years}", u.toString()) : "";
|
|
654
|
+
d += u > 0 && (o > 0 || l > 0) ? ", " : "", d += o === 1 ? a.timeSpanOptions.month : o > 1 ? a.timeSpanOptions.months.replace("${months}", o.toString()) : "", d += o > 0 && l > 0 ? ", " : "", d += l === 1 ? a.timeSpanOptions.day : l > 1 ? a.timeSpanOptions.days.replace("${days}", l.toString()) : "";
|
|
655
|
+
const g = s.simpleFieldType !== "timestamp-offset" || !t || t.timeZone !== "unknown", p = s.simpleFieldType === "time-only";
|
|
656
|
+
return c`<div><div class="statistics-row"><div>${a.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${g && f(e.min) ? c`<div class="statistics-row"><div>${p ? a.minimumTime : a.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>` : null}${g && f(e.max) ? c`<div class="statistics-row"><div>${p ? a.maximumTime : a.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>` : null}${g && f(e.avg) ? c`<div class="statistics-row"><div>${p ? a.averageTime : a.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>${a.timespan}</div><div class="data">${d}</div></div>` : null}${this.renderNullValues()}</div>`;
|
|
654
657
|
}
|
|
655
658
|
renderTopValues() {
|
|
656
|
-
const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props: n } = this, { fieldInfo: s } = n, { statistics:
|
|
659
|
+
const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props: n } = this, { fieldInfo: s } = n, { statistics: a } = i;
|
|
657
660
|
if (e?.uniqueValueInfos?.length) {
|
|
658
661
|
const m = e.uniqueValueInfos;
|
|
659
|
-
m.sort((
|
|
660
|
-
const u = s.codedValues,
|
|
661
|
-
let
|
|
662
|
+
m.sort((l, d) => l.count < d.count ? 1 : l.count > d.count ? -1 : 0);
|
|
663
|
+
const u = s.codedValues, o = m.filter((l) => l.value !== null).filter((l, d) => l && d < 10).map((l) => {
|
|
664
|
+
let d = l.value;
|
|
662
665
|
return u ? u.forEach((g) => {
|
|
663
|
-
|
|
664
|
-
}) :
|
|
666
|
+
d === g.code && (d = g.name);
|
|
667
|
+
}) : d = this._getDisplayString(d), c`<div class="statistics-row"><div class="data">${`${d}`}</div><div class="count">${this._printNumValue(l.count)}</div></div>`;
|
|
665
668
|
});
|
|
666
|
-
return
|
|
669
|
+
return o.length ? c`<div><div class="statistics-row-top-values"><div>${m.length > 10 ? a.topTenValues : a.topValues}</div><div>${a.count}</div></div>${o}</div>` : "";
|
|
667
670
|
} else
|
|
668
|
-
return
|
|
671
|
+
return c`<div><div class="statistics-row-top-values"><div>${a.topValues}</div><div>${a.count}</div></div><div class="statistics-row"><div class="missing">${t === "failed" ? i.fieldUniqueValuesNotAvailable : i.fieldSampleRetrieving}</div></div></div>`;
|
|
669
672
|
}
|
|
670
673
|
renderNullValues() {
|
|
671
674
|
const { statistics: e, uniqueValues: t, _messages: i } = this, { statistics: n } = i;
|
|
672
675
|
let s = e?.nullcount;
|
|
673
|
-
if (!
|
|
674
|
-
const
|
|
675
|
-
for (let m = 0; m <
|
|
676
|
-
const u =
|
|
676
|
+
if (!f(s) && t) {
|
|
677
|
+
const a = t.uniqueValueInfos;
|
|
678
|
+
for (let m = 0; m < a.length; m++) {
|
|
679
|
+
const u = a[m];
|
|
677
680
|
if (u.value === null) {
|
|
678
681
|
s = u.count;
|
|
679
682
|
break;
|
|
680
683
|
}
|
|
681
684
|
}
|
|
682
685
|
}
|
|
683
|
-
return
|
|
686
|
+
return c`<div class="statistics-row"><div>${n.numberOfNulls}</div>${f(s) ? c`<div class="data">${this._printNumValue(s)}</div>` : c`<div class="missing">--</div>`}</div>`;
|
|
684
687
|
}
|
|
685
688
|
}
|
|
686
|
-
|
|
689
|
+
W("arcgis-field-info", ve);
|
|
687
690
|
export {
|
|
688
|
-
|
|
691
|
+
ve as ArcgisFieldInfo
|
|
689
692
|
};
|