@arcgis/map-components 5.2.0-next.29 → 5.2.0-next.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -168,9 +168,12 @@ interface LuminaArcgisBasemapLayerList extends Partial<Pick<ArcgisBasemapLayerLi
168
168
  }
169
169
 
170
170
  interface LuminaArcgisBasemapLayerListNext extends Partial<Pick<ArcgisBasemapLayerListNext, "autoDestroyDisabled" | "baseFilterPredicate" | "baseFilterText" | "baseListItemCreatedFunction" | "basemapTitle" | "catalogOptions" | "closed" | "collapsed" | "dragEnabled" | "editingTitle" | "filterPlaceholder" | "headingLevel" | "hideBaseLayers" | "hideCatalogLayerList" | "hideHeading" | "hideReferenceLayers" | "hideStatusIndicators" | "icon" | "knowledgeGraphOptions" | "label" | "layerTablesEnabled" | "listItemCanGiveFunction" | "listItemCanReceiveFunction" | "mapImageOptions" | "messageOverrides" | "minFilterItems" | "position" | "referenceElement" | "referenceFilterPredicate" | "referenceFilterText" | "referenceListItemCreatedFunction" | "selectedItems" | "selectionMode" | "showCloseButton" | "showCollapseButton" | "showEditTitleButton" | "showErrors" | "showFilter" | "showTemporaryLayerIndicators" | "tileOptions" | "view" | "visibilityAppearance">>, h.JSX.HTMLAttributes<ArcgisBasemapLayerListNext> {
171
+ onarcgisBaseFilterChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisBaseFilterChange"]>;
171
172
  onarcgisClose?: EventHandler<ArcgisBasemapLayerListNext["arcgisClose"]>;
173
+ onarcgisOpenedLayersChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisOpenedLayersChange"]>;
172
174
  onarcgisPropertyChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisPropertyChange"]>;
173
175
  onarcgisReady?: EventHandler<ArcgisBasemapLayerListNext["arcgisReady"]>;
176
+ onarcgisReferenceFilterChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisReferenceFilterChange"]>;
174
177
  onarcgisTriggerAction?: EventHandler<ArcgisBasemapLayerListNext["arcgisTriggerAction"]>;
175
178
  }
176
179
 
@@ -357,8 +360,11 @@ interface LuminaArcgisLayerList extends Partial<Pick<ArcgisLayerList, "autoDestr
357
360
 
358
361
  interface LuminaArcgisLayerListNext extends Partial<Pick<ArcgisLayerListNext, "autoDestroyDisabled" | "catalogOptions" | "closed" | "collapsed" | "dragEnabled" | "filterPlaceholder" | "filterPredicate" | "filterText" | "headingLevel" | "hideCatalogLayerList" | "hideStatusIndicators" | "icon" | "knowledgeGraphOptions" | "label" | "layerTablesAvailable" | "listItemCanGiveFunction" | "listItemCanReceiveFunction" | "listItemCreatedFunction" | "messageOverrides" | "minDragEnabledItems" | "minFilterItems" | "referenceElement" | "selectedItems" | "selectionMode" | "showCloseButton" | "showCollapseButton" | "showErrors" | "showFilter" | "showHeading" | "showTemporaryLayerIndicators" | "view" | "visibilityAppearance">>, h.JSX.HTMLAttributes<ArcgisLayerListNext> {
359
362
  onarcgisClose?: EventHandler<ArcgisLayerListNext["arcgisClose"]>;
363
+ onarcgisFilterChange?: EventHandler<ArcgisLayerListNext["arcgisFilterChange"]>;
364
+ onarcgisOpenedLayersChange?: EventHandler<ArcgisLayerListNext["arcgisOpenedLayersChange"]>;
360
365
  onarcgisPropertyChange?: EventHandler<ArcgisLayerListNext["arcgisPropertyChange"]>;
361
366
  onarcgisReady?: EventHandler<ArcgisLayerListNext["arcgisReady"]>;
367
+ onarcgisSelectedItemsChange?: EventHandler<ArcgisLayerListNext["arcgisSelectedItemsChange"]>;
362
368
  onarcgisTriggerAction?: EventHandler<ArcgisLayerListNext["arcgisTriggerAction"]>;
363
369
  }
364
370
 
@@ -169,9 +169,12 @@ interface PreactArcgisBasemapLayerList extends Partial<Pick<ArcgisBasemapLayerLi
169
169
  }
170
170
 
171
171
  interface PreactArcgisBasemapLayerListNext extends Partial<Pick<ArcgisBasemapLayerListNext, "autoDestroyDisabled" | "baseFilterPredicate" | "baseFilterText" | "baseListItemCreatedFunction" | "basemapTitle" | "catalogOptions" | "closed" | "collapsed" | "dragEnabled" | "editingTitle" | "filterPlaceholder" | "headingLevel" | "hideBaseLayers" | "hideCatalogLayerList" | "hideHeading" | "hideReferenceLayers" | "hideStatusIndicators" | "icon" | "knowledgeGraphOptions" | "label" | "layerTablesEnabled" | "listItemCanGiveFunction" | "listItemCanReceiveFunction" | "mapImageOptions" | "messageOverrides" | "minFilterItems" | "position" | "referenceElement" | "referenceFilterPredicate" | "referenceFilterText" | "referenceListItemCreatedFunction" | "selectedItems" | "selectionMode" | "showCloseButton" | "showCollapseButton" | "showEditTitleButton" | "showErrors" | "showFilter" | "showTemporaryLayerIndicators" | "tileOptions" | "view" | "visibilityAppearance">>, HTMLAttributes<ArcgisBasemapLayerListNext> {
172
+ onarcgisBaseFilterChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisBaseFilterChange"]>;
172
173
  onarcgisClose?: EventHandler<ArcgisBasemapLayerListNext["arcgisClose"]>;
174
+ onarcgisOpenedLayersChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisOpenedLayersChange"]>;
173
175
  onarcgisPropertyChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisPropertyChange"]>;
174
176
  onarcgisReady?: EventHandler<ArcgisBasemapLayerListNext["arcgisReady"]>;
177
+ onarcgisReferenceFilterChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisReferenceFilterChange"]>;
175
178
  onarcgisTriggerAction?: EventHandler<ArcgisBasemapLayerListNext["arcgisTriggerAction"]>;
176
179
  }
177
180
 
@@ -358,8 +361,11 @@ interface PreactArcgisLayerList extends Partial<Pick<ArcgisLayerList, "autoDestr
358
361
 
359
362
  interface PreactArcgisLayerListNext extends Partial<Pick<ArcgisLayerListNext, "autoDestroyDisabled" | "catalogOptions" | "closed" | "collapsed" | "dragEnabled" | "filterPlaceholder" | "filterPredicate" | "filterText" | "headingLevel" | "hideCatalogLayerList" | "hideStatusIndicators" | "icon" | "knowledgeGraphOptions" | "label" | "layerTablesAvailable" | "listItemCanGiveFunction" | "listItemCanReceiveFunction" | "listItemCreatedFunction" | "messageOverrides" | "minDragEnabledItems" | "minFilterItems" | "referenceElement" | "selectedItems" | "selectionMode" | "showCloseButton" | "showCollapseButton" | "showErrors" | "showFilter" | "showHeading" | "showTemporaryLayerIndicators" | "view" | "visibilityAppearance">>, HTMLAttributes<ArcgisLayerListNext> {
360
363
  onarcgisClose?: EventHandler<ArcgisLayerListNext["arcgisClose"]>;
364
+ onarcgisFilterChange?: EventHandler<ArcgisLayerListNext["arcgisFilterChange"]>;
365
+ onarcgisOpenedLayersChange?: EventHandler<ArcgisLayerListNext["arcgisOpenedLayersChange"]>;
361
366
  onarcgisPropertyChange?: EventHandler<ArcgisLayerListNext["arcgisPropertyChange"]>;
362
367
  onarcgisReady?: EventHandler<ArcgisLayerListNext["arcgisReady"]>;
368
+ onarcgisSelectedItemsChange?: EventHandler<ArcgisLayerListNext["arcgisSelectedItemsChange"]>;
363
369
  onarcgisTriggerAction?: EventHandler<ArcgisLayerListNext["arcgisTriggerAction"]>;
364
370
  }
365
371
 
@@ -169,9 +169,12 @@ interface ReactArcgisBasemapLayerList extends Partial<Pick<ArcgisBasemapLayerLis
169
169
  }
170
170
 
171
171
  interface ReactArcgisBasemapLayerListNext extends Partial<Pick<ArcgisBasemapLayerListNext, "autoDestroyDisabled" | "baseFilterPredicate" | "baseFilterText" | "baseListItemCreatedFunction" | "basemapTitle" | "catalogOptions" | "closed" | "collapsed" | "dragEnabled" | "editingTitle" | "filterPlaceholder" | "headingLevel" | "hideBaseLayers" | "hideCatalogLayerList" | "hideHeading" | "hideReferenceLayers" | "hideStatusIndicators" | "icon" | "knowledgeGraphOptions" | "label" | "layerTablesEnabled" | "listItemCanGiveFunction" | "listItemCanReceiveFunction" | "mapImageOptions" | "messageOverrides" | "minFilterItems" | "position" | "referenceElement" | "referenceFilterPredicate" | "referenceFilterText" | "referenceListItemCreatedFunction" | "selectedItems" | "selectionMode" | "showCloseButton" | "showCollapseButton" | "showEditTitleButton" | "showErrors" | "showFilter" | "showTemporaryLayerIndicators" | "tileOptions" | "view" | "visibilityAppearance">>, HTMLProps<ArcgisBasemapLayerListNext> {
172
+ onarcgisBaseFilterChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisBaseFilterChange"]>;
172
173
  onarcgisClose?: EventHandler<ArcgisBasemapLayerListNext["arcgisClose"]>;
174
+ onarcgisOpenedLayersChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisOpenedLayersChange"]>;
173
175
  onarcgisPropertyChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisPropertyChange"]>;
174
176
  onarcgisReady?: EventHandler<ArcgisBasemapLayerListNext["arcgisReady"]>;
177
+ onarcgisReferenceFilterChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisReferenceFilterChange"]>;
175
178
  onarcgisTriggerAction?: EventHandler<ArcgisBasemapLayerListNext["arcgisTriggerAction"]>;
176
179
  }
177
180
 
@@ -358,8 +361,11 @@ interface ReactArcgisLayerList extends Partial<Pick<ArcgisLayerList, "autoDestro
358
361
 
359
362
  interface ReactArcgisLayerListNext extends Partial<Pick<ArcgisLayerListNext, "autoDestroyDisabled" | "catalogOptions" | "closed" | "collapsed" | "dragEnabled" | "filterPlaceholder" | "filterPredicate" | "filterText" | "headingLevel" | "hideCatalogLayerList" | "hideStatusIndicators" | "icon" | "knowledgeGraphOptions" | "label" | "layerTablesAvailable" | "listItemCanGiveFunction" | "listItemCanReceiveFunction" | "listItemCreatedFunction" | "messageOverrides" | "minDragEnabledItems" | "minFilterItems" | "referenceElement" | "selectedItems" | "selectionMode" | "showCloseButton" | "showCollapseButton" | "showErrors" | "showFilter" | "showHeading" | "showTemporaryLayerIndicators" | "view" | "visibilityAppearance">>, HTMLProps<ArcgisLayerListNext> {
360
363
  onarcgisClose?: EventHandler<ArcgisLayerListNext["arcgisClose"]>;
364
+ onarcgisFilterChange?: EventHandler<ArcgisLayerListNext["arcgisFilterChange"]>;
365
+ onarcgisOpenedLayersChange?: EventHandler<ArcgisLayerListNext["arcgisOpenedLayersChange"]>;
361
366
  onarcgisPropertyChange?: EventHandler<ArcgisLayerListNext["arcgisPropertyChange"]>;
362
367
  onarcgisReady?: EventHandler<ArcgisLayerListNext["arcgisReady"]>;
368
+ onarcgisSelectedItemsChange?: EventHandler<ArcgisLayerListNext["arcgisSelectedItemsChange"]>;
363
369
  onarcgisTriggerAction?: EventHandler<ArcgisLayerListNext["arcgisTriggerAction"]>;
364
370
  }
365
371
 
@@ -169,9 +169,12 @@ interface StencilArcgisBasemapLayerList extends Partial<Pick<ArcgisBasemapLayerL
169
169
  }
170
170
 
171
171
  interface StencilArcgisBasemapLayerListNext extends Partial<Pick<ArcgisBasemapLayerListNext, "autoDestroyDisabled" | "baseFilterPredicate" | "baseFilterText" | "baseListItemCreatedFunction" | "basemapTitle" | "catalogOptions" | "closed" | "collapsed" | "dragEnabled" | "editingTitle" | "filterPlaceholder" | "headingLevel" | "hideBaseLayers" | "hideCatalogLayerList" | "hideHeading" | "hideReferenceLayers" | "hideStatusIndicators" | "icon" | "knowledgeGraphOptions" | "label" | "layerTablesEnabled" | "listItemCanGiveFunction" | "listItemCanReceiveFunction" | "mapImageOptions" | "messageOverrides" | "minFilterItems" | "position" | "referenceElement" | "referenceFilterPredicate" | "referenceFilterText" | "referenceListItemCreatedFunction" | "selectedItems" | "selectionMode" | "showCloseButton" | "showCollapseButton" | "showEditTitleButton" | "showErrors" | "showFilter" | "showTemporaryLayerIndicators" | "tileOptions" | "view" | "visibilityAppearance">>, StencilJsx.HTMLAttributes<ArcgisBasemapLayerListNext> {
172
+ onArcgisBaseFilterChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisBaseFilterChange"]>;
172
173
  onArcgisClose?: EventHandler<ArcgisBasemapLayerListNext["arcgisClose"]>;
174
+ onArcgisOpenedLayersChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisOpenedLayersChange"]>;
173
175
  onArcgisPropertyChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisPropertyChange"]>;
174
176
  onArcgisReady?: EventHandler<ArcgisBasemapLayerListNext["arcgisReady"]>;
177
+ onArcgisReferenceFilterChange?: EventHandler<ArcgisBasemapLayerListNext["arcgisReferenceFilterChange"]>;
175
178
  onArcgisTriggerAction?: EventHandler<ArcgisBasemapLayerListNext["arcgisTriggerAction"]>;
176
179
  }
177
180
 
@@ -358,8 +361,11 @@ interface StencilArcgisLayerList extends Partial<Pick<ArcgisLayerList, "autoDest
358
361
 
359
362
  interface StencilArcgisLayerListNext extends Partial<Pick<ArcgisLayerListNext, "autoDestroyDisabled" | "catalogOptions" | "closed" | "collapsed" | "dragEnabled" | "filterPlaceholder" | "filterPredicate" | "filterText" | "headingLevel" | "hideCatalogLayerList" | "hideStatusIndicators" | "icon" | "knowledgeGraphOptions" | "label" | "layerTablesAvailable" | "listItemCanGiveFunction" | "listItemCanReceiveFunction" | "listItemCreatedFunction" | "messageOverrides" | "minDragEnabledItems" | "minFilterItems" | "referenceElement" | "selectedItems" | "selectionMode" | "showCloseButton" | "showCollapseButton" | "showErrors" | "showFilter" | "showHeading" | "showTemporaryLayerIndicators" | "view" | "visibilityAppearance">>, StencilJsx.HTMLAttributes<ArcgisLayerListNext> {
360
363
  onArcgisClose?: EventHandler<ArcgisLayerListNext["arcgisClose"]>;
364
+ onArcgisFilterChange?: EventHandler<ArcgisLayerListNext["arcgisFilterChange"]>;
365
+ onArcgisOpenedLayersChange?: EventHandler<ArcgisLayerListNext["arcgisOpenedLayersChange"]>;
361
366
  onArcgisPropertyChange?: EventHandler<ArcgisLayerListNext["arcgisPropertyChange"]>;
362
367
  onArcgisReady?: EventHandler<ArcgisLayerListNext["arcgisReady"]>;
368
+ onArcgisSelectedItemsChange?: EventHandler<ArcgisLayerListNext["arcgisSelectedItemsChange"]>;
363
369
  onArcgisTriggerAction?: EventHandler<ArcgisLayerListNext["arcgisTriggerAction"]>;
364
370
  }
365
371
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/map-components",
3
- "version": "5.2.0-next.29",
3
+ "version": "5.2.0-next.30",
4
4
  "description": "ArcGIS Map Components",
5
5
  "keywords": [
6
6
  "2D",
@@ -46,9 +46,9 @@
46
46
  "lit": "^3.3.0",
47
47
  "lodash-es": "^4.18.1",
48
48
  "tslib": "^2.8.1",
49
- "@arcgis/common-components": "5.2.0-next.29",
50
- "@arcgis/lumina": "5.2.0-next.29",
51
- "@arcgis/toolkit": "5.2.0-next.29"
49
+ "@arcgis/common-components": "5.2.0-next.30",
50
+ "@arcgis/toolkit": "5.2.0-next.30",
51
+ "@arcgis/lumina": "5.2.0-next.30"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@arcgis/core": "^5.2.0-next",
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import r from"./SAEE5GTI.js";import n from"./G4CPNGQ6.js";import"./DBJFHC3S.js";import{a as K}from"./JCRPP54Z.js";import"./GLNO2ZMW.js";import{a as U,b as G,g as N,h as w,j as H,k as q,m as c,n as v}from"./LDDAJOTV.js";import{a as S}from"./JLZJ354E.js";import{a as m}from"./SBUR54TP.js";import l from"./QFH7PJYV.js";import j from"./MZWO5JYA.js";import i from"./DUWXDGIW.js";import"./VJVKFKSG.js";import h from"./6IEKX6LJ.js";import{a as O}from"./KPOSO4HB.js";import{a as I}from"./JD74LG7K.js";import{a as k}from"./GRUB3M36.js";import f from"./R5NVFWFA.js";import e from"./GPVFCWMU.js";import{h as B}from"./VJ2SMYNX.js";import"./IDZCPNFC.js";import a from"./HKTQWWXP.js";import{d as P}from"./DU6OKLV4.js";import{B as M,M as d,N as p,O as R,P as g,R as u,S as b,U as A,a as T,b as o,x as C}from"./KLXEJCTT.js";import"./H6RQVSYM.js";export default $arcgis.t(([ie,L,{on:se,watch:ae},,,{a:D},x,,,,,{a:j,b:z,c:J}])=>{var f={...K,section:"section",editing:"editing",editingForm:"editing-form"},le=T`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`,Q="nested",re=".*\\S+.*",V="data-basemap-layer-type",oe=x(ie),$=class extends R{constructor(){super(...arguments),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${M()}`,this._openedLayersController=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=O(),this.viewModel=oe(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let l=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,r=c(e,this._allItems);if(!r?.sortable)return!1;let a=c(t,this._allItems),n=v(t),h=c(i,this._allItems),y=v(i),_=!!n&&!!y&&n===y,X={selected:r,from:a,to:h},Y=t.group,Z=i.group,ee=a?.layer?.type??"",te=h?.layer?.type??"",E=new Set(["map-image","catalog","knowledge-graph"]);return Y&&Z&&typeof l=="function"?l(X):_&&!E.has(ee)&&!E.has(te)&&r.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(f.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new L,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseListItemCreatedFunction=this.viewModel.baseListItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.icon="layers",this.layerTablesEnabled=new L(["knowledge-graph"]),this.minFilterItems=G,this.openedLayers=new L,this.referenceFilterText="",this.referenceListItemCreatedFunction=this.viewModel.referenceListItemCreatedFunction,this.selectedItems=new L,this.selectionMode="none",this.visibilityAppearance="default",this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.arcgisPropertyChange=B()("state"),this.arcgisReady=C(),this.arcgisTriggerAction=D(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,view:0,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItems:32,baseListItemCreatedFunction:0,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,mapImageOptions:0,minFilterItems:9,openedLayers:32,position:1,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceListItemCreatedFunction:0,selectedItems:0,selectionMode:1,tableList:32,tileOptions:0,visibilityAppearance:1,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideReferenceLayers:5,hideStatusIndicators:5,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,messageOverrides:0,state:32}}static{this.styles=[J,le,z]}get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this._renderLayerFlowItem(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[se(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),ae(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>N(this.selectedItems),{initial:!0})])}updated(){w(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),w(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async _createFlowList(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let s=new AbortController,{signal:l}=s;this._openedLayersController=s,e.forEach((n,h)=>{t.includes(h)||(n?.destroy?.(),e.delete(h))});let r=await Promise.all(t.map(n=>this._createFlowList(n,l)));if(l.aborted)return;i.removeAll(),i.addMany(r);let a=i.at(-1);a?"catalogLayer"in a?(this._catalogLayerList=a,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=a):(this._catalogLayerList=void 0,this._tableList=void 0)}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:l,selectionMode:r,visibilityAppearance:a,layerTablesEnabled:n}=this;return b(o`<arcgis-catalog-layer-list .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??l} .selectionMode=${i?.selectionMode??r} .visibilityAppearance=${i?.visibilityAppearance??a} .showErrors=${i?.visibleElements?.errors??this.showErrors} .showFilter=${i?.visibleElements?.filter??this.showFilter} .hideStatusIndicators=${i?.visibleElements?.statusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.visibleElements?.temporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list>`)}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this._getTableListParams(e);return b(o`<arcgis-table-list .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list>`)}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let l=c(i,this._allItems),r=c(e,this._allItems),a=c(t,this._allItems),n=W(t),h=W(e);s==null||!l||!a||!r||!n||!h||this.viewModel.moveListItem({targetItem:l,fromParentItem:a,toParentItem:r,newIndex:s,from:n,to:h})}_handleCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:l}=e;if(t!==i){s.remove();return}l==null||!t||!s||t.insertBefore(s,t.children[l])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:l,newIndex:r}=e,a=t?.newIndex===r&&t?.dragEl===l&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||a)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=l.value.layer?.uid??null;let n=s,h=i;if(n===h){let y=Array.from(s.children).filter(_=>_?.matches("calcite-list-item")).map(_=>_.value.layer?.uid??"");this._sortLayers(n,y);return}this._moveLayerFromChildList({toEl:h,fromEl:n,dragEl:l,newIndex:r})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;H(s,t);return}let i=c(e,this._allItems);i&&q(i,t)}_handleCalciteListChange(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}_focusFlowItem(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[I.hidden]:this.state==="loading",[I.disabled]:this.state==="disabled"};return o`<div class=${g(P(I.widget,I.panel,e))}>${this._renderItems()}${this._renderItemTooltips()}</div>`}_renderItemTooltip(e){return e?o`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i));return t?.length?t:null}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoLayersInfoMessage(e){return o`<div slot=message>${e}</div>`}_renderNoLayersInfo(e,t){return o`<div class=${g(f.itemMessage)}>${m(t,o`<calcite-notice icon=information kind=info open width=full>${this._renderNoLayersInfoMessage(e)}</calcite-notice>`)}</div>`}_renderEditingInput(){return o`<div class=${g(f.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${re} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??u} type=text .value=${this.viewModel.basemapTitle??void 0} ${p(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}_renderEditingForm(){return this.editingTitle?o`<form class=${g(f.editingForm)} @submit=${this._formSubmit}><calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${p(this._editingFlowItemRef)}>${this._renderEditingInput()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item></form>`:null}_renderEditTitleButton(){return this.showEditTitleButton&&!this.editingTitle?o`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??u}></calcite-action>`:null}_renderItems(){let e=[m("root-flow-item",o`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${p(this._rootFlowItemRef)}>${this._renderEditTitleButton()}${this._renderReferenceSection()}${this._renderBaseSection()}</calcite-flow-item>`),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return this._focusRootFlowItem=this._focusFlowItem(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this._focusFlowItem(this._editingFlowItemRef.value,this._focusEditingFlowItem),this.closed?null:m("root-flow",o`<calcite-flow>${e}</calcite-flow>`)}_renderPanelFlowItems(){return S(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,l=()=>this._handlePanelFlowItemBack(i);return this._focusPanelFlowItem=this._focusFlowItem(this._panelFlowItemRef.value,this._focusPanelFlowItem),o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${r=>{r.preventDefault(),l()}} ${p(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderLayerFlowItem(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this._focusFlowItem(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,o`<calcite-flow-item data-layer-uid=${e.uid??u} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let l=this.openedLayers.at(-1);l?this._focusLayerFlowItem=l.uid:this._focusRootFlowItem=!0}} ${p(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderList(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,l=t==="reference"?this.referenceFilterText:this.baseFilterText,r=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"";return m(`block-${t}`,o`<calcite-block class=${g(f.section)} collapsible expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this._renderNoLayersInfo(r,t)}${m(`list-${t}`,o`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${a=>this._canMove(a,"pull")} .canPut=${a=>this._canMove(a,"put")} data-basemap-layer-type=${t??u} data-layer-type=${this._rootGroupUid??u} .displayMode=${Q} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${U} .filterText=${s?l:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${a=>this._handleCalciteListDragEnd(a.detail)} @calciteListFilter=${a=>this[t==="reference"?"referenceFilterText":"baseFilterText"]=a.currentTarget?.filterText??""} @calciteListOrderChange=${a=>this._onCalciteListOrderChange(a.detail)} ${p(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(a=>this._renderItem(a,i))}${s?o`<div class=${g(f.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoLayersInfoMessage(r)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}_renderBaseSection(){return this.hideBaseLayers?null:this._renderList(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}_renderReferenceSection(){return this.hideReferenceLayers?null:this._renderList(this._visibleReferenceItems,"reference",!1)}_renderItem(e,t,i,s){return m(e.uid,j({activeItem:this._activeItem,canMove:this._canMove,css:f,displayMode:Q,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function W(F){let e=F.closest(`[${V}]`)?.getAttribute(V);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",$);return $},"widgets/BasemapLayerList/BasemapLayerListViewModel","core/Collection","core/reactiveUtils",a,e,f,h,i,j,l,n,r)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./ECNI2A4K.js";import n from"./SAEE5GTI.js";import l from"./G4CPNGQ6.js";import"./DBJFHC3S.js";import{a as m}from"./JCRPP54Z.js";import{a as G,b as H,c as j,g as q,h as z,j as J,k as K,m as c,n as M}from"./LDDAJOTV.js";import{a as S}from"./JLZJ354E.js";import{a as w}from"./SBUR54TP.js";import k from"./QFH7PJYV.js";import i from"./MZWO5JYA.js";import h from"./DUWXDGIW.js";import"./VJVKFKSG.js";import g from"./6IEKX6LJ.js";import{a as B}from"./KPOSO4HB.js";import{a as v}from"./JD74LG7K.js";import{a as N}from"./GRUB3M36.js";import e from"./R5NVFWFA.js";import b from"./GPVFCWMU.js";import{h as x}from"./VJ2SMYNX.js";import"./IDZCPNFC.js";import a from"./HKTQWWXP.js";import{d as R}from"./DU6OKLV4.js";import{B as O,M as L,N as f,O as P,P as I,R as C,S as E,U as D,b as d,x as T}from"./KLXEJCTT.js";import"./H6RQVSYM.js";export default $arcgis.t(([te,p,{on:X,watch:ie},,,{a:k},U,,,,,{a:Q,b:V,c:W}])=>{var Y="nested",se=U(te),F=class extends P{constructor(){super(...arguments),this._lastDragDetail=null,this._rootListRef=L(),this._layerFlowItemRef=L(),this._panelFlowItemRef=L(),this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${O()}`,this._openedLayersController=null,this.messages=B(),this._canMove=({dragEl:e,fromEl:t,toEl:i},a)=>{let s=a==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,r=c(e,this.operationalItems);if(!r?.sortable)return!1;let l=this._resolveListContainer(t),o=this._resolveListContainer(i),n=this._getContainerItem(l),g=M(l),u=this._getContainerItem(o),y=M(o),b=!!g&&!!y&&g===y,_={selected:r,from:n,to:u},$=l?.group,h=o?.group,Z=n?.layer?.type??"",ee=u?.layer?.type??"",A=new Set(["map-image","catalog","knowledge-graph"]);return $&&h&&typeof s=="function"?s(_):b&&!A.has(Z)&&!A.has(ee)&&r?.layer?.type!=="sublayer"},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer)},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(a=>a.classList?.contains(m.item)),i=c(t,this.operationalItems);this._activeItem=i},this.viewModel=se(this),this.arcgisClose=N(this),this._activeItem=null,this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.layerTablesEnabled=new p(["knowledge-graph"]),this.mapImageOptions=null,this.openedLayerLists=new p,this.tileOptions=null,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.closed=!1,this.icon="layers",this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.layerTablesAvailable=new p(["knowledge-graph"]),this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.minDragEnabledItems=j,this.minFilterItems=H,this.openedLayers=new p,this.operationalItems=this.viewModel.operationalItems,this.selectedItems=new p,this.selectionMode="none",this.visibilityAppearance="default",this.hideCatalogLayerList=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.arcgisPropertyChange=x()("state"),this.arcgisReady=T(),this.arcgisTriggerAction=k(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,_totalItems:16,_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,layerTablesEnabled:16,mapImageOptions:16,openedLayerLists:16,tileOptions:16,_renderedOpenLayerFlowItems:16,view:0,autoDestroyDisabled:5,closed:5,referenceElement:1,icon:1,catalogLayerList:32,catalogOptions:0,collapsed:5,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,knowledgeGraphOptions:0,layerTablesAvailable:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,minDragEnabledItems:9,minFilterItems:9,openedLayers:32,operationalItems:0,selectedItems:0,selectionMode:1,tableList:32,visibilityAppearance:1,hideCatalogLayerList:5,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryLayerIndicators:5,messageOverrides:0,label:1,state:32}}static{this.styles=[W,V]}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get catalogLayerList(){return this._catalogLayerList}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[X(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),X(()=>this.viewModel.operationalItems,"change",()=>q(this.selectedItems),{initial:!0}),ie(()=>[this.filterPredicate,this._rootListRef.value],()=>z(this._rootListRef.value,this.filterPredicate,this.operationalItems))])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}_resolveListContainer(e){return e?e.matches("calcite-list")?e:e.closest("calcite-list[data-item]")||(this._rootListRef.value?.contains(e)?this._rootListRef.value:null):null}_getContainerItem(e){let t=e?.getAttribute("data-item");return t?this._findItemByUid(t):null}_findItemByUid(e){let t=this.operationalItems?.toArray()??[];for(;t.length;){let i=t.shift();if(!i)continue;if(i.uid===e)return i;let a=i.children?.toArray()??[];t.push(...a)}return null}async _createFlowList(e,t){let{_layerListMap:i}=this,a=i.get(e);if(a)return a;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let a=new AbortController,{signal:s}=a;this._openedLayersController=a,e.forEach((o,n)=>{t.includes(n)||(o?.destroy?.(),e.delete(n))});let r=await Promise.all(t.map(o=>this._createFlowList(o,s)));if(s.aborted)return;i.removeAll(),i.addMany(r);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0)}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:a,listItemCreatedFunction:s,minFilterItems:r,selectionMode:l,visibilityAppearance:o}=this;return E(d`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??a} .listItemCreatedFunction=${i?.listItemCreatedFunction??s} .minFilterItems=${i?.minFilterItems??r} .selectionMode=${i?.selectionMode??l} .visibilityAppearance=${i?.visibilityAppearance??o} .showErrors=${i?.visibleElements?.errors??this.showErrors} .showFilter=${i?.visibleElements?.filter??this.showFilter} .hideStatusIndicators=${i?.visibleElements?.statusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.visibleElements?.temporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${n=>n.stopPropagation()} .catalogLayer=${e} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let{headingLevel:t,selectionMode:i,dragEnabled:a}=this,s=this._getTableListParams(e);return E(d`<arcgis-table-list-next .headingLevel=${s?.headingLevel??t} .selectionMode=${s?.selectionMode??i} .dragEnabled=${s?.dragEnabled??a} .collapsed=${s?.collapsed} .filterPlaceholder=${s?.filterPlaceholder} .filterText=${s?.filterText} .icon=${s?.icon??void 0} .label=${s?.label??void 0} .listItemCreatedFunction=${s?.listItemCreatedFunction} .tables=${s?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${r=>r.stopPropagation()}></arcgis-table-list-next>`)}_handlePanelFlowItemBack(e){e.open=!1}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:a}){let s=this._resolveListContainer(e),r=this._resolveListContainer(t),l=c(i,this.operationalItems),o=this._getContainerItem(s),n=this._getContainerItem(r);a==null||!l||this.viewModel.moveListItem(l,n,o,a)}_onCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:a,oldIndex:s}=e;if(t!==i){a.remove();return}s==null||!t||!a||t.insertBefore(a,t.children[s])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{dragEl:i,newIndex:a}=e,s=this._resolveListContainer(e.fromEl),r=this._resolveListContainer(e.toEl),l=t?.newIndex===a&&t?.dragEl===i&&t?.toEl===r&&t?.fromEl===s;if(!(!s||!r||l)){if(this._lastDragDetail={...e,fromEl:s,toEl:r},this._selectedDragItemLayerUid=i.value,s===r){let o=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this._sortLayers(s,o);return}this._moveLayerFromChildList({toEl:r,fromEl:s,dragEl:i,newIndex:a})}}_sortLayers(e,t){if(e)if(e===this._rootListRef.value)J(this.el.view?.map?.layers,t);else{let i=c(e,this.operationalItems);if(!i)return;K(i,t)}}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let a=e.target.selectedItems.map(s=>c(s,this.operationalItems)).filter(Boolean);i.removeAll(),i.addMany(a)}render(){let{state:e}=this,t={[v.hidden]:e==="loading",[v.disabled]:e==="disabled"};return d`<div class=${I(R(v.widget,t))}>${this._visibleItems?.length?this._renderItemTooltips():null}${this._renderItems()}</div>`}_renderItemTooltip(e){let{_tooltipReferenceMap:t,messages:i}=this;return e?d`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid??"")}>${i.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i))??[];return t.length?t:null}_renderItemTooltips(){return this._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return d`<div slot=message>${this.messages.noItemsToDisplay}</div>`}_renderNoItems(){return d`<div class=${I(m.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`}_renderLayerFlowItem(e,t){let{messages:i,openedLayers:a}=this,s=e.title||this.messages.untitledLayer;return w(e?.uid??s,d`<calcite-flow-item data-layer-uid=${e?.uid??""??C} .description=${s} .heading=${i[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${r=>{r.preventDefault(),a.pop(),a.at(-1)&&this._layerFlowItemRef.value?.setFocus()}} ${f(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderPanelFlowItems(){let{_openedPanelItems:e,openedLayers:t}=this;return S(e.toArray(),i=>i.uid,(i,a)=>{let{panel:s,title:r}=i,l=()=>this._handlePanelFlowItemBack(s);return d`<calcite-flow-item .description=${r} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),l()}} ${f(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${i} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderItems(){let{collapsed:e,_visibleItems:t,_openedPanelItems:i,_filterEnabled:a,_rootGroupUid:s,showCloseButton:r,showCollapseButton:l,showHeading:o,_dragEnabled:n,selectionMode:g,filterText:u,openedLayers:y,filterPlaceholder:b,messages:_}=this,$=[d`<calcite-flow-item .closable=${r} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${o?_.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!y.length&&!i.length} @calciteFlowItemClose=${()=>this.closed=!1}>${t?.length?d`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${h=>this._canMove(h,"pull")} .canPut=${h=>this._canMove(h,"put")} data-layer-type=${s??C} .displayMode=${Y} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${b} .filterProps=${G} .filterText=${a?u:""} .group=${s} .label=${_.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${g} @calciteListChange=${this._handleCalciteListChange} @calciteListFilter=${h=>this.filterText=h.currentTarget?.filterText??""} @calciteListOrderChange=${h=>this._onCalciteListOrderChange(h.detail)} @calciteListDragEnd=${h=>this._onCalciteListDragEnd(h.detail)} ${f(this._rootListRef)}>${t.toArray().map(h=>this._renderItem(h))}${a?d`<div class=${I(m.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`:null}</calcite-list>`:this._renderNoItems()}</calcite-flow-item>`,this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return this.closed?null:w("root-flow",d`<calcite-flow>${$}</calcite-flow>`)}_renderItem(e,t,i){return w(e.uid,Q({activeItem:this._activeItem,canMove:this._canMove,css:m,displayMode:Y,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,hideCatalogLayerList:this.hideCatalogLayerList,item:e,messages:this.messages,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,operationalItems:this.operationalItems,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,showCloseButton:this.showCloseButton,showCollapseButton:this.showCollapseButton,showErrors:this.showErrors,showHeading:this.showHeading,showFilter:this.showFilter,clearActiveItem:this._clearActiveItem,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};D("arcgis-layer-list-next",F);return F},"widgets/LayerList/LayerListViewModel","core/Collection","core/reactiveUtils",a,b,e,g,h,i,k,l,n)