@arcgis/map-components 5.2.0-next.76 → 5.2.0-next.78
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.
- package/dist/cdn/4FN75DFQ.js +2 -0
- package/dist/cdn/{VJIYYZW3.js → D4HG2OIN.js} +1 -1
- package/dist/cdn/FOZXZGEZ.js +2 -0
- package/dist/cdn/HTL73ZTA.js +2 -0
- package/dist/cdn/HZVC4F3N.js +2 -0
- package/dist/cdn/OBHCFXFW.js +2 -0
- package/dist/cdn/S55YL3HD.js +2 -0
- package/dist/cdn/{VQG7S23K.js → SLPJAJDI.js} +1 -1
- package/dist/cdn/UFUUA7WI.js +2 -0
- package/dist/cdn/VGMTHIUW.js +2 -0
- package/dist/cdn/{YJYUG3DP.js → YUJMRIVW.js} +1 -1
- package/dist/cdn/assets/features-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-trace-functions-result-item/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-list-item.js +35 -24
- package/dist/chunks/layer-list-next.js +1 -1
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +18 -21
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +12 -12
- package/dist/components/arcgis-basemap-layer-list-next/index.js +2 -2
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +19 -14
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +26 -26
- package/dist/components/arcgis-catalog-layer-list-next/index.js +1 -1
- package/dist/components/arcgis-feature-attachments/customElement.js +13 -13
- package/dist/components/arcgis-features-next/customElement.d.ts +9 -0
- package/dist/components/arcgis-features-next/customElement.js +126 -108
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +5 -5
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +12 -12
- package/dist/components/arcgis-layer-list-next/types.d.ts +4 -4
- package/dist/components/arcgis-table-list-next/customElement.d.ts +17 -13
- package/dist/components/arcgis-table-list-next/customElement.js +11 -11
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +30 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +34 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/index.js +4 -0
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +51 -58
- package/dist/components/arcgis-utility-network-trace-results-next/index.js +1 -3
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/loader.js +2 -1
- package/dist/types/lumina.d.ts +6 -1
- package/dist/types/preact.d.ts +7 -1
- package/dist/types/react.d.ts +8 -1
- package/dist/types/stencil.d.ts +6 -1
- package/dist/utils/layer-list-utils.d.ts +6 -6
- package/package.json +4 -4
- package/dist/cdn/D6Z3MYCF.js +0 -2
- package/dist/cdn/GVCVI2FM.js +0 -2
- package/dist/cdn/H5BVJ264.js +0 -2
- package/dist/cdn/R5ZY52DF.js +0 -2
- package/dist/cdn/RIZHD5EC.js +0 -2
- package/dist/cdn/TKTHZ2GE.js +0 -2
- package/dist/cdn/ZWAOPC3F.js +0 -2
package/dist/cdn/TKTHZ2GE.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./XEK22IDA.js";import o from"./D6Z3MYCF.js";import n from"./7MIEKJ57.js";import"./JFNKQEAB.js";import{a as g}from"./JCRPP54Z.js";import{a as H,b as j,c as q,g as z,h as J,j as K,k as Q,m,n as F}from"./LDDAJOTV.js";import{a as G}from"./HSF2MYAX.js";import{a as b}from"./RDWM76R2.js";import l from"./K2HEKJRC.js";import k from"./MZWO5JYA.js";import i from"./FR3DD5XU.js";import"./VJVKFKSG.js";import h from"./G3GFYB3W.js";import{a as B}from"./NDMHZQ2Z.js";import{a as w}from"./JD74LG7K.js";import{a as S}from"./5OJHCEN4.js";import e from"./K3VQUQ6I.js";import c from"./NFE73D6R.js";import{g as N}from"./5GFBHLDY.js";import"./42UVPIOD.js";import a from"./34IPKNHM.js";import"./QUZTFUWM.js";import{d as x}from"./QLIWDFZI.js";import{A as D,L,M as f,N as P,O as v,Q as E,R as M,T as R,b as d,w as p}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([ie,u,{on:A,watch:se},,,{a:k},U,,,,,{a:V,b:W,c:X,d:Y}])=>{var Z="nested",ae=U(ie),T=class extends P{constructor(){super(...arguments),this._lastDragDetail=null,this._rootListRef=L(),this._layerFlowItemRef=L(),this._panelFlowItemRef=L(),this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${D()}`,this._openedLayersController=null,this.messages=B(),this._canMove=({dragEl:e,fromEl:t,toEl:i},a)=>{let s=a==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,r=m(e,this.operationalItems);if(!r?.sortable)return!1;let l=this._resolveListContainer(t),o=this._resolveListContainer(i),n=this._getContainerItem(l),c=F(l),y=this._getContainerItem(o),_=F(o),$=!!c&&!!_&&c===_,I={selected:r,from:n,to:y},C=l?.group,h=o?.group,ee=n?.layer?.type??"",te=y?.layer?.type??"",O=new Set(["map-image","catalog","knowledge-graph"]);return C&&h&&typeof s=="function"?s(I):$&&!O.has(ee)&&!O.has(te)&&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(g.item)),i=m(t,this.operationalItems);this._activeItem=i},this.viewModel=ae(this),this.arcgisClose=S(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 u(["knowledge-graph"]),this.mapImageOptions=null,this.openedLayerLists=new u,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 u(["knowledge-graph"]),this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minDragEnabledItems=q,this.minFilterItems=j,this.openedLayers=new u,this.operationalItems=this.viewModel.operationalItems,this.selectedItems=new u,this.selectionMode="none",this.visibilityAppearance="default",this.hideCatalogLayerList=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.arcgisPropertyChange=N()("state"),this.arcgisReady=p(),this.arcgisFilterChange=p(),this.arcgisSelectedItemsChange=p(),this.arcgisOpenedLayersChange=p(),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,listModeDisabled:5,minDragEnabledItems:9,minFilterItems:9,openedLayers:32,operationalItems:0,selectedItems:0,selectionMode:1,tableList:32,visibilityAppearance:1,hideCatalogLayerList:5,showCloseButton:5,showCollapseButton:5,showErrors:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryLayerIndicators:5,messageOverrides:0,label:1,state:32}}static{this.styles=[Y,X]}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(()=>[A(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),A(()=>this.viewModel.operationalItems,"change",()=>z(this.selectedItems),{initial:!0}),A(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),se(()=>[this.filterPredicate,this._rootListRef.value],()=>J(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),this.arcgisOpenedLayersChange.emit()}_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 M(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} .messageOverrides=${this.messageOverrides} @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 M(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} .messageOverrides=${this.messageOverrides} .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=m(i,this.operationalItems),o=this._getContainerItem(s),n=this._getContainerItem(r);a==null||!l||(this.viewModel.moveListItem(l,n,o,a),V(this,l.uid,c=>this._resolveListContainer(c.parentElement)===s))}_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)K(this.el.view?.map?.layers,t);else{let i=m(e,this.operationalItems);if(!i)return;Q(i,t)}}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let a=e.target.selectedItems.map(s=>m(s,this.operationalItems)).filter(Boolean);i.removeAll(),i.addMany(a)}render(){let{state:e}=this,t={[w.hidden]:e==="loading",[w.disabled]:e==="disabled"};return d`<div class=${v(x(w.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 this.hideNoItemsNotice?null:d`<div class=${v(g.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 b(e?.uid??s,d`<calcite-flow-item data-layer-uid=${e?.uid??""??E} .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 G(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:c,filterText:y,openedLayers:_,filterPlaceholder:$,messages:I}=this,C=[d`<calcite-flow-item .closable=${r} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${o?I.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!_.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??E} .displayMode=${Z} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${$} .filterProps=${H} .filterText=${a?y:""} .group=${s} .label=${I.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${c} @calciteListChange=${this._handleCalciteListChange} @calciteListFilter=${h=>{this.filterText=h.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${h=>this._onCalciteListOrderChange(h.detail)} @calciteListDragEnd=${h=>this._onCalciteListDragEnd(h.detail)} ${f(this._rootListRef)}>${t.toArray().map(h=>this._renderItem(h))}${a&&!this.hideNoFilterResultsNotice?d`<div class=${v(g.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:b("root-flow",d`<calcite-flow>${C}</calcite-flow>`)}_renderItem(e,t,i){return b(e.uid,W({activeItem:this._activeItem,canMove:this._canMove,css:g,displayMode:Z,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}))}};R("arcgis-layer-list-next",T);return T},"widgets/LayerList/LayerListViewModel","core/Collection","core/reactiveUtils",a,c,e,h,i,k,l,n,o)
|
package/dist/cdn/ZWAOPC3F.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import j from"./D6Z3MYCF.js";import i from"./7MIEKJ57.js";import{a as J}from"./JCRPP54Z.js";import{a as S,b as H,g as G,h as U,m as F}from"./LDDAJOTV.js";import{a as B}from"./HSF2MYAX.js";import{a as w}from"./RDWM76R2.js";import h from"./K2HEKJRC.js";import g from"./MZWO5JYA.js";import f from"./FR3DD5XU.js";import"./VJVKFKSG.js";import e from"./G3GFYB3W.js";import{a as x}from"./NDMHZQ2Z.js";import{a as p}from"./JD74LG7K.js";import d from"./K3VQUQ6I.js";import b from"./NFE73D6R.js";import{g as R}from"./5GFBHLDY.js";import"./42UVPIOD.js";import a from"./34IPKNHM.js";import"./QUZTFUWM.js";import{d as D}from"./QLIWDFZI.js";import{A as T,L as O,M as m,N as P,O as y,Q as $,R as L,T as A,b as r,w as c}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createReactiveMap:K},I,{on:C,watch:W},X,Y,{h:f},,{a:N},k,,,,,{b:j,c:q,d:z}])=>{var g=J,Z=u=>{let e=u?.type;return e==="knowledge-graph"||e==="map-image"||e==="tile"},ee=u=>u?.type==="catalog",Q="nested",te=I.ofType(Y),se=k(X),_=class extends P{constructor(){super(...arguments),this.#o=`operational-${T()}`,this.#e=null,this.#l=O(),this.#i=!1,this.#t=!1,this.messages=x(),this.#r=()=>{this._activeItem=null},this.#n=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(s=>s.classList?.contains(g.item));this._activeItem=F(t)},this.#a=K(),this.#s=K(),this.#h=e=>{e&&this.#v(e)},this.#c=e=>{e&&this.#b(e)},this.#d=e=>{e&&this.#$(e)},this.viewModel=se(this),this._activeItem=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this.layerTablesEnabled=new I(["knowledge-graph"]),this.mapImageOptions=null,this.tileOptions=null,this.view=this.viewModel.view,this.hideCatalogLayerList=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryLayerIndicators=!1,this.closed=!1,this.topLayerDisabled=!1,this.autoDestroyDisabled=!1,this.state=this.viewModel.state,this.openedLayers=new I,this.openedLayerLists=new I,this.collapsed=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=H,this.selectedItems=new te,this.selectionMode="none",this.visibilityAppearance="default",this.arcgisPropertyChange=R()("state"),this.arcgisReady=c(),this.arcgisCatalogItemsChange=c(),this.arcgisFilterChange=c(),this.arcgisSelectedItemsChange=c(),this.arcgisOpenedLayersChange=c(),this.arcgisTriggerAction=N(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_activeItem:16,_focusRootFlowItem:16,_focusPanelFlowItem:16,_focusLayerFlowItem:16,_totalItems:16,_filterEnabled:16,_visibleItems:16,_openedPanelItems:16,_renderedOpenLayerFlowItems:16,layerTablesEnabled:16,mapImageOptions:16,tileOptions:16,view:0,hideCatalogLayerList:5,showCloseButton:5,showCollapseButton:5,showErrors:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryLayerIndicators:5,closed:5,topLayerDisabled:5,autoDestroyDisabled:5,referenceElement:1,state:32,openedLayers:32,openedLayerLists:32,catalogItems:0,catalogLayer:0,catalogOptions:0,collapsed:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,knowledgeGraphOptions:0,label:1,listItemCreatedFunction:0,listModeDisabled:5,minFilterItems:9,selectedItems:0,selectionMode:1,visibilityAppearance:1,messageOverrides:0,onCatalogOpen:0,onTablesOpen:0}}static{this.styles=[z,q]}#o;#e;#l;#i;#t;#r;#n;#a;#s;#h;#c;#d;get _totalItems(){return this.catalogItems?.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length??0}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _visibleItems(){return this.catalogItems?.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 _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,s)=>this.#R(t,s===e.length-1))}get catalogItems(){return this.viewModel.catalogItems}set catalogItems(e){this.viewModel.catalogItems=e}get catalogLayer(){return this.viewModel.catalogLayer}set catalogLayer(e){this.viewModel.catalogLayer=e}async destroy(){this.#i||this.#t||(this.#i=!0,this.#e?.abort(),this.#e=null,await this.manager.destroy(),this.openedLayerLists.removeAll(),this.openedLayers.removeAll(),this.#s.clear(),this.#a.clear(),this.#t=!0,this.#i=!1)}loaded(){this.manager.onLifecycle(()=>[C(()=>this.openedLayers,"change",()=>{this.#w()}),C(()=>this.viewModel.catalogItems,"change",()=>{G(this.selectedItems),this.arcgisCatalogItemsChange.emit()}),C(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),W(()=>[this.filterPredicate,this.#l.value],()=>U(this.#l.value,this.filterPredicate))])}disconnectedCallback(){super.disconnectedCallback(),this.#e?.abort(),this.#e=null,!this.autoDestroyDisabled&&!this.#t&&!this.#i&&this.destroy()}#y(e,t){return this.viewModel.triggerAction(e,t)}async#f(e,t){let s=this.#s.get(e);if(s)return s;let a=e.type==="catalog"?await this.#L(e):await this.#C(e);return t.aborted||!this.isConnected||this.#t?(a?.destroy?.(),a):(t.aborted||this.#s.set(e,a),a)}async#w(){if(!this.isConnected||this.#t)return;let{openedLayers:e,openedLayerLists:t}=this;this.#e?.abort();let s=new AbortController,{signal:a}=s;this.#e=s,this.#s.forEach((n,h)=>{e.includes(h)||(n?.destroy?.(),this.#s.delete(h))});let l=await Promise.all(e.map(n=>this.#f(n,a)));if(a.aborted||!this.isConnected||this.#t)return;t.removeAll(),t.addMany(l);let i=t.at(-1),o=i&&"catalogLayer"in i?i:void 0;this._catalogLayerList!==o&&(this._catalogLayerList=o),this.arcgisOpenedLayersChange.emit()}#I(e){e.open=!1,this._focusRootFlowItem=!0}#b(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,f(e))}#v(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,f(e))}#$(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,f(e))}async#L(e){let{headingLevel:t,catalogOptions:s,view:a,referenceElement:l,filterPlaceholder:i,listItemCreatedFunction:o,minFilterItems:n,selectionMode:h,visibilityAppearance:d}=this;return L(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder??i} .listItemCreatedFunction=${s?.listItemCreatedFunction??o} .minFilterItems=${s?.minFilterItems??n} .selectionMode=${s?.selectionMode??h} .visibilityAppearance=${s?.visibilityAppearance??d} .showErrors=${s?.visibleElements?.errors??this.showErrors} .showFilter=${s?.visibleElements?.filter??this.showFilter} .hideStatusIndicators=${s?.visibleElements?.statusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.visibleElements?.temporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${b=>b.stopPropagation()} .catalogLayer=${e} .view=${a} .referenceElement=${l} @catalogOpen=${this.#p} @tablesOpen=${this.#m}></arcgis-catalog-layer-list-next>`)}#F(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#C(e){let{headingLevel:t,selectionMode:s,referenceElement:a,view:l}=this,i=this.#F(e);return L(r`<arcgis-table-list .headingLevel=${i?.headingLevel??t} .selectionMode=${i?.selectionMode??s} .collapsed=${i?.collapsed} .filterPlaceholder=${i?.filterPlaceholder} .filterText=${i?.filterText} .label=${i?.label} .tables=${i?.tables} .view=${l} .referenceElement=${a} @arcgisReady=${o=>o.stopPropagation()}></arcgis-table-list>`)}#m(e){if(this.onTablesOpen){this.onTablesOpen(e);return}let t=e.layer;Z(t)&&(this.openedLayers.push(t),this._focusLayerFlowItem=t.uid)}#p(e){if(this.onCatalogOpen){this.onCatalogOpen(e);return}let t=e.layer?.parent;ee(t)&&(this.openedLayers.push(t),this._focusLayerFlowItem=e.layer?.uid)}#_(e,t){t?this.#a.set(e,t):this.#a.delete(e)}#M(e,t){this.#y(e,t)}#E(e){let{selectionMode:t,selectedItems:s}=this;if(t==="none")return;let a=e.target.selectedItems.map(l=>F(l)).filter(Boolean);s.removeAll(),s.addMany(a)}render(){let{state:e}=this,t={[p.hidden]:e==="loading",[p.disabled]:e==="disabled"};return r`<div class=${y(D(p.widget,p.panel,t))}>${this._visibleItems?.length?this.#O():null}${this.#D()}</div>`}#T(e){let t=this.#a,s=this.messages;return e?.layer?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer.uid)} .topLayerDisabled=${this.topLayerDisabled}>${s.layerIncompatibleTooltip}</calcite-tooltip>`:null}#g(e){return e.incompatible?this.#T(e):e.children?.filter(t=>!t.hidden).toArray().map(t=>this.#g(t))}#O(){return this._visibleItems?.toArray().map(e=>this.#g(e))}#u(){return r`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#P(){return this.hideNoItemsNotice?null:r`<div class=${y(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#u()}</calcite-notice></div>`}#A(){let{_openedPanelItems:e,openedLayers:t}=this;return B(e.toArray(),({uid:s})=>s,(s,a)=>{let{uid:l,title:i,panel:o}=s,n=()=>this.#I(o);return r`<calcite-flow-item .description=${i} .heading=${o.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${h=>{h.preventDefault(),n()}} ${m(this.#h)}><arcgis-layer-list-item-panel .item=${s} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent slot=footer-actions width=full @click=${n}>Back</calcite-button></calcite-flow-item>`})}#D(){let{collapsed:e,_visibleItems:t,_filterEnabled:s,showCloseButton:a,showCollapseButton:l,showHeading:i,selectionMode:o,filterText:n,filterPlaceholder:h,openedLayers:d,_openedPanelItems:b}=this,M=this.#o,E=this.label??this.messages.componentLabel??"",V=[r`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${i?E:void 0} .headingLevel=${this.headingLevel} .selected=${!d.length&&!b.length} @calciteFlowItemClose=${()=>this.closed=!0} ${m(this.#c)}>${t?.length?r`<calcite-list data-layer-type=${M??$} .displayMode=${Q} .filterEnabled=${s} .filterPlaceholder=${h} .filterProps=${S} .filterText=${s?n:""} .group=${M} .label=${E} @focusin=${this.#n} @focusout=${this.#r} selection-appearance=border .selectionMode=${o} @calciteListChange=${this.#E} @calciteListFilter=${v=>{this.filterText=v.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @mouseleave=${this.#r} @mouseover=${this.#n} ${m(this.#l)}>${t.toArray().map(v=>this.#x(v))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${y(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#u()}</calcite-notice></div>`:null}</calcite-list>`:this.#P()}</calcite-flow-item>`,this.#A(),this._renderedOpenLayerFlowItems];return this.closed?null:w("root-flow",r`<calcite-flow>${V}</calcite-flow>`)}#R(e,t){let{openedLayers:s}=this,a=e.title||this.messages.untitledLayer;return w(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??$} .description=${a} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${l=>{l.preventDefault(),s.pop();let i=s.at(-1);i?this._focusLayerFlowItem=i.uid:this._focusRootFlowItem=!0}} ${m(this.#d)}>${this.#s.get(e)}</calcite-flow-item>`)}#x(e,t,s){let{hideStatusIndicators:a,showCloseButton:l,showCollapseButton:i,showErrors:o,showFilter:n,showHeading:h,showTemporaryLayerIndicators:d}=this;return w(e.uid,j({activeItem:this._activeItem??void 0,css:{...g,itemCatalogIcon:g.itemActionIcon},displayMode:Q,dragEnabled:!1,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,parent:t,parentTitles:s,rootGroupUid:this.#o,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,hideStatusIndicators:a,showCloseButton:l,showCollapseButton:i,showErrors:o,showFilter:n,showHeading:h,showTemporaryLayerIndicators:d,handleAction:this.#M.bind(this),handleCatalogOpen:this.#p.bind(this),handleTablesOpen:this.#m.bind(this),handleTooltipReferenceChange:this.#_.bind(this),view:this.view}))}};A("arcgis-catalog-layer-list-next",_);return _},"applications/Components/featureUtils","core/Collection","core/reactiveUtils","widgets/CatalogLayerList/CatalogLayerListViewModel","widgets/LayerList/ListItem",a,b,d,e,f,g,h,i,j)
|