@arcgis/common-components 5.2.0-next.65 → 5.2.0-next.67

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 (76) hide show
  1. package/dist/cdn/27EUJ42B.js +2 -0
  2. package/dist/cdn/2C7SVAMP.js +2 -0
  3. package/dist/cdn/2W6L7MWA.js +2 -0
  4. package/dist/cdn/2YGG7LXT.js +2 -0
  5. package/dist/cdn/4BK7PZE3.js +2 -0
  6. package/dist/cdn/5WGBTOWN.js +2 -0
  7. package/dist/cdn/{BMAH7QBK.js → 7KADEPAK.js} +1 -1
  8. package/dist/cdn/{TO6WMMK4.js → CA7QB7UT.js} +1 -1
  9. package/dist/cdn/CH6HYVI6.js +2 -0
  10. package/dist/cdn/ETMH4DV6.js +2 -0
  11. package/dist/cdn/FBLD2E3Y.js +2 -0
  12. package/dist/cdn/{I6VYJHWH.js → FJAIY6NX.js} +1 -1
  13. package/dist/cdn/{G3IYOM43.js → GPWZ4YLQ.js} +1 -1
  14. package/dist/cdn/JJY3CFBU.js +2 -0
  15. package/dist/cdn/{7SJH7FOK.js → OVZV6YGZ.js} +1 -1
  16. package/dist/cdn/{6DGHVYTV.js → PHM5ZZMN.js} +1 -1
  17. package/dist/cdn/PTJVWB67.js +2 -0
  18. package/dist/cdn/{ADYTRVI3.js → SJFYZOCS.js} +1 -1
  19. package/dist/cdn/{UI52HM3O.js → UK2G5LXU.js} +1 -1
  20. package/dist/cdn/VCZLD7ZT.js +2 -0
  21. package/dist/cdn/VOBBBIYC.js +2 -0
  22. package/dist/cdn/{L5RQNCAS.js → WVOAAHEV.js} +1 -1
  23. package/dist/cdn/{PFBJ5AAH.js → XQRXHSM5.js} +1 -1
  24. package/dist/cdn/XW5YJXMI.js +2 -0
  25. package/dist/cdn/YCQN4TJE.js +2 -0
  26. package/dist/cdn/index.js +1 -1
  27. package/dist/cdn/main.css +1 -1
  28. package/dist/chunks/element-reference-controller.js +17 -0
  29. package/dist/chunks/utils.js +69 -0
  30. package/dist/chunks/utils2.js +20 -0
  31. package/dist/chunks/utils3.js +7 -0
  32. package/dist/components/arcgis-color-input/customElement.d.ts +2 -1
  33. package/dist/components/arcgis-field-info/customElement.js +1 -3
  34. package/dist/components/arcgis-field-pick-list/customElement.js +23 -23
  35. package/dist/components/arcgis-toolbar/customElement.d.ts +47 -0
  36. package/dist/components/arcgis-toolbar/customElement.js +82 -0
  37. package/dist/components/arcgis-toolbar/index.d.ts +1 -0
  38. package/dist/components/arcgis-toolbar/index.js +2 -0
  39. package/dist/components/arcgis-toolbar/types.d.ts +10 -0
  40. package/dist/components/arcgis-toolbar-action/customElement.d.ts +97 -0
  41. package/dist/components/arcgis-toolbar-action/customElement.js +57 -0
  42. package/dist/components/arcgis-toolbar-action/index.d.ts +1 -0
  43. package/dist/components/arcgis-toolbar-action/index.js +3 -0
  44. package/dist/components/arcgis-toolbar-group/customElement.d.ts +38 -0
  45. package/dist/components/arcgis-toolbar-group/customElement.js +47 -0
  46. package/dist/components/arcgis-toolbar-group/index.d.ts +1 -0
  47. package/dist/components/arcgis-toolbar-group/index.js +2 -0
  48. package/dist/components/arcgis-toolbar-item/customElement.d.ts +83 -0
  49. package/dist/components/arcgis-toolbar-item/customElement.js +42 -0
  50. package/dist/components/arcgis-toolbar-item/index.d.ts +1 -0
  51. package/dist/components/arcgis-toolbar-item/index.js +4 -0
  52. package/dist/components/arcgis-toolbar-more-button/customElement.d.ts +52 -0
  53. package/dist/components/arcgis-toolbar-more-button/customElement.js +68 -0
  54. package/dist/components/arcgis-toolbar-more-button/index.d.ts +1 -0
  55. package/dist/components/arcgis-toolbar-more-button/index.js +6 -0
  56. package/dist/components/arcgis-toolbar-split-button/customElement.d.ts +51 -0
  57. package/dist/components/arcgis-toolbar-split-button/customElement.js +66 -0
  58. package/dist/components/arcgis-toolbar-split-button/index.d.ts +1 -0
  59. package/dist/components/arcgis-toolbar-split-button/index.js +6 -0
  60. package/dist/components/arcgis-unique-values-list/customElement.js +99 -79
  61. package/dist/docs/api.json +1 -1
  62. package/dist/docs/docs.json +1 -1
  63. package/dist/docs/vscode.html-custom-data.json +1 -1
  64. package/dist/docs/web-types.json +1 -1
  65. package/dist/index.d.ts +36 -0
  66. package/dist/loader.js +8 -2
  67. package/dist/types/lumina.d.ts +33 -0
  68. package/dist/types/preact.d.ts +39 -0
  69. package/dist/types/react.d.ts +45 -0
  70. package/dist/types/stencil.d.ts +33 -0
  71. package/package.json +4 -4
  72. package/dist/cdn/4S3TDYPJ.js +0 -2
  73. package/dist/cdn/DWUHV2MR.js +0 -2
  74. package/dist/cdn/EJYLPUWU.js +0 -2
  75. package/dist/cdn/NNP2GXAL.js +0 -2
  76. package/dist/cdn/WLDOB2AM.js +0 -2
package/dist/index.d.ts CHANGED
@@ -61,6 +61,12 @@ import type { ArcgisSlider } from "./components/arcgis-slider/customElement.js";
61
61
  import type { ArcgisSliderField } from "./components/arcgis-slider-field/customElement.js";
62
62
  import type { ArcgisSliderInput } from "./components/arcgis-slider-input/customElement.js";
63
63
  import type { ArcgisTicks } from "./components/arcgis-ticks/customElement.js";
64
+ import type { ArcgisToolbar } from "./components/arcgis-toolbar/customElement.js";
65
+ import type { ArcgisToolbarAction } from "./components/arcgis-toolbar-action/customElement.js";
66
+ import type { ArcgisToolbarGroup } from "./components/arcgis-toolbar-group/customElement.js";
67
+ import type { ArcgisToolbarItem } from "./components/arcgis-toolbar-item/customElement.js";
68
+ import type { ArcgisToolbarMoreButton } from "./components/arcgis-toolbar-more-button/customElement.js";
69
+ import type { ArcgisToolbarSplitButton } from "./components/arcgis-toolbar-split-button/customElement.js";
64
70
  import type { ArcgisUniqueValuesList } from "./components/arcgis-unique-values-list/customElement.js";
65
71
  import type { ArcgisValuePicker } from "./components/arcgis-value-picker/customElement.js";
66
72
  import type { ArcgisValuePickerCollection } from "./components/arcgis-value-picker-collection/customElement.js";
@@ -135,6 +141,16 @@ export interface ArcgisTicksCustomEvent<T> extends CustomEvent<T> {
135
141
  target: ArcgisTicks;
136
142
  currentTarget: ArcgisTicks;
137
143
  }
144
+ export interface ArcgisToolbarActionCustomEvent<T> extends CustomEvent<T> {
145
+ detail: T;
146
+ target: ArcgisToolbarAction;
147
+ currentTarget: ArcgisToolbarAction;
148
+ }
149
+ export interface ArcgisToolbarItemCustomEvent<T> extends CustomEvent<T> {
150
+ detail: T;
151
+ target: ArcgisToolbarItem;
152
+ currentTarget: ArcgisToolbarItem;
153
+ }
138
154
  export interface ArcgisUniqueValuesListCustomEvent<T> extends CustomEvent<T> {
139
155
  detail: T;
140
156
  target: ArcgisUniqueValuesList;
@@ -186,6 +202,12 @@ declare global {
186
202
  "arcgis-slider-field": ArcgisSliderField;
187
203
  "arcgis-slider-input": ArcgisSliderInput;
188
204
  "arcgis-ticks": ArcgisTicks;
205
+ "arcgis-toolbar": ArcgisToolbar;
206
+ "arcgis-toolbar-action": ArcgisToolbarAction;
207
+ "arcgis-toolbar-group": ArcgisToolbarGroup;
208
+ "arcgis-toolbar-item": ArcgisToolbarItem;
209
+ "arcgis-toolbar-more-button": ArcgisToolbarMoreButton;
210
+ "arcgis-toolbar-split-button": ArcgisToolbarSplitButton;
189
211
  "arcgis-unique-values-list": ArcgisUniqueValuesList;
190
212
  "arcgis-value-picker": ArcgisValuePicker;
191
213
  "arcgis-value-picker-collection": ArcgisValuePickerCollection;
@@ -242,6 +264,20 @@ declare global {
242
264
  type HTMLArcgisTicksElementEventMap = ArcgisTicks["@eventTypes"];
243
265
  type HTMLArcgisTicksElement = ArcgisTicks;
244
266
 
267
+ type HTMLArcgisToolbarElement = ArcgisToolbar;
268
+
269
+ type HTMLArcgisToolbarActionElementEventMap = ArcgisToolbarAction["@eventTypes"];
270
+ type HTMLArcgisToolbarActionElement = ArcgisToolbarAction;
271
+
272
+ type HTMLArcgisToolbarGroupElement = ArcgisToolbarGroup;
273
+
274
+ type HTMLArcgisToolbarItemElementEventMap = ArcgisToolbarItem["@eventTypes"];
275
+ type HTMLArcgisToolbarItemElement = ArcgisToolbarItem;
276
+
277
+ type HTMLArcgisToolbarMoreButtonElement = ArcgisToolbarMoreButton;
278
+
279
+ type HTMLArcgisToolbarSplitButtonElement = ArcgisToolbarSplitButton;
280
+
245
281
  type HTMLArcgisUniqueValuesListElementEventMap = ArcgisUniqueValuesList["@eventTypes"];
246
282
  type HTMLArcgisUniqueValuesListElement = ArcgisUniqueValuesList;
247
283
 
package/dist/loader.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { r as e } from "./chunks/runtime.js";
3
3
  import { makeDefineCustomElements as a } from "@arcgis/lumina";
4
- const l = a(e, {
4
+ const s = a(e, {
5
5
  "arcgis-ckeditor5": [() => import("./components/arcgis-ckeditor5/customElement.js"), "canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],
6
6
  "arcgis-ckeditor5-popover": [() => import("./components/arcgis-ckeditor5-popover/customElement.js"), "guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],
7
7
  "arcgis-color-input": [() => import("./components/arcgis-color-input/customElement.js"), "_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus;isOpen"],
@@ -19,6 +19,12 @@ const l = a(e, {
19
19
  "arcgis-slider-field": [() => import("./components/arcgis-slider-field/customElement.js"), "activeValue:,disabled,fieldType,fillPlacement,label,labelFormatter:,layout,max,messageOverrides:,messages:,min,mirrored,popoverLabel,rangeLabelsEditingEnabled,rangeLabelsPlacement,showRangeLabels,valueLabelsDisplay,valueLabelsEditingEnabled,valueLabelsPlacement,values,valuesAsDateOnly:,valuesAsFieldType:,valuesAsNumbers:,valuesAsTimeOnly:,valuesAsTimestampOffset:"],
20
20
  "arcgis-slider-input": [() => import("./components/arcgis-slider-input/customElement.js"), "disabled,flipLabels,label,max,min,scale,step,unitsLabel,value,withSteppers"],
21
21
  "arcgis-ticks": [() => import("./components/arcgis-ticks/customElement.js"), "interactive,interpolationExponent,labelFormatter:,labelPlacement,layout,max,min,mirrored,mode,showBaseline,showLabels,values"],
22
+ "arcgis-toolbar": [() => import("./components/arcgis-toolbar/customElement.js"), "barElement:,layout,relativePosition,scale,toolbarKind,tooltipAppearance"],
23
+ "arcgis-toolbar-action": [() => import("./components/arcgis-toolbar-action/customElement.js"), "actionElement:,active,appearance,disabled,icon,iconFlipRtl,indicator,kind,labelText,loading,textEnabled,tooltipText;;measure,proxiedRender"],
24
+ "arcgis-toolbar-group": [() => import("./components/arcgis-toolbar-group/customElement.js"), "preferEndSlot,priority;;measure,proxiedRender"],
25
+ "arcgis-toolbar-item": [() => import("./components/arcgis-toolbar-item/customElement.js"), "actionElement:,active,disabled,icon,iconFlipRtl,labelText,lastActivated:,loading,tooltipText;;measure,proxiedRender"],
26
+ "arcgis-toolbar-more-button": [() => import("./components/arcgis-toolbar-more-button/customElement.js"), "menuAppearance,overflowActionLabel,priority;;measure,proxiedRender"],
27
+ "arcgis-toolbar-split-button": [() => import("./components/arcgis-toolbar-split-button/customElement.js"), "menuAppearance,overflowActionLabel,priority;;measure,proxiedRender"],
22
28
  "arcgis-unique-values-list": [() => import("./components/arcgis-unique-values-list/customElement.js"), "_messages:,fieldName,layer:,maxHeight,multiple,numberFormatOptions:,partialUniqueValues,selectedValues:,showFilterLength,sortBy,uniqueValues:,view:,visualizationSource;getUniqueValues,setFocus"],
23
29
  "arcgis-value-picker": [() => import("./components/arcgis-value-picker/customElement.js"), "autoDestroyDisabled,disabled,hideNextButton,hidePlayButton,hidePreviousButton,icon,label,layout,loop,messages:,playRate,state:;destroy;next,pause,play,previous"],
24
30
  "arcgis-value-picker-collection": [() => import("./components/arcgis-value-picker-collection/customElement.js"), "autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,items:;destroy;reset,step"],
@@ -27,5 +33,5 @@ const l = a(e, {
27
33
  "arcgis-value-picker-slider": [() => import("./components/arcgis-value-picker-slider/customElement.js"), "autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue,disabled,labelFormatter:,labels:,layout,majorTicks:,max,min,minorTicks:,mirrored,steps:;destroy;reset,step"]
28
34
  });
29
35
  export {
30
- l as defineCustomElements
36
+ s as defineCustomElements
31
37
  };
@@ -16,6 +16,12 @@ import type { ArcgisSlider } from "../components/arcgis-slider/customElement.js"
16
16
  import type { ArcgisSliderField } from "../components/arcgis-slider-field/customElement.js";
17
17
  import type { ArcgisSliderInput } from "../components/arcgis-slider-input/customElement.js";
18
18
  import type { ArcgisTicks } from "../components/arcgis-ticks/customElement.js";
19
+ import type { ArcgisToolbar } from "../components/arcgis-toolbar/customElement.js";
20
+ import type { ArcgisToolbarAction } from "../components/arcgis-toolbar-action/customElement.js";
21
+ import type { ArcgisToolbarGroup } from "../components/arcgis-toolbar-group/customElement.js";
22
+ import type { ArcgisToolbarItem } from "../components/arcgis-toolbar-item/customElement.js";
23
+ import type { ArcgisToolbarMoreButton } from "../components/arcgis-toolbar-more-button/customElement.js";
24
+ import type { ArcgisToolbarSplitButton } from "../components/arcgis-toolbar-split-button/customElement.js";
19
25
  import type { ArcgisUniqueValuesList } from "../components/arcgis-unique-values-list/customElement.js";
20
26
  import type { ArcgisValuePicker } from "../components/arcgis-value-picker/customElement.js";
21
27
  import type { ArcgisValuePickerCollection } from "../components/arcgis-value-picker-collection/customElement.js";
@@ -117,6 +123,27 @@ interface LuminaArcgisTicks extends Partial<Pick<ArcgisTicks, "interactive" | "i
117
123
  onarcgisTickClick?: EventHandler<ArcgisTicks["arcgisTickClick"]>;
118
124
  }
119
125
 
126
+ interface LuminaArcgisToolbar extends Partial<Pick<ArcgisToolbar, "layout" | "relativePosition" | "scale" | "toolbarKind" | "tooltipAppearance">>, h.JSX.HTMLAttributes<ArcgisToolbar> {
127
+ }
128
+
129
+ interface LuminaArcgisToolbarAction extends Partial<Pick<ArcgisToolbarAction, "active" | "appearance" | "disabled" | "icon" | "iconFlipRtl" | "indicator" | "kind" | "labelText" | "loading" | "textEnabled" | "tooltipText">>, h.JSX.HTMLAttributes<ArcgisToolbarAction> {
130
+ onarcgisRenderedActionChanged?: EventHandler<ArcgisToolbarAction["arcgisRenderedActionChanged"]>;
131
+ onarcgisToolbarItemSelected?: EventHandler<ArcgisToolbarAction["arcgisToolbarItemSelected"]>;
132
+ }
133
+
134
+ interface LuminaArcgisToolbarGroup extends Partial<Pick<ArcgisToolbarGroup, "preferEndSlot" | "priority">>, h.JSX.HTMLAttributes<ArcgisToolbarGroup> {
135
+ }
136
+
137
+ interface LuminaArcgisToolbarItem extends Partial<Pick<ArcgisToolbarItem, "active" | "disabled" | "icon" | "iconFlipRtl" | "labelText" | "lastActivated" | "loading" | "tooltipText">>, h.JSX.HTMLAttributes<ArcgisToolbarItem> {
138
+ onarcgisItemSelected?: EventHandler<ArcgisToolbarItem["arcgisItemSelected"]>;
139
+ }
140
+
141
+ interface LuminaArcgisToolbarMoreButton extends Partial<Pick<ArcgisToolbarMoreButton, "menuAppearance" | "overflowActionLabel" | "priority">>, h.JSX.HTMLAttributes<ArcgisToolbarMoreButton> {
142
+ }
143
+
144
+ interface LuminaArcgisToolbarSplitButton extends Partial<Pick<ArcgisToolbarSplitButton, "menuAppearance" | "overflowActionLabel" | "priority">>, h.JSX.HTMLAttributes<ArcgisToolbarSplitButton> {
145
+ }
146
+
120
147
  interface LuminaArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view" | "visualizationSource">>, h.JSX.HTMLAttributes<ArcgisUniqueValuesList> {
121
148
  onarcgisChange?: EventHandler<ArcgisUniqueValuesList["arcgisChange"]>;
122
149
  onarcgisLoad?: EventHandler<ArcgisUniqueValuesList["arcgisLoad"]>;
@@ -169,6 +196,12 @@ declare module "@arcgis/lumina" {
169
196
  "arcgis-slider-field": LuminaArcgisSliderField;
170
197
  "arcgis-slider-input": LuminaArcgisSliderInput;
171
198
  "arcgis-ticks": LuminaArcgisTicks;
199
+ "arcgis-toolbar": LuminaArcgisToolbar;
200
+ "arcgis-toolbar-action": LuminaArcgisToolbarAction;
201
+ "arcgis-toolbar-group": LuminaArcgisToolbarGroup;
202
+ "arcgis-toolbar-item": LuminaArcgisToolbarItem;
203
+ "arcgis-toolbar-more-button": LuminaArcgisToolbarMoreButton;
204
+ "arcgis-toolbar-split-button": LuminaArcgisToolbarSplitButton;
172
205
  "arcgis-unique-values-list": LuminaArcgisUniqueValuesList;
173
206
  "arcgis-value-picker": LuminaArcgisValuePicker;
174
207
  "arcgis-value-picker-collection": LuminaArcgisValuePickerCollection;
@@ -16,6 +16,12 @@ import type { ArcgisSlider } from "../components/arcgis-slider/customElement.js"
16
16
  import type { ArcgisSliderField } from "../components/arcgis-slider-field/customElement.js";
17
17
  import type { ArcgisSliderInput } from "../components/arcgis-slider-input/customElement.js";
18
18
  import type { ArcgisTicks } from "../components/arcgis-ticks/customElement.js";
19
+ import type { ArcgisToolbar } from "../components/arcgis-toolbar/customElement.js";
20
+ import type { ArcgisToolbarAction } from "../components/arcgis-toolbar-action/customElement.js";
21
+ import type { ArcgisToolbarGroup } from "../components/arcgis-toolbar-group/customElement.js";
22
+ import type { ArcgisToolbarItem } from "../components/arcgis-toolbar-item/customElement.js";
23
+ import type { ArcgisToolbarMoreButton } from "../components/arcgis-toolbar-more-button/customElement.js";
24
+ import type { ArcgisToolbarSplitButton } from "../components/arcgis-toolbar-split-button/customElement.js";
19
25
  import type { ArcgisUniqueValuesList } from "../components/arcgis-unique-values-list/customElement.js";
20
26
  import type { ArcgisValuePicker } from "../components/arcgis-value-picker/customElement.js";
21
27
  import type { ArcgisValuePickerCollection } from "../components/arcgis-value-picker-collection/customElement.js";
@@ -118,6 +124,27 @@ interface PreactArcgisTicks extends Partial<Pick<ArcgisTicks, "interactive" | "i
118
124
  onarcgisTickClick?: EventHandler<ArcgisTicks["arcgisTickClick"]>;
119
125
  }
120
126
 
127
+ interface PreactArcgisToolbar extends Partial<Pick<ArcgisToolbar, "layout" | "relativePosition" | "scale" | "toolbarKind" | "tooltipAppearance">>, HTMLAttributes<ArcgisToolbar> {
128
+ }
129
+
130
+ interface PreactArcgisToolbarAction extends Partial<Pick<ArcgisToolbarAction, "active" | "appearance" | "disabled" | "icon" | "iconFlipRtl" | "indicator" | "kind" | "labelText" | "loading" | "textEnabled" | "tooltipText">>, HTMLAttributes<ArcgisToolbarAction> {
131
+ onarcgisRenderedActionChanged?: EventHandler<ArcgisToolbarAction["arcgisRenderedActionChanged"]>;
132
+ onarcgisToolbarItemSelected?: EventHandler<ArcgisToolbarAction["arcgisToolbarItemSelected"]>;
133
+ }
134
+
135
+ interface PreactArcgisToolbarGroup extends Partial<Pick<ArcgisToolbarGroup, "preferEndSlot" | "priority">>, HTMLAttributes<ArcgisToolbarGroup> {
136
+ }
137
+
138
+ interface PreactArcgisToolbarItem extends Partial<Pick<ArcgisToolbarItem, "active" | "disabled" | "icon" | "iconFlipRtl" | "labelText" | "lastActivated" | "loading" | "tooltipText">>, HTMLAttributes<ArcgisToolbarItem> {
139
+ onarcgisItemSelected?: EventHandler<ArcgisToolbarItem["arcgisItemSelected"]>;
140
+ }
141
+
142
+ interface PreactArcgisToolbarMoreButton extends Partial<Pick<ArcgisToolbarMoreButton, "menuAppearance" | "overflowActionLabel" | "priority">>, HTMLAttributes<ArcgisToolbarMoreButton> {
143
+ }
144
+
145
+ interface PreactArcgisToolbarSplitButton extends Partial<Pick<ArcgisToolbarSplitButton, "menuAppearance" | "overflowActionLabel" | "priority">>, HTMLAttributes<ArcgisToolbarSplitButton> {
146
+ }
147
+
121
148
  interface PreactArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view" | "visualizationSource">>, HTMLAttributes<ArcgisUniqueValuesList> {
122
149
  onarcgisChange?: EventHandler<ArcgisUniqueValuesList["arcgisChange"]>;
123
150
  onarcgisLoad?: EventHandler<ArcgisUniqueValuesList["arcgisLoad"]>;
@@ -170,6 +197,12 @@ declare module 'preact' {
170
197
  "arcgis-slider-field": PreactArcgisSliderField;
171
198
  "arcgis-slider-input": PreactArcgisSliderInput;
172
199
  "arcgis-ticks": PreactArcgisTicks;
200
+ "arcgis-toolbar": PreactArcgisToolbar;
201
+ "arcgis-toolbar-action": PreactArcgisToolbarAction;
202
+ "arcgis-toolbar-group": PreactArcgisToolbarGroup;
203
+ "arcgis-toolbar-item": PreactArcgisToolbarItem;
204
+ "arcgis-toolbar-more-button": PreactArcgisToolbarMoreButton;
205
+ "arcgis-toolbar-split-button": PreactArcgisToolbarSplitButton;
173
206
  "arcgis-unique-values-list": PreactArcgisUniqueValuesList;
174
207
  "arcgis-value-picker": PreactArcgisValuePicker;
175
208
  "arcgis-value-picker-collection": PreactArcgisValuePickerCollection;
@@ -197,6 +230,12 @@ declare module 'preact' {
197
230
  "arcgis-slider-field": PreactArcgisSliderField;
198
231
  "arcgis-slider-input": PreactArcgisSliderInput;
199
232
  "arcgis-ticks": PreactArcgisTicks;
233
+ "arcgis-toolbar": PreactArcgisToolbar;
234
+ "arcgis-toolbar-action": PreactArcgisToolbarAction;
235
+ "arcgis-toolbar-group": PreactArcgisToolbarGroup;
236
+ "arcgis-toolbar-item": PreactArcgisToolbarItem;
237
+ "arcgis-toolbar-more-button": PreactArcgisToolbarMoreButton;
238
+ "arcgis-toolbar-split-button": PreactArcgisToolbarSplitButton;
200
239
  "arcgis-unique-values-list": PreactArcgisUniqueValuesList;
201
240
  "arcgis-value-picker": PreactArcgisValuePicker;
202
241
  "arcgis-value-picker-collection": PreactArcgisValuePickerCollection;
@@ -16,6 +16,12 @@ import type { ArcgisSlider } from "../components/arcgis-slider/customElement.js"
16
16
  import type { ArcgisSliderField } from "../components/arcgis-slider-field/customElement.js";
17
17
  import type { ArcgisSliderInput } from "../components/arcgis-slider-input/customElement.js";
18
18
  import type { ArcgisTicks } from "../components/arcgis-ticks/customElement.js";
19
+ import type { ArcgisToolbar } from "../components/arcgis-toolbar/customElement.js";
20
+ import type { ArcgisToolbarAction } from "../components/arcgis-toolbar-action/customElement.js";
21
+ import type { ArcgisToolbarGroup } from "../components/arcgis-toolbar-group/customElement.js";
22
+ import type { ArcgisToolbarItem } from "../components/arcgis-toolbar-item/customElement.js";
23
+ import type { ArcgisToolbarMoreButton } from "../components/arcgis-toolbar-more-button/customElement.js";
24
+ import type { ArcgisToolbarSplitButton } from "../components/arcgis-toolbar-split-button/customElement.js";
19
25
  import type { ArcgisUniqueValuesList } from "../components/arcgis-unique-values-list/customElement.js";
20
26
  import type { ArcgisValuePicker } from "../components/arcgis-value-picker/customElement.js";
21
27
  import type { ArcgisValuePickerCollection } from "../components/arcgis-value-picker-collection/customElement.js";
@@ -118,6 +124,27 @@ interface ReactArcgisTicks extends Partial<Pick<ArcgisTicks, "interactive" | "in
118
124
  onarcgisTickClick?: EventHandler<ArcgisTicks["arcgisTickClick"]>;
119
125
  }
120
126
 
127
+ interface ReactArcgisToolbar extends Partial<Pick<ArcgisToolbar, "layout" | "relativePosition" | "scale" | "toolbarKind" | "tooltipAppearance">>, HTMLProps<ArcgisToolbar> {
128
+ }
129
+
130
+ interface ReactArcgisToolbarAction extends Partial<Pick<ArcgisToolbarAction, "active" | "appearance" | "disabled" | "icon" | "iconFlipRtl" | "indicator" | "kind" | "labelText" | "loading" | "textEnabled" | "tooltipText">>, HTMLProps<ArcgisToolbarAction> {
131
+ onarcgisRenderedActionChanged?: EventHandler<ArcgisToolbarAction["arcgisRenderedActionChanged"]>;
132
+ onarcgisToolbarItemSelected?: EventHandler<ArcgisToolbarAction["arcgisToolbarItemSelected"]>;
133
+ }
134
+
135
+ interface ReactArcgisToolbarGroup extends Partial<Pick<ArcgisToolbarGroup, "preferEndSlot" | "priority">>, HTMLProps<ArcgisToolbarGroup> {
136
+ }
137
+
138
+ interface ReactArcgisToolbarItem extends Partial<Pick<ArcgisToolbarItem, "active" | "disabled" | "icon" | "iconFlipRtl" | "labelText" | "lastActivated" | "loading" | "tooltipText">>, HTMLProps<ArcgisToolbarItem> {
139
+ onarcgisItemSelected?: EventHandler<ArcgisToolbarItem["arcgisItemSelected"]>;
140
+ }
141
+
142
+ interface ReactArcgisToolbarMoreButton extends Partial<Pick<ArcgisToolbarMoreButton, "menuAppearance" | "overflowActionLabel" | "priority">>, HTMLProps<ArcgisToolbarMoreButton> {
143
+ }
144
+
145
+ interface ReactArcgisToolbarSplitButton extends Partial<Pick<ArcgisToolbarSplitButton, "menuAppearance" | "overflowActionLabel" | "priority">>, HTMLProps<ArcgisToolbarSplitButton> {
146
+ }
147
+
121
148
  interface ReactArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view" | "visualizationSource">>, HTMLProps<ArcgisUniqueValuesList> {
122
149
  onarcgisChange?: EventHandler<ArcgisUniqueValuesList["arcgisChange"]>;
123
150
  onarcgisLoad?: EventHandler<ArcgisUniqueValuesList["arcgisLoad"]>;
@@ -170,6 +197,12 @@ declare module "react" {
170
197
  "arcgis-slider-field": ReactArcgisSliderField;
171
198
  "arcgis-slider-input": ReactArcgisSliderInput;
172
199
  "arcgis-ticks": ReactArcgisTicks;
200
+ "arcgis-toolbar": ReactArcgisToolbar;
201
+ "arcgis-toolbar-action": ReactArcgisToolbarAction;
202
+ "arcgis-toolbar-group": ReactArcgisToolbarGroup;
203
+ "arcgis-toolbar-item": ReactArcgisToolbarItem;
204
+ "arcgis-toolbar-more-button": ReactArcgisToolbarMoreButton;
205
+ "arcgis-toolbar-split-button": ReactArcgisToolbarSplitButton;
173
206
  "arcgis-unique-values-list": ReactArcgisUniqueValuesList;
174
207
  "arcgis-value-picker": ReactArcgisValuePicker;
175
208
  "arcgis-value-picker-collection": ReactArcgisValuePickerCollection;
@@ -199,6 +232,12 @@ declare module "react/jsx-runtime" {
199
232
  "arcgis-slider-field": ReactArcgisSliderField;
200
233
  "arcgis-slider-input": ReactArcgisSliderInput;
201
234
  "arcgis-ticks": ReactArcgisTicks;
235
+ "arcgis-toolbar": ReactArcgisToolbar;
236
+ "arcgis-toolbar-action": ReactArcgisToolbarAction;
237
+ "arcgis-toolbar-group": ReactArcgisToolbarGroup;
238
+ "arcgis-toolbar-item": ReactArcgisToolbarItem;
239
+ "arcgis-toolbar-more-button": ReactArcgisToolbarMoreButton;
240
+ "arcgis-toolbar-split-button": ReactArcgisToolbarSplitButton;
202
241
  "arcgis-unique-values-list": ReactArcgisUniqueValuesList;
203
242
  "arcgis-value-picker": ReactArcgisValuePicker;
204
243
  "arcgis-value-picker-collection": ReactArcgisValuePickerCollection;
@@ -228,6 +267,12 @@ declare module "react/jsx-dev-runtime" {
228
267
  "arcgis-slider-field": ReactArcgisSliderField;
229
268
  "arcgis-slider-input": ReactArcgisSliderInput;
230
269
  "arcgis-ticks": ReactArcgisTicks;
270
+ "arcgis-toolbar": ReactArcgisToolbar;
271
+ "arcgis-toolbar-action": ReactArcgisToolbarAction;
272
+ "arcgis-toolbar-group": ReactArcgisToolbarGroup;
273
+ "arcgis-toolbar-item": ReactArcgisToolbarItem;
274
+ "arcgis-toolbar-more-button": ReactArcgisToolbarMoreButton;
275
+ "arcgis-toolbar-split-button": ReactArcgisToolbarSplitButton;
231
276
  "arcgis-unique-values-list": ReactArcgisUniqueValuesList;
232
277
  "arcgis-value-picker": ReactArcgisValuePicker;
233
278
  "arcgis-value-picker-collection": ReactArcgisValuePickerCollection;
@@ -16,6 +16,12 @@ import type { ArcgisSlider } from "../components/arcgis-slider/customElement.js"
16
16
  import type { ArcgisSliderField } from "../components/arcgis-slider-field/customElement.js";
17
17
  import type { ArcgisSliderInput } from "../components/arcgis-slider-input/customElement.js";
18
18
  import type { ArcgisTicks } from "../components/arcgis-ticks/customElement.js";
19
+ import type { ArcgisToolbar } from "../components/arcgis-toolbar/customElement.js";
20
+ import type { ArcgisToolbarAction } from "../components/arcgis-toolbar-action/customElement.js";
21
+ import type { ArcgisToolbarGroup } from "../components/arcgis-toolbar-group/customElement.js";
22
+ import type { ArcgisToolbarItem } from "../components/arcgis-toolbar-item/customElement.js";
23
+ import type { ArcgisToolbarMoreButton } from "../components/arcgis-toolbar-more-button/customElement.js";
24
+ import type { ArcgisToolbarSplitButton } from "../components/arcgis-toolbar-split-button/customElement.js";
19
25
  import type { ArcgisUniqueValuesList } from "../components/arcgis-unique-values-list/customElement.js";
20
26
  import type { ArcgisValuePicker } from "../components/arcgis-value-picker/customElement.js";
21
27
  import type { ArcgisValuePickerCollection } from "../components/arcgis-value-picker-collection/customElement.js";
@@ -118,6 +124,27 @@ interface StencilArcgisTicks extends Partial<Pick<ArcgisTicks, "interactive" | "
118
124
  onArcgisTickClick?: EventHandler<ArcgisTicks["arcgisTickClick"]>;
119
125
  }
120
126
 
127
+ interface StencilArcgisToolbar extends Partial<Pick<ArcgisToolbar, "layout" | "relativePosition" | "scale" | "toolbarKind" | "tooltipAppearance">>, StencilJsx.HTMLAttributes<ArcgisToolbar> {
128
+ }
129
+
130
+ interface StencilArcgisToolbarAction extends Partial<Pick<ArcgisToolbarAction, "active" | "appearance" | "disabled" | "icon" | "iconFlipRtl" | "indicator" | "kind" | "labelText" | "loading" | "textEnabled" | "tooltipText">>, StencilJsx.HTMLAttributes<ArcgisToolbarAction> {
131
+ onArcgisRenderedActionChanged?: EventHandler<ArcgisToolbarAction["arcgisRenderedActionChanged"]>;
132
+ onArcgisToolbarItemSelected?: EventHandler<ArcgisToolbarAction["arcgisToolbarItemSelected"]>;
133
+ }
134
+
135
+ interface StencilArcgisToolbarGroup extends Partial<Pick<ArcgisToolbarGroup, "preferEndSlot" | "priority">>, StencilJsx.HTMLAttributes<ArcgisToolbarGroup> {
136
+ }
137
+
138
+ interface StencilArcgisToolbarItem extends Partial<Pick<ArcgisToolbarItem, "active" | "disabled" | "icon" | "iconFlipRtl" | "labelText" | "lastActivated" | "loading" | "tooltipText">>, StencilJsx.HTMLAttributes<ArcgisToolbarItem> {
139
+ onArcgisItemSelected?: EventHandler<ArcgisToolbarItem["arcgisItemSelected"]>;
140
+ }
141
+
142
+ interface StencilArcgisToolbarMoreButton extends Partial<Pick<ArcgisToolbarMoreButton, "menuAppearance" | "overflowActionLabel" | "priority">>, StencilJsx.HTMLAttributes<ArcgisToolbarMoreButton> {
143
+ }
144
+
145
+ interface StencilArcgisToolbarSplitButton extends Partial<Pick<ArcgisToolbarSplitButton, "menuAppearance" | "overflowActionLabel" | "priority">>, StencilJsx.HTMLAttributes<ArcgisToolbarSplitButton> {
146
+ }
147
+
121
148
  interface StencilArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view" | "visualizationSource">>, StencilJsx.HTMLAttributes<ArcgisUniqueValuesList> {
122
149
  onArcgisChange?: EventHandler<ArcgisUniqueValuesList["arcgisChange"]>;
123
150
  onArcgisLoad?: EventHandler<ArcgisUniqueValuesList["arcgisLoad"]>;
@@ -168,6 +195,12 @@ interface ExposedElements {
168
195
  "arcgis-slider-field": StencilArcgisSliderField;
169
196
  "arcgis-slider-input": StencilArcgisSliderInput;
170
197
  "arcgis-ticks": StencilArcgisTicks;
198
+ "arcgis-toolbar": StencilArcgisToolbar;
199
+ "arcgis-toolbar-action": StencilArcgisToolbarAction;
200
+ "arcgis-toolbar-group": StencilArcgisToolbarGroup;
201
+ "arcgis-toolbar-item": StencilArcgisToolbarItem;
202
+ "arcgis-toolbar-more-button": StencilArcgisToolbarMoreButton;
203
+ "arcgis-toolbar-split-button": StencilArcgisToolbarSplitButton;
171
204
  "arcgis-unique-values-list": StencilArcgisUniqueValuesList;
172
205
  "arcgis-value-picker": StencilArcgisValuePicker;
173
206
  "arcgis-value-picker-collection": StencilArcgisValuePickerCollection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/common-components",
3
- "version": "5.2.0-next.65",
3
+ "version": "5.2.0-next.67",
4
4
  "description": "ArcGIS Maps SDK for JavaScript common components",
5
5
  "keywords": [
6
6
  "2D",
@@ -49,12 +49,12 @@
49
49
  "@lit/task": "^1.0.3",
50
50
  "lit": "^3.3.0",
51
51
  "tslib": "^2.8.1",
52
- "@arcgis/toolkit": "5.2.0-next.65",
53
- "@arcgis/lumina": "5.2.0-next.65"
52
+ "@arcgis/lumina": "5.2.0-next.67",
53
+ "@arcgis/toolkit": "5.2.0-next.67"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@arcgis/core": "^5.2.0-next",
57
- "@esri/calcite-components": "^5.1.1"
57
+ "@esri/calcite-components": "^5.2.0-next.43"
58
58
  },
59
59
  "css.customData": [
60
60
  "dist/docs/vscode.css-custom-data.json"
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as m}from"./BMAH7QBK.js";import{c as d}from"./DWUHV2MR.js";import{b as r}from"./TWW63D32.js";import{D as o,E as h,G as a,J as c,h as n,j as s,s as i}from"./PECTYCLV.js";var u=n`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]) slot{min-inline-size:300px;min-block-size:48px}:host([layout="vertical"]) slot{min-inline-size:300px;min-block-size:144px}slot{display:flex}slot.empty{display:none}.container{display:flex;flex-direction:column;background-color:var(--calcite-color-foreground-1)}.root{display:flex;flex-direction:row;align-items:stretch}calcite-action{width:var(--calcite-font-line-height-fixed-4xl);height:var(--calcite-font-line-height-fixed-4xl)}calcite-action-bar{--calcite-action-bar-items-space: var(--calcite-space-none);--calcite-spacing-sm: var(--calcite-space-none);background-color:var(--calcite-color-foreground-1)}.separator{border-inline-end:solid 1px var(--calcite-color-border-3);width:1px}`,l=class extends o{constructor(){super(),this.messages=m({blocking:!0}),this._isPlaying=!1,this.autoDestroyDisabled=!1,this.disabled=!1,this.hideNextButton=!1,this.hidePlayButton=!1,this.hidePreviousButton=!1,this.icon="list-rectangle",this.label="",this.layout="horizontal",this.loop=!1,this.playRate=1e3,this.arcgisPropertyChange=d()("layout","loop","playRate","state"),this.arcgisAnimate=i(),this.arcgisNext=i(),this.arcgisPrevious=i(),this.arcgisPlay=i(),this.arcgisPause=i(),this.arcgisSlottedElementChange=i(),this.listen("arcgisPropertyChange",()=>this.requestUpdate())}static{this.properties={_isPlaying:16,_slottedElement:16,autoDestroyDisabled:5,disabled:5,hideNextButton:5,hidePlayButton:5,hidePreviousButton:5,icon:1,label:1,layout:3,loop:5,playRate:9,state:32}}static{this.styles=u}get state(){return this._isPlaying?"playing":"ready"}async destroy(){await this.manager.destroy()}next(){this.arcgisNext.emit(),this._slottedElement?.canNext&&this._slottedElement.step("next")}pause(){this._isPlaying=!1,this.arcgisPause.emit()}play(){this._isPlaying||(this._isPlaying=!0,this.arcgisPlay.emit(),this._startPlayRate(!0))}previous(){this.arcgisPrevious.emit(),this._slottedElement?.canPrevious&&this._slottedElement.step("previous")}disconnectedCallback(){super.disconnectedCallback(),this._isPlaying&&this.pause()}willUpdate(t){t.has("layout")&&this._isElementWithLayout(this._slottedElement)&&(this._slottedElement.layout=this.layout),t.has("disabled")&&this._isElementWithDisabled(this._slottedElement)&&(this._slottedElement.disabled=this.disabled)}_handleSlotChange(t){let[e]=r(t);this._slottedElement=e,this.arcgisSlottedElementChange.emit({slottedElement:e}),!e&&this._isPlaying&&this.pause(),this._isElementWithLayout(e)&&(e.layout=this.layout),this._isElementWithDisabled(e)&&(e.disabled=this.disabled),this._isElementWithComponentOnReady(e)&&e.componentOnReady().then(()=>{this._slottedElement===e&&this.requestUpdate()})}_isElementWithComponentOnReady(t){return!!t&&"componentOnReady"in t}_isElementWithLayout(t){return!!t&&"layout"in t}_isElementWithDisabled(t){return!!t&&"disabled"in t}_startPlayRate(t){setTimeout(()=>{if(this._isPlaying){if(!this._slottedElement?.canNext&&this.loop)this._slottedElement?.reset();else if(this._slottedElement?.step("next"),this._slottedElement&&!this._slottedElement?.canNext&&!this.loop){this.pause();return}this.arcgisAnimate.emit({first:t}),this._startPlayRate(!1)}},this.playRate)}render(){let t=!!this._slottedElement&&!this._slottedElement.hidden,e=this.state==="playing";return s`<div class="container"><div class="root"><calcite-action-bar expand-disabled .layout=${this.layout}>${!this.hidePlayButton&&s`<calcite-action alignment=center .disabled=${this.disabled||this._slottedElement&&!this._slottedElement.canPlay} .icon=${e?"pause":"play"} .text=${e?this.messages.pause:this.messages.play} title=${(e?this.messages.pause:this.messages.play)??a} @click=${()=>{if(this._slottedElement&&!this._slottedElement.canNext&&!this.loop){this._slottedElement.reset(),this.play();return}e?this.pause():this.play()}}></calcite-action>`||""}${!this.hidePreviousButton&&s`<calcite-action alignment=center .disabled=${this.disabled||e||this._slottedElement&&!this._slottedElement.canPrevious} .icon=${this.layout==="horizontal"?"chevron-left":"chevron-up"} .text=${this.messages.previous} title=${this.messages.previous??a} @click=${this.previous}></calcite-action>`||""}${!this.hideNextButton&&s`<calcite-action alignment=center .disabled=${this.disabled||e||this._slottedElement&&!this._slottedElement.canNext} .icon=${this.layout==="horizontal"?"chevron-right":"chevron-down"} .text=${this.messages.next} title=${this.messages.next??a} @click=${this.next}></calcite-action>`||""}</calcite-action-bar>${t&&s`<div class="separator"></div>`||""}<slot @slotchange=${({currentTarget:p})=>{this._handleSlotChange(p)}} class=${h(t?"component-slot":"empty")}></slot></div></div>`}};c("arcgis-value-picker",l);export{l as ArcgisValuePicker};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{d as A,g as N}from"./TWW63D32.js";import{a as x,b as C,c as L,d as f,e as m,f as P,g as O,n as g,q as v,r as w,t as $}from"./PECTYCLV.js";var _=t=>(...s)=>{let o=m(),e=new t(...s),r=e.exports;f(o.at(-1));let n=e.component.manager;n.W(e,r),e.watchExports(n.W.bind(n,e)),P(e);let a=[e.component,...o].reverse();return v(a,i=>i===void 0?void 0:M(e,i,r),r)},M=(t,{host:s,key:o,isReactive:e},r)=>{let n=s,a=n[o]!==t.exports,i=n[o]!==r,c=r!==t.exports;if(a&&!i&&c&&(n[o]=t.exports),s===t.component){if(e){let l=t.component.manager;i&&l.W(t,n[o]),t.onUpdate(u=>{if(u.has(o)){let y=n[o];y!==t.exports&&l.W(t,y)}})}t.O=e?void 0:o}let d=t.component.constructor.elementProperties.get(o)?.readOnly;t.watchExports(()=>{n[o]!==t.exports&&(d?O(()=>{n[o]=t.exports}):n[o]=t.exports)})};var b=t=>{let s=N(t,"lang",globalThis.navigator?.language||h);return{lang:s,t9nLocale:k(s)}},D=(t,s,o,e)=>{let r,n=()=>S(t,s(),e).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&o(a),r=a}).catch(a=>{g("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),A(t,["lang"],n)},S=async(t,s,o=t.localName.split("-").slice(1).join("-"))=>{let{lang:e,t9nLocale:r}=b(t),n=`${s}/${o}/t9n`,i=o===null?{}:await W(r,n,"messages.");return{lang:e,t9nLocale:r,t9nStrings:i}};var T="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),U=new Set(T),h="en",F={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},W=async(t,s,o="")=>{let e=`${s}/${o}`,r=`${e}${t}.json`;return j[r]??=V(t,e),await j[r]},j={},V=async(t,s)=>{let o=`${s}${t}.json`;try{let e=await fetch(o);if(e.ok)return await e.json()}catch(e){return g("error","intl",`An unknown error occurred while fetching localization strings at ${o}`,{detail:{error:e}}),{}}return t===h?{}:await V(h,s)},k=t=>{let[s,o]=t.split("-"),e=s.toLowerCase(),r=e;return o&&(r=`${e}-${o.toUpperCase()}`),r=F[r]??r,U.has(r)?r:o?k(e):h};var K=t=>q(void 0,t);var E=class extends ${constructor(s,o){super(s);let e=this.exports;try{C(this.component);let r=o(this.component,this),n=this.exports!==e;if(x(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},q=_(E);var nt=t=>(s={})=>K((o,e)=>{let r=b(o.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=o;e.onLifecycle(()=>D(o.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:d})=>{let l={...p,_lang:d,_t9nLocale:c,_loading:!1};e.exports=l;let u=p.componentLabel;typeof u=="string"&&"label"in o&&o.label==null&&(o.label??=u),i(a.messageOverrides)},s.name));let i=c=>{let p=e.exports,d=p._original??p,l=z(d,c);c&&(l._original=d),e.exports=l};return"messageOverrides"in a&&e.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(e.setProvisionalExports(n,!1),e.ready):n}),z=(t,s)=>{if(!s)return t;let o={...t};return Object.entries(s).forEach(([e,r])=>{t[e]!==void 0&&(typeof r=="object"?o[e]=z(t[e],r):o[e]=r??t[e])}),o},at=t=>I,R="arcgisPropertyChange",I=(...t)=>{let s=L(),o=w(R,void 0,s),e=!0;return s.manager.onUpdated(r=>{if(e||!s.el.isConnected){e=!1;return}for(let n of t)r.has(n)&&o.emit({name:n})}),o};export{_ as a,nt as b,at as c};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as u}from"./Y5Y7IXOV.js";import{a as x,b}from"./XRQOTHR7.js";import{a as L}from"./BMAH7QBK.js";import"./DWUHV2MR.js";import"./TWW63D32.js";import{a as k}from"./TJ7PO6GP.js";import{B as r,C as d,D as y,E as v,F as g,G as h,H as C,J as S,h as w,j as l,n as m,o as $,s as a}from"./PECTYCLV.js";var n=new Map;n.set("oid","key");n.set("guid","key");n.set("global-id","key");n.set("blob","binary");n.set("integer","integer");n.set("small-integer","integer");n.set("big-integer","integer");n.set("single","number");n.set("double","number");n.set("long","number");n.set("number","number");n.set("date","date-time");n.set("date-only","calendar");n.set("time-only","clock");n.set("timestamp-offset","time-zone");n.set("string","string");var B=({fieldType:F})=>l`<calcite-icon scale=s .icon=${n.get(F)}></calcite-icon>`,E=w`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,f=class extends y{constructor(){super(...arguments),this._messages=L({blocking:!0}),this.popoverNode=r(),this.listNode=r(),this.flowElement=r(),this.panelElement=r(),this.dropdownNode=r(),this.fieldInfoFlowItemEl=r(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this._propWatcherTask=new x(this,{task:async([e])=>{if(!this.listOnly&&!b(e?.refElement))throw m("error",this,$("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=a(),this.arcgisClose=a(),this.arcgisFieldPickListChange=a(),this.arcgisFieldPickListDismissed=a(),this.arcgisFieldPickListSortByChange=a(),this.arcgisSortByChange=a(),this.arcgisEditField=a(),this.arcgisDeleteField=a()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=E}async reposition(){await this.popoverNode.value?.reposition()}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,m("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists()}willUpdate(e){(e.has("fields")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&this.updateGroupedLists()}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listNode.value?.getBoundingClientRect();t&&(this.listNode.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],i=t.filter(s=>s.type==="none");return t=t.filter(s=>s.type!=="none"),this.lastSortBy==="display"?t.sort((s,o)=>s.alias.localeCompare(o.alias)):this.lastSortBy==="field"?t.sort((s,o)=>s.name.localeCompare(o.name)):this.lastSortBy==="type"&&t.sort((s,o)=>s.type.localeCompare(o.type)),t=t.concat(i),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(u.expression)}canDeselectAll(){let e=this.getAllFields();return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(u.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],this.usingCustomGroups())for(let e of this.fields)this.allLists.push({title:e.title,fields:[...this.getSortedList(e.fields)]});else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:[...this.getSortedList(this.fields)]}]}addFieldInfoFlowItem(e,t){let i=this.flowElement.value,s=C(l`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${g(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${o=>{o.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${d(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??h} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);i.appendChild(s),this.panelElement.value.selected=!1,this.fieldInfoFlowItemEl?.value.setFocus()}usingCustomGroups(){return!!this.fields.length&&"fields"in this.fields[0]}getAllFields(){return this.allLists.map(e=>e.fields).flat()}setSortBy(e){this.lastSortBy=e,this.updateGroupedLists(),this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy),this.reorderSelectedFieldsByCurrentListOrder()&&(this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}))}reorderSelectedFieldsByCurrentListOrder(){if(!this.selectedFields.length)return!1;let e=this.getAllFields().map(o=>o.name),t=new Set(this.selectedFields),i=e.filter(o=>t.has(o)),s=i.length!==this.selectedFields.length||i.some((o,p)=>o!==this.selectedFields[p]);return s&&(this.selectedFields=[...i]),s}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),l`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${d(this.popoverNode)}><calcite-flow style=${g({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${d(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${d(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple||!this.hideCancel)&&l`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?l`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:l`${this.renderAddButton()}${this.renderCancelButton()}`}</div>`||""}</calcite-flow-item></calcite-flow></calcite-popover>`},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.getAllFields(),i=t.length>=this.showFilterLength;return l`${t.length?l`<calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} class=${v(this.listOnly?"":"content")} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>{let s=this.listNode.value.selectedItems.map(c=>c.value),o=this.selectedFields.filter(c=>s.includes(c)),p=s.filter(c=>!this.selectedFields.includes(c));this.selectedFields=[...new Set([...o,...p])],this.reorderSelectedFieldsByCurrentListOrder(),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}} @calciteListFilter=${s=>{s.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(o=>o.value),this.filterText=this.listNode.value.filterText}} ${d(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple&&this.showSelectionAll&&(!i||!this.filterText||this.filterFields?.length)?this.renderSelectionButton():null}${this.renderListItems()}</calcite-list>`:l`<slot name=no-fields></slot>`}${this.filterFields&&!this.filterFields.length&&this.listNode.value&&this.filterNoResultsText?.length!==0?l`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSortButton(){let e=this.getAllFields();if(!(e.length>=this.showFilterLength&&!this.hideSort))return"";let t=e.every(i=>!!i.type);return l`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed .disabled=${this.filterFields?this.filterFields.length<4:!1} @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${d(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??h}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @calciteDropdownItemSelect=${()=>this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @calciteDropdownItemSelect=${()=>this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${t&&l`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @calciteDropdownItemSelect=${()=>this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @calciteDropdownItemSelect=${()=>this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return l`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=this.getAllFields();this.selectedFields=e.map(t=>t.name)}this.reorderSelectedFieldsByCurrentListOrder(),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderListItems(){let e=this.allLists.filter(t=>!!t.fields.length);return e.length===1&&!e[0].title?e[0].fields.map(t=>this.renderCalciteListItem(t)):e.map(t=>l`<calcite-list-item-group .heading=${t.title}>${t.fields.map(i=>this.renderCalciteListItem(i))}</calcite-list-item-group>`)}renderCalciteListItem(e){let t=this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return k(e.name,l`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&l`<div slot=actions-end class="field-icons">${B({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:i}=this;return t?l`<calcite-action slot=actions-end .text=${i.info} title=${i.info??h} scale=s icon=information @click=${s=>{s.stopPropagation();let o=s.currentTarget;this.addFieldInfoFlowItem(e,o)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?l`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??h} scale=s icon=pencil @click=${i=>{i.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?l`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??h} scale=s icon=trash @click=${i=>{i.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){return this.multiple?l`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`:""}renderCancelButton(){return this.hideCancel?"":l`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};S("arcgis-field-pick-list",f);export{f as ArcgisFieldPickList};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{e as V,g as D,o as T,p as S}from"./Z5QBBHLD.js";import{a as M,b as p,c as E}from"./XRQOTHR7.js";import{a as A}from"./BMAH7QBK.js";import"./DWUHV2MR.js";import"./TWW63D32.js";import{a as z}from"./TJ7PO6GP.js";import{B,C as x,D as C,J as _,h as R,j as b,n as N,o as F,s as I}from"./PECTYCLV.js";export default $arcgis.t(([{formatDate:Z,convertDateFormatToIntlOptions:y,formatDateOnly:te,formatTimeOnly:ie,formatTimestamp:W,formatNumber:se},ne,{clone:L}])=>{function P(i){return new Date(`1970-01-01T${i}Z`).getTime()}function H(i){return new Date(`${i} 00:00:00`).getTime()}function ae(i,e,s){let t;return e==="unknown"?t=Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=Z(i,{...y("short-date-short-time"),timeZone:e}),t}function oe(i){return i?te(i,y("short-date")):""}function le(i){let e;return typeof i=="string"?e=ie(i,y("short-date-long-time")):e=Z(i,{...y("long-time"),timeZone:"utc"}),e}function re(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?W(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):W(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):Z(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function j(i,e,s){if(!V(i)&&!S(i)&&!T(i)&&!D(i))return;let t;return E(i,s).fields.forEach(l=>{let n=l.name,d="domain"in l?l.domain:void 0;if(!D(i)&&i.subtypeField===n){let m;T(i)||V(i)?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{S(i)&&i.subtypeCode!==r.code||(e.name===n&&(t=t||[],t.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(a=>{if(e.name===a){let o=r.domains[a];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===n&&(V(i)||D(i))){let m=V(i)?i.typeIdField:void 0,r=V(i)?i.types:void 0;V(i)&&m&&r?(m===n?t=r.map(a=>({code:a.id,name:a.name})):(t=t||[],r.forEach(a=>{if(!a.domains?.[n]||a.domains[n].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(L(u))})}else a.domains?.[n]?.codedValues&&a.domains[n].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(L(o))})})),!t?.length&&d?.codedValues&&(t=L(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function U(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let n=s[l];n.code==i&&(t+=(t.length?" | ":"")+n.name)}return t.length||(t=`${i}`),t}return i}function G(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function J(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var ue=R`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,k=class extends C{constructor(){super(...arguments),this.dropdownNode=B(),this._messages=A({blocking:!0}),this._propWatcherTask=new M(this,{task:async([e,s,t])=>{let l=p(e)&&p(s)||p(t);if(!p(t)&&!p(e)&&!p(s)?N("error",this,F("uniqueValues")):p(t)||(p(e)||N("error",this,F("layer")),p(s)||N("error",this,F("fieldName"))),p(e)&&p(s)){let{visualizationSource:n}=this;if(!E(e,n).fields?.filter(d=>d.name===s))throw N("error",this,"Field could not be found."),new Error}if(!l)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=I(),this.arcgisSortByChange=I(),this.arcgisLoad=I()}static{this.properties={initialRender:16,view:0,layer:0,visualizationSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ue}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(p(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:t}=e;return{uniqueValues:s,partialUniqueValues:t}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,n=(e?E(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(p(this.uniqueValues))this.fieldInfo={layerField:n,fieldDomains:e&&n?j(e,n,l):void 0,simpleType:e&&n?J(n):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&n){this.fieldInfo={layerField:n,fieldDomains:j(e,n,l),simpleType:J(n),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ne({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=G(n),a=m.uniqueValueInfos.filter(o=>p(o.value)?n.type==="string"&&!r||n.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(G(n)||n.type,o.value!=="<Null>"&&o.value!==""):!1);a.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{a.find(u=>u.value===o.code)||a.push({value:o.code,count:0})}),d.uniqueValueInfos=a,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(N("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(a=>{r.find(o=>o.value===a.code)||r.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:s}=this;this.listNode=e,s&&e?.setAttribute("style",`max-height: ${s||400}px`)}onSortMenuSelect(e){let s=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=s||void 0,this.arcgisSortByChange.emit(s||void 0)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==s[t])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:t,multiple:l,initialRender:n,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:a,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!a?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,K=c?["date","date-only","time-only"].includes(c):!1,Q=v=>{v.sort((h,f)=>h.count<=f.count?1:-1)},X=v=>{let h=r?.length;v.sort((f,$)=>{if(!h&&g)return(typeof f.value=="string"?Number.parseFloat(f.value):f.value)-(typeof $.value=="string"?Number.parseFloat($.value):$.value);{let w=h?U(f.value,r):f.label??f.value,q=h?U($.value,r):$.label??$.value;return`${w}`.startsWith("_")?1:`${q}`.startsWith("_")?-1:`${w}`.localeCompare(`${q}`)}})},Y=(v,h)=>{v.sort((f,$)=>{let w=h?.indexOf(f.value)??-1,q=h?.indexOf($.value)??-1;return w===q||w>-1&&q>-1?0:w>q?-1:1})};X(a),!t||t==="count"?Q(a):t==="selected"&&Y(a,s);let ee=a.map(v=>this.renderUniqueValue(v)),O;return o&&!n&&(O=b`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),b`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${a.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${v=>{let h=v.currentTarget.selectedItems.map(f=>f.value);!r&&c==="date-only"?h=h?.map(f=>H(f)):!r&&c==="time-only"?h=h?.map(f=>P(f)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(f=>Number.parseInt(f)):c&&["single","double"].includes(c)&&(h=h?.map(f=>Number.parseFloat(f))),!this.isSameLists(h,this.selectedValues)&&(this.selectedValues=h,this.arcgisChange.emit(h))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${x(this.setListRef)}>${a.length>=d&&!n?this.renderSort(g,K):null}${ee}</calcite-list>${O}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return b`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${x(this.dropdownNode)}><calcite-action slot=trigger .label=${l.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t==="count"||!p(t)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:t,view:l,fieldInfo:n,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:a}=n,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?U(e.value,m):a==="date"?ae(e.value,o):a==="date-only"?oe(e.value):a==="time-only"?le(e.value):a==="timestamp-offset"?re(e.value,l):typeof e.value=="number"?se(e.value,d):e.label??e.value,c=s?a==="date-only"?s.includes(m?.length?e.value:H(e.value)):a==="time-only"?s.includes(m?.length?e.value:P(e.value)):s.includes(e.value):!1;return z(`list-item_${e.value}`,b`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${p(e.count)&&(r.length>200&&!t||r.length<=200)?b`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};_("arcgis-unique-values-list",k);return k},"intl","smartMapping/statistics/uniqueValues","core/lang")
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as x,b as j,c as k,d as R,e as v,f as z,g as b,h as y,i as B,j as K,k as I,l as P,m as F,n as X,o as Y,p as E,q as w,r as $,s as L}from"./Z5QBBHLD.js";import{a as J,b as p}from"./XRQOTHR7.js";import{a as Q}from"./BMAH7QBK.js";import"./DWUHV2MR.js";import"./TWW63D32.js";import{a as S}from"./TJ7PO6GP.js";import{C as V,D as U,E as N,J as G,h as H,j as d,n as _,o as C,s as D}from"./PECTYCLV.js";export default $arcgis.t(([se,O,f,M,q,ae,re,ee,ne])=>{function oe(a){return a.associatedLayer?.url}var le={dateStyle:"short",timeStyle:"short"},de={timeStyle:"medium"};function ue(a){let{layer:e,fieldName:t}=a,i,r=M.supportsFieldConfiguration(e),s;"popupTemplate"in e&&(s=e.popupTemplate);let n=s?s.fieldInfos:[];return ie(a)?.filter(l=>l.name===t).forEach(l=>{let u=!r&&n?n.filter(m=>m.fieldName===l.name):void 0,c=r?e.getFieldAlias(t):u?.length?u[0].label:l.alias;/^raster.(item|service)pixelvalue/iu.test(t)&&(l.type="double");let o={layerField:l,label:c||l.name};o.codedValues=fe(t,a),pe(o),o.simpleFieldType&&(i=o)}),i}function ie(a){let{layer:e}=a;return y(e)||$(e)||b(e)&&e.rasterFields.length?e.rasterFields:e.fields}async function te(a){a.statisticsStatus="in-progress";let{layer:e,view:t}=a;if(y(e)||$(e)||F(e)||w(e))throw new Error("could not get feature count");try{return await ge(e,t)}catch{return}}async function ce(a){let{layer:e,view:t,fieldName:i,fieldInfo:r}=a;if(y(e)||$(e)||w(e))throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");if(!r||r.layerField.type==="oid"||r.layerField.type==="guid"||r.layerField.type==="global-id")return{totalCount:await te(a),nullcount:0};try{let s=await ae({layer:e,view:t,field:i,outStatisticTypes:{exclude:["median"]}});if(!p(s.count))throw new Error("could not get statistics");let n="sourceJSON"in e&&e.sourceJSON.maxRecordCount===s.count;if(p(s.nullcount)&&!n)return{...s,totalCount:s.count+s.nullcount};{let l=await te(a);return{...s,totalCount:l}}}catch{throw new Error("could not get statistics")}}async function me(a){let{layer:e,view:t,fieldName:i}=a;if(y(e)||$(e)||w(e))throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");R(e)&&(e.outFields=["*"]);try{return await re({layer:e,view:t,field:i})}catch{throw new Error("could not get unique values")}}function pe(a){switch(a.layerField.type){case"string":a.simpleFieldType="string";break;case"date":a.simpleFieldType="date";break;case"timestamp-offset":a.simpleFieldType="timestamp-offset";break;case"date-only":a.simpleFieldType="date-only";break;case"time-only":a.simpleFieldType="time-only";break;case"oid":a.simpleFieldType="oid";break;case"guid":case"global-id":a.simpleFieldType="guid";break;case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":a.simpleFieldType="number";break;default:a.simpleFieldType="string"}}function fe(a,e){let{layer:t}=e;if(E(t)&&t.subtypeField===a){let u=t.parent?.subtypes?.find(c=>c.code===t.subtypeCode);if(u)return[new ee({code:u.code,name:u.name})]}if(!v(t)&&!b(t))return;let i=v(t)?t.typeIdField:void 0,r=v(t)?t.types:void 0,s,n=ie(e)?.find(u=>u.name===a),l=n?.domain;return v(t)&&i&&r?(i===a?s=r.map(u=>new ee({code:u.id,name:u.name})):(s=[],r.forEach(u=>{if(!u.domains[a]||u.domains[a].type==="inherited"){let c=l;c?.codedValues&&c.codedValues.forEach(o=>{let m=!1;s.forEach(g=>{g.code===o.code&&(m=!0,`, ${g.name},`.includes(`, ${o.name},`)||(g.name+=`, ${o.name}`))}),m||s.push(q.clone(o))})}else u.domains[a].codedValues&&u.domains[a].codedValues.forEach(c=>{let o=!1;s.forEach(m=>{m.code===c.code&&(o=!0,`, ${m.name},`.includes(`, ${c.name},`)||(m.name+=`, ${c.name}`))}),o||s.push(q.clone(c))})})),!s.length&&l?.codedValues&&(s=q.clone(l.codedValues))):l?.codedValues&&(s=n?.domain?.codedValues),s?.length?s:void 0}async function he(a){let{view:e,layer:t}=a;if(b(t)||y(t)||$(t))throw new Error("could not get feature");if(v(t)&&!t.url||L(t)){let i=t.createQuery();i.start=0,i.num=5,i.outFields=["*"];let r=await t.queryFeatures(i);if(r.features.length)return r;throw new Error("could not get feature")}else{if(!e)return await A(a);let i;if(E(t)||X(t)){let s=t.parent;for(;Y(s)||K(s);)s=s.parent;B(s)&&(i=await e.whenLayerView(s))}else i=await e.whenLayerView(t);let r=i.availableFields.length===t.fields.length;if(i&&(r||(F(t)||I(t))&&i.availableFields.length>0)){let s=i.createQuery();s.start=0,s.num=5,s.outFields=["*"];let n=await i.queryFeatures(s);return n.features?.length?n:await A(a)}else return await A(a)}}async function A(a){let{layer:e}=a;if(b(e)||y(e)||F(e)||I(e))throw new Error("cannot get feature from service");let t=new ne({where:"1=1",outFields:["*"],returnGeometry:!1});return"sourceJSON"in e&&e.sourceJSON?.advancedQueryCapabilities?.supportsPagination&&(t.num=1),await e.queryFeatures(t)}async function ge(a,e){if(R(a))return await ve(a);if(v(a)||j(a)||P(a)||L(a)||z(a))return await a.queryFeatureCount();if(e&&(F(a)||I(a)))return await ye(a,e)}async function ve(a){let e=a.createQuery();e.outFields=["*"];let t=await a.queryFeatures(e);if(t.features.length)return t.features.length;throw new Error("could not get feature count")}async function ye(a,e){return await(await e.whenLayerView(a)).queryFeatureCount()}var Fe=H`: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}`,Z=class extends U{constructor(){super(...arguments),this._messages=Q({blocking:!0}),this.initialized=!1,this._propWatcherTask=new J(this,{task:async([e,t])=>{let i=p(e)&&p(t);if(p(e)||_("error",this,C("layer")),p(t)||_("error",this,C("fieldName")),!i)throw new Error;await this.processProps(),this._propWatcherTask.autoRun=!1},args:()=>[this.layer,this.fieldName]}),this.oneFeatureResponseStatus="missing",this.statisticsStatus="missing",this.uniqueValuesStatus="missing",this.hideAlias=!1,this.hideNumericFormat=!1,this.hideStatistics=!1,this.arcgisComplete=D(),this.arcgisFieldInfoComplete=D()}static{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}}static{this.styles=Fe}async refresh(){await this.processProps(),this.requestUpdate()}async willUpdate(e){this.initialized&&(e.has("fieldName")||e.has("layer"))&&await this.processProps()}disconnectedCallback(){super.disconnectedCallback(),this.timeZoneHandle?.remove()}async processProps(){let{view:e,layer:t,fieldName:i,hideStatistics:r}=this;if(!t||!i)return;let s;if(t.declaredClass==="esri.layers.support.Sublayer"){let n=t;e&&await O.whenOnce(()=>!e.updating),s=await n.createFeatureLayer(),await s?.load()}if(this.oneFeatureResponseStatus="missing",this.oneFeatureResponse=void 0,this.statisticsStatus="missing",this.statistics=void 0,this.uniqueValuesStatus="missing",this.uniqueValues=void 0,this.props={view:e,layer:s??t,fieldName:i,hideStatistics:r},this.props.fieldInfo=ue(this.props),!this.props.fieldInfo){_("error",this,`Field ${i} does not exist in layer.`);return}P(t)&&se.request.interceptors?.push({urls:`${oe(t)}/${t.layerId}`,before(n){n.requestOptions.authMode="no-prompt"}}),this.processPropsPart2()}async processPropsPart2(){let{layer:e,hideStatistics:t}=this;if(await this.requestOneFeature(),F(e)||x(e)||k(e)){this.uniqueValuesStatus="failed",this.statisticsStatus="failed";return}t?this.uniqueValuesStatus="failed":await this.requestUniqueValues(),t?this.statisticsStatus="failed":await this.requestStatistics(),this.setUpTimeZoneHandle(),this.initialized=!0}async requestOneFeature(){this.oneFeatureResponseStatus="in-progress";try{let e=await he(this.props);this.oneFeatureResponse=e,this.oneFeatureResponseStatus="success"}catch{this.oneFeatureResponseStatus="failed"}}async requestUniqueValues(){return this.uniqueValuesStatus="in-progress",await new Promise(async e=>{try{let t=await me(this.props);this.uniqueValues=t,t?.uniqueValueInfos?.length?this.uniqueValuesStatus="success":this.uniqueValuesStatus="failed"}catch{this.uniqueValuesStatus="failed"}finally{e()}})}async requestStatistics(){return await new Promise(async e=>{try{let t=await ce(this.props);if(!p(t.totalCount)&&p(t.count)&&this.uniqueValuesStatus==="success"){let i=this.uniqueValues?.uniqueValueInfos??[];for(let r=0;r<i.length;r++){let s=i[r];if(s.value===null){t.totalCount=s.count+t.count;break}}t.totalCount??=t.count}this.statistics=t,this.statisticsStatus="success"}catch{this.statisticsStatus="failed"}finally{e()}})}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{props:e}=this,{view:t,fieldInfo:i}=e;["date","timestamp-offset"].includes(this._getStatisticsType(i))&&(this.timeZoneHandle=O.watch(()=>t?.timeZone,()=>{this.requestUpdate()}))}_getFieldTypeLabel(e){let{_messages:t}=this,i=t.fieldTypes;switch(e){case"big-integer":return i.bigInteger;case"date":return i.date;case"date-only":return i.dateOnly;case"double":return i.double;case"global-id":return i.globalId;case"guid":return i.guid;case"integer":return i.integer;case"long":return i.long;case"oid":return i.oid;case"single":return i.single;case"small-integer":return i.smallInteger;case"string":return i.string;case"time-only":return i.timeOnly;case"timestamp-offset":return i.timestampOffset;default:return i.string}}_getStatisticsType(e){switch(e.layerField.type){case"big-integer":case"double":case"integer":case"single":case"small-integer":{if(e.codedValues)return"string";switch(e.layerField.valueType){case"url":case"binary":case"description":case"location-or-place-name":case"name-or-title":case"ordered-or-ranked":case"type-or-category":return"string";default:return"number"}}case"date":return"date";case"date-only":return"date-only";case"string":return"string";case"time-only":return"time-only";case"timestamp-offset":return"timestamp-offset";default:return"string"}}_getFieldValueTypeCamelCase(e){switch(e.layerField.valueType){case"count-or-amount":return"countOrAmount";case"date-and-time":return"dateAndTime";case"location-or-place-name":return"locationOrPlaceName";case"name-or-title":return"nameOrTitle";case"ordered-or-ranked":return"orderedOrRanked";case"percentage-or-ratio":return"percentageOrRatio";case"type-or-category":return"typeOrCategory";case"unique-identifier":return"uniqueIdentifier";case"phone-number":return"phoneNumber";case"email-address":return"emailAddress";default:return e.layerField.valueType??void 0}}_getDisplayString(e,t){let{props:i}=this,{fieldInfo:r}=i;switch(r.simpleFieldType){case"date":return this._getDateString(e,t);case"date-only":return this._getDateOnlyString(e,t);case"guid":return this._getGuidString(e);case"number":return this._getNumberString(e,t);case"time-only":return this._getTimeOnlyString(e,t);case"timestamp-offset":return this._getTimestampOffsetString(e,t);default:return`${e}`}}_getDateString(e,t){let{view:i}=this.props;return i&&i.timeZone==="unknown"?f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"})}_getTimestampOffsetString(e,t){let{view:i}=this.props;return typeof e=="string"?i&&i.timeZone==="unknown"?f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"}):this._getDateString(e,t)}_getDateOnlyString(e,t){return f.formatDateOnly(e,this.getIntlDateTimeFormattingOptions("short-date",t))}_getTimeOnlyString(e,t){return typeof e=="string"?f.formatTimeOnly(e,this.getIntlDateTimeFormattingOptions("short-date-long-time",t)):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("long-time",{...t,isTimeOnly:!0}),timeZone:"utc"})}_getGuidString(e){return e.startsWith("{")?e:`{${e}}`}_getNumberString(e,t){let i=t?.useFieldFormatting?e:Math.round(e*100)/100;return f.formatNumber(i,this.getIntlNumberFormattingOptions(t))}_printNumValue(e,t){return p(e)?this._getNumberString(e,t):"--"}_setCompleteRef(e){if(this.completeRefHandler&&clearInterval(this.completeRefHandler),e){let t=0;this.completeRefHandler=setInterval(()=>{(t>130||this.isFinished(this.uniqueValuesStatus)&&this.isFinished(this.statisticsStatus))&&(clearInterval(this.completeRefHandler),this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit()),t++},1e3)}}getCurrentFieldFormat(){let{props:e}=this,{layer:t,fieldName:i}=e;return(this.originalLayerSupportsFieldConfigs()?t.getFieldConfiguration(i):void 0)?.fieldFormat??void 0}getIntlNumberFormattingOptions(e){let t=this.getCurrentFieldFormat();if(!e?.useFieldFormatting)return t?{useGrouping:["always","auto"].includes(t.useGrouping)}:f.convertNumberFormatToIntlOptions({digitSeparator:this.getPopupTemplateFieldInfo()?.format?.digitSeparator??!0});let i=t?{minimumFractionDigits:t.minimumFractionDigits,maximumFractionDigits:t.maximumFractionDigits,useGrouping:["always","auto"].includes(t.useGrouping)}:void 0;if(i)return i;let r=this.getPopupTemplateFieldInfo();return f.convertNumberFormatToIntlOptions({digitSeparator:r?.format?.digitSeparator??!0,places:r?.format?.places??2})}getIntlDateTimeFormattingOptions(e,t){let i=this.getCurrentFieldFormat();if(!t?.useFieldFormatting)return i?t?.isTimeOnly?de:le:f.convertDateFormatToIntlOptions(e);let r=i?{dateStyle:t?.isTimeOnly?void 0:i.dateStyle??void 0,year:i.dateStyle?void 0:i.year??void 0,month:i.dateStyle?void 0:i.month??void 0,timeStyle:i.timeStyle??void 0,hourCycle:i.hour12==="never"?"h23":"h11"}:void 0;if(r)return r;let s=this.getPopupTemplateFieldInfo();return f.convertDateFormatToIntlOptions(s?.format?.dateFormat??e)}originalLayerSupportsFieldConfigs(){let{layer:e}=this;return M.supportsFieldConfiguration(e)}getPopupTemplateFieldInfo(){let{props:e}=this,{layer:t,fieldName:i}=e;return("popupTemplate"in t?t.popupTemplate:void 0)?.fieldInfos?.find(r=>r.fieldName===i)}isFinished(e){return["success","failed"].includes(e)}render(){return this._propWatcherTask.render({pending:()=>d`<calcite-scrim loading></calcite-scrim>`,complete:()=>{let{props:e}=this,{fieldInfo:t}=e;return t?d`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>`:""},error:()=>""})}renderFieldType(){let{_messages:e,props:t}=this,{fieldInfo:i}=t,r=this._getFieldTypeLabel(i.layerField.type);return d`<div class="section"><div class="title">${e.fieldType}</div><div>${r}</div></div>`}renderFieldAlias(){let{_messages:e,props:t,hideAlias:i}=this,{fieldInfo:r}=t;return i?"":d`<div class="section"><div class="title">${e.fieldAlias}</div><div>${r.label}</div></div>`}renderFieldDescription(){let{_messages:e,props:t}=this,{layer:i}=t;if(!v(i))return"";let{fieldInfo:r}=t,s=r.layerField.description;return d`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${N({missing:!s})}>${s||e.fieldDescriptionNotSet}</div></div>`}renderFieldValueType(){let{_messages:e,props:t}=this,{layer:i}=t;if(!v(i))return"";let{fieldInfo:r}=t,s=this._getFieldValueTypeCamelCase(r);return d`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${N(s?"":"missing")}>${s?e.fieldValueTypes[s]:e.fieldValueTypeNotSet}</div></div>`}renderFieldSampleValue(){let{oneFeatureResponse:e,oneFeatureResponseStatus:t,statisticsStatus:i,statistics:r,uniqueValuesStatus:s,uniqueValues:n,_messages:l,props:u}=this,{layer:c,fieldName:o,fieldInfo:m}=u,{statistics:g}=l,h;if(y(c)||w(c)||!F(c)&&["string","oid","guid"].includes(this._getStatisticsType(m))&&s!=="failed")return"";t==="success"?e.features.forEach(T=>{(h===void 0||h===null&&T.attributes[o]!==null)&&(h=T.attributes[o])}):i==="success"?h=r?.min??void 0:s==="success"&&(h=n?.uniqueValueInfos?.[0]?.value??n?.uniqueValueInfos?.[1]?.value??void 0);let W=m.codedValues;return p(h)&&(W?h=W.find(T=>h===T.code)?.name||h:h=this._getDisplayString(h,{useFieldFormatting:!0})),d`<div class="section"><div class="title">${l.fieldSampleValue}</div><div class=${N(t==="failed"&&i==="failed"&&s==="failed"||!p(h)?"missing":"")}>${t==="success"||i==="success"||s==="success"?h?.toString()??g.allNulls:t==="failed"&&i==="failed"&&s==="failed"?l.fieldSampleNotAvailable:l.fieldSampleRetrieving}</div></div>`}renderFieldNumericFormat(){let{_messages:e,props:t,hideNumericFormat:i}=this,{fieldName:r,fieldInfo:s,layer:n}=t;if(i||!["double","long","single"].includes(s.layerField.type))return"";let l=this.originalLayerSupportsFieldConfigs()?n.getFieldConfiguration(r):void 0;if(l?.fieldFormat){let{minimumFractionDigits:c,maximumFractionDigits:o}=l.fieldFormat;return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",c.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}",o.toString())}</div></div>`}let u="popupTemplate"in n?n.popupTemplate:void 0;if(u?.fieldInfos){let c=u.fieldInfos?.filter(o=>o.fieldName===r);if(c?.length){let o=c[0];if(p(o?.format?.places)){let m=o.format.places;return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",m.toString())}</div></div>`}}}return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`}renderFieldStatistics(){let{statisticsStatus:e,uniqueValuesStatus:t,hideStatistics:i,_messages:r,props:s}=this,{layer:n,fieldInfo:l}=s;return i?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):x(n)||k(n)||F(n)||y(n)||w(n)||["long"].includes(l.layerField.type)?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):d`<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>`}renderWaitingForStatistics(){let{_messages:e}=this;return S("field-info-statistics-content",d`<div class="missing">${e.fieldStatisticsRetrieving}</div>`)}renderNoStatistics(){let{_messages:e}=this;return S("field-info-statistics-content",d`<div class="missing" ${V(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`)}renderStatistics(){let{props:e}=this,{fieldInfo:t}=e;switch(this._getStatisticsType(t)){case"number":return this.renderNumberStatistics();case"guid":case"oid":case"string":return this.renderStringStatistics();case"date":case"date-only":case"time-only":case"timestamp-offset":return this.renderDateStatistics();default:return""}}renderNumberStatistics(){let{statistics:e,_messages:t}=this;if(!e)return this.renderWaitingForStatistics();let{statistics:i}=t;return S("field-info-statistics-content",d`<div ${V(this._setCompleteRef)}><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${p(e.sum)?d`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>`:null}${p(e.min)?d`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>`:null}${p(e.max)?d`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>`:null}${p(e.avg)?d`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>`:null}${p(e.stddev)?d`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>`:null}${this.renderNullValues()}</div>`)}renderStringStatistics(){let{statistics:e,uniqueValuesStatus:t,_messages:i}=this,{statistics:r}=i;return S("field-info-statistics-content",d`<div ${V(this._setCompleteRef)}><div class="statistics-row"><div>${r.numberOfValues}</div>${t!=="success"?d`<div class="missing">--</div>`:d`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`)}renderDateStatistics(){let{statistics:e,view:t,props:i,_messages:r}=this,{fieldInfo:s}=i;if(!e||!p(e.max)||!p(e.min))return this.renderWaitingForStatistics();let{statistics:n}=r,l=e.max-e.min,u=Math.floor(l/31536e6),c=Math.floor((l-u*31536e6)/2628e6),o=Math.ceil((l-c*2628e6)/864e5);o>=30&&(c+=1,o=0);let m=u===1?n.timeSpanOptions.year:u>1?n.timeSpanOptions.years.replace("${years}",u.toString()):"";m+=u>0&&(c>0||o>0)?", ":"",m+=c===1?n.timeSpanOptions.month:c>1?n.timeSpanOptions.months.replace("${months}",c.toString()):"",m+=c>0&&o>0?", ":"",m+=o===1?n.timeSpanOptions.day:o>1?n.timeSpanOptions.days.replace("${days}",o.toString()):"";let g=s.simpleFieldType!=="timestamp-offset"||!t||t.timeZone!=="unknown",h=s.simpleFieldType==="time-only";return S("field-info-statistics-content",d`<div ${V(this._setCompleteRef)}><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${g&&p(e.min)?d`<div class="statistics-row"><div>${h?n.minimumTime:n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>`:null}${g&&p(e.max)?d`<div class="statistics-row"><div>${h?n.maximumTime:n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>`:null}${g&&p(e.avg)?d`<div class="statistics-row"><div>${h?n.averageTime:n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>`:null}${g&&!h&&p(e.min)&&p(e.max)&&l>0?d`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${m}</div></div>`:null}${this.renderNullValues()}</div>`)}renderTopValues(){let{uniqueValues:e,uniqueValuesStatus:t,_messages:i,props:r}=this,{fieldInfo:s}=r,{statistics:n}=i;if(e?.uniqueValueInfos?.length){let l=e.uniqueValueInfos;l.sort((o,m)=>o.count<m.count?1:o.count>m.count?-1:0);let u=s.codedValues,c=l.filter(o=>o.value!==null).filter((o,m)=>o&&m<10).map(o=>{let m=o.value;return u?u.forEach(g=>{m===g.code&&(m=g.name)}):m=this._getDisplayString(m),d`<div class="statistics-row"><div class="data">${`${m}`}</div><div class="count">${this._printNumValue(o.count)}</div></div>`});return c.length?d`<div><div class="statistics-row-top-values"><div>${l.length>10?n.topTenValues:n.topValues}</div><div>${n.count}</div></div>${c}</div>`:""}else return d`<div><div class="statistics-row-top-values"><div>${n.topValues}</div><div>${n.count}</div></div><div class="statistics-row"><div class="missing">${t==="failed"?i.fieldUniqueValuesNotAvailable:i.fieldSampleRetrieving}</div></div></div>`}renderNullValues(){let{statistics:e,uniqueValues:t,_messages:i}=this,{statistics:r}=i,s=e?.nullcount;if(!p(s)&&t){let n=t.uniqueValueInfos;for(let l=0;l<n.length;l++){let u=n[l];if(u.value===null){s=u.count;break}}}return d`<div class="statistics-row"><div>${r.numberOfNulls}</div>${p(s)?d`<div class="data">${this._printNumValue(s)}</div>`:d`<div class="missing">--</div>`}</div>`}};G("arcgis-field-info",Z);return Z},"config","core/reactiveUtils","intl","applications/PortalApp/layerUtils","core/lang","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","layers/support/CodedValue","rest/support/Query")