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