@esri/solutions-components 0.11.17 → 0.11.18

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 (73) hide show
  1. package/dist/cjs/card-manager_3.cjs.entry.js +116 -137
  2. package/dist/cjs/create-feature_4.cjs.entry.js +55 -9
  3. package/dist/cjs/create-related-feature_3.cjs.entry.js +1 -1
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +32 -19
  5. package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
  6. package/dist/cjs/{downloadUtils-88ec0e88.js → downloadUtils-9abff913.js} +1 -1
  7. package/dist/cjs/feature-list.cjs.entry.js +3 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-layer-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  11. package/dist/cjs/{mapViewUtils-319df9ec.js → mapViewUtils-4ea7216c.js} +0 -44
  12. package/dist/cjs/{popupUtils-ca1127aa.js → popupUtils-fc7557da.js} +1 -1
  13. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  14. package/dist/cjs/solution-item-accordion.cjs.entry.js +6 -3
  15. package/dist/cjs/solutions-components.cjs.js +1 -1
  16. package/dist/collection/assets/t9n/crowdsource-manager/resources.json +4 -1
  17. package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +4 -1
  18. package/dist/collection/components/card-manager/card-manager.js +1 -1
  19. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -0
  20. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +32 -18
  21. package/dist/collection/components/info-card/info-card.js +88 -7
  22. package/dist/collection/components/layer-table/layer-table.js +147 -137
  23. package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +11 -4
  24. package/dist/components/card-manager2.js +1 -1
  25. package/dist/components/crowdsource-manager.js +33 -19
  26. package/dist/components/info-card2.js +54 -6
  27. package/dist/components/layer-table2.js +116 -136
  28. package/dist/components/map-select-tools2.js +1 -1
  29. package/dist/components/queryUtils.js +1 -43
  30. package/dist/components/refine-selection2.js +1 -1
  31. package/dist/components/solution-item-accordion.js +6 -3
  32. package/dist/esm/card-manager_3.entry.js +116 -137
  33. package/dist/esm/create-feature_4.entry.js +55 -9
  34. package/dist/esm/create-related-feature_3.entry.js +1 -1
  35. package/dist/esm/crowdsource-manager.entry.js +32 -19
  36. package/dist/esm/crowdsource-reporter.entry.js +1 -1
  37. package/dist/esm/{downloadUtils-22a8f2d8.js → downloadUtils-36d854d2.js} +1 -1
  38. package/dist/esm/feature-list.entry.js +3 -3
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/map-layer-picker.entry.js +1 -1
  41. package/dist/esm/map-select-tools_3.entry.js +2 -2
  42. package/dist/esm/{mapViewUtils-a854e298.js → mapViewUtils-9da9be1c.js} +1 -43
  43. package/dist/esm/{popupUtils-1314cb13.js → popupUtils-64d25cb0.js} +1 -1
  44. package/dist/esm/public-notification.entry.js +2 -2
  45. package/dist/esm/solution-item-accordion.entry.js +6 -3
  46. package/dist/esm/solutions-components.js +1 -1
  47. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +4 -1
  48. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +4 -1
  49. package/dist/solutions-components/{p-43d9bb7d.entry.js → p-055706e3.entry.js} +1 -1
  50. package/dist/solutions-components/{p-8ea0a36a.entry.js → p-06970873.entry.js} +1 -1
  51. package/dist/solutions-components/{p-bf2598f8.entry.js → p-3c43839b.entry.js} +1 -1
  52. package/dist/solutions-components/{p-4f514c6d.js → p-6eab9d1f.js} +1 -1
  53. package/dist/solutions-components/{p-a003600b.entry.js → p-72ae3bf0.entry.js} +1 -1
  54. package/dist/solutions-components/p-777ed6b0.entry.js +6 -0
  55. package/dist/solutions-components/{p-5ea1e18b.entry.js → p-8b5c3c9f.entry.js} +1 -1
  56. package/dist/solutions-components/{p-1fe3577a.entry.js → p-a44815ea.entry.js} +1 -1
  57. package/dist/solutions-components/p-b1bd3028.entry.js +6 -0
  58. package/dist/solutions-components/{p-3c3aecdd.js → p-d0d21a1f.js} +1 -1
  59. package/dist/solutions-components/{p-952da957.js → p-dcd2f00b.js} +2 -2
  60. package/dist/solutions-components/{p-bc2548ba.entry.js → p-e2270562.entry.js} +1 -1
  61. package/dist/solutions-components/p-e90c0e26.entry.js +6 -0
  62. package/dist/solutions-components/solutions-components.esm.js +1 -1
  63. package/dist/solutions-components_commit.txt +6 -6
  64. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +11 -7
  65. package/dist/types/components/info-card/info-card.d.ts +16 -0
  66. package/dist/types/components/layer-table/layer-table.d.ts +32 -21
  67. package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +1 -1
  68. package/dist/types/components.d.ts +19 -2
  69. package/dist/types/preact.d.ts +2 -1
  70. package/package.json +1 -1
  71. package/dist/solutions-components/p-87919d6d.entry.js +0 -6
  72. package/dist/solutions-components/p-b37be371.entry.js +0 -6
  73. package/dist/solutions-components/p-ce8377c6.entry.js +0 -6
@@ -254,6 +254,10 @@ export declare class CrowdsourceManager {
254
254
  * boolean: if true panel will be in loading state
255
255
  */
256
256
  _isLoading: boolean;
257
+ /**
258
+ * boolean: if true map extent filter is applied
259
+ */
260
+ _mapExtentFilterChecked: boolean;
257
261
  /**
258
262
  * boolean: When true the default appLayout has been applied and should no longer override
259
263
  */
@@ -494,6 +498,12 @@ export declare class CrowdsourceManager {
494
498
  * @protected
495
499
  */
496
500
  protected _deleteModal(): VNode;
501
+ /**
502
+ * Shows the map extent filter
503
+ * @returns map extent filter
504
+ * @protected
505
+ */
506
+ protected _mapExtentFilter(): VNode;
497
507
  /**
498
508
  * Show filter component in modal
499
509
  *
@@ -515,7 +525,7 @@ export declare class CrowdsourceManager {
515
525
  */
516
526
  protected _toggleFilter(): void;
517
527
  /**
518
- * Reset the filter active prop
528
+ * Reset the applied filters
519
529
  *
520
530
  * @protected
521
531
  */
@@ -526,12 +536,6 @@ export declare class CrowdsourceManager {
526
536
  * @protected
527
537
  */
528
538
  protected _closeFilter(): Promise<void>;
529
- /**
530
- * Update the filter state
531
- *
532
- * @protected
533
- */
534
- protected _updateFilter(): Promise<void>;
535
539
  /**
536
540
  * Update the component layout when its size changes
537
541
  *
@@ -58,6 +58,10 @@ export declare class InfoCard {
58
58
  * string: Set the position of the feature info
59
59
  */
60
60
  position?: string;
61
+ /**
62
+ * boolean: If true show close button on the feature info
63
+ */
64
+ showCloseBtn?: boolean;
61
65
  /**
62
66
  * boolean: When true a alert will be shown to indicate a problem or confirm the current action
63
67
  */
@@ -85,6 +89,10 @@ export declare class InfoCard {
85
89
  * All UI strings should be defined here.
86
90
  */
87
91
  _translations: typeof InfoCard_T9n;
92
+ /**
93
+ * boolean: When true user has been navigated to related feature
94
+ */
95
+ _navigatedToRelatedFeature: boolean;
88
96
  /**
89
97
  * esri/widgets/Feature: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html
90
98
  * used for module import
@@ -115,6 +123,10 @@ export declare class InfoCard {
115
123
  * esri/core/reactiveUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
116
124
  */
117
125
  protected reactiveUtils: typeof import("esri/core/reactiveUtils");
126
+ /**
127
+ * __esri.Graphic: Related feature selected from the features widget
128
+ */
129
+ protected _relatedFeature: __esri.Graphic;
118
130
  /**
119
131
  * Watch for changes to the graphic and update the feature widget
120
132
  */
@@ -164,6 +176,10 @@ export declare class InfoCard {
164
176
  * Emitted on demand when the popup is closed
165
177
  */
166
178
  popupClosed: EventEmitter<void>;
179
+ /**
180
+ * Emitted on demand when close button is clicked
181
+ */
182
+ clearSelection: EventEmitter<void>;
167
183
  /**
168
184
  * Emitted on demand when the selected index changes
169
185
  */
@@ -193,10 +193,6 @@ export declare class LayerTable {
193
193
  * IColumnsInfo: Key/value pair with fieldname/(visible in table)
194
194
  */
195
195
  protected _columnsInfo: IColumnsInfo;
196
- /**
197
- * boolean: When true the ctrl key is currently pressed
198
- */
199
- protected _ctrlIsPressed: boolean;
200
196
  /**
201
197
  * number: The id of the most recently selected row from the table
202
198
  */
@@ -302,18 +298,10 @@ export declare class LayerTable {
302
298
  * HTMLInstantAppsSocialShareElement: Element to support app sharing to social media
303
299
  */
304
300
  protected _shareNode: HTMLInstantAppsSocialShareElement;
305
- /**
306
- * boolean: When true the shift key is currently pressed
307
- */
308
- protected _shiftIsPressed: boolean;
309
301
  /**
310
302
  * HTMLCalciteDropdownElement: Dropdown the will support show/hide of table columns
311
303
  */
312
304
  protected _showHideDropdown: HTMLCalciteDropdownElement;
313
- /**
314
- * boolean: When true any onChange handeling will be skipped
315
- */
316
- protected _skipOnChange: boolean;
317
305
  /**
318
306
  * HTMLCalciteDropdownElement: Dropdown the will support overflow tools that won't fit in the current display
319
307
  */
@@ -346,10 +334,22 @@ export declare class LayerTable {
346
334
  * boolean: When true we will not evaluate if the editor has any pending edits
347
335
  */
348
336
  protected _skipEditCheck: boolean;
337
+ /**
338
+ * __esri.Handle: handle for the filter by extent
339
+ */
340
+ protected _filterByExtentHandle: __esri.Handle;
349
341
  /**
350
342
  * number[]: selected features from table
351
343
  */
352
344
  protected _tempSelectedIds: number[];
345
+ /**
346
+ * number[]: out of extent oids which are selected but now out of extent
347
+ */
348
+ protected _outOFExtentOids: number[];
349
+ /**
350
+ * boolean: When true allow table to update the records
351
+ */
352
+ protected _shouldUpdateTableOnExtentChange: boolean;
353
353
  /**
354
354
  * Update the url params when the appLayout changes
355
355
  */
@@ -417,7 +417,11 @@ export declare class LayerTable {
417
417
  /**
418
418
  * Updates the filter
419
419
  */
420
- filterUpdate(active: boolean): Promise<void>;
420
+ filterUpdate(filterActive: boolean, keepTableUpdatingOnMapExtentChange?: boolean): Promise<void>;
421
+ /**
422
+ * Validate if the table should update
423
+ */
424
+ validateTableUpdate(shouldUpdateTableOnExtentChange: boolean): Promise<void>;
421
425
  /**
422
426
  * Validate if the editor has any pending edits
423
427
  */
@@ -450,6 +454,12 @@ export declare class LayerTable {
450
454
  * @returns a promise when the operation has completed
451
455
  */
452
456
  editorInitialized(evt: CustomEvent): Promise<void>;
457
+ /**
458
+ * Respond to and close the edit record display
459
+ *
460
+ * @returns a promise when the operation has completed
461
+ */
462
+ closeEdit(): Promise<void>;
453
463
  /**
454
464
  * Scroll and zoom to the selected feature from the Features widget.
455
465
  *
@@ -808,14 +818,6 @@ export declare class LayerTable {
808
818
  * @protected
809
819
  */
810
820
  protected _handleDocumentClick(e: MouseEvent): void;
811
- /**
812
- * Keep track of key down for ctrl and shift
813
- */
814
- protected _handleKeyDown(e: KeyboardEvent): void;
815
- /**
816
- * Keep track of key up for ctrl and shift
817
- */
818
- protected _handleKeyUp(e: KeyboardEvent): void;
819
821
  /**
820
822
  * Show filter component in modal
821
823
  *
@@ -833,11 +835,20 @@ export declare class LayerTable {
833
835
  * @protected
834
836
  */
835
837
  protected _handleFilterUpdate(active: boolean): Promise<void>;
838
+ /**
839
+ * Update the table when extent is changed
840
+ */
841
+ protected _handleTableOnMapExtent(): void;
836
842
  /**
837
843
  * Close the filter modal
838
844
  * @protected
839
845
  */
840
846
  protected _closeFilter(): Promise<void>;
847
+ /**
848
+ * Query the layer for applied filter
849
+ * @returns Promise with the featureSet from the layer that match the provided ids
850
+ */
851
+ protected queryAllIds(): Promise<number[]>;
841
852
  /**
842
853
  * Handle map click events to keep table and map click selection in sync
843
854
  *
@@ -53,7 +53,7 @@ export declare class SolutionItemAccordion {
53
53
  localeWatchHandler(): Promise<void>;
54
54
  templateInfosWatchHandler(): Promise<void>;
55
55
  /**
56
- * Deselect all items in the accordion.
56
+ * Deselects all items in the accordion and closes the accordion item containing it.
57
57
  * Only applies when selectionMode is "single" or "single-persist".
58
58
  */
59
59
  deselectAll(): Promise<void>;
@@ -814,6 +814,10 @@ export namespace Components {
814
814
  * @returns Promise when complete
815
815
  */
816
816
  "refresh": () => Promise<any>;
817
+ /**
818
+ * boolean: If true show close button on the feature info
819
+ */
820
+ "showCloseBtn"?: boolean;
817
821
  /**
818
822
  * Toggle the visibility of the features list view
819
823
  */
@@ -948,7 +952,7 @@ export namespace Components {
948
952
  /**
949
953
  * Updates the filter
950
954
  */
951
- "filterUpdate": (active: boolean) => Promise<void>;
955
+ "filterUpdate": (filterActive: boolean, keepTableUpdatingOnMapExtentChange?: boolean) => Promise<void>;
952
956
  /**
953
957
  * boolean: when true we will honor field order and visibility that may have been defined in the map viewer if no field order is defined in the mapInfo. Field order defined in the mapInfo as would be the case for Instant App configurations will always override this map level setting.
954
958
  */
@@ -1001,6 +1005,10 @@ export namespace Components {
1001
1005
  * Validate if the editor has any pending edits
1002
1006
  */
1003
1007
  "validateActiveEdits": () => Promise<boolean>;
1008
+ /**
1009
+ * Validate if the table should update
1010
+ */
1011
+ "validateTableUpdate": (shouldUpdateTableOnExtentChange: boolean) => Promise<void>;
1004
1012
  /**
1005
1013
  * boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table
1006
1014
  */
@@ -1788,7 +1796,7 @@ export namespace Components {
1788
1796
  }
1789
1797
  interface SolutionItemAccordion {
1790
1798
  /**
1791
- * Deselect all items in the accordion. Only applies when selectionMode is "single" or "single-persist".
1799
+ * Deselects all items in the accordion and closes the accordion item containing it. Only applies when selectionMode is "single" or "single-persist".
1792
1800
  */
1793
1801
  "deselectAll": () => Promise<void>;
1794
1802
  /**
@@ -2380,6 +2388,7 @@ declare global {
2380
2388
  };
2381
2389
  interface HTMLInfoCardElementEventMap {
2382
2390
  "popupClosed": void;
2391
+ "clearSelection": void;
2383
2392
  "selectionChanged": { selectedFeature: __esri.Graphic[], selectedFeatureIndex: number };
2384
2393
  }
2385
2394
  interface HTMLInfoCardElement extends Components.InfoCard, HTMLStencilElement {
@@ -3703,6 +3712,10 @@ declare namespace LocalJSX {
3703
3712
  * esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
3704
3713
  */
3705
3714
  "mapView"?: __esri.MapView;
3715
+ /**
3716
+ * Emitted on demand when close button is clicked
3717
+ */
3718
+ "onClearSelection"?: (event: InfoCardCustomEvent<void>) => void;
3706
3719
  /**
3707
3720
  * Emitted on demand when the popup is closed
3708
3721
  */
@@ -3719,6 +3732,10 @@ declare namespace LocalJSX {
3719
3732
  * string: Set the position of the feature info
3720
3733
  */
3721
3734
  "position"?: string;
3735
+ /**
3736
+ * boolean: If true show close button on the feature info
3737
+ */
3738
+ "showCloseBtn"?: boolean;
3722
3739
  }
3723
3740
  interface JsonEditor {
3724
3741
  /**
@@ -87,8 +87,9 @@ declare module "preact/src/jsx" {
87
87
  "onsiteChanged"?: (event: CustomEvent<any>) => void;
88
88
  }
89
89
 
90
- "info-card": Omit<JSX.SolutionsInfoCard, "onPopupClosed" | "onSelectionChanged"> & JSXInternal.HTMLAttributes<HTMLSolutionsInfoCardElement> & {
90
+ "info-card": Omit<JSX.SolutionsInfoCard, "onPopupClosed" | "onClearSelection" | "onSelectionChanged"> & JSXInternal.HTMLAttributes<HTMLSolutionsInfoCardElement> & {
91
91
  "onpopupClosed"?: (event: CustomEvent<any>) => void;
92
+ "onclearSelection"?: (event: CustomEvent<any>) => void;
92
93
  "onselectionChanged"?: (event: CustomEvent<any>) => void;
93
94
  }
94
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solutions-components",
3
- "version": "0.11.17",
3
+ "version": "0.11.18",
4
4
  "description": "Web Components for Esri's Solutions Applications",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as i,g as e,h as s,H as a}from"./p-1b0588d2.js";import{g as h,l as o}from"./p-ee2cbba0.js";import{g as l,q as n,e as c,f as r,i as d,j as p,c as b}from"./p-952da957.js";import{d as f}from"./p-4f514c6d.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-4fe489cf.js";import"./p-2bc98cb0.js";import"./p-4f236b5d.js";import"./p-570b13d9.js";import"./p-0668e30d.js";const u=class{constructor(e){t(this,e),this.createWorkFlowStarted=i(this,"createWorkFlowStarted",7),this.backFromCreateWorkFlow=i(this,"backFromCreateWorkFlow",7),this.featureOrRecordSubmitted=i(this,"featureOrRecordSubmitted",7)}get el(){return e(this)}customInfoText;enableEditGeometry=!1;isMobile;layer;locale;mapView;zoomAndScrollToSelected;selectedFeaturesIds;enableCreateFeatures=!0;selectingFeatureFromMap;_cardLoading=!1;_graphics;_showCreateFeatureComponent=!1;_showSubmitBtn=!1;_translations;_isFeatureCreated=!1;_createFeature;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}createWorkFlowStarted;backFromCreateWorkFlow;featureOrRecordSubmitted;async featureSelectionChange(t){this._showCreateFeatureComponent&&!this._isFeatureCreated&&this._backFromCreateFeature();const i=t.detail;this._graphics=await this._getFeaturesByIds(i)}async layerSelectionChange(t){this._showCreateFeatureComponent&&this._backFromCreateFeature();const i=t.detail[0];this.layer=await l(this.mapView,i)}async componentWillLoad(){await this._getTranslations(),this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){const t=this._graphics?.length>0?"":"display-none",i=0===this._graphics?.length&&this._showCreateFeatureComponent?"":"display-none",e=this._graphics?.length>0||this._showCreateFeatureComponent?"display-none":"",h=this.layer?.isTable,o=h?this._translations.createRecord:this._translations.createFeature,l=this.customInfoText?this.customInfoText:this.selectingFeatureFromMap?this._translations.selectFeaturesFromMapToStart:this._translations.selectFeaturesToStart,n=this.enableCreateFeatures&&this.layer?.capabilities?.operations?.supportsAdd;return s(a,{key:"5557aa4d80b859335e38db3f4255f4a61d00560f"},s("div",{key:"6756e3314fc3444a982010a3cfa702d77f05f316",class:"overflow-auto height-full"},s("calcite-shell",{key:"715eb7ed692a1d00347d44f20df370cf9a91ded5",class:"position-relative "+t},s("div",{key:"baf4e97c1884f477e4077a6dc8e59d98c77593a4",class:"position-static z-index-500"},s("info-card",{key:"e2ed262e2ebdf9b79ddd725f073f13d6a17909d2",enableEditGeometry:this.enableEditGeometry,graphics:this._graphics,isLoading:this._cardLoading,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView}))),s("calcite-shell",{key:"536b1dec2a539191f30b648f70a6bdcd447a6d6c",class:"position-relative "+e},s("calcite-panel",{key:"285eb9f07fcaf53c23ccecb44d68ec5bb85c9528"},s("div",{key:"dd180d0c21823d5cb3007c6078c9daa81a487101",class:"padding-1"},s("calcite-notice",{key:"b7d4ffb57b912c0424bef1c828608fd41d12d561",icon:this.selectingFeatureFromMap?"map":"table",iconFlipRtl:!0,open:!0},s("div",{key:"642339477aa8b9e1cba106dcb410ef293363311f",slot:"message"},l))),!this.isMobile&&n&&s("calcite-button",{key:"835562b5a083e7fc6f558d19787d5fa2680c2938",disabled:!this.layer,onClick:()=>this._createFeatureBtnClicked(),slot:"footer",width:"full"},h?this._translations.createRecord:this._translations.createFeature))),s("calcite-shell",{key:"5aeb16a8b0e6e693b7fddd64bf1ec2fe6553f133",class:"position-relative "+i},s("calcite-flow-item",{key:"20487f672aa32832c3b6a576976ad1bb12116814"},s("calcite-panel",{key:"9cc5d827a20afbf3381be0739cc3cc6713af8d66",heading:o},s("calcite-action",{key:"c441e24039efd9ec28471e6b66bfea2a4b5a8454",class:"back-button hydrated",icon:"chevron-left",onClick:this._backFromCreateFeature.bind(this),scale:"s",slot:"header-actions-start",text:""}),this.getEditorComponent(),this._showSubmitBtn&&s("calcite-button",{key:"a858b7a2fb25e257b6c92ca5719fb3a7cc8aedbb",appearance:"solid",class:"footer-top-button footer-button",onClick:()=>{this._createFeature.submit()},slot:"footer",width:"full"},this._translations.create))))))}getEditorComponent(){return s("div",null,this._showCreateFeatureComponent&&s("create-feature",{customizeSubmit:!0,locale:this.locale,mapView:this.mapView,onDrawComplete:()=>{this._showSubmitBtn=!0},onEditingAttachment:t=>{this._showSubmitBtn=!t.detail},onProgressStatus:()=>{setTimeout((()=>{this._isFeatureCreated=!1}),2e3)},onSuccess:this._featureCreated.bind(this),ref:t=>this._createFeature=t,selectedLayerId:this.layer?.id,showGuidingMsgWhileDrawing:!1}))}async _getFeaturesByIds(t){return(t.length>0?await n(t,this.layer,[],!0,this.mapView.spatialReference):[]).sort(((i,e)=>t.indexOf(i.getObjectId())-t.indexOf(e.getObjectId())))}_createFeatureBtnClicked(){this._showCreateFeatureComponent=!0,this.createWorkFlowStarted.emit()}async _backFromCreateFeature(){this._createFeature&&(this._showCreateFeatureComponent=!1,this.backFromCreateWorkFlow.emit()),this._showSubmitBtn=!1}_featureCreated(){this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._isFeatureCreated=!0,this.featureOrRecordSubmitted.emit(),setTimeout((()=>{this._showCreateFeatureComponent=!0}),50)}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"]}}};u.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.height-full{height:100%}.position-static{position:static !important}.z-index-500{z-index:500 !important}card-manager{display:block}";const m=class{constructor(e){t(this,e),this.featureSelectionChange=i(this,"featureSelectionChange",7),this.toggleFilter=i(this,"toggleFilter",7),this.showDelete=i(this,"showDelete",7)}get el(){return e(this)}appLayout;defaultGlobalId;defaultLayerId;defaultOid;enableAutoRefresh;enableColumnReorder=!0;enableCSV;enableInlineEdit;enableShare;honorMapFieldSettings;isMobile;locale;mapHidden;mapInfo;mapView;onlyShowUpdatableLayers;selectedIds=[];shareIncludeEmbed;shareIncludeSocial;showNewestFirst;zoomAndScrollToSelected;zoomToScale;createFilterModal=!0;_allIds=[];_controlsThatFit;_csvExporting=!1;_fetchingData=!1;_filterActive=!1;_filterOpen=!1;_layer;_selectAllActive=!1;_showHideOpen=!1;_showOnlySelected=!1;_toolInfos;_translations;_fullTextSearchInfo;_searchPlaceHolder="";_size=0;_queryingData=!1;FeatureTable;TableTemplate;_columnsInfo;_ctrlIsPressed=!1;_currentId;_editEnabled;_defaultFilterHonored=!1;_defaultGlobalIdHonored=!1;_defaultOidHonored=!1;_defaultVisibleToolSizeInfos;_definitionExpression;_deleteEnabled;_editor;_filterList;_floorExpression;_floorField;_floorFacility;_floorLevel;_floorSite;_layerExpressions;_loaded=!1;_mapClickHandle;_observerSet=!1;_previousCurrentId;reactiveUtils;_refreshHandle;_resizeObserver;_selectAllElement;_selectionFromMap=!1;_shareNode;_shiftIsPressed=!1;_showHideDropdown;_skipOnChange=!1;_moreDropdown;_table;_tableNode;_timeout;_toolbar;_toolbarSizeInfos;_searchExpression;_skipEditCheck=!1;_tempSelectedIds;appLayoutWatchHandler(){this._updateShareUrl()}async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}enableCSVWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}enableShareWatchHandler(){this._toolbar&&this._updateToolbar()}_controlsThatFitWatchHandler(){const t=this._controlsThatFit?this._controlsThatFit.reduce(((t,i)=>(t.push(i.id),t)),[]):[];this._toolInfos=this._toolInfos?.map((i=>{if(i&&this._controlsThatFit){const e=this._getId(i.icon);return i.isOverflow=t.indexOf(e)<0,i}}))}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}mapHiddenWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}isMobileWatchHandler(){this._toolInfos||this.isMobile||this._initToolInfos()}async mapInfoWatchHandler(){this._resetColumnTemplates(),this.createFilterModal&&this._initLayerExpressions(),this._initToolInfos(),this._updateToolbar(),await this._sortTable()}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression=void 0,this._searchExpression=void 0,this._updateShareUrl(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",(t=>{this._mapClicked(t)})))}async _layerWatchHandler(){this._fetchingData=!0,await(this._layer?.when((async()=>{this._definitionExpression=this._layer.definitionExpression,this._floorField=this._layer.floorInfo?.floorField,this._updateFloorDefinitionExpression(),await this._resetTable(),this.createFilterModal&&this._initLayerExpressions(),this._updateShareUrl(),this._fetchingData=!1})))}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0]))}async closeFilter(){await this._closeFilter()}async filterReset(){await this._handleFilterListReset()}async filterUpdate(t){await this._handleFilterUpdate(t)}async validateActiveEdits(){return this._validateActiveEdits([],this.selectedIds)}async refresh(){this._table&&await this._refresh()}featureSelectionChange;toggleFilter;showDelete;async beforeMapInfoChange(t){const i=t.detail.ref,e=t.detail.mapInfo;if(this._hasPendingEdits()){t.preventDefault();const s=await this._validateActiveEdits([],this.selectedIds);await i.setMapByID(s?e.id:t.detail.currentId,!s)}}async editorInitialized(t){this._editor=t.detail}async selectionChanged(t){const i=t.detail.selectedFeature[0],e=i.getObjectId(),s=this._table;if(s.rowHighlightIds.length&&s.rowHighlightIds.removeAll(),s.rowHighlightIds.add(e),this.zoomAndScrollToSelected){const t=this._table.viewModel.getObjectIdIndex(e);this._table.scrollToIndex(t);const s=i.layer;let a;this.mapView.allLayerViews.toArray().some((t=>{if(t.layer.title===s.title&&"feature"===t.layer.type)return a=t,!0})),a&&await c([e],a,this.mapView,!0,void 0,this.zoomToScale)}}async beforeLayerSelectionChange(t){if(this._hasPendingEdits()){t.preventDefault();const i=t.detail.ref,e=await this._validateActiveEdits([],this.selectedIds);return t.detail.selectedIds?await i.setLayerByIds(e?t.detail.newIds:t.detail.currentIds,!0):await i.setLayerById(e?t.detail.newId:t.detail.currentId,!0)}}async layerSelectionChange(t){await this._layerSelectionChanged(t)}async editsComplete(t){const i=t.detail;"delete"!==i&&"add"!==i||(this._allIds=await r(this._layer)),await this._refresh()}async facilityChanged(t){this._floorFacility=t.detail,this._updateFloorDefinitionExpression()}async levelChanged(t){this._floorLevel=t.detail,this._updateFloorDefinitionExpression()}async siteChanged(t){this._floorSite=t.detail,this._updateFloorDefinitionExpression()}async noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}async clearSelection(){await this._validateActiveEdits([],this.selectedIds)&&this._clearSelection()}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._onResize())))}render(){const t=this._fetchingData?"display-none":"",i=this._fetchingData?"":"display-none",e=this._queryingData?"":"display-none",h=this._size.toString(),o=this.selectedIds.length.toString(),l=this.isMobile?"height-full":"height-full-adjusted",n=this._canShowFullTextSearch();return this._validateActiveActions(),s(a,{key:"68d6d57fbc9122b15340e0be3426ad00d398c7b2"},s("div",{key:"c4839ef8df0c5d3937b68c444264ce3bbb5c808d"},s("calcite-scrim",{key:"d4fa1a66ddcc5d0e83ee4ee43b2a3230e7f0298f",class:e,loading:this._queryingData}),s("calcite-shell",{key:"2ae1aee8a242902f3fbc9a1a19b62a8b721e5de7"},this._getTableControlRow("header"),s("div",{key:"73d424f4bb07f56245c2c0858544d6cb7d9fcc74",class:`width-full ${l}`},s("calcite-panel",{key:"a2404478e2daf5ebac1ff3ac10378a98c868bcb2",class:"height-full width-full"},n&&s("div",{key:"e18c71ccab7853438c51fe7168b7a98087d215e2",class:"search-container"},s("calcite-input",{key:"39ecb52bacd4560a94310a56faf084941aa44a2a",class:"search",clearable:!0,icon:"search",onCalciteInputChange:t=>{this._searchTextChanged(t)},placeholder:this._searchPlaceHolder,title:this._searchPlaceHolder,type:"search"})),s("calcite-loader",{key:"ce2aeb5e108b1d76da8694a071dcd46098e6bb28",class:i,label:this._translations.fetchingData,scale:"l"}),s("div",{key:"78e596cb45427bb9d21a11368361f67e1ed306a5",class:t,ref:this.onTableNodeCreate}))),this.isMobile?void 0:s("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",h).replace("{{selected}}",o))),this.createFilterModal&&this._filterModal()))}_deleteDialog;async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0)}componentDidRender(){document.onclick=t=>this._handleDocumentClick(t),document.onkeydown=t=>this._handleKeyDown(t),document.onkeyup=t=>this._handleKeyUp(t),this._updateToolbar()}async _initModules(){const[t,i,e]=await o(["esri/widgets/FeatureTable","esri/core/reactiveUtils","esri/widgets/FeatureTable/support/TableTemplate"]);this.FeatureTable=t,this.reactiveUtils=i,this.TableTemplate=e}async _searchTextChanged(t){this._fullTextSearchInfo.forEach((i=>{i.searchTerm=t.target.value})),this._searchFullText()}async _searchFullText(){let t=[],i=!1;if(this._showOnlySelected)t=this._tempSelectedIds,i=!0;else{if(!await this._validateActiveEdits([],this.selectedIds))return;this._clearSelection(),this._tempSelectedIds=[]}this._searchExpression&&this._clearSearchDefinitionExpression();let e=[];if(this._fullTextSearchInfo.length&&this._fullTextSearchInfo[0].searchTerm){const s=this._layer.createQuery();s.fullText=this._fullTextSearchInfo,e=await this._layer.queryObjectIds(s),i&&t?.length&&(e=e.filter((i=>t.includes(i)))),await this._updateSearchDefinitionExpression(e?.length?e:[-1])}i&&e?.length&&(this._showOnlySelected=!0,this._table.highlightIds.addMany(e.reverse())),await new Promise((t=>setTimeout(t,800))),await this._updateAllIds()}_clearSearchDefinitionExpression(){const t=this._layer.definitionExpression;this._searchExpression&&t?.indexOf(this._searchExpression)>-1&&(this._layer.definitionExpression=t?.indexOf(" AND ("+this._searchExpression)>-1?t.replace(` AND (${this._searchExpression})`,""):t.replace(this._searchExpression,"")),this._searchExpression=void 0}async _updateSearchDefinitionExpression(t){const i=this._layer.definitionExpression;if(t?.length){const e=`objectId in(${t})`;this._layer.definitionExpression=i?.indexOf(this._searchExpression)>-1?i.replace(this._searchExpression,e):i?`${i} AND (${e})`:e,this._searchExpression=e}else this._clearSearchDefinitionExpression()}_canShowFullTextSearch(){return((this._layer?.capabilities)?.query)?.supportsFullTextSearch&&this._layer.indexes.items.filter((t=>"FullText"==t.indexType)).length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],((this._layer?.capabilities)?.query)?.supportsFullTextSearch){const t=this._layer.indexes?.filter((t=>"FullText"==t.indexType));if(t?.length){const i=[];t.forEach((t=>{i.push(...t.fields.split(","))}));const e=[];i.forEach((t=>{const i=this._layer.getField(t.trim());e.push(i.alias)})),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{fields}}",e.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}_onResize(){this._updateToolbar()}_getTableControlRow(t){return s("div",{class:"display-flex height-51-px border-bottom",ref:t=>this._toolbar=t,slot:t},this._getActionBar(),this.isMobile?void 0:this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile?this._getShare("share"):void 0)}_getActionBar(){const t=this.isMobile?"width-full":"",i=this.isMobile?"border-top":"";return s("calcite-action-bar",{class:t,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},s("div",{class:`border-end ${t} ${i}`,id:"solutions-map-layer-picker-container"},s("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",selectedIds:this._layer?[this._layer?.id]:[],showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this.isMobile?void 0:this._getActions())}_getActions(){const t=this._getActionItems();return t?.reduce(((t,i)=>(i&&!i.isOverflow&&t.push(i.isDanger?this._getDangerAction(i.icon,i.label,i.func,i.disabled):i.isSublist&&this._table?.columns?.length>0?s("calcite-dropdown",{closeOnSelectDisabled:!0,id:this._getId(i.icon),onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._showHideDropdown=t},this._getAction(i.active,this._showHideOpen?"chevron-down":i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,"trigger"),this._showHideOpen?this._getFieldlist():void 0):this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading)),t)),[])}_getFieldlist(){return this._columnsInfo?s("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((t=>{const i=this._columnsInfo[t];return s("calcite-dropdown-item",{id:`layer-table-${t.toLowerCase().replaceAll(" ","")}`,label:t,onClick:t=>{const i=t.target;this._columnsInfo[i.label]=!i.selected,i.selected?this._table.hideColumn(i.label):this._table.showColumn(i.label)},selected:i},t)}))):void 0}_validateEnabledActions(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate,e=["zoom-to-object","pencil","trash","erase","selected-items-filter"];this._toolInfos?.forEach((s=>{s&&e.indexOf(s.icon)>-1&&(s.disabled="pencil"===s.icon?!i:!t)}))}_validateActiveActions(){const t=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach((i=>{i&&t.indexOf(i.icon)>-1&&("filter"===i.icon&&(i.indicator=this._filterActive),"list-check-all"===i.icon&&(i.active=this._selectAllActive),"selected-items-filter"===i.icon&&(i.active=this._showOnlySelected))}))}_initToolInfos(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate&&!1,e=this._featuresEmpty(),s=this._hasFilterExpressions();this._translations&&(this._toolInfos=[this.mapHidden?void 0:{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!t,isOverflow:!1},s?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.createFilterModal?this._toggleFilter():this.toggleFilter.emit(),disabled:!1,isOverflow:!1}:void 0,i?{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!i,isOverflow:!1}:void 0,this._deleteEnabled?{active:void 0,icon:"trash",indicator:void 0,label:this._translations.delete,func:()=>this._showDelete(),disabled:!t,isDanger:!0,isOverflow:!1}:void 0,{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>{this.clearSelection()},disabled:!t,isOverflow:!1},{active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!t,isOverflow:!1},{active:!1,icon:"list-check-all",indicator:!1,func:async()=>await this._selectAll(),label:this._translations.selectAll,disabled:e,isOverflow:!1},{active:!1,icon:"compare",indicator:!1,func:async()=>await this._switchSelected(),label:this._translations.switchSelected,disabled:e,isOverflow:!1},{active:!1,icon:"refresh",indicator:!1,func:()=>this._refresh(),label:this._translations.refresh,disabled:!1,isOverflow:!1},this.enableCSV?{active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:e,isOverflow:!1}:void 0,{active:!1,icon:this._showHideOpen?"chevron-down":"chevron-right",indicator:!1,func:()=>this._toggleShowHide(),label:this._translations.showHideColumns,disabled:!1,isOverflow:!1,isSublist:!0}],this._defaultVisibleToolSizeInfos=void 0)}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){const t=`${this._floorField} = '${this._floorLevel}'`,i=this._layer.definitionExpression;this._layer.definitionExpression=i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):i?`${i} AND (${t})`:t,this._floorExpression=t}}_featuresSelected(){return this.selectedIds.length>0}_featuresEmpty(){return 0===this._allIds.length}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this._layer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this._layer.id))),t?.length>0}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),!this.isMobile&&this._toolbar&&this._toolInfos&&(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const t=this._toolbar.offsetWidth;let i=this._toolbarSizeInfos.reduce(((t,i)=>t+i.width),0);const e=["solutions-more","solutions-map-layer-picker-container","map-picker","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const s=[...this._toolbarSizeInfos].reverse().reduce(((s,a)=>(e.indexOf(a.id)<0&&(i>t?i-=a.width:s.push(a)),s)),[]).reverse();this._setControlsThatFit(s,e)}}else if(this._defaultVisibleToolSizeInfos){const s=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let a=!1;const h=[...this._defaultVisibleToolSizeInfos].reduce(((h,o)=>(!a&&e.indexOf(o.id)<0&&(s.indexOf(o.id)>-1||i+o.width<=t)?(s.indexOf(o.id)<0&&(i+=o.width),h.push(o)):e.indexOf(o.id)<0&&i+o.width>t&&(a=!0),h)),[]);this._setControlsThatFit(h,e)}}),250))}_setControlsThatFit(t,i){let e=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const s=document.getElementById("solutions-action-bar");s?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!e&&(e=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),e&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,e)=>{0===e?i.childNodes.forEach((i=>{this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0)})):i.referenceElement||(this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0))})),t&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getDropdown(t){const i=this._getDropdownItems();return i.length>0?s("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},s("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},s("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),s("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>s("calcite-dropdown-group",{class:`${t.disabled?"disabled":""} ${"trash"===t.icon?"delete-red":""}`,selectionMode:"none"},s("calcite-dropdown-item",{disabled:t.loading,iconStart:t.isSublist&&this._showHideOpen?"chevron-down":t.loading?"":t.icon,id:`layer-table-${t.icon}`,onClick:t.func},t.loading?s("div",{class:"display-flex"},s("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label))))),this._showHideOpen?this._getFieldlist():void 0):void 0}_getDropdownItems(){return this._toolInfos?.filter((t=>t&&t.isOverflow))}_getAction(t,i,e,a,h,o,l,n){const c=void 0===this._layer||o;return s("div",{class:"display-flex",id:this._getId(i),slot:n},s("calcite-action",{active:t,appearance:"solid",disabled:c,icon:i,id:`layer-table-${i}`,indicator:e,label:a,loading:l,onClick:h,text:a,textEnabled:!0}),this._getToolTip("bottom",i,a))}_showDelete(){this.showDelete.emit({ids:this._getIds()})}_getShare(t){return s("div",{class:"share-action",id:this._getId(t)},s("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:t=>this._shareNode=t,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",t,this._translations.share))}_updateShareUrl(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this.mapInfo?.id?i.searchParams.set("webmap",this.mapInfo.id):i.searchParams.delete("webmap"),this._layer?.id?i.searchParams.set("layer",this._layer.id):i.searchParams.delete("layer"),this.selectedIds?.length>0?i.searchParams.set("oid",this.selectedIds.join(",")):i.searchParams.delete("oid"),i.searchParams.set("applayout",this.appLayout),this._shareNode.shareUrl=i.href}_getToolTip(t,i,e){return document.getElementById(i)?s("calcite-tooltip",{placement:t,"reference-element":i},s("span",null,e)):void 0}_getId(t){return`solutions-action-${t}`}_getDangerAction(t,i,e,a){const h=void 0===this._layer||a;return s("div",{class:"display-flex",id:this._getId(t)},s("calcite-action",{appearance:"solid",disabled:h,id:t,onClick:e,text:""},s("calcite-button",{appearance:"transparent",iconStart:t,kind:"danger"},i)),this._getToolTip("bottom",t,i))}_getIds(){return this._table?.highlightIds?.map((t=>parseInt(t.toString(),10))).toArray()}onTableNodeCreate=t=>{this._tableNode=t};async _getTable(t,i){this._layer&&(await this._layer.when((()=>{this._table=new this.FeatureTable({autoRefreshEnabled:this.enableAutoRefresh,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{columnDescriptions:!1,header:!1,menu:!1,progress:!1},tableTemplate:{columnTemplates:i},container:t})})),await this._table.when((()=>{const t=this._table.highlightIds.on("change",(t=>{this._handleOnChange(t)}));this._table.viewModel.addHandles(t);const i=this.reactiveUtils.watch((()=>this._table.size),(t=>{this._size=t}));this._table.viewModel.addHandles(i)})))}async _handleOnChange(t){if(!await this._validateActiveEdits([...t.added],[...t.removed]))return;const i=[...this._getIds()];if(this._skipOnChange)this._skipOnChange=!1;else{if(!this._ctrlIsPressed&&!this._shiftIsPressed||this._selectionFromMap&&this._shiftIsPressed)if(this.selectedIds.length>0){this._skipOnChange=!0;const e=this.selectedIds.length>1&&1===t.removed.length?t.removed:i.filter((t=>this.selectedIds.indexOf(t)<0));this._tempSelectedIds=e.length?[...e]:[...this.selectedIds],this._clearSelection(),this.selectedIds=[...e],e.length>0?this._table.highlightIds.add(e[0]):this._skipOnChange=!1}else this.selectedIds=i.reverse(),this._tempSelectedIds=[...this.selectedIds];else if(this._ctrlIsPressed)this.selectedIds=i.reverse(),this._tempSelectedIds=[...this.selectedIds];else if(this._shiftIsPressed&&i?.length>0)if(this._skipOnChange=!0,this._previousCurrentId=this._currentId,this._currentId=[...i].reverse()[0],1===i.length)this._skipOnChange=!1;else if(this._previousCurrentId!==this._currentId){const t=this._table.activeSortOrders.reduce(((t,i)=>(t.push(`${i.fieldName} ${i.direction}`),t)),[]);let e=!1;setTimeout((()=>{e||(this._queryingData=!0)}),500);const s=await d(0,this._layer,[],t);e=!0,this._queryingData=!1;let a=!1;const h=this._table.viewModel.getObjectIdIndex(this._previousCurrentId),o=this._table.viewModel.getObjectIdIndex(this._currentId);this._skipOnChange=(h<o?h:o)+1!==(o>h?o:h);const l=s.reduce(((t,i)=>{const e=i;return e===this._currentId||e===this._previousCurrentId?(a=!a,t.indexOf(e)<0&&t.push(e)):a&&t.indexOf(e)<0&&t.push(e),t}),[]),n=h<o?l.reverse():l;this.selectedIds=[...new Set([...n,...this.selectedIds])],this._tempSelectedIds=[...this.selectedIds],this._table.highlightIds.addMany(this.selectedIds.filter((t=>i.indexOf(t)<0)))}this._finishOnChange()}this._currentId=[...this._getIds()].reverse()[0],this._selectionFromMap=!1}async _validateActiveEdits(t,i){let e=!0;if(this._editor&&!this._skipEditCheck){if(this._hasPendingEdits()){let s=!1;try{await this._editor.cancelWorkflow({force:!1})}catch(t){s="workflow:cancel-denied"===t.name}s&&(e=!1,this._skipEditCheck=!0,t.length>0?this._table.highlightIds.removeMany(t):i.length>0&&this._table.highlightIds.addMany(i))}}else e=!this._skipEditCheck,this._skipEditCheck=!1;return e}_hasPendingEdits(){const t=this._editor?.viewModel?.hasPendingEdits,i=this._editor?.activeWorkflow?.activeWorkflow?.hasPendingEdits;return t||i}_finishOnChange(){this._showOnlySelected&&(this._featuresSelected()?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this.selectedIds)}_resetColumnTemplates(){const t=this._getColumnTemplates(this._layer?.id,this._layer?.fields);0===t?.length?this._tableNode?.classList.add("display-none"):this._tableNode?.classList.remove("display-none");const i=this._table?.tableTemplate?.columnTemplates,e=i&&t&&i.length!==t.length||t?.some(((t,e)=>JSON.stringify(i[e])!==JSON.stringify(t)));if(this._table&&t&&(e||!this._columnsInfo)){this._table.tableTemplate=new this.TableTemplate({columnTemplates:t});const i=t.map((t=>t.fieldName));this._initColumnsInfo(i)}}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await r(this._layer),this._table)this._table.view=this.mapView,this._table.layer=this._layer;else{const t=this._getColumnTemplates(this._layer.id,this._layer?.fields);await this._getTable(this._tableNode,t)}await this._initLayerRefresh(),this._checkEditEnabled(),this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,await this._table.when(),setTimeout((()=>{this._loaded||this.finishLoading()}),1e3),await this.reactiveUtils.once((()=>"loaded"===this._table.state)).then((async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table.highlightIds.removeAll(),this._table.objectIds.removeAll(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),this._initToolInfos(),this._updateToolbar()}catch(t){console.log(t)}}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._refreshHandle=this._layer.on("refresh",(t=>{t.dataChanged&&(this._skipOnChange=!0,this._updateAllIds())}))}async _updateAllIds(){this._allIds=await r(this._layer),this.selectedIds=this.selectedIds.filter((t=>this._allIds.indexOf(t)>-1)),await this._refresh()}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=void 0,this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId?.length>0&&this._table){const t=await p(this.defaultGlobalId,this._layer),i=t?.length>0?t.map((t=>t.getObjectId())):void 0;i&&await this._selectDefaultFeature(i),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=void 0,this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(t){const i=this._table?.columns.reduce(((i,e)=>((!t||t?.indexOf(e.name)>-1)&&(i[e.name]=!e.hidden),i)),{}),e=this._table?.columns.map((t=>t.name));(t?t.filter((t=>e.indexOf(t)<0)):[]).forEach((t=>{i[t]=!0})),this._columnsInfo=t?t.reduce(((t,e)=>(t[e]=i[e],t)),{}):i}async _selectDefaultFeature(t){t.length>0&&this._table.highlightIds.addMany(t)}_checkEditEnabled(){this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._deleteEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsDelete}async _sortTable(){let t,i=this._layer?.objectIdField,e="desc";this.mapInfo?.layerOptions?.layers?.length>0&&this._layer?.id&&(t=this.mapInfo.layerOptions.layers.filter((t=>t.id===this._layer.id)),t&&t.length>0&&(t=t[0],t.sortField&&t.fields?.includes(t.sortField)&&(i=t.sortField),e=t?.sortOrder?t.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(i,e)})))}_forceShowHide(){this._showHideDropdown&&(this._showHideDropdown.open=this._showHideOpen),this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_closeShowHide(){this._showHideOpen=!1}_handleDocumentClick(t){const i=t.target?.id;i.startsWith("layer-table-")?this._moreDropdown.open=!0:this._showHideOpen&&Object.keys(this._columnsInfo).indexOf(i)<0&&"chevron-right"!==i&&(this._closeShowHide(),this._moreDropdown&&(this._moreDropdown.open=!1),this._showHideDropdown&&(this._showHideDropdown.open=!1))}_handleKeyDown(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_handleKeyUp(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_filterModal(){return alert("_filterModal how does this one get hit??"),s("calcite-dialog",{class:"filter-content-space",heading:this._translations?.filter?.replace("{{title}}",this._layer?.title),id:"solutions-filter-dialog",kind:"brand",modal:!0,onCalciteDialogClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:()=>{this._closeFilter()},comboboxOverlayPositioning:"fixed",layerExpressions:this._layerExpressions,onFilterListReset:()=>{this._handleFilterListReset()},onFilterUpdate:()=>{this._handleFilterUpdate(this._filterList.filterCount>0)},ref:t=>this._filterList=t,view:this.mapView,zoomBtn:!1}))}async _handleFilterListReset(){this._filterActive=!1,this._updateShareUrl(),await this._searchFullText()}async _handleFilterUpdate(t){const i=this._layer.definitionExpression;if(this._floorExpression){const t=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=i&&this._floorField&&i.indexOf(`${this._floorField} = '`)>-1?i.replace(t,this._floorExpression):i?`${i} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=t,this._updateShareUrl(),await this._searchFullText()}async _closeFilter(){this._filterOpen&&(this._allIds=await r(this._layer),this._filterOpen=!1)}async _mapClicked(t){const i={include:this._layer},e=await this.mapView.hitTest(t.screenPoint,i);e.results.length>0?(e.results.forEach((t=>{const i=t.graphic.getObjectId();this._table.highlightIds.indexOf(i)<0&&(this._selectionFromMap=!0,this._table.highlightIds.add(i))})),this._showOnlySelected&&this._table.filterBySelection()):await this.clearSelection()}async _selectAll(){const t=this._allIds,i=t.filter((t=>this.selectedIds.indexOf(t)<0));await this._validateActiveEdits(i,this.selectedIds)?(this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange(),this._selectAllActive=!0):this._skipEditCheck=!1}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.objectIds.removeAll()}_clearSelection(){this.selectedIds=[],this._table?.highlightIds.removeAll(),this._table?.rowHighlightIds.removeAll(),this._finishOnChange()}_toggleFilter(){this._filterOpen=!this._filterOpen}_initLayerExpressions(){const t=this.mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=t?t.filter((t=>t.id===this._layer?.id)):[],this._filterList.layerExpressions=this._layerExpressions,this._filterActive=this._layerExpressions.filter((t=>t.expressions.filter((t=>t.active)).length>0)).length>0}async _switchSelected(){const t=[...this.selectedIds],i=this._allIds.reduce(((i,e)=>(t.indexOf(e)<0&&i.push(e),i)),[]).sort(((t,i)=>t-i));await this._validateActiveEdits(i,t)?(this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(i),this.selectedIds=i,this._finishOnChange()):this._skipEditCheck=!1}async _exportToCSV(){const t={},i=this._getIds();t[this._layer.id]={selectionSetNames:[this._layer.title],ids:i,layer:this._layer};const e=this._table.columns.toArray().reduce(((t,i)=>(i.hidden||t.push(i.name.toLocaleLowerCase()),t)),[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,await f(null,t,!1,!1,!0,e,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}_updateToolInfoLoading(t,i){this._toolInfos.some((e=>{if(e?.icon===t)return e.loading=i,!0}))}async _refresh(){await this._validateActiveEdits([],this.selectedIds)&&(await this._table.refresh(),this._allIds=await r(this._layer),this.featureSelectionChange.emit(this.selectedIds))}async _zoom(){if(this._layer){const t=await b(this.mapView,this._layer.id);await c(this.selectedIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _layerSelectionChanged(t){const i=t.detail[0];if(i!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0;const t=await l(this.mapView,i);t&&await t.when((()=>{this._layer=t,this._getFullTextSearchInfo()}))}this._fetchingData=!1}_getColumnTemplates(t,i){let e;this.mapInfo?.layerOptions?.layers.some((i=>{if(i.id===t)return e=i,!0}));const s=this._layer?.attributeTableTemplate?.elements;let a=[];s?.length>0&&this.honorMapFieldSettings&&(a=s.map((t=>t.fieldName)));const h=e?.fields&&e?.fieldOrder?e.fieldOrder.filter((t=>e.fields.indexOf(t)>-1)):a.length>0?a:void 0;let o;return i&&(o=i.reduce(((t,i)=>{const s={type:"field",fieldName:i.name,label:i.alias,menuConfig:this._getMenuConfig(i.name)};return e&&e?.fields?e.fields.indexOf(i.name)>-1&&t.push(s):a.length>0?a.indexOf(i.name)>-1&&t.push(s):t.push(s),t}),[])),h?o?.sort(this._sortFields.bind(this,h)):o}_sortFields(t,i,e){return t?.indexOf(i.fieldName)-t.indexOf(e.fieldName)}_getMenuConfig(t){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(t)}}]}}_handleHideClick(t){this._columnsInfo[t]=!1,this._table.hideColumn(t),this._table.tableTemplate.columnTemplates.forEach((i=>{i.fieldName===t&&(i.visible=!1)}))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],defaultOid:["defaultOidWatchHandler"],defaultGlobalId:["defaultGlobalIdWatchHandler"],enableCSV:["enableCSVWatchHandler"],enableInlineEdit:["enableInlineEditWatchHandler"],enableShare:["enableShareWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"],locale:["localeWatchHandler"],mapHidden:["mapHiddenWatchHandler"],isMobile:["isMobileWatchHandler"],mapInfo:["mapInfoWatchHandler"],mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],selectedIds:["selectedIdsWatchHandler"]}}};function w(t){return function(t){return-1!==t?.indexOf("http://")}(t)?t.replace(/^http:\/\//,"https://"):t}m.style=':host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir="rtl"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}';const y=class{constructor(e){t(this,e),this.mapChanged=i(this,"mapChanged",7),this.beforeMapChanged=i(this,"beforeMapChanged",7),this.toggleFilter=i(this,"toggleFilter",7),this.clearSelection=i(this,"clearSelection",7)}get el(){return e(this)}appLayout;appProxies;defaultWebmapId="";defaultLayerId;enableHome;enableLegend;enableFloorFilter;enableFullscreen;enableShare=!1;enableSingleExpand=!0;enableSearch;enableBasemap;basemapConfig;hidden;homeZoomIndex=3;homeZoomPosition="top-left";homeZoomToolsSize="m";locale;mapInfos=[];mapWidgetsIndex=0;mapWidgetsPosition="top-right";mapWidgetsSize="m";mapView;stackTools=!0;theme;toolOrder;isMapLayout;shareIncludeEmbed;shareIncludeSocial;selectedFeaturesIds;selectedLayer;zoomToScale;onlyShowUpdatableLayers;isMobile;mapInfo;_translations;_searchConfiguration;_webMapInfo;_showHideOpen=!1;_toolInfos;_controlsThatFit;esriConfig;Home;MapView;WebMap;_defaultWebmapHonored=!1;_homeWidget;_loadedId="";_mapDiv;_mapPicker;_mapTools;_moreDropdown;_mapListExpanded=!1;_filterActive=!1;_definitionExpression;_mapLayerPicker;_resizeObserver;_shareNode;_showHideDropdown;_toolbar;_timeout;_toolbarSizeInfos;_defaultVisibleToolSizeInfos;_observerSet=!1;appLayoutWatchHandler(){this._updateShareUrl()}enableHomeWatchHandler(){this._initHome()}enableShareWatchHandler(){this._toolbar&&this._updateToolbar()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedLayerWatchHandler(){await(this.selectedLayer?.when((async()=>{this._definitionExpression=this.selectedLayer.definitionExpression})))}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}_controlsThatFitWatchHandler(){const t=this._controlsThatFit?this._controlsThatFit.reduce(((t,i)=>(t.push(i.id),t)),[]):[];this._toolInfos=this._toolInfos?.map((i=>{if(i&&this._controlsThatFit){const e=this._getId(i.icon);return i.isOverflow=t.indexOf(e)<0,i}}))}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(t){this._filterActive=t,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.updateLayer()}mapChanged;beforeMapChanged;toggleFilter;clearSelection;async mapInfoChange(t){await this._loadMap(t.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout((()=>{this._initToolInfos()}),50)}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._updateToolbar())))}render(){const t=this.isMapLayout?"display-flex height-49-px":"",i=this.hidden?"visibility-hidden-1":"",e="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",h=this.mapInfos?.length>1||this.isMapLayout?"map-height":"height-full",o=this.isMapLayout?"":"display-none";return this._validateActiveActions(),s(a,{key:"a47f4ac21db985fb91ff3f5378594f60405f312c"},s("div",{key:"fdf76fd829a8e88725b43f8174a0d95fbf7a3dd1",class:`${t} width-full`,ref:t=>this._toolbar=t},this._getActionBar(),!this.isMobile&&this.isMapLayout&&this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile&&this.isMapLayout?this._getShare("share"):void 0),s("calcite-progress",{key:"b5b672726b4a4c812c386faad2077135a1e1231c",class:o,value:0}),s("div",{key:"f815ef4dba45b53c0ec4a49fe12e741b3331ce51",class:`${h} ${i}`,ref:t=>this._mapDiv=t}),s("map-tools",{key:"8e2ed31f49d349786caa4827a473a8e70e6ae611",basemapConfig:this.basemapConfig,class:`box-shadow ${e}`,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableSingleExpand:this.enableSingleExpand,homeZoomToolsSize:this.homeZoomToolsSize,locale:this.locale,mapView:this.mapView,mapWidgetsSize:this.mapWidgetsSize,position:this.mapWidgetsPosition,ref:t=>this._mapTools=t,searchConfiguration:this._searchConfiguration,stackTools:this.stackTools,toolOrder:this.toolOrder}))}async componentDidRender(){this.isMapLayout&&this._updateToolbar(),document.onclick=t=>this._handleDocumentClick(t)}async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0),this._updateShareUrl()}async _initModules(){const[t,i,e,s]=await o(["esri/WebMap","esri/views/MapView","esri/widgets/Home","esri/config"]);this.WebMap=t,this.MapView=i,this.Home=e,this.esriConfig=s}async _loadMap(t){const i=!this._defaultWebmapHonored&&this.defaultWebmapId,e=this.mapInfos?.filter((t=>t.id===this.defaultWebmapId)),s=JSON.stringify(t)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&e?e[0]:!t?.id&&this.mapInfos.length>0?this.mapInfos[0]:t;const a=this._webMapInfo.id,h=i&&t?.id===this.defaultWebmapId;if(this._loadedId!==a&&!i||h){const t=new this.WebMap({portalItem:{id:a}});this.appProxies&&(await t.load(),await(o=t,l=this.esriConfig,n=this.appProxies,n&&n.forEach((t=>{o.allLayers.forEach((i=>{i&&i.url===t.sourceUrl&&(i.url=w(t.proxyUrl),i.portalItem&&i.portalItem.when((()=>{i.portalItem.url=w(t.proxyUrl)})),l.request?.interceptors?.push({urls:t.sourceUrl,before:i=>{i.url&&i.url===t.sourceUrl&&(i.url=w(t.proxyUrl))}}))}))})),o)),this.mapView=new this.MapView({container:this._mapDiv,map:t,resizeAlign:"center"}),this._loadedId=a,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),await this.mapView.when((()=>{this._initHome(),this.mapView.ui.add(this._mapTools,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=!!h||this._defaultWebmapHonored,this.mapChanged.emit({id:a,mapView:this.mapView})}))}else i?(this._defaultWebmapHonored=!0,this._mapPicker.setMapByID(a)):s&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:a,mapView:this.mapView}));var o,l,n;this._updateShareUrl()}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),!this.isMobile&&this._toolbar&&this._toolInfos&&(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const t=this._toolbar.offsetWidth;let i=this._toolbarSizeInfos.reduce(((t,i)=>t+i.width),0);const e=["solutions-more","solutions-map-layer-picker-container","map-picker","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const s=[...this._toolbarSizeInfos].reverse().reduce(((s,a)=>(e.indexOf(a.id)<0&&(i>t?i-=a.width:s.push(a)),s)),[]).reverse();this._setControlsThatFit(s,e)}}else if(this._defaultVisibleToolSizeInfos){const s=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let a=!1;const h=[...this._defaultVisibleToolSizeInfos].reduce(((h,o)=>(!a&&e.indexOf(o.id)<0&&(s.indexOf(o.id)>-1||i+o.width<=t)?(s.indexOf(o.id)<0&&(i+=o.width),h.push(o)):e.indexOf(o.id)<0&&i+o.width>t&&(a=!0),h)),[]);this._setControlsThatFit(h,e)}}),250))}_setControlsThatFit(t,i){let e=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const s=document.getElementById("solutions-action-bar");s?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!e&&(e=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),e&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,e)=>{0===e?i.childNodes.forEach((i=>{this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0)})):i.referenceElement||(this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0))})),t&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionBar(){const t=this.mapInfos?.length>1?"":"display-none",i=this.isMapLayout?"display-flex":"display-block",e=this.isMobile?"border-top":"",a=this.isMapLayout?"":"display-none";return s("calcite-action-bar",{class:i,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},s("map-picker",{class:t,id:"map-picker",isMapLayout:this.isMapLayout,locale:this.locale,mapInfos:this.mapInfos,ref:t=>this._mapPicker=t}),s("div",{class:`mapView-header display-flex ${a}`,id:"solutions-map-layer-picker-container"},s("div",{class:`border-end ${i} ${e}`},this.mapView&&s("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",ref:t=>this._mapLayerPicker=t,scale:"l",selectedIds:this.selectedLayer?[this.selectedLayer.id]:[],showSingleLayerAsLabel:!0,showTables:!0,showTablesDisabled:!0,type:"dropdown"}))),!this.isMobile&&this.isMapLayout?this._getActions():void 0)}_getDropdown(t){const i=this._getDropdownItems();return i.length>0?s("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this.selectedLayer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},s("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},s("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),s("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>s("calcite-dropdown-group",{class:t.disabled?"disabled":"",selectionMode:"none"},s("calcite-dropdown-item",{disabled:t.loading,iconStart:t.icon,id:"solutions-subset-list",onClick:t.func},t.loading?s("div",{class:"display-flex"},s("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label)))))):void 0}_getShare(t){return s("div",{class:"share-action",id:this._getId(t)},s("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:t=>{this._shareNode=t,this._updateShareUrl()},scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",t,this._translations.share))}_updateShareUrl(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),i.searchParams.set("applayout",this.appLayout),this._shareNode.shareUrl=i.href}_closeShowHide(){this._showHideOpen=!1}_getDropdownItems(){return this._toolInfos?.filter((t=>t&&t.isOverflow))}_initToolInfos(){const t=this.selectedFeaturesIds?.length>0,i=this._hasFilterExpressions(),e=this.selectedFeaturesIds?.length>1&&!1;this._translations&&(this._toolInfos=[{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!t,isOverflow:!1},i?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this._toggleFilter(),disabled:!1,isOverflow:!1}:void 0,e?{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!e,isOverflow:!1}:void 0,{active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer.refresh(),disabled:!1,isOverflow:!1},{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!t,isOverflow:!1}],this._defaultVisibleToolSizeInfos=void 0)}_validateActiveActions(){const t=["filter"];this._toolInfos?.forEach((i=>{i&&t.indexOf(i.icon)>-1&&"filter"===i.icon&&(i.indicator=this._filterActive)}))}_validateEnabledActions(){const t=this.selectedFeaturesIds?.length>0,i=this.selectedFeaturesIds?.length>1&&this.selectedLayer?.capabilities?.operations?.supportsUpdate,e=["zoom-to-object","pencil","erase"];this._toolInfos?.forEach((s=>{s&&e.indexOf(s.icon)>-1&&(s.disabled="pencil"===s.icon?!i:!t)}))}_initHome(){if(this.enableHome){this._homeWidget=new this.Home({view:this.mapView}),this.mapView.ui.add(this._homeWidget,{position:this.homeZoomPosition,index:this.homeZoomIndex});const t="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";this._homeWidget.domNode.style.height=t,this._homeWidget.domNode.style.width=t}else this._homeWidget&&this.mapView.ui.remove(this._homeWidget)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_forceShowHide(){this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_handleDocumentClick(t){const i=t.target?.id;"solutions-subset-list"===i?this._moreDropdown.open=!0:this._showHideOpen&&"solutions-subset-list"!==i&&"solutions-more"!==i&&"chevron-down"!==i&&this._moreDropdown&&(this._showHideOpen=!1,this._moreDropdown.open=!1),"MAP-PICKER"===t.target.tagName&&(this._mapListExpanded=!this._mapListExpanded,this._mapPicker.toggle(this._mapListExpanded)),"MAP-PICKER"!==t.target.tagName&&(this._mapListExpanded=!1,this._mapPicker.close())}async _zoom(){if(this.selectedLayer){const t=await b(this.mapView,this.selectedLayer.id);await c(this.selectedFeaturesIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this.selectedLayer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this.selectedLayer.id))),t?.length>0}_getActions(){const t=this._getActionItems();return t?.reduce(((t,i)=>(i&&!i.isOverflow&&t.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading)),t)),[])}_getToolTip(t,i,e){return document.getElementById(i)?s("calcite-tooltip",{placement:t,"reference-element":"map-"+i},s("span",null,e)):void 0}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getAction(t,i,e,a,h,o,l,n){const c=void 0===this.selectedLayer||o;return s("div",{class:"display-flex",id:this._getId(i),slot:n},s("calcite-action",{active:t,appearance:"solid",disabled:c,icon:i,id:"map-"+i,indicator:e,label:a,loading:l,onClick:h,text:a,textEnabled:!0}),this._getToolTip("bottom",i,a))}_getId(t){return`solutions-action-${t}`}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],enableHome:["enableHomeWatchHandler"],enableShare:["enableShareWatchHandler"],locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],selectedLayer:["selectedLayerWatchHandler"],selectedFeaturesIds:["selectedFeaturesIdsWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"]}}};y.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none !important}.visibility-hidden-1{visibility:hidden;height:1px;}.display-none{display:none}.display-block{display:block}";export{u as card_manager,m as layer_table,y as map_card}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as e,c as t,g as i,h as s,H as o}from"./p-1b0588d2.js";import{g as a}from"./p-ee2cbba0.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const n=class{constructor(i){e(this,i),this.solutionItemHover=t(this,"solutionItemHover",7),this.solutionItemSelect=t(this,"solutionItemSelect",7),this.solutionTypeHover=t(this,"solutionTypeHover",7)}get el(){return i(this)}locale;listSelectionMode="none";templateInfos=[];_sortedTemplateInfos=[];_translations;_sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"];async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async deselectAll(){"single"!==this.listSelectionMode&&"single-persist"!==this.listSelectionMode||this.el.shadowRoot.querySelectorAll("calcite-list-item").forEach((e=>{e.selected=!1}))}async selectItem(e){"single"!==this.listSelectionMode&&"single-persist"!==this.listSelectionMode||this.el.shadowRoot.querySelectorAll("calcite-list-item").forEach((t=>{t.id===e&&(t.selected=!0,t.parentElement.parentElement.expanded=!0)}))}solutionItemHover;solutionItemSelect;solutionTypeHover;async componentWillLoad(){this._sortedTemplateInfos=this._sortTemplates(),await this._getTranslations()}render(){return s(o,{key:"7e98d3ed4629f9d0960db3284d389bf7564b6def"},this._getAccordion())}_deselectOthers(e){"single"!==this.listSelectionMode&&"single-persist"!==this.listSelectionMode||this.el.shadowRoot.querySelectorAll("calcite-list-item").forEach((t=>{t.id!==e&&(t.selected=!1)}))}_getAccordion(){const e=[],t=this._sortedTemplateInfos.reduce(((t,i)=>{const s=this._getTypeForDisplay(i.type,i.typeKeywords);return e.indexOf(s)<0&&(e.push(s),t.push(this._getAccordionItem(i))),t}),[]);return s("calcite-accordion",{class:"border-override",selectionMode:"single"},t)}_getAccordionItem(e){const t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter((e=>this._getTypeForDisplay(e.type,e.typeKeywords)===t));return s("calcite-accordion-item",{description:`${t} (${i.length})`,onMouseEnter:()=>this.solutionTypeHover.emit({itemType:t,entering:!0}),onMouseLeave:()=>this.solutionTypeHover.emit({itemType:t,entering:!1})},s("solution-item-icon",{class:"padding-start-1 display-flex align-center",slot:"actions-start",type:e.type,typeKeywords:e.typeKeywords}),this._getList(i))}_getList(e){const t=this._sortTemplatesByTitle(e);return s("calcite-list",{label:"",selectionAppearance:"border",selectionMode:this.listSelectionMode},t.map((e=>this._getListItem(e))))}_getListItem(e){return s("calcite-list-item",{description:e.snippet,id:e.id,label:e.title,onCalciteListItemSelect:()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0})},onMouseEnter:()=>this.solutionItemHover.emit({itemId:e.id,entering:!0}),onMouseLeave:()=>this.solutionItemHover.emit({itemId:e.id,entering:!1}),value:e.id},e.url?s("calcite-action",{icon:"launch",onClick:()=>window.open(e.url,"_blank"),slot:"actions-end",text:this._translations?.openDetails?.replace("{{solutionTitle}}",e.title)}):null)}_sortTemplatesByTitle(e){return e.sort(((e,t)=>e.title<t.title?-1:e.title>t.title?1:0))}_sortTemplates(){return this.templateInfos.sort(((e,t)=>{const i=this._getTypeForSort(e),s=this._getTypeForSort(t);return this._sortOrder.indexOf(i)-this._sortOrder.indexOf(s)}))}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if("Feature Service"===e){const e=t.indexOf("View Service")>-1,s=t.indexOf("Table")>-1;i=e&&s?"Table (hosted, view)":s?"Table (hosted)":e?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return"Web Mapping Application"===e&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i="Geoprocessing Service"===e?"Tool":i,i="Feed"===e?"Feed (hosted)":i,i="Real Time Analytic"===e?"Real Time Analytic (hosted)":i,i="Big Data Analytic"===e?"Big Data Analytic (hosted)":i,i="Vector Tile Service"===e?"Tile Layer":i,i}async _getTranslations(){const e=await a(this.el);this._translations=e[0]}static get watchers(){return{locale:["localeWatchHandler"],templateInfos:["templateInfosWatchHandler"]}}};n.style=":host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color:var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}";export{n as solution_item_accordion}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as i,g as e,h as s,H as o,F as a}from"./p-1b0588d2.js";import{g as l}from"./p-ee2cbba0.js";import{E as h}from"./p-80cb7c73.js";import{g as n}from"./p-952da957.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const r=class{constructor(e){t(this,e),this.showIntroductionWindow=i(this,"showIntroductionWindow",7),this.showCoverPage=i(this,"showCoverPage",7)}get el(){return e(this)}appLayout;appProxies;basemapConfig;coverPageEnabled;customInfoText;defaultAppLayout;defaultCenter="";defaultGlobalId="";defaultLayer="";defaultLevel="";defaultOid="";defaultWebmap="";honorMapFieldSettings=!1;introductionWindowEnabled=!1;enableAutoRefresh=!1;enableBasemap=!0;enableColumnReorder=!0;enableCSV=!0;enableFloorFilter=!0;enableFullscreen=!0;enableHome=!0;enableLegend=!0;enableSearch=!0;enableShare=!1;enableZoom=!0;locale;mapInfos=[];onlyShowUpdatableLayers=!0;popupHeaderColor;popupHeaderHoverColor;popupHeaderHoverTextColor;popupHeaderTextColor;searchConfiguration;shareIncludeEmbed;shareIncludeSocial;showNewestFirst=!0;theme="light";zoomAndScrollToSelected=!1;zoomToScale;_deleteDialogOpen=!1;_enableCreateFeatures=!0;_hideFooter=!1;_hideTable=!1;_isMobile=!1;_isPortraitMobile=!1;_translations;_layer;_layoutMode=h.GRID;_mapInfo;_mapView;_panelOpen=!0;_numSelected=0;_filterOpen=!1;_showInformationHeader=!0;_layerIds;_isLoading=!0;_defaultAppLayoutHonored=!1;_defaultCenterHonored=!1;_defaultLevelHonored=!1;_deleteIds;_layerTable;_mapChange;_resizeObserver;_shouldSetMapView=!1;_layerExpressions;_filterList;_mapCard;_isMapViewOnLoad=!1;appLayoutWatchHandler(t,i){t!==i&&(this._setActiveLayout(t),"mapView"===this.appLayout&&this._layer?.isTable&&this._mapCard.updateLayer(),this._isMapViewOnLoad&&(this._layerTable.refresh(),this._isMapViewOnLoad=!1))}enableZoomWatchHandler(){this._initMapZoom()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}showIntroductionWindow;showCoverPage;async featureSelectionChange(t){this._numSelected=t.detail?.length}async popupClosed(){this._isPortraitMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(t){this._layoutMode=t.detail}async mapChanged(t){this._mapChange=t.detail,await this._mapChange.mapView.when((async()=>{await this._setMapView()}))}async layerSelectionChange(t){const i=t.detail[0],e=await n(this._mapView,i);e&&await e.when((()=>{0===this._layerIds.length&&"mapView"===this.appLayout&&e.isTable&&(this.appLayout="splitView"),this._layer=e,this._initLayerExpressions(),this._isLoading=!1}))}async showDelete(t){this._deleteIds=t.detail.ids,this._deleteDialogOpen=!0}async idsFound(t){this._layerIds=t.detail.layerIds}async componentWillLoad(){await this._getTranslations(),this._resizeObserver=new ResizeObserver((()=>this._onResize()))}render(){return s(o,{key:"24b7324257b94560153db83dd6b29730bef8f38f"},s("calcite-shell",{key:"c7a445ffdf9fa59c7bd1aff125a77e811f6ce736",class:"position-relative"},s("calcite-panel",{key:"81598a858cfbdfcb6346bc3efa6eb55699d2c5ff",class:"width-full height-full "+(this.popupHeaderColor&&"#FFFFFF"!==this.popupHeaderColor?"border-width-0":""),loading:this._isLoading},this._getBody(this._layoutMode,this._panelOpen,this._hideTable)),this._getFooter()),this._filterModal(),this._deleteModal())}async componentDidRender(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}async componentDidLoad(){this._resizeObserver.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad="mapView"===this.appLayout,this._setActiveLayout(this.appLayout)}_getFooter(){const t=this._numSelected>0,i=this._layer?.editingEnabled&&this._layer?.capabilities?.operations?.supportsDelete;return this._isPortraitMobile&&t&&!this._hideFooter?s("div",{class:"width-100",slot:"footer"},s("div",{class:"display-flex padding-1-2"},s("calcite-button",{appearance:"solid",id:"solutions-show",onClick:()=>this.showHideMapPopupAndTable(!0),width:"full"},this._translations.view.replace("{{n}}",this._numSelected.toString())),i?s("delete-button",{class:"padding-inline-start-1 width-full",id:"solutions-delete",ids:this._layerTable.selectedIds,layer:this._layer,locale:this.locale}):void 0)):void 0}_setActiveLayout(t){"splitView"!==t||this._panelOpen||this._toggleLayout(),"mapView"===t?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(t,i){let e="";switch(t){case h.HORIZONTAL:e=i?"chevrons-up":"chevrons-down";break;case h.VERTICAL:case h.GRID:e=i?"chevrons-left":"chevrons-right"}return e}_getMapSizeClass(t,i,e){let s="";switch(t){case h.HORIZONTAL:s=(i&&!e?"height-1-2 display-grid":i&&e?"height-full":"height-0")+" width-full position-relative";break;case h.GRID:s="height-full position-relative "+(i?"width-1-3":"width-0");break;case h.VERTICAL:s="height-full position-relative "+(i?"width-1-2":"width-0")}return s}_getTableSizeClass(t,i){let e="";switch(t){case h.HORIZONTAL:e=(i?"height-1-2":"height-full")+" width-full display-flex flex-column";break;case h.GRID:e=(i?"width-2-3":"width-full")+" height-full display-flex";break;case h.VERTICAL:e=(i?"width-1-2":"width-full")+" height-full display-flex"}return e}_getBody(t,i,e){const o="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return s("calcite-panel",{class:"width-full height-full position-absolute"},s("div",{class:"width-full height-full overflow-hidden "+(t===h.HORIZONTAL?"":"display-flex")},this._getMapAndCard(t,i,e),this._getTable(t,i,e)),this.coverPageEnabled&&s("div",{class:"floating-container",onClick:this.coverPageButtonClick.bind(this)},s("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"content-minimal",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})),this.introductionWindowEnabled&&s("div",{class:"floating-container",onClick:this.infoButtonClick.bind(this)},s("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"information-letter",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})))}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(t,i,e){const o=this._getMapSizeClass(t,i,e);return s("div",{class:`${o} overflow-hidden z-index-1 ${!this._isPortraitMobile&&this._isMobile?"border-right":""}`},this._getMapNode(i),this._getPopupExpandNode())}_getMapNode(t){const i="mapView"===this.appLayout,e="tableView"===this.appLayout;return s("div",{class:(i||e?"position-absolute-0":this._layoutMode!==h.HORIZONTAL||this._isPortraitMobile&&!t?"adjusted-height-50":"")+" overflow-hidden",id:"card-mapView"},s("map-card",{appLayout:this.appLayout,appProxies:this.appProxies,basemapConfig:this.basemapConfig,class:"width-full",defaultLayerId:this.defaultWebmap&&this.defaultLayer?this.defaultLayer:"",defaultWebmapId:this.defaultWebmap,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableShare:this.enableShare,enableSingleExpand:!0,hidden:!this._isPortraitMobile&&e,homeZoomIndex:3,homeZoomPosition:"top-left",homeZoomToolsSize:"s",isMapLayout:i,isMobile:this._isMobile,locale:this.locale,mapInfo:this._mapInfo,mapInfos:this.mapInfos?.filter((t=>!1!==t.visible)),mapWidgetsIndex:0,mapWidgetsPosition:"top-right",mapWidgetsSize:"m",onToggleFilter:this._toggleFilter.bind(this),onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,ref:t=>this._mapCard=t,selectedFeaturesIds:this._layerTable?.selectedIds,selectedLayer:this._layer,shareIncludeEmbed:this.shareIncludeEmbed,shareIncludeSocial:this.shareIncludeSocial,stackTools:!0,theme:this.theme,toolOrder:["legend","search","fullscreen","basemap","floorfilter"],zoomToScale:this.zoomToScale}))}_getPopupExpandNode(){const t=this._isPortraitMobile&&this._showInformationHeader?"display-none height-0":"";return s("div",{class:`${this.popupHeaderColor?"":this._isPortraitMobile?"calcite-mode-light":"calcite-mode-dark"} ${this._isMobile?"height-full":"height-full position-relative"} ${this._isPortraitMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isPortraitMobile?"display-none height-0":""} ${this.mapInfos?.length>1&&"tableView"===this.appLayout?"position-relative top-51":""} position-sticky`,style:{"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor}},s("calcite-panel",null,!this._isPortraitMobile&&this._showInformationHeader||this._numSelected>0&&!this._isPortraitMobile?s("div",{class:`display-flex align-items-center ${t}`,slot:"header-content"},s("calcite-icon",{icon:"information",scale:"s"}),s("div",{class:"padding-inline-start-75"},this._translations.information)):s("div",null),this._getCardNode()))}_getCardNode(){const t="mapView"===this.appLayout,i="tableView"===this.appLayout;return s("div",{class:"width-50 height-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},s("card-manager",{class:(i&&this.mapInfos?.length>1?"adjusted-height-100-51":t||i?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isPortraitMobile?"height-full":"height-50":"adjusted-height-50_25")+" width-full",customInfoText:this.customInfoText,enableCreateFeatures:this._enableCreateFeatures&&!this._isMobile,enableEditGeometry:this?._mapInfo?.enableEditGeometry,isMobile:this._isPortraitMobile,layer:this._layer,locale:this.locale,mapView:this?._mapView,onBackFromCreateWorkFlow:()=>{this._showInformationHeader=!0},onCreateWorkFlowStarted:()=>{this.appLayout=this._layer.isTable?"tableView":"mapView",this._showInformationHeader=!1},onFeatureOrRecordSubmitted:()=>{this._layerTable.refresh()},selectedFeaturesIds:this._layerTable?.selectedIds,selectingFeatureFromMap:"mapView"===this.appLayout,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))}_getTable(t,i,e){const o="mapView"===this.appLayout,a="tableView"===this.appLayout,l=e&&this._isPortraitMobile?"visibility-hidden":o?"display-none":"",n=o?"height-full width-full z-index-0":"display-none",r=this._getTableSizeClass(t,i),d=t===h.HORIZONTAL?"horizontal":"vertical",c=t===h.HORIZONTAL?"header":"panel-start",p=this.defaultWebmap&&this.defaultLayer,u=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,g=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map((t=>parseInt(t,10))):[parseInt(this.defaultOid,10)]:void 0;return s("calcite-shell",{class:`${r} border-bottom`},this._isMobile?void 0:s("calcite-action-bar",{class:"border-sides",expandDisabled:!0,layout:d,slot:c},this.getActions(t,i)),s("div",{class:`width-full height-full position-relative z-index-0 ${l}`},s("layer-table",{appLayout:this.appLayout,createFilterModal:!1,defaultGlobalId:p?u:void 0,defaultLayerId:p?this.defaultLayer:"",defaultOid:p&&!u?g:void 0,enableAutoRefresh:this.enableAutoRefresh,enableCSV:this.enableCSV,enableColumnReorder:this.enableColumnReorder,enableInlineEdit:this?._mapInfo?.enableInlineEdit,enableShare:this.enableShare,honorMapFieldSettings:this.honorMapFieldSettings,isMobile:this._isPortraitMobile,locale:this.locale,mapHidden:a,mapInfo:this._mapInfo,mapView:this?._mapView,onToggleFilter:this._toggleFilter.bind(this),onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,ref:t=>this._layerTable=t,shareIncludeEmbed:this.shareIncludeEmbed,shareIncludeSocial:this.shareIncludeSocial,showNewestFirst:this.showNewestFirst,zoomAndScrollToSelected:this.zoomAndScrollToSelected,zoomToScale:this.zoomToScale})),s("div",{class:n,id:"full-map-view"}))}getActions(t,i){const e=this._getDividerIcon(t,i),o=i?this._translations.close:this._translations.open,l="toggle-layout";return s(a,null,s("calcite-action",{active:"splitView"===this.appLayout,class:"toggle-node",icon:"browser",id:"browser-action",onClick:()=>{this.appLayout="splitView"},text:""}),s("calcite-tooltip",{placement:"right","reference-element":"browser-action"},s("span",null,this._translations.splitView)),s("calcite-action",{active:"tableView"===this.appLayout,class:"toggle-node",icon:"dock-left",id:"dock-left-action",onClick:()=>{this.appLayout="tableView"},text:""}),s("calcite-tooltip",{placement:"right","reference-element":"dock-left-action"},s("span",null,this._translations.tableView)),s("calcite-action",{active:"mapView"===this.appLayout,class:"toggle-node",disabled:0===this._layerIds?.length,icon:"browser-map",id:"browser-map-action",onClick:()=>{this.appLayout="mapView"},text:""}),s("calcite-tooltip",{placement:"right","reference-element":"browser-map-action"},s("span",null,this._translations.mapView)),s("calcite-action",{class:"toggle-node",icon:e,id:l,onClick:()=>this._toggleLayout(),slot:"actions-end",text:""}),s("calcite-tooltip",{placement:"bottom","reference-element":l},s("span",null,o)))}_deleteModal(){return s("delete-dialog",{id:"deleteDialogId",ids:this._deleteIds,layer:this._layer,locale:this.locale,onDeleteDialogClose:()=>this._deleteDialogOpen=!1,open:this._deleteDialogOpen})}_filterModal(){return s("calcite-dialog",{class:"filter-content-space",heading:this._translations?.filter?.replace("{{title}}",this._layer?.title),id:"solutions-filter-dialog",kind:"brand",modal:!0,onCalciteDialogClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:()=>{this._closeFilter()},comboboxOverlayPositioning:"fixed",layerExpressions:this._layerExpressions,onFilterListReset:()=>{this._handleFilterListReset(),this._mapCard.resetFilter()},onFilterUpdate:()=>{this._updateFilter()},ref:t=>this._filterList=t,view:this._mapView,zoomBtn:!1}))}_initLayerExpressions(){const t=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=t?t.filter((t=>t.id===this._layer?.id)):[],this._filterList.layerExpressions=this._layerExpressions,this._layerExpressions.filter((t=>t.expressions.filter((t=>t.active)).length>0))}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._layerTable.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.closeFilter())}async _updateFilter(){const t=this._filterList.filterCount>0;await(this._layerTable?.filterUpdate(t)),await this._mapCard.updateFilterState(t)}_onResize(){const t=this.el.offsetWidth<1024,i=!this._isMobile&&t;this._isMobile=t,i&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this._isPortraitMobile=!!window.matchMedia("(orientation: portrait)").matches,this.appLayout="splitView"):this._isPortraitMobile=!1,this._layoutMode=this._isPortraitMobile?h.HORIZONTAL:h.GRID}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if("mapView"!==this.appLayout){const t=document.getElementById("full-map-view")?.childNodes[0],i=document.getElementById("card-mapView");t&&i.appendChild(t)}}_showMapInFullView(){const t=document.getElementById("card-mapView")?.childNodes[0],i=document.getElementById("full-map-view");t&&i.appendChild(t)}showHideMapPopupAndTable(t){this._hideTable=t,this._hideFooter=t}_getMapInfo(t){let i;return this.mapInfos.some((e=>{if(e.id===t)return i=e,!0})),{...i}}async _setMapView(){this._mapInfo=this._getMapInfo(this._mapChange.id),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView.popupEnabled=!1;const t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map((t=>parseFloat(t))),i=!this.defaultLevel||this._defaultLevelHonored?void 0:parseInt(this.defaultLevel,10);t&&i&&(await this._mapView.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView.ui.remove("zoom")}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],enableZoom:["enableZoomWatchHandler"],locale:["localeWatchHandler"]}}};r.style=":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-right{border-right:2px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none !important}.adjusted-height-50_25{height:calc(50% + 25px)}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}.border-width-0{border-width:0px}.border-bottom-width-0{border-bottom-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;right:0;margin:100px 0px}.floating-container .floating-button{box-shadow:0 10px 25px rgb(92 93 94 / 60%);transform:translatey(5px);transition:all 0.3s}.z-index-0{z-index:0 !important}.z-index-1{z-index:1 !important}.filter-content-space{--calcite-dialog-content-space:0px}";export{r as crowdsource_manager}