@arcgis/common-components 4.29.0-beta.47 → 4.29.0-beta.49

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-a91ab432.js +2 -0
  5. package/dist/arcgis-common-components/p-d3d1695f.entry.js +1 -0
  6. package/dist/cjs/arcgis-common-components.cjs.js +3 -3
  7. package/dist/cjs/arcgis-field-info.cjs.entry.js +903 -899
  8. package/dist/cjs/arcgis-field-pick-list.cjs.entry.js +216 -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 +259 -272
  15. package/dist/components/field-info.js +961 -901
  16. package/dist/esm/arcgis-common-components.js +4 -4
  17. package/dist/esm/arcgis-field-info.entry.js +907 -903
  18. package/dist/esm/arcgis-field-pick-list.entry.js +216 -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
@@ -8,15 +8,10 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { FieldInfoLayer } from "./components/field-info/utils";
9
9
  import { IPickListFieldInfo, IPopoverProps } from "./components/field-pick-list/utils/types";
10
10
  import { LastSortyBy } from "./components/field-pick-list/field-pick-list";
11
- import { ArcGISCredential } from "./components/types";
12
11
  export { FieldInfoLayer } from "./components/field-info/utils";
13
12
  export { IPickListFieldInfo, IPopoverProps } from "./components/field-pick-list/utils/types";
14
13
  export { LastSortyBy } from "./components/field-pick-list/field-pick-list";
15
- export { ArcGISCredential } from "./components/types";
16
14
  export namespace Components {
17
- interface ArcgisApiKey {
18
- "apiKey": string;
19
- }
20
15
  interface ArcgisFieldInfo {
21
16
  /**
22
17
  * field name
@@ -117,23 +112,6 @@ export namespace Components {
117
112
  */
118
113
  "sortBy"?: LastSortyBy;
119
114
  }
120
- interface ArcgisIdentity {
121
- "appId": string;
122
- "credential"?: ArcGISCredential;
123
- "expiration": number;
124
- "identity": __esri.IdentityManager;
125
- "locale": string;
126
- "popupCallbackUrl": string;
127
- "portalUrl": string;
128
- "preserveUrlHash": boolean;
129
- "signIn": () => Promise<ArcGISCredential>;
130
- "signOut": () => Promise<void>;
131
- "usePopup": boolean;
132
- }
133
- }
134
- export interface ArcgisApiKeyCustomEvent<T> extends CustomEvent<T> {
135
- detail: T;
136
- target: HTMLArcgisApiKeyElement;
137
115
  }
138
116
  export interface ArcgisFieldInfoCustomEvent<T> extends CustomEvent<T> {
139
117
  detail: T;
@@ -143,28 +121,7 @@ export interface ArcgisFieldPickListCustomEvent<T> extends CustomEvent<T> {
143
121
  detail: T;
144
122
  target: HTMLArcgisFieldPickListElement;
145
123
  }
146
- export interface ArcgisIdentityCustomEvent<T> extends CustomEvent<T> {
147
- detail: T;
148
- target: HTMLArcgisIdentityElement;
149
- }
150
124
  declare global {
151
- interface HTMLArcgisApiKeyElementEventMap {
152
- "apiKeyReady": boolean;
153
- }
154
- interface HTMLArcgisApiKeyElement extends Components.ArcgisApiKey, HTMLStencilElement {
155
- addEventListener<K extends keyof HTMLArcgisApiKeyElementEventMap>(type: K, listener: (this: HTMLArcgisApiKeyElement, ev: ArcgisApiKeyCustomEvent<HTMLArcgisApiKeyElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
156
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
157
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
158
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
159
- removeEventListener<K extends keyof HTMLArcgisApiKeyElementEventMap>(type: K, listener: (this: HTMLArcgisApiKeyElement, ev: ArcgisApiKeyCustomEvent<HTMLArcgisApiKeyElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
160
- removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
161
- removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
162
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
163
- }
164
- var HTMLArcgisApiKeyElement: {
165
- prototype: HTMLArcgisApiKeyElement;
166
- new (): HTMLArcgisApiKeyElement;
167
- };
168
125
  interface HTMLArcgisFieldInfoElementEventMap {
169
126
  "arcgisFieldInfoComplete": void;
170
127
  }
@@ -201,37 +158,12 @@ declare global {
201
158
  prototype: HTMLArcgisFieldPickListElement;
202
159
  new (): HTMLArcgisFieldPickListElement;
203
160
  };
204
- interface HTMLArcgisIdentityElementEventMap {
205
- "identityReady": { identity: __esri.IdentityManager; ready: boolean };
206
- "credentialCreate": __esri.IdentityManagerCredentialCreateEvent;
207
- "dialogCreate": __esri.IdentityManagerDialogCreateEvent;
208
- }
209
- interface HTMLArcgisIdentityElement extends Components.ArcgisIdentity, HTMLStencilElement {
210
- addEventListener<K extends keyof HTMLArcgisIdentityElementEventMap>(type: K, listener: (this: HTMLArcgisIdentityElement, ev: ArcgisIdentityCustomEvent<HTMLArcgisIdentityElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
211
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
212
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
213
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
214
- removeEventListener<K extends keyof HTMLArcgisIdentityElementEventMap>(type: K, listener: (this: HTMLArcgisIdentityElement, ev: ArcgisIdentityCustomEvent<HTMLArcgisIdentityElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
215
- removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
216
- removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
217
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
218
- }
219
- var HTMLArcgisIdentityElement: {
220
- prototype: HTMLArcgisIdentityElement;
221
- new (): HTMLArcgisIdentityElement;
222
- };
223
161
  interface HTMLElementTagNameMap {
224
- "arcgis-api-key": HTMLArcgisApiKeyElement;
225
162
  "arcgis-field-info": HTMLArcgisFieldInfoElement;
226
163
  "arcgis-field-pick-list": HTMLArcgisFieldPickListElement;
227
- "arcgis-identity": HTMLArcgisIdentityElement;
228
164
  }
229
165
  }
230
166
  declare namespace LocalJSX {
231
- interface ArcgisApiKey {
232
- "apiKey"?: string;
233
- "onApiKeyReady"?: (event: ArcgisApiKeyCustomEvent<boolean>) => void;
234
- }
235
167
  interface ArcgisFieldInfo {
236
168
  /**
237
169
  * field name
@@ -346,35 +278,17 @@ declare namespace LocalJSX {
346
278
  */
347
279
  "sortBy"?: LastSortyBy;
348
280
  }
349
- interface ArcgisIdentity {
350
- "appId"?: string;
351
- "credential"?: ArcGISCredential;
352
- "expiration"?: number;
353
- "identity"?: __esri.IdentityManager;
354
- "locale"?: string;
355
- "onCredentialCreate"?: (event: ArcgisIdentityCustomEvent<__esri.IdentityManagerCredentialCreateEvent>) => void;
356
- "onDialogCreate"?: (event: ArcgisIdentityCustomEvent<__esri.IdentityManagerDialogCreateEvent>) => void;
357
- "onIdentityReady"?: (event: ArcgisIdentityCustomEvent<{ identity: __esri.IdentityManager; ready: boolean }>) => void;
358
- "popupCallbackUrl"?: string;
359
- "portalUrl"?: string;
360
- "preserveUrlHash"?: boolean;
361
- "usePopup"?: boolean;
362
- }
363
281
  interface IntrinsicElements {
364
- "arcgis-api-key": ArcgisApiKey;
365
282
  "arcgis-field-info": ArcgisFieldInfo;
366
283
  "arcgis-field-pick-list": ArcgisFieldPickList;
367
- "arcgis-identity": ArcgisIdentity;
368
284
  }
369
285
  }
370
286
  export { LocalJSX as JSX };
371
287
  declare module "@stencil/core" {
372
288
  export namespace JSX {
373
289
  interface IntrinsicElements {
374
- "arcgis-api-key": LocalJSX.ArcgisApiKey & JSXBase.HTMLAttributes<HTMLArcgisApiKeyElement>;
375
290
  "arcgis-field-info": LocalJSX.ArcgisFieldInfo & JSXBase.HTMLAttributes<HTMLArcgisFieldInfoElement>;
376
291
  "arcgis-field-pick-list": LocalJSX.ArcgisFieldPickList & JSXBase.HTMLAttributes<HTMLArcgisFieldPickListElement>;
377
- "arcgis-identity": LocalJSX.ArcgisIdentity & JSXBase.HTMLAttributes<HTMLArcgisIdentityElement>;
378
292
  }
379
293
  }
380
294
  }
@@ -810,6 +810,9 @@ export declare namespace JSXBase {
810
810
  name?: string;
811
811
  type?: string;
812
812
  value?: string | string[] | number;
813
+ popoverTargetAction?: string;
814
+ popoverTargetElement?: Element | null;
815
+ popoverTarget?: string;
813
816
  }
814
817
  interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
815
818
  height?: number | string;
@@ -971,6 +974,9 @@ export declare namespace JSXBase {
971
974
  webkitdirectory?: boolean;
972
975
  webkitEntries?: any;
973
976
  width?: number | string;
977
+ popoverTargetAction?: string;
978
+ popoverTargetElement?: Element | null;
979
+ popoverTarget?: string;
974
980
  }
975
981
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
976
982
  autoFocus?: boolean;
@@ -1223,6 +1229,7 @@ export declare namespace JSXBase {
1223
1229
  draggable?: boolean;
1224
1230
  hidden?: boolean;
1225
1231
  id?: string;
1232
+ inert?: boolean;
1226
1233
  lang?: string;
1227
1234
  spellcheck?: 'true' | 'false' | any;
1228
1235
  style?: {
@@ -1231,6 +1238,7 @@ export declare namespace JSXBase {
1231
1238
  tabIndex?: number;
1232
1239
  tabindex?: number | string;
1233
1240
  title?: string;
1241
+ popover?: string | null;
1234
1242
  inputMode?: string;
1235
1243
  inputmode?: string;
1236
1244
  enterKeyHint?: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@arcgis/common-components",
3
3
  "description": "ArcGIS Common Components",
4
4
  "homepage": "https://developers.arcgis.com/javascript/latest/",
5
- "version": "4.29.0-beta.47",
5
+ "version": "4.29.0-beta.49",
6
6
  "module": "dist/components/index.js",
7
7
  "main": "dist/index.cjs.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -49,14 +49,14 @@
49
49
  "generate": "stencil generate"
50
50
  },
51
51
  "dependencies": {
52
- "@stencil/core": "4.7.1"
52
+ "@stencil/core": "4.8.2"
53
53
  },
54
54
  "devDependencies": {
55
- "@arcgis/components-plugins": "4.29.0-beta.47",
56
- "@arcgis/components-utils": "4.29.0-beta.47",
55
+ "@arcgis/components-plugins": "4.29.0-beta.49",
56
+ "@arcgis/components-utils": "4.29.0-beta.49",
57
57
  "@arcgis/core": ">=4.29.0-next <4.30",
58
- "@arcgis/core-adapter": "4.29.0-beta.47",
59
- "@arcgis/map-components": "4.29.0-beta.47",
58
+ "@arcgis/core-adapter": "4.29.0-beta.49",
59
+ "@arcgis/map-components": "4.29.0-beta.49",
60
60
  "@arcgis/typescript-config": "1.0.0",
61
61
  "@esri/calcite-components": "^2.1.0",
62
62
  "@stencil/angular-output-target": "0.8.1",
@@ -86,5 +86,5 @@
86
86
  "@arcgis/core": ">=4.29.0-next <4.30",
87
87
  "@esri/calcite-components": "^2.1.0"
88
88
  },
89
- "gitHead": "0a6d59c3ca041d2a81b2f4bc851319172fb9cdbf"
89
+ "gitHead": "346c710a59323519e7fbabc4d208f70b68a21946"
90
90
  }
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s,a as e,H as h,g as o}from"./p-f27af39c.js";import{a as l}from"./p-5ecf6396.js";import{F as n,U as c,C as a}from"./p-b23318c8.js";var r,d;!function(t){t.expression="expression/",t.relationship="relationships/",t.raster="Raster."}(r||(r={})),function(t){t.default="default",t.display="display",t.type="type",t.field="field"}(d||(d={}));const p=class{constructor(e){t(this,e),this.arcgisFieldPickListDismissed=i(this,"arcgisFieldPickListDismissed",7),this.arcgisFieldPickListChange=i(this,"arcgisFieldPickListChange",7),this.arcgisFieldPickListSortByChange=i(this,"arcgisFieldPickListSortByChange",7),this.calciteValueList=t=>s("calcite-pick-list-item",{key:t.name,label:t.alias||t.name,description:(()=>this.showFieldName?`{${t.name}}`:this.showDescription&&t.description?t.description:null)(),value:t.name,selected:!this.multiple&&t.name===this.selectedFields[0]||this.multiple&&this.selectedFields.indexOf(t.name)>-1,metadata:{label:t.alias,fieldName:t.name}},this.showFieldInfoCheck(t)&&s("calcite-action",{slot:"actions-end",text:this._t9nStrings.info,title:this._t9nStrings.info,scale:"s",icon:"information",onClick:i=>{i.stopPropagation();const s=i.target,e=document.createElement("calcite-flow-item");e.heading=t.alias??t.name,e.description=t.name,e.className="panel";const h=document.createElement("arcgis-field-info");h.lang=this._lang,h.fieldName=t.name,h.layer=this.layer,h.view=this.mapView,h.classList.add("content"),e.appendChild(h),e.addEventListener("calciteFlowItemBack",(()=>setTimeout((()=>requestAnimationFrame((()=>s.setFocus()))),200))),this.flowElement.appendChild(e),setTimeout((()=>requestAnimationFrame((()=>e.setFocus()))),200)}})),this.selectedFields=[],this.fields=void 0,this.popoverProps=void 0,this.layer=void 0,this.mapView=void 0,this.showFieldInfo=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.showSort=!0,this.showFilterLength=10,this.multiple=!1,this.heading=void 0,this.okBtnText=void 0,this.filterPlaceholderText=void 0,this.sortBy=void 0,this.lastSortyBy=d.default,this.filterFields=null,this._lang="",this._t9nLocale="",this._t9nStrings=void 0}async componentWillLoad(){await n(this,e("./assets")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortyBy=this.sortBy||this.lastSortyBy}async componentDidLoad(){(await l()).setLocale(this._lang),this.setUpObserver(),this.popoverNode.open=!0,setTimeout((()=>requestAnimationFrame((()=>this.panelElement.setFocus()))),200)}disconnectedCallback(){c(this),this.observer?.disconnect()}async setFocus(){setTimeout((()=>requestAnimationFrame((()=>this.panelElement.setFocus()))),1)}async reposition(){this.popoverNode?.reposition()}getSortedList(){const t=[...this.fields];return this.lastSortyBy===d.display?t.sort(((t,i)=>t.alias.localeCompare(i.alias))):this.lastSortyBy===d.field?t.sort(((t,i)=>t.name.localeCompare(i.name))):this.lastSortyBy===d.type&&t.sort(((t,i)=>t.type.localeCompare(i.type))),t}showFieldInfoCheck(t){return!!this.showFieldInfo&&!t.name.includes(r.expression)&&!t.name.includes(r.relationship)}selectDeselect(){return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===this.fields.length}filterContainsAll(){return!!this.filterFields?.every((t=>this.selectedFields.some((i=>i===t))))}render(){const t=s("calcite-button",{slot:"footer",appearance:this.showCancel?"solid":"outline-fill",width:this.showCancel?"half":"full",scale:"m",onClick:()=>{this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}},this.okBtnText||(this.multiple?this._t9nStrings.done:this._t9nStrings.ok)),i=s("calcite-button",{slot:"footer",appearance:"outline-fill",width:this.multiple?"half":"full",scale:"m",onClick:()=>this.arcgisFieldPickListDismissed.emit()},this._t9nStrings.cancel),e=this.fields.every((t=>!!t.type)),o=s("calcite-dropdown",{slot:"menu-actions",placement:"bottom-end",overlayPositioning:"fixed",ref:t=>this.dropdownNode=t,onCalciteDropdownOpen:()=>{this.observer?.disconnect(),this.observer?.observe(this.popoverNode,{attributes:!0})},onCalciteDropdownClose:()=>this.observer?.disconnect()},s("calcite-action",{slot:"trigger",text:this._t9nStrings.sort,title:this._t9nStrings.sort},s("calcite-icon",{scale:"s",icon:"sortDescending"})),s("calcite-dropdown-group",null,s("calcite-dropdown-item",{selected:this.lastSortyBy===d.default,onClick:()=>{this.lastSortyBy=d.default,this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy)}},this._t9nStrings.default),s("calcite-dropdown-item",{selected:this.lastSortyBy===d.display,onClick:()=>{this.lastSortyBy=d.display,this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy)}},this._t9nStrings.displayName),e&&s("calcite-dropdown-item",{selected:this.lastSortyBy===d.type,onClick:()=>{this.lastSortyBy=d.type,this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy)}},this._t9nStrings.type),s("calcite-dropdown-item",{selected:this.lastSortyBy===d.field,onClick:()=>{this.lastSortyBy=d.field,this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy)}},this._t9nStrings.fieldName))),l=s("div",{class:"selection-button-div"},s("calcite-button",{appearance:"transparent",scale:"s",width:"full",onClick:()=>{this.selectedFields=this.selectDeselect()?this.filterFields?.length?this.selectedFields.filter((t=>!this.filterFields?.includes(t))):[]:this.filterFields?.length?[...new Set([...this.selectedFields,...this.filterFields])]:this.fields.map((t=>t.name))}},this.selectDeselect()?this._t9nStrings.deselectAll:this._t9nStrings.selectAll));return s(h,{class:"js-app-flyout"},s("calcite-popover",{dir:a(this._hostElement),class:"popover",placement:this.popoverProps.placement||"leading-start",open:!1,pointerDisabled:!0,referenceElement:this.popoverProps.refElement,offsetDistance:this.popoverProps.offsetDistance||-Math.round(this.popoverProps.refElement.getBoundingClientRect().width),offsetSkidding:this.popoverProps.offsetSkidding||0,overlayPositioning:this.popoverProps.overlayPositioning,triggerDisabled:this.popoverProps.triggerDisabled,autoClose:this.popoverProps.autoClose,label:this.heading||(this.multiple?this._t9nStrings.headerSelect:this._t9nStrings.header),onCalcitePopoverClose:()=>this.arcgisFieldPickListDismissed.emit(),ref:t=>this.popoverNode=t},s("calcite-flow",{ref:t=>{this.flowElement=t},style:{width:`${this.popoverProps.popoverWidth||this.popoverProps.refElement.getBoundingClientRect().width}px`}},s("calcite-flow-item",{ref:t=>this.panelElement=t,class:"panel",heading:this.heading||(this.multiple?this._t9nStrings.headerSelect:this._t9nStrings.header),closable:!0,onCalciteFlowItemClose:()=>this.arcgisFieldPickListDismissed.emit()},this.multiple&&t,this.showCancel&&i,s("calcite-pick-list",{multiple:this.multiple,ref:t=>{this.pickListNode=t},class:"content",filterEnabled:this.fields.length>=this.showFilterLength,filterPlaceholder:this.filterPlaceholderText??this._t9nStrings.filter,onCalciteListChange:async()=>{const t=await this.pickListNode.getSelectedItems();this.selectedFields=[...new Set([...this.selectedFields.filter((i=>t.has(i))),...t.keys()])],this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})},onCalciteListFilter:t=>{t.stopPropagation();const i=t.target;this.filterFields=i.filteredItems?.map((t=>t.value))}},this.fields.length>=this.showFilterLength&&this.showSort&&o,this.multiple&&this.showSelectionAll&&l,[...this.getSortedList()].map((t=>this.calciteValueList(t))))))))}setUpObserver(){this.observer=new MutationObserver((t=>{for(const i of t)"style"===i.attributeName&&"hidden"===this.popoverNode.style.visibility&&(this.dropdownNode.open=!1)}))}static get assetsDirs(){return["assets"]}get _hostElement(){return o(this)}};p.style=".popover{z-index:100}.panel{min-height:300px}.content{max-height:60vh}.selection-button-div{padding:4px 10px}";export{p as arcgis_field_pick_list}
@@ -1 +0,0 @@
1
- import{r as s,c as a,g as t}from"./p-f27af39c.js";import{i}from"./p-5ecf6396.js";const e=class{constructor(t){s(this,t),this.apiKeyReady=a(this,"apiKeyReady",7),this.apiKey=void 0}apiKeyWatcher(s){this._setApiKey(s)}async connectedCallback(){this.apiKey&&await this._setApiKey(this.apiKey)}async _setApiKey(s){(await i()).apiKey=s,this.apiKeyReady.emit(!0)}get el(){return t(this)}static get watchers(){return{apiKey:["apiKeyWatcher"]}}};e.style=":host{display:none}arcgis-api-key{display:none}";export{e as arcgis_api_key}
@@ -1 +0,0 @@
1
- const i="define"in window&&"function"==typeof window.define&&"amd"in window.define;function t(i){return new Promise((t=>window.require([i],(i=>{t(i)}))))}async function r(){return i?t("esri/identity/IdentityManager"):(await import("@arcgis/core/identity/IdentityManager.js")).default}async function n(r){return new(await async function(){return i?t("esri/identity/OAuthInfo"):(await import("@arcgis/core/identity/OAuthInfo.js")).default}())(r)}async function s(){return i?t("esri/rest/support/Query"):(await import("@arcgis/core/rest/support/Query.js")).default}async function a(){return i?t("esri/config"):(await import("@arcgis/core/config.js")).default}async function e(){return i?t("esri/core/lang"):await import("@arcgis/core/core/lang.js")}async function c(){return i?t("esri/core/reactiveUtils"):await import("@arcgis/core/core/reactiveUtils.js")}async function o(){return i?t("esri/intl"):await import("@arcgis/core/intl.js")}async function u(){return i?t("esri/smartMapping/statistics/summaryStatistics"):(await import("@arcgis/core/smartMapping/statistics/summaryStatistics.js")).default}async function p(){return i?t("esri/smartMapping/statistics/uniqueValues"):(await import("@arcgis/core/smartMapping/statistics/uniqueValues.js")).default}export{o as a,c as b,r as c,e as d,s as e,u as f,p as g,a as i,n}
@@ -1 +0,0 @@
1
- import{r as t,c as i,g as s}from"./p-f27af39c.js";import{b as h,n as a,c as e}from"./p-5ecf6396.js";const r=class{constructor(s){t(this,s),this.identityReady=i(this,"identityReady",7),this.credentialCreate=i(this,"credentialCreate",7),this.dialogCreate=i(this,"dialogCreate",7),this.identity=void 0,this.appId=void 0,this.credential=void 0,this.expiration=void 0,this.locale=void 0,this.usePopup=!1,this.popupCallbackUrl=void 0,this.portalUrl=void 0,this.preserveUrlHash=!1}appIdWatcher(t,i){i!==t&&this._registerOAuth()}async signIn(){if(!this.credential)try{this.credential=await this._checkCurrentStatus()}catch(t){this.credential=await this._fetchCredential()}return this.credential}async signOut(){if(!this.credential)try{this.identity.destroyCredentials()}catch(t){this.credential=void 0}this.credential=void 0}async connectedCallback(){this.appId&&await this._registerOAuth(),this._proxyEvents(),await this._addWatchers(),this.identityReady.emit({identity:this.identity,ready:!0})}async _addWatchers(){const{watch:t}=await h();t((()=>this._info.expiration),(t=>this.expiration=t),{initial:!0})}_checkCurrentStatus(){return this.identity.checkSignInStatus(`${this._info.portalUrl}/sharing`)}async _createOAuthInfo(){const t={};void 0!==this.appId&&(t.appId=this.appId),void 0!==this.locale&&(t.locale=this.locale),void 0!==this.popupCallbackUrl&&(t.popupCallbackUrl=this.popupCallbackUrl),void 0!==this.preserveUrlHash&&(t.preserveUrlHash=this.preserveUrlHash),void 0!==this.usePopup&&(t.popup=this.usePopup),void 0!==this.portalUrl&&(t.portalUrl=this.portalUrl);const i=await a(t);return this._info=i,i}async _fetchCredential(){return await this.identity.getCredential(`${this._info?.portalUrl}/sharing`,{error:null,oAuthPopupConfirmation:!1,token:null})}async _registerOAuth(){this.identity=await e();const t=await this._createOAuthInfo();this.identity.registerOAuthInfos([t])}_proxyEvents(){this.identity.on("credential-create",(t=>this.credentialCreate.emit(t))),this.identity.on("dialog-create",(t=>this.dialogCreate.emit(t)))}get el(){return s(this)}static get watchers(){return{appId:["appIdWatcher"]}}};r.style=":host{display:none}arcgis-identity{display:none}";export{r as arcgis_identity}
@@ -1 +0,0 @@
1
- function t(t,n){let e=t;for(;e;){if(e===n)return!0;if(!e.parentNode)return!1;e=e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}return!1}function n(t){return e(t,"dir","ltr")}function e(t,n,e){return function(t,n){let e=t;for(;e;){let t=e.closest(n);if(t)return t;let r=e.getRootNode();if(r===document)return null;e=r.host}return null}(t,`[${n}]`)?.getAttribute(n)??e}var r=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 i(t,n,e=""){let r=`${n}/${e}${t}.json`;if(a.has(r))return a.get(r);try{let u=await fetch(r);if(u.ok){let t=await u.json();return a.set(r,t),t}if("en"===t)return void a.set(r,void 0);let l=await i("en",n,e);return a.set(r,l),l}catch{return void a.set(r,void 0)}}var u=new WeakMap,l=new WeakMap,o=new WeakMap;async function f(n,e,r){l.set(n,e),u.set(n,function(n,e,r=(()=>{})){if(!e||e.length<=0)return;let a=new MutationObserver((e=>{for(let a of e)t(n,a.target)&&r()}));return a.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0}),a}(n._hostElement,["lang"],(()=>{s(n,r)}))),await s(n,r)}function c(t){u.get(t)?.disconnect(),u.delete(t),l.delete(t)}async function s(t,n){let{lang:a,t9nLocale:u}=function(t){let n=e(t,"lang",navigator?.language||"en");if(r.has(n))return{lang:n,t9nLocale:n};let a=n.slice(0,2);return{lang:n,t9nLocale:r.has(a)?a:"en"}}(t._hostElement);if(a===t._lang&&u===t._t9nLocale||(a!==t._lang&&(t._lang=a),u===t._t9nLocale))return;let f=o.get(t);if(!f){let n=l.get(t)??"",e=t._hostElement.tagName.toLowerCase().replace("arcgis-",""),r=`${n}/${e}/t9n`,a=`${e}.t9n.`;f=await i(u,r,a)}t._t9nLocale=u,t._t9nStrings=f,await(n?.call(t))}export{n as C,f as F,c as U}
@@ -1 +0,0 @@
1
- import{r as t,c as s,a as e,h as i,H as n,g as r,F as a}from"./p-f27af39c.js";import{d as l,i as o,a as c,e as u,f as d,g as h,b as f}from"./p-5ecf6396.js";import{F as g,U as m}from"./p-b23318c8.js";var v,p;function y(t){return null!=t}function w(t){return"scene"===t.type?t.associatedLayer?.url:t.url}async function S(t){t.statisticsStatus=v.IN_PROGRESS;const{layer:s,view:e}=t;if("imagery"===s.type||"imagery-tile"===s.type||"stream"===s.type)throw new Error("could not get feature count");try{return await async function(t,s){return"feature"!==t.type||t.url?"feature"===t.type||"csv"===t.type||"scene"===t.type||"wfs"===t.type||"geojson"===t.type?await t.queryFeatureCount():!s||"stream"!==t.type&&"ogc-feature"!==t.type?void 0:async function(t,s){return(await s.whenLayerView(t)).queryFeatureCount()}(t,s):async function(t){const s=t.createQuery();s.outFields=["*"];const e=await t.queryFeatures(s);if(e.features?.length)return e.features.length;throw new Error("could not get feature count")}(t)}(s,e)}catch(t){return}}async function b(t){const{layer:s,modules:e}=t;if(["imagery","imagery-tile","stream","ogc-feature"].indexOf(s.type)>-1)throw new Error("cannot get feature from service");const i=new e.Query({where:"1=1",outFields:["*"],returnGeometry:!1});return s.queryFeatures(i)}!function(t){t.MISSING="missing",t.IN_PROGRESS="inProgress",t.SUCCESS="success",t.FAILED="failed"}(v||(v={})),function(t){t.NUMBER="number",t.STRING="string",t.DATE="date",t.DATE_ONLY="date-only",t.TIME_ONLY="time-only",t.TIMESTAMP_OFFSET="timestamp-offset",t.OID="oid",t.GUID="guid",t.UNKNOWN="unknown"}(p||(p={}));const _=class{constructor(e){t(this,e),this.arcgisFieldInfoComplete=s(this,"arcgisFieldInfoComplete",7),this.view=void 0,this.layer=void 0,this.fieldName=void 0,this.hideStatistics=!1,this.oneFeatureResponse=void 0,this.oneFeatureResponseStatus=v.MISSING,this.statistics=void 0,this.statisticsStatus=v.MISSING,this.uniqueValues=void 0,this.uniqueValuesStatus=v.MISSING,this._lang="",this._t9nLocale="",this._t9nStrings=void 0}async componentWillLoad(){await g(this,e("./assets"));const t=await l(),s=await o(),i=await c(),n=await u(),r=await d(),a=await h(),{view:m,layer:_,fieldName:k,hideStatistics:$}=this;let I;if("esri.layers.support.Sublayer"===_.declaredClass){const t=_,{whenOnce:s}=await f();m&&await s((()=>!m.updating)),I=await t.createFeatureLayer(),await I.load()}this.props={view:m,layer:I||_,fieldName:k,hideStatistics:$,modules:{esriLang:t,esriConfig:s,intl:i,Query:n,summaryStatistics:r,uniqueValues:a}},this.props.fieldInfo=function(t){const{layer:s,fieldName:e}=t;let i;const{popupTemplate:n}=s,r=n?n.fieldInfos:[];return("imagery-tile"===s.type||"imagery"===s.type&&s.rasterFields?.length?s.rasterFields:s.fields).filter((t=>t.name===e)).forEach((s=>{const n=r?r.filter((t=>t.fieldName===s.name)):null,a=n?.length?n[0].label:null;/^raster.(item|service)pixelvalue/i.test(e)&&(s.type="double");const l={layerField:s,label:a||s.alias||s.name};l.codedValues=function(t,s){const{layer:e,modules:i}=s;if("feature"!==e.type)return;const n=e.typeIdField,r=e.types;let a;const l=e.fields.find((s=>s.name===t)),o=l.domain;return n&&r?(n===t?a=r.map((t=>({code:t.id,name:t.name}))):(a=[],r.forEach((s=>{if(s.domains&&s.domains[t]&&"inherited"!==s.domains[t].type)s.domains?.[t]?.codedValues&&s.domains[t].codedValues.forEach((async t=>{let s=!1;a.forEach((e=>{e.code===t.code&&(s=!0,-1===`, ${e.name},`.indexOf(`, ${t.name},`)&&(e.name+=`, ${t.name}`))})),s||a.push(i.esriLang.clone(t))}));else{const t=o;t?.codedValues&&t.codedValues.forEach((async t=>{let s=!1;a.forEach((e=>{e.code===t.code&&(s=!0,-1===`, ${e.name},`.indexOf(`, ${t.name},`)&&(e.name+=`, ${t.name}`))})),s||a.push(i.esriLang.clone(t))}))}}))),!a?.length&&o?.codedValues&&(a=i.esriLang.clone(o.codedValues))):o?.codedValues&&(a=l.domain.codedValues),a?.length?a:null}(e,t),function(t){switch(t.layerField.type){case"string":t.simpleFieldType=p.STRING;break;case"date":t.simpleFieldType=p.DATE;break;case"timestamp-offset":t.simpleFieldType=p.TIMESTAMP_OFFSET;break;case"date-only":t.simpleFieldType=p.DATE_ONLY;break;case"time-only":t.simpleFieldType=p.TIME_ONLY;break;case"oid":t.simpleFieldType=p.OID;break;case"guid":case"global-id":t.simpleFieldType=p.GUID;break;case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":t.simpleFieldType=p.NUMBER}}(l),l.simpleFieldType&&(i=l)})),i}(this.props),"scene"===_.type&&s.request.interceptors?.push({urls:w(_)+"/"+_.layerId,before:function(t){t.requestOptions.authMode="no-prompt"}}),this.oneFeatureResponseStatus=v.IN_PROGRESS;try{const t=await async function(t){const{view:s,layer:e}=t;if("imagery"===e.type||"imagery-tile"===e.type)throw new Error("could not get feature");if("feature"===e.type&&!e.url||"wfs"===e.type){const t=e.createQuery();t.start=0,t.num=5,t.outFields=["*"];const s=await e.queryFeatures(t);if(s.features?.length)return s;throw new Error("could not get feature")}{if(!s)return b(t);const i=await s.whenLayerView(e);if(i.availableFields.length===e.fields.length||["stream","ogc-feature"].indexOf(e.type)>-1&&i.availableFields.length>0){const s=e.createQuery();s.start=0,s.num=5,s.outFields=["*"];const n=await i.queryFeatures(s);return n.features?.length?n:b(t)}return b(t)}}(this.props);this.oneFeatureResponse=t,this.oneFeatureResponseStatus=v.SUCCESS}catch(t){this.oneFeatureResponseStatus=v.FAILED}if("stream"===_.type)return this.uniqueValuesStatus=v.FAILED,void(this.statisticsStatus=v.FAILED);if($)this.uniqueValuesStatus=v.FAILED;else{this.uniqueValuesStatus=v.IN_PROGRESS;try{const t=await async function(t){const{layer:s,view:e,fieldName:i,modules:n}=t;if("imagery"===s.type||"imagery-tile"===s.type)throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer");"feature"!==s.type||s.url||(s.outFields=["*"]);try{return await n.uniqueValues({layer:s,view:e,field:i})}catch(t){throw new Error("could not get unique values")}}(this.props);this.uniqueValues=t,this.uniqueValuesStatus=t?.uniqueValueInfos?.length?v.SUCCESS:v.FAILED}catch(t){this.uniqueValuesStatus=v.FAILED}}if($)this.statisticsStatus=v.FAILED;else{this.statisticsStatus=v.IN_PROGRESS;try{const t=await async function(t){const{layer:s,view:e,fieldName:i,fieldInfo:n,modules:r}=t;if("imagery"===s.type||"imagery-tile"===s.type)throw new Error("could not get statistics for ImageryLayer/ImageryTileLayer");if(!n||"oid"===n.layerField.type||"guid"===n.layerField.type||"global-id"===n.layerField.type){const s=await S(t);return Promise.resolve({totalCount:s,nullcount:0})}try{const n=await r.summaryStatistics({layer:s,view:e,field:i});if(!y(n.count))throw new Error("could not get statistics");const a="sourceJSON"in s&&s.sourceJSON.maxRecordCount===n.count;if(y(n.nullcount)&&!a)return{...n,totalCount:n.count+n.nullcount};{const s=await S(t);return{...n,totalCount:s}}}catch(t){throw new Error("could not get statistics")}}(this.props);if(!y(t.totalCount)&&y(t.count)&&this.uniqueValuesStatus===v.SUCCESS){const s=this.uniqueValues.uniqueValueInfos;for(let e=0;e<s.length;e++){const i=s[e];if(null===i.value){t.totalCount=i.count+t.count;break}}y(t.totalCount)||(t.totalCount=t.count)}this.statistics=t,this.statisticsStatus=v.SUCCESS}catch(t){this.statisticsStatus=v.FAILED}}}async componentDidLoad(){const{props:t}=this,{modules:s}=t;s.intl.setLocale(this._lang)}disconnectedCallback(){m(this)}render(){const{props:t}=this,{fieldInfo:s}=t;return s?i(n,null,i("div",{class:"container"},this.renderFieldType(),this.renderFieldAlias(),this.renderFieldDescription(),this.renderFieldValueType(),this.renderFieldSampleValue(),this.renderFieldFormat(),this.renderFieldStatistics())):i(a,null)}renderFieldType(){const{_t9nStrings:t,props:s}=this,{fieldInfo:e}=s,n=this._getFieldTypeLabel(e.layerField.type);return i("div",{class:"section"},i("div",{class:"title"},t.fieldType),i("div",null,n))}renderFieldAlias(){const{_t9nStrings:t,props:s}=this,{fieldInfo:e}=s;return i("div",{class:"section"},i("div",{class:"title"},t.fieldAlias),i("div",null,e.label))}renderFieldDescription(){const{_t9nStrings:t,props:s}=this,{layer:e}=s;if("feature"!==e.type)return i(a,null);const{fieldInfo:n}=s,r=n.layerField.description;return i("div",{class:"section"},i("div",{class:"title"},t.fieldDescription),i("div",{class:{missing:!r}},r||t.fieldDescriptionNotSet))}renderFieldValueType(){const{_t9nStrings:t,props:s}=this,{layer:e}=s;if("feature"!==e.type)return i(a,null);const{fieldInfo:n}=s,r=this._getFieldValueTypeCamelCase(n);return i("div",{class:"section"},i("div",{class:"title"},t.fieldValueType),i("div",{class:r?"":"missing"},r?t.fieldValueTypes[r]:t.fieldValueTypeNotSet))}renderFieldSampleValue(){const{oneFeatureResponse:t,oneFeatureResponseStatus:s,statisticsStatus:e,statistics:n,uniqueValuesStatus:r,uniqueValues:l,_t9nStrings:o,props:c}=this,{layer:u,fieldName:d,fieldInfo:h}=c,{statistics:f}=o;let g;if(["imagery","imagery-tile"].indexOf(u.type)>-1)return i(a,null);if("stream"!==u.type&&[p.STRING,p.OID,p.GUID].indexOf(this._getStatisticsType(h))>-1&&r!==v.FAILED)return i(a,null);s===v.SUCCESS?t.features.forEach((t=>{(void 0===g||null===g&&null!==t.attributes[d])&&(g=t.attributes[d])})):e===v.SUCCESS?g=n.min:r===v.SUCCESS&&(g=l.uniqueValueInfos?.[0]?.value||l.uniqueValueInfos?.[1]?.value);const m=h.codedValues;return y(g)&&(g=m?m.find((t=>g===t.code))?.name||g:this._getDisplayString(g)),i("div",{class:"section"},i("div",{class:"title"},o.fieldSampleValue),i("div",{class:s===v.FAILED&&e===v.FAILED&&r===v.FAILED||!y(g)?"missing":""},s===v.SUCCESS||e===v.SUCCESS||r===v.SUCCESS?y(g)?`${g}`:f.allNulls:s===v.FAILED&&e===v.FAILED&&r===v.FAILED?o.fieldSampleNotAvailable:o.fieldSampleRetrieving))}renderFieldFormat(){const{_t9nStrings:t,props:s}=this,{fieldName:e,fieldInfo:n,layer:r}=s;if(-1===["single","double","long"].indexOf(n.layerField.type))return i(a,null);const l=r.popupTemplate;if(l?.fieldInfos){const s=l.fieldInfos?.filter((t=>t.fieldName===e));if(s?.length){const e=s[0];if(y(e?.format?.places)){const s=e.format.places;return i("div",{class:"section"},i("div",{class:"title"},t.fieldDecimalPlaces),i("div",null,t.fieldNumDecimalPlaces.replace("${number}",s.toString())))}}}return i("div",{class:"section"},i("div",{class:"title"},t.fieldDecimalPlaces),i("div",{class:"missing"},t.fieldDecimalPlacesNotAvailable))}renderFieldStatistics(){const{statisticsStatus:t,uniqueValuesStatus:s,hideStatistics:e,_t9nStrings:n,props:r}=this,{layer:l,fieldInfo:o}=r;return e||["stream","imagery","imagery-tile"].indexOf(l.type)>-1||["long"].indexOf(o.layerField.type)>-1?(this.arcgisFieldInfoComplete.emit(),i(a,null)):i("div",{class:"section"},i("div",{class:"title"},n.fieldStatistics),t&&t!==v.MISSING&&t!==v.IN_PROGRESS?t===v.FAILED&&s!==v.SUCCESS?this.renderNoStatistics():i("div",{key:"field-info-statistics-content",ref:()=>this.arcgisFieldInfoComplete.emit()},this.renderStatistics()):i("div",{key:"field-info-statistics-content",class:"missing"},n.fieldStatisticsRetrieving))}renderNoStatistics(){const{_t9nStrings:t}=this;return i("div",{key:"field-info-statistics-content",ref:()=>this.arcgisFieldInfoComplete.emit(),class:"missing"},t.fieldStatisticsNotAvailable)}renderStatistics(){const{props:t}=this,{fieldInfo:s}=t;switch(this._getStatisticsType(s)){case p.NUMBER:return this.renderNumberStatistics();case p.STRING:case p.OID:case p.GUID:return this.renderStringStatistics();case p.DATE:case p.DATE_ONLY:case p.TIME_ONLY:case p.TIMESTAMP_OFFSET:return this.renderDateStatistics();default:return i(a,null)}}renderNumberStatistics(){const{statistics:t,_t9nStrings:s}=this;if(!t)return this.renderNoStatistics();const{statistics:e}=s;return i("div",null,i("div",{class:"statistics-row"},i("div",null,e.numberOfValues),i("div",{class:"data"},this._printNumValue(t.totalCount))),y(t.sum)?i("div",{class:"statistics-row"},i("div",null,e.sumOfValues),i("div",{class:"data"},this._printNumValue(t.sum))):null,y(t.min)?i("div",{class:"statistics-row"},i("div",null,e.minimum),i("div",{class:"data"},this._printNumValue(t.min))):null,y(t.max)?i("div",{class:"statistics-row"},i("div",null,e.maximum),i("div",{class:"data"},this._printNumValue(t.max))):null,y(t.avg)?i("div",{class:"statistics-row"},i("div",null,e.average),i("div",{class:"data"},this._printNumValue(t.avg))):null,y(t.stddev)?i("div",{class:"statistics-row"},i("div",null,e.standardDeviation),i("div",{class:"data"},this._printNumValue(t.stddev))):null,this.renderNullValues())}renderStringStatistics(){const{statistics:t,uniqueValuesStatus:s,_t9nStrings:e}=this,{statistics:n}=e;return i("div",null,i("div",{class:"statistics-row"},i("div",null,n.numberOfValues),s!==v.SUCCESS?i("div",{class:"missing"},"--"):i("div",{class:"data"},this._printNumValue(t?.totalCount))),this.renderNullValues(),this.renderTopValues())}renderDateStatistics(){const{statistics:t,view:s,props:e,_t9nStrings:n}=this,{fieldInfo:r}=e;if(!t)return this.renderNoStatistics();const{statistics:a}=n,l=t.max-t.min,o=Math.floor(l/31536e6);let c=Math.floor((l-31536e6*o)/2628e6),u=Math.ceil((l-2628e6*c)/864e5);u>=30&&(c+=1,u=0);let d=1===o?a.timeSpanOptions.year:o>1?a.timeSpanOptions.years.replace("${years}",o.toString()):"";d+=o>0&&(c>0||u>0)?", ":"",d+=1===c?a.timeSpanOptions.month:c>1?a.timeSpanOptions.months.replace("${months}",c.toString()):"",d+=c>0&&u>0?", ":"",d+=1===u?a.timeSpanOptions.day:u>1?a.timeSpanOptions.days.replace("${days}",u.toString()):"";const h=r.simpleFieldType!==p.TIMESTAMP_OFFSET||!s||"unknown"!==s.timeZone,f=r.simpleFieldType===p.TIME_ONLY;return i("div",null,i("div",{class:"statistics-row"},i("div",null,a.numberOfValues),i("div",{class:"data"},this._printNumValue(t?.totalCount))),h&&y(t.min)?i("div",{class:"statistics-row"},i("div",null,f?a.minimumTime:a.minimumDate),i("div",{class:"data"},`${this._getDisplayString(t.min)}`)):null,h&&y(t.max)?i("div",{class:"statistics-row"},i("div",null,f?a.maximumTime:a.maximumDate),i("div",{class:"data"},`${this._getDisplayString(t.max)}`)):null,h&&y(t.avg)?i("div",{class:"statistics-row"},i("div",null,f?a.averageTime:a.averageDate),i("div",{class:"data"},`${this._getDisplayString(t.avg)}`)):null,h&&!f&&y(t.min)&&y(t.max)&&l>0?i("div",{class:"statistics-row"},i("div",null,a.timespan),i("div",{class:"data"},d)):null,this.renderNullValues())}renderTopValues(){const{uniqueValues:t,uniqueValuesStatus:s,_t9nStrings:e,props:n}=this,{fieldInfo:r}=n,{statistics:l}=e;if(t?.uniqueValueInfos?.length){const s=t.uniqueValueInfos;s.sort(((t,s)=>t.count<s.count?1:t.count>s.count?-1:0));const e=r.codedValues,n=s.filter((t=>null!==t.value)).filter(((t,s)=>t&&s<10)).map((t=>{let s=t.value;return e?e.forEach((t=>{s===t.code&&(s=t.name)})):s=this._getDisplayString(s),i("div",{class:"statistics-row"},i("div",{class:"data"},`${s}`),i("div",{class:'$"data" $"count"'},this._printNumValue(t.count)))}));return n.length?i("div",null,i("div",{class:"statistics-row-top-values"},i("div",null,s.length>10?l.topTenValues:l.topValues),i("div",null,l.count)),n):i(a,null)}return i("div",null,i("div",{class:"statistics-row-top-values"},i("div",null,l.topValues),i("div",null,l.count)),i("div",{class:"statistics-row"},i("div",{class:"missing"},s===v.FAILED?e.fieldUniqueValuesNotAvailable:e.fieldSampleRetrieving)))}renderNullValues(){const{statistics:t,uniqueValues:s,_t9nStrings:e}=this,{statistics:n}=e;let r=t?.nullcount;if(!y(r)&&s){const t=s.uniqueValueInfos;for(let s=0;s<t.length;s++){const e=t[s];if(null===e.value){r=e.count;break}}}return i("div",{class:"statistics-row"},i("div",null,n.numberOfNulls),y(r)?i("div",{class:"data"},`${new Number(r).toLocaleString()}`):i("div",{class:"missing"},"--"))}_getFieldTypeLabel(t){const{_t9nStrings:s}=this,e=s.fieldTypes;switch(t){case"small-integer":return e.smallInteger;case"big-integer":return e.bigInteger;case"integer":return e.integer;case"single":return e.single;case"double":return e.double;case"long":return e.long;case"string":default:return e.string;case"date":return e.date;case"date-only":return e.dateOnly;case"time-only":return e.timeOnly;case"timestamp-offset":return e.timestampOffset;case"oid":return e.oid;case"guid":return e.guid;case"global-id":return e.globalId}}_getStatisticsType(t){switch(t.layerField.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":if(t.codedValues)return p.STRING;switch(t.layerField.valueType){case"name-or-title":case"type-or-category":case"description":case"location-or-place-name":case"ordered-or-ranked":case"binary":return p.STRING;default:return p.NUMBER}case"string":return p.STRING;case"date":return p.DATE;case"timestamp-offset":return p.TIMESTAMP_OFFSET;case"date-only":return p.DATE_ONLY;case"time-only":return p.TIME_ONLY;default:return p.STRING}}_getFieldValueTypeCamelCase(t){switch(t.layerField.valueType){case"count-or-amount":return"countOrAmount";case"percentage-or-ratio":return"percentageOrRatio";case"unique-identifier":return"uniqueIdentifier";case"name-or-title":return"nameOrTitle";case"type-or-category":return"typeOrCategory";case"location-or-place-name":return"locationOrPlaceName";case"ordered-or-ranked":return"orderedOrRanked";case"date-and-time":return"dateAndTime";default:return t.layerField.valueType}}_getDisplayString(t){const{props:s}=this,{fieldInfo:e}=s;switch(e.simpleFieldType){case p.DATE:return this._getDateString(t);case p.TIMESTAMP_OFFSET:return this._getTimestampOffsetString(t);case p.DATE_ONLY:return this._getDateOnlyString(t);case p.TIME_ONLY:return this._getTimeOnlyString(t);case p.NUMBER:return this._getNumberString(t);case p.GUID:return this._getGuidString(t);default:return`${t}`}}_getDateString(t){const{modules:s,view:e}=this.props;return s.intl.formatDate(t,e&&"unknown"===e.timeZone?{...s.intl.convertDateFormatToIntlOptions("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}:{...s.intl.convertDateFormatToIntlOptions("short-date-short-time"),timeZone:e?.timeZone||"system"})}_getTimestampOffsetString(t){const{modules:s,view:e}=this.props;return"string"==typeof t?s.intl.formatTimestamp(t,e&&"unknown"===e.timeZone?{...s.intl.convertDateFormatToIntlOptions("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}:{...s.intl.convertDateFormatToIntlOptions("short-date-short-time"),timeZone:e?.timeZone||"system"}):this._getDateString(t)}_getDateOnlyString(t){const{props:s}=this,{modules:e}=s;return e.intl.formatDateOnly(t,e.intl.convertDateFormatToIntlOptions("short-date"))}_getTimeOnlyString(t){const{props:s}=this,{modules:e}=s;return"string"==typeof t?e.intl.formatTimeOnly(t,e.intl.convertDateFormatToIntlOptions("short-date-long-time")):e.intl.formatDate(t,{...e.intl.convertDateFormatToIntlOptions("long-time"),timeZone:"utc"})}_getGuidString(t){return t.startsWith("{")?t:`{${t}}`}_getNumberString(t){return this.props.modules.intl.formatNumber(t)}_printNumValue(t){return y(t)?this._getNumberString(Math.round(100*t)/100):"--"}static get assetsDirs(){return["assets"]}get _hostElement(){return r(this)}};_.style=":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}";export{_ as arcgis_field_info}
@@ -1,2 +0,0 @@
1
- let e,n,t=!1;const l=e=>{const n=new URL(e,oe.t);return n.origin!==te.location.origin?n.href:n.pathname},o={},s=e=>"object"==(e=typeof e)||"function"===e;function i(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const c=(e,n,...t)=>{let l=null,o=null,i=!1,c=!1;const u=[],f=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!s(l))&&(l+=""),i&&c?u[u.length-1].l+=l:u.push(i?r(null,l):l),c=i)};if(f(t),n){n.key&&(o=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}if("function"==typeof e)return e(null===n?{}:n,u,a);const d=r(e,null);return d.o=n,u.length>0&&(d.i=u),d.u=o,d},r=(e,n)=>({m:0,p:e,l:n,h:null,i:null,o:null,u:null}),u={},a={forEach:(e,n)=>e.map(f).forEach(n),map:(e,n)=>e.map(f).map(n).map(d)},f=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.v,vtag:e.p,vtext:e.l}),d=e=>{if("function"==typeof e.vtag){const n=Object.assign({},e.vattrs);return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),c(e.vtag,n,...e.vchildren||[])}const n=r(e.vtag,e.vtext);return n.o=e.vattrs,n.i=e.vchildren,n.u=e.vkey,n.v=e.vname,n},y=e=>J(e).$hostElement$,m=(e,n,t)=>{const l=y(e);return{emit:e=>p(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},p=(e,n,t)=>{const l=oe.ce(n,t);return e.dispatchEvent(l),l},h=new WeakMap,v=e=>"sc-"+e.$,$=(e,n,t,l,o,i)=>{if(t!==l){let c=X(e,n),r=n.toLowerCase();if("class"===n){const n=e.classList,o=w(t),s=w(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===n){for(const n in t)l&&null!=l[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in l)t&&l[n]===t[n]||(n.includes("-")?e.style.setProperty(n,l[n]):e.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&l(e);else if(c||"o"!==n[0]||"n"!==n[1]){const r=s(l);if((c||r&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?c=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!c||4&i||o)&&!r&&e.setAttribute(n,l=!0===l?"":l)}else if(n="-"===n[2]?n.slice(3):X(te,r)?r.slice(2):r[2]+n.slice(3),t||l){const o=n.endsWith(g);n=n.replace(S,""),t&&oe.rel(e,n,t,o),l&&oe.ael(e,n,l,o)}}},b=/\s/,w=e=>e?e.split(b):[],g="Capture",S=RegExp(g+"$"),j=(e,n,t,l)=>{const s=11===n.h.nodeType&&n.h.host?n.h.host:n.h,i=e&&e.o||o,c=n.o||o;for(l in i)l in c||$(s,l,i[l],void 0,t,n.m);for(l in c)$(s,l,i[l],c[l],t,n.m)},k=(n,t,l)=>{const o=t.i[l];let s,i,c=0;if(null!==o.l)s=o.h=le.createTextNode(o.l);else if(s=o.h=le.createElement(o.p),j(null,o,!1),null!=e&&s["s-si"]!==e&&s.classList.add(s["s-si"]=e),o.i)for(c=0;c<o.i.length;++c)i=k(n,o,c),i&&s.appendChild(i);return s},O=(e,t,l,o,s,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=k(null,l,s),c&&(o[s].h=c,r.insertBefore(c,t)))},C=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.h;x(n),e&&e.remove()}}},M=(e,n)=>e.p===n.p&&e.u===n.u,P=(e,n)=>{const t=n.h=e.h,l=e.i,o=n.i,s=n.l;null===s?(j(e,n,!1),null!==l&&null!==o?((e,n,t,l)=>{let o,s,i=0,c=0,r=0,u=0,a=n.length-1,f=n[0],d=n[a],y=l.length-1,m=l[0],p=l[y];for(;i<=a&&c<=y;)if(null==f)f=n[++i];else if(null==d)d=n[--a];else if(null==m)m=l[++c];else if(null==p)p=l[--y];else if(M(f,m))P(f,m),f=n[++i],m=l[++c];else if(M(d,p))P(d,p),d=n[--a],p=l[--y];else if(M(f,p))P(f,p),e.insertBefore(f.h,d.h.nextSibling),f=n[++i],p=l[--y];else if(M(d,m))P(d,m),e.insertBefore(d.h,f.h),d=n[--a],m=l[++c];else{for(r=-1,u=i;u<=a;++u)if(n[u]&&null!==n[u].u&&n[u].u===m.u){r=u;break}r>=0?(s=n[r],s.p!==m.p?o=k(n&&n[c],t,r):(P(s,m),n[r]=void 0,o=s.h),m=l[++c]):(o=k(n&&n[c],t,c),m=l[++c]),o&&f.h.parentNode.insertBefore(o,f.h)}i>a?O(e,null==l[y+1]?null:l[y+1].h,t,l,c,y):c>y&&C(n,i,a)})(t,l,n,o):null!==o?(null!==e.l&&(t.textContent=""),O(t,null,n,o,0,o.length-1)):null!==l&&C(l,0,l.length-1)):e.l!==s&&(t.data=s)},x=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(x)},E=(e,n)=>{n&&!e.S&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.S=n)))},L=(e,n)=>{if(e.m|=16,!(4&e.m))return E(e,e.j),ye((()=>R(e,n)));e.m|=512},R=(e,n)=>{const t=e.k;let l;return n&&(l=H(t,"componentWillLoad")),A(l,(()=>N(e,t,n)))},A=(e,n)=>F(e)?e.then(n):n(),F=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,N=async(e,n,t)=>{var l;const o=e.$hostElement$,s=o["s-rc"];t&&(e=>{const n=e.O,t=e.$hostElement$,l=n.m,o=((e,n)=>{var t;const l=v(n),o=ne.get(l);if(e=11===e.nodeType?e:le,o)if("string"==typeof o){let n,s=h.get(e=e.head||e);if(s||h.set(e,s=new Set),!s.has(l)){{n=le.createElement("style"),n.innerHTML=o;const l=null!==(t=oe.C)&&void 0!==t?t:i(le);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=o,t.classList.add(o+"-h"))})(e);T(e,n,o,t),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const n=null!==(l=o["s-p"])&&void 0!==l?l:[],t=()=>U(e);0===n.length?t():(Promise.all(n).then(t),e.m|=4,n.length=0)}},T=(t,l,o,s)=>{try{l=l.render&&l.render(),t.m&=-17,t.m|=2,((t,l,o=!1)=>{const s=t.$hostElement$,i=t.M||r(null,null),a=(e=>e&&e.p===u)(l)?l:c(null,null,l);if(n=s.tagName,o&&a.o)for(const e of Object.keys(a.o))s.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(a.o[e]=s[e]);a.p=null,a.m|=4,t.M=a,a.h=i.h=s.shadowRoot||s,e=s["s-sc"],P(i,a)})(t,l,s)}catch(e){Y(e,t.$hostElement$)}return null},U=e=>{const n=e.$hostElement$,t=e.k,l=e.j;64&e.m||(e.m|=64,q(n),H(t,"componentDidLoad"),e.P(n),l||W()),e.L(n),e.S&&(e.S(),e.S=void 0),512&e.m&&de((()=>L(e,!1))),e.m&=-517},W=()=>{q(le.documentElement),de((()=>p(te,"appload",{detail:{namespace:"arcgis-common-components"}})))},H=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){Y(e)}},q=e=>e.setAttribute("hydrated",""),D=(e,n,t)=>{var l;if(n.R){e.watchers&&(n.A=e.watchers);const o=Object.entries(n.R),i=e.prototype;if(o.map((([e,[l]])=>{31&l||2&t&&32&l?Object.defineProperty(i,e,{get(){return((e,n)=>J(this).F.get(n))(0,e)},set(t){((e,n,t,l)=>{const o=J(e),i=o.$hostElement$,c=o.F.get(n),r=o.m,u=o.k;if(t=((e,n)=>null==e||s(e)?e:4&n?"false"!==e&&(""===e||!!e):2&n?parseFloat(e):1&n?e+"":e)(t,l.R[n][0]),(!(8&r)||void 0===c)&&t!==c&&(!Number.isNaN(c)||!Number.isNaN(t))&&(o.F.set(n,t),u)){if(l.A&&128&r){const e=l.A[n];e&&e.map((e=>{try{u[e](t,c,n)}catch(e){Y(e,i)}}))}2==(18&r)&&L(o,!1)}})(this,e,t,n)},configurable:!0,enumerable:!0}):1&t&&64&l&&Object.defineProperty(i,e,{value(...n){const t=J(this);return t.N.then((()=>t.k[e](...n)))}})})),1&t){const t=new Map;i.attributeChangedCallback=function(e,l,o){oe.jmp((()=>{const s=t.get(e);if(this.hasOwnProperty(s))o=this[s],delete this[s];else{if(i.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==o)return;if(null==s){const t=J(this),s=null==t?void 0:t.m;if(!(8&s)&&128&s&&o!==l){const s=t.k,i=n.A[e];null==i||i.forEach((n=>{null!=s[n]&&s[n].call(s,o,l,e)}))}return}}this[s]=(null!==o||"boolean"!=typeof this[s])&&o}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=n.A)&&void 0!==l?l:{}),...o.filter((([e,n])=>15&n[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},V=e=>{H(e,"connectedCallback")},_=e=>{H(e,"disconnectedCallback")},z=(e,n={})=>{var t;const l=[],o=n.exclude||[],s=te.customElements,c=le.head,r=c.querySelector("meta[charset]"),u=le.createElement("style"),a=[];let f,d=!0;Object.assign(oe,n),oe.t=new URL(n.resourcesUrl||"./",le.baseURI).href,e.map((e=>{e[1].map((n=>{var t;const i={m:n[0],$:n[1],R:n[2],T:n[3]};i.R=n[2],i.A=null!==(t=n[4])&&void 0!==t?t:{};const c=i.$,r=class extends HTMLElement{constructor(e){super(e),Q(e=this,i),1&i.m&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):oe.jmp((()=>(e=>{if(0==(1&oe.m)){const n=J(e),t=n.O,l=()=>{};if(1&n.m)(null==n?void 0:n.k)?V(n.k):(null==n?void 0:n.U)&&n.U.then((()=>V(n.k)));else{n.m|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){E(n,n.j=t);break}}t.R&&Object.entries(t.R).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t)=>{let l;if(0==(32&n.m)){n.m|=32;{if(l=ee(t),l.then){const e=()=>{};l=await l,e()}l.isProxied||(t.A=l.watchers,D(l,t,2),l.isProxied=!0);const e=()=>{};n.m|=8;try{new l(n)}catch(e){Y(e)}n.m&=-9,n.m|=128,e(),V(n.k)}if(l.style){let e=l.style;const n=v(t);if(!ne.has(n)){const l=()=>{};((e,n,t)=>{let l=ne.get(e);ie&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,ne.set(e,l)})(n,e,!!(1&t.m)),l()}}}const o=n.j,s=()=>L(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(0,n,t)}l()}})(this)))}disconnectedCallback(){oe.jmp((()=>(async()=>{if(0==(1&oe.m)){const e=J(this);(null==e?void 0:e.k)?_(e.k):(null==e?void 0:e.U)&&e.U.then((()=>_(e.k)))}})()))}componentOnReady(){return J(this).U}};i.W=e[0],o.includes(c)||s.get(c)||(l.push(c),s.define(c,D(r,i,1)))}))}));{u.innerHTML=l+"{visibility:hidden}[hydrated]{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(t=oe.C)&&void 0!==t?t:i(le);null!=e&&u.setAttribute("nonce",e),c.insertBefore(u,r?r.nextSibling:c.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):oe.jmp((()=>f=setTimeout(W,30)))},B=(e,n)=>n,G=e=>oe.C=e,I=new WeakMap,J=e=>I.get(e),K=(e,n)=>I.set(n.k=e,n),Q=(e,n)=>{const t={m:0,$hostElement$:e,O:n,F:new Map};return t.N=new Promise((e=>t.L=e)),t.U=new Promise((e=>t.P=e)),e["s-p"]=[],e["s-rc"]=[],I.set(e,t)},X=(e,n)=>n in e,Y=(e,n)=>(0,console.error)(e,n),Z=new Map,ee=e=>{const n=e.$.replace(/-/g,"_"),t=e.W,l=Z.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(Z.set(t,e),e[n])),Y)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ne=new Map,te="undefined"!=typeof window?window:{},le=te.document||{head:{}},oe={m:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},se=e=>Promise.resolve(e),ie=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ce=[],re=[],ue=(e,n)=>l=>{e.push(l),t||(t=!0,n&&4&oe.m?de(fe):oe.raf(fe))},ae=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){Y(e)}e.length=0},fe=()=>{ae(ce),ae(re),(t=ce.length>0)&&oe.raf(fe)},de=e=>se().then(e),ye=ue(re,!0);export{B as F,u as H,l as a,z as b,m as c,y as g,c as h,se as p,K as r,G as s}
@@ -1,51 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ab5f2576.js');
6
- const index$1 = require('./index-2e4fbd31.js');
7
-
8
- const apiKeyCss = ":host{display:none}arcgis-api-key{display:none}";
9
-
10
- const ArcgisApiKey = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.apiKeyReady = index.createEvent(this, "apiKeyReady", 7);
14
- this.apiKey = undefined;
15
- }
16
- //--------------------------------------------------------------------------
17
- //
18
- // Watchers
19
- //
20
- //--------------------------------------------------------------------------
21
- apiKeyWatcher(value) {
22
- this._setApiKey(value);
23
- }
24
- //--------------------------------------------------------------------------
25
- //
26
- // Lifecycle
27
- //
28
- //--------------------------------------------------------------------------
29
- async connectedCallback() {
30
- if (this.apiKey) {
31
- await this._setApiKey(this.apiKey);
32
- }
33
- }
34
- //--------------------------------------------------------------------------
35
- //
36
- // Private Methods
37
- //
38
- //--------------------------------------------------------------------------
39
- async _setApiKey(value) {
40
- const config = await index$1.importConfig();
41
- config.apiKey = value;
42
- this.apiKeyReady.emit(true);
43
- }
44
- get el() { return index.getElement(this); }
45
- static get watchers() { return {
46
- "apiKey": ["apiKeyWatcher"]
47
- }; }
48
- };
49
- ArcgisApiKey.style = apiKeyCss;
50
-
51
- exports.arcgis_api_key = ArcgisApiKey;
@@ -1,139 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ab5f2576.js');
6
- const index$1 = require('./index-2e4fbd31.js');
7
-
8
- const identityCss = ":host{display:none}arcgis-identity{display:none}";
9
-
10
- const ArcgisIdentity = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.identityReady = index.createEvent(this, "identityReady", 7);
14
- this.credentialCreate = index.createEvent(this, "credentialCreate", 7);
15
- this.dialogCreate = index.createEvent(this, "dialogCreate", 7);
16
- this.identity = undefined;
17
- this.appId = undefined;
18
- this.credential = undefined;
19
- this.expiration = undefined;
20
- this.locale = undefined;
21
- this.usePopup = false;
22
- this.popupCallbackUrl = undefined;
23
- this.portalUrl = undefined;
24
- this.preserveUrlHash = false;
25
- }
26
- //--------------------------------------------------------------------------
27
- //
28
- // Watchers
29
- //
30
- //--------------------------------------------------------------------------
31
- appIdWatcher(value, oldValue) {
32
- if (oldValue !== value) {
33
- this._registerOAuth();
34
- }
35
- }
36
- //--------------------------------------------------------------------------
37
- //
38
- // Methods
39
- //
40
- //--------------------------------------------------------------------------
41
- async signIn() {
42
- if (!this.credential) {
43
- try {
44
- this.credential = await this._checkCurrentStatus();
45
- }
46
- catch (error) {
47
- this.credential = await this._fetchCredential();
48
- }
49
- }
50
- return this.credential;
51
- }
52
- async signOut() {
53
- if (!this.credential) {
54
- try {
55
- this.identity.destroyCredentials();
56
- }
57
- catch (error) {
58
- this.credential = undefined;
59
- }
60
- }
61
- this.credential = undefined;
62
- return;
63
- }
64
- //--------------------------------------------------------------------------
65
- //
66
- // Lifecycle
67
- //
68
- //--------------------------------------------------------------------------
69
- async connectedCallback() {
70
- if (this.appId) {
71
- await this._registerOAuth();
72
- }
73
- this._proxyEvents();
74
- await this._addWatchers();
75
- this.identityReady.emit({ identity: this.identity, ready: true });
76
- }
77
- //--------------------------------------------------------------------------
78
- //
79
- // Private Methods
80
- //
81
- //--------------------------------------------------------------------------
82
- async _addWatchers() {
83
- const { watch } = await index$1.importCoreReactiveUtils();
84
- watch(() => this._info.expiration, (value) => (this.expiration = value), {
85
- initial: true
86
- });
87
- }
88
- _checkCurrentStatus() {
89
- return this.identity.checkSignInStatus(`${this._info.portalUrl}/sharing`);
90
- }
91
- async _createOAuthInfo() {
92
- const params = {};
93
- if (this.appId !== undefined) {
94
- params.appId = this.appId;
95
- }
96
- if (this.locale !== undefined) {
97
- params.locale = this.locale;
98
- }
99
- if (this.popupCallbackUrl !== undefined) {
100
- params.popupCallbackUrl = this.popupCallbackUrl;
101
- }
102
- if (this.preserveUrlHash !== undefined) {
103
- params.preserveUrlHash = this.preserveUrlHash;
104
- }
105
- if (this.usePopup !== undefined) {
106
- params.popup = this.usePopup;
107
- }
108
- if (this.portalUrl !== undefined) {
109
- params.portalUrl = this.portalUrl;
110
- }
111
- const info = await index$1.newIdentityOAuthInfo(params);
112
- this._info = info;
113
- return info;
114
- }
115
- async _fetchCredential() {
116
- const credential = await this.identity.getCredential(`${this._info?.portalUrl}/sharing`, {
117
- error: null,
118
- oAuthPopupConfirmation: false,
119
- token: null
120
- });
121
- return credential;
122
- }
123
- async _registerOAuth() {
124
- this.identity = await index$1.importIdentityIdentityManager();
125
- const info = await this._createOAuthInfo();
126
- this.identity.registerOAuthInfos([info]);
127
- }
128
- _proxyEvents() {
129
- this.identity.on("credential-create", (e) => this.credentialCreate.emit(e));
130
- this.identity.on("dialog-create", (e) => this.dialogCreate.emit(e));
131
- }
132
- get el() { return index.getElement(this); }
133
- static get watchers() { return {
134
- "appId": ["appIdWatcher"]
135
- }; }
136
- };
137
- ArcgisIdentity.style = identityCss;
138
-
139
- exports.arcgis_identity = ArcgisIdentity;
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- 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);}
4
-
5
- exports.C = C;
6
- exports.F = F;
7
- exports.U = U;
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface ArcgisApiKey extends Components.ArcgisApiKey, HTMLElement {}
4
- export const ArcgisApiKey: {
5
- prototype: ArcgisApiKey;
6
- new (): ArcgisApiKey;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,69 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
- import { i as importConfig } from './index2.js';
3
-
4
- const apiKeyCss = ":host{display:none}arcgis-api-key{display:none}";
5
-
6
- const ArcgisApiKey$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisApiKey extends HTMLElement {
7
- constructor() {
8
- super();
9
- this.__registerHost();
10
- this.apiKeyReady = createEvent(this, "apiKeyReady", 7);
11
- this.apiKey = undefined;
12
- }
13
- //--------------------------------------------------------------------------
14
- //
15
- // Watchers
16
- //
17
- //--------------------------------------------------------------------------
18
- apiKeyWatcher(value) {
19
- this._setApiKey(value);
20
- }
21
- //--------------------------------------------------------------------------
22
- //
23
- // Lifecycle
24
- //
25
- //--------------------------------------------------------------------------
26
- async connectedCallback() {
27
- if (this.apiKey) {
28
- await this._setApiKey(this.apiKey);
29
- }
30
- }
31
- //--------------------------------------------------------------------------
32
- //
33
- // Private Methods
34
- //
35
- //--------------------------------------------------------------------------
36
- async _setApiKey(value) {
37
- const config = await importConfig();
38
- config.apiKey = value;
39
- this.apiKeyReady.emit(true);
40
- }
41
- get el() { return this; }
42
- static get watchers() { return {
43
- "apiKey": ["apiKeyWatcher"]
44
- }; }
45
- static get style() { return apiKeyCss; }
46
- }, [0, "arcgis-api-key", {
47
- "apiKey": [1, "api-key"]
48
- }, undefined, {
49
- "apiKey": ["apiKeyWatcher"]
50
- }]);
51
- function defineCustomElement$1() {
52
- if (typeof customElements === "undefined") {
53
- return;
54
- }
55
- const components = ["arcgis-api-key"];
56
- components.forEach(tagName => { switch (tagName) {
57
- case "arcgis-api-key":
58
- if (!customElements.get(tagName)) {
59
- customElements.define(tagName, ArcgisApiKey$1);
60
- }
61
- break;
62
- } });
63
- }
64
- defineCustomElement$1();
65
-
66
- const ArcgisApiKey = ArcgisApiKey$1;
67
- const defineCustomElement = defineCustomElement$1;
68
-
69
- export { ArcgisApiKey, defineCustomElement };
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface ArcgisIdentity extends Components.ArcgisIdentity, HTMLElement {}
4
- export const ArcgisIdentity: {
5
- prototype: ArcgisIdentity;
6
- new (): ArcgisIdentity;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;