@esri/solutions-components 0.10.43 → 0.10.45
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +5 -5
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{calcite-alert_5.cjs.entry.js → calcite-alert_6.cjs.entry.js} +136 -0
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
- package/dist/cjs/{calcite-shell_3.cjs.entry.js → calcite-shell.cjs.entry.js} +0 -256
- package/dist/cjs/card-manager_3.cjs.entry.js +42 -8
- package/dist/cjs/crowdsource-manager.cjs.entry.js +25 -4
- package/dist/cjs/delete-dialog.cjs.entry.js +131 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +3 -3
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/share-item.cjs.entry.js +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +3 -3
- package/dist/cjs/solution-contents_3.cjs.entry.js +3 -3
- package/dist/cjs/solution-item-accordion.cjs.entry.js +1 -1
- package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +4 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +31 -3
- package/dist/collection/components/layer-table/layer-table.js +61 -8
- package/dist/collection/components/map-card/map-card.js +1 -1
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
- package/dist/collection/components/map-fullscreen/map-fullscreen.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
- package/dist/collection/components/map-legend/map-legend.js +1 -1
- package/dist/collection/components/map-picker/map-picker.js +1 -1
- package/dist/collection/components/map-search/map-search.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
- package/dist/collection/components/map-tools/map-tools.js +1 -1
- package/dist/collection/components/pci-calculator/pci-calculator.js +1 -1
- package/dist/collection/components/pdf-download/pdf-download.js +1 -1
- package/dist/collection/components/public-notification/public-notification.js +1 -1
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/components/share-item/share-item.js +1 -1
- package/dist/collection/components/solution-configuration/solution-configuration.js +3 -3
- package/dist/collection/components/solution-contents/solution-contents.js +1 -1
- package/dist/collection/components/solution-item/solution-item.js +1 -1
- package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +1 -1
- package/dist/collection/components/solution-item-details/solution-item-details.js +1 -1
- package/dist/collection/components/solution-item-icon/solution-item-icon.js +1 -1
- package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
- package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -1
- package/dist/collection/components/solution-resource-item/solution-resource-item.js +1 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +1 -1
- package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
- package/dist/collection/components/solution-variables/solution-variables.js +1 -1
- package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
- package/dist/collection/utils/interfaces.ts +4 -0
- package/dist/components/crowdsource-manager.js +27 -5
- package/dist/components/layer-table2.js +113 -92
- package/dist/components/map-card2.js +1 -1
- package/dist/components/map-draw-tools2.js +1 -1
- package/dist/components/map-fullscreen2.js +1 -1
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-legend2.js +1 -1
- package/dist/components/map-picker2.js +1 -1
- package/dist/components/map-search2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/map-tools2.js +1 -1
- package/dist/components/pci-calculator.js +1 -1
- package/dist/components/pdf-download2.js +1 -1
- package/dist/components/public-notification.js +1 -1
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/share-item.js +1 -1
- package/dist/components/solution-configuration.js +3 -3
- package/dist/components/solution-contents2.js +1 -1
- package/dist/components/solution-item-accordion.js +1 -1
- package/dist/components/solution-item-details2.js +1 -1
- package/dist/components/solution-item-icon2.js +1 -1
- package/dist/components/solution-item-sharing2.js +1 -1
- package/dist/components/solution-item2.js +1 -1
- package/dist/components/solution-organization-variables2.js +1 -1
- package/dist/components/solution-resource-item2.js +1 -1
- package/dist/components/solution-spatial-ref2.js +1 -1
- package/dist/components/solution-template-data2.js +1 -1
- package/dist/components/solution-variables2.js +1 -1
- package/dist/components/spatial-ref.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +5 -5
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/{calcite-alert_5.entry.js → calcite-alert_6.entry.js} +136 -1
- package/dist/esm/calcite-combobox_3.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
- package/dist/esm/{calcite-shell_3.entry.js → calcite-shell.entry.js} +2 -256
- package/dist/esm/card-manager_3.entry.js +42 -8
- package/dist/esm/crowdsource-manager.entry.js +25 -4
- package/dist/esm/delete-dialog.entry.js +127 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +3 -3
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/share-item.entry.js +1 -1
- package/dist/esm/solution-configuration.entry.js +3 -3
- package/dist/esm/solution-contents_3.entry.js +3 -3
- package/dist/esm/solution-item-accordion.entry.js +1 -1
- package/dist/esm/solution-item-icon.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +1 -1
- package/dist/solutions-components/{p-56beff4c.entry.js → p-112df7b2.entry.js} +1 -1
- package/dist/solutions-components/{p-ce53e33d.entry.js → p-11c2426d.entry.js} +2 -2
- package/dist/solutions-components/{p-5001cc41.entry.js → p-274aa753.entry.js} +1 -1
- package/dist/solutions-components/{p-e1e21798.entry.js → p-36b864ba.entry.js} +1 -1
- package/dist/solutions-components/{p-561c0e02.entry.js → p-44dc3dec.entry.js} +1 -1
- package/dist/solutions-components/{p-471d5c7f.entry.js → p-45ab1117.entry.js} +2 -2
- package/dist/solutions-components/p-49ed272d.entry.js +11 -0
- package/dist/solutions-components/{p-b7fbaeb7.entry.js → p-6b5b52c1.entry.js} +1 -1
- package/dist/solutions-components/{p-62d8796c.entry.js → p-7475b8b4.entry.js} +2 -2
- package/dist/solutions-components/{p-80e81af7.entry.js → p-7bcfe068.entry.js} +1 -1
- package/dist/solutions-components/{p-41314f33.entry.js → p-96027923.entry.js} +1 -1
- package/dist/solutions-components/p-9c25ee2c.entry.js +6 -0
- package/dist/solutions-components/{p-0a2e5861.entry.js → p-add973e2.entry.js} +1 -1
- package/dist/solutions-components/{p-8d4a4498.entry.js → p-b6d50640.entry.js} +1 -1
- package/dist/solutions-components/p-b8d1b57a.entry.js +6 -0
- package/dist/solutions-components/p-b95968fa.entry.js +6 -0
- package/dist/solutions-components/p-d2f8d8a8.entry.js +6 -0
- package/dist/solutions-components/{p-d51c07d2.entry.js → p-f57978f3.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +4 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +19 -0
- package/dist/types/components/layer-table/layer-table.d.ts +9 -5
- package/dist/types/components.d.ts +7 -2
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/interfaces.d.ts +3 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-8b92fe23.entry.js +0 -6
- package/dist/solutions-components/p-8e2f4995.entry.js +0 -6
- package/dist/solutions-components/p-a1d8aed8.entry.js +0 -6
- package/dist/solutions-components/p-d7afbe8d.entry.js +0 -11
@@ -177,6 +177,10 @@ export declare class CrowdsourceManager {
|
|
177
177
|
* number: default scale to zoom to when zooming to a single point feature
|
178
178
|
*/
|
179
179
|
zoomToScale: number;
|
180
|
+
/**
|
181
|
+
* boolean: When true the delete dialog will be shown
|
182
|
+
*/
|
183
|
+
_deleteDialogOpen: boolean;
|
180
184
|
/**
|
181
185
|
* boolean: when true the users can have the option to create features
|
182
186
|
*/
|
@@ -256,6 +260,10 @@ export declare class CrowdsourceManager {
|
|
256
260
|
* MapView.when is not fired when mapView is not currently visible
|
257
261
|
*/
|
258
262
|
protected _defaultLevelHonored: boolean;
|
263
|
+
/**
|
264
|
+
* number[]: the ids to be deleted
|
265
|
+
*/
|
266
|
+
protected _deleteIds: number[];
|
259
267
|
/**
|
260
268
|
* HTMLLayerTableElement: The layer table element
|
261
269
|
*/
|
@@ -329,6 +337,10 @@ export declare class CrowdsourceManager {
|
|
329
337
|
* Get the layer for the provided layer id
|
330
338
|
*/
|
331
339
|
layerSelectionChange(evt: CustomEvent): Promise<void>;
|
340
|
+
/**
|
341
|
+
* Get the feature ids and open the delete dialog
|
342
|
+
*/
|
343
|
+
showDelete(evt: CustomEvent): Promise<void>;
|
332
344
|
/**
|
333
345
|
* Get the layer ids from the map
|
334
346
|
*/
|
@@ -467,6 +479,13 @@ export declare class CrowdsourceManager {
|
|
467
479
|
* @protected
|
468
480
|
*/
|
469
481
|
protected getActions(layoutMode: ELayoutMode, panelOpen: boolean): Node;
|
482
|
+
/**
|
483
|
+
* Show delete dialog
|
484
|
+
*
|
485
|
+
* @returns node that will support delete or keep of the features
|
486
|
+
* @protected
|
487
|
+
*/
|
488
|
+
protected _deleteModal(): VNode;
|
470
489
|
/**
|
471
490
|
* Show filter component in modal
|
472
491
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
*/
|
16
16
|
import { EventEmitter, VNode } from "../../stencil-public-runtime";
|
17
17
|
import LayerTable_T9n from "../../assets/t9n/layer-table/resources.json";
|
18
|
-
import { AppLayout, IColumnsInfo, IMapClick, IMapInfo, IToolInfo, IToolSizeInfo, TooltipPlacement } from "../../utils/interfaces";
|
18
|
+
import { AppLayout, IColumnsInfo, IDeleteIds, IMapClick, IMapInfo, IToolInfo, IToolSizeInfo, TooltipPlacement } from "../../utils/interfaces";
|
19
19
|
import "@esri/instant-apps-components/dist/components/instant-apps-social-share";
|
20
20
|
import { LayerExpression } from "@esri/instant-apps-components";
|
21
21
|
export declare class LayerTable {
|
@@ -140,10 +140,6 @@ export declare class LayerTable {
|
|
140
140
|
* boolean: When true the select all will be displayed in an active state
|
141
141
|
*/
|
142
142
|
_selectAllActive: boolean;
|
143
|
-
/**
|
144
|
-
* boolean: When true the delete dialog will be shown
|
145
|
-
*/
|
146
|
-
_deleteDialogOpen: boolean;
|
147
143
|
/**
|
148
144
|
* boolean: When true the show/hide fields list is forced open
|
149
145
|
*/
|
@@ -329,6 +325,10 @@ export declare class LayerTable {
|
|
329
325
|
* string the current search expression
|
330
326
|
*/
|
331
327
|
protected _searchExpression: string;
|
328
|
+
/**
|
329
|
+
* number[]: selected features from table
|
330
|
+
*/
|
331
|
+
protected _tempSelectedIds: number[];
|
332
332
|
/**
|
333
333
|
* Update the url params when the appLayout changes
|
334
334
|
*/
|
@@ -409,6 +409,10 @@ export declare class LayerTable {
|
|
409
409
|
* Emitted on demand when filter action is clicked
|
410
410
|
*/
|
411
411
|
toggleFilter: EventEmitter<void>;
|
412
|
+
/**
|
413
|
+
* Emitted on demand when when the delete dialog should be shown
|
414
|
+
*/
|
415
|
+
showDelete: EventEmitter<IDeleteIds>;
|
412
416
|
/**
|
413
417
|
* Scroll and zoom to the selected feature from the Features widget.
|
414
418
|
*
|
@@ -5,11 +5,11 @@
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
6
6
|
*/
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
8
|
-
import { AppLayout, ButtonType, DistanceUnit, EditType, EDrawMode, IBasemapConfig, IConsentResponse, IExportInfos, IFeatureServiceEnabledStatus, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, ITemplateInfo, IValueChange, theme } from "./utils/interfaces";
|
8
|
+
import { AppLayout, ButtonType, DistanceUnit, EditType, EDrawMode, IBasemapConfig, IConsentResponse, IDeleteIds, IExportInfos, IFeatureServiceEnabledStatus, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, ITemplateInfo, IValueChange, theme } from "./utils/interfaces";
|
9
9
|
import { IReportingOptions as IReportingOptions1 } from "./components";
|
10
10
|
import { ILayerItemsHash } from "./components/layer-list/layer-list";
|
11
11
|
import { UserSession } from "@esri/solution-common";
|
12
|
-
export { AppLayout, ButtonType, DistanceUnit, EditType, EDrawMode, IBasemapConfig, IConsentResponse, IExportInfos, IFeatureServiceEnabledStatus, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, ITemplateInfo, IValueChange, theme } from "./utils/interfaces";
|
12
|
+
export { AppLayout, ButtonType, DistanceUnit, EditType, EDrawMode, IBasemapConfig, IConsentResponse, IDeleteIds, IExportInfos, IFeatureServiceEnabledStatus, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, ITemplateInfo, IValueChange, theme } from "./utils/interfaces";
|
13
13
|
export { IReportingOptions as IReportingOptions1 } from "./components";
|
14
14
|
export { ILayerItemsHash } from "./components/layer-list/layer-list";
|
15
15
|
export { UserSession } from "@esri/solution-common";
|
@@ -2351,6 +2351,7 @@ declare global {
|
|
2351
2351
|
interface HTMLLayerTableElementEventMap {
|
2352
2352
|
"featureSelectionChange": number[];
|
2353
2353
|
"toggleFilter": void;
|
2354
|
+
"showDelete": IDeleteIds;
|
2354
2355
|
}
|
2355
2356
|
interface HTMLLayerTableElement extends Components.LayerTable, HTMLStencilElement {
|
2356
2357
|
addEventListener<K extends keyof HTMLLayerTableElementEventMap>(type: K, listener: (this: HTMLLayerTableElement, ev: LayerTableCustomEvent<HTMLLayerTableElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
@@ -3727,6 +3728,10 @@ declare namespace LocalJSX {
|
|
3727
3728
|
* Emitted on demand when a layer is selected
|
3728
3729
|
*/
|
3729
3730
|
"onFeatureSelectionChange"?: (event: LayerTableCustomEvent<number[]>) => void;
|
3731
|
+
/**
|
3732
|
+
* Emitted on demand when when the delete dialog should be shown
|
3733
|
+
*/
|
3734
|
+
"onShowDelete"?: (event: LayerTableCustomEvent<IDeleteIds>) => void;
|
3730
3735
|
/**
|
3731
3736
|
* Emitted on demand when filter action is clicked
|
3732
3737
|
*/
|
package/dist/types/preact.d.ts
CHANGED
@@ -724,9 +724,10 @@ declare module "preact/src/jsx" {
|
|
724
724
|
"onlayersListLoaded"?: (event: CustomEvent<any>) => void;
|
725
725
|
}
|
726
726
|
|
727
|
-
"layer-table": Omit<JSX.SolutionsLayerTable, "onFeatureSelectionChange" | "onToggleFilter"> & JSXInternal.HTMLAttributes<HTMLSolutionsLayerTableElement> & {
|
727
|
+
"layer-table": Omit<JSX.SolutionsLayerTable, "onFeatureSelectionChange" | "onToggleFilter" | "onShowDelete"> & JSXInternal.HTMLAttributes<HTMLSolutionsLayerTableElement> & {
|
728
728
|
"onfeatureSelectionChange"?: (event: CustomEvent<any>) => void;
|
729
729
|
"ontoggleFilter"?: (event: CustomEvent<any>) => void;
|
730
|
+
"onshowDelete"?: (event: CustomEvent<any>) => void;
|
730
731
|
}
|
731
732
|
|
732
733
|
"map-card": Omit<JSX.SolutionsMapCard, "onMapChanged" | "onBeforeMapChanged" | "onToggleFilter" | "onClearSelection"> & JSXInternal.HTMLAttributes<HTMLSolutionsMapCardElement> & {
|
package/package.json
CHANGED
@@ -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 h}from"./p-4e6eb06e.js";import{g as a}from"./p-f4aadb3b.js";import{E as l}from"./p-80cb7c73.js";import{g as n}from"./p-d572627c.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const d=class{constructor(e){t(this,e),this.showIntroductionWindow=i(this,"showIntroductionWindow",7),this.showCoverPage=i(this,"showCoverPage",7),this.appLayout=void 0,this.appProxies=void 0,this.basemapConfig=void 0,this.coverPageEnabled=void 0,this.customInfoText=void 0,this.defaultAppLayout=void 0,this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableSearch=!0,this.enableShare=!1,this.enableZoom=!0,this.locale=void 0,this.mapInfos=[],this.onlyShowUpdatableLayers=!0,this.popupHeaderColor=void 0,this.popupHeaderHoverColor=void 0,this.popupHeaderHoverTextColor=void 0,this.popupHeaderTextColor=void 0,this.searchConfiguration=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.zoomToScale=void 0,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._isPortraitMobile=!1,this._translations=void 0,this._layer=void 0,this._layoutMode=l.GRID,this._mapInfo=void 0,this._mapView=void 0,this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerIds=void 0,this._isLoading=!0}get el(){return e(this)}_defaultAppLayoutHonored=!1;_defaultCenterHonored=!1;_defaultLevelHonored=!1;_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 idsFound(t){this._layerIds=t.detail.layerIds}async componentWillLoad(){await this._getTranslations(),this._resizeObserver=new ResizeObserver((()=>this._onResize()))}render(){return s(o,{key:"8fd887051b4437477f1413843dfc6d938304364a"},s("calcite-shell",{key:"a9989a1698b268db75cdbcadcd3956d944daa25c",class:"position-relative"},s("calcite-panel",{key:"88c5631e21b5ccb6a958e016c274e3aa746a6af1",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())}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 l.HORIZONTAL:e=i?"chevrons-up":"chevrons-down";break;case l.VERTICAL:case l.GRID:e=i?"chevrons-left":"chevrons-right"}return e}_getMapSizeClass(t,i,e){let s="";switch(t){case l.HORIZONTAL:s=(i&&!e?"height-1-2 display-grid":i&&e?"height-full":"height-0")+" width-full position-relative";break;case l.GRID:s="height-full position-relative "+(i?"width-1-3":"width-0");break;case l.VERTICAL:s="height-full position-relative "+(i?"width-1-2":"width-0")}return s}_getTableSizeClass(t,i){let e="";switch(t){case l.HORIZONTAL:e=(i?"height-1-2":"height-full")+" width-full display-flex flex-column";break;case l.GRID:e=(i?"width-2-3":"width-full")+" height-full display-flex";break;case l.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===l.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 ${!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!==l.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 z-index-0"} ${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,h="tableView"===this.appLayout,a=e&&this._isPortraitMobile?"visibility-hidden":o?"display-none":"",n=o?"height-full width-full z-index-0":"display-none",d=this._getTableSizeClass(t,i),r=t===l.HORIZONTAL?"horizontal":"vertical",c=t===l.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:`${d} border-bottom`},this._isMobile?void 0:s("calcite-action-bar",{class:"border-sides",expandDisabled:!0,layout:r,slot:c},this.getActions(t,i)),s("div",{class:`width-full height-full position-relative z-index-0 ${a}`},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,isMobile:this._isPortraitMobile,locale:this.locale,mapHidden:h,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,a="toggle-layout";return s(h,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:a,onClick:()=>this._toggleLayout(),slot:"actions-end",text:""}),s("calcite-tooltip",{placement:"bottom","reference-element":a},s("span",null,o)))}_filterModal(){return s("calcite-modal",{"aria-labelledby":"modal-title",class:"modal",kind:"brand",onCalciteModalClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},s("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations?.filter?.replace("{{title}}",this._layer?.title)),s("div",{slot:"content"},s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:async()=>this._closeFilter(),comboboxOverlayPositioning:"fixed",layerExpressions:this._layerExpressions,onFilterListReset:()=>{this._handleFilterListReset(),this._mapCard.resetFilter()},onFilterUpdate:async()=>{const t=this._filterList.filterCount>0;await(this._layerTable?.filterUpdate(t)),await this._mapCard.updateFilterState(t)},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())}_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?l.HORIZONTAL:l.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 a(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],enableZoom:["enableZoomWatchHandler"],locale:["localeWatchHandler"]}}};d.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}";export{d as crowdsource_manager}
|
@@ -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,g as s,h as r,H as t}from"./p-4e6eb06e.js";const a=class{constructor(s){e(this,s)}get el(){return s(this)}render(){return r(t,{key:"a8d200d4f119571b482fa8c9f87d759458157fe3"},r("slot",{key:"fcac9d578b04a4330016dfbb09c0a38735d7f2e7"}))}};a.style=":host{display:block}";export{a as share_item}
|
@@ -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 s,h as e,H as a}from"./p-4e6eb06e.js";import{g as h,l as o}from"./p-f4aadb3b.js";import{g as l,q as n,e as c,f as d,i as r,j as p,c as b}from"./p-d572627c.js";import{d as f}from"./p-ff9e28d1.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-7530a02f.js";import"./p-d0d020a5.js";import"./p-9bb44f57.js";const u=class{constructor(s){t(this,s),this.createWorkFlowStarted=i(this,"createWorkFlowStarted",7),this.backFromCreateWorkFlow=i(this,"backFromCreateWorkFlow",7),this.featureOrRecordSubmitted=i(this,"featureOrRecordSubmitted",7),this.customInfoText=void 0,this.enableEditGeometry=!1,this.isMobile=void 0,this.layer=void 0,this.locale=void 0,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this.selectedFeaturesIds=void 0,this.enableCreateFeatures=!0,this.selectingFeatureFromMap=void 0,this._cardLoading=!1,this._graphics=void 0,this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._translations=void 0}get el(){return s(this)}_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",s=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 e(a,{key:"1dc448368b85b83ccc2f76f59cff83559d1d1285"},e("div",{key:"7c058f7a4ca2db84f0ad35efba90a1485e5c7989",class:"overflow-auto height-full"},e("calcite-shell",{key:"1388666d3d11efee37efc1524011594237cccc35",class:"position-relative "+t},e("div",{key:"3f93c4de344e49eec16e447bc1ca44cb280f84cc",class:"position-static z-index-500"},e("info-card",{key:"c5b8cafef2595b8ae85725d583caebf9754ce1fb",enableEditGeometry:this.enableEditGeometry,graphics:this._graphics,isLoading:this._cardLoading,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView}))),e("calcite-shell",{key:"bfa2f41e657f390335545f46ab744d4d980c3926",class:"position-relative "+s},e("calcite-flow-item",{key:"bf19ce4b69b52c5652629f38859e03a0a99f8374"},e("calcite-panel",{key:"1ea46998a73ad636ad2a956e72181a0570edd5d0"},e("div",{key:"d853f429c30daa5abcfe6576b7242fa48251ae53",class:"padding-1"},e("calcite-notice",{key:"dffa52ec3fa7a22494b6dadd7b1c6d512e25c192",icon:this.selectingFeatureFromMap?"map":"table",iconFlipRtl:!0,open:!0},e("div",{key:"728b56c9281dfe09d1604882635a53803c5f4253",slot:"message"},l))),!this.isMobile&&n&&e("calcite-button",{key:"260042d84c529d5508630bca7bdb39db1c2408cb",disabled:!this.layer,onClick:()=>this._createFeatureBtnClicked(),slot:"footer",width:"full"},h?this._translations.createRecord:this._translations.createFeature)))),e("calcite-shell",{key:"c30cbc2dc6e70319440bf9ed7c3d7f7ede38c3a1",class:"position-relative "+i},e("calcite-flow-item",{key:"901c5a407a8418c34ee72c4dd4b16443c3766819"},e("calcite-panel",{key:"a6faf502cd08060a42582cbd95d7354b1e192a43",heading:o},e("calcite-action",{key:"23e9c295f7476f935055c30227774e173315194d",class:"back-button hydrated",icon:"chevron-left",onClick:this._backFromCreateFeature.bind(this),scale:"s",slot:"header-actions-start",text:""}),this.getEditorComponent(),this._showSubmitBtn&&e("calcite-button",{key:"3ee5c310e5fad8aa5d6abd8ae1347c46d3ada1be",appearance:"solid",class:"footer-top-button footer-button",onClick:()=>{this._createFeature.submit()},slot:"footer",width:"full"},this._translations.create))))))}getEditorComponent(){return e("div",null,this._showCreateFeatureComponent&&e("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,s)=>t.indexOf(i.getObjectId())-t.indexOf(s.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(s){t(this,s),this.featureSelectionChange=i(this,"featureSelectionChange",7),this.toggleFilter=i(this,"toggleFilter",7),this.appLayout=void 0,this.defaultGlobalId=void 0,this.defaultLayerId=void 0,this.defaultOid=void 0,this.enableAutoRefresh=void 0,this.enableColumnReorder=!0,this.enableCSV=void 0,this.enableInlineEdit=void 0,this.enableShare=void 0,this.isMobile=void 0,this.locale=void 0,this.mapHidden=void 0,this.mapInfo=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.selectedIds=[],this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=void 0,this.zoomAndScrollToSelected=void 0,this.zoomToScale=void 0,this.createFilterModal=!0,this._allIds=[],this._controlsThatFit=void 0,this._csvExporting=!1,this._fetchingData=!1,this._filterActive=!1,this._filterOpen=!1,this._layer=void 0,this._selectAllActive=!1,this._deleteDialogOpen=!1,this._showHideOpen=!1,this._showOnlySelected=!1,this._toolInfos=void 0,this._translations=void 0,this._fullTextSearchInfo=void 0,this._searchPlaceHolder="",this._size=0}get el(){return s(this)}FeatureTable;TableTemplate;_columnsInfo;_ctrlIsPressed=!1;_currentId;_editEnabled;_defaultFilterHonored=!1;_defaultGlobalIdHonored=!1;_defaultOidHonored=!1;_defaultVisibleToolSizeInfos;_definitionExpression;_deleteEnabled;_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;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 s=this._getId(i.icon);return i.isOverflow=t.indexOf(s)<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 filterReset(){await this._handleFilterListReset()}async filterUpdate(t){await this._handleFilterUpdate(t)}async closeFilter(){await this._closeFilter()}async refresh(){this._table&&await this._refresh()}featureSelectionChange;toggleFilter;async selectionChanged(t){const i=t.detail.selectedFeature[0],s=i.getObjectId(),e=this._table;if(e.rowHighlightIds.length&&e.rowHighlightIds.removeAll(),e.rowHighlightIds.add(s),this.zoomAndScrollToSelected){const t=this._table.viewModel.getObjectIdIndex(s);this._table.scrollToIndex(t);const e=i.layer;let a;this.mapView.allLayerViews.toArray().some((t=>{if(t.layer.title===e.title&&"feature"===t.layer.type)return a=t,!0})),a&&await c([s],a,this.mapView,!0,void 0,this.zoomToScale)}}async layerSelectionChange(t){await this._layerSelectionChanged(t)}async editsComplete(t){const i=t.detail;"delete"!==i&&"add"!==i||(this._allIds=await d(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()}noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}clearSelection(){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",s=this._size.toString(),h=this.selectedIds.length.toString(),o=this.isMobile?"height-full":"height-full-adjusted",l=this._canShowFullTextSearch();return this._validateActiveActions(),e(a,{key:"f56462fd5d5afa71052cf2557069bb2fee15aaeb"},e("calcite-shell",{key:"92ccfa2235269aad6da5f918f79ec8ae100e99ca"},this._getTableControlRow("header"),e("div",{key:"e5b8fe5e4236e1a7b7e9d31ad784d9bb52a6918d",class:`width-full ${o}`},e("calcite-panel",{key:"eca933d832e5b6efddb025211c253bf09e41ab22",class:"height-full width-full"},l&&e("div",{key:"e819896c4264db3ee95d10194b67da65997b541d",class:"search-container"},e("calcite-input",{key:"e979c7962205caf072057332280b9e04ecd233c4",class:"search",clearable:!0,icon:"search",onCalciteInputChange:t=>{this._searchTextChanged(t)},placeholder:this._searchPlaceHolder,title:this._searchPlaceHolder,type:"search"})),e("calcite-loader",{key:"ee715472a4f819dd1e9328e75022439e9bba1334",class:i,label:this._translations.fetchingData,scale:"l"}),e("div",{key:"8085821dea31de1fcbb1119e5791c0dea744e470",class:t,ref:this.onTableNodeCreate}))),this.isMobile?void 0:e("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",s).replace("{{selected}}",h))),this.createFilterModal&&this._filterModal(),e("delete-dialog",{key:"20c9a06c3f0d44433d9442755d25658c249e102c",id:"deleteDialogId",ids:this._getIds(),layer:this._layer,locale:this.locale,onDeleteDialogClose:()=>this._deleteDialogOpen=!1,open:this._deleteDialogOpen,ref:t=>this._deleteDialog=t}))}_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,s]=await o(["esri/widgets/FeatureTable","esri/core/reactiveUtils","esri/widgets/FeatureTable/support/TableTemplate"]);this.FeatureTable=t,this.reactiveUtils=i,this.TableTemplate=s}async _searchTextChanged(t){this._fullTextSearchInfo.forEach((i=>{i.searchTerm=t.target.value})),this._searchFullText()}async _searchFullText(){if(this._searchExpression&&this._clearSearchDefinitionExpression(),this._fullTextSearchInfo.length&&this._fullTextSearchInfo[0].searchTerm){const t=this._layer.createQuery();t.fullText=this._fullTextSearchInfo;const i=await this._layer.queryObjectIds(t);await this._updateSearchDefinitionExpression(i?.length?i:[-1])}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 s=`objectId in(${t})`;this._layer.definitionExpression=i?.indexOf(this._searchExpression)>-1?i.replace(this._searchExpression,s):i?`${i} AND (${s})`:s,this._searchExpression=s}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 s=[];i.forEach((t=>{const i=this._layer.getField(t.trim());s.push(i.alias)})),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{fields}}",s.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}_onResize(){this._updateToolbar()}_getTableControlRow(t){const i=this._canShowFullTextSearch()?"border-bottom":"";return e("div",{class:`display-flex height-51-px ${i}`,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 e("calcite-action-bar",{class:t,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},e("div",{class:`border-end ${t} ${i}`,id:"solutions-map-layer-picker-container"},e("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?e("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?e("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((t=>{const i=this._columnsInfo[t];return e("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.showColumn(i.label):this._table.hideColumn(i.label)},selected:i},t)}))):void 0}_validateEnabledActions(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate,s=["zoom-to-object","pencil","trash","erase","selected-items-filter"];this._toolInfos?.forEach((e=>{e&&s.indexOf(e.icon)>-1&&(e.disabled="pencil"===e.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,s=this._featuresEmpty(),e=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},e?{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:()=>this._selectAll(),label:this._translations.selectAll,disabled:s,isOverflow:!1},{active:!1,icon:"compare",indicator:!1,func:()=>this._switchSelected(),label:this._translations.switchSelected,disabled:s,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:s,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 s=["solutions-more","solutions-map-layer-picker-container","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,a)=>(s.indexOf(a.id)<0&&(i>t?i-=a.width:e.push(a)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let a=!1;const h=[...this._defaultVisibleToolSizeInfos].reduce(((h,o)=>(!a&&s.indexOf(o.id)<0&&(e.indexOf(o.id)>-1||i+o.width<=t)?(e.indexOf(o.id)<0&&(i+=o.width),h.push(o)):s.indexOf(o.id)<0&&i+o.width>t&&(a=!0),h)),[]);this._setControlsThatFit(h,s)}}),250))}_setControlsThatFit(t,i){let s=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const e=document.getElementById("solutions-action-bar");e?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!s&&(s=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),s&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,s)=>{0===s?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?e("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},e("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},e("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),e("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>e("calcite-dropdown-group",{class:`${t.disabled?"disabled":""} ${"trash"===t.icon?"delete-red":""}`,selectionMode:"none"},e("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?e("div",{class:"display-flex"},e("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,s,a,h,o,l,n){const c=void 0===this._layer||o;return e("div",{class:"display-flex",id:this._getId(i),slot:n},e("calcite-action",{active:t,appearance:"solid",disabled:c,icon:i,id:`layer-table-${i}`,indicator:s,label:a,loading:l,onClick:h,text:a,textEnabled:!0}),this._getToolTip("bottom",i,a))}_showDelete(){this._deleteDialogOpen=!0}_getShare(t){return e("div",{class:"share-action",id:this._getId(t)},e("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,s){return document.getElementById(i)?e("calcite-tooltip",{placement:t,"reference-element":i},e("span",null,s)):void 0}_getId(t){return`solutions-action-${t}`}_getDangerAction(t,i,s,a){const h=void 0===this._layer||a;return e("div",{class:"display-flex",id:this._getId(t)},"trash"===t?e("delete-button",{buttonType:"action",class:"display-flex",disabled:h,icon:t,id:"solutions-delete",ids:this._getIds(),layer:this._layer,locale:this.locale}):e("calcite-action",{appearance:"solid",disabled:h,id:t,onClick:s,text:i},e("calcite-button",{appearance:"transparent",iconStart:t,kind:"danger"},i)),this._getToolTip("bottom",t,i))}_getIds(){return this._table?.highlightIds?.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:{header:!1,menu:!1},tableTemplate:{columnTemplates:i},container:t})})),await this._table.when((()=>{this._table.highlightIds.on("change",(t=>{this._handleOnChange(t)}));const t=this.reactiveUtils.watch((()=>this._table.size),(t=>{this._size=t}));this._table.viewModel.addHandles(t)})))}async _handleOnChange(t){const i=[...this._table.highlightIds.toArray()];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 s=this.selectedIds.length>1&&1===t.removed.length?t.removed:i.filter((t=>this.selectedIds.indexOf(t)<0));this._clearSelection(),this.selectedIds=[...s],s.length>0?this._table.highlightIds.add(s[0]):this._skipOnChange=!1}else this.selectedIds=i.reverse();else if(this._ctrlIsPressed)this.selectedIds=i.reverse();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)),[]),s=await r(0,this._layer,[],t);let e=!1;const a=this._table.viewModel.getObjectIdIndex(this._previousCurrentId),h=this._table.viewModel.getObjectIdIndex(this._currentId);this._skipOnChange=(a<h?a:h)+1!==(h>a?h:a);const o=s.reduce(((t,i)=>{const s=i;return s===this._currentId||s===this._previousCurrentId?(e=!e,t.indexOf(s)<0&&t.push(s)):e&&t.indexOf(s)<0&&t.push(s),t}),[]),l=a<h?o.reverse():o;this.selectedIds=[...new Set([...l,...this.selectedIds])],this._table.highlightIds.addMany(this.selectedIds.filter((t=>i.indexOf(t)<0)))}this._finishOnChange()}this._currentId=[...this._table.highlightIds.toArray()].reverse()[0],this._selectionFromMap=!1}_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),i=t?.some(((t,i)=>JSON.stringify(this._table?.tableTemplate.columnTemplates[i])!==JSON.stringify(t)));if(this._table&&t&&(i||!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 d(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||(console.log(`table.state: ${this._table.state}`),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.clearSelectionFilter(),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 d(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,s)=>((!t||t?.indexOf(s.name)>-1)&&(i[s.name]=!s.hidden),i)),{}),s=this._table?.columns.map((t=>t.name));(t?t.filter((t=>s.indexOf(t)<0)):[]).forEach((t=>{i[t]=!0})),this._columnsInfo=t?t.reduce(((t,s)=>(t[s]=i[s],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,s="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),s=t?.sortOrder?t.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(i,s)})))}_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 e("calcite-modal",{"aria-labelledby":"modal-title",class:"modal",kind:"brand",onCalciteModalClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},e("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations?.filter?.replace("{{title}}",this._layer?.title)),e("div",{slot:"content"},e("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:async()=>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 d(this._layer),this._filterOpen=!1)}async _mapClicked(t){const i={include:this._layer},s=await this.mapView.hitTest(t.screenPoint,i);s.results.length>0?(s.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()):this._clearSelection()}_selectAll(){const t=this._allIds;this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange(),this._selectAllActive=!0}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_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}_switchSelected(){const t=[...this.selectedIds];this._table.highlightIds.removeAll();const i=this._allIds.reduce(((i,s)=>(t.indexOf(s)<0&&i.push(s),i)),[]).sort(((t,i)=>t-i));this._skipOnChange=!0,this._table.highlightIds.addMany(i),this.selectedIds=i,this._finishOnChange()}async _exportToCSV(){const t={},i=this._table.highlightIds.toArray();t[this._layer.id]={selectionSetNames:[this._layer.title],ids:i,layer:this._layer};const s=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,s,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}_updateToolInfoLoading(t,i){this._toolInfos.some((s=>{if(s?.icon===t)return s.loading=i,!0}))}async _refresh(){await this._table.refresh(),this._allIds=await d(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 s;this.mapInfo?.layerOptions?.layers.some((i=>{if(i.id===t)return s=i,!0}));const e=s?.fields&&s?.fieldOrder?s.fieldOrder.filter((t=>s.fields.indexOf(t)>-1)):void 0;let a;return i&&(a=s&&s?.fields?i.reduce(((t,i)=>{if(s.fields.indexOf(i.name)>-1){const s={type:"field",fieldName:i.name,label:i.alias,menuConfig:this._getMenuConfig(i.name)};t.push(s)}return t}),[]).sort(this._sortFields.bind(this,s?.fieldOrder)):i.map((t=>({type:"field",fieldName:t.name,label:t.alias,menuConfig:this._getMenuConfig(t.name)})))),e?a?.sort(this._sortFields.bind(this,e)):a}_sortFields(t,i,s){return t?.indexOf(i.fieldName)-t.indexOf(s.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 v(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(s){t(this,s),this.mapChanged=i(this,"mapChanged",7),this.beforeMapChanged=i(this,"beforeMapChanged",7),this.toggleFilter=i(this,"toggleFilter",7),this.clearSelection=i(this,"clearSelection",7),this.appLayout=void 0,this.appProxies=void 0,this.defaultWebmapId="",this.defaultLayerId=void 0,this.enableHome=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableShare=!1,this.enableSingleExpand=!0,this.enableSearch=void 0,this.enableBasemap=void 0,this.basemapConfig=void 0,this.hidden=void 0,this.homeZoomIndex=3,this.homeZoomPosition="top-left",this.homeZoomToolsSize="m",this.locale=void 0,this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.mapView=void 0,this.stackTools=!0,this.theme=void 0,this.toolOrder=void 0,this.isMapLayout=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.selectedFeaturesIds=void 0,this.selectedLayer=void 0,this.zoomToScale=void 0,this.onlyShowUpdatableLayers=void 0,this.isMobile=void 0,this.mapInfo=void 0,this._translations=void 0,this._searchConfiguration=void 0,this._webMapInfo=void 0,this._showHideOpen=!1,this._toolInfos=void 0,this._controlsThatFit=void 0}get el(){return s(this)}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 s=this._getId(i.icon);return i.isOverflow=t.indexOf(s)<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":"",s="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(),e(a,{key:"525ee5ce855cf5aa4f8c50e7e88be6c6236046ac"},e("div",{key:"899898ee0b2ba9048ed24716a339c94d3106a52e",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),e("calcite-progress",{key:"896569eb6cf65f45cbebb4b36f5b01ada5ed1092",class:o,value:0}),e("div",{key:"79cac798541783bdc74e4b13f9df4d7564eb99f4",class:`${h} ${i}`,ref:t=>this._mapDiv=t}),e("map-tools",{key:"730d48c4ce98af3872bfa6c486e8749e18c24477",basemapConfig:this.basemapConfig,class:`box-shadow ${s}`,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,s,e]=await o(["esri/WebMap","esri/views/MapView","esri/widgets/Home","esri/config"]);this.WebMap=t,this.MapView=i,this.Home=s,this.esriConfig=e}async _loadMap(t){const i=!this._defaultWebmapHonored&&this.defaultWebmapId,s=this.mapInfos?.filter((t=>t.id===this.defaultWebmapId)),e=JSON.stringify(t)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&s?s[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=v(t.proxyUrl),i.portalItem&&i.portalItem.when((()=>{i.portalItem.url=v(t.proxyUrl)})),l.request?.interceptors?.push({urls:t.sourceUrl,before:i=>{i.url&&i.url===t.sourceUrl&&(i.url=v(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)):e&&(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 s=["solutions-more","solutions-map-layer-picker-container","map-picker","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,a)=>(s.indexOf(a.id)<0&&(i>t?i-=a.width:e.push(a)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let a=!1;const h=[...this._defaultVisibleToolSizeInfos].reduce(((h,o)=>(!a&&s.indexOf(o.id)<0&&(e.indexOf(o.id)>-1||i+o.width<=t)?(e.indexOf(o.id)<0&&(i+=o.width),h.push(o)):s.indexOf(o.id)<0&&i+o.width>t&&(a=!0),h)),[]);this._setControlsThatFit(h,s)}}),250))}_setControlsThatFit(t,i){let s=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const e=document.getElementById("solutions-action-bar");e?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!s&&(s=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),s&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,s)=>{0===s?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",s=this.isMobile?"border-top":"",a=this.isMapLayout?"":"display-none";return e("calcite-action-bar",{class:i,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},e("map-picker",{class:t,isMapLayout:this.isMapLayout,locale:this.locale,mapInfos:this.mapInfos,ref:t=>this._mapPicker=t}),e("div",{class:`mapView-header display-flex ${a}`},e("div",{class:`border-end ${i} ${s}`,id:"solutions-map-layer-picker-container"},this.mapView&&e("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?e("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this.selectedLayer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},e("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},e("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),e("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>e("calcite-dropdown-group",{class:t.disabled?"disabled":"",selectionMode:"none"},e("calcite-dropdown-item",{disabled:t.loading,iconStart:t.icon,id:"solutions-subset-list",onClick:t.func},t.loading?e("div",{class:"display-flex"},e("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label)))))):void 0}_getShare(t){return e("div",{class:"share-action",id:this._getId(t)},e("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(),s=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,s?{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!s,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,s=["zoom-to-object","pencil","erase"];this._toolInfos?.forEach((e=>{e&&s.indexOf(e.icon)>-1&&(e.disabled="pencil"===e.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,s){return document.getElementById(i)?e("calcite-tooltip",{placement:t,"reference-element":"map-"+i},e("span",null,s)):void 0}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getAction(t,i,s,a,h,o,l,n){const c=void 0===this.selectedLayer||o;return e("div",{class:"display-flex",id:this._getId(i),slot:n},e("calcite-action",{active:t,appearance:"solid",disabled:c,icon:i,id:"map-"+i,indicator:s,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,11 +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,h as e,F as i,g as s,c as a,H as o}from"./p-4e6eb06e.js";import{c as n,d as l}from"./p-5e25a0b8.js";import{s as c,e as r}from"./p-621ad249.js";import{g as d}from"./p-f4aadb3b.js";import"./p-ff336351.js";import"./p-4f82eb55.js";import"./p-7d542581.js";import"./p-91371f97.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
10
|
-
* v2.13.0
|
11
|
-
*/const h="content",p="content--behind",b="content-bottom",f="center-content",m=class{constructor(e){t(this,e),this.handleHeaderSlotChange=t=>{this.hasHeader=!!c(t)},this.handleFooterSlotChange=t=>{this.hasFooter=!!c(t)},this.handleAlertsSlotChange=t=>{this.hasAlerts=!!c(t),r(t)?.map((t=>{"CALCITE-ALERT"===t.tagName&&(t.embedded=!0)}))},this.handleSheetsSlotChange=t=>{this.hasSheets=!!c(t),r(t)?.map((t=>{"CALCITE-SHEET"===t.tagName&&(t.embedded=!0)}))},this.handleModalsSlotChange=t=>{this.hasModals=!!c(t),r(t)?.map((t=>{"CALCITE-MODAL"===t.tagName&&(t.embedded=!0)}))},this.handlePanelTopChange=t=>{this.hasPanelTop=c(t)},this.handlePanelBottomChange=t=>{this.hasPanelBottom=c(t)},this.handleDialogsSlotChange=t=>{this.hasDialogs=!!c(t),r(t)?.map((t=>{"CALCITE-DIALOG"===t.tagName&&(t.embedded=!0)}))},this.contentBehind=!1,this.hasHeader=!1,this.hasFooter=!1,this.hasAlerts=!1,this.hasModals=!1,this.hasDialogs=!1,this.hasSheets=!1,this.hasPanelTop=!1,this.hasPanelBottom=!1,this.hasOnlyPanelBottom=!1,this.panelIsResizing=!1}handleCalciteInternalShellPanelResizeStart(t){this.panelIsResizing=!0,t.stopPropagation()}handleCalciteInternalShellPanelResizeEnd(t){this.panelIsResizing=!1,t.stopPropagation()}updateHasOnlyPanelBottom(){this.hasOnlyPanelBottom=!this.hasPanelTop&&this.hasPanelBottom}connectedCallback(){n(this)}disconnectedCallback(){l(this)}renderHeader(){return e("div",{hidden:!this.hasHeader},e("slot",{key:"header",name:"header",onSlotchange:this.handleHeaderSlotChange}))}renderFooter(){return e("div",{class:"footer",hidden:!this.hasFooter,key:"footer"},e("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange}))}renderAlerts(){return e("div",{hidden:!this.hasAlerts},e("slot",{key:"alerts",name:"alerts",onSlotchange:this.handleAlertsSlotChange}))}renderSheets(){return e("div",{hidden:!this.hasSheets},e("slot",{key:"sheets",name:"sheets",onSlotchange:this.handleSheetsSlotChange}))}renderModals(){return e("div",{hidden:!this.hasModals},e("slot",{key:"modals",name:"modals",onSlotchange:this.handleModalsSlotChange}))}renderDialogs(){return e("div",{hidden:!this.hasDialogs},e("slot",{key:"dialogs",name:"dialogs",onSlotchange:this.handleDialogsSlotChange}))}renderContent(){const{panelIsResizing:t}=this,i=e("slot",{key:"default-slot"}),s=t?e("div",{class:"content--non-interactive"},i):i,a=e("slot",{key:"center-row-slot",name:"center-row"}),o=e("slot",{key:"panel-bottom-slot",name:"panel-bottom",onSlotchange:this.handlePanelBottomChange}),n=e("slot",{key:"panel-top-slot",name:"panel-top",onSlotchange:this.handlePanelTopChange}),l="content-container";return this.contentBehind?[e("div",{class:{[h]:!0,[p]:!0},key:l},s),e("div",{class:{[f]:!0,[b]:this.hasOnlyPanelBottom}},n,o,a)]:[e("div",{class:{[h]:!0,[b]:this.hasOnlyPanelBottom},key:l},n,s,o,a)]}renderMain(){return e("div",{class:"main"},e("slot",{name:"panel-start"}),this.renderContent(),e("slot",{name:"panel-end"}))}renderPositionedSlots(){return e("div",{class:"positioned-slot-wrapper"},this.renderAlerts(),this.renderModals(),this.renderDialogs(),this.renderSheets())}render(){return e(i,{key:"6864b8b95b6edd871ad622b0d49a3f4a42a0a8a8"},this.renderHeader(),this.renderMain(),this.renderFooter(),this.renderPositionedSlots())}get el(){return s(this)}static get watchers(){return{hasPanelTop:["updateHasOnlyPanelBottom"],hasPanelBottom:["updateHasOnlyPanelBottom"]}}};m.style=":host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:absolute;inset:0px;display:flex;block-size:100%;inline-size:100%;flex-direction:column;overflow:hidden;--calcite-shell-tip-spacing:26vw}.main{position:relative;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;flex-direction:row;justify-content:space-between;overflow:hidden}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;overflow:auto;justify-content:space-between}.content ::slotted(calcite-shell-center-row),.content ::slotted(calcite-panel),.content ::slotted(calcite-flow){flex:1 1 auto;align-self:stretch;max-block-size:unset}.content--behind{position:absolute;inset:0px;border-width:0px;z-index:calc(var(--calcite-z-index) - 1);display:initial}.content--non-interactive{pointer-events:none;display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap}::slotted(calcite-shell-center-row){inline-size:unset}::slotted(.header .heading){font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-normal)}slot[name=panel-start]::slotted(calcite-shell-panel),slot[name=panel-end]::slotted(calcite-shell-panel){position:relative;z-index:calc(var(--calcite-z-index) + 1)}slot[name=panel-end]::slotted(calcite-shell-panel){margin-inline-start:auto}::slotted(calcite-panel),::slotted(calcite-flow){border-width:1px;border-inline-start-width:0px;border-inline-end-width:0px;border-style:solid;border-color:var(--calcite-color-border-3)}slot[name=center-row]::slotted(calcite-shell-center-row:not([detached])),slot[name=panel-top]::slotted(calcite-shell-center-row:not([detached])),slot[name=panel-bottom]::slotted(calcite-shell-center-row:not([detached])){border-inline-start-width:1px;border-inline-end-width:1px;border-color:var(--calcite-color-border-3)}.center-content{display:flex;flex-direction:column;justify-content:space-between;block-size:100%;inline-size:100%;min-inline-size:0}.content-bottom{justify-content:flex-end}::slotted(calcite-shell-center-row){flex:none;align-self:stretch}::slotted(calcite-tip-manager){position:absolute;z-index:var(--calcite-z-index-toast);box-sizing:border-box}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}::slotted(calcite-tip-manager){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:0.25rem;--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);inset-block-end:0.5rem;inset-inline:var(--calcite-shell-tip-spacing)}slot[name=center-row]::slotted(calcite-shell-center-row),slot[name=panel-bottom]::slotted(calcite-shell-center-row){margin-block-start:auto}slot[name=panel-top]::slotted(calcite-shell-center-row){margin-block-end:auto}.position-wrapper{position:absolute;pointer-events:none;inset:0}:host([hidden]){display:none}[hidden]{display:none}";const u=class{constructor(e){t(this,e),this.editsComplete=a(this,"editsComplete",7),this.deleteDialog=void 0,this.buttonType="button",this.disabled=!1,this.icon=void 0,this.ids=[],this.layer=void 0,this.locale=void 0,this._confirmDelete=!1,this._deleteEndabled=!1,this._supportsDelete=void 0,this._translations=void 0}get el(){return s(this)}async idsWatchHandler(){this._setDeleteEnabled()}async layerWatchHandler(){this._setDeleteEnabled()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}editsComplete;async componentWillLoad(){await this._getTranslations()}render(){return e(o,{key:"1816da3d5cd7903b4e699dffa4ac4836dca722bb"},"button"===this.buttonType?e("calcite-button",{appearance:"outline",disabled:!this._deleteEndabled,id:"solutions-delete",kind:"danger",onClick:()=>this._delete(),width:"full"},this._translations.deleteCount.replace("{{n}}",this.ids.length.toString())):e("calcite-action",{appearance:"solid",compact:!0,disabled:!this._deleteEndabled,id:this.icon,onClick:()=>this._delete(),scale:"s",text:this._translations.delete},e("calcite-button",{appearance:"transparent",iconStart:this.icon,kind:"danger"},this._translations.delete)),this._deleteMessage(),e("calcite-tooltip",{key:"26fc4d4b4ea02b7a6c5e3f87abe2c5b8f96a3654",placement:"bottom","reference-element":"button"===this.buttonType?"solutions-delete":this.icon},e("span",{key:"c2f7b101bb3a99274fe7f364ad29365c212d856e"},this._translations.delete)))}async componentDidLoad(){this._setDeleteEnabled()}_setDeleteEnabled(){this._supportsDelete=this.layer?.editingEnabled&&this.layer?.capabilities?.operations?.supportsDelete,this._deleteEndabled=!this.disabled||this._supportsDelete&&this.ids.length>0}_delete(){this._confirmDelete=!0}_deleteMessage(){return this.deleteDialog?this.deleteDialog:e("delete-dialog",{id:"solution-delete-dialog",ids:this.ids,layer:this.layer,locale:this.locale,onDeleteDialogClose:()=>this._confirmDelete=!1,open:this._confirmDelete})}async _getTranslations(){const t=await d(this.el);this._translations=t[0]}static get watchers(){return{ids:["idsWatchHandler"],layer:["layerWatchHandler"],locale:["localeWatchHandler"]}}};u.style=":host{display:block}.delete-modal{position:fixed}";const w=class{constructor(e){t(this,e),this.editsComplete=a(this,"editsComplete",7),this.deleteDialogClose=a(this,"deleteDialogClose",7),this.ids=[],this.layer=void 0,this.locale=void 0,this.open=!1,this._isDeleting=!1,this._translations=void 0}get el(){return s(this)}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}editsComplete;deleteDialogClose;async componentWillLoad(){await this._getTranslations()}render(){const t=1===this.ids.length?this._translations?.confirmSingle:this._translations?.confirmMultiple;return e(o,{key:"eafca7d4325c65ff21fbfeaa24ea14e95bc25a34"},e("calcite-modal",{key:"745e52d7b23318492914662cc769a1206baefd28","aria-labelledby":"modal-title",class:"delete-modal",kind:"danger",onCalciteModalClose:()=>this._close(),open:this.open,widthScale:"s"},e("div",{key:"363614f6eaf30c30c6c2ccde3875dfff5cd94088",class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations?.deleteFeature),e("div",{key:"b3b6f74495894589b7fd8be54265c4a69ffaa62e",slot:"content"},t),e("calcite-button",{key:"d325fcf12624bac39f56ec690f7e4e9660789891",appearance:"outline",kind:"danger",onClick:()=>this._close(),slot:"secondary",width:"full"},this._translations?.cancel),e("calcite-button",{key:"73a10546ad92065c949bfacca3eb3d508685030e",kind:"danger",loading:this._isDeleting,onClick:()=>{this._deleteFeatures()},slot:"primary",width:"full"},this._translations?.delete)))}async _deleteFeatures(){this._isDeleting=!0;const t=this.ids.map((t=>({objectId:t})));await this.layer.applyEdits({deleteFeatures:t}),this._isDeleting=!1,this._close(),this.editsComplete.emit("delete")}_close(){this.open=!1,this.deleteDialogClose.emit()}async _getTranslations(){const t=await d(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"]}}};w.style=":host{display:block}.delete-modal{position:fixed}";export{m as calcite_shell,u as delete_button,w as delete_dialog}
|