@arcgis/common-components 5.2.0-next.18 → 5.2.0-next.19

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.
@@ -1,71 +1,71 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as G } from "../../chunks/runtime.js";
3
- import { css as U, html as c } from "lit";
2
+ import { c as W } from "../../chunks/runtime.js";
3
+ import { css as Q, html as c } from "lit";
4
4
  import { keyed as b } from "lit/directives/keyed.js";
5
5
  import { ref as O } from "lit/directives/ref.js";
6
- import { LitElement as W, createEvent as D, safeClassMap as V } from "@arcgis/lumina";
7
- import { Task as Q } from "@lit/task";
6
+ import { LitElement as H, createEvent as D, safeClassMap as V } from "@arcgis/lumina";
7
+ import { Task as J } from "@lit/task";
8
8
  import { log as q, composeMissingPropertyMessage as L } from "@arcgis/toolkit/log";
9
- import H from "@arcgis/core/config.js";
9
+ import j 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 E from "@arcgis/core/applications/PortalApp/layerUtils.js";
12
+ import * as A from "@arcgis/core/applications/PortalApp/layerUtils.js";
13
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";
14
+ import z from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
15
+ import B from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
16
16
  import { i as f } from "../../chunks/commonFunctions.js";
17
- import { i as y, a as S, b as $, c as R, 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 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;
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;
22
22
  }
23
- const se = {
23
+ const re = {
24
24
  dateStyle: "short",
25
25
  timeStyle: "short"
26
- }, ae = {
26
+ }, ne = {
27
27
  timeStyle: "medium"
28
28
  };
29
- function re(a) {
30
- const { layer: e, fieldName: t } = a;
29
+ function oe(r) {
30
+ const { layer: e, fieldName: t } = r;
31
31
  let i;
32
- const n = E.supportsFieldConfiguration(e);
32
+ const n = A.supportsFieldConfiguration(e);
33
33
  let s;
34
34
  "popupTemplate" in e && (s = e.popupTemplate);
35
- const r = s ? s.fieldInfos : [];
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;
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;
38
38
  /^raster.(item|service)pixelvalue/iu.test(t) && (u.type = "double");
39
39
  const d = {
40
40
  layerField: u,
41
41
  label: l || u.name
42
42
  };
43
- d.codedValues = ue(t, a), le(d), d.simpleFieldType && (i = d);
43
+ d.codedValues = ce(t, r), de(d), d.simpleFieldType && (i = d);
44
44
  }), i;
45
45
  }
46
- function M(a) {
47
- const { layer: e } = a;
48
- return y(e) || S(e) || T(e) && e.rasterFields.length ? e.rasterFields : e.fields;
46
+ function U(r) {
47
+ const { layer: e } = r;
48
+ return y(e) || w(e) || T(e) && e.rasterFields.length ? e.rasterFields : e.fields;
49
49
  }
50
- async function k(a) {
51
- a.statisticsStatus = "in-progress";
52
- const { layer: e, view: t } = a;
53
- if (y(e) || S(e) || F(e) || $(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))
54
54
  throw new Error("could not get feature count");
55
55
  try {
56
- return await ce(e, t);
56
+ return await fe(e, t);
57
57
  } catch {
58
58
  return;
59
59
  }
60
60
  }
61
- async function ne(a) {
62
- const { layer: e, view: t, fieldName: i, fieldInfo: n } = a;
63
- if (y(e) || S(e) || $(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))
64
64
  throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");
65
65
  if (!n || n.layerField.type === "oid" || n.layerField.type === "guid" || n.layerField.type === "global-id")
66
- return { totalCount: await k(a), nullcount: 0 };
66
+ return { totalCount: await R(r), nullcount: 0 };
67
67
  try {
68
- const s = await J({
68
+ const s = await z({
69
69
  layer: e,
70
70
  view: t,
71
71
  field: i,
@@ -73,24 +73,24 @@ async function ne(a) {
73
73
  });
74
74
  if (!f(s.count))
75
75
  throw new Error("could not get statistics");
76
- const r = "sourceJSON" in e && e.sourceJSON.maxRecordCount === s.count;
77
- if (f(s.nullcount) && !r)
76
+ const a = "sourceJSON" in e && e.sourceJSON.maxRecordCount === s.count;
77
+ if (f(s.nullcount) && !a)
78
78
  return { ...s, totalCount: s.count + s.nullcount };
79
79
  {
80
- const m = await k(a);
80
+ const m = await R(r);
81
81
  return { ...s, totalCount: m };
82
82
  }
83
83
  } catch {
84
84
  throw new Error("could not get statistics");
85
85
  }
86
86
  }
87
- async function oe(a) {
88
- const { layer: e, view: t, fieldName: i } = a;
89
- if (y(e) || S(e) || $(e))
87
+ async function ue(r) {
88
+ const { layer: e, view: t, fieldName: i } = r;
89
+ if (y(e) || w(e) || S(e))
90
90
  throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");
91
- R(e) && (e.outFields = ["*"]);
91
+ Z(e) && (e.outFields = ["*"]);
92
92
  try {
93
- return await j({
93
+ return await B({
94
94
  layer: e,
95
95
  view: t,
96
96
  field: i
@@ -99,29 +99,29 @@ async function oe(a) {
99
99
  throw new Error("could not get unique values");
100
100
  }
101
101
  }
102
- function le(a) {
103
- switch (a.layerField.type) {
102
+ function de(r) {
103
+ switch (r.layerField.type) {
104
104
  case "string":
105
- a.simpleFieldType = "string";
105
+ r.simpleFieldType = "string";
106
106
  break;
107
107
  case "date":
108
- a.simpleFieldType = "date";
108
+ r.simpleFieldType = "date";
109
109
  break;
110
110
  case "timestamp-offset":
111
- a.simpleFieldType = "timestamp-offset";
111
+ r.simpleFieldType = "timestamp-offset";
112
112
  break;
113
113
  case "date-only":
114
- a.simpleFieldType = "date-only";
114
+ r.simpleFieldType = "date-only";
115
115
  break;
116
116
  case "time-only":
117
- a.simpleFieldType = "time-only";
117
+ r.simpleFieldType = "time-only";
118
118
  break;
119
119
  case "oid":
120
- a.simpleFieldType = "oid";
120
+ r.simpleFieldType = "oid";
121
121
  break;
122
122
  case "guid":
123
123
  case "global-id":
124
- a.simpleFieldType = "guid";
124
+ r.simpleFieldType = "guid";
125
125
  break;
126
126
  case "small-integer":
127
127
  case "big-integer":
@@ -129,13 +129,13 @@ function le(a) {
129
129
  case "single":
130
130
  case "double":
131
131
  case "long":
132
- a.simpleFieldType = "number";
132
+ r.simpleFieldType = "number";
133
133
  break;
134
134
  }
135
135
  }
136
- function ue(a, e) {
136
+ function ce(r, e) {
137
137
  const { layer: t } = e;
138
- if (A(t) && t.subtypeField === a) {
138
+ if (P(t) && t.subtypeField === r) {
139
139
  const o = t.parent?.subtypes?.find((l) => l.code === t.subtypeCode);
140
140
  if (o)
141
141
  return [{ code: o.code, name: o.name }];
@@ -144,8 +144,8 @@ function ue(a, e) {
144
144
  return;
145
145
  const i = v(t) ? t.typeIdField : void 0, n = v(t) ? t.types : void 0;
146
146
  let s;
147
- const m = M(e)?.find((o) => o.name === a), u = m?.domain;
148
- return v(t) && i && n ? (i === a ? s = n.map(
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
149
  (o) => (
150
150
  // fake coded values
151
151
  {
@@ -154,7 +154,7 @@ function ue(a, e) {
154
154
  }
155
155
  )
156
156
  ) : (s = [], n.forEach((o) => {
157
- if (!o.domains[a] || o.domains[a].type === "inherited") {
157
+ if (!o.domains[r] || o.domains[r].type === "inherited") {
158
158
  const l = u;
159
159
  l?.codedValues && l.codedValues.forEach((d) => {
160
160
  let g = !1;
@@ -162,7 +162,7 @@ function ue(a, e) {
162
162
  p.code === d.code && (g = !0, `, ${p.name},`.includes(`, ${d.name},`) || (p.name += `, ${d.name}`));
163
163
  }), g || s.push(I.clone(d));
164
164
  });
165
- } else o.domains[a].codedValues && o.domains[a].codedValues.forEach((l) => {
165
+ } else o.domains[r].codedValues && o.domains[r].codedValues.forEach((l) => {
166
166
  let d = !1;
167
167
  s.forEach((g) => {
168
168
  g.code === l.code && (d = !0, `, ${g.name},`.includes(`, ${l.name},`) || (g.name += `, ${l.name}`));
@@ -170,11 +170,11 @@ function ue(a, e) {
170
170
  });
171
171
  })), !s.length && u?.codedValues && (s = I.clone(u.codedValues))) : u?.codedValues && (s = m.domain.codedValues), s?.length ? s : void 0;
172
172
  }
173
- async function de(a) {
174
- const { view: e, layer: t } = a;
175
- if (T(t) || y(t) || S(t))
173
+ async function me(r) {
174
+ const { view: e, layer: t } = r;
175
+ if (T(t) || y(t) || w(t))
176
176
  throw new Error("could not get feature");
177
- if (v(t) && !t.url || Z(t)) {
177
+ if (v(t) && !t.url || M(t)) {
178
178
  const i = t.createQuery();
179
179
  i.start = 0, i.num = 5, i.outFields = ["*"];
180
180
  const n = await t.queryFeatures(i);
@@ -183,11 +183,11 @@ async function de(a) {
183
183
  throw new Error("could not get feature");
184
184
  } else {
185
185
  if (!e)
186
- return await C(a);
186
+ return await C(r);
187
187
  let i;
188
- if (A(t) || z(t)) {
188
+ if (P(t) || K(t)) {
189
189
  let s = t.parent;
190
- for (; B(s) || K(s); )
190
+ for (; X(s) || Y(s); )
191
191
  s = s.parent;
192
192
  i = await e.whenLayerView(s);
193
193
  } else
@@ -195,46 +195,46 @@ async function de(a) {
195
195
  if (i.availableFields.length === t.fields.length || (F(t) || _(t)) && i.availableFields.length > 0) {
196
196
  const s = i.createQuery();
197
197
  s.start = 0, s.num = 5, s.outFields = ["*"];
198
- const r = await i.queryFeatures(s);
199
- return r.features?.length ? r : await C(a);
198
+ const a = await i.queryFeatures(s);
199
+ return a.features?.length ? a : await C(r);
200
200
  } else
201
- return await C(a);
201
+ return await C(r);
202
202
  }
203
203
  }
204
- async function C(a) {
205
- const { layer: e } = a;
204
+ async function C(r) {
205
+ const { layer: e } = r;
206
206
  if (T(e) || y(e) || F(e) || _(e))
207
207
  throw new Error("cannot get feature from service");
208
- const t = new ee({
208
+ const t = new ie({
209
209
  where: "1=1",
210
210
  outFields: ["*"],
211
211
  returnGeometry: !1
212
212
  });
213
213
  return "sourceJSON" in e && e.sourceJSON?.advancedQueryCapabilities?.supportsPagination && (t.num = 1), await e.queryFeatures(t);
214
214
  }
215
- async function ce(a, e) {
216
- if (R(a))
217
- return await me(a);
218
- if (v(a) || X(a) || P(a) || Z(a) || Y(a))
219
- return await a.queryFeatureCount();
220
- if (e && (F(a) || _(a)))
221
- return await fe(a, e);
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);
222
222
  }
223
- async function me(a) {
224
- const e = a.createQuery();
223
+ async function pe(r) {
224
+ const e = r.createQuery();
225
225
  e.outFields = ["*"];
226
- const t = await a.queryFeatures(e);
226
+ const t = await r.queryFeatures(e);
227
227
  if (t.features.length)
228
228
  return t.features.length;
229
229
  throw new Error("could not get feature count");
230
230
  }
231
- async function fe(a, e) {
232
- return await (await e.whenLayerView(a)).queryFeatureCount();
231
+ async function ge(r, e) {
232
+ return await (await e.whenLayerView(r)).queryFeatureCount();
233
233
  }
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 {
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 {
236
236
  constructor() {
237
- super(...arguments), this._messages = te({ blocking: !0 }), this._propWatcherTask = new Q(this, {
237
+ super(...arguments), this._messages = se({ blocking: !0 }), this._propWatcherTask = new J(this, {
238
238
  task: async ([e, t]) => {
239
239
  const i = f(e) && f(t);
240
240
  if (f(e) || q("error", this, L("layer")), f(t) || q("error", this, L("fieldName")), !i)
@@ -248,7 +248,7 @@ class ge extends W {
248
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 };
249
249
  }
250
250
  static {
251
- this.styles = pe;
251
+ this.styles = he;
252
252
  }
253
253
  async refresh() {
254
254
  await this.processProps(), this.requestUpdate();
@@ -262,27 +262,27 @@ class ge extends W {
262
262
  return;
263
263
  let s;
264
264
  if (t.declaredClass === "esri.layers.support.Sublayer") {
265
- const r = t;
266
- e && await x.whenOnce(() => !e.updating), s = await r.createFeatureLayer(), await s?.load();
265
+ const a = t;
266
+ e && await x.whenOnce(() => !e.updating), s = await a.createFeatureLayer(), await s?.load();
267
267
  }
268
268
  this.props = {
269
269
  view: e,
270
270
  layer: s ?? t,
271
271
  fieldName: i,
272
272
  hideStatistics: n
273
- }, this.props.fieldInfo = re(this.props), P(t) && H.request.interceptors?.push({
274
- urls: `${ie(t)}/${t.layerId}`,
275
- before(r) {
276
- r.requestOptions.authMode = "no-prompt";
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";
277
277
  }
278
278
  }), this.oneFeatureResponseStatus = "in-progress";
279
279
  try {
280
- const r = await de(this.props);
281
- this.oneFeatureResponse = r, this.oneFeatureResponseStatus = "success";
280
+ const a = await me(this.props);
281
+ this.oneFeatureResponse = a, this.oneFeatureResponseStatus = "success";
282
282
  } catch {
283
283
  this.oneFeatureResponseStatus = "failed";
284
284
  }
285
- if (F(t)) {
285
+ if (F(t) || k(t) || E(t)) {
286
286
  this.uniqueValuesStatus = "failed", this.statisticsStatus = "failed";
287
287
  return;
288
288
  }
@@ -291,8 +291,8 @@ class ge extends W {
291
291
  else {
292
292
  this.uniqueValuesStatus = "in-progress";
293
293
  try {
294
- const r = await oe(this.props);
295
- this.uniqueValues = r, r?.uniqueValueInfos?.length ? this.uniqueValuesStatus = "success" : this.uniqueValuesStatus = "failed";
294
+ const a = await ue(this.props);
295
+ this.uniqueValues = a, a?.uniqueValueInfos?.length ? this.uniqueValuesStatus = "success" : this.uniqueValuesStatus = "failed";
296
296
  } catch {
297
297
  this.uniqueValuesStatus = "failed";
298
298
  }
@@ -302,19 +302,19 @@ class ge extends W {
302
302
  else {
303
303
  this.statisticsStatus = "in-progress";
304
304
  try {
305
- const r = await ne(this.props);
306
- if (!f(r.totalCount) && f(r.count) && this.uniqueValuesStatus === "success") {
305
+ const a = await le(this.props);
306
+ if (!f(a.totalCount) && f(a.count) && this.uniqueValuesStatus === "success") {
307
307
  const m = this.uniqueValues?.uniqueValueInfos ?? [];
308
308
  for (let u = 0; u < m.length; u++) {
309
309
  const o = m[u];
310
310
  if (o.value === null) {
311
- r.totalCount = o.count + r.count;
311
+ a.totalCount = o.count + a.count;
312
312
  break;
313
313
  }
314
314
  }
315
- r.totalCount ??= r.count;
315
+ a.totalCount ??= a.count;
316
316
  }
317
- this.statistics = r, this.statisticsStatus = "success";
317
+ this.statistics = a, this.statisticsStatus = "success";
318
318
  } catch {
319
319
  this.statisticsStatus = "failed";
320
320
  }
@@ -518,7 +518,7 @@ class ge extends W {
518
518
  getIntlDateTimeFormattingOptions(e, t) {
519
519
  const i = this.getCurrentFieldFormat();
520
520
  if (!t?.useFieldFormatting)
521
- return i ? t?.isTimeOnly ? ae : se : h.convertDateFormatToIntlOptions(e);
521
+ return i ? t?.isTimeOnly ? ne : re : h.convertDateFormatToIntlOptions(e);
522
522
  const n = i ? {
523
523
  dateStyle: t?.isTimeOnly ? void 0 : i.dateStyle ?? void 0,
524
524
  // year/month is overridden if dateStyle is set
@@ -534,7 +534,7 @@ class ge extends W {
534
534
  }
535
535
  originalLayerSupportsFieldConfigs() {
536
536
  const { layer: e } = this;
537
- return E.supportsFieldConfiguration(e);
537
+ return A.supportsFieldConfiguration(e);
538
538
  }
539
539
  getPopupTemplateFieldInfo() {
540
540
  const { props: e } = this, { layer: t, fieldName: i } = e;
@@ -574,26 +574,26 @@ class ge extends W {
574
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>`;
575
575
  }
576
576
  renderFieldSampleValue() {
577
- 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;
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
578
  let p;
579
- if (y(o) || $(o) || !F(o) && ["string", "oid", "guid"].includes(this._getStatisticsType(d)) && s !== "failed")
579
+ if (y(o) || S(o) || !F(o) && ["string", "oid", "guid"].includes(this._getStatisticsType(d)) && s !== "failed")
580
580
  return "";
581
- t === "success" ? e.features.forEach((w) => {
582
- (p === void 0 || p === null && w.attributes[l] !== null) && (p = w.attributes[l]);
583
- }) : i === "success" ? p = n?.min ?? void 0 : s === "success" && (p = r?.uniqueValueInfos?.[0]?.value ?? r?.uniqueValueInfos?.[1]?.value ?? void 0);
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
584
  const N = d.codedValues;
585
- return f(p) && (N ? p = N.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
+ 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>`;
586
586
  }
587
587
  renderFieldNumericFormat() {
588
- const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName: n, fieldInfo: s, layer: r } = t;
588
+ const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName: n, fieldInfo: s, layer: a } = t;
589
589
  if (i || !["double", "long", "single"].includes(s.layerField.type))
590
590
  return "";
591
- const m = this.originalLayerSupportsFieldConfigs() ? r.getFieldConfiguration(n) : void 0;
591
+ const m = this.originalLayerSupportsFieldConfigs() ? a.getFieldConfiguration(n) : void 0;
592
592
  if (m?.fieldFormat) {
593
593
  const { minimumFractionDigits: o, maximumFractionDigits: l } = m.fieldFormat;
594
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>`;
595
595
  }
596
- const u = "popupTemplate" in r ? r.popupTemplate : void 0;
596
+ const u = "popupTemplate" in a ? a.popupTemplate : void 0;
597
597
  if (u?.fieldInfos) {
598
598
  const o = u.fieldInfos?.filter((l) => l.fieldName === n);
599
599
  if (o?.length) {
@@ -607,8 +607,8 @@ class ge extends W {
607
607
  return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`;
608
608
  }
609
609
  renderFieldStatistics() {
610
- const { statisticsStatus: e, uniqueValuesStatus: t, hideStatistics: i, _messages: n, props: s } = this, { layer: r, fieldInfo: m } = s;
611
- 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 ${O(this._setCompleteRef)}>${this.renderStatistics()}</div>`)}</div>`;
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>`;
612
612
  }
613
613
  renderNoStatistics() {
614
614
  const { _messages: e } = this;
@@ -647,16 +647,16 @@ class ge extends W {
647
647
  const { statistics: e, view: t, props: i, _messages: n } = this, { fieldInfo: s } = i;
648
648
  if (!e || !f(e.max) || !f(e.min))
649
649
  return this.renderNoStatistics();
650
- const { statistics: r } = n, m = e.max - e.min, u = Math.floor(m / 31536e6);
650
+ const { statistics: a } = n, m = e.max - e.min, u = Math.floor(m / 31536e6);
651
651
  let o = Math.floor((m - u * 31536e6) / 2628e6), l = Math.ceil((m - o * 2628e6) / 864e5);
652
652
  l >= 30 && (o += 1, l = 0);
653
- let d = u === 1 ? r.timeSpanOptions.year : u > 1 ? r.timeSpanOptions.years.replace("${years}", u.toString()) : "";
654
- 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
+ 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
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>${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
+ 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>`;
657
657
  }
658
658
  renderTopValues() {
659
- const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props: n } = this, { fieldInfo: s } = n, { statistics: r } = i;
659
+ const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props: n } = this, { fieldInfo: s } = n, { statistics: a } = i;
660
660
  if (e?.uniqueValueInfos?.length) {
661
661
  const m = e.uniqueValueInfos;
662
662
  m.sort((l, d) => l.count < d.count ? 1 : l.count > d.count ? -1 : 0);
@@ -666,17 +666,17 @@ class ge extends W {
666
666
  d === g.code && (d = g.name);
667
667
  }) : d = this._getDisplayString(d), c`<div class="statistics-row"><div class="data">${`${d}`}</div><div class="count">${this._printNumValue(l.count)}</div></div>`;
668
668
  });
669
- 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
+ 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>` : "";
670
670
  } else
671
- 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
+ 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>`;
672
672
  }
673
673
  renderNullValues() {
674
674
  const { statistics: e, uniqueValues: t, _messages: i } = this, { statistics: n } = i;
675
675
  let s = e?.nullcount;
676
676
  if (!f(s) && t) {
677
- const r = t.uniqueValueInfos;
678
- for (let m = 0; m < r.length; m++) {
679
- const u = r[m];
677
+ const a = t.uniqueValueInfos;
678
+ for (let m = 0; m < a.length; m++) {
679
+ const u = a[m];
680
680
  if (u.value === null) {
681
681
  s = u.count;
682
682
  break;
@@ -686,7 +686,7 @@ class ge extends W {
686
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>`;
687
687
  }
688
688
  }
689
- G("arcgis-field-info", ge);
689
+ W("arcgis-field-info", ve);
690
690
  export {
691
- ge as ArcgisFieldInfo
691
+ ve as ArcgisFieldInfo
692
692
  };