@arcgis/map-components 5.2.0-next.78 → 5.2.0-next.79
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/OGRUHEZ4.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-bookmarks/customElement.d.ts +2 -4
- package/dist/components/arcgis-features-next/customElement.js +41 -44
- package/dist/components/types.d.ts +3 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/HTL73ZTA.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/map-components",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.79",
|
|
4
4
|
"description": "ArcGIS Map Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"2D",
|
|
@@ -46,13 +46,13 @@
|
|
|
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.
|
|
50
|
-
"@arcgis/
|
|
51
|
-
"@arcgis/
|
|
49
|
+
"@arcgis/common-components": "5.2.0-next.79",
|
|
50
|
+
"@arcgis/lumina": "5.2.0-next.79",
|
|
51
|
+
"@arcgis/toolkit": "5.2.0-next.79"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@arcgis/core": "^5.2.0-next",
|
|
55
|
-
"@esri/calcite-components": "^5.2.0-next.
|
|
55
|
+
"@esri/calcite-components": "^5.2.0-next.52"
|
|
56
56
|
},
|
|
57
57
|
"css.customData": [
|
|
58
58
|
"dist/docs/vscode.css-custom-data.json"
|
package/dist/cdn/HTL73ZTA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import i from"./7MIEKJ57.js";import{a as S}from"./RDWM76R2.js";import h from"./K2HEKJRC.js";import g from"./MZWO5JYA.js";import f from"./FR3DD5XU.js";import{a as k}from"./VJVKFKSG.js";import{b as Z,c as j}from"./32XG4IQO.js";import e from"./G3GFYB3W.js";import{a as V}from"./NDMHZQ2Z.js";import d from"./K3VQUQ6I.js";import b from"./NFE73D6R.js";import{e as P,g as z}from"./5GFBHLDY.js";import"./42UVPIOD.js";import a from"./34IPKNHM.js";import"./QUZTFUWM.js";import{a as E,d as I}from"./QLIWDFZI.js";import{L as v,M as p,N as B,O as A,Q as c,R as H,T as R,a as O,b as r,n as y,w as M}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([X,G,J,{initializeProjection:Q},{renderingSanitizer:C},{stripHTML:L},{substitute:h,formatNumber:x},{watch:u},,,,U,,,{d:D},{c:K,d:q}])=>{var Y=O`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}`;function ee(_){return _?.declaredClass.startsWith("esri.layers.")??!1}function te(_){if(!(!_||!("featureReduction"in _)))return _.featureReduction?.type}var ie=U(J),N=class extends B{constructor(){super(...arguments),this._zoomToFeature=new X({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._focusTrapNode=v(),this._focusTrapAnimationFrameId=null,this._rootFlowItemNode=v(),this._featureMenuViewportNode=v(),this._actionBarMenuNode=v(),this._flowContainerNode=v(),this._aggregatedFeaturesComponent=v(),this.messages=V(),this._selectedFeatureComponent=v(),this._direction=P(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=k(this._openRelatedFeatureAbortController)},this._openRelatedFeatureAbortController=null,this.flowItems=new G,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this.viewModel=ie(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new G,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=z()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=M(),this.arcgisClose=M(),this.arcgisTriggerAction=M()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_selectedFeatureHeading:16,_selectedFeatureHeadingText:16,_selectedFeatureContent:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=Y}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this._selectedFeatureHeading)&&!!(this.content||this._selectedFeatureContent))}get _selectedFeatureHeading(){return this.viewModel.selectedFeatureItem?.heading}get _selectedFeatureHeadingText(){return this._selectedFeatureHeading??this.messages.untitled}get _selectedFeatureContent(){return this.viewModel.selectedFeatureItem?.content}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}async destroy(){await this.manager.destroy(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelToggleFocusTrapAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:a}=t??{},i=new AbortController,{signal:s}=i,n=a?AbortSignal.any([s,a]):s;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await Q(this.location.spatialReference,this.view.spatialReference,null,{signal:n}),e=this.view.toScreen(this.location)??void 0),!e)return;let o=await this.viewModel.fetchFeatures(e,{...t,signal:n});this.location=o.location,this.promises=o.pendingFeatures}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){await this._focusTrapNode.value?.setFocus()}connectedCallback(){super.connectedCallback(),this._createSpinner()}disconnectedCallback(){super.disconnectedCallback(),this._cancelToggleFocusTrapAnimationFrame(),this._removeSpinner(this.referenceElement)}loaded(){this.manager.onLifecycle(()=>[u(()=>this.viewModel?.active,()=>this._toggleFocusTrap()),u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),u(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),u(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),u(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&y(()=>this.selectedFeatureComponent=e)}_toggleFocusTrap(){this._cancelToggleFocusTrapAnimationFrame(),this._focusTrapAnimationFrameId=requestAnimationFrame(()=>{this._focusTrapAnimationFrameId=null,this.viewModel.active?this._focusTrapNode.value?.activate():this._focusTrapNode.value?.deactivate()})}_cancelToggleFocusTrapAnimationFrame(){this._focusTrapAnimationFrameId!=null&&(cancelAnimationFrame(this._focusTrapAnimationFrameId),this._focusTrapAnimationFrameId=null)}_cancelFetchingFeatures(){this._fetchFeaturesController=k(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureItems:e}=this.viewModel,t=new Map;return e.forEach(a=>{let i=a?.graphic;if(!i)return;let s=D(i),n=ee(s)?s:null,o=t.get(n);o||(o=[],t.set(n,o)),o.push(a)}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let a=e.graphic,i=a?.geometry;if(i==null||a==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:i}),t.signal.aborted)return;let s=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let n=s.execute(i);n!=null&&(this.location=n),this.features=[a],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController=null}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:a}=this,{id:i}=e,s=a?.attributes,n=e.title??"",o=i==="zoom-to-feature"?h(n,{messages:t}):i==="remove-selected-feature"?h(n,{messages:t}):i==="zoom-to-aggregated-features"?h(n,{messages:t}):i==="browse-aggregated-features"?h(n,{messages:t}):e.title;return o&&s?h(o,s):o??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||(j(t,this._direction)&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),Z(t,this._direction)&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:a,waitingForResult:i}=this.viewModel;i||!a||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){e.disabled||(e?.type==="toggle"&&(e.value=!e.value),q(e,this.viewModel),this.arcgisTriggerAction.emit({action:e}))}_viewScaleChange(){let{selectedFeature:e}=this;!e?.isAggregate||te(D(e))!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);y(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{effectiveHeading:e}=this.viewModel;return!this.hideHeading&&e?e:""}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=E(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=E(e)}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=H(r`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel.open&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return r`<div class="root" @keydown=${this._onMainKeydown}><calcite-focus-trap .focusTrapDisabled=${!this.focusTrapEnabled} ${p(this._focusTrapNode)}>${this._renderHeader()}${this._renderContentContainer()}</calcite-focus-trap></div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?r`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?r`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:a}=this;return r`<div class="pagination-text">${h(a.pageText??"",{index:x(t+1),total:x(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:a,selectedFeatureIndex:i,pendingPromisesCount:s}=t;return r`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures??""} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:x(i+1),total:x(a)})} text-enabled title=${e.showAllFeatures??""??c}></calcite-action>`}_renderPagination(e,t){let{previous:a,next:i}=this.messages;return r`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${a??""} @click=${e} .text=${a??""} title=${a??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${i??""} @click=${t} .text=${i??""} title=${i??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e,t){let{initialDisplayMode:a}=this,{selectedFeatureItem:i}=this.viewModel,s=e===i;return r`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(t)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(t)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(t)}><span .innerHTML=${(C.sanitize(e.heading)||this.messages.untitled)??""} slot=content></span>${a==="list"?r`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,a=this._groupResultsByLayer(),i=new Map;t.featureItems.forEach((n,o)=>i.set(n,o));let s=this.initialDisplayMode==="list"?"none":"single";return t.featureItems.length?r`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(a.keys(),n=>{let o=a.get(n)?.map(d=>{let g=i.get(d);return g==null?null:this._renderFeatureMenuItem(d,g)}),l=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?S(n??"map-graphics",r`<calcite-list-item-group .heading=${l}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?r`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:a,_isCollapsed:i,_collapseEnabled:s,featureNavigationTop:n,initialDisplayMode:o,selectedFeature:l,hideHeading:d}=this,{active:g,selectedFeatureItem:f,content:F}=this.viewModel,m=this._getHeading();if(o==="list"&&!l)return null;let w=f?!f.content:!F;return r`<calcite-flow-item class=${A(I({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!a} .closed=${!g} .collapsed=${i} .collapseDirection=${this.collapseDirection??(n?"down":"up")} .collapsible=${s} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${!d&&m?L(m):void 0} ${p(this._rootFlowItemNode)}>${!d&&m?r`<div slot=heading><div .innerHTML=${C.sanitize(m??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${A(I("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:a,messages:i,initialDisplayMode:s,featureMenuOpen:n,_featureFlowItemSelected:o,_collapseEnabled:l,_isCollapsed:d,featureNavigationTop:g,headingLevel:f}=this,{active:F,featureItems:m,pendingPromisesCount:w}=e,T=a??i.selectFeature,$=h(i.backLabel??"",{title:this._selectedFeatureHeadingText});if(s==="feature"&&!n)return null;let b=!o;return r`<calcite-flow-item class=${A(I({"flow-item-collapsed":d}))} .closable=${s==="list"&&!t} .closed=${!F} .collapsed=${s==="list"&&d} .collapseDirection=${this.collapseDirection??(g?"down":"up")} .collapsible=${s==="list"&&l} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand,back:$}} .description=${this.hideFeatureMenuHeading?void 0:h(i.total??"",{total:m.length})} .heading=${this.hideFeatureMenuHeading?void 0:T} .headingLevel=${f} .loading=${e.waitingForContents} .selected=${b} @calciteFlowItemBack=${W=>{W.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${p(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${w>0?r`<calcite-loader class="loader" inline .label=${i.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${b?this._renderFeatureMenu():null}</div><div class="feature-menu-observer" ${p(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?r`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${$} title=${$??c}>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:a,hideCloseButton:i,hideSelectFeature:s,active:n,hideHeading:o}=this,l="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,d=l&&!s,g=e.flowType==="feature-association",f=a.returnToInitialFeature??"",F=a?.selectFeature,m=this._getActionTitle(this._zoomToFeature),w=h(a.zoomLabel??"",{messages:a,title:this._selectedFeatureHeadingText}),T=!this.hideActionBar&&g&&l,$=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?r`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return r`<calcite-flow-item .closable=${!i} .closed=${!n} class="flow-item-drill-in" .description=${L(this._getDrillInFlowItemDescription(e)??"")} .heading=${o?void 0:L(e.heading??"")} .selected=${t} @calciteFlowItemBack=${b=>{b.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${o?null:r`<div slot=heading><div .innerHTML=${C.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${C.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${f??""} title=${f??""??c}></calcite-action>${d?r`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${F??""} title=${F??c}></calcite-action>`:null}${T?r`<calcite-action-bar expand-toggle-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${this._zoomToFeature.disabled} .icon=${this._zoomToFeature.icon??void 0} .loading=${this._zoomToFeature.active} scale=s text-enabled .text=${m} title=${w??c} .label=${w} @click=${()=>K(this.viewModel,this._zoomToFeature,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div>${$}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,a=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,i=a&&e.length===0,s=e.length===0&&this._featureFlowItemSelected&&!a,n=e?.map((d,g)=>this._renderFlowItem(d,this._featureFlowItemSelected&&g===e.length-1)),o=this._renderBrowseAggregateContainer(!!i),l=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(s)]:[this._renderContentFeature(s),this._renderFeatureMenuContainer()];return r`<calcite-flow ${p(this._flowContainerNode)}>${l}${o}${n}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:a,messages:i}=this,{selectedFeature:s}=this.viewModel,n=this.viewModel.aggregatedFeaturesEnabled&&s?.isAggregate,o=h(i.backLabel??"",{title:this._selectedFeatureHeadingText});return n?r`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!a} .description=${this._aggregatedFeatureCount?h(i.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${i.aggregatedFeatures} @calciteFlowItemBack=${l=>{l.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .messageOverrides=${{back:o}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${s??void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${i} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${p(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full .label=${o} title=${o??c}>${i.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(){let e=this.viewModel.selectedFeatureItem?.isFeatureFromTable,t=this.viewModel.allActions.toArray(),a=e&&!this.location?t.filter(n=>n.id!==this._zoomToFeature.id):t,i=!!a.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent,s=this._isCollapsed||this.hideActionBar||!i;return r`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s?void 0:"action-bar")??c} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${p(this._actionBarMenuNode)}>${this._renderActions(a)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`}_renderActions(e){return e.map(t=>{let a=this._getActionTitle(t);return r`<calcite-action .active=${t.type==="toggle"?t.value:!1} .disabled=${t.disabled} .icon=${t.icon??void 0} .loading=${t.active} scale=s .textEnabled=${!this._hideActionText} .text=${a??""} title=${a??c} .hidden=${!t.visible} @click=${()=>this._triggerAction(t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t}=this.viewModel;return t?r`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${p(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?S(e,r`<div .innerHTML=${C.sanitize(e)??""}></div>`):e??null}};R("arcgis-features-next",N);return N},"support/actions/ActionButton","core/Collection","popup/FeatureContentCollection","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils",a,b,d,e,f,g,h,i)
|