@arcgis/common-components 4.29.0-beta.46 → 4.29.0-beta.48

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 (53) hide show
  1. package/dist/arcgis-common-components/arcgis-common-components.esm.js +1 -1
  2. package/dist/arcgis-common-components/p-6c7d2684.js +1 -0
  3. package/dist/arcgis-common-components/p-7318a1d1.entry.js +1 -0
  4. package/dist/arcgis-common-components/p-77e17376.entry.js +1 -0
  5. package/dist/arcgis-common-components/p-a91ab432.js +2 -0
  6. package/dist/cjs/arcgis-common-components.cjs.js +3 -3
  7. package/dist/cjs/arcgis-field-info.cjs.entry.js +902 -903
  8. package/dist/cjs/arcgis-field-pick-list.cjs.entry.js +228 -229
  9. package/dist/cjs/{index-2e4fbd31.js → index-5ec7f592.js} +5 -20
  10. package/dist/cjs/{index-ab5f2576.js → index-e0422bc8.js} +72 -77
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/components/arcgis-field-info.d.ts +2 -2
  13. package/dist/components/arcgis-field-pick-list.d.ts +2 -2
  14. package/dist/components/arcgis-field-pick-list.js +271 -272
  15. package/dist/components/field-info.js +955 -900
  16. package/dist/esm/arcgis-common-components.js +4 -4
  17. package/dist/esm/arcgis-field-info.entry.js +902 -903
  18. package/dist/esm/arcgis-field-pick-list.entry.js +228 -229
  19. package/dist/esm/{index-74897166.js → index-0c129ec4.js} +73 -78
  20. package/dist/esm/index-ba4fe890.js +59 -0
  21. package/dist/esm/loader.js +3 -3
  22. package/dist/types/components/field-info/field-info.d.ts +61 -61
  23. package/dist/types/components/field-info/t9n-types.d.ts +72 -72
  24. package/dist/types/components/field-info/utils/basic.d.ts +24 -24
  25. package/dist/types/components/field-info/utils/field.d.ts +1 -1
  26. package/dist/types/components/field-pick-list/field-pick-list.d.ts +115 -115
  27. package/dist/types/components/field-pick-list/t9n-types.d.ts +15 -15
  28. package/dist/types/components/field-pick-list/utils/types.d.ts +14 -14
  29. package/dist/types/components.d.ts +0 -86
  30. package/dist/types/stencil-public-runtime.d.ts +8 -0
  31. package/package.json +7 -7
  32. package/dist/arcgis-common-components/p-0be8fd4c.entry.js +0 -1
  33. package/dist/arcgis-common-components/p-164eb24e.entry.js +0 -1
  34. package/dist/arcgis-common-components/p-5ecf6396.js +0 -1
  35. package/dist/arcgis-common-components/p-97c7ac8d.entry.js +0 -1
  36. package/dist/arcgis-common-components/p-b23318c8.js +0 -1
  37. package/dist/arcgis-common-components/p-d66b011b.entry.js +0 -1
  38. package/dist/arcgis-common-components/p-f27af39c.js +0 -2
  39. package/dist/cjs/arcgis-api-key.cjs.entry.js +0 -51
  40. package/dist/cjs/arcgis-identity.cjs.entry.js +0 -139
  41. package/dist/cjs/index-f8bf4df6.js +0 -7
  42. package/dist/components/arcgis-api-key.d.ts +0 -11
  43. package/dist/components/arcgis-api-key.js +0 -69
  44. package/dist/components/arcgis-identity.d.ts +0 -11
  45. package/dist/components/arcgis-identity.js +0 -167
  46. package/dist/components/index2.js +0 -75
  47. package/dist/esm/arcgis-api-key.entry.js +0 -47
  48. package/dist/esm/arcgis-identity.entry.js +0 -135
  49. package/dist/esm/index-3d9bb67e.js +0 -75
  50. package/dist/esm/index-e7244815.js +0 -3
  51. package/dist/types/components/api-key/api-key.d.ts +0 -9
  52. package/dist/types/components/identity/identity.d.ts +0 -31
  53. package/dist/types/components/types.d.ts +0 -10
@@ -1,33 +1,88 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h as h$1, Fragment, Host } from '@stencil/core/internal/client';
2
- import { a as importCoreLang, i as importConfig, b as importIntl, c as importRestSupportQuery, d as importSmartMappingStatisticsSummaryStatistics, e as importSmartMappingStatisticsUniqueValues, f as importCoreReactiveUtils } from './index2.js';
2
+
3
+ const amd = "define" in window && typeof window.define === "function" && "amd" in window.define;
4
+ function requireModule(modulePath) {
5
+ return new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
6
+ resolve(moduleDefault);
7
+ }));
8
+ }
9
+ async function importRestSupportQuery() {
10
+ if (amd) {
11
+ return requireModule("esri/rest/support/Query");
12
+ }
13
+ const module = await import('@arcgis/core/rest/support/Query.js');
14
+ return module.default;
15
+ }
16
+ async function importConfig() {
17
+ if (amd) {
18
+ return requireModule("esri/config");
19
+ }
20
+ const module = await import('@arcgis/core/config.js');
21
+ return module.default;
22
+ }
23
+ async function importCoreLang() {
24
+ if (amd) {
25
+ return requireModule("esri/core/lang");
26
+ }
27
+ const module = await import('@arcgis/core/core/lang.js');
28
+ return module;
29
+ }
30
+ async function importCoreReactiveUtils() {
31
+ if (amd) {
32
+ return requireModule("esri/core/reactiveUtils");
33
+ }
34
+ const module = await import('@arcgis/core/core/reactiveUtils.js');
35
+ return module;
36
+ }
37
+ async function importIntl() {
38
+ if (amd) {
39
+ return requireModule("esri/intl");
40
+ }
41
+ const module = await import('@arcgis/core/intl.js');
42
+ return module;
43
+ }
44
+ async function importSmartMappingStatisticsSummaryStatistics() {
45
+ if (amd) {
46
+ return requireModule("esri/smartMapping/statistics/summaryStatistics");
47
+ }
48
+ const module = await import('@arcgis/core/smartMapping/statistics/summaryStatistics.js');
49
+ return module.default;
50
+ }
51
+ async function importSmartMappingStatisticsUniqueValues() {
52
+ if (amd) {
53
+ return requireModule("esri/smartMapping/statistics/uniqueValues");
54
+ }
55
+ const module = await import('@arcgis/core/smartMapping/statistics/uniqueValues.js');
56
+ return module.default;
57
+ }
3
58
 
4
59
  function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function T(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let i of o)S(e,i.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function E(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function C(e){return f(e,"dir","ltr")}function f(e,t,n){return E(e,`[${t}]`)?.getAttribute(t)??n}var x=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function N(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let s=await o.json();return a.set(r,s),s}if(e==="en"){a.set(r,void 0);return}let i=await N("en",t,n);return a.set(r,i),i}catch{a.set(r,void 0);return}}function R(e){let t=f(e,"lang",navigator?.language||"en");if(x.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:x.has(n)?n:"en"}}var m=new WeakMap,h=new WeakMap,_=new WeakMap;async function F(e,t,n){h.set(e,t),m.set(e,T(e._hostElement,["lang"],()=>{b(e,n);})),await b(e,n);}function U(e){m.get(e)?.disconnect(),m.delete(e),h.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=R(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=_.get(e);if(!o){let i=h.get(e)??"",s=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),u=`${i}/${s}/t9n`,l=`${s}.t9n.`;o=await N(r,u,l);}e._t9nLocale=r,e._t9nStrings=o,await t?.call(e);}
5
60
 
6
61
  var Status;
7
62
  (function (Status) {
8
- Status["MISSING"] = "missing";
9
- Status["IN_PROGRESS"] = "inProgress";
10
- Status["SUCCESS"] = "success";
11
- Status["FAILED"] = "failed";
63
+ Status["MISSING"] = "missing";
64
+ Status["IN_PROGRESS"] = "inProgress";
65
+ Status["SUCCESS"] = "success";
66
+ Status["FAILED"] = "failed";
12
67
  })(Status || (Status = {}));
13
68
  var SimpleFieldTypes;
14
69
  (function (SimpleFieldTypes) {
15
- SimpleFieldTypes["NUMBER"] = "number";
16
- SimpleFieldTypes["STRING"] = "string";
17
- SimpleFieldTypes["DATE"] = "date";
18
- SimpleFieldTypes["DATE_ONLY"] = "date-only";
19
- SimpleFieldTypes["TIME_ONLY"] = "time-only";
20
- SimpleFieldTypes["TIMESTAMP_OFFSET"] = "timestamp-offset";
21
- SimpleFieldTypes["OID"] = "oid";
22
- SimpleFieldTypes["GUID"] = "guid";
23
- SimpleFieldTypes["UNKNOWN"] = "unknown";
70
+ SimpleFieldTypes["NUMBER"] = "number";
71
+ SimpleFieldTypes["STRING"] = "string";
72
+ SimpleFieldTypes["DATE"] = "date";
73
+ SimpleFieldTypes["DATE_ONLY"] = "date-only";
74
+ SimpleFieldTypes["TIME_ONLY"] = "time-only";
75
+ SimpleFieldTypes["TIMESTAMP_OFFSET"] = "timestamp-offset";
76
+ SimpleFieldTypes["OID"] = "oid";
77
+ SimpleFieldTypes["GUID"] = "guid";
78
+ SimpleFieldTypes["UNKNOWN"] = "unknown";
24
79
  })(SimpleFieldTypes || (SimpleFieldTypes = {}));
25
80
  /**
26
81
  * Returns true if the value is defined
27
82
  * @param value - value to check
28
83
  */
29
84
  function isDefined(value) {
30
- return value !== undefined && value !== null;
85
+ return value !== undefined && value !== null;
31
86
  }
32
87
  /**
33
88
  * Returns the URL used for queries.
@@ -35,10 +90,10 @@ function isDefined(value) {
35
90
  * @param value - value to check
36
91
  */
37
92
  function getQueryURL(layer) {
38
- if (layer.type === "scene") {
39
- return layer.associatedLayer?.url;
40
- }
41
- return layer.url;
93
+ if (layer.type === "scene") {
94
+ return layer.associatedLayer?.url;
95
+ }
96
+ return layer.url;
42
97
  }
43
98
 
44
99
  /**
@@ -46,231 +101,231 @@ function getQueryURL(layer) {
46
101
  * @param props - properties containing layer and fieldName
47
102
  */
48
103
  function getFieldInfo(props) {
49
- const { layer, fieldName } = props;
50
- let fieldInfo = undefined;
51
- const { popupTemplate } = layer;
52
- const popupFieldInfos = popupTemplate ? popupTemplate.fieldInfos : [];
53
- (layer.type === "imagery-tile"
54
- ? layer.rasterFields
55
- : layer.type === "imagery" && layer.rasterFields?.length
56
- ? layer.rasterFields
57
- : layer.fields)
58
- .filter((layerField) => layerField.name === fieldName)
59
- .forEach((layerField) => {
60
- const list = popupFieldInfos
61
- ? popupFieldInfos.filter((fInfo) => fInfo.fieldName === layerField.name)
62
- : null;
63
- const label = list?.length ? list[0].label : null;
64
- if (/^raster.(item|service)pixelvalue/i.test(fieldName)) {
65
- // e.g. "Raster.ServicePixelValue" | "Raster.ItemPixelValue" | "Raster.ServicePixelValue.Raw"
66
- // layer.rasterFields reports them as type "string"
67
- layerField.type = "double";
68
- }
69
- const featureFilterField = {
70
- layerField: layerField,
71
- label: label || layerField.alias || layerField.name
72
- };
73
- featureFilterField.codedValues = getCodedValues(fieldName, props);
74
- _getSimpleFieldType(featureFilterField);
75
- if (featureFilterField.simpleFieldType) {
76
- fieldInfo = featureFilterField;
77
- } // else can't use field
78
- });
79
- return fieldInfo;
104
+ const { layer, fieldName } = props;
105
+ let fieldInfo = undefined;
106
+ const { popupTemplate } = layer;
107
+ const popupFieldInfos = popupTemplate ? popupTemplate.fieldInfos : [];
108
+ (layer.type === "imagery-tile"
109
+ ? layer.rasterFields
110
+ : layer.type === "imagery" && layer.rasterFields?.length
111
+ ? layer.rasterFields
112
+ : layer.fields)
113
+ .filter((layerField) => layerField.name === fieldName)
114
+ .forEach((layerField) => {
115
+ const list = popupFieldInfos
116
+ ? popupFieldInfos.filter((fInfo) => fInfo.fieldName === layerField.name)
117
+ : null;
118
+ const label = list?.length ? list[0].label : null;
119
+ if (/^raster.(item|service)pixelvalue/i.test(fieldName)) {
120
+ // e.g. "Raster.ServicePixelValue" | "Raster.ItemPixelValue" | "Raster.ServicePixelValue.Raw"
121
+ // layer.rasterFields reports them as type "string"
122
+ layerField.type = "double";
123
+ }
124
+ const featureFilterField = {
125
+ layerField: layerField,
126
+ label: label || layerField.alias || layerField.name
127
+ };
128
+ featureFilterField.codedValues = getCodedValues(fieldName, props);
129
+ _getSimpleFieldType(featureFilterField);
130
+ if (featureFilterField.simpleFieldType) {
131
+ fieldInfo = featureFilterField;
132
+ } // else can't use field
133
+ });
134
+ return fieldInfo;
80
135
  }
81
136
  /**
82
137
  * Returns feature count in layer
83
138
  * @param props - properties containing layer and fieldName
84
139
  */
85
140
  async function getFeatureCount(props) {
86
- props.statisticsStatus = Status.IN_PROGRESS;
87
- const { layer, view } = props;
88
- if (layer.type === "imagery" || layer.type === "imagery-tile" || layer.type === "stream") {
89
- throw new Error("could not get feature count");
90
- }
91
- try {
92
- return await getFeatureCountCommon(layer, view);
93
- }
94
- catch (error) {
95
- return;
96
- }
141
+ props.statisticsStatus = Status.IN_PROGRESS;
142
+ const { layer, view } = props;
143
+ if (layer.type === "imagery" || layer.type === "imagery-tile" || layer.type === "stream") {
144
+ throw new Error("could not get feature count");
145
+ }
146
+ try {
147
+ return await getFeatureCountCommon(layer, view);
148
+ }
149
+ catch (error) {
150
+ return;
151
+ }
97
152
  }
98
153
  /**
99
154
  * Returns summary statistics
100
155
  * @param props - properties containing layer and fieldName
101
156
  */
102
157
  async function getStatistics(props) {
103
- const { layer, view, fieldName, fieldInfo, modules } = props;
104
- if (layer.type === "imagery" || layer.type === "imagery-tile") {
105
- throw new Error("could not get statistics for ImageryLayer/ImageryTileLayer");
106
- }
107
- if (!fieldInfo ||
108
- fieldInfo.layerField.type === "oid" ||
109
- fieldInfo.layerField.type === "guid" ||
110
- fieldInfo.layerField.type === "global-id") {
111
- const count = await getFeatureCount(props);
112
- return Promise.resolve({ totalCount: count, nullcount: 0 } /*StatisticsResult*/);
113
- }
114
- try {
115
- const result = await modules.summaryStatistics({
116
- layer,
117
- view,
118
- field: fieldName
119
- });
120
- if (!isDefined(result.count)) {
121
- // statistics is unusable
122
- throw new Error("could not get statistics");
158
+ const { layer, view, fieldName, fieldInfo, modules } = props;
159
+ if (layer.type === "imagery" || layer.type === "imagery-tile") {
160
+ throw new Error("could not get statistics for ImageryLayer/ImageryTileLayer");
123
161
  }
124
- // if we hit maxRecordCount other stats values are probably not correct either
125
- const hitMaxRecordCount = "sourceJSON" in layer && layer.sourceJSON.maxRecordCount === result.count;
126
- // count only contains features with a value (!= null)
127
- if (isDefined(result.nullcount) && !hitMaxRecordCount) {
128
- // we can add the feature count without null and the count of nulls
129
- const stats /*StatisticsResult*/ = { ...result, totalCount: result.count + result.nullcount };
130
- return stats;
162
+ if (!fieldInfo ||
163
+ fieldInfo.layerField.type === "oid" ||
164
+ fieldInfo.layerField.type === "guid" ||
165
+ fieldInfo.layerField.type === "global-id") {
166
+ const count = await getFeatureCount(props);
167
+ return Promise.resolve({ totalCount: count, nullcount: 0 } /*StatisticsResult*/);
131
168
  }
132
- else {
133
- // we want the total feature count
134
- // happens e.g. for SceneLayers with older stats cache
135
- const count = await getFeatureCount(props);
136
- const stats = { ...result, totalCount: count };
137
- return stats;
169
+ try {
170
+ const result = await modules.summaryStatistics({
171
+ layer,
172
+ view,
173
+ field: fieldName
174
+ });
175
+ if (!isDefined(result.count)) {
176
+ // statistics is unusable
177
+ throw new Error("could not get statistics");
178
+ }
179
+ // if we hit maxRecordCount other stats values are probably not correct either
180
+ const hitMaxRecordCount = "sourceJSON" in layer && layer.sourceJSON.maxRecordCount === result.count;
181
+ // count only contains features with a value (!= null)
182
+ if (isDefined(result.nullcount) && !hitMaxRecordCount) {
183
+ // we can add the feature count without null and the count of nulls
184
+ const stats /*StatisticsResult*/ = { ...result, totalCount: result.count + result.nullcount };
185
+ return stats;
186
+ }
187
+ else {
188
+ // we want the total feature count
189
+ // happens e.g. for SceneLayers with older stats cache
190
+ const count = await getFeatureCount(props);
191
+ const stats = { ...result, totalCount: count };
192
+ return stats;
193
+ }
194
+ }
195
+ catch (error) {
196
+ throw new Error("could not get statistics");
138
197
  }
139
- }
140
- catch (error) {
141
- throw new Error("could not get statistics");
142
- }
143
198
  }
144
199
  /**
145
200
  * Returns unique values
146
201
  * @param props - properties containing layer and fieldName
147
202
  */
148
203
  async function getUniqueValues(props) {
149
- const { layer, view, fieldName, modules } = props;
150
- if (layer.type === "imagery" || layer.type === "imagery-tile") {
151
- throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer");
152
- }
153
- if (layer.type === "feature" && !layer.url) {
154
- layer.outFields = ["*"];
155
- }
156
- try {
157
- const result = await modules.uniqueValues({
158
- layer,
159
- view,
160
- field: fieldName
161
- });
162
- return result;
163
- }
164
- catch (error) {
165
- throw new Error("could not get unique values");
166
- }
204
+ const { layer, view, fieldName, modules } = props;
205
+ if (layer.type === "imagery" || layer.type === "imagery-tile") {
206
+ throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer");
207
+ }
208
+ if (layer.type === "feature" && !layer.url) {
209
+ layer.outFields = ["*"];
210
+ }
211
+ try {
212
+ const result = await modules.uniqueValues({
213
+ layer,
214
+ view,
215
+ field: fieldName
216
+ });
217
+ return result;
218
+ }
219
+ catch (error) {
220
+ throw new Error("could not get unique values");
221
+ }
167
222
  }
168
223
  function _getSimpleFieldType(featureFilterField) {
169
- switch (featureFilterField.layerField.type) {
170
- case "string":
171
- featureFilterField.simpleFieldType = SimpleFieldTypes.STRING;
172
- break;
173
- case "date":
174
- featureFilterField.simpleFieldType = SimpleFieldTypes.DATE;
175
- break;
176
- case "timestamp-offset":
177
- featureFilterField.simpleFieldType = SimpleFieldTypes.TIMESTAMP_OFFSET;
178
- break;
179
- case "date-only":
180
- featureFilterField.simpleFieldType = SimpleFieldTypes.DATE_ONLY;
181
- break;
182
- case "time-only":
183
- featureFilterField.simpleFieldType = SimpleFieldTypes.TIME_ONLY;
184
- break;
185
- case "oid":
186
- featureFilterField.simpleFieldType = SimpleFieldTypes.OID;
187
- break;
188
- case "guid":
189
- case "global-id":
190
- featureFilterField.simpleFieldType = SimpleFieldTypes.GUID;
191
- break;
192
- case "small-integer":
193
- case "big-integer":
194
- case "integer":
195
- case "single":
196
- case "double":
197
- case "long":
198
- featureFilterField.simpleFieldType = SimpleFieldTypes.NUMBER;
199
- break;
200
- }
224
+ switch (featureFilterField.layerField.type) {
225
+ case "string":
226
+ featureFilterField.simpleFieldType = SimpleFieldTypes.STRING;
227
+ break;
228
+ case "date":
229
+ featureFilterField.simpleFieldType = SimpleFieldTypes.DATE;
230
+ break;
231
+ case "timestamp-offset":
232
+ featureFilterField.simpleFieldType = SimpleFieldTypes.TIMESTAMP_OFFSET;
233
+ break;
234
+ case "date-only":
235
+ featureFilterField.simpleFieldType = SimpleFieldTypes.DATE_ONLY;
236
+ break;
237
+ case "time-only":
238
+ featureFilterField.simpleFieldType = SimpleFieldTypes.TIME_ONLY;
239
+ break;
240
+ case "oid":
241
+ featureFilterField.simpleFieldType = SimpleFieldTypes.OID;
242
+ break;
243
+ case "guid":
244
+ case "global-id":
245
+ featureFilterField.simpleFieldType = SimpleFieldTypes.GUID;
246
+ break;
247
+ case "small-integer":
248
+ case "big-integer":
249
+ case "integer":
250
+ case "single":
251
+ case "double":
252
+ case "long":
253
+ featureFilterField.simpleFieldType = SimpleFieldTypes.NUMBER;
254
+ break;
255
+ }
201
256
  }
202
257
  function getCodedValues(fieldName, props) {
203
- const { layer, modules } = props;
204
- if (layer.type !== "feature") {
205
- return;
206
- }
207
- const typeIdField = layer.typeIdField;
208
- const types = layer.types;
209
- let fieldDomains = undefined;
210
- const field = layer.fields.find((field) => field.name === fieldName);
211
- const fieldDomain = field.domain;
212
- if (typeIdField && types) {
213
- // layer has types
214
- if (typeIdField === fieldName) {
215
- // this is the field with the types
216
- fieldDomains = types.map((type) => {
217
- // fake coded Values
218
- return {
219
- code: type.id,
220
- name: type.name
221
- };
222
- });
258
+ const { layer, modules } = props;
259
+ if (layer.type !== "feature") {
260
+ return;
223
261
  }
224
- else {
225
- // field does not have types; look farther inside the types
226
- fieldDomains = [];
227
- types.forEach((type) => {
228
- if (!type.domains || !type.domains[fieldName] || type.domains[fieldName].type === "inherited") {
229
- const domain = fieldDomain;
230
- if (domain?.codedValues) {
231
- domain.codedValues.forEach(async (codedValue) => {
232
- let found = false;
233
- fieldDomains.forEach((codedVal) => {
234
- if (codedVal.code === codedValue.code) {
235
- found = true;
236
- if (`, ${codedVal.name},`.indexOf(`, ${codedValue.name},`) === -1) {
237
- codedVal.name += `, ${codedValue.name}`;
238
- }
239
- }
240
- });
241
- if (!found) {
242
- fieldDomains.push(modules.esriLang.clone(codedValue));
243
- }
262
+ const typeIdField = layer.typeIdField;
263
+ const types = layer.types;
264
+ let fieldDomains = undefined;
265
+ const field = layer.fields.find((field) => field.name === fieldName);
266
+ const fieldDomain = field.domain;
267
+ if (typeIdField && types) {
268
+ // layer has types
269
+ if (typeIdField === fieldName) {
270
+ // this is the field with the types
271
+ fieldDomains = types.map((type) => {
272
+ // fake coded Values
273
+ return {
274
+ code: type.id,
275
+ name: type.name
276
+ };
244
277
  });
245
- }
246
278
  }
247
- else if (type.domains?.[fieldName]?.codedValues) {
248
- type.domains[fieldName].codedValues.forEach(async (codedValue) => {
249
- let found = false;
250
- fieldDomains.forEach((codedVal) => {
251
- if (codedVal.code === codedValue.code) {
252
- found = true;
253
- if (`, ${codedVal.name},`.indexOf(`, ${codedValue.name},`) === -1) {
254
- codedVal.name += `, ${codedValue.name}`;
279
+ else {
280
+ // field does not have types; look farther inside the types
281
+ fieldDomains = [];
282
+ types.forEach((type) => {
283
+ if (!type.domains || !type.domains[fieldName] || type.domains[fieldName].type === "inherited") {
284
+ const domain = fieldDomain;
285
+ if (domain?.codedValues) {
286
+ domain.codedValues.forEach(async (codedValue) => {
287
+ let found = false;
288
+ fieldDomains.forEach((codedVal) => {
289
+ if (codedVal.code === codedValue.code) {
290
+ found = true;
291
+ if (`, ${codedVal.name},`.indexOf(`, ${codedValue.name},`) === -1) {
292
+ codedVal.name += `, ${codedValue.name}`;
293
+ }
294
+ }
295
+ });
296
+ if (!found) {
297
+ fieldDomains.push(modules.esriLang.clone(codedValue));
298
+ }
299
+ });
300
+ }
301
+ }
302
+ else if (type.domains?.[fieldName]?.codedValues) {
303
+ type.domains[fieldName].codedValues.forEach(async (codedValue) => {
304
+ let found = false;
305
+ fieldDomains.forEach((codedVal) => {
306
+ if (codedVal.code === codedValue.code) {
307
+ found = true;
308
+ if (`, ${codedVal.name},`.indexOf(`, ${codedValue.name},`) === -1) {
309
+ codedVal.name += `, ${codedValue.name}`;
310
+ }
311
+ }
312
+ });
313
+ if (!found) {
314
+ fieldDomains.push(modules.esriLang.clone(codedValue));
315
+ }
316
+ });
255
317
  }
256
- }
257
318
  });
258
- if (!found) {
259
- fieldDomains.push(modules.esriLang.clone(codedValue));
260
- }
261
- });
262
319
  }
263
- });
320
+ if (!fieldDomains?.length && fieldDomain?.codedValues) {
321
+ fieldDomains = modules.esriLang.clone(fieldDomain.codedValues);
322
+ }
264
323
  }
265
- if (!fieldDomains?.length && fieldDomain?.codedValues) {
266
- fieldDomains = modules.esriLang.clone(fieldDomain.codedValues);
324
+ else if (fieldDomain?.codedValues) {
325
+ // domains directly on the layer field
326
+ fieldDomains = field.domain.codedValues;
267
327
  }
268
- }
269
- else if (fieldDomain?.codedValues) {
270
- // domains directly on the layer field
271
- fieldDomains = field.domain.codedValues;
272
- }
273
- return fieldDomains?.length ? fieldDomains : null;
328
+ return fieldDomains?.length ? fieldDomains : null;
274
329
  }
275
330
 
276
331
  /**
@@ -278,66 +333,66 @@ function getCodedValues(fieldName, props) {
278
333
  * @param props - properties containing layer and view
279
334
  */
280
335
  async function getOneFeature(props) {
281
- const { view, layer } = props;
282
- if (layer.type === "imagery" || layer.type === "imagery-tile") {
283
- throw new Error("could not get feature");
284
- }
285
- if ((layer.type === "feature" && !layer.url) || layer.type === "wfs") {
286
- // feature collection or wfs
287
- const query = layer.createQuery();
288
- query.start = 0;
289
- query.num = 5;
290
- query.outFields = ["*"];
291
- const result = await layer.queryFeatures(query);
292
- if (result.features?.length) {
293
- return result;
294
- }
295
- else {
296
- throw new Error("could not get feature");
336
+ const { view, layer } = props;
337
+ if (layer.type === "imagery" || layer.type === "imagery-tile") {
338
+ throw new Error("could not get feature");
297
339
  }
298
- }
299
- else {
300
- // service
301
- if (!view) {
302
- // get feature from service directly
303
- return _queryOneFeature(props);
304
- }
305
- const layerView = (await view.whenLayerView(layer));
306
- const hasAllFields = layerView.availableFields.length === layer.fields.length;
307
- if (hasAllFields || (["stream", "ogc-feature"].indexOf(layer.type) > -1 && layerView.availableFields.length > 0)) {
308
- // features on client have all fields
309
- // or we can't make a server query, so we take what we can get
310
- const query = layer.createQuery();
311
- query.start = 0;
312
- query.num = 5;
313
- query.outFields = ["*"];
314
- const result = await layerView.queryFeatures(query);
315
- if (result.features?.length) {
316
- // client side features
317
- return result;
318
- }
319
- else {
320
- // get feature from service
321
- return _queryOneFeature(props);
322
- }
340
+ if ((layer.type === "feature" && !layer.url) || layer.type === "wfs") {
341
+ // feature collection or wfs
342
+ const query = layer.createQuery();
343
+ query.start = 0;
344
+ query.num = 5;
345
+ query.outFields = ["*"];
346
+ const result = await layer.queryFeatures(query);
347
+ if (result.features?.length) {
348
+ return result;
349
+ }
350
+ else {
351
+ throw new Error("could not get feature");
352
+ }
323
353
  }
324
354
  else {
325
- // get feature from service
326
- return _queryOneFeature(props);
355
+ // service
356
+ if (!view) {
357
+ // get feature from service directly
358
+ return _queryOneFeature(props);
359
+ }
360
+ const layerView = (await view.whenLayerView(layer));
361
+ const hasAllFields = layerView.availableFields.length === layer.fields.length;
362
+ if (hasAllFields || (["stream", "ogc-feature"].indexOf(layer.type) > -1 && layerView.availableFields.length > 0)) {
363
+ // features on client have all fields
364
+ // or we can't make a server query, so we take what we can get
365
+ const query = layer.createQuery();
366
+ query.start = 0;
367
+ query.num = 5;
368
+ query.outFields = ["*"];
369
+ const result = await layerView.queryFeatures(query);
370
+ if (result.features?.length) {
371
+ // client side features
372
+ return result;
373
+ }
374
+ else {
375
+ // get feature from service
376
+ return _queryOneFeature(props);
377
+ }
378
+ }
379
+ else {
380
+ // get feature from service
381
+ return _queryOneFeature(props);
382
+ }
327
383
  }
328
- }
329
384
  }
330
385
  async function _queryOneFeature(props) {
331
- const { layer, modules } = props;
332
- if (["imagery", "imagery-tile", "stream", "ogc-feature"].indexOf(layer.type) > -1) {
333
- throw new Error("cannot get feature from service");
334
- }
335
- const query = new modules.Query({
336
- where: "1=1",
337
- outFields: ["*"],
338
- returnGeometry: false
339
- });
340
- return layer.queryFeatures(query);
386
+ const { layer, modules } = props;
387
+ if (["imagery", "imagery-tile", "stream", "ogc-feature"].indexOf(layer.type) > -1) {
388
+ throw new Error("cannot get feature from service");
389
+ }
390
+ const query = new modules.Query({
391
+ where: "1=1",
392
+ outFields: ["*"],
393
+ returnGeometry: false
394
+ });
395
+ return layer.queryFeatures(query);
341
396
  }
342
397
  /**
343
398
  * Returns feature count of layer
@@ -345,704 +400,704 @@ async function _queryOneFeature(props) {
345
400
  * @param mapView - View
346
401
  */
347
402
  async function getFeatureCountCommon(layer, view) {
348
- if (layer.type === "feature" && !layer.url) {
349
- return getFeatureCountForCollection(layer);
350
- }
351
- else if (layer.type === "feature" ||
352
- layer.type === "csv" ||
353
- layer.type === "scene" ||
354
- layer.type === "wfs" ||
355
- layer.type === "geojson") {
356
- return await layer.queryFeatureCount();
357
- }
358
- else if (view && (layer.type === "stream" || layer.type === "ogc-feature")) {
359
- return getFeatureCountFromView(layer, view);
360
- }
361
- return undefined;
403
+ if (layer.type === "feature" && !layer.url) {
404
+ return getFeatureCountForCollection(layer);
405
+ }
406
+ else if (layer.type === "feature" ||
407
+ layer.type === "csv" ||
408
+ layer.type === "scene" ||
409
+ layer.type === "wfs" ||
410
+ layer.type === "geojson") {
411
+ return await layer.queryFeatureCount();
412
+ }
413
+ else if (view && (layer.type === "stream" || layer.type === "ogc-feature")) {
414
+ return getFeatureCountFromView(layer, view);
415
+ }
416
+ return undefined;
362
417
  }
363
418
  /**
364
419
  * Returns feature count of feature collection layer
365
420
  * @param layer - FeatureLayer
366
421
  */
367
422
  async function getFeatureCountForCollection(layer) {
368
- const query = layer.createQuery();
369
- query.outFields = ["*"];
370
- const result = await layer.queryFeatures(query);
371
- if (result.features?.length) {
372
- return result.features.length;
373
- }
374
- else {
375
- throw new Error("could not get feature count");
376
- }
423
+ const query = layer.createQuery();
424
+ query.outFields = ["*"];
425
+ const result = await layer.queryFeatures(query);
426
+ if (result.features?.length) {
427
+ return result.features.length;
428
+ }
429
+ else {
430
+ throw new Error("could not get feature count");
431
+ }
377
432
  }
378
433
  /**
379
434
  * Returns feature count of feature collection layer
380
435
  * @param layer - StreamLayer | OGCFeatureLayer
381
436
  */
382
437
  async function getFeatureCountFromView(layer, view) {
383
- // we can only get the features from the map
384
- const layerView = (await view.whenLayerView(layer));
385
- return layerView.queryFeatureCount();
438
+ // we can only get the features from the map
439
+ const layerView = (await view.whenLayerView(layer));
440
+ return layerView.queryFeatureCount();
386
441
  }
387
442
 
388
443
  const fieldInfoScss = ":host{height:100%}.container{padding:6px;background-color:white}.title{font-weight:bold;padding:5px 0}.missing{color:#a9a9a9}.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:6px 0}.statistics-row{border-top:1px solid #e0e0e0;padding:6px 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:1px solid #e0e0e0;padding:20px 0 6px 0;display:flex;justify-content:space-between}";
389
444
 
390
445
  const ArcgisFieldInfo = /*@__PURE__*/ proxyCustomElement(class ArcgisFieldInfo extends HTMLElement {
391
- constructor() {
392
- super();
393
- this.__registerHost();
394
- this.__attachShadow();
395
- this.arcgisFieldInfoComplete = createEvent(this, "arcgisFieldInfoComplete", 7);
396
- this.view = undefined;
397
- this.layer = undefined;
398
- this.fieldName = undefined;
399
- this.hideStatistics = false;
400
- this.oneFeatureResponse = undefined;
401
- this.oneFeatureResponseStatus = Status.MISSING;
402
- this.statistics = undefined;
403
- this.statisticsStatus = Status.MISSING;
404
- this.uniqueValues = undefined;
405
- this.uniqueValuesStatus = Status.MISSING;
406
- this._lang = "";
407
- this._t9nLocale = "";
408
- this._t9nStrings = undefined;
409
- }
410
- //--------------------------------------------------------------------------
411
- //
412
- // Lifecycle
413
- //
414
- //--------------------------------------------------------------------------
415
- async componentWillLoad() {
416
- await F(this, getAssetPath("./assets"));
417
- const esriLang = await importCoreLang();
418
- const esriConfig = await importConfig();
419
- const intl = await importIntl();
420
- const Query = await importRestSupportQuery();
421
- const summaryStatistics = await importSmartMappingStatisticsSummaryStatistics();
422
- const uniqueValues = await importSmartMappingStatisticsUniqueValues();
423
- const { view, layer, fieldName, hideStatistics } = this;
424
- let sublayerFL;
425
- if (layer.declaredClass === "esri.layers.support.Sublayer") {
426
- // need to create a FeatureLayer
427
- const sublayer = layer;
428
- const { whenOnce } = await importCoreReactiveUtils();
429
- view && (await whenOnce(() => !view.updating));
430
- sublayerFL = await sublayer.createFeatureLayer();
431
- await sublayerFL.load();
446
+ constructor() {
447
+ super();
448
+ this.__registerHost();
449
+ this.__attachShadow();
450
+ this.arcgisFieldInfoComplete = createEvent(this, "arcgisFieldInfoComplete", 7);
451
+ this.view = undefined;
452
+ this.layer = undefined;
453
+ this.fieldName = undefined;
454
+ this.hideStatistics = false;
455
+ this.oneFeatureResponse = undefined;
456
+ this.oneFeatureResponseStatus = Status.MISSING;
457
+ this.statistics = undefined;
458
+ this.statisticsStatus = Status.MISSING;
459
+ this.uniqueValues = undefined;
460
+ this.uniqueValuesStatus = Status.MISSING;
461
+ this._lang = "";
462
+ this._t9nLocale = "";
463
+ this._t9nStrings = undefined;
432
464
  }
433
- this.props = {
434
- view,
435
- layer: sublayerFL || layer,
436
- fieldName,
437
- hideStatistics,
438
- modules: { esriLang, esriConfig, intl, Query, summaryStatistics, uniqueValues }
439
- };
440
- // required for initial load
441
- this.props.fieldInfo = getFieldInfo(this.props);
442
- // we don't know if the SceneLayer has an associated FL
443
- // don't prompt for a login if it's not accessible
444
- if (layer.type === "scene") {
445
- esriConfig.request.interceptors?.push({
446
- urls: getQueryURL(layer) + "/" + layer.layerId,
447
- before: function (params) {
448
- params.requestOptions.authMode = "no-prompt";
465
+ //--------------------------------------------------------------------------
466
+ //
467
+ // Lifecycle
468
+ //
469
+ //--------------------------------------------------------------------------
470
+ async componentWillLoad() {
471
+ await F(this, getAssetPath("./assets"));
472
+ const esriLang = await importCoreLang();
473
+ const esriConfig = await importConfig();
474
+ const intl = await importIntl();
475
+ const Query = await importRestSupportQuery();
476
+ const summaryStatistics = await importSmartMappingStatisticsSummaryStatistics();
477
+ const uniqueValues = await importSmartMappingStatisticsUniqueValues();
478
+ const { view, layer, fieldName, hideStatistics } = this;
479
+ let sublayerFL;
480
+ if (layer.declaredClass === "esri.layers.support.Sublayer") {
481
+ // need to create a FeatureLayer
482
+ const sublayer = layer;
483
+ const { whenOnce } = await importCoreReactiveUtils();
484
+ view && (await whenOnce(() => !view.updating));
485
+ sublayerFL = await sublayer.createFeatureLayer();
486
+ await sublayerFL.load();
449
487
  }
450
- });
451
- }
452
- this.oneFeatureResponseStatus = Status.IN_PROGRESS;
453
- try {
454
- const result = await getOneFeature(this.props);
455
- this.oneFeatureResponse = result;
456
- this.oneFeatureResponseStatus = Status.SUCCESS;
457
- }
458
- catch (error) {
459
- this.oneFeatureResponseStatus = Status.FAILED;
460
- }
461
- if (layer.type === "stream") {
462
- this.uniqueValuesStatus = Status.FAILED;
463
- this.statisticsStatus = Status.FAILED;
464
- return;
465
- }
466
- if (hideStatistics) {
467
- this.uniqueValuesStatus = Status.FAILED;
468
- }
469
- else {
470
- this.uniqueValuesStatus = Status.IN_PROGRESS;
471
- try {
472
- const uniqueValues = await getUniqueValues(this.props);
473
- this.uniqueValues = uniqueValues;
474
- if (uniqueValues?.uniqueValueInfos?.length) {
475
- this.uniqueValuesStatus = Status.SUCCESS;
488
+ this.props = {
489
+ view,
490
+ layer: sublayerFL || layer,
491
+ fieldName,
492
+ hideStatistics,
493
+ modules: { esriLang, esriConfig, intl, Query, summaryStatistics, uniqueValues }
494
+ };
495
+ // required for initial load
496
+ this.props.fieldInfo = getFieldInfo(this.props);
497
+ // we don't know if the SceneLayer has an associated FL
498
+ // don't prompt for a login if it's not accessible
499
+ if (layer.type === "scene") {
500
+ esriConfig.request.interceptors?.push({
501
+ urls: getQueryURL(layer) + "/" + layer.layerId,
502
+ before: function (params) {
503
+ params.requestOptions.authMode = "no-prompt";
504
+ }
505
+ });
506
+ }
507
+ this.oneFeatureResponseStatus = Status.IN_PROGRESS;
508
+ try {
509
+ const result = await getOneFeature(this.props);
510
+ this.oneFeatureResponse = result;
511
+ this.oneFeatureResponseStatus = Status.SUCCESS;
512
+ }
513
+ catch (error) {
514
+ this.oneFeatureResponseStatus = Status.FAILED;
515
+ }
516
+ if (layer.type === "stream") {
517
+ this.uniqueValuesStatus = Status.FAILED;
518
+ this.statisticsStatus = Status.FAILED;
519
+ return;
520
+ }
521
+ if (hideStatistics) {
522
+ this.uniqueValuesStatus = Status.FAILED;
476
523
  }
477
524
  else {
478
- this.uniqueValuesStatus = Status.FAILED;
525
+ this.uniqueValuesStatus = Status.IN_PROGRESS;
526
+ try {
527
+ const uniqueValues = await getUniqueValues(this.props);
528
+ this.uniqueValues = uniqueValues;
529
+ if (uniqueValues?.uniqueValueInfos?.length) {
530
+ this.uniqueValuesStatus = Status.SUCCESS;
531
+ }
532
+ else {
533
+ this.uniqueValuesStatus = Status.FAILED;
534
+ }
535
+ }
536
+ catch (error) {
537
+ this.uniqueValuesStatus = Status.FAILED;
538
+ }
479
539
  }
480
- }
481
- catch (error) {
482
- this.uniqueValuesStatus = Status.FAILED;
483
- }
484
- }
485
- if (hideStatistics) {
486
- this.statisticsStatus = Status.FAILED;
487
- }
488
- else {
489
- this.statisticsStatus = Status.IN_PROGRESS;
490
- try {
491
- const statistics = await getStatistics(this.props);
492
- if (!isDefined(statistics.totalCount) &&
493
- isDefined(statistics.count) &&
494
- this.uniqueValuesStatus === Status.SUCCESS) {
495
- // take null values count from unique values and add with non-null count from statistics
496
- const infos = this.uniqueValues.uniqueValueInfos;
497
- for (let i = 0; i < infos.length; i++) {
498
- const info = infos[i];
499
- if (info.value === null) {
500
- statistics.totalCount = info.count + statistics.count;
501
- break;
540
+ if (hideStatistics) {
541
+ this.statisticsStatus = Status.FAILED;
542
+ }
543
+ else {
544
+ this.statisticsStatus = Status.IN_PROGRESS;
545
+ try {
546
+ const statistics = await getStatistics(this.props);
547
+ if (!isDefined(statistics.totalCount) &&
548
+ isDefined(statistics.count) &&
549
+ this.uniqueValuesStatus === Status.SUCCESS) {
550
+ // take null values count from unique values and add with non-null count from statistics
551
+ const infos = this.uniqueValues.uniqueValueInfos;
552
+ for (let i = 0; i < infos.length; i++) {
553
+ const info = infos[i];
554
+ if (info.value === null) {
555
+ statistics.totalCount = info.count + statistics.count;
556
+ break;
557
+ }
558
+ }
559
+ if (!isDefined(statistics.totalCount)) {
560
+ // no null values
561
+ statistics.totalCount = statistics.count;
562
+ }
563
+ }
564
+ this.statistics = statistics;
565
+ this.statisticsStatus = Status.SUCCESS;
566
+ }
567
+ catch (error) {
568
+ this.statisticsStatus = Status.FAILED;
502
569
  }
503
- }
504
- if (!isDefined(statistics.totalCount)) {
505
- // no null values
506
- statistics.totalCount = statistics.count;
507
- }
508
570
  }
509
- this.statistics = statistics;
510
- this.statisticsStatus = Status.SUCCESS;
511
- }
512
- catch (error) {
513
- this.statisticsStatus = Status.FAILED;
514
- }
515
571
  }
516
- }
517
- async componentDidLoad() {
518
- // once component is visible make other calls
519
- const { props } = this;
520
- const { modules } = props;
521
- modules.intl.setLocale(this._lang);
522
- // modules.intl.setLocale(this.locale) not returning the correct formatting for e.g. it-ch
523
- }
524
- disconnectedCallback() {
525
- U(this);
526
- }
527
- // --------------------------------------------------------------------------
528
- //
529
- // Render Methods
530
- //
531
- //--------------------------------------------------------------------------
532
- render() {
533
- const { props } = this;
534
- const { fieldInfo } = props;
535
- if (!fieldInfo) {
536
- return h$1(Fragment, null);
572
+ async componentDidLoad() {
573
+ // once component is visible make other calls
574
+ const { props } = this;
575
+ const { modules } = props;
576
+ modules.intl.setLocale(this._lang);
577
+ // modules.intl.setLocale(this.locale) not returning the correct formatting for e.g. it-ch
537
578
  }
538
- return (h$1(Host, null, h$1("div", { class: "container" }, this.renderFieldType(), this.renderFieldAlias(), this.renderFieldDescription(), this.renderFieldValueType(), this.renderFieldSampleValue(), this.renderFieldFormat(), this.renderFieldStatistics())));
539
- }
540
- renderFieldType() {
541
- const { _t9nStrings, props } = this;
542
- const { fieldInfo } = props;
543
- const fieldType = this._getFieldTypeLabel(fieldInfo.layerField.type);
544
- return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldType), h$1("div", null, fieldType)));
545
- }
546
- renderFieldAlias() {
547
- const { _t9nStrings, props } = this;
548
- const { fieldInfo } = props;
549
- return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldAlias), h$1("div", null, fieldInfo.label)));
550
- }
551
- renderFieldDescription() {
552
- const { _t9nStrings, props } = this;
553
- const { layer } = props;
554
- if (layer.type !== "feature") {
555
- return h$1(Fragment, null);
579
+ disconnectedCallback() {
580
+ U(this);
556
581
  }
557
- const { fieldInfo } = props;
558
- const description = fieldInfo.layerField.description;
559
- return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldDescription), h$1("div", { class: {
560
- missing: !description
561
- } }, description || _t9nStrings.fieldDescriptionNotSet)));
562
- }
563
- renderFieldValueType() {
564
- const { _t9nStrings, props } = this;
565
- const { layer } = props;
566
- if (layer.type !== "feature") {
567
- return h$1(Fragment, null);
582
+ // --------------------------------------------------------------------------
583
+ //
584
+ // Render Methods
585
+ //
586
+ //--------------------------------------------------------------------------
587
+ render() {
588
+ const { props } = this;
589
+ const { fieldInfo } = props;
590
+ if (!fieldInfo) {
591
+ return h$1(Fragment, null);
592
+ }
593
+ return (h$1(Host, null, h$1("div", { class: "container" }, this.renderFieldType(), this.renderFieldAlias(), this.renderFieldDescription(), this.renderFieldValueType(), this.renderFieldSampleValue(), this.renderFieldFormat(), this.renderFieldStatistics())));
568
594
  }
569
- const { fieldInfo } = props;
570
- const fieldValueType = this._getFieldValueTypeCamelCase(fieldInfo);
571
- return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldValueType), h$1("div", { class: !fieldValueType ? "missing" : "" }, fieldValueType
572
- ? _t9nStrings.fieldValueTypes[fieldValueType]
573
- : _t9nStrings.fieldValueTypeNotSet)));
574
- }
575
- renderFieldSampleValue() {
576
- const { oneFeatureResponse, oneFeatureResponseStatus, statisticsStatus, statistics, uniqueValuesStatus, uniqueValues, _t9nStrings, props } = this;
577
- const { layer, fieldName, fieldInfo } = props;
578
- const { statistics: statStrings } = _t9nStrings;
579
- let value;
580
- if (["imagery", "imagery-tile"].indexOf(layer.type) > -1) {
581
- return h$1(Fragment, null);
595
+ renderFieldType() {
596
+ const { _t9nStrings, props } = this;
597
+ const { fieldInfo } = props;
598
+ const fieldType = this._getFieldTypeLabel(fieldInfo.layerField.type);
599
+ return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldType), h$1("div", null, fieldType)));
582
600
  }
583
- if (layer.type !== "stream" &&
584
- [SimpleFieldTypes.STRING, SimpleFieldTypes.OID, SimpleFieldTypes.GUID].indexOf(this._getStatisticsType(fieldInfo)) > -1 &&
585
- uniqueValuesStatus !== Status.FAILED) {
586
- // we show top values
587
- return h$1(Fragment, null);
601
+ renderFieldAlias() {
602
+ const { _t9nStrings, props } = this;
603
+ const { fieldInfo } = props;
604
+ return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldAlias), h$1("div", null, fieldInfo.label)));
588
605
  }
589
- if (oneFeatureResponseStatus === Status.SUCCESS) {
590
- // find first valid value entry
591
- oneFeatureResponse.features.forEach((feature) => {
592
- if (value === undefined || (value === null && feature.attributes[fieldName] !== null)) {
593
- value = feature.attributes[fieldName];
606
+ renderFieldDescription() {
607
+ const { _t9nStrings, props } = this;
608
+ const { layer } = props;
609
+ if (layer.type !== "feature") {
610
+ return h$1(Fragment, null);
594
611
  }
595
- });
596
- }
597
- else if (statisticsStatus === Status.SUCCESS) {
598
- // use statistics min value
599
- value = statistics.min;
612
+ const { fieldInfo } = props;
613
+ const description = fieldInfo.layerField.description;
614
+ return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldDescription), h$1("div", { class: {
615
+ missing: !description
616
+ } }, description || _t9nStrings.fieldDescriptionNotSet)));
600
617
  }
601
- else if (uniqueValuesStatus === Status.SUCCESS) {
602
- // use a non-null value
603
- value = uniqueValues.uniqueValueInfos?.[0]?.value || uniqueValues.uniqueValueInfos?.[1]?.value;
604
- }
605
- const codedValues = fieldInfo.codedValues;
606
- if (isDefined(value)) {
607
- if (codedValues) {
608
- value = codedValues.find((codedValue) => value === codedValue.code)?.name || value;
609
- }
610
- else {
611
- value = this._getDisplayString(value);
612
- }
618
+ renderFieldValueType() {
619
+ const { _t9nStrings, props } = this;
620
+ const { layer } = props;
621
+ if (layer.type !== "feature") {
622
+ return h$1(Fragment, null);
623
+ }
624
+ const { fieldInfo } = props;
625
+ const fieldValueType = this._getFieldValueTypeCamelCase(fieldInfo);
626
+ return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldValueType), h$1("div", { class: !fieldValueType ? "missing" : "" }, fieldValueType
627
+ ? _t9nStrings.fieldValueTypes[fieldValueType]
628
+ : _t9nStrings.fieldValueTypeNotSet)));
613
629
  }
614
- return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldSampleValue), h$1("div", { class: (oneFeatureResponseStatus === Status.FAILED &&
615
- statisticsStatus === Status.FAILED &&
616
- uniqueValuesStatus === Status.FAILED) ||
617
- !isDefined(value)
618
- ? "missing"
619
- : "" }, oneFeatureResponseStatus === Status.SUCCESS ||
620
- statisticsStatus === Status.SUCCESS ||
621
- uniqueValuesStatus === Status.SUCCESS
622
- ? !isDefined(value)
623
- ? statStrings.allNulls
624
- : `${value}`
625
- : oneFeatureResponseStatus === Status.FAILED &&
626
- statisticsStatus === Status.FAILED &&
627
- uniqueValuesStatus === Status.FAILED
628
- ? _t9nStrings.fieldSampleNotAvailable
629
- : _t9nStrings.fieldSampleRetrieving)));
630
- }
631
- renderFieldFormat() {
632
- const { _t9nStrings, props } = this;
633
- const { fieldName, fieldInfo, layer } = props;
634
- if (["single", "double", "long"].indexOf(fieldInfo.layerField.type) === -1) {
635
- return h$1(Fragment, null);
630
+ renderFieldSampleValue() {
631
+ const { oneFeatureResponse, oneFeatureResponseStatus, statisticsStatus, statistics, uniqueValuesStatus, uniqueValues, _t9nStrings, props } = this;
632
+ const { layer, fieldName, fieldInfo } = props;
633
+ const { statistics: statStrings } = _t9nStrings;
634
+ let value;
635
+ if (["imagery", "imagery-tile"].indexOf(layer.type) > -1) {
636
+ return h$1(Fragment, null);
637
+ }
638
+ if (layer.type !== "stream" &&
639
+ [SimpleFieldTypes.STRING, SimpleFieldTypes.OID, SimpleFieldTypes.GUID].indexOf(this._getStatisticsType(fieldInfo)) > -1 &&
640
+ uniqueValuesStatus !== Status.FAILED) {
641
+ // we show top values
642
+ return h$1(Fragment, null);
643
+ }
644
+ if (oneFeatureResponseStatus === Status.SUCCESS) {
645
+ // find first valid value entry
646
+ oneFeatureResponse.features.forEach((feature) => {
647
+ if (value === undefined || (value === null && feature.attributes[fieldName] !== null)) {
648
+ value = feature.attributes[fieldName];
649
+ }
650
+ });
651
+ }
652
+ else if (statisticsStatus === Status.SUCCESS) {
653
+ // use statistics min value
654
+ value = statistics.min;
655
+ }
656
+ else if (uniqueValuesStatus === Status.SUCCESS) {
657
+ // use a non-null value
658
+ value = uniqueValues.uniqueValueInfos?.[0]?.value || uniqueValues.uniqueValueInfos?.[1]?.value;
659
+ }
660
+ const codedValues = fieldInfo.codedValues;
661
+ if (isDefined(value)) {
662
+ if (codedValues) {
663
+ value = codedValues.find((codedValue) => value === codedValue.code)?.name || value;
664
+ }
665
+ else {
666
+ value = this._getDisplayString(value);
667
+ }
668
+ }
669
+ return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldSampleValue), h$1("div", { class: (oneFeatureResponseStatus === Status.FAILED &&
670
+ statisticsStatus === Status.FAILED &&
671
+ uniqueValuesStatus === Status.FAILED) ||
672
+ !isDefined(value)
673
+ ? "missing"
674
+ : "" }, oneFeatureResponseStatus === Status.SUCCESS ||
675
+ statisticsStatus === Status.SUCCESS ||
676
+ uniqueValuesStatus === Status.SUCCESS
677
+ ? !isDefined(value)
678
+ ? statStrings.allNulls
679
+ : `${value}`
680
+ : oneFeatureResponseStatus === Status.FAILED &&
681
+ statisticsStatus === Status.FAILED &&
682
+ uniqueValuesStatus === Status.FAILED
683
+ ? _t9nStrings.fieldSampleNotAvailable
684
+ : _t9nStrings.fieldSampleRetrieving)));
636
685
  }
637
- const popupTemplate = layer.popupTemplate;
638
- if (popupTemplate?.fieldInfos) {
639
- const popFieldInfos = popupTemplate.fieldInfos?.filter((fieldInfo) => fieldInfo.fieldName === fieldName);
640
- if (popFieldInfos?.length) {
641
- const popFieldInfo = popFieldInfos[0];
642
- if (isDefined(popFieldInfo?.format?.places)) {
643
- const num = popFieldInfo.format.places;
644
- return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldDecimalPlaces), h$1("div", null, _t9nStrings.fieldNumDecimalPlaces.replace("${number}", num.toString()))));
686
+ renderFieldFormat() {
687
+ const { _t9nStrings, props } = this;
688
+ const { fieldName, fieldInfo, layer } = props;
689
+ if (["single", "double", "long"].indexOf(fieldInfo.layerField.type) === -1) {
690
+ return h$1(Fragment, null);
645
691
  }
646
- }
692
+ const popupTemplate = layer.popupTemplate;
693
+ if (popupTemplate?.fieldInfos) {
694
+ const popFieldInfos = popupTemplate.fieldInfos?.filter((fieldInfo) => fieldInfo.fieldName === fieldName);
695
+ if (popFieldInfos?.length) {
696
+ const popFieldInfo = popFieldInfos[0];
697
+ if (isDefined(popFieldInfo?.format?.places)) {
698
+ const num = popFieldInfo.format.places;
699
+ return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldDecimalPlaces), h$1("div", null, _t9nStrings.fieldNumDecimalPlaces.replace("${number}", num.toString()))));
700
+ }
701
+ }
702
+ }
703
+ return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldDecimalPlaces), h$1("div", { class: "missing" }, _t9nStrings.fieldDecimalPlacesNotAvailable)));
647
704
  }
648
- return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldDecimalPlaces), h$1("div", { class: "missing" }, _t9nStrings.fieldDecimalPlacesNotAvailable)));
649
- }
650
- renderFieldStatistics() {
651
- const { statisticsStatus, uniqueValuesStatus, hideStatistics, _t9nStrings, props } = this;
652
- const { layer, fieldInfo } = props;
653
- if (hideStatistics) {
654
- this.arcgisFieldInfoComplete.emit();
655
- return h$1(Fragment, null);
705
+ renderFieldStatistics() {
706
+ const { statisticsStatus, uniqueValuesStatus, hideStatistics, _t9nStrings, props } = this;
707
+ const { layer, fieldInfo } = props;
708
+ if (hideStatistics) {
709
+ this.arcgisFieldInfoComplete.emit();
710
+ return h$1(Fragment, null);
711
+ }
712
+ if (["stream", "imagery", "imagery-tile"].indexOf(layer.type) > -1 ||
713
+ ["long"].indexOf(fieldInfo.layerField.type) > -1) {
714
+ // can't get statistics
715
+ this.arcgisFieldInfoComplete.emit();
716
+ return h$1(Fragment, null);
717
+ }
718
+ return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldStatistics), !statisticsStatus || statisticsStatus === Status.MISSING || statisticsStatus === Status.IN_PROGRESS ? (h$1("div", { key: "field-info-statistics-content", class: "missing" }, _t9nStrings.fieldStatisticsRetrieving)) : statisticsStatus === Status.FAILED && uniqueValuesStatus !== Status.SUCCESS ? (this.renderNoStatistics()) : (h$1("div", { key: "field-info-statistics-content", ref: () => this.arcgisFieldInfoComplete.emit() }, this.renderStatistics()))));
656
719
  }
657
- if (["stream", "imagery", "imagery-tile"].indexOf(layer.type) > -1 ||
658
- ["long"].indexOf(fieldInfo.layerField.type) > -1) {
659
- // can't get statistics
660
- this.arcgisFieldInfoComplete.emit();
661
- return h$1(Fragment, null);
720
+ renderNoStatistics() {
721
+ const { _t9nStrings } = this;
722
+ return (h$1("div", { key: "field-info-statistics-content", ref: () => this.arcgisFieldInfoComplete.emit(), class: "missing" }, _t9nStrings.fieldStatisticsNotAvailable));
662
723
  }
663
- return (h$1("div", { class: "section" }, h$1("div", { class: "title" }, _t9nStrings.fieldStatistics), !statisticsStatus || statisticsStatus === Status.MISSING || statisticsStatus === Status.IN_PROGRESS ? (h$1("div", { key: "field-info-statistics-content", class: "missing" }, _t9nStrings.fieldStatisticsRetrieving)) : statisticsStatus === Status.FAILED && uniqueValuesStatus !== Status.SUCCESS ? (this.renderNoStatistics()) : (h$1("div", { key: "field-info-statistics-content", ref: () => this.arcgisFieldInfoComplete.emit() }, this.renderStatistics()))));
664
- }
665
- renderNoStatistics() {
666
- const { _t9nStrings } = this;
667
- return (h$1("div", { key: "field-info-statistics-content", ref: () => this.arcgisFieldInfoComplete.emit(), class: "missing" }, _t9nStrings.fieldStatisticsNotAvailable));
668
- }
669
- renderStatistics() {
670
- const { props } = this;
671
- const { fieldInfo } = props;
672
- switch (this._getStatisticsType(fieldInfo)) {
673
- case SimpleFieldTypes.NUMBER:
674
- return this.renderNumberStatistics();
675
- case SimpleFieldTypes.STRING:
676
- case SimpleFieldTypes.OID:
677
- case SimpleFieldTypes.GUID:
678
- return this.renderStringStatistics();
679
- case SimpleFieldTypes.DATE:
680
- case SimpleFieldTypes.DATE_ONLY:
681
- case SimpleFieldTypes.TIME_ONLY:
682
- case SimpleFieldTypes.TIMESTAMP_OFFSET:
683
- return this.renderDateStatistics();
684
- default:
685
- return h$1(Fragment, null);
724
+ renderStatistics() {
725
+ const { props } = this;
726
+ const { fieldInfo } = props;
727
+ switch (this._getStatisticsType(fieldInfo)) {
728
+ case SimpleFieldTypes.NUMBER:
729
+ return this.renderNumberStatistics();
730
+ case SimpleFieldTypes.STRING:
731
+ case SimpleFieldTypes.OID:
732
+ case SimpleFieldTypes.GUID:
733
+ return this.renderStringStatistics();
734
+ case SimpleFieldTypes.DATE:
735
+ case SimpleFieldTypes.DATE_ONLY:
736
+ case SimpleFieldTypes.TIME_ONLY:
737
+ case SimpleFieldTypes.TIMESTAMP_OFFSET:
738
+ return this.renderDateStatistics();
739
+ default:
740
+ return h$1(Fragment, null);
741
+ }
686
742
  }
687
- }
688
- renderNumberStatistics() {
689
- const { statistics, _t9nStrings } = this;
690
- if (!statistics) {
691
- return this.renderNoStatistics();
743
+ renderNumberStatistics() {
744
+ const { statistics, _t9nStrings } = this;
745
+ if (!statistics) {
746
+ return this.renderNoStatistics();
747
+ }
748
+ const { statistics: statStrings } = _t9nStrings;
749
+ return (h$1("div", null, h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.numberOfValues), h$1("div", { class: "data" }, this._printNumValue(statistics.totalCount))), isDefined(statistics.sum) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.sumOfValues), h$1("div", { class: "data" }, this._printNumValue(statistics.sum)))) : null, isDefined(statistics.min) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.minimum), h$1("div", { class: "data" }, this._printNumValue(statistics.min)))) : null, isDefined(statistics.max) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.maximum), h$1("div", { class: "data" }, this._printNumValue(statistics.max)))) : null, isDefined(statistics.avg) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.average), h$1("div", { class: "data" }, this._printNumValue(statistics.avg)))) : null, isDefined(statistics.stddev) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.standardDeviation), h$1("div", { class: "data" }, this._printNumValue(statistics.stddev)))) : null, this.renderNullValues()));
692
750
  }
693
- const { statistics: statStrings } = _t9nStrings;
694
- return (h$1("div", null, h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.numberOfValues), h$1("div", { class: "data" }, this._printNumValue(statistics.totalCount))), isDefined(statistics.sum) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.sumOfValues), h$1("div", { class: "data" }, this._printNumValue(statistics.sum)))) : null, isDefined(statistics.min) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.minimum), h$1("div", { class: "data" }, this._printNumValue(statistics.min)))) : null, isDefined(statistics.max) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.maximum), h$1("div", { class: "data" }, this._printNumValue(statistics.max)))) : null, isDefined(statistics.avg) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.average), h$1("div", { class: "data" }, this._printNumValue(statistics.avg)))) : null, isDefined(statistics.stddev) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.standardDeviation), h$1("div", { class: "data" }, this._printNumValue(statistics.stddev)))) : null, this.renderNullValues()));
695
- }
696
- renderStringStatistics() {
697
- const { statistics, uniqueValuesStatus, _t9nStrings } = this;
698
- const { statistics: statStrings } = _t9nStrings;
699
- return (h$1("div", null, h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.numberOfValues), uniqueValuesStatus !== Status.SUCCESS ? (h$1("div", { class: "missing" }, "--")) : (h$1("div", { class: "data" }, this._printNumValue(statistics?.totalCount)))), this.renderNullValues(), this.renderTopValues()));
700
- }
701
- renderDateStatistics() {
702
- // TODO UTC offset
703
- const { statistics, view, props, _t9nStrings } = this;
704
- const { fieldInfo } = props;
705
- if (!statistics) {
706
- return this.renderNoStatistics();
751
+ renderStringStatistics() {
752
+ const { statistics, uniqueValuesStatus, _t9nStrings } = this;
753
+ const { statistics: statStrings } = _t9nStrings;
754
+ return (h$1("div", null, h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.numberOfValues), uniqueValuesStatus !== Status.SUCCESS ? (h$1("div", { class: "missing" }, "--")) : (h$1("div", { class: "data" }, this._printNumValue(statistics?.totalCount)))), this.renderNullValues(), this.renderTopValues()));
707
755
  }
708
- const { statistics: statStrings } = _t9nStrings;
709
- const dateRange = statistics.max - statistics.min;
710
- const years = Math.floor(dateRange / 31536000000);
711
- let months = Math.floor((dateRange - years * 31536000000) / 2628000000);
712
- let days = Math.ceil((dateRange - months * 2628000000) / 86400000);
713
- if (days >= 30) {
714
- months += 1;
715
- days = 0;
756
+ renderDateStatistics() {
757
+ // TODO UTC offset
758
+ const { statistics, view, props, _t9nStrings } = this;
759
+ const { fieldInfo } = props;
760
+ if (!statistics) {
761
+ return this.renderNoStatistics();
762
+ }
763
+ const { statistics: statStrings } = _t9nStrings;
764
+ const dateRange = statistics.max - statistics.min;
765
+ const years = Math.floor(dateRange / 31536000000);
766
+ let months = Math.floor((dateRange - years * 31536000000) / 2628000000);
767
+ let days = Math.ceil((dateRange - months * 2628000000) / 86400000);
768
+ if (days >= 30) {
769
+ months += 1;
770
+ days = 0;
771
+ }
772
+ let timeSpan = years === 1
773
+ ? statStrings.timeSpanOptions.year
774
+ : years > 1
775
+ ? statStrings.timeSpanOptions.years.replace("${years}", years.toString())
776
+ : "";
777
+ timeSpan += years > 0 && (months > 0 || days > 0) ? ", " : "";
778
+ timeSpan +=
779
+ months === 1
780
+ ? statStrings.timeSpanOptions.month
781
+ : months > 1
782
+ ? statStrings.timeSpanOptions.months.replace("${months}", months.toString())
783
+ : "";
784
+ timeSpan += months > 0 && days > 0 ? ", " : "";
785
+ timeSpan +=
786
+ days === 1
787
+ ? statStrings.timeSpanOptions.day
788
+ : days > 1
789
+ ? statStrings.timeSpanOptions.days.replace("${days}", days.toString())
790
+ : "";
791
+ const showStats = fieldInfo.simpleFieldType !== SimpleFieldTypes.TIMESTAMP_OFFSET ||
792
+ !view ||
793
+ view.timeZone !== "unknown";
794
+ const isTimeOnly = fieldInfo.simpleFieldType === SimpleFieldTypes.TIME_ONLY;
795
+ return (h$1("div", null, h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.numberOfValues), h$1("div", { class: "data" }, this._printNumValue(statistics?.totalCount))), showStats && isDefined(statistics.min) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, isTimeOnly ? statStrings.minimumTime : statStrings.minimumDate), h$1("div", { class: "data" }, `${this._getDisplayString(statistics.min)}`))) : null, showStats && isDefined(statistics.max) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, isTimeOnly ? statStrings.maximumTime : statStrings.maximumDate), h$1("div", { class: "data" }, `${this._getDisplayString(statistics.max)}`))) : null, showStats && isDefined(statistics.avg) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, isTimeOnly ? statStrings.averageTime : statStrings.averageDate), h$1("div", { class: "data" }, `${this._getDisplayString(statistics.avg)}`))) : null, showStats && !isTimeOnly && isDefined(statistics.min) && isDefined(statistics.max) && dateRange > 0 ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.timespan), h$1("div", { class: "data" }, timeSpan))) : null, this.renderNullValues()));
716
796
  }
717
- let timeSpan = years === 1
718
- ? statStrings.timeSpanOptions.year
719
- : years > 1
720
- ? statStrings.timeSpanOptions.years.replace("${years}", years.toString())
721
- : "";
722
- timeSpan += years > 0 && (months > 0 || days > 0) ? ", " : "";
723
- timeSpan +=
724
- months === 1
725
- ? statStrings.timeSpanOptions.month
726
- : months > 1
727
- ? statStrings.timeSpanOptions.months.replace("${months}", months.toString())
728
- : "";
729
- timeSpan += months > 0 && days > 0 ? ", " : "";
730
- timeSpan +=
731
- days === 1
732
- ? statStrings.timeSpanOptions.day
733
- : days > 1
734
- ? statStrings.timeSpanOptions.days.replace("${days}", days.toString())
735
- : "";
736
- const showStats = fieldInfo.simpleFieldType !== SimpleFieldTypes.TIMESTAMP_OFFSET ||
737
- !view ||
738
- view.timeZone !== "unknown";
739
- const isTimeOnly = fieldInfo.simpleFieldType === SimpleFieldTypes.TIME_ONLY;
740
- return (h$1("div", null, h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.numberOfValues), h$1("div", { class: "data" }, this._printNumValue(statistics?.totalCount))), showStats && isDefined(statistics.min) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, isTimeOnly ? statStrings.minimumTime : statStrings.minimumDate), h$1("div", { class: "data" }, `${this._getDisplayString(statistics.min)}`))) : null, showStats && isDefined(statistics.max) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, isTimeOnly ? statStrings.maximumTime : statStrings.maximumDate), h$1("div", { class: "data" }, `${this._getDisplayString(statistics.max)}`))) : null, showStats && isDefined(statistics.avg) ? (h$1("div", { class: "statistics-row" }, h$1("div", null, isTimeOnly ? statStrings.averageTime : statStrings.averageDate), h$1("div", { class: "data" }, `${this._getDisplayString(statistics.avg)}`))) : null, showStats && !isTimeOnly && isDefined(statistics.min) && isDefined(statistics.max) && dateRange > 0 ? (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.timespan), h$1("div", { class: "data" }, timeSpan))) : null, this.renderNullValues()));
741
- }
742
- renderTopValues() {
743
- const { uniqueValues, uniqueValuesStatus, _t9nStrings, props } = this;
744
- const { fieldInfo } = props;
745
- const { statistics: statStrings } = _t9nStrings;
746
- if (uniqueValues?.uniqueValueInfos?.length) {
747
- const infos = uniqueValues.uniqueValueInfos;
748
- infos.sort((a, b) => (a.count < b.count ? 1 : a.count > b.count ? -1 : 0));
749
- const codedValues = fieldInfo.codedValues;
750
- const values = infos
751
- .filter((info) => info.value !== null)
752
- .filter((info, idx) => info && idx < 10)
753
- .map((info) => {
754
- let value = info.value;
755
- if (codedValues) {
756
- codedValues.forEach((codeValue) => {
757
- if (value === codeValue.code) {
758
- value = codeValue.name;
797
+ renderTopValues() {
798
+ const { uniqueValues, uniqueValuesStatus, _t9nStrings, props } = this;
799
+ const { fieldInfo } = props;
800
+ const { statistics: statStrings } = _t9nStrings;
801
+ if (uniqueValues?.uniqueValueInfos?.length) {
802
+ const infos = uniqueValues.uniqueValueInfos;
803
+ infos.sort((a, b) => (a.count < b.count ? 1 : a.count > b.count ? -1 : 0));
804
+ const codedValues = fieldInfo.codedValues;
805
+ const values = infos
806
+ .filter((info) => info.value !== null)
807
+ .filter((info, idx) => info && idx < 10)
808
+ .map((info) => {
809
+ let value = info.value;
810
+ if (codedValues) {
811
+ codedValues.forEach((codeValue) => {
812
+ if (value === codeValue.code) {
813
+ value = codeValue.name;
814
+ }
815
+ });
816
+ }
817
+ else {
818
+ value = this._getDisplayString(value);
819
+ }
820
+ return (h$1("div", { class: "statistics-row" }, h$1("div", { class: "data" }, `${value}`), h$1("div", { class: `$"data" $"count"` }, this._printNumValue(info.count))));
821
+ });
822
+ if (!values.length) {
823
+ return h$1(Fragment, null);
759
824
  }
760
- });
825
+ return (h$1("div", null, h$1("div", { class: "statistics-row-top-values" }, h$1("div", null, infos.length > 10 ? statStrings.topTenValues : statStrings.topValues), h$1("div", null, statStrings.count)), values));
761
826
  }
762
827
  else {
763
- value = this._getDisplayString(value);
828
+ return (h$1("div", null, h$1("div", { class: "statistics-row-top-values" }, h$1("div", null, statStrings.topValues), h$1("div", null, statStrings.count)), h$1("div", { class: "statistics-row" }, h$1("div", { class: "missing" }, uniqueValuesStatus === Status.FAILED
829
+ ? _t9nStrings.fieldUniqueValuesNotAvailable
830
+ : _t9nStrings.fieldSampleRetrieving))));
764
831
  }
765
- return (h$1("div", { class: "statistics-row" }, h$1("div", { class: "data" }, `${value}`), h$1("div", { class: `$"data" $"count"` }, this._printNumValue(info.count))));
766
- });
767
- if (!values.length) {
768
- return h$1(Fragment, null);
769
- }
770
- return (h$1("div", null, h$1("div", { class: "statistics-row-top-values" }, h$1("div", null, infos.length > 10 ? statStrings.topTenValues : statStrings.topValues), h$1("div", null, statStrings.count)), values));
771
- }
772
- else {
773
- return (h$1("div", null, h$1("div", { class: "statistics-row-top-values" }, h$1("div", null, statStrings.topValues), h$1("div", null, statStrings.count)), h$1("div", { class: "statistics-row" }, h$1("div", { class: "missing" }, uniqueValuesStatus === Status.FAILED
774
- ? _t9nStrings.fieldUniqueValuesNotAvailable
775
- : _t9nStrings.fieldSampleRetrieving))));
776
832
  }
777
- }
778
- renderNullValues() {
779
- const { statistics, uniqueValues, _t9nStrings } = this;
780
- const { statistics: statStrings } = _t9nStrings;
781
- let count = statistics?.nullcount;
782
- if (!isDefined(count) && uniqueValues) {
783
- const infos = uniqueValues.uniqueValueInfos;
784
- for (let i = 0; i < infos.length; i++) {
785
- const info = infos[i];
786
- if (info.value === null) {
787
- count = info.count;
788
- break;
833
+ renderNullValues() {
834
+ const { statistics, uniqueValues, _t9nStrings } = this;
835
+ const { statistics: statStrings } = _t9nStrings;
836
+ let count = statistics?.nullcount;
837
+ if (!isDefined(count) && uniqueValues) {
838
+ const infos = uniqueValues.uniqueValueInfos;
839
+ for (let i = 0; i < infos.length; i++) {
840
+ const info = infos[i];
841
+ if (info.value === null) {
842
+ count = info.count;
843
+ break;
844
+ }
845
+ }
789
846
  }
790
- }
847
+ return (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.numberOfNulls), !isDefined(count) ? (h$1("div", { class: "missing" }, "--")) : (h$1("div", { class: "data" }, `${new Number(count).toLocaleString()}`))));
791
848
  }
792
- return (h$1("div", { class: "statistics-row" }, h$1("div", null, statStrings.numberOfNulls), !isDefined(count) ? (h$1("div", { class: "missing" }, "--")) : (h$1("div", { class: "data" }, `${new Number(count).toLocaleString()}`))));
793
- }
794
- // --------------------------------------------------------------------------
795
- //
796
- // Private methods
797
- //
798
- // --------------------------------------------------------------------------
799
- _getFieldTypeLabel(fieldType) {
800
- const { _t9nStrings } = this;
801
- const fieldTypes = _t9nStrings.fieldTypes;
802
- switch (fieldType) {
803
- case "small-integer":
804
- return fieldTypes.smallInteger;
805
- case "big-integer":
806
- return fieldTypes.bigInteger;
807
- case "integer":
808
- return fieldTypes.integer;
809
- case "single":
810
- return fieldTypes.single;
811
- case "double":
812
- return fieldTypes.double;
813
- case "long":
814
- return fieldTypes.long;
815
- case "string":
816
- return fieldTypes.string;
817
- case "date":
818
- return fieldTypes.date;
819
- case "date-only":
820
- return fieldTypes.dateOnly;
821
- case "time-only":
822
- return fieldTypes.timeOnly;
823
- case "timestamp-offset":
824
- return fieldTypes.timestampOffset;
825
- case "oid":
826
- return fieldTypes.oid;
827
- case "guid":
828
- return fieldTypes.guid;
829
- case "global-id":
830
- return fieldTypes.globalId;
831
- default:
832
- return fieldTypes.string;
849
+ // --------------------------------------------------------------------------
850
+ //
851
+ // Private methods
852
+ //
853
+ // --------------------------------------------------------------------------
854
+ _getFieldTypeLabel(fieldType) {
855
+ const { _t9nStrings } = this;
856
+ const fieldTypes = _t9nStrings.fieldTypes;
857
+ switch (fieldType) {
858
+ case "small-integer":
859
+ return fieldTypes.smallInteger;
860
+ case "big-integer":
861
+ return fieldTypes.bigInteger;
862
+ case "integer":
863
+ return fieldTypes.integer;
864
+ case "single":
865
+ return fieldTypes.single;
866
+ case "double":
867
+ return fieldTypes.double;
868
+ case "long":
869
+ return fieldTypes.long;
870
+ case "string":
871
+ return fieldTypes.string;
872
+ case "date":
873
+ return fieldTypes.date;
874
+ case "date-only":
875
+ return fieldTypes.dateOnly;
876
+ case "time-only":
877
+ return fieldTypes.timeOnly;
878
+ case "timestamp-offset":
879
+ return fieldTypes.timestampOffset;
880
+ case "oid":
881
+ return fieldTypes.oid;
882
+ case "guid":
883
+ return fieldTypes.guid;
884
+ case "global-id":
885
+ return fieldTypes.globalId;
886
+ default:
887
+ return fieldTypes.string;
888
+ }
833
889
  }
834
- }
835
- _getStatisticsType(fieldInfo) {
836
- // "count-or-amount","percentage-or-ratio","measurement","unique-identifier","coordinate","binary"
837
- // "name-or-title","type-or-category","description","location-or-place-name","ordered-or-ranked","date-and-time"
838
- switch (fieldInfo.layerField.type) {
839
- case "small-integer":
840
- case "big-integer":
841
- case "integer":
842
- case "single":
843
- case "double": {
844
- if (fieldInfo.codedValues) {
845
- return SimpleFieldTypes.STRING;
890
+ _getStatisticsType(fieldInfo) {
891
+ // "count-or-amount","percentage-or-ratio","measurement","unique-identifier","coordinate","binary"
892
+ // "name-or-title","type-or-category","description","location-or-place-name","ordered-or-ranked","date-and-time"
893
+ switch (fieldInfo.layerField.type) {
894
+ case "small-integer":
895
+ case "big-integer":
896
+ case "integer":
897
+ case "single":
898
+ case "double": {
899
+ if (fieldInfo.codedValues) {
900
+ return SimpleFieldTypes.STRING;
901
+ }
902
+ switch (fieldInfo.layerField.valueType) {
903
+ case "name-or-title":
904
+ case "type-or-category":
905
+ case "description":
906
+ case "location-or-place-name":
907
+ case "ordered-or-ranked":
908
+ case "binary":
909
+ //case "date-and-time":
910
+ return SimpleFieldTypes.STRING;
911
+ default:
912
+ return SimpleFieldTypes.NUMBER;
913
+ }
914
+ }
915
+ case "string":
916
+ return SimpleFieldTypes.STRING;
917
+ case "date":
918
+ return SimpleFieldTypes.DATE;
919
+ case "timestamp-offset":
920
+ return SimpleFieldTypes.TIMESTAMP_OFFSET;
921
+ case "date-only":
922
+ return SimpleFieldTypes.DATE_ONLY;
923
+ case "time-only":
924
+ return SimpleFieldTypes.TIME_ONLY;
925
+ default:
926
+ return SimpleFieldTypes.STRING;
846
927
  }
847
- switch (fieldInfo.layerField.valueType) {
848
- case "name-or-title":
849
- case "type-or-category":
850
- case "description":
851
- case "location-or-place-name":
852
- case "ordered-or-ranked":
853
- case "binary":
854
- //case "date-and-time":
855
- return SimpleFieldTypes.STRING;
856
- default:
857
- return SimpleFieldTypes.NUMBER;
928
+ }
929
+ _getFieldValueTypeCamelCase(field) {
930
+ switch (field.layerField.valueType) {
931
+ case "count-or-amount":
932
+ return "countOrAmount";
933
+ case "percentage-or-ratio":
934
+ return "percentageOrRatio";
935
+ case "unique-identifier":
936
+ return "uniqueIdentifier";
937
+ case "name-or-title":
938
+ return "nameOrTitle";
939
+ case "type-or-category":
940
+ return "typeOrCategory";
941
+ case "location-or-place-name":
942
+ return "locationOrPlaceName";
943
+ case "ordered-or-ranked":
944
+ return "orderedOrRanked";
945
+ case "date-and-time":
946
+ return "dateAndTime";
947
+ default:
948
+ return field.layerField.valueType;
858
949
  }
859
- }
860
- case "string":
861
- return SimpleFieldTypes.STRING;
862
- case "date":
863
- return SimpleFieldTypes.DATE;
864
- case "timestamp-offset":
865
- return SimpleFieldTypes.TIMESTAMP_OFFSET;
866
- case "date-only":
867
- return SimpleFieldTypes.DATE_ONLY;
868
- case "time-only":
869
- return SimpleFieldTypes.TIME_ONLY;
870
- default:
871
- return SimpleFieldTypes.STRING;
872
950
  }
873
- }
874
- _getFieldValueTypeCamelCase(field) {
875
- switch (field.layerField.valueType) {
876
- case "count-or-amount":
877
- return "countOrAmount";
878
- case "percentage-or-ratio":
879
- return "percentageOrRatio";
880
- case "unique-identifier":
881
- return "uniqueIdentifier";
882
- case "name-or-title":
883
- return "nameOrTitle";
884
- case "type-or-category":
885
- return "typeOrCategory";
886
- case "location-or-place-name":
887
- return "locationOrPlaceName";
888
- case "ordered-or-ranked":
889
- return "orderedOrRanked";
890
- case "date-and-time":
891
- return "dateAndTime";
892
- default:
893
- return field.layerField.valueType;
951
+ _getDisplayString(value) {
952
+ const { props } = this;
953
+ const { fieldInfo } = props;
954
+ switch (fieldInfo.simpleFieldType) {
955
+ case SimpleFieldTypes.DATE:
956
+ return this._getDateString(value);
957
+ case SimpleFieldTypes.TIMESTAMP_OFFSET:
958
+ return this._getTimestampOffsetString(value);
959
+ case SimpleFieldTypes.DATE_ONLY:
960
+ return this._getDateOnlyString(value);
961
+ case SimpleFieldTypes.TIME_ONLY:
962
+ return this._getTimeOnlyString(value);
963
+ case SimpleFieldTypes.NUMBER:
964
+ return this._getNumberString(value);
965
+ case SimpleFieldTypes.GUID:
966
+ return this._getGuidString(value);
967
+ default:
968
+ // string, oid, global-id
969
+ return `${value}`;
970
+ }
894
971
  }
895
- }
896
- _getDisplayString(value) {
897
- const { props } = this;
898
- const { fieldInfo } = props;
899
- switch (fieldInfo.simpleFieldType) {
900
- case SimpleFieldTypes.DATE:
901
- return this._getDateString(value);
902
- case SimpleFieldTypes.TIMESTAMP_OFFSET:
903
- return this._getTimestampOffsetString(value);
904
- case SimpleFieldTypes.DATE_ONLY:
905
- return this._getDateOnlyString(value);
906
- case SimpleFieldTypes.TIME_ONLY:
907
- return this._getTimeOnlyString(value);
908
- case SimpleFieldTypes.NUMBER:
909
- return this._getNumberString(value);
910
- case SimpleFieldTypes.GUID:
911
- return this._getGuidString(value);
912
- default:
913
- // string, oid, global-id
914
- return `${value}`;
972
+ _getDateString(value) {
973
+ const { modules, view } = this.props;
974
+ if (view && view.timeZone === "unknown") {
975
+ return modules.intl.formatDate(value, {
976
+ ...modules.intl.convertDateFormatToIntlOptions("short-date-short-time"),
977
+ timeZone: "utc",
978
+ timeZoneName: "shortOffset"
979
+ });
980
+ }
981
+ else {
982
+ // known issues with formatting it-CH
983
+ return modules.intl.formatDate(value, {
984
+ ...modules.intl.convertDateFormatToIntlOptions("short-date-short-time"),
985
+ timeZone: view?.timeZone || "system"
986
+ });
987
+ }
915
988
  }
916
- }
917
- _getDateString(value) {
918
- const { modules, view } = this.props;
919
- if (view && view.timeZone === "unknown") {
920
- return modules.intl.formatDate(value, {
921
- ...modules.intl.convertDateFormatToIntlOptions("short-date-short-time"),
922
- timeZone: "utc",
923
- timeZoneName: "shortOffset"
924
- });
989
+ _getTimestampOffsetString(value) {
990
+ /*
991
+ const timestamp = "2023-03-19T16:00:00.123-01:00";
992
+ console.log("timestamp", timestamp);
993
+ console.log(
994
+ "local Time",
995
+ intl.formatTimestamp(timestamp, intl.convertDateFormatToIntlOptions("short-date-short-time"))
996
+ );
997
+ console.log(
998
+ "mapView Time (except unknown)",
999
+ intl.formatTimestamp(timestamp, {
1000
+ ...intl.convertDateFormatToIntlOptions("short-date-short-time"),
1001
+ timeZone: view.timeZone,
1002
+ })
1003
+ );
1004
+ console.log(
1005
+ "UTC Time (mapView time unknown)",
1006
+ intl.formatTimestamp(timestamp, {
1007
+ ...intl.convertDateFormatToIntlOptions("short-date-short-time"),
1008
+ timeZone: "utc",
1009
+ timeZoneName: "shortOffset"
1010
+ })
1011
+ );
1012
+ console.log(
1013
+ "Raw",
1014
+ intl.formatTimestamp(timestamp, {
1015
+ ...intl.convertDateFormatToIntlOptions("short-date-short-time"),
1016
+ timeZoneName: "shortOffset"
1017
+ })
1018
+ );
1019
+ */
1020
+ const { modules, view } = this.props;
1021
+ if (typeof value === "string") {
1022
+ // raw value from layer
1023
+ if (view && view.timeZone === "unknown") {
1024
+ return modules.intl.formatTimestamp(value, {
1025
+ ...modules.intl.convertDateFormatToIntlOptions("short-date-short-time"),
1026
+ timeZone: "utc",
1027
+ timeZoneName: "shortOffset"
1028
+ });
1029
+ }
1030
+ else {
1031
+ return modules.intl.formatTimestamp(value, {
1032
+ ...modules.intl.convertDateFormatToIntlOptions("short-date-short-time"),
1033
+ timeZone: view?.timeZone || "system"
1034
+ });
1035
+ }
1036
+ }
1037
+ else {
1038
+ // e.g. UNIX timestamp from statistics call
1039
+ return this._getDateString(value);
1040
+ }
925
1041
  }
926
- else {
927
- // known issues with formatting it-CH
928
- return modules.intl.formatDate(value, {
929
- ...modules.intl.convertDateFormatToIntlOptions("short-date-short-time"),
930
- timeZone: view?.timeZone || "system"
931
- });
1042
+ _getDateOnlyString(value) {
1043
+ const { props } = this;
1044
+ const { modules } = props;
1045
+ return modules.intl.formatDateOnly(value, modules.intl.convertDateFormatToIntlOptions("short-date"));
932
1046
  }
933
- }
934
- _getTimestampOffsetString(value) {
935
- /*
936
- const timestamp = "2023-03-19T16:00:00.123-01:00";
937
- console.log("timestamp", timestamp);
938
- console.log(
939
- "local Time",
940
- intl.formatTimestamp(timestamp, intl.convertDateFormatToIntlOptions("short-date-short-time"))
941
- );
942
- console.log(
943
- "mapView Time (except unknown)",
944
- intl.formatTimestamp(timestamp, {
945
- ...intl.convertDateFormatToIntlOptions("short-date-short-time"),
946
- timeZone: view.timeZone,
947
- })
948
- );
949
- console.log(
950
- "UTC Time (mapView time unknown)",
951
- intl.formatTimestamp(timestamp, {
952
- ...intl.convertDateFormatToIntlOptions("short-date-short-time"),
953
- timeZone: "utc",
954
- timeZoneName: "shortOffset"
955
- })
956
- );
957
- console.log(
958
- "Raw",
959
- intl.formatTimestamp(timestamp, {
960
- ...intl.convertDateFormatToIntlOptions("short-date-short-time"),
961
- timeZoneName: "shortOffset"
962
- })
963
- );
964
- */
965
- const { modules, view } = this.props;
966
- if (typeof value === "string") {
967
- // raw value from layer
968
- if (view && view.timeZone === "unknown") {
969
- return modules.intl.formatTimestamp(value, {
970
- ...modules.intl.convertDateFormatToIntlOptions("short-date-short-time"),
971
- timeZone: "utc",
972
- timeZoneName: "shortOffset"
973
- });
974
- }
975
- else {
976
- return modules.intl.formatTimestamp(value, {
977
- ...modules.intl.convertDateFormatToIntlOptions("short-date-short-time"),
978
- timeZone: view?.timeZone || "system"
979
- });
980
- }
1047
+ _getTimeOnlyString(value) {
1048
+ const { props } = this;
1049
+ const { modules } = props;
1050
+ if (typeof value === "string") {
1051
+ return modules.intl.formatTimeOnly(value, modules.intl.convertDateFormatToIntlOptions("short-date-long-time"));
1052
+ }
1053
+ else {
1054
+ // UNIX timestamp
1055
+ return modules.intl.formatDate(value, {
1056
+ ...modules.intl.convertDateFormatToIntlOptions("long-time"),
1057
+ timeZone: "utc"
1058
+ });
1059
+ }
981
1060
  }
982
- else {
983
- // e.g. UNIX timestamp from statistics call
984
- return this._getDateString(value);
1061
+ _getGuidString(value) {
1062
+ return value.startsWith("{") ? value : `{${value}}`;
985
1063
  }
986
- }
987
- _getDateOnlyString(value) {
988
- const { props } = this;
989
- const { modules } = props;
990
- return modules.intl.formatDateOnly(value, modules.intl.convertDateFormatToIntlOptions("short-date"));
991
- }
992
- _getTimeOnlyString(value) {
993
- const { props } = this;
994
- const { modules } = props;
995
- if (typeof value === "string") {
996
- return modules.intl.formatTimeOnly(value, modules.intl.convertDateFormatToIntlOptions("short-date-long-time"));
1064
+ _getNumberString(value) {
1065
+ return this.props.modules.intl.formatNumber(value);
997
1066
  }
998
- else {
999
- // UNIX timestamp
1000
- return modules.intl.formatDate(value, {
1001
- ...modules.intl.convertDateFormatToIntlOptions("long-time"),
1002
- timeZone: "utc"
1003
- });
1067
+ _printNumValue(value) {
1068
+ return isDefined(value) ? this._getNumberString(Math.round(value * 100) / 100) : `--`;
1004
1069
  }
1005
- }
1006
- _getGuidString(value) {
1007
- return value.startsWith("{") ? value : `{${value}}`;
1008
- }
1009
- _getNumberString(value) {
1010
- return this.props.modules.intl.formatNumber(value);
1011
- }
1012
- _printNumValue(value) {
1013
- return isDefined(value) ? this._getNumberString(Math.round(value * 100) / 100) : `--`;
1014
- }
1015
- static get assetsDirs() { return ["assets"]; }
1016
- get _hostElement() { return this; }
1017
- static get style() { return fieldInfoScss; }
1070
+ static get assetsDirs() { return ["assets"]; }
1071
+ get _hostElement() { return this; }
1072
+ static get style() { return fieldInfoScss; }
1018
1073
  }, [1, "arcgis-field-info", {
1019
- "view": [16],
1020
- "layer": [16],
1021
- "fieldName": [1, "field-name"],
1022
- "hideStatistics": [4, "hide-statistics"],
1023
- "oneFeatureResponse": [32],
1024
- "oneFeatureResponseStatus": [32],
1025
- "statistics": [32],
1026
- "statisticsStatus": [32],
1027
- "uniqueValues": [32],
1028
- "uniqueValuesStatus": [32],
1029
- "_lang": [32],
1030
- "_t9nLocale": [32],
1031
- "_t9nStrings": [32]
1032
- }]);
1074
+ "view": [16],
1075
+ "layer": [16],
1076
+ "fieldName": [1, "field-name"],
1077
+ "hideStatistics": [4, "hide-statistics"],
1078
+ "oneFeatureResponse": [32],
1079
+ "oneFeatureResponseStatus": [32],
1080
+ "statistics": [32],
1081
+ "statisticsStatus": [32],
1082
+ "uniqueValues": [32],
1083
+ "uniqueValuesStatus": [32],
1084
+ "_lang": [32],
1085
+ "_t9nLocale": [32],
1086
+ "_t9nStrings": [32]
1087
+ }]);
1033
1088
  function defineCustomElement() {
1034
- if (typeof customElements === "undefined") {
1035
- return;
1036
- }
1037
- const components = ["arcgis-field-info"];
1038
- components.forEach(tagName => { switch (tagName) {
1039
- case "arcgis-field-info":
1040
- if (!customElements.get(tagName)) {
1041
- customElements.define(tagName, ArcgisFieldInfo);
1042
- }
1043
- break;
1044
- } });
1089
+ if (typeof customElements === "undefined") {
1090
+ return;
1091
+ }
1092
+ const components = ["arcgis-field-info"];
1093
+ components.forEach(tagName => { switch (tagName) {
1094
+ case "arcgis-field-info":
1095
+ if (!customElements.get(tagName)) {
1096
+ customElements.define(tagName, ArcgisFieldInfo);
1097
+ }
1098
+ break;
1099
+ } });
1045
1100
  }
1046
1101
  defineCustomElement();
1047
1102
 
1048
- export { ArcgisFieldInfo as A, C, F, U, defineCustomElement as d };
1103
+ export { ArcgisFieldInfo as A, C, F, U, defineCustomElement as d, importIntl as i };