@arcgis/common-components 5.2.0-next.11 → 5.2.0-next.110

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.
Files changed (172) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/cdn/24BY6E4U.js +2 -0
  4. package/dist/cdn/{MCZBUYS5.js → 26TPKYHY.js} +2 -2
  5. package/dist/cdn/2P3QKSBJ.js +2 -0
  6. package/dist/cdn/3ENYIWMV.js +2 -0
  7. package/dist/cdn/3YTGG7RF.js +2 -0
  8. package/dist/cdn/{VQLI4IE7.js → 6YKEQTXQ.js} +2 -2
  9. package/dist/cdn/{L5RMOAO3.js → 73AR55J2.js} +2 -2
  10. package/dist/cdn/746MUQGB.js +2 -0
  11. package/dist/cdn/{Y5Y7IXOV.js → 74MDECVO.js} +1 -1
  12. package/dist/cdn/AHWD5KV4.js +2 -0
  13. package/dist/cdn/ALOLCOFN.js +2 -0
  14. package/dist/cdn/B2QFPLR5.js +2 -0
  15. package/dist/cdn/{WEKRF34E.js → B6QUU35R.js} +2 -2
  16. package/dist/cdn/BGN6KRHS.js +2 -0
  17. package/dist/cdn/BQD6UQIB.js +2 -0
  18. package/dist/cdn/{JLPZ3OR2.js → BSSCT4Z5.js} +2 -2
  19. package/dist/cdn/CT3ZUD4C.js +2 -0
  20. package/dist/cdn/D2RCMLMS.js +2 -0
  21. package/dist/cdn/{5KS7T5BY.js → D2YGEFGL.js} +2 -2
  22. package/dist/cdn/DICEO27I.js +2 -0
  23. package/dist/cdn/{ECNI2A4K.js → E4NVOXNZ.js} +1 -1
  24. package/dist/cdn/{GVOQ2CB7.js → EY5CL247.js} +2 -2
  25. package/dist/cdn/EZH7L65E.js +2 -0
  26. package/dist/cdn/{LKUOAV7B.js → F2XLHROQ.js} +2 -2
  27. package/dist/cdn/F3UPNSY4.js +2 -0
  28. package/dist/cdn/F7ZMTKDL.js +2 -0
  29. package/dist/cdn/GAXWOAWM.js +2 -0
  30. package/dist/cdn/GV62Q7D7.js +2 -0
  31. package/dist/cdn/H4MYODDU.js +2 -0
  32. package/dist/cdn/{OBIWQRXY.js → IUQEF23H.js} +2 -2
  33. package/dist/cdn/KIWPQY6T.js +4 -0
  34. package/dist/cdn/KMWJCWRS.js +2 -0
  35. package/dist/cdn/{L2JNUMXB.js → KOQXEMEM.js} +2 -2
  36. package/dist/cdn/LE43VGSR.js +2 -0
  37. package/dist/cdn/NMDESY3T.js +2 -0
  38. package/dist/cdn/NXUTEL5Q.js +2 -0
  39. package/dist/cdn/P3DCEHGK.js +2 -0
  40. package/dist/cdn/P6IUT6XO.js +2 -0
  41. package/dist/cdn/P7I4EXSU.js +2 -0
  42. package/dist/cdn/Q7STPO4U.js +2 -0
  43. package/dist/cdn/QJJFF4PI.js +2 -0
  44. package/dist/cdn/{4W7JZPB6.js → SHMWZ2AY.js} +2 -2
  45. package/dist/cdn/{3P53QRGS.js → ST5VEH7P.js} +2 -2
  46. package/dist/cdn/U2K7ABGL.js +2 -0
  47. package/dist/cdn/VIUFXHPL.js +2 -0
  48. package/dist/cdn/{UGWLCTVM.js → YJTI6KPW.js} +1 -1
  49. package/dist/cdn/{XRARFMJ7.js → ZBSOCWIQ.js} +2 -2
  50. package/dist/cdn/{3V5M7OHL.js → ZZGYCYHP.js} +4 -4
  51. package/dist/cdn/assets/field-pick-list/t9n/messages.en.json +1 -1
  52. package/dist/cdn/assets/slider-field/t9n/messages.en.json +1 -0
  53. package/dist/cdn/assets/slider-histogram-range/t9n/messages.en.json +1 -0
  54. package/dist/cdn/index.js +2 -2
  55. package/dist/cdn/main.css +1 -1
  56. package/dist/chunks/element-reference-controller.js +19 -0
  57. package/dist/chunks/{commonFunctions.js → general.js} +1 -1
  58. package/dist/chunks/internal-types.js +1 -1
  59. package/dist/chunks/layer-utils.js +53 -41
  60. package/dist/chunks/locale.js +15 -7
  61. package/dist/chunks/resources.js +1 -1
  62. package/dist/chunks/runtime.js +1 -1
  63. package/dist/chunks/strategies.js +287 -0
  64. package/dist/chunks/toolbar.js +9 -0
  65. package/dist/chunks/types.js +16 -0
  66. package/dist/chunks/useT9n.js +1 -1
  67. package/dist/chunks/utils.js +59 -0
  68. package/dist/chunks/utils2.js +20 -0
  69. package/dist/chunks/utils3.js +7 -0
  70. package/dist/components/arcgis-ckeditor5/customElement.d.ts +23 -0
  71. package/dist/components/arcgis-ckeditor5/customElement.js +3 -3
  72. package/dist/components/arcgis-ckeditor5-popover/customElement.js +2 -2
  73. package/dist/components/arcgis-color-input/customElement.d.ts +2 -1
  74. package/dist/components/arcgis-color-input/customElement.js +2 -2
  75. package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +23 -0
  76. package/dist/components/arcgis-coordinate-system-picker/customElement.js +2 -2
  77. package/dist/components/arcgis-coordinate-system-picker-tree/customElement.js +1 -1
  78. package/dist/components/arcgis-field-info/customElement.d.ts +1 -1
  79. package/dist/components/arcgis-field-info/customElement.js +249 -226
  80. package/dist/components/arcgis-field-info/index.js +1 -0
  81. package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
  82. package/dist/components/arcgis-field-pick-list/customElement.d.ts +15 -12
  83. package/dist/components/arcgis-field-pick-list/customElement.js +206 -123
  84. package/dist/components/arcgis-field-pick-list/index.js +4 -3
  85. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
  86. package/dist/components/arcgis-histogram/customElement.d.ts +39 -2
  87. package/dist/components/arcgis-histogram/customElement.js +106 -91
  88. package/dist/components/arcgis-label-input/customElement.js +19 -15
  89. package/dist/components/arcgis-picker-input/customElement.js +1 -1
  90. package/dist/components/arcgis-ramp-color/customElement.js +1 -1
  91. package/dist/components/arcgis-ramp-color-break/customElement.js +1 -1
  92. package/dist/components/arcgis-ramp-opacity/customElement.js +1 -1
  93. package/dist/components/arcgis-slider/customElement.d.ts +11 -3
  94. package/dist/components/arcgis-slider/customElement.js +372 -349
  95. package/dist/components/arcgis-slider-field/customElement.d.ts +298 -0
  96. package/dist/components/arcgis-slider-field/customElement.js +96 -0
  97. package/dist/components/arcgis-slider-field/index.d.ts +1 -0
  98. package/dist/components/arcgis-slider-field/index.js +2 -0
  99. package/dist/components/arcgis-slider-histogram-range/customElement.d.ts +390 -0
  100. package/dist/components/arcgis-slider-histogram-range/customElement.js +120 -0
  101. package/dist/components/arcgis-slider-histogram-range/index.d.ts +1 -0
  102. package/dist/components/arcgis-slider-histogram-range/index.js +3 -0
  103. package/dist/components/arcgis-slider-histogram-range/types.d.ts +6 -0
  104. package/dist/components/arcgis-slider-input/customElement.js +1 -1
  105. package/dist/components/arcgis-ticks/customElement.d.ts +11 -3
  106. package/dist/components/arcgis-ticks/customElement.js +101 -80
  107. package/dist/components/arcgis-toolbar/customElement.d.ts +67 -0
  108. package/dist/components/arcgis-toolbar/customElement.js +108 -0
  109. package/dist/components/arcgis-toolbar/index.d.ts +1 -0
  110. package/dist/components/arcgis-toolbar/index.js +2 -0
  111. package/dist/components/arcgis-toolbar/types.d.ts +41 -0
  112. package/dist/components/arcgis-toolbar-action/customElement.d.ts +97 -0
  113. package/dist/components/arcgis-toolbar-action/customElement.js +52 -0
  114. package/dist/components/arcgis-toolbar-action/index.d.ts +1 -0
  115. package/dist/components/arcgis-toolbar-action/index.js +3 -0
  116. package/dist/components/arcgis-toolbar-group/customElement.d.ts +38 -0
  117. package/dist/components/arcgis-toolbar-group/customElement.js +48 -0
  118. package/dist/components/arcgis-toolbar-group/index.d.ts +1 -0
  119. package/dist/components/arcgis-toolbar-group/index.js +2 -0
  120. package/dist/components/arcgis-toolbar-item/customElement.d.ts +83 -0
  121. package/dist/components/arcgis-toolbar-item/customElement.js +42 -0
  122. package/dist/components/arcgis-toolbar-item/index.d.ts +1 -0
  123. package/dist/components/arcgis-toolbar-item/index.js +4 -0
  124. package/dist/components/arcgis-toolbar-more-button/customElement.d.ts +52 -0
  125. package/dist/components/arcgis-toolbar-more-button/customElement.js +68 -0
  126. package/dist/components/arcgis-toolbar-more-button/index.d.ts +1 -0
  127. package/dist/components/arcgis-toolbar-more-button/index.js +6 -0
  128. package/dist/components/arcgis-toolbar-split-button/customElement.d.ts +51 -0
  129. package/dist/components/arcgis-toolbar-split-button/customElement.js +67 -0
  130. package/dist/components/arcgis-toolbar-split-button/index.d.ts +1 -0
  131. package/dist/components/arcgis-toolbar-split-button/index.js +6 -0
  132. package/dist/components/arcgis-toolbar-stack/customElement.d.ts +48 -0
  133. package/dist/components/arcgis-toolbar-stack/customElement.js +174 -0
  134. package/dist/components/arcgis-toolbar-stack/index.d.ts +1 -0
  135. package/dist/components/arcgis-toolbar-stack/index.js +1 -0
  136. package/dist/components/arcgis-unique-values-list/customElement.js +116 -96
  137. package/dist/components/arcgis-value-picker/customElement.js +6 -6
  138. package/dist/components/arcgis-value-picker-collection/customElement.js +1 -1
  139. package/dist/components/arcgis-value-picker-combobox/customElement.js +1 -1
  140. package/dist/components/arcgis-value-picker-label/customElement.js +1 -1
  141. package/dist/components/arcgis-value-picker-slider/customElement.js +1 -1
  142. package/dist/docs/api.json +1 -1
  143. package/dist/docs/docs.json +1 -1
  144. package/dist/docs/vscode.css-custom-data.json +1 -1
  145. package/dist/docs/vscode.html-custom-data.json +1 -1
  146. package/dist/docs/web-types.json +1 -1
  147. package/dist/index.d.ts +62 -0
  148. package/dist/index.js +3 -1
  149. package/dist/loader.js +14 -5
  150. package/dist/types/lumina.d.ts +58 -2
  151. package/dist/types/preact.d.ts +67 -2
  152. package/dist/types/react.d.ts +76 -2
  153. package/dist/types/stencil.d.ts +60 -4
  154. package/dist/utils/types.d.ts +14 -1
  155. package/package.json +6 -6
  156. package/dist/cdn/2XA6O2MP.js +0 -2
  157. package/dist/cdn/4BJYJUMR.js +0 -2
  158. package/dist/cdn/5U5NQ3F5.js +0 -2
  159. package/dist/cdn/77HZGUSC.js +0 -2
  160. package/dist/cdn/A3CISHRB.js +0 -2
  161. package/dist/cdn/AFBKMYU6.js +0 -4
  162. package/dist/cdn/IUJ4ILLQ.js +0 -2
  163. package/dist/cdn/JPD7Z3MB.js +0 -2
  164. package/dist/cdn/LB7I345F.js +0 -2
  165. package/dist/cdn/LBD3GPSD.js +0 -2
  166. package/dist/cdn/MCH3WQ4X.js +0 -2
  167. package/dist/cdn/N7C4DINF.js +0 -2
  168. package/dist/cdn/NKMDS2IH.js +0 -2
  169. package/dist/cdn/PSITQBDP.js +0 -2
  170. package/dist/cdn/TXYPZ6MB.js +0 -2
  171. package/dist/cdn/WLYFLEI6.js +0 -2
  172. package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
@@ -1,71 +1,72 @@
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";
4
- import { keyed as b } from "lit/directives/keyed.js";
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";
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import { c as H } from "../../chunks/runtime.js";
3
+ import { keyed as $ } from "lit/directives/keyed.js";
4
+ import { ref as b } from "lit/directives/ref.js";
5
+ import { LitElement as Q, createEvent as D, safeClassMap as C } from "@arcgis/lumina";
6
+ import { Task as J } from "@lit/task";
8
7
  import { log as q, composeMissingPropertyMessage as L } from "@arcgis/toolkit/log";
9
- import H from "@arcgis/core/config.js";
8
+ import { css as j, html as c } from "lit";
9
+ import z from "@arcgis/core/config.js";
10
10
  import * as x from "@arcgis/core/core/reactiveUtils.js";
11
11
  import * as h from "@arcgis/core/intl.js";
12
- import * as E 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 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) {
12
+ import * as P from "@arcgis/core/applications/PortalApp/layerUtils.js";
13
+ import * as _ from "@arcgis/core/core/lang.js";
14
+ import B from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
15
+ import K from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
16
+ import { i as f } from "../../chunks/general.js";
17
+ import R from "@arcgis/core/layers/support/CodedValue.js";
18
+ import { i as F, a as V, b as T, c as Z, d as I, e as M, f as y, g as w, h as U, j as X, k as Y, l as ee, m as te, n as N, o as ie, p as W, q as se, r as k, s as E } from "../../chunks/layer-utils.js";
19
+ import ae from "@arcgis/core/rest/support/Query.js";
20
+ import { u as re } from "../../chunks/useT9n.js";
21
+ function ne(a) {
21
22
  return a.associatedLayer?.url;
22
23
  }
23
- const se = {
24
+ const oe = {
24
25
  dateStyle: "short",
25
26
  timeStyle: "short"
26
- }, ae = {
27
+ }, le = {
27
28
  timeStyle: "medium"
28
29
  };
29
- function re(a) {
30
+ function ue(a) {
30
31
  const { layer: e, fieldName: t } = a;
31
32
  let i;
32
- const n = E.supportsFieldConfiguration(e);
33
+ const r = P.supportsFieldConfiguration(e);
33
34
  let s;
34
35
  "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;
38
- /^raster.(item|service)pixelvalue/iu.test(t) && (u.type = "double");
39
- const d = {
40
- layerField: u,
41
- label: l || u.name
36
+ const l = s ? s.fieldInfos : [];
37
+ return G(a)?.filter((n) => n.name === t).forEach((n) => {
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
+ /^raster.(item|service)pixelvalue/iu.test(t) && (n.type = "double");
40
+ const u = {
41
+ layerField: n,
42
+ label: o || n.name
42
43
  };
43
- d.codedValues = ue(t, a), le(d), d.simpleFieldType && (i = d);
44
+ u.codedValues = fe(t, a), me(u), u.simpleFieldType && (i = u);
44
45
  }), i;
45
46
  }
46
- function M(a) {
47
+ function G(a) {
47
48
  const { layer: e } = a;
48
- return y(e) || S(e) || T(e) && e.rasterFields.length ? e.rasterFields : e.fields;
49
+ return F(e) || V(e) || I(e) && e.rasterFields.length ? e.rasterFields : e.fields;
49
50
  }
50
- async function k(a) {
51
+ async function A(a) {
51
52
  a.statisticsStatus = "in-progress";
52
53
  const { layer: e, view: t } = a;
53
- if (y(e) || S(e) || F(e) || $(e))
54
+ if (F(e) || V(e) || w(e) || T(e))
54
55
  throw new Error("could not get feature count");
55
56
  try {
56
- return await ce(e, t);
57
+ return await ge(e, t);
57
58
  } catch {
58
59
  return;
59
60
  }
60
61
  }
61
- async function ne(a) {
62
- const { layer: e, view: t, fieldName: i, fieldInfo: n } = a;
63
- if (y(e) || S(e) || $(e))
62
+ async function de(a) {
63
+ const { layer: e, view: t, fieldName: i, fieldInfo: r } = a;
64
+ if (F(e) || V(e) || T(e))
64
65
  throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");
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
+ if (!r || r.layerField.type === "oid" || r.layerField.type === "guid" || r.layerField.type === "global-id")
67
+ return { totalCount: await A(a), nullcount: 0 };
67
68
  try {
68
- const s = await J({
69
+ const s = await B({
69
70
  layer: e,
70
71
  view: t,
71
72
  field: i,
@@ -73,24 +74,24 @@ async function ne(a) {
73
74
  });
74
75
  if (!f(s.count))
75
76
  throw new Error("could not get statistics");
76
- const r = "sourceJSON" in e && e.sourceJSON.maxRecordCount === s.count;
77
- if (f(s.nullcount) && !r)
77
+ const l = "sourceJSON" in e && e.sourceJSON.maxRecordCount === s.count;
78
+ if (f(s.nullcount) && !l)
78
79
  return { ...s, totalCount: s.count + s.nullcount };
79
80
  {
80
- const m = await k(a);
81
+ const m = await A(a);
81
82
  return { ...s, totalCount: m };
82
83
  }
83
84
  } catch {
84
85
  throw new Error("could not get statistics");
85
86
  }
86
87
  }
87
- async function oe(a) {
88
+ async function ce(a) {
88
89
  const { layer: e, view: t, fieldName: i } = a;
89
- if (y(e) || S(e) || $(e))
90
+ if (F(e) || V(e) || T(e))
90
91
  throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");
91
- R(e) && (e.outFields = ["*"]);
92
+ Z(e) && (e.outFields = ["*"]);
92
93
  try {
93
- return await j({
94
+ return await K({
94
95
  layer: e,
95
96
  view: t,
96
97
  field: i
@@ -99,7 +100,7 @@ async function oe(a) {
99
100
  throw new Error("could not get unique values");
100
101
  }
101
102
  }
102
- function le(a) {
103
+ function me(a) {
103
104
  switch (a.layerField.type) {
104
105
  case "string":
105
106
  a.simpleFieldType = "string";
@@ -131,96 +132,99 @@ function le(a) {
131
132
  case "long":
132
133
  a.simpleFieldType = "number";
133
134
  break;
135
+ default:
136
+ a.simpleFieldType = "string";
134
137
  }
135
138
  }
136
- function ue(a, e) {
139
+ function fe(a, e) {
137
140
  const { layer: t } = e;
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 }];
141
+ if (M(t) && t.subtypeField === a) {
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 })];
142
145
  }
143
- if (!v(t) && !T(t))
146
+ if (!y(t) && !I(t))
144
147
  return;
145
- const i = v(t) ? t.typeIdField : void 0, n = v(t) ? t.types : void 0;
148
+ const i = y(t) ? t.typeIdField : void 0, r = y(t) ? t.types : void 0;
146
149
  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(
149
- (o) => (
150
+ const m = G(e)?.find((d) => d.name === a), n = m?.domain;
151
+ return y(t) && i && r ? (i === a ? s = r.map(
152
+ (d) => (
150
153
  // fake coded values
151
- {
152
- code: o.id,
153
- name: o.name
154
- }
154
+ new R({
155
+ code: d.id,
156
+ name: d.name
157
+ })
155
158
  )
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) => {
159
+ ) : (s = [], r.forEach((d) => {
160
+ if (!d.domains[a] || d.domains[a].type === "inherited") {
161
+ const o = n;
162
+ o?.codedValues && o.codedValues.forEach((u) => {
160
163
  let g = !1;
161
164
  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
+ p.code === u.code && (g = !0, `, ${p.name},`.includes(`, ${u.name},`) || (p.name += `, ${u.name}`));
166
+ }), g || s.push(_.clone(u));
164
167
  });
165
- } else o.domains[a].codedValues && o.domains[a].codedValues.forEach((l) => {
166
- let d = !1;
168
+ } else d.domains[a].codedValues && d.domains[a].codedValues.forEach((o) => {
169
+ let u = !1;
167
170
  s.forEach((g) => {
168
- g.code === l.code && (d = !0, `, ${g.name},`.includes(`, ${l.name},`) || (g.name += `, ${l.name}`));
169
- }), d || s.push(I.clone(l));
171
+ g.code === o.code && (u = !0, `, ${g.name},`.includes(`, ${o.name},`) || (g.name += `, ${o.name}`));
172
+ }), u || s.push(_.clone(o));
170
173
  });
171
- })), !s.length && u?.codedValues && (s = I.clone(u.codedValues))) : u?.codedValues && (s = m.domain.codedValues), s?.length ? s : void 0;
174
+ })), !s.length && n?.codedValues && (s = _.clone(n.codedValues))) : n?.codedValues && (s = m?.domain?.codedValues), s?.length ? s : void 0;
172
175
  }
173
- async function de(a) {
176
+ async function pe(a) {
174
177
  const { view: e, layer: t } = a;
175
- if (T(t) || y(t) || S(t))
178
+ if (I(t) || F(t) || V(t))
176
179
  throw new Error("could not get feature");
177
- if (v(t) && !t.url || Z(t)) {
180
+ if (y(t) && !t.url || U(t)) {
178
181
  const i = t.createQuery();
179
182
  i.start = 0, i.num = 5, i.outFields = ["*"];
180
- const n = await t.queryFeatures(i);
181
- if (n.features.length)
182
- return n;
183
+ const r = await t.queryFeatures(i);
184
+ if (r.features.length)
185
+ return r;
183
186
  throw new Error("could not get feature");
184
187
  } else {
185
188
  if (!e)
186
- return await C(a);
189
+ return await O(a);
187
190
  let i;
188
- if (A(t) || z(t)) {
191
+ if (M(t) || X(t)) {
189
192
  let s = t.parent;
190
- for (; B(s) || K(s); )
193
+ for (; Y(s) || ee(s); )
191
194
  s = s.parent;
192
- i = await e.whenLayerView(s);
195
+ te(s) && (i = await e.whenLayerView(s));
193
196
  } else
194
197
  i = await e.whenLayerView(t);
195
- if (i.availableFields.length === t.fields.length || (F(t) || _(t)) && i.availableFields.length > 0) {
198
+ const r = i.availableFields.length === t.fields.length;
199
+ if (i && (r || (w(t) || N(t)) && i.availableFields.length > 0)) {
196
200
  const s = i.createQuery();
197
201
  s.start = 0, s.num = 5, s.outFields = ["*"];
198
- const r = await i.queryFeatures(s);
199
- return r.features?.length ? r : await C(a);
202
+ const l = await i.queryFeatures(s);
203
+ return l.features?.length ? l : await O(a);
200
204
  } else
201
- return await C(a);
205
+ return await O(a);
202
206
  }
203
207
  }
204
- async function C(a) {
208
+ async function O(a) {
205
209
  const { layer: e } = a;
206
- if (T(e) || y(e) || F(e) || _(e))
210
+ if (I(e) || F(e) || w(e) || N(e))
207
211
  throw new Error("cannot get feature from service");
208
- const t = new ee({
212
+ const t = new ae({
209
213
  where: "1=1",
210
214
  outFields: ["*"],
211
215
  returnGeometry: !1
212
216
  });
213
217
  return "sourceJSON" in e && e.sourceJSON?.advancedQueryCapabilities?.supportsPagination && (t.num = 1), await e.queryFeatures(t);
214
218
  }
215
- async function 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
+ async function ge(a, e) {
220
+ if (Z(a))
221
+ return await he(a);
222
+ if (y(a) || ie(a) || W(a) || U(a) || se(a))
219
223
  return await a.queryFeatureCount();
220
- if (e && (F(a) || _(a)))
221
- return await fe(a, e);
224
+ if (e && (w(a) || N(a)))
225
+ return await ve(a, e);
222
226
  }
223
- async function me(a) {
227
+ async function he(a) {
224
228
  const e = a.createQuery();
225
229
  e.outFields = ["*"];
226
230
  const t = await a.queryFeatures(e);
@@ -228,13 +232,13 @@ async function me(a) {
228
232
  return t.features.length;
229
233
  throw new Error("could not get feature count");
230
234
  }
231
- async function fe(a, e) {
235
+ async function ve(a, e) {
232
236
  return await (await e.whenLayerView(a)).queryFeatureCount();
233
237
  }
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 {
238
+ const ye = j`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-surface-2)}.title{font-weight:700;padding:5px 0}.missing,.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:var(--calcite-space-xs) 0}.statistics-row{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding:var(--calcite-space-xs) 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:var(--calcite-border-width-sm) solid var(--calctie-color-border-2);padding:20px 0 var(--calcite-space-xs) 0;display:flex;justify-content:space-between}`;
239
+ class Fe extends Q {
236
240
  constructor() {
237
- super(...arguments), this._messages = te({ blocking: !0 }), this._propWatcherTask = new Q(this, {
241
+ super(...arguments), this._messages = re({ blocking: !0 }), this.initialized = !1, this._propWatcherTask = new J(this, {
238
242
  task: async ([e, t]) => {
239
243
  const i = f(e) && f(t);
240
244
  if (f(e) || q("error", this, L("layer")), f(t) || q("error", this, L("fieldName")), !i)
@@ -248,85 +252,91 @@ class ge extends W {
248
252
  this.properties = { oneFeatureResponseStatus: 16, oneFeatureResponse: 16, statisticsStatus: 16, statistics: 16, uniqueValuesStatus: 16, uniqueValues: 16, view: 0, layer: 0, fieldName: 1, hideAlias: 5, hideNumericFormat: 5, hideStatistics: 5 };
249
253
  }
250
254
  static {
251
- this.styles = pe;
255
+ this.styles = ye;
252
256
  }
253
257
  async refresh() {
254
258
  await this.processProps(), this.requestUpdate();
255
259
  }
260
+ willUpdate(e) {
261
+ this.initialized && (e.has("fieldName") || e.has("layer")) && this.processProps();
262
+ }
256
263
  disconnectedCallback() {
257
264
  super.disconnectedCallback(), this.timeZoneHandle?.remove();
258
265
  }
259
266
  async processProps() {
260
- const { view: e, layer: t, fieldName: i, hideStatistics: n } = this;
267
+ const { view: e, layer: t, fieldName: i, hideStatistics: r } = this;
261
268
  if (!t || !i)
262
269
  return;
263
270
  let s;
264
271
  if (t.declaredClass === "esri.layers.support.Sublayer") {
265
- const r = t;
266
- e && await x.whenOnce(() => !e.updating), s = await r.createFeatureLayer(), await s?.load();
272
+ const l = t;
273
+ e && await x.whenOnce(() => !e.updating), s = await l.createFeatureLayer(), await s?.load();
267
274
  }
268
- this.props = {
275
+ if (this.oneFeatureResponseStatus = "missing", this.oneFeatureResponse = void 0, this.statisticsStatus = "missing", this.statistics = void 0, this.uniqueValuesStatus = "missing", this.uniqueValues = void 0, this.props = {
269
276
  view: e,
270
277
  layer: s ?? t,
271
278
  fieldName: i,
272
- hideStatistics: 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";
279
+ hideStatistics: r
280
+ }, this.props.fieldInfo = ue(this.props), !this.props.fieldInfo) {
281
+ q("error", this, `Field ${i} does not exist in layer.`);
282
+ return;
283
+ }
284
+ W(t) && z.request.interceptors?.push({
285
+ urls: `${ne(t)}/${t.layerId}`,
286
+ before(l) {
287
+ l.requestOptions.authMode = "no-prompt";
277
288
  }
278
- }), this.oneFeatureResponseStatus = "in-progress";
289
+ }), this.processPropsPart2();
290
+ }
291
+ async processPropsPart2() {
292
+ const { layer: e, hideStatistics: t } = this;
293
+ if (await this.requestOneFeature(), w(e) || k(e) || E(e)) {
294
+ this.uniqueValuesStatus = "failed", this.statisticsStatus = "failed";
295
+ return;
296
+ }
297
+ t ? this.uniqueValuesStatus = "failed" : await this.requestUniqueValues(), t ? this.statisticsStatus = "failed" : await this.requestStatistics(), this.setUpTimeZoneHandle(), this.initialized = !0;
298
+ }
299
+ async requestOneFeature() {
300
+ this.oneFeatureResponseStatus = "in-progress";
279
301
  try {
280
- const r = await de(this.props);
281
- this.oneFeatureResponse = r, this.oneFeatureResponseStatus = "success";
302
+ const e = await pe(this.props);
303
+ this.oneFeatureResponse = e, this.oneFeatureResponseStatus = "success";
282
304
  } catch {
283
305
  this.oneFeatureResponseStatus = "failed";
284
306
  }
285
- if (F(t)) {
286
- this.uniqueValuesStatus = "failed", this.statisticsStatus = "failed";
287
- return;
288
- }
289
- if (n)
307
+ }
308
+ async requestUniqueValues() {
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 {
290
314
  this.uniqueValuesStatus = "failed";
291
- else {
292
- this.uniqueValuesStatus = "in-progress";
293
- try {
294
- const r = await oe(this.props);
295
- this.uniqueValues = r, r?.uniqueValueInfos?.length ? this.uniqueValuesStatus = "success" : this.uniqueValuesStatus = "failed";
296
- } catch {
297
- this.uniqueValuesStatus = "failed";
298
- }
299
315
  }
300
- if (n)
301
- this.statisticsStatus = "failed";
302
- else {
303
- this.statisticsStatus = "in-progress";
304
- try {
305
- const r = await ne(this.props);
306
- if (!f(r.totalCount) && f(r.count) && this.uniqueValuesStatus === "success") {
307
- const m = this.uniqueValues?.uniqueValueInfos ?? [];
308
- for (let u = 0; u < m.length; u++) {
309
- const o = m[u];
310
- if (o.value === null) {
311
- r.totalCount = o.count + r.count;
312
- break;
313
- }
316
+ }
317
+ async requestStatistics() {
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;
314
327
  }
315
- r.totalCount ??= r.count;
316
328
  }
317
- this.statistics = r, this.statisticsStatus = "success";
318
- } catch {
319
- this.statisticsStatus = "failed";
329
+ e.totalCount ??= e.count;
320
330
  }
331
+ this.statistics = e, this.statisticsStatus = "success";
332
+ } catch {
333
+ this.statisticsStatus = "failed";
321
334
  }
322
- this.setUpTimeZoneHandle();
323
335
  }
324
336
  setUpTimeZoneHandle() {
325
337
  this.timeZoneHandle?.remove();
326
338
  const { props: e } = this, { view: t, fieldInfo: i } = e;
327
- ["date", "timestamp-offset"].includes(this._getStatisticsType(i)) && (this.timeZoneHandle = x.watch(() => t?.timeZone, () => {
328
- this.requestUpdate();
329
- }));
339
+ ["date", "timestamp-offset"].includes(this._getStatisticsType(i)) && (this.timeZoneHandle = x.watch(() => t?.timeZone, () => this.requestUpdate()));
330
340
  }
331
341
  _getFieldTypeLabel(e) {
332
342
  const { _messages: t } = this, i = t.fieldTypes;
@@ -427,8 +437,8 @@ class ge extends W {
427
437
  }
428
438
  }
429
439
  _getDisplayString(e, t) {
430
- const { props: i } = this, { fieldInfo: n } = i;
431
- switch (n.simpleFieldType) {
440
+ const { props: i } = this, { fieldInfo: r } = i;
441
+ switch (r.simpleFieldType) {
432
442
  case "date":
433
443
  return this._getDateString(e, t);
434
444
  case "date-only":
@@ -487,8 +497,13 @@ class ge extends W {
487
497
  _printNumValue(e, t) {
488
498
  return f(e) ? this._getNumberString(e, t) : "--";
489
499
  }
490
- _setCompleteRef() {
491
- this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit();
500
+ _setCompleteRef(e) {
501
+ if (this.completeRefHandler && clearInterval(this.completeRefHandler), e) {
502
+ let t = 0;
503
+ this.completeRefHandler = setInterval(() => {
504
+ (t > 130 || this.isFinished(this.uniqueValuesStatus) && this.isFinished(this.statisticsStatus)) && (clearInterval(this.completeRefHandler), this.arcgisComplete.emit(), this.arcgisFieldInfoComplete.emit()), t++;
505
+ }, 1e3);
506
+ }
492
507
  }
493
508
  getCurrentFieldFormat() {
494
509
  const { props: e } = this, { layer: t, fieldName: i } = e;
@@ -509,17 +524,17 @@ class ge extends W {
509
524
  } : void 0;
510
525
  if (i)
511
526
  return i;
512
- const n = this.getPopupTemplateFieldInfo();
527
+ const r = this.getPopupTemplateFieldInfo();
513
528
  return h.convertNumberFormatToIntlOptions({
514
- digitSeparator: n?.format?.digitSeparator ?? !0,
515
- places: n?.format?.places ?? 2
529
+ digitSeparator: r?.format?.digitSeparator ?? !0,
530
+ places: r?.format?.places ?? 2
516
531
  });
517
532
  }
518
533
  getIntlDateTimeFormattingOptions(e, t) {
519
534
  const i = this.getCurrentFieldFormat();
520
535
  if (!t?.useFieldFormatting)
521
- return i ? t?.isTimeOnly ? ae : se : h.convertDateFormatToIntlOptions(e);
522
- const n = i ? {
536
+ return i ? t?.isTimeOnly ? le : oe : h.convertDateFormatToIntlOptions(e);
537
+ const r = i ? {
523
538
  dateStyle: t?.isTimeOnly ? void 0 : i.dateStyle ?? void 0,
524
539
  // year/month is overridden if dateStyle is set
525
540
  year: i.dateStyle ? void 0 : i.year ?? void 0,
@@ -527,21 +542,25 @@ class ge extends W {
527
542
  timeStyle: i.timeStyle ?? void 0,
528
543
  hourCycle: i.hour12 === "never" ? "h23" : "h11"
529
544
  } : void 0;
530
- if (n)
531
- return n;
545
+ if (r)
546
+ return r;
532
547
  const s = this.getPopupTemplateFieldInfo();
533
548
  return h.convertDateFormatToIntlOptions(s?.format?.dateFormat ?? e);
534
549
  }
535
550
  originalLayerSupportsFieldConfigs() {
536
551
  const { layer: e } = this;
537
- return E.supportsFieldConfiguration(e);
552
+ return P.supportsFieldConfiguration(e);
538
553
  }
539
554
  getPopupTemplateFieldInfo() {
540
555
  const { props: e } = this, { layer: t, fieldName: i } = e;
541
556
  return ("popupTemplate" in t ? t.popupTemplate : void 0)?.fieldInfos?.find((s) => s.fieldName === i);
542
557
  }
558
+ isFinished(e) {
559
+ return ["success", "failed"].includes(e);
560
+ }
543
561
  render() {
544
562
  return this._propWatcherTask.render({
563
+ pending: () => c`<calcite-scrim loading></calcite-scrim>`,
545
564
  complete: () => {
546
565
  const { props: e } = this, { fieldInfo: t } = e;
547
566
  return t ? c`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>` : "";
@@ -550,69 +569,73 @@ class ge extends W {
550
569
  });
551
570
  }
552
571
  renderFieldType() {
553
- const { _messages: e, props: t } = this, { fieldInfo: i } = t, n = this._getFieldTypeLabel(i.layerField.type);
554
- return c`<div class="section"><div class="title">${e.fieldType}</div><div>${n}</div></div>`;
572
+ const { _messages: e, props: t } = this, { fieldInfo: i } = t, r = this._getFieldTypeLabel(i.layerField.type);
573
+ return c`<div class="section"><div class="title">${e.fieldType}</div><div>${r}</div></div>`;
555
574
  }
556
575
  renderFieldAlias() {
557
- const { _messages: e, props: t, hideAlias: i } = this, { fieldInfo: n } = t;
558
- return i ? "" : c`<div class="section"><div class="title">${e.fieldAlias}</div><div>${n.label}</div></div>`;
576
+ const { _messages: e, props: t, hideAlias: i } = this, { fieldInfo: r } = t;
577
+ return i ? "" : c`<div class="section"><div class="title">${e.fieldAlias}</div><div>${r.label}</div></div>`;
559
578
  }
560
579
  renderFieldDescription() {
561
580
  const { _messages: e, props: t } = this, { layer: i } = t;
562
- if (!v(i))
581
+ if (!y(i))
563
582
  return "";
564
- const { fieldInfo: n } = t, s = n.layerField.description;
565
- return c`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${V({
583
+ const { fieldInfo: r } = t, s = r.layerField.description;
584
+ return c`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${C({
566
585
  missing: !s
567
586
  })}>${s || e.fieldDescriptionNotSet}</div></div>`;
568
587
  }
569
588
  renderFieldValueType() {
570
589
  const { _messages: e, props: t } = this, { layer: i } = t;
571
- if (!v(i))
590
+ if (!y(i))
572
591
  return "";
573
- const { fieldInfo: n } = t, s = this._getFieldValueTypeCamelCase(n);
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>`;
592
+ const { fieldInfo: r } = t, s = this._getFieldValueTypeCamelCase(r);
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>`;
575
594
  }
576
595
  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;
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;
578
597
  let p;
579
- if (y(o) || $(o) || !F(o) && ["string", "oid", "guid"].includes(this._getStatisticsType(d)) && s !== "failed")
598
+ if (F(d) || T(d) || !w(d) && ["string", "oid", "guid"].includes(this._getStatisticsType(u)) && s !== "failed")
580
599
  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);
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>`;
600
+ t === "success" ? e.features.forEach((v) => {
601
+ (p === void 0 || p === null && v.attributes[o] !== null) && (p = v.attributes[o]);
602
+ }) : i === "success" ? p = r?.min ?? void 0 : s === "success" && (p = l?.uniqueValueInfos?.[0]?.value ?? l?.uniqueValueInfos?.[1]?.value ?? void 0);
603
+ const S = u.codedValues;
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>`;
586
605
  }
587
606
  renderFieldNumericFormat() {
588
- const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName: n, fieldInfo: s, layer: r } = t;
607
+ const { _messages: e, props: t, hideNumericFormat: i } = this, { fieldName: r, fieldInfo: s, layer: l } = t;
589
608
  if (i || !["double", "long", "single"].includes(s.layerField.type))
590
609
  return "";
591
- const m = this.originalLayerSupportsFieldConfigs() ? r.getFieldConfiguration(n) : void 0;
610
+ const m = this.originalLayerSupportsFieldConfigs() ? l.getFieldConfiguration(r) : void 0;
592
611
  if (m?.fieldFormat) {
593
- const { minimumFractionDigits: o, maximumFractionDigits: l } = m.fieldFormat;
594
- return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}", o.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}", l.toString())}</div></div>`;
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>`;
595
614
  }
596
- const u = "popupTemplate" in r ? r.popupTemplate : void 0;
597
- if (u?.fieldInfos) {
598
- const o = u.fieldInfos?.filter((l) => l.fieldName === n);
599
- if (o?.length) {
600
- const l = o[0];
601
- if (f(l?.format?.places)) {
602
- const d = l.format.places;
603
- return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}", d.toString())}</div></div>`;
615
+ const n = "popupTemplate" in l ? l.popupTemplate : void 0;
616
+ if (n?.fieldInfos) {
617
+ const d = n.fieldInfos?.filter((o) => o.fieldName === r);
618
+ if (d?.length) {
619
+ const o = d[0];
620
+ if (f(o?.format?.places)) {
621
+ const u = o.format.places;
622
+ return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}", u.toString())}</div></div>`;
604
623
  }
605
624
  }
606
625
  }
607
626
  return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`;
608
627
  }
609
628
  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>`;
629
+ const { statisticsStatus: e, uniqueValuesStatus: t, hideStatistics: i, _messages: r, props: s } = this, { layer: l, fieldInfo: m } = s;
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>`;
631
+ }
632
+ renderWaitingForStatistics() {
633
+ const { _messages: e } = this;
634
+ return $("field-info-statistics-content", c`<div class="missing">${e.fieldStatisticsRetrieving}</div>`);
612
635
  }
613
636
  renderNoStatistics() {
614
637
  const { _messages: e } = this;
615
- return b("field-info-statistics-content", c`<div class="missing" ${O(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`);
638
+ return $("field-info-statistics-content", c`<div class="missing" ${b(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`);
616
639
  }
617
640
  renderStatistics() {
618
641
  const { props: e } = this, { fieldInfo: t } = e;
@@ -633,60 +656,60 @@ class ge extends W {
633
656
  }
634
657
  }
635
658
  renderNumberStatistics() {
636
- const { statistics: e, _messages: t } = this;
659
+ const { statistics: e, uniqueValuesStatus: t, statisticsStatus: i, _messages: r } = this;
637
660
  if (!e)
638
- return this.renderNoStatistics();
639
- const { statistics: i } = t;
640
- return c`<div><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${f(e.sum) ? c`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>` : null}${f(e.min) ? c`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>` : null}${f(e.max) ? c`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>` : null}${f(e.avg) ? c`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>` : null}${f(e.stddev) ? c`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>` : null}${this.renderNullValues()}</div>`;
661
+ return this.isFinished(t) && this.isFinished(i) ? this.renderNoStatistics() : this.renderWaitingForStatistics();
662
+ const { statistics: s } = r;
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>`);
641
664
  }
642
665
  renderStringStatistics() {
643
- const { statistics: e, uniqueValuesStatus: t, _messages: i } = this, { statistics: n } = i;
644
- return c`<div><div class="statistics-row"><div>${n.numberOfValues}</div>${t !== "success" ? c`<div class="missing">--</div>` : c`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`;
666
+ const { statistics: e, uniqueValuesStatus: t, _messages: i } = this, { statistics: r } = i;
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>`);
645
668
  }
646
669
  renderDateStatistics() {
647
- const { statistics: e, view: t, props: i, _messages: n } = this, { fieldInfo: s } = i;
670
+ const { statistics: e, view: t, props: i, uniqueValuesStatus: r, statisticsStatus: s, _messages: l } = this, { fieldInfo: m } = i;
648
671
  if (!e || !f(e.max) || !f(e.min))
649
- return this.renderNoStatistics();
650
- const { statistics: r } = n, m = e.max - e.min, u = Math.floor(m / 31536e6);
651
- let o = Math.floor((m - u * 31536e6) / 2628e6), l = Math.ceil((m - o * 2628e6) / 864e5);
652
- l >= 30 && (o += 1, l = 0);
653
- let d = u === 1 ? 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()) : "";
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>`;
672
+ return this.isFinished(r) && this.isFinished(s) ? this.renderNoStatistics() : this.renderWaitingForStatistics();
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);
675
+ g >= 30 && (u += 1, g = 0);
676
+ let p = o === 1 ? n.timeSpanOptions.year : o > 1 ? n.timeSpanOptions.years.replace("${years}", o.toString()) : "";
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()) : "";
678
+ const S = m.simpleFieldType !== "timestamp-offset" || !t || t.timeZone !== "unknown", v = m.simpleFieldType === "time-only";
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>`);
657
680
  }
658
681
  renderTopValues() {
659
- const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props: n } = this, { fieldInfo: s } = n, { statistics: r } = i;
682
+ const { uniqueValues: e, uniqueValuesStatus: t, _messages: i, props: r } = this, { fieldInfo: s } = r, { statistics: l } = i;
660
683
  if (e?.uniqueValueInfos?.length) {
661
684
  const m = e.uniqueValueInfos;
662
- m.sort((l, d) => l.count < d.count ? 1 : l.count > d.count ? -1 : 0);
663
- const u = s.codedValues, o = m.filter((l) => l.value !== null).filter((l, d) => l && d < 10).map((l) => {
664
- let d = l.value;
665
- return u ? u.forEach((g) => {
666
- d === g.code && (d = g.name);
667
- }) : d = this._getDisplayString(d), c`<div class="statistics-row"><div class="data">${`${d}`}</div><div class="count">${this._printNumValue(l.count)}</div></div>`;
685
+ m.sort((o, u) => o.count < u.count ? 1 : o.count > u.count ? -1 : 0);
686
+ const n = s.codedValues, d = m.filter((o) => o.value !== null).filter((o, u) => o && u < 10).map((o) => {
687
+ let u = o.value;
688
+ return n ? n.forEach((g) => {
689
+ u === g.code && (u = g.name);
690
+ }) : u = this._getDisplayString(u), c`<div class="statistics-row"><div class="data">${`${u}`}</div><div class="count">${this._printNumValue(o.count)}</div></div>`;
668
691
  });
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>` : "";
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>` : "";
670
693
  } 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>`;
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>`;
672
695
  }
673
696
  renderNullValues() {
674
- const { statistics: e, uniqueValues: t, _messages: i } = this, { statistics: n } = i;
697
+ const { statistics: e, uniqueValues: t, _messages: i } = this, { statistics: r } = i;
675
698
  let s = e?.nullcount;
676
699
  if (!f(s) && t) {
677
- const r = t.uniqueValueInfos;
678
- for (let m = 0; m < r.length; m++) {
679
- const u = r[m];
680
- if (u.value === null) {
681
- s = u.count;
700
+ const l = t.uniqueValueInfos;
701
+ for (let m = 0; m < l.length; m++) {
702
+ const n = l[m];
703
+ if (n.value === null) {
704
+ s = n.count;
682
705
  break;
683
706
  }
684
707
  }
685
708
  }
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>`;
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>`;
687
710
  }
688
711
  }
689
- G("arcgis-field-info", ge);
712
+ H("arcgis-field-info", Fe);
690
713
  export {
691
- ge as ArcgisFieldInfo
714
+ Fe as ArcgisFieldInfo
692
715
  };