@arcgis/map-components 6.0.0-next.29 → 6.0.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.
- package/dist/cdn/{T4DVKA6R.js → 5IPRYM2C.js} +1 -1
- package/dist/cdn/66TZB3H3.js +3 -0
- package/dist/cdn/6FJUKYNB.js +2 -0
- package/dist/cdn/BEICGIY5.js +2 -0
- package/dist/cdn/{4LO7PNX7.js → BJUFDQGX.js} +1 -1
- package/dist/cdn/{FAPDKS2C.js → CDHP7WRH.js} +1 -1
- package/dist/cdn/FROWRLYW.js +2 -0
- package/dist/cdn/{IYMK2NGU.js → KWF72M5Z.js} +1 -1
- package/dist/cdn/{Q7CJUHNT.js → M7GAVFT6.js} +1 -1
- package/dist/cdn/OKOOKG4L.js +2 -0
- package/dist/cdn/{SI6RI664.js → PYEOGYQ3.js} +1 -1
- package/dist/cdn/{CGGVQCCL.js → WZWVZD7I.js} +1 -1
- package/dist/cdn/{WEMTOBBB.js → YCKZUQ7P.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/chart-utils.js +12 -12
- package/dist/chunks/slots.js +4 -4
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +2 -2
- package/dist/components/arcgis-daylight/customElement.js +134 -131
- package/dist/components/arcgis-feature-media/customElement.js +254 -210
- package/dist/components/arcgis-popup/customElement.js +115 -109
- package/dist/components/arcgis-selection-list/customElement.js +1 -1
- package/dist/components/arcgis-sketch/customElement.d.ts +17 -5
- package/dist/components/arcgis-sketch/customElement.js +33 -34
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +9 -9
- 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 +6 -6
- package/dist/cdn/7RO6N4XQ.js +0 -2
- package/dist/cdn/A6DDWCVW.js +0 -2
- package/dist/cdn/JWHVCBA3.js +0 -2
- package/dist/cdn/LXTP2MVM.js +0 -2
- package/dist/cdn/NXLWTRS6.js +0 -3
- package/dist/components/arcgis-sketch/SketchComponentViewModel.d.ts +0 -84
- package/dist/components/arcgis-sketch/configuration.d.ts +0 -33
- package/dist/components/arcgis-sketch/support.d.ts +0 -17
- package/dist/components/arcgis-sketch/toolbar-sizing-controller.d.ts +0 -96
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import h from"./TI7UH6FZ.js";import f from"./4H2REMNG.js";import"./5GFPOTOB.js";import e from"./EJVFK7JX.js";import{a as $}from"./REB4CHAK.js";import d from"./7JPHMESH.js";import c from"./OLY5EME5.js";import{f as P,h as O}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as w}from"./LXME6MU5.js";import{P as g,Q as u,R as z,T as k,U as E,_ as A,a as M,b as v,x as b}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([B,{stripHTML:I},{watch:p},j,,,,F,,N])=>{var W=M`:host{display:contents;--arcgis-internal-popup-pointer-size: 12px;--arcgis-internal-popup-content-small-size: 280px;--arcgis-internal-popup-content-medium-size: 340px;--arcgis-internal-popup-content-large-size: 400px;--arcgis-internal-popup-content-x-large-size: 460px;--arcgis-internal-popup-content-min-size-y: 48px;--arcgis-internal-popup-pointer-size-half: calc(var(--arcgis-internal-popup-pointer-size) / 2);--arcgis-internal-popup-pointer-size-half-negative: calc(var(--arcgis-internal-popup-pointer-size-half) * -1)}.root{--arcgis-internal-popup-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-popup-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-popup-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-popup-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);display:flex;position:absolute;flex-flow:column nowrap;z-index:401;pointer-events:none;border:none;overflow:visible;padding:0;width:auto;height:auto;background-color:transparent}.hidden{visibility:hidden}.root:popover-open{display:flex;position:fixed;flex-flow:column nowrap;margin:0}arcgis-features{flex:1;width:100%}.shadow{box-shadow:var(--calcite-shadow-sm)}.aligned-top-center{transform-origin:50% 100%}.aligned-bottom-center{transform-origin:50% -5%}.aligned-top-left,.aligned-bottom-left{transform-origin:100% 50%}.aligned-top-right,.aligned-bottom-right{transform-origin:-5% 50%}.aligned-top-center,.aligned-top-left,.aligned-top-right{animation:popup-intro-animation-down .2s ease-in-out}.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:popup-intro-animation-up .2s ease-in-out}.main-container{display:flex;position:relative;z-index:1;background-color:var(--calcite-color-foreground-1);width:var(--arcgis-internal-popup-content-medium-size);min-height:var(--arcgis-internal-popup-content-min-size-y);max-height:var(--arcgis-internal-popup-content-medium-size);overflow:hidden;pointer-events:auto}.pointer{position:absolute;width:0;height:0}.pointer-direction{position:absolute;width:var(--arcgis-internal-popup-pointer-size);height:var(--arcgis-internal-popup-pointer-size);content:"";background-color:var(--calcite-color-foreground-1)}.aligned-top-center .pointer{top:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-bottom-center .pointer{bottom:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-top-left .pointer{right:var(--arcgis-internal-popup-pointer-size-half);bottom:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-bottom-left .pointer{top:var(--arcgis-internal-popup-pointer-size-half);right:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-top-right .pointer{bottom:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-bottom-right .pointer{top:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-top-center .pointer-direction,.aligned-bottom-center .pointer-direction{transform:scale(.75,2) rotate(45deg)}.aligned-top-left .pointer-direction,.aligned-bottom-left .pointer-direction,.aligned-top-right .pointer-direction,.aligned-bottom-right .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:var(--arcgis-internal-popup-pointer-size-half-negative);transform:scale(.75,2.5) rotate(45deg)}.aligned-top-center .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.aligned-bottom-center .pointer-direction{bottom:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.is-xl-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-large-size)}.is-md-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-medium-size)}.is-sm-width-breakpoint .main-container,.is-xs-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-small-size)}.is-xs-width-breakpoint.is-docked-top-center,.is-xs-width-breakpoint.is-docked-bottom-center{margin:0;width:auto}.is-xs-width-breakpoint.is-docked-top-center .main-container,.is-xs-width-breakpoint.is-docked-bottom-center .main-container{position:absolute;right:0;left:0;width:100%;max-height:75%}.is-xs-width-breakpoint.is-docked-bottom-center .main-container{bottom:0}.is-xs-width-breakpoint.is-docked-top-center .main-container{top:0}.is-xl-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-large-size)}.is-sm-height-breakpoint .main-container,.is-xs-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-small-size)}.is-docked{flex-flow:row nowrap;inset:0;margin:var(--arcgis-layout-overlay-space-top, 0) var(--arcgis-layout-overlay-space-right, 0) var(--arcgis-layout-overlay-space-bottom, 0) var(--arcgis-layout-overlay-space-left, 0);padding:var(--calcite-space-lg) var(--calcite-space-lg) var(--calcite-spacing-xxxl) var(--calcite-space-lg);animation:docking-animation .25s ease-out}.is-docked-top-left,.is-docked-top-center,.is-docked-top-right,.is-docked-top-start,.is-docked-top-end{align-items:flex-start}.is-docked-bottom-left,.is-docked-bottom-center,.is-docked-bottom-right,.is-docked-bottom-start,.is-docked-bottom-end{align-items:flex-end}.is-docked-top-left,.is-docked-bottom-left,.is-docked-top-start,.is-docked-bottom-start{justify-content:flex-start}.is-docked-top-center,.is-docked-bottom-center{justify-content:center}.is-docked-top-right,.is-docked-bottom-right,.is-docked-top-end,.is-docked-bottom-end{justify-content:flex-end}.is-docked-top-left.is-rtl,.is-docked-top-right.is-rtl,.is-docked-bottom-left.is-rtl,.is-docked-bottom-right.is-rtl{flex-direction:row-reverse}.is-docked-top-left .main-container,.is-docked-top-right .main-container,.is-docked-bottom-left .main-container,.is-docked-bottom-right .main-container,.is-docked-top-start .main-container,.is-docked-top-end .main-container,.is-docked-bottom-start .main-container,.is-docked-bottom-end .main-container{max-height:80%}.is-docked-top-center .main-container,.is-docked-bottom-center .main-container{max-height:40%}@media(prefers-reduced-motion){.aligned-top-center,.aligned-top-left,.aligned-top-right,.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:none}}@media(prefers-reduced-motion){.is-docked{animation:none}}@keyframes docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{transform:translateY(calc(var(--calcite-space-xs) * -1));opacity:0}to{transform:translate(0);opacity:1}}@keyframes popup-intro-animation-up{0%{transform:translateY(var(--calcite-space-xs));opacity:0}to{transform:translate(0);opacity:1}}`,S=new WeakSet;function Y(h){let t=h.defaultView;if(!(!t||S.has(h))){for(let e of["top","right","bottom","left"])try{t.CSS.registerProperty({name:`--arcgis-internal-popup-overlay-space-${e}`,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch(i){if(!(i instanceof t.DOMException&&i.name==="InvalidModificationError"))throw i}S.add(h)}}function _(h){return h&&Number.parseInt(h.replaceAll(/[^-\d.]/gu,""),10)||0}var U=F(B),L={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},C=class extends z{constructor(){super(...arguments),this._direction=P(),this._headingText={html:"",text:""},this._featuresComponent=g(),this._dockAction=new j({id:"popup-dock-action"}),this._mainContainerNode=g(),this._pointerNode=g(),this.messages=$(),this.viewModel=U(this),this._containerNode=g(),this._popupResizeObserver=new ResizeObserver(()=>this._positionContainer()),this._positionContainer=()=>{this.positionStyle=this._calculatePositionStyle()},this._messageOverrides={},this.screenLocation=N(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.alignment="auto",this.autoCloseEnabled=!1,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.diagnostics=this.viewModel.diagnostics,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.dockEnabled=!1,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.features=this.viewModel.features,this.featureStream=this.viewModel.featureStream,this.focusTrapDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideCollapseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideEmptyRelationshipContent=!1,this.hideHeading=!1,this.hideSpinner=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.open=this.viewModel.open,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.state=this.viewModel.state,this.topLayerDisabled=!1,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=O()("active","collapsed","currentAlignment","dockEnabled","effectiveHeading","featureCount","featureMenuOpen","features","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=b(),this.arcgisClose=b(),this.arcgisTriggerAction=b()}static{this.properties={_messageOverrides:16,screenLocation:16,positionStyle:16,_featureNavigationTop:16,_effectiveDockEnabled:16,actions:0,active:0,alignment:1,autoCloseEnabled:5,autoDestroyDisabled:5,collapsed:5,content:1,diagnostics:32,currentAlignment:32,currentDockPosition:32,defaultPopupTemplateEnabled:5,dockEnabled:5,dockOptions:0,effectiveHeading:32,featureCount:0,featureMenuOpen:5,featureMenuTitle:1,features:0,featureStream:0,focusTrapDisabled:5,goToOverride:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideCollapseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideEmptyRelationshipContent:5,hideHeading:5,hideSpinner:5,highlightDisabled:5,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,messageOverrides:0,open:5,referenceElement:1,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,state:32,topLayerDisabled:5,updateLocationEnabled:5,view:0}}static{this.styles=W}get trackLocation(){return this.active&&!this._effectiveDockEnabled}get _featureNavigationTop(){let{currentAlignment:t,currentDockPosition:e}=this;return t==="bottom-left"||t==="bottom-center"||t==="bottom-right"||t==="bottom-start"||t==="bottom-end"||e==="top-left"||e==="top-center"||e==="top-right"||e==="top-start"||e==="top-end"}get _effectiveDockEnabled(){return this.viewModel?.view?.focusRegionVisible?!0:this.dockEnabled}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._dockOptions||L}set dockOptions(t){let e={...L},i=this.viewModel?.view?.breakpoints,o={};i&&(o.width=i.xsmall,o.height=i.xsmall);let n={...e,...t},a={...e.breakpoint,...o},{breakpoint:s}=n;typeof s=="object"?n.breakpoint={...a,...s}:s&&(n.breakpoint=a),this._dockOptions=n}get selectedDrillInFeature(){return this._featuresComponent.value?.selectedDrillInFeature??null}get selectedFeatureComponent(){return this._featuresComponent.value?.selectedFeatureComponent??null}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy(),this._dockAction.destroy(),this._popupResizeObserver.disconnect()}async openFeatureStream(t){this.viewModel.openFeatureStream(t)}async next(){this.viewModel.next()}async previous(){this.viewModel.previous()}async setFocus(){this._featuresComponent.value?.setFocus()}willUpdate(t){if(!this.hasUpdated||t.has("messageOverrides")||t.has("messages")){let e=this.messages._original??this.messages;this._messageOverrides={...this.messageOverrides,collapse:this.messageOverrides?.collapse??e.collapse,expand:this.messageOverrides?.expand??e.expand}}}connectedCallback(){Y(this.el.ownerDocument),super.connectedCallback(),this._syncPopupResizeObserver()}loaded(){this.manager.onLifecycle(()=>[p(()=>[this.viewModel?.view?.widthBreakpoint,this._effectiveDockEnabled,this._direction],()=>this._handleDockIcon(),{initial:!0}),p(()=>[this._effectiveDockEnabled,this.messages?.undock,this.messages?.dock],()=>this._handleDockEnabled(),{initial:!0}),p(()=>[this.dockOptions,this._featuresComponent.value,this.viewModel?.view?.focusRegionVisible],()=>{let{_dockAction:t,dockOptions:e}=this,i=this._featuresComponent.value?.headerActions;i?.remove(t),e.buttonEnabled&&!this.viewModel?.view?.focusRegionVisible&&i?.add(t)},{initial:!0}),p(()=>[this._pointerNode.value,this.alignment,this.currentAlignment,this._effectiveDockEnabled,this.dockOptions,this.screenLocation,this.viewModel?.active,this.viewModel?.location,this.viewModel?.view?.size],()=>this._positionContainer(),{initial:!0}),p(()=>this._mainContainerNode.value,t=>{this._syncPopupResizeObserver(t)},{initial:!0}),p(()=>this.viewModel?.view?.size,(t,e)=>this._updateDockEnabledForViewSize(t,e)),p(()=>this.viewModel?.view?.ready,()=>this._setDockEnabledForViewSize(this.dockOptions),{initial:!0}),p(()=>this.view?.map,t=>{this.viewModel.map=t},{initial:!0}),p(()=>this.screenLocation,(t,e)=>this._autoClose(t,e)),p(()=>[this.active,this._containerNode.value,this._effectiveDockEnabled,this.topLayerDisabled],()=>this._togglePopover(),{initial:!0})])}disconnectedCallback(){super.disconnectedCallback(),this._popupResizeObserver.disconnect()}_togglePopover(){this._containerNode.value?.togglePopover(this.active&&!this._effectiveDockEnabled&&!this.topLayerDisabled)}_syncPopupResizeObserver(t=this._mainContainerNode.value){this._popupResizeObserver.disconnect(),t&&this._popupResizeObserver.observe(t)}_handleClose(t){t.stopPropagation(),this.arcgisClose.emit()}_autoClose(t,e){this.autoCloseEnabled&&t!=null&&e!=null&&(this.open=!1)}_handleArcgisPropertyChange(t){t.detail.name==="collapsed"&&(this.collapsed=t.target.collapsed)}_handleArcgisTriggerAction(t){t.stopPropagation(),t.detail.action===this._dockAction&&(this.dockEnabled=!this.dockEnabled),this.arcgisTriggerAction.emit({action:t.detail.action})}_isOutsideView(t,e){let{popupHeight:i,popupWidth:o,screenLocation:n,side:a,view:s}=t;if(Number.isNaN(o)||Number.isNaN(i)||!s||!n)return!1;let l=e?Number.parseFloat(e.getPropertyValue(`--arcgis-internal-popup-overlay-space-${a}`)):0;switch(a){case"right":return n.x+o/2>s.width-l;case"left":return n.x-o/2<l;case"top":return n.y-i<l;case"bottom":return n.y+i>s.height-l}}_getPointerSize(){let{_pointerNode:t}=this,e=t.value?window.getComputedStyle(t.value):null,i=_(e?.height),o=_(e?.width);return Math.hypot(i,o)}_getHeadingText(){let t=this.heading??"";return this._headingText.html!==t&&(this._headingText={html:t,text:I(t)}),this._headingText.text}_calculateAutoAlignment(t){if(t!=="auto")return t;let{_mainContainerNode:e,_popupRect:i,viewModel:o}=this,{view:n}=o,{screenLocation:a}=this;if(a==null||!n||!i||!e.value)return"top-center";let s=window.getComputedStyle(e.value),l=_(s.maxHeight),r=_(s.height),d=this._getPointerSize(),{height:c,width:y}=i,T=y+d,m={popupHeight:Math.max(c,l,r)+d,popupWidth:T,screenLocation:a,view:n},D=this._containerNode.value,f=D?window.getComputedStyle(D):null,V=this._isOutsideView({...m,side:"right"},f),R=this._isOutsideView({...m,side:"left"},f),x=this._isOutsideView({...m,side:"top"},f),H=this._isOutsideView({...m,side:"bottom"},f);return R?x?"bottom-right":"top-right":V?x?"bottom-left":"top-left":x?H?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(t){return typeof t=="function"?t.call(this):t}_getCurrentAlignment(){return this._effectiveDockEnabled||!this.active||!this._mainContainerNode.value?null:this._calculateAutoAlignment(this._callCurrentAlignment(this.alignment))}_callDockPosition(t){return typeof t=="function"?t.call(this):t}_getDockPosition(){return this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position))}_getCurrentDockPosition(){return this._effectiveDockEnabled&&this.active?this._getDockPosition():null}_calculateAutoDockPosition(t){if(t!=="auto")return t;let e=this.viewModel?.view,i="top-end";if(!e)return i;let{breakpoints:o}=e;return o?.xsmall&&e.width<=o.xsmall?"bottom-center":i}_getDockIcon(){let t=this._getDockPosition(),{_direction:e}=this;if(this._effectiveDockEnabled)return"minimize";switch(t){case"top-left":case"bottom-left":return"dock-left";case"top-center":return"maximize";case"bottom-center":return"dock-bottom";case"top-right":case"bottom-right":return"dock-right";case"top-start":case"bottom-start":return e==="rtl"?"dock-right":"dock-left";default:return e==="rtl"?"dock-left":"dock-right"}}_handleDockIcon(){this._dockAction.icon=this._getDockIcon()}_handleDockEnabled(){this._dockAction.title=this._effectiveDockEnabled?this.messages?.undock:this.messages?.dock}_calculateAlignmentPosition(t,e,i,o){if(t<0||e<0||!i||!o||t>i.width||e>i.height)return;let{topLayerDisabled:n}=this,a=n?t:t+i.x,s=n?e:e+i.y,{_direction:l,currentAlignment:r}=this,d=this._getPointerSize(),c=d/2;if(r==="top-left"||r==="top-start"&&l==="ltr"||r==="top-end"&&l==="rtl")return{top:s-(o.height+c),left:a-o.width-c};if(r==="top-center")return{top:s-(o.height+d),left:a-o.width/2};if(r==="top-right"||r==="top-end"&&l==="ltr"||r==="top-start"&&l==="rtl")return{top:s-(o.height+c),left:a+c};if(r==="bottom-left"||r==="bottom-start"&&l==="ltr"||r==="bottom-end"&&l==="rtl")return{top:s+c,left:a-o.width-c};if(r==="bottom-center")return{top:s+d,left:a-o.width/2};if(r==="bottom-right"||r==="bottom-end"&&l==="ltr"||r==="bottom-start"&&l==="rtl")return{top:s+c,left:a+c}}_getPositionStyleValue(t){return t!=null?`${t}px`:"auto"}_calculatePositionStyle(){if(this._effectiveDockEnabled)return;let{screenLocation:t}=this;if(t==null)return;let e=this.view?.container?.getBoundingClientRect(),i=this._mainContainerNode.value?.getBoundingClientRect();this._popupRect=i;let o=this._calculateAlignmentPosition(t.x,t.y,e,i);if(o)return`inset: ${this._getPositionStyleValue(o.top)} ${this._getPositionStyleValue(o.right)} ${this._getPositionStyleValue(o.bottom)} ${this._getPositionStyleValue(o.left)};`}_dockingThresholdCrossed(t,e,i){let[o,n]=t,[a,s]=e,{width:l=0,height:r=0}=i??{};return o<=l&&a>l||o>l&&a<=l||n<=r&&s>r||n>r&&s<=r}_updateDockEnabledForViewSize(t,e){if(!t||!e||!this.viewModel?.view?.ready)return;let{dockOptions:i}=this,o=i.breakpoint;typeof o=="object"&&this._dockingThresholdCrossed(t,e,o)&&this._setDockEnabledForViewSize(i)}_shouldDockAtCurrentViewSize(t){let e=t.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;let{width:o,height:n}=i;if(Number.isNaN(o)||Number.isNaN(n)||typeof e!="object")return!1;let a=typeof e.width=="number"&&o<=(e.width??0),s=typeof e.height=="number"&&n<=(e.height??0);return a||s}_setDockEnabledForViewSize(t){this.viewModel?.view?.ready&&typeof t.breakpoint=="object"&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(t))}render(){let{_direction:t,_effectiveDockEnabled:e,currentAlignment:i,currentDockPosition:o,positionStyle:n}=this,{active:a,view:s}=this.viewModel,l=a&&e,r=a&&!e,d=s?.widthBreakpoint,c=s?.heightBreakpoint,y={"aligned-top-center":i==="top-center","aligned-bottom-center":i==="bottom-center","aligned-top-left":i==="top-left"||i==="top-start"&&t==="ltr"||i==="top-end"&&t==="rtl","aligned-bottom-left":i==="bottom-left"||i==="bottom-start"&&t==="ltr"||i==="bottom-end"&&t==="rtl","aligned-top-right":i==="top-right"||i==="top-end"&&t==="ltr"||i==="top-start"&&t==="rtl","aligned-bottom-right":i==="bottom-right"||i==="bottom-end"&&t==="ltr"||i==="bottom-start"&&t==="rtl","is-docked":l,shadow:r,"is-rtl":this._direction==="rtl","is-docked-top-start":o==="top-start","is-docked-top-end":o==="top-end","is-docked-top-left":o==="top-left","is-docked-top-center":o==="top-center","is-docked-top-right":o==="top-right","is-docked-bottom-left":o==="bottom-left","is-docked-bottom-center":o==="bottom-center","is-docked-bottom-right":o==="bottom-right","is-docked-bottom-start":o==="bottom-start","is-docked-bottom-end":o==="bottom-end","is-xl-width-breakpoint":d==="xlarge","is-lg-width-breakpoint":d==="large","is-md-width-breakpoint":d==="medium","is-sm-width-breakpoint":d==="small","is-xs-width-breakpoint":d==="xsmall","is-xl-height-breakpoint":c==="xlarge","is-lg-height-breakpoint":c==="large","is-md-height-breakpoint":c==="medium","is-sm-height-breakpoint":c==="small","is-xs-height-breakpoint":c==="xsmall"};return v`<div style=${E(n)} class=${k(w("root",y,{hidden:!a||!n&&!e}))} .ariaHidden=${!a} .ariaLabel=${this._getHeadingText()} popover=manual ${u(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`}_renderPointer(){return!this._effectiveDockEnabled||!this.active?v`<div class="pointer" role=presentation><div class=${k(w("pointer-direction","shadow"))} ${u(this._pointerNode)}></div></div>`:null}_renderMainContainer(){let t={shadow:this._effectiveDockEnabled};return v`<div class=${k(w("main-container",t))} ${u(this._mainContainerNode)}><arcgis-features-next .collapsed=${this.collapsed} .autoDestroyDisabled=${this.autoDestroyDisabled} .featureNavigationTop=${this._featureNavigationTop} .focusTrapEnabled=${!this.focusTrapDisabled} .headingLevel=${this.headingLevel} .hideActionBar=${this.hideActionBar} .hideCloseButton=${this.hideCloseButton} .hideFeatureListLayerTitle=${this.hideFeatureListLayerTitle} .hideFeatureMenuHeading=${this.hideFeatureMenuHeading} .hideFeatureNavigation=${this.hideFeatureNavigation} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideHeading=${this.hideHeading} .hideSpinner=${this.hideSpinner} @arcgisPropertyChange=${this._handleArcgisPropertyChange} @arcgisTriggerAction=${this._handleArcgisTriggerAction} @arcgisClose=${this._handleClose} .messageOverrides=${this._messageOverrides} .referenceElement=${this.referenceElement} .responsiveActionsEnabled=${!0} .showCollapseButton=${!this.hideCollapseButton} .viewModel=${this.viewModel} ${u(this._featuresComponent)}><slot name=actions-start slot=actions-start></slot><slot name=actions-end slot=actions-end></slot></arcgis-features-next></div>`}};A("arcgis-popup",C);return C},"popup/FeaturesModel","applications/Components/stringUtils","core/reactiveUtils","support/actions/ActionButton",a,c,d,e,f,h)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as o}from"./5GFPOTOB.js";import g from"./EJVFK7JX.js";import{a as x}from"./REB4CHAK.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as C}from"./Q7GF26CL.js";import"./U77WHUC6.js";import b from"./SI2DEXWH.js";import"./LXME6MU5.js";import{Q as I,R as y,T as c,X as h,_ as w,a as f,b as a,x as v}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:g,isGroupLayerItem:L},S,,,,F])=>{var r={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-space-sm);padding:var(--calcite-space-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-space-md);padding:var(--calcite-space-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-space-lg);padding:var(--calcite-space-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-space-sm) 0 var(--calcite-space-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-space-md) 0 var(--calcite-space-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-space-lg) 0 var(--calcite-space-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-space-2xl);height:var(--calcite-space-2xl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-space-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-space-2xs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=v(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=v()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),n=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!n)return;this.#t.add(l);let u=n.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:n.title}):s.preview;if(n.thumbnail){l.appendChild(n.thumbnail);return}n.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&g(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${c(r.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#v(t):g(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:g(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${!this.hideZoomToButton&&!e.isTable?o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`):void 0}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:n,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof n=="function"?n({item:e}):!!n} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#v(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#g(t))}#g(e){if(!e.visible)return;let{hideItemIcons:t,messages:s}=this,i=e.title||s.untitledFeature,l=!t&&this.displayMode!=="feature",d=!t&&e.supportsThumbnail;return o(e.key,a`<calcite-list-item class=${c(l?r.listItemFeatureIcon:r.listItemFeature)} .closable=${!this.hideItemCloseActions} .iconStart=${d?void 0:e.iconName} .label=${i} .unavailable=${this._isItemUnavailable(e)} .value=${i} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${n=>{n.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${n=>this._afterListItemSelect(e,n)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!(this.hideItemIcons||!e.supportsThumbnail))return o("thumbnail-container",a`<div class=${c(r.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${c(r.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${c(r.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${c(r.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,d,e,g)
|
|
2
|
+
import{a as o}from"./5GFPOTOB.js";import g from"./EJVFK7JX.js";import{a as x}from"./REB4CHAK.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as C}from"./Q7GF26CL.js";import"./U77WHUC6.js";import b from"./SI2DEXWH.js";import"./LXME6MU5.js";import{Q as I,R as y,T as c,X as h,_ as w,a as f,b as a,x as v}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:g,isGroupLayerItem:L},S,,,,F])=>{var r={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-space-sm);padding:var(--calcite-space-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-space-md);padding:var(--calcite-space-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-space-lg);padding:var(--calcite-space-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-space-sm) 0 var(--calcite-space-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-space-md) 0 var(--calcite-space-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-space-lg) 0 var(--calcite-space-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-space-2xl);height:var(--calcite-space-2xl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-space-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-space-2xs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=v(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=v()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),n=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!n)return;this.#t.add(l);let u=n.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:n.title}):s.preview;if(n.thumbnail){l.appendChild(n.thumbnail);return}n.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&g(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${c(r.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#v(t):g(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.isUpdating||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:g(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${!this.hideZoomToButton&&!e.isTable?o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`):void 0}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:n,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof n=="function"?n({item:e}):!!n} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#v(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#g(t))}#g(e){if(!e.visible)return;let{hideItemIcons:t,messages:s}=this,i=e.title||s.untitledFeature,l=!t&&this.displayMode!=="feature",d=!t&&e.supportsThumbnail;return o(e.key,a`<calcite-list-item class=${c(l?r.listItemFeatureIcon:r.listItemFeature)} .closable=${!this.hideItemCloseActions} .iconStart=${d?void 0:e.iconName} .label=${i} .unavailable=${this._isItemUnavailable(e)} .value=${i} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${n=>{n.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${n=>this._afterListItemSelect(e,n)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!(this.hideItemIcons||!e.supportsThumbnail))return o("thumbnail-container",a`<div class=${c(r.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${c(r.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${c(r.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${c(r.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,d,e,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as f,b as y,c as v}from"./
|
|
2
|
+
import{a as f,b as y,c as v}from"./BEICGIY5.js";import{a}from"./JB6WQEFJ.js";import{a as p}from"./ORKCIBIY.js";import b from"./7JPHMESH.js";import{f as m}from"./Q7GF26CL.js";import"./U77WHUC6.js";import"./LXME6MU5.js";import{P as e,Q as s,R as n,T as l,_ as c,a as o,b as t,x as h}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:w},u,{c:d}])=>{var R=o`:host{width:100%;height:100%}`,g=d(u,{omitProps:["container","focusRegionVisible","focusRegionShortcutEnabled","navigation","scale","ui"]}),r=class extends n{constructor(){super(),this._containerRef=e(),this._direction=m(),this._mapRef=e(),this._slotGroupRefs=y(),this.autoDestroyDisabled=!1,this.view=g(this),this.attributionMode=this.view.attributionMode,this.ready=this.view.ready,this.layer=this.view.layer,this.map=this.view.map,this.operationalDataVisible=this.view.operationalDataVisible,this.arcgisViewReadyChange=h()}static{this.properties={autoDestroyDisabled:5,view:32,aria:0,attributionMode:1,ready:36,layer:0,map:0,operationalDataVisible:5}}static{this.styles=[p,f,R]}get aria(){return this.view?.aria}set aria(i){this.view&&(this.view.aria=i)}async destroy(){await this.manager.destroy()}async takeScreenshot(i){return await this.view.takeScreenshot(i)}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.manager.onLifecycle(()=>[w(()=>this.layer,()=>{this.layer&&this.view&&(this.view.layer=this.layer,this.layer.loaded||this.layer.load())},{initial:!0}),w(()=>this.view.ready,()=>{this.view.ready&&this.arcgisViewReadyChange.emit()},{initial:this.view.ready})])}renderMain(){return t`<div class=${`root ${a.base}`} ${s(this._mapRef)}></div>`}render(){return t`${this.renderMain()}<section class=${l(a.containerUI)} ${s(this._containerRef)}>${v({direction:this._direction,slotGroupRefs:this._slotGroupRefs})}</section>`}};c("arcgis-video",r);return r},"core/reactiveUtils","views/VideoView",b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as D,c as H}from"./
|
|
2
|
+
import{b as D,c as H}from"./BEICGIY5.js";import{c as O}from"./Y6WTYXVP.js";import a from"./BOPNSNUT.js";import{b as G,c as R,f as M}from"./Q7GF26CL.js";import{b as x,d as L}from"./LXME6MU5.js";import{D as E,P as y,b as S,x as w,z as C}from"./PQ7NUE5C.js";export default $arcgis.t(([{initializeProjection:k},{signal:q},{watch:v,when:B},j,U,{b:F,c:A}])=>{async function*W(n,t){for(let e of n){let o=await E(e,t).catch(()=>{});if(t.aborted)return;yield*Array.isArray(o)?o.filter(i=>i instanceof U):[]}}async function*T(){yield*[]}async function*$(n,t){await E(n,t).catch(()=>{})}async function z(n,t,e,o){let i;if(e instanceof j?(await k(e.spatialReference,n.spatialReference),F(o.signal),i=n.toScreen(e)):i=e,!i)return T();let s=Promise.withResolvers(),r=n.fetchPopupFeatures(i,{...o,defaultPopupTemplateEnabled:t.defaultPopupTemplateEnabled,hitTestResolver:s})??T();return await s.promise,r}function P(n,t){if(t instanceof j)return t;let e="width"in t?{x:t.x+t.width/2,y:t.y+t.height/2}:t;return n.toMap(e)??void 0}async function K(n,t,e,o){let i={};return{diagnostics:i,featureStream:await z(n,t,e,{diagnostics:i,signal:o}),location:P(n,e)}}var V=class extends C{constructor(t){super(t),this.direction=M(),this.popupRef=y(),this.uiContainerRef=y(),this.#p=q(void 0),this.#t=null,this.#n=null,this.#r=0,this.slotGroupRefs=D(),this.attributionHeight=0,this.component.listenOn(globalThis,"unhandledrejection",e=>{let o=e.reason;if(o?.name==="webgl:required"){let{name:i}=o;this.webGLError={name:i}}})}#p;#i;get#l(){return!this.component.popupDisabled&&(this.component.popupComponentEnabled||!!this.popupElement&&this.popupElement!==this.#i)}get popupElement(){return this.#p.value}set popupElement(t){this.#p.value=t}#t;#n;#r;hostLifecycle(){let{view:t}=this.component,e=t.focusRegionShortcutEnabled;return[v(()=>this.component.focusRegionShortcutEnabled??this.#l,o=>{this.component.view.focusRegionShortcutEnabled=o},{initial:!0,sync:!0}),B(()=>this.component.view.ready,()=>{this.#o()}),v(()=>this.component.view.popup?.visible,(o,i)=>{(o||i)&&this.#e(),o&&this.popupElement?.open&&(this.popupElement.open=!1)},{initial:!0}),v(()=>this.component.popupElement?.open,(o,i)=>{i&&!o&&this.#e()},{initial:!0,sync:!0}),this.component.view.on("focus-region-select",o=>this.#g(o)),this.component.view.on("click",[],o=>{let i=o.native;o.button!==0||i?.ctrlKey||i?.metaKey||this.#b(o).catch(()=>{})},-2),{remove:()=>{t.focusRegionShortcutEnabled=e}}]}hostConnected(){this.#c()}hostUpdated(){this.component.el.isConnected&&this.#c(),this.component.popupComponentEnabled?this.#o():(this.popupElement===this.#i&&(this.#e(),this.#f(),this.popupElement=void 0),this.#i=void 0)}hostDestroy(){this.#e(),this.#d()}hostDisconnected(){this.#d()}async openPopup(t={}){this.#o();let e=this.popupElement,o=t.location??e?.location,i=!!e&&!t.featureStream&&!t.promises?.length&&!!t.fetchFeatures&&!!o;this.#e();let s=new AbortController;if(this.#n=s,e){let{fetchFeatures:r,shouldFocus:a,title:p,featureStream:d,promises:c,location:l,...f}=t,u=l?P(this.component.view,l):void 0,b=l??o,h=i&&b?K(this.component.view,e,b,s.signal):null,g=h?Promise.withResolvers():null;h&&g&&(h.catch(()=>{}),e.featureStream=$(g.promise,s.signal));try{await e.componentOnReady()}catch(m){throw h&&this.#s(s)&&(s.abort(),e.open=!1,await e.clear()),m}if(!this.#s(s))return;if(h)try{let m=await h;if(!this.#s(s))return;Object.assign(e,f),p!==void 0&&(e.heading=p),await e.openFeatureStream(m)}catch(m){if(!A(m))throw this.#s(s)&&(e.open=!1,await e.clear()),m;return}finally{g?.resolve()}else Object.assign(e,f),p!==void 0&&(e.heading=p),d?await e.openFeatureStream({featureStream:d,location:u}):c?.length?await e.openFeatureStream({featureStream:W(c,s.signal),location:u}):(e.featureStream=null,l!==void 0&&(e.location=u),e.open=!0);a&&this.#s(s)&&await e.setFocus()}else{let{location:r,...a}=t;await this.component.view.openPopup({...a,location:r?P(this.component.view,r):void 0})}}closePopup(){this.#e(),this.popupElement?(this.popupElement.open=!1,this.popupElement.clear()):this.component.view.closePopup()}#e(){this.#n?.abort(),this.#n=null}#s(t){return this.#n===t&&!t.signal.aborted}#o(){this.component.popupComponentEnabled&&this.popupRef.value&&!this.popupElement&&(this.#i=this.popupRef.value,this.popupElement=this.popupRef.value,this.popupElement.referenceElement=this.component.el,this.popupElement.view=this.component.view)}handleAttributionHeightChange(t){this.attributionHeight!==t&&(this.attributionHeight=t,this.#h()?.style.setProperty("--arcgis-internal-attribution-space-top",`${this.attributionHeight}px`))}#c(){let t=this.#h(),{topLeft:e,topRight:o,bottomLeft:i,bottomRight:s}=this.slotGroupRefs,r=[e.value,o.value,i.value,s.value];if(t){this.#t??=new ResizeObserver(()=>this.#u()),this.#t.disconnect(),this.#t.observe(t);for(let a of r)a&&this.#t.observe(a,{box:"border-box"});this.#u()}}#u(){let t=this.#h(),{topLeft:e,topRight:o,bottomLeft:i,bottomRight:s}=this.slotGroupRefs;if(!(t&&e.value&&o.value&&i.value&&s.value))return;let r=t.getBoundingClientRect(),a=this.#m(r,e.value,o.value),p=this.#m(r,i.value,s.value,!0);this.#a(t,"--arcgis-internal-top-center-max-width",a.maxWidth),this.#a(t,"--arcgis-internal-top-center-position",a.position),this.#a(t,"--arcgis-internal-bottom-center-max-width",p.maxWidth),this.#a(t,"--arcgis-internal-bottom-center-position",p.position)}#a(t,e,o){let i=`${o}px`;t.style.getPropertyValue(e)!==i&&t.style.setProperty(e,i)}#m(t,e,o,i=!1){let s=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=b=>Array.from(b.querySelectorAll("slot")).some(h=>h.assignedElements().length>0),p=i?a(e):s.width>0,d=i?a(o):r.width>0,c=(p?s.right:s.left)-t.left,l=t.right-(d?r.left:r.right),f=p&&d,u=f?Math.max(0,t.width-2*Math.max(c,l)):Math.max(0,t.width-c-l);return{maxWidth:u,position:f?t.width/2:c+u/2}}#d(){this.#t?.disconnect(),this.#t=null}#h(){return this.uiContainerRef.value}#v(){this.component.view&&(this.component.popupComponentEnabled||this.popupElement)&&(this.previousViewPopupEnabled??=this.component.view.popupEnabled,this.component.view.popupEnabled=!1)}#f(){this.component.view&&this.previousViewPopupEnabled!==void 0&&(this.component.view.popupEnabled=this.previousViewPopupEnabled,this.previousViewPopupEnabled=void 0)}async#b(t){if(this.#o(),!this.component.popupDisabled){this.#r++,this.#v();try{this.popupElement&&await this.openPopup({fetchFeatures:!0,location:{x:t.x,y:t.y}})}finally{this.#r--,this.#r||this.#f()}}}#g(t){this.#o(),!(!this.#l||!this.popupElement)&&queueMicrotask(()=>{let{focusRegion:e}=this.component.view;!t.defaultPrevented&&e&&this.openPopup({fetchFeatures:!0,location:e}).catch(()=>{})})}#w(t){let e=O(t.target,"arcgis-popup")[0];e?this.popupElement=e:this.popupElement!==this.#i&&(this.popupElement=void 0,this.#o())}#E(){return this.webGLError?S`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>`:null}render(){return H({direction:this.direction,popupComponentEnabled:this.component.popupComponentEnabled,slotGroupRefs:this.slotGroupRefs,handlePopupSlotChange:t=>this.#w(t),webGLErrorElement:this.#E(),popupElement:this.popupRef})}};function rt(n){G((t,e)=>{let o=()=>{if(n.attributionMode!=="auto")return;let i=L(n.el);n.view.attributionMode!==i&&(n.view.attributionMode=i)};e.onLifecycle(()=>(o(),x(n.el,["class"],o))),e.onUpdate(i=>{i.has("attributionMode")&&n.attributionMode==="auto"&&o()})})}var at=R((n,t)=>{let e=w();return t.onLifecycle(()=>v(()=>{let{map:o}=n;if(!o||o.destroyed)return[];let i=[];return o.loadError&&i.push(o),o.basemap?.loadError&&i.push(o.basemap),o.ground.loadError&&i.push(o.ground),[...o.allLayers,...o.allTables].forEach(s=>{s.loadError&&i.push(s)}),i},o=>{o.length&&(n.loadErrorSources=o,e.emit())})),e}),pt=R((n,t)=>{let e=w();return t.onLifecycle(()=>v(()=>n.view?.readyState,o=>{(o==="map-content-error"||o==="rendering-error")&&e.emit()})),e});return{a:V,b:rt,c:at,d:pt}},"applications/Components/featureUtils","applications/Components/reactiveUtils","core/reactiveUtils","geometry/Point","Graphic",a)
|