@arcgis/common-components 5.2.0-next.106 → 5.2.0-next.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{IXISGCNR.js → 2JQ6OEBP.js} +2 -2
- package/dist/cdn/{JLF6J4PV.js → 2ZQLPGO6.js} +2 -2
- package/dist/cdn/{BQCBHDME.js → 34O5NI3L.js} +2 -2
- package/dist/cdn/{CKBWHADN.js → 3KVQXK6I.js} +2 -2
- package/dist/cdn/{H4B7RWSC.js → 3KZKOKL3.js} +2 -2
- package/dist/cdn/{27EUJ42B.js → 3YTGG7RF.js} +2 -2
- package/dist/cdn/{FCIUMZTZ.js → 44GHRHDT.js} +2 -2
- package/dist/cdn/46YOWKVP.js +2 -0
- package/dist/cdn/4Z3W4SLN.js +2 -0
- package/dist/cdn/{EXBLSHSY.js → 5I46DP72.js} +2 -2
- package/dist/cdn/{HPNII7DL.js → 6G2BA5R6.js} +2 -2
- package/dist/cdn/{CEXP5DLE.js → 73LCJZI5.js} +2 -2
- package/dist/cdn/{Y5Y7IXOV.js → 74MDECVO.js} +1 -1
- package/dist/cdn/AHWD5KV4.js +2 -0
- package/dist/cdn/B2QFPLR5.js +2 -0
- package/dist/cdn/{WJZHHIWO.js → DLOQSM4T.js} +2 -2
- package/dist/cdn/{L6V3WKUI.js → E4CBJIXT.js} +2 -2
- package/dist/cdn/{XEK22IDA.js → E4NVOXNZ.js} +1 -1
- package/dist/cdn/EWHSIDUL.js +2 -0
- package/dist/cdn/{AY6QNI6M.js → FH6M3L5Q.js} +2 -2
- package/dist/cdn/FMIYRWWD.js +2 -0
- package/dist/cdn/{RYAF2CEQ.js → G2DVIZZJ.js} +2 -2
- package/dist/cdn/{WOZ7IPPQ.js → GB5FMYCZ.js} +2 -2
- package/dist/cdn/GPRF6QZC.js +2 -0
- package/dist/cdn/{NQRDB6LM.js → GQBGVIQF.js} +2 -2
- package/dist/cdn/{J6YVJVSN.js → GQCIBJZF.js} +2 -2
- package/dist/cdn/{7XSCHHGO.js → IBJHDNP3.js} +2 -2
- package/dist/cdn/{H7JRH53Q.js → ISCASG7C.js} +2 -2
- package/dist/cdn/{4TZVXSQZ.js → LE43VGSR.js} +2 -2
- package/dist/cdn/LRG23IGC.js +2 -0
- package/dist/cdn/{PMV2N3L3.js → NMDESY3T.js} +1 -1
- package/dist/cdn/O2DY73RF.js +2 -0
- package/dist/cdn/OHMQBUUM.js +2 -0
- package/dist/cdn/{OADKJRMQ.js → OVOUEXKG.js} +2 -2
- package/dist/cdn/{Z5QBBHLD.js → P3DCEHGK.js} +1 -1
- package/dist/cdn/{7CY3QEZW.js → QH4CFJEJ.js} +2 -2
- package/dist/cdn/{TWW63D32.js → QJJFF4PI.js} +1 -1
- package/dist/cdn/{H66SBHKJ.js → QKRBQ2F5.js} +2 -2
- package/dist/cdn/{VJDK62KV.js → RT25KW2T.js} +2 -2
- package/dist/cdn/RZEJ56RX.js +2 -0
- package/dist/cdn/S3XLEJSQ.js +2 -0
- package/dist/cdn/SBVCJDLD.js +2 -0
- package/dist/cdn/{4D7RVA5N.js → UIHTW6OA.js} +2 -2
- package/dist/cdn/UIKQQY3N.js +2 -0
- package/dist/cdn/{LLKF5IUE.js → UWHPPNTE.js} +2 -2
- package/dist/cdn/VIBCKXUC.js +2 -0
- package/dist/cdn/{4DL4CQMD.js → WUGJFP7P.js} +2 -2
- package/dist/cdn/{UGWLCTVM.js → YJTI6KPW.js} +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/element-reference-controller.js +8 -6
- package/dist/chunks/general.js +1 -1
- package/dist/chunks/internal-types.js +1 -1
- package/dist/chunks/layer-utils.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/strategies.js +1 -1
- package/dist/chunks/toolbar.js +9 -0
- package/dist/chunks/types.js +16 -0
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +18 -28
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +4 -4
- package/dist/components/arcgis-ckeditor5/customElement.js +1 -1
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.js +1 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
- package/dist/components/arcgis-coordinate-system-picker-tree/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.d.ts +1 -1
- package/dist/components/arcgis-field-info/customElement.js +73 -80
- package/dist/components/arcgis-field-pick-list/customElement.d.ts +7 -7
- package/dist/components/arcgis-field-pick-list/customElement.js +49 -45
- package/dist/components/arcgis-histogram/customElement.js +1 -1
- package/dist/components/arcgis-label-input/customElement.js +1 -1
- package/dist/components/arcgis-picker-input/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color-break/customElement.js +1 -1
- package/dist/components/arcgis-ramp-opacity/customElement.js +1 -1
- package/dist/components/arcgis-slider/customElement.js +1 -1
- package/dist/components/arcgis-slider-field/customElement.js +1 -1
- package/dist/components/arcgis-slider-histogram-range/customElement.js +1 -1
- package/dist/components/arcgis-slider-input/customElement.js +1 -1
- package/dist/components/arcgis-ticks/customElement.js +1 -1
- package/dist/components/arcgis-toolbar/customElement.d.ts +26 -6
- package/dist/components/arcgis-toolbar/customElement.js +61 -35
- package/dist/components/arcgis-toolbar/types.d.ts +32 -1
- package/dist/components/arcgis-toolbar-action/customElement.d.ts +1 -1
- package/dist/components/arcgis-toolbar-action/customElement.js +17 -22
- package/dist/components/arcgis-toolbar-group/customElement.js +18 -17
- package/dist/components/arcgis-toolbar-item/customElement.d.ts +1 -1
- package/dist/components/arcgis-toolbar-item/customElement.js +7 -7
- package/dist/components/arcgis-toolbar-more-button/customElement.js +8 -8
- package/dist/components/arcgis-toolbar-split-button/customElement.js +16 -15
- package/dist/components/arcgis-toolbar-stack/customElement.d.ts +48 -0
- package/dist/components/arcgis-toolbar-stack/customElement.js +174 -0
- package/dist/components/arcgis-toolbar-stack/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar-stack/index.js +1 -0
- package/dist/components/arcgis-unique-values-list/customElement.js +3 -3
- package/dist/components/arcgis-value-picker/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-collection/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-combobox/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-label/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-slider/customElement.js +1 -1
- 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 +6 -0
- package/dist/index.js +3 -1
- package/dist/loader.js +3 -2
- package/dist/types/lumina.d.ts +5 -0
- package/dist/types/preact.d.ts +6 -0
- package/dist/types/react.d.ts +7 -0
- package/dist/types/stencil.d.ts +5 -0
- package/package.json +4 -4
- package/dist/cdn/4S7M7IP7.js +0 -2
- package/dist/cdn/A2QOOQYR.js +0 -2
- package/dist/cdn/DM57UJMG.js +0 -2
- package/dist/cdn/EO2W4XX2.js +0 -2
- package/dist/cdn/HBTHCFTX.js +0 -2
- package/dist/cdn/K2W2X3P7.js +0 -2
- package/dist/cdn/NUJU53OQ.js +0 -2
- package/dist/cdn/RBBKKELV.js +0 -2
- package/dist/cdn/RYTUSPBA.js +0 -2
- package/dist/cdn/SM5735TW.js +0 -2
- package/dist/cdn/VCZLD7ZT.js +0 -2
- package/dist/cdn/VOBBBIYC.js +0 -2
- package/dist/cdn/XPZQ4XIH.js +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as H } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed as $ } from "lit/directives/keyed.js";
|
|
4
4
|
import { ref as b } from "lit/directives/ref.js";
|
|
5
5
|
import { LitElement as Q, createEvent as D, safeClassMap as C } from "@arcgis/lumina";
|
|
6
6
|
import { Task as J } from "@lit/task";
|
|
7
7
|
import { log as q, composeMissingPropertyMessage as L } from "@arcgis/toolkit/log";
|
|
8
|
-
import { css as j, html as
|
|
8
|
+
import { css as j, html as c } from "lit";
|
|
9
9
|
import z from "@arcgis/core/config.js";
|
|
10
10
|
import * as x from "@arcgis/core/core/reactiveUtils.js";
|
|
11
11
|
import * as h from "@arcgis/core/intl.js";
|
|
12
|
-
import * as
|
|
12
|
+
import * as P from "@arcgis/core/applications/PortalApp/layerUtils.js";
|
|
13
13
|
import * as _ from "@arcgis/core/core/lang.js";
|
|
14
14
|
import B from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
15
15
|
import K from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
@@ -30,12 +30,12 @@ const oe = {
|
|
|
30
30
|
function ue(a) {
|
|
31
31
|
const { layer: e, fieldName: t } = a;
|
|
32
32
|
let i;
|
|
33
|
-
const r =
|
|
33
|
+
const r = P.supportsFieldConfiguration(e);
|
|
34
34
|
let s;
|
|
35
35
|
"popupTemplate" in e && (s = e.popupTemplate);
|
|
36
36
|
const l = s ? s.fieldInfos : [];
|
|
37
37
|
return G(a)?.filter((n) => n.name === t).forEach((n) => {
|
|
38
|
-
const
|
|
38
|
+
const d = !r && l ? l.filter((g) => g.fieldName === n.name) : void 0, o = r ? e.getFieldAlias(t) : d?.length ? d[0].label : n.alias;
|
|
39
39
|
/^raster.(item|service)pixelvalue/iu.test(t) && (n.type = "double");
|
|
40
40
|
const u = {
|
|
41
41
|
layerField: n,
|
|
@@ -48,7 +48,7 @@ function G(a) {
|
|
|
48
48
|
const { layer: e } = a;
|
|
49
49
|
return F(e) || V(e) || I(e) && e.rasterFields.length ? e.rasterFields : e.fields;
|
|
50
50
|
}
|
|
51
|
-
async function
|
|
51
|
+
async function A(a) {
|
|
52
52
|
a.statisticsStatus = "in-progress";
|
|
53
53
|
const { layer: e, view: t } = a;
|
|
54
54
|
if (F(e) || V(e) || w(e) || T(e))
|
|
@@ -59,12 +59,12 @@ async function P(a) {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
async function
|
|
62
|
+
async function de(a) {
|
|
63
63
|
const { layer: e, view: t, fieldName: i, fieldInfo: r } = a;
|
|
64
64
|
if (F(e) || V(e) || T(e))
|
|
65
65
|
throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");
|
|
66
66
|
if (!r || r.layerField.type === "oid" || r.layerField.type === "guid" || r.layerField.type === "global-id")
|
|
67
|
-
return { totalCount: await
|
|
67
|
+
return { totalCount: await A(a), nullcount: 0 };
|
|
68
68
|
try {
|
|
69
69
|
const s = await B({
|
|
70
70
|
layer: e,
|
|
@@ -78,14 +78,14 @@ async function ce(a) {
|
|
|
78
78
|
if (f(s.nullcount) && !l)
|
|
79
79
|
return { ...s, totalCount: s.count + s.nullcount };
|
|
80
80
|
{
|
|
81
|
-
const m = await
|
|
81
|
+
const m = await A(a);
|
|
82
82
|
return { ...s, totalCount: m };
|
|
83
83
|
}
|
|
84
84
|
} catch {
|
|
85
85
|
throw new Error("could not get statistics");
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
async function
|
|
88
|
+
async function ce(a) {
|
|
89
89
|
const { layer: e, view: t, fieldName: i } = a;
|
|
90
90
|
if (F(e) || V(e) || T(e))
|
|
91
91
|
throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");
|
|
@@ -139,25 +139,25 @@ function me(a) {
|
|
|
139
139
|
function fe(a, e) {
|
|
140
140
|
const { layer: t } = e;
|
|
141
141
|
if (M(t) && t.subtypeField === a) {
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
return [new R({ code:
|
|
142
|
+
const d = t.parent?.subtypes?.find((o) => o.code === t.subtypeCode);
|
|
143
|
+
if (d)
|
|
144
|
+
return [new R({ code: d.code, name: d.name })];
|
|
145
145
|
}
|
|
146
146
|
if (!y(t) && !I(t))
|
|
147
147
|
return;
|
|
148
148
|
const i = y(t) ? t.typeIdField : void 0, r = y(t) ? t.types : void 0;
|
|
149
149
|
let s;
|
|
150
|
-
const m = G(e)?.find((
|
|
150
|
+
const m = G(e)?.find((d) => d.name === a), n = m?.domain;
|
|
151
151
|
return y(t) && i && r ? (i === a ? s = r.map(
|
|
152
|
-
(
|
|
152
|
+
(d) => (
|
|
153
153
|
// fake coded values
|
|
154
154
|
new R({
|
|
155
|
-
code:
|
|
156
|
-
name:
|
|
155
|
+
code: d.id,
|
|
156
|
+
name: d.name
|
|
157
157
|
})
|
|
158
158
|
)
|
|
159
|
-
) : (s = [], r.forEach((
|
|
160
|
-
if (!
|
|
159
|
+
) : (s = [], r.forEach((d) => {
|
|
160
|
+
if (!d.domains[a] || d.domains[a].type === "inherited") {
|
|
161
161
|
const o = n;
|
|
162
162
|
o?.codedValues && o.codedValues.forEach((u) => {
|
|
163
163
|
let g = !1;
|
|
@@ -165,7 +165,7 @@ function fe(a, e) {
|
|
|
165
165
|
p.code === u.code && (g = !0, `, ${p.name},`.includes(`, ${u.name},`) || (p.name += `, ${u.name}`));
|
|
166
166
|
}), g || s.push(_.clone(u));
|
|
167
167
|
});
|
|
168
|
-
} else
|
|
168
|
+
} else d.domains[a].codedValues && d.domains[a].codedValues.forEach((o) => {
|
|
169
169
|
let u = !1;
|
|
170
170
|
s.forEach((g) => {
|
|
171
171
|
g.code === o.code && (u = !0, `, ${g.name},`.includes(`, ${o.name},`) || (g.name += `, ${o.name}`));
|
|
@@ -257,8 +257,8 @@ class Fe extends Q {
|
|
|
257
257
|
async refresh() {
|
|
258
258
|
await this.processProps(), this.requestUpdate();
|
|
259
259
|
}
|
|
260
|
-
|
|
261
|
-
this.initialized && (e.has("fieldName") || e.has("layer")) &&
|
|
260
|
+
willUpdate(e) {
|
|
261
|
+
this.initialized && (e.has("fieldName") || e.has("layer")) && this.processProps();
|
|
262
262
|
}
|
|
263
263
|
disconnectedCallback() {
|
|
264
264
|
super.disconnectedCallback(), this.timeZoneHandle?.remove();
|
|
@@ -306,39 +306,32 @@ class Fe extends Q {
|
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
async requestUniqueValues() {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
e();
|
|
317
|
-
}
|
|
318
|
-
});
|
|
309
|
+
this.uniqueValuesStatus = "in-progress";
|
|
310
|
+
try {
|
|
311
|
+
const e = await ce(this.props);
|
|
312
|
+
this.uniqueValues = e, e?.uniqueValueInfos?.length ? this.uniqueValuesStatus = "success" : this.uniqueValuesStatus = "failed";
|
|
313
|
+
} catch {
|
|
314
|
+
this.uniqueValuesStatus = "failed";
|
|
315
|
+
}
|
|
319
316
|
}
|
|
320
317
|
async requestStatistics() {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
break;
|
|
331
|
-
}
|
|
318
|
+
try {
|
|
319
|
+
const e = await de(this.props);
|
|
320
|
+
if (!f(e.totalCount) && f(e.count) && this.uniqueValuesStatus === "success") {
|
|
321
|
+
const t = this.uniqueValues?.uniqueValueInfos ?? [];
|
|
322
|
+
for (let i = 0; i < t.length; i++) {
|
|
323
|
+
const r = t[i];
|
|
324
|
+
if (r.value === null) {
|
|
325
|
+
e.totalCount = r.count + e.count;
|
|
326
|
+
break;
|
|
332
327
|
}
|
|
333
|
-
t.totalCount ??= t.count;
|
|
334
328
|
}
|
|
335
|
-
|
|
336
|
-
} catch {
|
|
337
|
-
this.statisticsStatus = "failed";
|
|
338
|
-
} finally {
|
|
339
|
-
e();
|
|
329
|
+
e.totalCount ??= e.count;
|
|
340
330
|
}
|
|
341
|
-
|
|
331
|
+
this.statistics = e, this.statisticsStatus = "success";
|
|
332
|
+
} catch {
|
|
333
|
+
this.statisticsStatus = "failed";
|
|
334
|
+
}
|
|
342
335
|
}
|
|
343
336
|
setUpTimeZoneHandle() {
|
|
344
337
|
this.timeZoneHandle?.remove();
|
|
@@ -556,7 +549,7 @@ class Fe extends Q {
|
|
|
556
549
|
}
|
|
557
550
|
originalLayerSupportsFieldConfigs() {
|
|
558
551
|
const { layer: e } = this;
|
|
559
|
-
return
|
|
552
|
+
return P.supportsFieldConfiguration(e);
|
|
560
553
|
}
|
|
561
554
|
getPopupTemplateFieldInfo() {
|
|
562
555
|
const { props: e } = this, { layer: t, fieldName: i } = e;
|
|
@@ -567,28 +560,28 @@ class Fe extends Q {
|
|
|
567
560
|
}
|
|
568
561
|
render() {
|
|
569
562
|
return this._propWatcherTask.render({
|
|
570
|
-
pending: () =>
|
|
563
|
+
pending: () => c`<calcite-scrim loading></calcite-scrim>`,
|
|
571
564
|
complete: () => {
|
|
572
565
|
const { props: e } = this, { fieldInfo: t } = e;
|
|
573
|
-
return t ?
|
|
566
|
+
return t ? c`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>` : "";
|
|
574
567
|
},
|
|
575
568
|
error: () => ""
|
|
576
569
|
});
|
|
577
570
|
}
|
|
578
571
|
renderFieldType() {
|
|
579
572
|
const { _messages: e, props: t } = this, { fieldInfo: i } = t, r = this._getFieldTypeLabel(i.layerField.type);
|
|
580
|
-
return
|
|
573
|
+
return c`<div class="section"><div class="title">${e.fieldType}</div><div>${r}</div></div>`;
|
|
581
574
|
}
|
|
582
575
|
renderFieldAlias() {
|
|
583
576
|
const { _messages: e, props: t, hideAlias: i } = this, { fieldInfo: r } = t;
|
|
584
|
-
return i ? "" :
|
|
577
|
+
return i ? "" : c`<div class="section"><div class="title">${e.fieldAlias}</div><div>${r.label}</div></div>`;
|
|
585
578
|
}
|
|
586
579
|
renderFieldDescription() {
|
|
587
580
|
const { _messages: e, props: t } = this, { layer: i } = t;
|
|
588
581
|
if (!y(i))
|
|
589
582
|
return "";
|
|
590
583
|
const { fieldInfo: r } = t, s = r.layerField.description;
|
|
591
|
-
return
|
|
584
|
+
return c`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${C({
|
|
592
585
|
missing: !s
|
|
593
586
|
})}>${s || e.fieldDescriptionNotSet}</div></div>`;
|
|
594
587
|
}
|
|
@@ -597,18 +590,18 @@ class Fe extends Q {
|
|
|
597
590
|
if (!y(i))
|
|
598
591
|
return "";
|
|
599
592
|
const { fieldInfo: r } = t, s = this._getFieldValueTypeCamelCase(r);
|
|
600
|
-
return
|
|
593
|
+
return c`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${C(s ? "" : "missing")}>${s ? e.fieldValueTypes[s] : e.fieldValueTypeNotSet}</div></div>`;
|
|
601
594
|
}
|
|
602
595
|
renderFieldSampleValue() {
|
|
603
|
-
const { oneFeatureResponse: e, oneFeatureResponseStatus: t, statisticsStatus: i, statistics: r, uniqueValuesStatus: s, uniqueValues: l, _messages: m, props: n } = this, { layer:
|
|
596
|
+
const { oneFeatureResponse: e, oneFeatureResponseStatus: t, statisticsStatus: i, statistics: r, uniqueValuesStatus: s, uniqueValues: l, _messages: m, props: n } = this, { layer: d, fieldName: o, fieldInfo: u } = n, { statistics: g } = m;
|
|
604
597
|
let p;
|
|
605
|
-
if (F(
|
|
598
|
+
if (F(d) || T(d) || !w(d) && ["string", "oid", "guid"].includes(this._getStatisticsType(u)) && s !== "failed")
|
|
606
599
|
return "";
|
|
607
600
|
t === "success" ? e.features.forEach((v) => {
|
|
608
601
|
(p === void 0 || p === null && v.attributes[o] !== null) && (p = v.attributes[o]);
|
|
609
602
|
}) : i === "success" ? p = r?.min ?? void 0 : s === "success" && (p = l?.uniqueValueInfos?.[0]?.value ?? l?.uniqueValueInfos?.[1]?.value ?? void 0);
|
|
610
603
|
const S = u.codedValues;
|
|
611
|
-
return f(p) && (S ? p = S.find((v) => p === v.code)?.name || p : p = this._getDisplayString(p, { useFieldFormatting: !0 })),
|
|
604
|
+
return f(p) && (S ? p = S.find((v) => p === v.code)?.name || p : p = this._getDisplayString(p, { useFieldFormatting: !0 })), c`<div class="section"><div class="title">${m.fieldSampleValue}</div><div class=${C(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>`;
|
|
612
605
|
}
|
|
613
606
|
renderFieldNumericFormat() {
|
|
614
607
|
const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName: r, fieldInfo: s, layer: l } = t;
|
|
@@ -616,33 +609,33 @@ class Fe extends Q {
|
|
|
616
609
|
return "";
|
|
617
610
|
const m = this.originalLayerSupportsFieldConfigs() ? l.getFieldConfiguration(r) : void 0;
|
|
618
611
|
if (m?.fieldFormat) {
|
|
619
|
-
const { minimumFractionDigits:
|
|
620
|
-
return
|
|
612
|
+
const { minimumFractionDigits: d, maximumFractionDigits: o } = m.fieldFormat;
|
|
613
|
+
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}", d.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}", o.toString())}</div></div>`;
|
|
621
614
|
}
|
|
622
615
|
const n = "popupTemplate" in l ? l.popupTemplate : void 0;
|
|
623
616
|
if (n?.fieldInfos) {
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
626
|
-
const o =
|
|
617
|
+
const d = n.fieldInfos?.filter((o) => o.fieldName === r);
|
|
618
|
+
if (d?.length) {
|
|
619
|
+
const o = d[0];
|
|
627
620
|
if (f(o?.format?.places)) {
|
|
628
621
|
const u = o.format.places;
|
|
629
|
-
return
|
|
622
|
+
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}", u.toString())}</div></div>`;
|
|
630
623
|
}
|
|
631
624
|
}
|
|
632
625
|
}
|
|
633
|
-
return
|
|
626
|
+
return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`;
|
|
634
627
|
}
|
|
635
628
|
renderFieldStatistics() {
|
|
636
629
|
const { statisticsStatus: e, uniqueValuesStatus: t, hideStatistics: i, _messages: r, props: s } = this, { layer: l, fieldInfo: m } = s;
|
|
637
|
-
return i ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") : k(l) || E(l) || w(l) || F(l) || T(l) || ["long"].includes(m.layerField.type) ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") :
|
|
630
|
+
return i ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") : k(l) || E(l) || w(l) || F(l) || T(l) || ["long"].includes(m.layerField.type) ? (this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit(), "") : c`<div class="section"><div class="title">${r.fieldStatistics}</div>${!this.isFinished(t) && !this.isFinished(e) ? this.renderWaitingForStatistics() : e === "failed" && t === "failed" ? this.renderNoStatistics() : this.renderStatistics()}</div>`;
|
|
638
631
|
}
|
|
639
632
|
renderWaitingForStatistics() {
|
|
640
633
|
const { _messages: e } = this;
|
|
641
|
-
return $("field-info-statistics-content",
|
|
634
|
+
return $("field-info-statistics-content", c`<div class="missing">${e.fieldStatisticsRetrieving}</div>`);
|
|
642
635
|
}
|
|
643
636
|
renderNoStatistics() {
|
|
644
637
|
const { _messages: e } = this;
|
|
645
|
-
return $("field-info-statistics-content",
|
|
638
|
+
return $("field-info-statistics-content", c`<div class="missing" ${b(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`);
|
|
646
639
|
}
|
|
647
640
|
renderStatistics() {
|
|
648
641
|
const { props: e } = this, { fieldInfo: t } = e;
|
|
@@ -667,38 +660,38 @@ class Fe extends Q {
|
|
|
667
660
|
if (!e)
|
|
668
661
|
return this.isFinished(t) && this.isFinished(i) ? this.renderNoStatistics() : this.renderWaitingForStatistics();
|
|
669
662
|
const { statistics: s } = r;
|
|
670
|
-
return $("field-info-statistics-content",
|
|
663
|
+
return $("field-info-statistics-content", c`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${s.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${f(e.sum) ? c`<div class="statistics-row"><div>${s.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>` : null}${f(e.min) ? c`<div class="statistics-row"><div>${s.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>` : null}${f(e.max) ? c`<div class="statistics-row"><div>${s.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>` : null}${f(e.avg) ? c`<div class="statistics-row"><div>${s.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>` : null}${f(e.stddev) ? c`<div class="statistics-row"><div>${s.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>` : null}${this.renderNullValues()}</div>`);
|
|
671
664
|
}
|
|
672
665
|
renderStringStatistics() {
|
|
673
666
|
const { statistics: e, uniqueValuesStatus: t, _messages: i } = this, { statistics: r } = i;
|
|
674
|
-
return $("field-info-statistics-content",
|
|
667
|
+
return $("field-info-statistics-content", c`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${r.numberOfValues}</div>${t !== "success" ? c`<div class="missing">--</div>` : c`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`);
|
|
675
668
|
}
|
|
676
669
|
renderDateStatistics() {
|
|
677
670
|
const { statistics: e, view: t, props: i, uniqueValuesStatus: r, statisticsStatus: s, _messages: l } = this, { fieldInfo: m } = i;
|
|
678
671
|
if (!e || !f(e.max) || !f(e.min))
|
|
679
672
|
return this.isFinished(r) && this.isFinished(s) ? this.renderNoStatistics() : this.renderWaitingForStatistics();
|
|
680
|
-
const { statistics: n } = l,
|
|
681
|
-
let u = Math.floor((
|
|
673
|
+
const { statistics: n } = l, d = e.max - e.min, o = Math.floor(d / 31536e6);
|
|
674
|
+
let u = Math.floor((d - o * 31536e6) / 2628e6), g = Math.ceil((d - u * 2628e6) / 864e5);
|
|
682
675
|
g >= 30 && (u += 1, g = 0);
|
|
683
676
|
let p = o === 1 ? n.timeSpanOptions.year : o > 1 ? n.timeSpanOptions.years.replace("${years}", o.toString()) : "";
|
|
684
677
|
p += o > 0 && (u > 0 || g > 0) ? ", " : "", p += u === 1 ? n.timeSpanOptions.month : u > 1 ? n.timeSpanOptions.months.replace("${months}", u.toString()) : "", p += u > 0 && g > 0 ? ", " : "", p += g === 1 ? n.timeSpanOptions.day : g > 1 ? n.timeSpanOptions.days.replace("${days}", g.toString()) : "";
|
|
685
678
|
const S = m.simpleFieldType !== "timestamp-offset" || !t || t.timeZone !== "unknown", v = m.simpleFieldType === "time-only";
|
|
686
|
-
return $("field-info-statistics-content",
|
|
679
|
+
return $("field-info-statistics-content", c`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${S && f(e.min) ? c`<div class="statistics-row"><div>${v ? n.minimumTime : n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>` : null}${S && f(e.max) ? c`<div class="statistics-row"><div>${v ? n.maximumTime : n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>` : null}${S && f(e.avg) ? c`<div class="statistics-row"><div>${v ? n.averageTime : n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>` : null}${S && !v && f(e.min) && f(e.max) && d > 0 ? c`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${p}</div></div>` : null}${this.renderNullValues()}</div>`);
|
|
687
680
|
}
|
|
688
681
|
renderTopValues() {
|
|
689
682
|
const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props: r } = this, { fieldInfo: s } = r, { statistics: l } = i;
|
|
690
683
|
if (e?.uniqueValueInfos?.length) {
|
|
691
684
|
const m = e.uniqueValueInfos;
|
|
692
685
|
m.sort((o, u) => o.count < u.count ? 1 : o.count > u.count ? -1 : 0);
|
|
693
|
-
const n = s.codedValues,
|
|
686
|
+
const n = s.codedValues, d = m.filter((o) => o.value !== null).filter((o, u) => o && u < 10).map((o) => {
|
|
694
687
|
let u = o.value;
|
|
695
688
|
return n ? n.forEach((g) => {
|
|
696
689
|
u === g.code && (u = g.name);
|
|
697
|
-
}) : u = this._getDisplayString(u),
|
|
690
|
+
}) : u = this._getDisplayString(u), c`<div class="statistics-row"><div class="data">${`${u}`}</div><div class="count">${this._printNumValue(o.count)}</div></div>`;
|
|
698
691
|
});
|
|
699
|
-
return
|
|
692
|
+
return d.length ? c`<div><div class="statistics-row-top-values"><div>${m.length > 10 ? l.topTenValues : l.topValues}</div><div>${l.count}</div></div>${d}</div>` : "";
|
|
700
693
|
} else
|
|
701
|
-
return
|
|
694
|
+
return c`<div><div class="statistics-row-top-values"><div>${l.topValues}</div><div>${l.count}</div></div><div class="statistics-row"><div class="missing">${t === "failed" ? i.fieldUniqueValuesNotAvailable : i.fieldSampleRetrieving}</div></div></div>`;
|
|
702
695
|
}
|
|
703
696
|
renderNullValues() {
|
|
704
697
|
const { statistics: e, uniqueValues: t, _messages: i } = this, { statistics: r } = i;
|
|
@@ -713,7 +706,7 @@ class Fe extends Q {
|
|
|
713
706
|
}
|
|
714
707
|
}
|
|
715
708
|
}
|
|
716
|
-
return
|
|
709
|
+
return c`<div class="statistics-row"><div>${r.numberOfNulls}</div>${f(s) ? c`<div class="data">${this._printNumValue(s)}</div>` : c`<div class="missing">--</div>`}</div>`;
|
|
717
710
|
}
|
|
718
711
|
}
|
|
719
712
|
H("arcgis-field-info", Fe);
|
|
@@ -75,7 +75,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
75
75
|
accessor filterPlaceholderText: string | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* @deprecated
|
|
78
|
-
* Pass in grouped lists of fields instead.
|
|
78
|
+
* Pass in grouped lists of fields instead. Removal target v6.0.0.
|
|
79
79
|
* If true, fields and expressions are placed in separate groups.
|
|
80
80
|
* @default false
|
|
81
81
|
*/
|
|
@@ -102,7 +102,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
102
102
|
* @default false
|
|
103
103
|
*/
|
|
104
104
|
accessor listOnly: boolean;
|
|
105
|
-
/** @deprecated use view instead */
|
|
105
|
+
/** @deprecated use view instead. Removal target v6.0.0. */
|
|
106
106
|
accessor mapView: View | undefined;
|
|
107
107
|
/**
|
|
108
108
|
* If true, allows for multiple selection. If false, the
|
|
@@ -118,7 +118,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
118
118
|
/** The initially selected fields. Will use selectedFields[0] when multiple is set to false. */
|
|
119
119
|
accessor selectedFields: string[];
|
|
120
120
|
/**
|
|
121
|
-
* @deprecated use hideCancel instead
|
|
121
|
+
* @deprecated use hideCancel instead. Removal target v6.0.0.
|
|
122
122
|
* @default true
|
|
123
123
|
*/
|
|
124
124
|
accessor showCancel: boolean;
|
|
@@ -160,7 +160,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
160
160
|
*/
|
|
161
161
|
accessor showSelectionAll: boolean;
|
|
162
162
|
/**
|
|
163
|
-
* @deprecated use hideSort instead
|
|
163
|
+
* @deprecated use hideSort instead. Removal target v6.0.0.
|
|
164
164
|
* @default true
|
|
165
165
|
*/
|
|
166
166
|
accessor showSort: boolean;
|
|
@@ -190,11 +190,11 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
190
190
|
readonly arcgisDeleteField: import("@arcgis/lumina").TargetedEvent<this, { fieldName: string; }>;
|
|
191
191
|
/** Emitted when the edit icon of a field has been clicked. The field must have PickListFieldInfo.showEditAction set to true. */
|
|
192
192
|
readonly arcgisEditField: import("@arcgis/lumina").TargetedEvent<this, { fieldName: string; }>;
|
|
193
|
-
/** @deprecated use arcgisChange instead */
|
|
193
|
+
/** @deprecated use arcgisChange instead. Removal target v6.0.0. */
|
|
194
194
|
readonly arcgisFieldPickListChange: import("@arcgis/lumina").TargetedEvent<this, { selectedFields: string[]; }>;
|
|
195
|
-
/** @deprecated use arcgisClose instead */
|
|
195
|
+
/** @deprecated use arcgisClose instead. Removal target v6.0.0. */
|
|
196
196
|
readonly arcgisFieldPickListDismissed: import("@arcgis/lumina").TargetedEvent<this, { selectedFields: string[]; } | void>;
|
|
197
|
-
/** @deprecated use arcgisSortByChange instead */
|
|
197
|
+
/** @deprecated use arcgisSortByChange instead. Removal target v6.0.0. */
|
|
198
198
|
readonly arcgisFieldPickListSortByChange: import("@arcgis/lumina").TargetedEvent<this, LastSortBy>;
|
|
199
199
|
/** Emitted when the field pick list sort order has changed. */
|
|
200
200
|
readonly arcgisSortByChange: import("@arcgis/lumina").TargetedEvent<this, LastSortBy>;
|