@arcgis/map-components 6.0.0-next.14 → 6.0.0-next.15
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/7JZU7XI4.js +2 -0
- package/dist/cdn/{UUBJR2VN.js → AI3ETXGZ.js} +1 -1
- package/dist/cdn/{UYWJU5UG.js → AT4PSRCX.js} +1 -1
- package/dist/cdn/C2YP473B.js +2 -0
- package/dist/cdn/H7QBBTTP.js +2 -0
- package/dist/cdn/{TUT6GS4A.js → LQNQSRG2.js} +1 -1
- package/dist/cdn/NU75HQA2.js +2 -0
- package/dist/cdn/{OVXGV76V.js → YAPPIXWJ.js} +1 -1
- package/dist/cdn/ZDLHDQCX.js +2 -0
- package/dist/cdn/ZIQRARXE.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +53 -50
- package/dist/components/arcgis-feature-table/customElement.d.ts +58 -39
- package/dist/components/arcgis-legend/customElement.d.ts +2 -0
- package/dist/components/arcgis-sketch/customElement.d.ts +1 -3
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +2 -4
- package/dist/components/arcgis-time-bar/customElement.js +108 -105
- package/dist/components/arcgis-time-bar-date/customElement.js +10 -10
- package/dist/components/arcgis-time-bar-extent/customElement.js +9 -9
- package/dist/components/arcgis-time-bar-slider/customElement.js +27 -33
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +4 -3
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +61 -68
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +26 -3
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +53 -50
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +1 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/types/lumina.d.ts +2 -1
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/react.d.ts +2 -1
- package/dist/types/stencil.d.ts +2 -1
- package/package.json +6 -6
- package/dist/cdn/EYM377YG.js +0 -2
- package/dist/cdn/GLU2HDV6.js +0 -2
- package/dist/cdn/PTCHEZNA.js +0 -2
- package/dist/cdn/TI6R2CP6.js +0 -2
- package/dist/cdn/UOO6QY7C.js +0 -2
- package/dist/cdn/WADL7TT6.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as M,c as V}from"./JR3EXG25.js";import{c as L}from"./Y6WTYXVP.js";import a from"./F4AJCUZ6.js";import{b as A,c as w,f as D}from"./GIBXI44G.js";import{b as R,d as O}from"./LXME6MU5.js";import{D as b,P as S,b as y,x as f,z as C}from"./7IGSTLKW.js";export default $arcgis.t(([{initializeProjection:T},{signal:j},{watch:u,when:q},H,U,{b:F,c:G}])=>{async function*K(n,t){for(let e of n){let o=await b(e,t).catch(()=>{});if(t.aborted)return;yield*Array.isArray(o)?o.filter(i=>i instanceof U):[]}}async function*k(){yield*[]}async function*N(n,t){await b(n,t).catch(()=>{})}async function $(n,t,e,o){let i;if(e instanceof H?(await T(e.spatialReference,n.spatialReference),F(o.signal),i=n.toScreen(e)):i=e,!i)return k();let p=Promise.withResolvers(),a=n.fetchPopupFeatures(i,{...o,defaultPopupTemplateEnabled:t.defaultPopupTemplateEnabled,hitTestResolver:p})??k();return await p.promise,a}function E(n,t){if(t instanceof H)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 z(n,t,e,o){let i={};return{diagnostics:i,featureStream:await $(n,t,e,{diagnostics:i,signal:o}),location:E(n,e)}}var x=class extends C{constructor(t){super(t),this.direction=D(),this.popupRef=S(),this._popupElement=j(void 0),this._popupAbortController=null,this._popupClickOpenCount=0,this.slotGroupRefs=M(),this.attributionHeight=0,this._uiContainer=null,this.component.listenOn(globalThis,"unhandledrejection",e=>{let o=e.reason;if(o?.name==="webgl:required"){let{name:i}=o;this.webGLError={name:i}}})}get _focusRegionSelectionSupported(){return!this.component.popupDisabled&&(this.component.popupComponentEnabled||!!this.popupElement&&this.popupElement!==this._defaultPopupElement)}get popupElement(){return this._popupElement.value}set popupElement(t){this._popupElement.value=t}hostLifecycle(){let{view:t}=this.component,e=t.focusRegionShortcutEnabled;return[u(()=>this.component.focusRegionShortcutEnabled??this._focusRegionSelectionSupported,o=>{this.component.view.focusRegionShortcutEnabled=o},{initial:!0,sync:!0}),q(()=>this.component.view.ready,()=>{this._assignDefaultPopup()}),u(()=>this.component.view.popup?.visible,(o,i)=>{(o||i)&&this._cancelPopupOperation(),o&&this.popupElement?.open&&(this.popupElement.open=!1)},{initial:!0}),u(()=>this.component.popupElement?.open,(o,i)=>{i&&!o&&this._cancelPopupOperation()},{initial:!0,sync:!0}),this.component.view.on("focus-region-select",o=>this._handleFocusRegionSelect(o)),this.component.view.on("click",[],o=>{let i=o.native;o.button!==0||i?.ctrlKey||i?.metaKey||this._handleOpenPopup(o).catch(()=>{})},-2),{remove:()=>{t.focusRegionShortcutEnabled=e}}]}hostUpdated(){this.component.popupComponentEnabled?this._assignDefaultPopup():(this.popupElement===this._defaultPopupElement&&(this._cancelPopupOperation(),this._maybeResetViewPopup(),this.popupElement=void 0),this._defaultPopupElement=void 0)}hostDestroy(){this._cancelPopupOperation()}async openPopup(t={}){this._assignDefaultPopup();let e=this.popupElement,o=t.location??e?.location,i=!!e&&!t.featureStream&&!t.promises?.length&&!!t.fetchFeatures&&!!o;this._cancelPopupOperation();let p=new AbortController;if(this._popupAbortController=p,e){let{fetchFeatures:a,shouldFocus:h,title:l,featureStream:g,promises:_,location:c,...v}=t,m=c?E(this.component.view,c):void 0,P=c??o,s=i&&P?z(this.component.view,e,P,p.signal):null,d=s?Promise.withResolvers():null;s&&d&&(s.catch(()=>{}),e.featureStream=N(d.promise,p.signal));try{await e.componentOnReady()}catch(r){throw s&&this._isCurrentPopupOperation(p)&&(p.abort(),e.open=!1,await e.clear()),r}if(!this._isCurrentPopupOperation(p))return;if(s)try{let r=await s;if(!this._isCurrentPopupOperation(p))return;Object.assign(e,v),l!==void 0&&(e.heading=l),await e.openFeatureStream(r)}catch(r){if(!G(r))throw this._isCurrentPopupOperation(p)&&(e.open=!1,await e.clear()),r;return}finally{d?.resolve()}else Object.assign(e,v),l!==void 0&&(e.heading=l),g?await e.openFeatureStream({featureStream:g,location:m}):_?.length?await e.openFeatureStream({featureStream:K(_,p.signal),location:m}):(e.featureStream=null,c!==void 0&&(e.location=m),e.open=!0);h&&this._isCurrentPopupOperation(p)&&await e.setFocus()}else{let{location:a,...h}=t;await this.component.view.openPopup({...h,location:a?E(this.component.view,a):void 0})}}closePopup(){this._cancelPopupOperation(),this.popupElement?(this.popupElement.open=!1,this.popupElement.clear()):this.component.view.closePopup()}_cancelPopupOperation(){this._popupAbortController?.abort(),this._popupAbortController=null}_isCurrentPopupOperation(t){return this._popupAbortController===t&&!t.signal.aborted}_assignDefaultPopup(){this.component.popupComponentEnabled&&this.popupRef.value&&!this.popupElement&&(this._defaultPopupElement=this.popupRef.value,this.popupElement=this.popupRef.value,this.popupElement.referenceElement=this.component.el,this.popupElement.view=this.component.view)}handleAttributionHeightChange(t){if(!(this.attributionHeight===t||!this.component.el.shadowRoot)){if(this.attributionHeight=t,!this._uiContainer){let e=this.component.el.shadowRoot.querySelector(".arcgis-map-container-ui");this._uiContainer=e}this._uiContainer?.style.setProperty("--arcgis-internal-attribution-space-top",`${this.attributionHeight}px`)}}_maybeDisableViewPopup(){this.component.view&&(this.component.popupComponentEnabled||this.popupElement)&&(this.previousViewPopupEnabled??=this.component.view.popupEnabled,this.component.view.popupEnabled=!1)}_maybeResetViewPopup(){this.component.view&&this.previousViewPopupEnabled!==void 0&&(this.component.view.popupEnabled=this.previousViewPopupEnabled,this.previousViewPopupEnabled=void 0)}async _handleOpenPopup(t){if(this._assignDefaultPopup(),!this.component.popupDisabled){this._popupClickOpenCount++,this._maybeDisableViewPopup();try{this.popupElement&&await this.openPopup({fetchFeatures:!0,location:{x:t.x,y:t.y}})}finally{this._popupClickOpenCount--,this._popupClickOpenCount||this._maybeResetViewPopup()}}}_handleFocusRegionSelect(t){this._assignDefaultPopup(),!(!this._focusRegionSelectionSupported||!this.popupElement)&&queueMicrotask(()=>{let{focusRegion:e}=this.component.view;!t.defaultPrevented&&e&&this.openPopup({fetchFeatures:!0,location:e}).catch(()=>{})})}_handlePopupSlotChange(t){let e=L(t.target,"arcgis-popup")[0];e?this.popupElement=e:this.popupElement!==this._defaultPopupElement&&(this.popupElement=void 0,this._assignDefaultPopup())}_webGLErrorAlert(){return this.webGLError?y`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>`:null}render(){return V({direction:this.direction,popupComponentEnabled:this.component.popupComponentEnabled,slotGroupRefs:this.slotGroupRefs,handlePopupSlotChange:t=>this._handlePopupSlotChange(t),webGLErrorElement:this._webGLErrorAlert(),popupElement:this.popupRef})}};function se(n){A((t,e)=>{let o=()=>{if(n.attributionMode!=="auto")return;let i=O(n.el);n.view.attributionMode!==i&&(n.view.attributionMode=i)};e.onLifecycle(()=>(o(),R(n.el,["class"],o))),e.onUpdate(i=>{i.has("attributionMode")&&n.attributionMode==="auto"&&o()})})}var re=w((n,t)=>{let e=f();return t.onLifecycle(()=>u(()=>{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(p=>{p.loadError&&i.push(p)}),i},o=>{o.length&&(n.loadErrorSources=o,e.emit())})),e}),ae=w((n,t)=>{let e=f();return t.onLifecycle(()=>u(()=>n.view?.readyState,o=>{(o==="map-content-error"||o==="rendering-error")&&e.emit()})),e});return{a:x,b:se,c:re,d:ae}},"applications/Components/featureUtils","applications/Components/reactiveUtils","core/reactiveUtils","geometry/Point","Graphic",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{R as c,T as
|
|
2
|
+
import{R as c,T as i,_ as d,a as l,b as a}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";var m=l`:host{block-size:auto;display:inline-grid;inline-size:max-content}.align-center{justify-items:center}.align-end{justify-items:end}.align-start{justify-items:start}.date{font-weight:var(--calcite-font-weight-bold)}.disabled{opacity:var(--calcite-opacity-disabled)}.table-date,.table-date-time{align-content:center;align-items:center;display:grid;grid-template-columns:1fr}.table-date{grid-template-rows:var(--calcite-font-size-sm)}.table-date-time{grid-template-rows:var(--calcite-font-size-sm) var(--calcite-font-size-sm)}.time{font-weight:var(--calcite-font-weight-normal)}`,s=class extends c{constructor(){super(...arguments),this.align="center",this.autoDestroyDisabled=!1}static{this.properties={align:1,autoDestroyDisabled:5,date:0,viewModel:0}}static{this.styles=m}async destroy(){await this.manager.destroy()}render(){let{align:r,date:e,viewModel:t}=this;if(!t||!e)return null;let{interactive:o}=t,n=!o;switch(t.format){case"date":return a`<div class=${i({"table-date":!0,[`align-${r}`]:!0,disabled:n})}><span class="date">${t.formatDate(e)}</span></div>`;case"date-time":return a`<div class=${i({"table-date-time":!0,[`align-${r}`]:!0,disabled:n})}><span class="date">${t.formatDate(e)}</span><span class="time">${t.formatTime(e)}</span></div>`}}};d("arcgis-time-bar-date",s);export{s as ArcgisTimeBarDate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import f from"./
|
|
2
|
+
import f from"./7JZU7XI4.js";import{a as _}from"./JR3EXG25.js";import{a as w}from"./AL3PLZEE.js";import{a as V}from"./OFBCNFBW.js";import"./Y6WTYXVP.js";import e from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import d from"./TWPVYHJG.js";import c from"./KRJCOTGC.js";import"./GIBXI44G.js";import"./RQT2PVDJ.js";import b from"./SBYVR52H.js";import"./LXME6MU5.js";import{P as o,Q as n,R as m,T as h,_ as p,b as a,x as r}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([D,{watch:s},M,I,k,{c:u,d:g,e:d,f:y,g:f,h:b},{c:c,e:v},t,,{a:C,b:E,c:R,d:P}])=>{var F=c(k,{}),L=c(I,{}),l=class extends m{constructor(){super(),this._attributionMode=null,this._containerRef=o(),this._mapRef=o(),this._uiController=new C(this),this._cameraProperties={},this.arcgisLoadError=R(this),this.arcgisViewReadyError=P(this),this._map=F(this),this.view=L(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.autoDestroyDisabled=!1,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.clippingArea=this.view.clippingArea,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.environment=this.view.environment,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.groundView=this.view.groundView,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.options=this.view.options,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.qualityProfile=this.view.qualityProfile,this.ready=this.view.ready,this.selectionManager=this.view.selectionManager,this.focusRegionVisible=this.view.focusRegionVisible,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.viewingMode=this.view.viewingMode,this.arcgisViewAnalysisViewCreate=t(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=t(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=t(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=t(()=>this.view,"click"),this.arcgisViewDoubleClick=t(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=t(()=>this.view,"double-tap-drag"),this.arcgisViewFocusRegionSelect=t(()=>this.view,"focus-region-select"),this.arcgisViewDrag=t(()=>this.view,"drag"),this.arcgisViewHold=t(()=>this.view,"hold"),this.arcgisViewImmediateClick=t(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=t(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=t(()=>this.view,"key-down"),this.arcgisViewKeyUp=t(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=t(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=t(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=t(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=t(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=t(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=t(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=t(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=t(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=t(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=t(()=>this.view,"vertical-two-finger-drag"),E(this),this.view.ui={components:[]}}static{this.properties={_map:16,aria:0,view:32,allLayerViews:32,alphaCompositingEnabled:5,analyses:0,animationsDisabled:5,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,basemap:1,basemapView:0,camera:0,cameraFov:9,cameraHeading:9,cameraPosition:1,cameraTilt:9,canZoomIn:36,canZoomOut:36,center:1,clippingArea:0,constraints:0,displayFilterDisabled:5,environment:0,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,groundView:32,hideAttribution:5,highlights:0,interacting:32,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,options:0,padding:0,performanceInfo:32,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,qualityProfile:1,ready:36,resolution:32,selectionManager:32,focusRegionVisible:5,focusRegionShortcutEnabled:5,focusRegion:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:32,viewingMode:1,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[V,_]}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get aria(){return this.view?.aria??null}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(i){this._attributionMode=i,i!=="auto"&&(this.view.attributionMode=i)}get camera(){return this.view.camera}set camera(i){u(this.camera,i)||(this.view.camera=i)}get cameraFov(){let{view:i}=this;return i.ready?this.view.camera?.fov:this._cameraProperties.fov}set cameraFov(i){i!=null&&this._mutateCamera(e=>{e.fov=i})}get cameraHeading(){let{view:i}=this;return i.ready?i.camera?.heading:this._cameraProperties.heading}set cameraHeading(i){i!=null&&this._mutateCamera(e=>{e.heading=i})}get cameraPosition(){let{view:i}=this;if(i.ready)return i.camera?.position;let{position:e}=this._cameraProperties;return e?new M(e):void 0}set cameraPosition(i){let e=b(this.view.camera?.position,i);e&&this._mutateCamera(A=>{A.position=e})}get cameraTilt(){let{view:i}=this;return i.ready?i.camera?.tilt:this._cameraProperties.tilt}set cameraTilt(i){i!=null&&this._mutateCamera(e=>{e.tilt=i})}get center(){return this.view.center}set center(i){if(d(i,this._center))return;this._center=y(i);let e=f(i,this.view);e&&(this.view.center=e)}get extent(){return this.view.extent}set extent(i){i&&!this.extent.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){v(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get performanceInfo(){return this.view.performanceInfo}get popupElement(){return this._uiController.popupElement||null}get resolution(){return this.view.resolution}get focusRegion(){return this.view.focusRegion}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get stationary(){return this.view.stationary}get updating(){return this.view.updating}get viewpoint(){return this.view.viewpoint}set viewpoint(i){g(this.viewpoint,i)&&(this.view.viewpoint=i)}get visibleArea(){return this.view.visibleArea}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(i,e){return this.view.fetchPopupFeatures(i,e)}async goTo(i,e){return await this.view.goTo(i,e)}async hitTest(i,e){return await this.view.hitTest(i,e)}async openPopup(i){await this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i,e){return this.view.toMap(i,e)}toScreen(i){return this.view.toScreen(i)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,e){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(e)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,e=>{e&&(this._map=e)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,e=>{e&&(this.camera=this.view.camera.clone().set(this._cameraProperties),this._cameraProperties={}),this.arcgisViewReadyChange.emit()},{initial:this.view.ready}),s(()=>this.view.attributionHeight,e=>{this._uiController.handleAttributionHeightChange(e)},{initial:!0})])}_mutateCamera(i){if(!this.view.ready){i(this._cameraProperties);return}let e=this.view.camera?.clone()??new D;i(e),this.camera=e}renderMain(){return a`<div class=${h(w.base)} ${n(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(w.containerUI)} ${n(this._containerRef)}>${this._uiController.render()}</section>`}};p("arcgis-scene",l);return l},"Camera","core/reactiveUtils","geometry/Point","views/SceneView","WebScene",b,c,d,e,f)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import c from"./BSTT6ICQ.js";import b from"./HU57LQOA.js";import a from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import{a as v}from"./7465ANAR.js";import{h as y}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import"./LXME6MU5.js";import{Q as h,R as m,_ as f,a as p,b as r,x as l}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([o,{watch:k},{substitute:$},T,{a:u},{d:w,h:b},d])=>{var _=p`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}.subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}.results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,g=class extends m{constructor(){super(...arguments),this._messages=v({blocking:!0}),this.#o=!0,this.#l=new Map,this.#e=new o,this.#i=new o,this.#a=new o,this.#t=null,this.#r=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.includeDefaultActionsDisabled=!1,this.mode="default",this.arcgisPropertyChange=y()("mode","selectedNamedTraceConfiguration","selectedUtilityNetwork","traceLocations"),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisTriggerAction=l()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,actions:0,beforeMapInteraction:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,includeDefaultActionsDisabled:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,messageOverrides:0,referenceElement:1,mode:3,traceLocationDetails:32,traceLocations:32}}static{this.styles=_}#o;get#v(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#n;#l;#e;#i;#a;#t;#s;#u;#g;#p;#r;get#m(){return!this.isSubnetworkNameTraceSelected}get#f(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#k(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationDetails(){return new o([...this.#e,...this.#i,...this.#a])}get traceLocations(){let t=[];return this.#m&&this.#e.forEach(e=>t.push(...this.#d(e))),this.#f&&this.#a.forEach(e=>t.push(...this.#d(e))),this.#i.forEach(e=>t.push(...this.#d(e))),t}async destroy(){this.#w(),d.getSketchViewModel(this.view)?.cancel(),d.removeSketchGraphicsLayer(this.view);let t=await Promise.allSettled([this.#s?.destroy(),this.#u?.destroy(),this.#g?.destroy(),this.#p?.destroy()]);for(let e of t)e.status==="rejected"&&u(e.reason,this,"Error while destroying trace inputs");await this.manager.destroy()}load(){this.#y(),this.manager.onLifecycle(()=>[k(()=>this.view?.map,()=>this.#y())])}willUpdate(t){t.has("selectedUtilityNetwork")&&this.#S()}disconnectedCallback(){super.disconnectedCallback(),this.#l.clear()}#$(t){t.stopPropagation(),this.arcgisTriggerAction.emit(t.detail)}#T({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#y(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}}#_(t){t&&(this.#u=t)}#N(t){t&&(this.#g=t)}#L(t){t&&(this.#p=t)}#C(t){t&&(this.#s=t)}#d(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new T({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#w(){let{view:t}=this;this.#e.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#e.removeAll(),this.#i.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#i.removeAll(),this.#a.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#a.removeAll()}async#S(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){u(e,this,"Error while loading the selected utility network")}this.#D(),this.#P(),this.#w()}#D(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[]}#P(){let{selectedUtilityNetwork:t}=this;this.#n=new o(this.#v.filter(e=>t?.isUtilityLayer(e)&&!this.#k.includes(e.layerId)))}#F(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#A(t){if(t==null)return;let e=this.#l,i=this.#n,a=e.get(t);if(a)return a;if(!i)return;let s=i.find(c=>"layerId"in c&&c.layerId===t);return s&&e.set(t,s),s}async#E(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await w(t,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this.#o)){let c=s.layer;s.popupTemplate=c.createPopupTemplate()}}),a}async#U(t){let e=new Map,i=[];return t.forEach(a=>{let s=b(a.layer)?a.layer.parent:a.layer;if(s){let c=this.#A(s.layerId);if(c){let n=e.get(c)||[];n.push(a),e.set(c,n)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let s=e.get(a)??[],c=await this.#E(a,s);i.push(...c)})),i}async#I(t){return this._exceedDisplayLimit=t.length>this.#r,this._candidateFeatures=await this.#U(t.slice(0,this.#r)),this._candidateFeatures.length===0?(this.#c(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#t?.reject(),this.#t=Promise.withResolvers(),await this.#t.promise)}#x(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#c()}#c(t){t?.stopPropagation(),this.#s?.clear(),this.#b(),(this.view?d.getSketchViewModel(this.view):null)?.cancel()}#b(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#t?.reject(),this.#t=null}#M(){let t=this.#t,e=this.#s,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#t=null}}#O(t,e=!1,i){return r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#B(){let{_namedTraceConfigurations:t,selectedUtilityNetwork:e}=this;return r`<arcgis-utility-network-trace-configuration-picker .messageOverrides=${this.messageOverrides} .traceConfigurations=${t} .utilityNetwork=${e} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="selectedNamedTraceConfiguration"&&(this.selectedNamedTraceConfiguration=i.target.selectedNamedTraceConfiguration),i.detail.name==="traceConfiguration"&&(this._traceConfiguration=i.target.traceConfiguration)}}></arcgis-utility-network-trace-configuration-picker>`}#G(){let{selectedUtilityNetwork:t,view:e}=this;return r`<arcgis-utility-network-picker .messageOverrides=${this.messageOverrides} .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#j(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#O(t,!1,"exclamation-mark-triangle"):i=this.#R(),r`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#V(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#c(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#z(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,s=e.length===1?"feature":"list";return r`<arcgis-features-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#o} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .initialDisplayMode=${s} .messageOverrides=${this.messageOverrides} @arcgisClose=${()=>this.#b()} @arcgisPropertyChange=${this.#T} @arcgisTriggerAction=${this.#$} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#C)}></arcgis-features-next>`}#q(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,s=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,c=$(e.warnings.exceededDisplayLimit,{limit:this.#r.toString()}),n=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${c}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#c()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#M()} .disabled=${n}>${e.buttons.add}</calcite-button>`||""}`}#h(t,e,i){return r`<arcgis-utility-network-trace-locations .messageOverrides=${this.messageOverrides} .view=${this.view} .traceLocationType=${t} .beforeMapInteraction=${this.beforeMapInteraction} @arcgisTraceLocationSelectStart=${this.#F} @arcgisTraceLocationSelectEnd=${this.#x} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#n} .traceLocations=${e} .afterMapInteraction=${this.#I.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`}#R(){let{_messages:t}=this,e=this.#G(),i=this.#B(),a=this._namedTraceConfigurations.length&&this.traceConfiguration?r`${this.#m?this.#h("starting-point",this.#e,this.#_):null}${this.#f?this.#h("stopping-point",this.#a,this.#L):null}${this.#h("barrier",this.#i,this.#N)}`:null,s=this.selectedUtilityNetwork?.loaded?r`${i}${a}`:null;return r`<calcite-block-group .label=${t.labels.traceInputs}>${e}${s}</calcite-block-group>`}render(){let{mode:t}=this;return r`<calcite-panel>${t==="add-spatial-feature"?this.#z():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#j()}${this.#V()}</calcite-flow>${t!=="default"?this.#q():null}</calcite-panel>`}};f("arcgis-utility-network-trace-inputs",g);return g},"core/Collection","core/reactiveUtils","intl","rest/networks/support/TraceLocation",a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import f from"./3VB6M2GX.js";import{c as et}from"./Y6WTYXVP.js";import{a as K,b as Q,k as tt}from"./IM6IDWYR.js";import e from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import d from"./OISNNHIG.js";import{a as G}from"./7465ANAR.js";import c from"./KRJCOTGC.js";import b from"./U7WRQCRV.js";import{f as L,h as H}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import a from"./SBYVR52H.js";import"./LXME6MU5.js";import{P as q,Q as M,R as B,_ as V,a as I,b as p,f as y,p as W,x as j}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([pt,f,dt,vt,{convertDateFormatToIntlOptions:E},gt,{getTimeSliderSettingsFromWebDocument:ft},{property:l,subclass:yt},{watch:g,whenOnce:lt},,,,J,{c:U,e:X,h:Y},{a:it,b:st,c:D,d:k,e:at,f:nt,g:ot,h:P,i:rt}])=>{var ct=new WeakMap,mt=new WeakMap;function wt(t){let{locale:e,formatOptions:a}=t,o=_t(a),c=new Intl.DateTimeFormat(e,o);return ct.set(t,c),c}function xt(t){let{locale:e,formatOptions:a}=t,o=new Intl.NumberFormat(e,a);return mt.set(t,o),o}function bt(t){return ct.get(t)??wt(t)}function Et(t){return mt.get(t)??xt(t)}function _t(t){return t.timeZone?{...t,timeZone:tt(t.timeZone)}:t}var i=(t,e)=>({tick:t,tickFormat:e}),s={sf:{second:"numeric",fractionalSecondDigits:3},s:{second:"numeric"},ms:{minute:"numeric",second:"numeric"},mi:{minute:"numeric"},hm:{hour:"numeric",minute:"numeric"},dm:{day:"numeric",month:"short"},m:{month:"short"},my:{month:"short",year:"numeric"},y:{year:"numeric"}},Tt=[i({value:10,unit:"milliseconds"},s.sf),i({value:20,unit:"milliseconds"},s.sf),i({value:50,unit:"milliseconds"},s.sf),i({value:100,unit:"milliseconds"},s.sf),i({value:200,unit:"milliseconds"},s.sf),i({value:500,unit:"milliseconds"},s.sf),i({value:1,unit:"seconds"},s.s),i({value:2,unit:"seconds"},s.s),i({value:5,unit:"seconds"},s.s),i({value:10,unit:"seconds"},s.s),i({value:20,unit:"seconds"},s.ms),i({value:30,unit:"seconds"},s.ms),i({value:1,unit:"minutes"},s.mi),i({value:2,unit:"minutes"},s.mi),i({value:5,unit:"minutes"},s.mi),i({value:10,unit:"minutes"},s.mi),i({value:30,unit:"minutes"},s.hm),i({value:1,unit:"hours"},s.hm),i({value:2,unit:"hours"},s.hm),i({value:4,unit:"hours"},s.hm),i({value:8,unit:"hours"},s.hm),i({value:1,unit:"days"},s.dm),i({value:1,unit:"days"},s.dm),i({value:2,unit:"days"},s.dm),i({value:4,unit:"days"},s.dm),i({value:10,unit:"days"},s.dm),i({value:15,unit:"days"},s.dm),i({value:20,unit:"days"},s.dm),i({value:1,unit:"months"},s.m),i({value:3,unit:"months"},s.m),i({value:6,unit:"months"},s.my),i({value:1,unit:"years"},s.y),i({value:2,unit:"years"},s.y),i({value:4,unit:"years"},s.y),i({value:10,unit:"years"},s.y),i({value:20,unit:"years"},s.y),i({value:50,unit:"years"},s.y),i({value:100,unit:"years"},s.y),i({value:200,unit:"years"},s.y),i({value:500,unit:"years"},s.y),i({value:10,unit:"centuries"},s.y),i({value:20,unit:"centuries"},s.y),i({value:50,unit:"centuries"},s.y),i({value:100,unit:"centuries"},s.y),i({value:200,unit:"centuries"},s.y),i({value:500,unit:"centuries"},s.y),i({value:1e3,unit:"centuries"},s.y),i({value:2e3,unit:"centuries"},s.y),i({value:5e3,unit:"centuries"},s.y),i({value:1e4,unit:"centuries"},s.y),i({value:2e4,unit:"centuries"},s.y)];function St(t){return Tt.map(({tick:e,tickFormat:a})=>{let o=new gt(e),c=o.toMilliseconds(),m={...a,timeZone:t};return{duration:c,format:m,timeInterval:o}})}var $t=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,ht=t=>{throw TypeError(t)},r=(t,e,a,o)=>{for(var c=o>1?void 0:o?Mt(e,a):e,m=t.length-1,d;m>=0;m--)(d=t[m])&&(c=(o?d(e,a,c):d(c))||c);return o&&c&&$t(e,a,c),c},N=(t,e,a)=>e.has(t)||ht("Cannot "+a),_=(t,e,a)=>(N(t,e,"read from private field"),a?a.call(t):e.get(t)),Z=(t,e,a)=>e.has(t)?ht("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),Dt=(t,e,a,o)=>(N(t,e,"write to private field"),e.set(t,a),a),u=(t,e,a)=>(N(t,e,"access private method"),a),w,T,h,F,O,A,R,x,S,C,n=class extends pt{constructor(){super(...arguments),Z(this,h),Z(this,w,new AbortController),Z(this,T,!1),this.disabled=!1,this.format="date",this.loadPersistedSettingsDisabled=!1,this.loop=!1,this.mode="time-window",this.reverseAnimation=!1,this.savePersistedSettingsDisabled=!1,this.stops=it}get _adjustedTickFormat(){let{era:t,timeZone:e}=this;return{...this.tickFormat?.format,era:this.tickFormat?.format.year?t:void 0,timeZone:e}}get _dateFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),era:t,timeZone:e}}get _dateTimeFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),...E("long-time"),era:t,timeZone:e}}get _thumbPositions(){if(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty)return null;let{start:t,end:e}=this.timeExtent;switch(this.mode){case"cumulative-from-end":case"instant":return t?[t.getTime()]:null;case"cumulative-from-start":return e?[e.getTime()]:null;case"time-window":return t&&e?[t.getTime(),e.getTime()]:null}}get _thumbStopIndices(){let{_thumbPositions:t,effectiveStopsEpoch:e}=this;return!t||!e?null:t.map(a=>{let o=e.indexOf(a);if(o!==-1)return o;let c=e.reduce((m,d)=>Math.abs(d-a)<Math.abs(m-a)?d:m);return e.indexOf(c)})}get _timeFormat(){let{timeZone:t}=this;return{...E("long-time"),timeZone:t}}get canPrevious(){return this._thumbStopIndices?.map(t=>--t).every(t=>u(this,h,A).call(this,t))??!1}get canNext(){return this._thumbStopIndices?.map(t=>++t).every(t=>u(this,h,A).call(this,t))??!1}get effectiveStops(){let{fullTimeExtent:t,stops:e}=this;if(!e)return;if(k(e)){let{dates:o}=e;if(!o?.length)return;let c=o.sort(($,b)=>$.getTime()-b.getTime());if(!t?.start||!t?.end)return c;let{start:m,end:d}=t,v=m.getTime(),ut=d.getTime();return c.filter($=>{let b=$.getTime();return b>=v&&b<=ut})}let a=e.timeExtent??t;if(a)return D(e)?nt(a,e.count):ot(a,e.interval)}get effectiveStopsEpoch(){return this.effectiveStops?.map(t=>t.getTime())}get era(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0?"short":void 0}get interactive(){return!(this.disabled||this.state==="disabled"||this.timeZone===Q)}get isOutOfRange(){let{timeExtent:t,fullTimeExtent:e}=this,{start:a,end:o}=e??{};if(!a||!o||!t||t.isAllTime||t.isEmpty)return!0;let{start:c,end:m}=t??{},d=c!=null&&(c<a||c>o),v=m!=null&&(m>o||m<a);return d||v}set playRate(t){t<=0||t>1e3*60*60||(this.state==="playing"&&u(this,h,R).call(this),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}get tickFormatter(){return t=>this._formatDate(t,this._adjustedTickFormat)}get tickFormats(){return St(this.timeZone)}get tickValues(){let{fullTimeExtent:t,tickFormat:e,timeZone:a}=this;if(!t||!e)return[];let{start:o,end:c}=t;return!o||!c?[]:rt(o,c,e.timeInterval,a).map(m=>m.getTime())}get timeZone(){return this._userTimeZone??this.viewTimeZone??K}set timeZone(t){this._userTimeZone=t??void 0}get viewTimeZone(){return this.view?.timeZone}destroy(){_(this,w).abort(),this.view?.unregisterComponent(this),u(this,h,S).call(this)}formatDate(t){return this._formatDate(t,this._dateFormat)}formatDateTime(t){return this._formatDate(t,this._dateTimeFormat)}formatNumber(t,e){return this._formatNumber(t,e)}formatTime(t){return this._formatDate(t,this._timeFormat)}async initialize(){this.addHandles([g(()=>this.effectiveStops,t=>{t&&(this.timeExtent??=P(t,this.mode))},{initial:!0}),g(()=>this.timeExtent,t=>{!this.view||(!t||t.isAllTime)&&(!this.view.timeExtent||this.view.timeExtent.isAllTime)||this.view.timeExtent&&t?.equals(this.view.timeExtent)||(this.view.timeExtent=t)},{initial:!0}),g(()=>this.view,t=>{t?.timeExtent&&(this.timeExtent=t.timeExtent)}),g(()=>this.view,(t,e)=>{e?.unregisterComponent(this),t?.registerComponent(this)},{initial:!0,sync:!0}),g(()=>this.view?.timeExtent,t=>{if(this.view){if(!_(this,T)){Dt(this,T,!0);return}(!t||t.isAllTime)&&(!this.timeExtent||this.timeExtent.isAllTime)||t&&this.timeExtent&&t.equals(this.timeExtent)||(this.timeExtent=t??void 0)}}),g(()=>this.mode,t=>{if(!(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||!this.fullTimeExtent?.start||!this.fullTimeExtent.end))switch(t){case"time-window":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-start":this.timeExtent=new f({start:null,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-end":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:null});break;case"instant":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.start??this.timeExtent.end});break}})]),await X((async()=>{if(await lt(()=>this.view?.ready,{signal:_(this,w).signal}),this.loadPersistedSettingsDisabled)return;let t=await ft(this.view?.map,_(this,w).signal);t&&(this.fullTimeExtent=t.fullTimeExtent??void 0,this.loop=t.loop,this.mode=t.mode,this.playRate=t.playRate,this.stops=t.stops??void 0,this.timeExtent=t.timeExtent??void 0)})())}next(){u(this,h,x).call(this,{forward:!0,allowRestart:!1})}play(){u(this,h,R).call(this)}previous(){u(this,h,x).call(this,{forward:!1,allowRestart:!1})}stop(){u(this,h,S).call(this)}updateWebDocument(t){if(this.savePersistedSettingsDisabled)return;let e=new dt({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:D(this.stops)?this.stops.count:null,numThumbs:this.mode==="time-window"?2:1,stopDelay:this.playRate,stopInterval:at(this.stops)?this.stops.interval:null,stops:k(this.stops)?this.stops.dates:null});t.widgets??=new vt,t.widgets.timeSlider=e}_formatDate(t,e){return bt({locale:this.locale,formatOptions:e}).format(t)}_formatNumber(t,e){return Et({locale:this.locale,formatOptions:e}).format(t)}};w=new WeakMap;T=new WeakMap;h=new WeakSet;F=async function(){try{let{view:t}=this,e=this._animationController?.signal;await Promise.all([Y(this.playRate,e),t&<(()=>!t.updating,e)])}catch(t){U(t)||W("error","arcgis-slider-time","animation error",{detail:{error:t}}),this._animationController=void 0;return}u(this,h,x).call(this,{forward:!this.reverseAnimation,allowRestart:!1}),this._animationController&&u(this,h,F).call(this)};O=function(t){return t?this.canNext:this.canPrevious};A=function(t){return t>=0&&t<(this.effectiveStopsEpoch?.length??0)};R=function(){u(this,h,S).call(this),this._animationController=new AbortController,u(this,h,x).call(this,{forward:!this.reverseAnimation,allowRestart:!0}),u(this,h,F).call(this)};x=function({forward:t,allowRestart:e}){let{_thumbStopIndices:a,effectiveStopsEpoch:o}=this;if(!(!a||!o))if(u(this,h,O).call(this,t)){let c=a.map(m=>m+(t?1:-1)).map(m=>o[m]);this.timeExtent=u(this,h,C).call(this,c),!this.loop&&!u(this,h,O).call(this,t)&&this.stop()}else if(this.loop||e){let c=Math.min(...a),m=Math.max(...a),d=(t?a.map(v=>v-c):a.map(v=>v+(o.length-1-m))).map(v=>o[v]);this.timeExtent=u(this,h,C).call(this,d)}else this.stop()};S=function(){this._animationController?.abort(),this._animationController=void 0};C=function(t){if(!t)return;let e=[...t].sort((a,o)=>a-o).map(a=>new Date(a));return P(e,this.mode)};r([l()],n.prototype,"_adjustedTickFormat",1);r([l()],n.prototype,"_animationController",2);r([l()],n.prototype,"_dateFormat",1);r([l()],n.prototype,"_dateTimeFormat",1);r([l()],n.prototype,"_thumbPositions",1);r([l()],n.prototype,"_thumbStopIndices",1);r([l()],n.prototype,"_timeFormat",1);r([l()],n.prototype,"_userTimeZone",2);r([l()],n.prototype,"canPrevious",1);r([l()],n.prototype,"canNext",1);r([l()],n.prototype,"disabled",2);r([l()],n.prototype,"effectiveStops",1);r([l()],n.prototype,"effectiveStopsEpoch",1);r([l()],n.prototype,"era",1);r([l()],n.prototype,"format",2);r([l({type:f})],n.prototype,"fullTimeExtent",2);r([l()],n.prototype,"interactive",1);r([l()],n.prototype,"isOutOfRange",1);r([l()],n.prototype,"loadPersistedSettingsDisabled",2);r([l()],n.prototype,"locale",2);r([l()],n.prototype,"loop",2);r([l()],n.prototype,"mode",2);r([l({value:1e3})],n.prototype,"playRate",1);r([l()],n.prototype,"reverseAnimation",2);r([l()],n.prototype,"savePersistedSettingsDisabled",2);r([l()],n.prototype,"state",1);r([l({cast:st})],n.prototype,"stops",2);r([l()],n.prototype,"tickFormat",2);r([l()],n.prototype,"tickFormatter",1);r([l()],n.prototype,"tickFormats",1);r([l()],n.prototype,"tickValues",1);r([l({type:f})],n.prototype,"timeExtent",2);r([l()],n.prototype,"timeZone",1);r([l()],n.prototype,"view",2);r([l()],n.prototype,"viewTimeZone",1);n=r([yt("components.time-bar.TimeBarViewModel")],n);var kt=I`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight);transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out}:host([floating]) .action-bar{--calcite-action-bar-shadow: var(--arcgis-internal-box-shadow)}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-spacing-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.action-bar{--calcite-action-bar-shadow: none;--calcite-action-bar-background-color: var(--calcite-color-foreground-1)}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-spacing-lg))}`,Pt=J(n),z=class extends B{constructor(){super(...arguments),this._direction=L(),this._viewModel=Pt(this),this.messages=G({name:"time-bar",blocking:!0}),this.#t=q(),this.#e=e=>{this._settingsActionElement=e},this.autoDestroyDisabled=!1,this.disabled=this._viewModel.disabled,this.effectiveStops=this._viewModel.effectiveStops,this.floating=!1,this.format=this._viewModel.format,this.fullTimeExtent=this._viewModel.fullTimeExtent,this.icon="clock",this.loadPersistedSettingsDisabled=this._viewModel.loadPersistedSettingsDisabled,this.loop=this._viewModel.loop,this.mode=this._viewModel.mode,this.playRate=this._viewModel.playRate,this.reverseAnimation=this._viewModel.reverseAnimation,this.savePersistedSettingsDisabled=this._viewModel.savePersistedSettingsDisabled,this.showNext=!1,this.showPlay=!1,this.showPrevious=!1,this.showSettings=!1,this.showTimeExtent=!1,this.state=this._viewModel.state,this.stops=this._viewModel.stops,this.timeExtent=this._viewModel.timeExtent,this.timeZone=this._viewModel.timeZone,this.view=this._viewModel.view,this.arcgisPropertyChange=H()("effectiveStops","fullTimeExtent","state","timeExtent"),this.arcgisReady=j()}static{this.properties={_settingsActionElement:16,autoDestroyDisabled:5,disabled:5,effectiveStops:32,floating:7,format:1,fullTimeExtent:0,icon:1,label:1,loadPersistedSettingsDisabled:5,loop:5,messageOverrides:0,mode:1,playRate:9,referenceElement:1,reverseAnimation:5,savePersistedSettingsDisabled:5,showNext:5,showPlay:5,showPrevious:5,showSettings:5,showTimeExtent:5,state:32,stops:0,timeExtent:0,timeZone:1,view:0}}static{this.styles=kt}#t;#e;async applyTimeSettings(e){this._viewModel.set(e)}async destroy(){await this.manager.destroy()}async next(){this._viewModel.next()}async play(){this._viewModel.play()}async previous(){this._viewModel.previous()}async stop(){this._viewModel.stop()}async updateWebDocument(e){this._viewModel.updateWebDocument(e)}willUpdate(e){e.has("messages")&&(this._viewModel.locale=this.messages._lang)}#m(e){let{currentTarget:a}=e,o=et(a).at(0)??a.querySelector("arcgis-time-bar-extent");o&&(o.messages=this.messages,o.viewModel=this._viewModel)}async#h(){switch(this.state){case"disabled":case"playing":return await this.stop();case"ready":return await this.play()}}render(){return p`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-toggle-disabled .floating=${this.floating} overflow-mode=none>${this._direction==="ltr"?p`${this.#i()}${this.#a()}${this.#c()}${this.#l()}${this.#s()}`:p`${this.#i()}${this.#l()}${this.#c()}${this.#a()}${this.#s()}`}</calcite-action-bar></div>`}#i(){return this.showNext||this.showPlay||this.showPrevious||this.showTimeExtent||this.showSettings?null:p`<calcite-action disabled .text=${this.messages.componentLabel} text-enabled></calcite-action>`}#s(){return p`<slot name=actions-end slot=actions-end></slot>`}#a(){return this.showPrevious||this.showPlay||this.showNext?p`<calcite-action-group>${this._direction==="ltr"?p`${this.#o()}${this.#r()}${this.#n()}`:p`${this.#n()}${this.#r()}${this.#o()}`}</calcite-action-group>`:null}#n(){return this.showNext?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canNext} icon=forward @click=${this.next} .text=${this.messages.next} title=${this.messages.next??y}></calcite-action>`:null}#o(){return this.showPlay?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length} .icon=${this.state==="playing"?"pause-f":"play-f"} @click=${this.#h} .text=${this.state==="playing"?this.messages.stop:this.messages.play} title=${(this.state==="playing"?this.messages.stop:this.messages.play)??y}></calcite-action>`:null}#r(){return this.showPrevious?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canPrevious} icon=reverse @click=${this.previous} .text=${this.messages.previous} title=${this.messages.previous??y}></calcite-action>`:null}#l(){return this.showSettings?p`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal title=${this.messages.settings??y} ${M(this.#e)}></calcite-action>${this._settingsActionElement?p`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${()=>{this.#t.value?.navigateToOverview()}} overlay-positioning=fixed><slot name=settings><arcgis-time-bar-settings .autoDestroyDisabled=${this.autoDestroyDisabled} class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${M(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>`:void 0}</calcite-action-group>`:null}#c(){return this.showTimeExtent?p`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#m}><arcgis-time-bar-extent .autoDestroyDisabled=${this.autoDestroyDisabled} class="label" .messages=${this.messages} .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`:null}};V("arcgis-time-bar",z);return z},"core/Accessor","time/TimeExtent","webdoc/widgets/TimeSlider","webdoc/Widgets","intl","time/TimeInterval","support/timeUtils","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,d,e,f)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import j from"./
|
|
2
|
+
import j from"./7JZU7XI4.js";import{a as b}from"./JR3EXG25.js";import{a as c}from"./AL3PLZEE.js";import{a as f}from"./OFBCNFBW.js";import"./Y6WTYXVP.js";import i from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import g from"./TWPVYHJG.js";import e from"./KRJCOTGC.js";import"./GIBXI44G.js";import"./RQT2PVDJ.js";import d from"./SBYVR52H.js";import"./LXME6MU5.js";import{P as o,Q as n,R as l,T as h,_ as v,b as a,x as r}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:s},_,A,D,{d:m,e:g,f:d,g:y},{c:w,e:u},e,,{a:V,b:R,c:E,d:C}])=>{var I=w(A,{}),M=w(_,{}),p=class extends l{constructor(){super(),this._attributionMode=null,this._containerRef=o(),this._mapRef=o(),this._uiController=new V(this),this.extraContent=new D,this.arcgisLoadError=E(this),this.arcgisViewReadyError=C(this),this._map=I(this),this.view=M(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.highlights=this.view.highlights,this.ipsInfo=this._map.ipsInfo,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.options=this.view.options,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.focusRegionVisible=this.view.focusRegionVisible,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.spatialReferenceLocked=this.view.spatialReferenceLocked,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=e(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=e(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=e(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=e(()=>this.view,"click"),this.arcgisViewDoubleClick=e(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=e(()=>this.view,"double-tap-drag"),this.arcgisViewFocusRegionSelect=e(()=>this.view,"focus-region-select"),this.arcgisViewDrag=e(()=>this.view,"drag"),this.arcgisViewHold=e(()=>this.view,"hold"),this.arcgisViewImmediateClick=e(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=e(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=e(()=>this.view,"key-down"),this.arcgisViewKeyUp=e(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=e(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=e(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=e(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=e(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=e(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=e(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=e(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=e(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=e(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=e(()=>this.view,"vertical-two-finger-drag"),R(this),this.view.ui={components:[]}}static{this.properties={_map:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,hideAttribution:5,highlights:0,interacting:32,ipsInfo:0,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,options:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,scale:9,selectionManager:32,focusRegionVisible:5,focusRegionShortcutEnabled:5,focusRegion:32,slotGroupRefs:32,spatialReference:0,spatialReferenceLocked:5,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:32,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[f,b]}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get aria(){return this.view?.aria}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(i){this._attributionMode=i,i!=="auto"&&(this.view.attributionMode=i)}get center(){return this.view.center}set center(i){if(g(i,this._center))return;this._center=d(i);let t=y(i,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(i){i&&!this.extent?.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){u(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get focusRegion(){return this.view.focusRegion}get stationary(){return this.view.stationary}get updating(){return this.view.updating}get viewpoint(){return this.view.viewpoint}set viewpoint(i){m(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(i,t){return this.view.fetchPopupFeatures(i,t)}async goTo(i,t){return await this.view.goTo(i,t)}async hitTest(i,t){return await this.view.hitTest(i,t)}async openPopup(i){await this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i){return this.view.toMap(i)}toScreen(i,t){return this.view.toScreen(i,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(t)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view?.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,t=>{t&&(this._map=t)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),s(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}renderMain(){return a`<div class=${h(c.base)} ${n(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(c.containerUI)} ${n(this._containerRef)}>${this._uiController.render()}${this.extraContent}</section>`}};v("arcgis-map",p);return p},"core/reactiveUtils","views/MapView","WebMap","core/Collection",d,e,g,i,j)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as d}from"./XHOI3WNI.js";import{b as u}from"./Y6WTYXVP.js";import j from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import i from"./OISNNHIG.js";import{a as w}from"./7465ANAR.js";import h from"./KRJCOTGC.js";import g from"./U7WRQCRV.js";import{h as b}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import e from"./SBYVR52H.js";import"./LXME6MU5.js";import{Q as c,R as v,_ as f,a as y,b as a,o,p as l,x as r}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([p,x,{when:k},C,,,,R,{a:g}])=>{var _=y`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;--calcite-panel-background-color: var(--calcite-color-background);min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}slot[name=results]::slotted(:not(arcgis-utility-network-trace-results)){display:none}slot[name=results]::slotted([arcgis-hidden-results-slot-item]){display:none}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`,D=R(C),$="arcgis-utility-network-trace-results",T="arcgis-hidden-results-slot-item",P=["actions","autoDestroyDisabled","aggregatedGeometryResultsGraphicsColor","aggregatedGeometryResultsSize","disableHighlightFeatureResults","hideActionBar","hideFeatureResults","hideGraphics","hidePlaceholder","includeDefaultActionsDisabled","messageOverrides","referenceElement","traceError","traceResult","view"],m=class extends v{constructor(){super(...arguments),this._messages=w({blocking:!0}),this.#i=D(this),this.#r=t=>{let{detail:e,target:i}=t;e.name==="hideGraphics"?(t.stopPropagation(),this.hideGraphics=i[e.name],this.arcgisHideGraphicsChange.emit(this.hideGraphics)):e.name==="aggregatedGeometryResultsGraphicsColor"?(t.stopPropagation(),this.aggregatedGeometryResultsGraphicsColor=i[e.name]):e.name==="aggregatedGeometryResultsSize"?(t.stopPropagation(),this.aggregatedGeometryResultsSize=i[e.name]):(e.name==="state"||e.name==="traceError"||e.name==="traceResult")&&t.stopPropagation()},this.#n=t=>{t.stopPropagation(),this.arcgisTraceResultClear.emit()},this.#o=t=>{t.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit(),this.arcgisTraceResultReady.emit()},this.#a=t=>{t.stopPropagation(),this.arcgisTriggerAction.emit(t.detail)},this._activeTab="input",this._showMissingTerminalWarning=!1,this._showNoStartingPointsWarning=!1,this._slottedElements=[],this._mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryResultsGraphicsColor=new p(d),this.aggregatedGeometryResultsSize=12,this.disableHighlightFeatureResults=!1,this.flowItems=new x,this.hideActionBar=!1,this.hideClearResultsCount=!1,this.hideGraphics=!1,this.hidePlaceholder=!1,this.hideFeatureResults=!1,this.includeDefaultActionsDisabled=!1,this.state=this.#i.state,this.view=this.#i.view,this.arcgisError=r(),this.arcgisHideGraphicsChange=r(),this.arcgisPropertyChange=b()("aggregatedGeometryResultsGraphicsColor","hideGraphics","state","traceError","traceResult"),this.arcgisReady=r(),this.arcgisTraceLocationSelectEnd=r(),this.arcgisTraceLocationSelectStart=r(),this.arcgisTraceResultClear=r(),this.arcgisTraceResultFeaturesReady=r(),this.arcgisTraceResultReady=r(),this.arcgisTriggerAction=r()}static{this.properties={_activeTab:16,_showMissingTerminalWarning:16,_showNoStartingPointsWarning:16,_slottedElements:16,_mode:16,actions:0,autoDestroyDisabled:5,beforeMapInteraction:0,aggregatedGeometryResultsGraphicsColor:[1,{converter:{fromAttribute:t=>p.fromString(t)??new p(d)}}],aggregatedGeometryResultsSize:9,disableHighlightFeatureResults:5,flowItems:32,hideActionBar:5,hideClearResultsCount:5,hideGraphics:5,hidePlaceholder:5,hideFeatureResults:5,includeDefaultActionsDisabled:5,label:3,messageOverrides:0,traceResultFeatures:32,traceResult:0,traceError:32,referenceElement:1,state:32,view:0}}static{this.styles=_}get#c(){return this.view?.map?.allLayers.toArray().concat(this.view.map.allTables.toArray())??[]}#e;#t;#h;#i;get#p(){return Array.from(this.el.children).some(t=>t.slot==="results"&&t.matches($))}#r;#n;#o;#a;get traceResultFeatures(){return this.#t?.traceResultFeatures??[]}async destroy(){this.#u(this.#t);let t=await Promise.allSettled([this.#t?.destroy(),this.#e?.destroy()]);for(let e of t)e.status==="rejected"&&g(e.reason,this,"Error while destroying trace analysis component");this.#e=void 0,this.#t=void 0,await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[k(()=>!this.#i.utilityNetwork,()=>this.#s("input"))])}willUpdate(t){P.some(e=>t.has(e))&&this.#l(this.#t)}#g(){this.traceResult=void 0,o(()=>this.traceError=void 0),this.#t?.clearResults(),this.#h?.flowItems.removeAll()}#m(){if(!this.#e)return;let{traceLocations:t,traceLocationDetails:e,traceConfiguration:i,isSubnetworkNameTraceSelected:s}=this.#e,h=!!i?.subnetworkName,E=t?.some(n=>n.type==="starting-point"),G=e?.some(n=>!!n.flagProperties.terminalConfiguration&&!n.flagProperties.selectedTerminals?.size)??!1;this._showNoStartingPointsWarning=!s&&!E||s&&!h,this._showMissingTerminalWarning=G}#s(t){this._activeTab=t}#l(t){if(!t)return;let e={actions:this.actions,autoDestroyDisabled:this.autoDestroyDisabled,aggregatedGeometryResultsGraphicsColor:this.aggregatedGeometryResultsGraphicsColor,aggregatedGeometryResultsSize:this.aggregatedGeometryResultsSize,disableHighlightFeatureResults:this.disableHighlightFeatureResults,expanded:!0,hideActionBar:this.hideActionBar,hideFeatureResults:this.hideFeatureResults,hideGraphics:this.hideGraphics,hidePlaceholder:this.hidePlaceholder,includeDefaultActionsDisabled:this.includeDefaultActionsDisabled,layers:this.#c,messageOverrides:this.messageOverrides,referenceElement:this.referenceElement,traceError:this.traceError,traceResult:this.traceResult,utilityNetwork:this.#i.utilityNetwork??void 0,view:this.view??void 0};Object.assign(t,e)}#y(t){t&&(t.addEventListener("arcgisPropertyChange",this.#r),t.addEventListener("arcgisResultsReady",this.#o),t.addEventListener("arcgisTraceResultClear",this.#n),t.addEventListener("arcgisTriggerAction",this.#a))}#u(t){t&&(t.removeEventListener("arcgisPropertyChange",this.#r),t.removeEventListener("arcgisResultsReady",this.#o),t.removeEventListener("arcgisTraceResultClear",this.#n),t.removeEventListener("arcgisTriggerAction",this.#a))}#v(t){let{_messages:e}=this;switch(t){case"no-user-type-extension":return e.errors.loadErrors.noUserTypeExtension;case"no-utility-network":return e.errors.loadErrors.noUtilityNetwork;case"no-view":return e.errors.loadErrors.noView;case"sceneView-not-supported":return e.errors.loadErrors.sceneViewNotSupported;default:return t}}async#f(){let t=this.#e?.selectedNamedTraceConfiguration,e=this.#e?.traceConfiguration;if(!(t?.traceType&&e)){l("error",this,"Trace configuration not found"),o(()=>this.traceError=new Error("Trace configuration not found")),this.arcgisError.emit();return}let i=this.#e?.traceLocations;try{this.traceResult=await this.#i.executeTraceConfiguration({traceType:t.traceType,traceConfiguration:e,traceLocations:i??[],resultTypes:t.resultTypes,outSpatialReference:this.view?.spatialReference})}catch(s){g(s,this,"Error while running trace"),o(()=>this.traceError=s),this.traceResult=void 0,this.arcgisError.emit()}}#b(){this.#m(),!(this._showNoStartingPointsWarning||this._showMissingTerminalWarning)&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1,this.#g(),this.#s("results"),this.#f())}#w(t){t&&(this.#e=t)}#d(t){!t||t===this.#t||(this.#u(this.#t),this.#t=t,this.#y(t))}#R(t){this.#h=t}#$(t){this._slottedElements=u(t);let e=u(t,$);if((!e.length||e.length<this._slottedElements.length)&&l("warn",this,"The trace results pane only renders instances of `arcgis-utility-network-trace-results` in the `results` slot."),e.length>1&&l("warn",this,"Multiple `arcgis-utility-network-trace-results` elements were provided in the `results` slot. Only the first will render."),!e.length)return;let[i]=e;for(let s of e)s===i?s.removeAttribute(T):s.setAttribute(T,"");this.#d(i),this.#l(i)}#T(t){t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented&&t.preventDefault()}#E(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}#G(t){let{detail:e,target:i}=t;t.stopPropagation(),e.name==="selectedUtilityNetwork"&&(this.#i.utilityNetwork=i.selectedUtilityNetwork,this.#l(this.#t)),e.name==="selectedNamedTraceConfiguration"&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1),e.name==="mode"&&(this._mode=i.mode)}#x(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showMissingTerminalWarning=!1}><div slot=title>${t.errors.missingTerminalTitle}</div><div slot=message>${t.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`}#k(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showNoStartingPointsWarning=!1}><div slot=title>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}#C(){return a`<calcite-tab .selected=${this._activeTab==="results"}>${this.state==="executing"&&a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>`||""}<arcgis-utility-network-trace-results-pane hide-warnings .hidden=${this.state==="executing"} ${c(this.#R)}><slot name=results @slotchange=${this.#$}></slot>${this.#p?null:a`<arcgis-utility-network-trace-results .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryResultsGraphicsColor=${this.aggregatedGeometryResultsGraphicsColor} .aggregatedGeometryResultsSize=${this.aggregatedGeometryResultsSize} .disableHighlightFeatureResults=${this.disableHighlightFeatureResults} expanded .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .hideGraphics=${this.hideGraphics} .hidePlaceholder=${this.hidePlaceholder} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .layers=${this.#c} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceError=${this.traceError} .traceResult=${this.traceResult} .utilityNetwork=${this.#i.utilityNetwork??void 0} .view=${this.view??void 0} ${c(this.#d)}></arcgis-utility-network-trace-results>`}</arcgis-utility-network-trace-results-pane></calcite-tab>`}#_(){let{_messages:t,traceResult:e}=this,i=!!(e?.elements.length||e?.globalFunctionResults.length||e?.aggregatedGeometry)&&this.#t?.state==="ready",s=this.#t?.numFeatureResults??0,h=s>0&&!this.hideFeatureResults&&!this.hideClearResultsCount&&this.state!=="executing";return a`<calcite-button appearance=outline width=full @click=${()=>{this.#s("input"),this.#g()}} .disabled=${!i} slot=footer>${h?t.buttons.clearResultsCustom.replace("{number}",s.toString()):t.buttons.clearResultsGeneric}</calcite-button>`}#D(){let{_mode:t}=this,{loadError:e}=this.#i,i=(e==="no-user-type-extension"||e==="sceneView-not-supported"?a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#v(e)}</div></calcite-notice>`:void 0)??a`${this._showNoStartingPointsWarning&&t==="default"&&this.#k()||""}${this._showMissingTerminalWarning&&t==="default"&&this.#x()||""}<arcgis-utility-network-trace-inputs .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .view=${this.view??void 0} .beforeMapInteraction=${this.beforeMapInteraction} @arcgisPropertyChange=${this.#G} @arcgisTraceLocationSelectEnd=${this.#E} @arcgisTraceLocationSelectStart=${this.#T} @arcgisTriggerAction=${this.#a} ${c(this.#w)}></arcgis-utility-network-trace-inputs>`;return a`<calcite-tab .selected=${this._activeTab==="input"}><div class="inputs-tab-container">${i}</div></calcite-tab>`}#P(){let{state:t}=this;if(this._mode!=="default")return null;let e=t==="disabled"||t==="loading"||!this.#e?.traceConfiguration;return a`<calcite-button appearance=solid width=full @click=${this.#b} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`}render(){let{_activeTab:t,state:e}=this;return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @calciteTabsActivate=${()=>this.#s("input")} .selected=${t==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @calciteTabsActivate=${()=>this.#s("results")} .selected=${t==="results"} .disabled=${e==="disabled"||e==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#D()}${this.#C()}</calcite-tabs>${t==="input"?this.#P():null}${t==="results"?this.#_():null}</calcite-panel>`}};f("arcgis-utility-network-trace-analysis",m);return m},"Color","core/Collection","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",e,g,h,i,j)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import g from"./
|
|
2
|
+
import g from"./7JZU7XI4.js";import{a as R}from"./JR3EXG25.js";import{a as d}from"./AL3PLZEE.js";import{a as L}from"./OFBCNFBW.js";import"./Y6WTYXVP.js";import e from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import c from"./TWPVYHJG.js";import b from"./KRJCOTGC.js";import"./GIBXI44G.js";import"./RQT2PVDJ.js";import a from"./SBYVR52H.js";import"./LXME6MU5.js";import{P as w,Q as v,R as f,T as m,_,b as l,x as p}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:n},Q,x,{fetchKnowledgeGraph:z},Z,{isAbortError:P},F,{d:V,e:I,f:E,g:A},{c:g,e:C},i,{b:u},{a:M,b:k,c:D,d:U}])=>{var O=g(x,{}),G=g(Q,{}),y=class extends f{constructor(){super(),this._attributionMode=null,this._containerRef=w(),this._mapRef=w(),this._uiController=new M(this),this._activeLoadAbortController=null,this.arcgisLoadError=D(this),this.arcgisViewReadyError=U(this),this._map=O(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=G(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.graphics=this.view.graphics,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.options=this.view.options,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.focusRegionVisible=this.view.focusRegionVisible,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=p(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewFocusRegionSelect=i(()=>this.view,"focus-region-select"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=p(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),k(this),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,options:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,selectionManager:32,focusRegionVisible:5,focusRegionShortcutEnabled:5,focusRegion:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:32,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[L,R]}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(e){this._attributionMode=e,e!=="auto"&&(this.view.attributionMode=e)}get center(){return this.view.center}set center(e){if(I(e,this._center))return;this._center=E(e);let t=A(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get focusRegion(){return this.view.focusRegion}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get updating(){return this.view.updating}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(e,t){return this.view.fetchPopupFeatures(e,t)}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){await this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(c=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:c.url});o.load({signal:a?.signal});try{u(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(b){if(!P(b))throw b}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(c=>{s.WebLinkChart.fromCypherQuery(c,new Z({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{u(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!P(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return l`<div class=${m(d.base)} ${v(this._mapRef)}></div>`}render(){return l`${this.renderMain()}<section class=${m(d.containerUI)} ${v(this._containerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await z(r),WebLinkChart:x,LinkChartLayer:F,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};_("arcgis-link-chart",y);return{ArcgisLinkChart:y,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,b,c,e,g)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{R as o,T as s,_ as m,a as n,b as e}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";var v=n`:host{background-color:var(--calcite-color-surface-2);block-size:max-content;color:var(--calcite-color-text-1);display:inline-grid;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-sm);inline-size:max-content;place-items:center}.dash{justify-self:center;border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-text-1);width:50%}.disabled{opacity:var(--calcite-opacity-disabled)}.end{justify-self:start}.start{justify-self:end}.table-cumulative,.table-extent,.table-instant{align-content:center;align-items:center;display:grid;grid-template-rows:1fr}.table-cumulative{grid-template-columns:max-content var(--calcite-spacing-fixed-sm) max-content}.table-extent{grid-template-columns:1fr var(--calcite-spacing-fixed-xxl) 1fr}.table-instant{grid-template-columns:1fr}.text{color:var(--calcite-color-text-3)}`,c=class extends o{constructor(){super(...arguments),this.autoDestroyDisabled=!1}static{this.properties={autoDestroyDisabled:5,messages:0,viewModel:0}}static{this.styles=v}async destroy(){await this.manager.destroy()}render(){let{messages:i,viewModel:t}=this;if(!i||!t)return null;let{interactive:b,timeExtent:d}=t,l=!b;if(!d||d.isAllTime)return e`<div class="table-instant"><span class=${s({disabled:l,text:!0})}>${i.noTimeExtent}</span></div>`;if(d.isEmpty)return e`<div class="table-instant"><span class=${s({disabled:l,text:!0})}>${i.emptyTimeExtent}</span></div>`;let{start:a,end:r}=d;return a&&r?a.getTime()===r.getTime()?e`<div class="table-instant"><arcgis-time-bar-date align=center .autoDestroyDisabled=${this.autoDestroyDisabled} class="end" .date=${a} .viewModel=${t}></arcgis-time-bar-date></div>`:e`<div class="table-extent"><arcgis-time-bar-date align=end .autoDestroyDisabled=${this.autoDestroyDisabled} class="start" .date=${a} .viewModel=${t}></arcgis-time-bar-date><div class=${s({dash:!0,disabled:l})}></div><arcgis-time-bar-date align=start .autoDestroyDisabled=${this.autoDestroyDisabled} class="end" .date=${r} .viewModel=${t}></arcgis-time-bar-date></div>`:a?e`<div class="table-cumulative"><span class=${s({disabled:l,text:!0})}>${i.from}</span><div></div><arcgis-time-bar-date align=start .autoDestroyDisabled=${this.autoDestroyDisabled} class="start" .date=${a} .viewModel=${t}></arcgis-time-bar-date></div>`:r?e`<div class="table-cumulative"><span class=${s({disabled:l,text:!0})}>${i.through}</span><div></div><arcgis-time-bar-date align=start .autoDestroyDisabled=${this.autoDestroyDisabled} class="start" .date=${r} .viewModel=${t}></arcgis-time-bar-date></div>`:null}};m("arcgis-time-bar-extent",c);export{c as ArcgisTimeBarExtent};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{f as w}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import"./LXME6MU5.js";import{Q as m,R as u,T as h,X as g,_ as v,a as d,b as a}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([l])=>{var p=d`:host{background-color:var(--calcite-color-surface-2);block-size:var(--calcite-size-fixed-xxxl);color:var(--calcite-color-text-1);display:flex;flex:1 0 auto;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-sm);inline-size:auto;--arcgis-internal-time-bar-slider-tick-gap: 100}.root{align-items:center;block-size:100%;display:flex;inline-size:100%}slot[name=max],slot[name=min]{display:flex}.slider{padding-inline:var(--calcite-spacing-xl);--arcgis-internal-slider-track-size: var(--calcite-size-px);--arcgis-slider-track-background-color: var(--calcite-color-border-1);--labels-container-width: 100%}.slider-container{flex:1 1 auto;min-inline-size:calc(var(--calcite-spacing-md) * 15)}.slider--has-ticks{margin-top:calc(var(--calcite-spacing-md) * -1)}.hidden,.max-date,.min-date{flex:0 0 auto}.hidden{inline-size:0}.popover{padding:var(--calcite-spacing-xxs) var(--calcite-spacing-xs) var(--calcite-spacing-xs)}.ticks-container{flex:1;position:relative;width:100%;arcgis-ticks,>slot::slotted(arcgis-ticks){inset:0;position:absolute;white-space:nowrap;--arcgis-internal-ticks-color: var(--calcite-color-text-1);--arcgis-ticks-font-weight: var(--calcite-font-weight-normal);--arcgis-ticks-label-width: auto;--arcgis-ticks-tick-color: var(--calcite-color-border-1);--arcgis-ticks-tick-transform: unset;--arcgis-ticks-tick-width: var(--calcite-size-px)}}.slider.slider--out-of-range{--arcgis-internal-slider-handle-color: var(--calcite-color-status-danger);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-status-danger)}.lock-time-window{--arcgis-internal-time-bar-slider-border-margin: calc(var(--calcite-spacing-base) + 1px);border-image:linear-gradient(transparent var(--arcgis-internal-time-bar-slider-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--arcgis-internal-time-bar-slider-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--arcgis-internal-time-bar-slider-border-margin)),transparent var(--arcgis-internal-time-bar-slider-border-margin));border-image-slice:1}:dir(ltr){.lock-time-window{border-inline-end-style:solid;border-inline-end-width:var(--calcite-border-width-sm);margin-inline-end:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-sm)}}:dir(rtl){.lock-time-window{border-inline-start-style:solid;border-inline-start-width:var(--calcite-border-width-sm);margin-inline-start:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-sm)}}`,c=class extends u{constructor(){super(...arguments),this._direction=w(),this.#t=new ResizeObserver(([e])=>{this._sliderWidth=e.contentRect.width}),this.#i=100,this.#s=100,this.#a=(e,i)=>i==="value"?this.viewModel?.formatDateTime(new Date(e)):void 0,this.autoDestroyDisabled=!1,this.lockTimeWindow=!1,this.popoverDisplay="none",this.showLockTimeWindow=!1,this.showMax=!1,this.showMin=!1,this.showTicks=!1}static{this.properties={_activeValue:16,_sliderFillPlacement:16,_sliderWidth:16,_timeExtentEpochValues:16,activeValue:32,autoDestroyDisabled:5,lockTimeWindow:5,messages:0,popoverDisplay:1,showLockTimeWindow:5,showMax:5,showMin:5,showTicks:5,viewModel:0}}static{this.styles=p}#t;#e;#i;#s;#a;get _sliderFillPlacement(){switch(this.viewModel?.mode){case"cumulative-from-end":return"end";case"cumulative-from-start":return"start";case"instant":return"none";default:return}}get _timeExtentEpochValues(){let{viewModel:e}=this;if(!e)return;let{fullTimeExtent:i}=e;if(!i)return;let{start:t,end:s}=i;if(!t||!s)return;let{timeExtent:r}=e;if(!r)switch(e.mode){case"cumulative-from-end":case"instant":return[t.getTime()];case"cumulative-from-start":return[s.getTime()];case"time-window":return[t.getTime(),s.getTime()]}let{start:o,end:n}=r;switch(e.mode){case"cumulative-from-end":case"instant":return o?o.getTime()<t.getTime()?[t.getTime()]:o.getTime()>s.getTime()?[s.getTime()]:[o.getTime()]:void 0;case"cumulative-from-start":return n?n.getTime()<t.getTime()?[t.getTime()]:n.getTime()>s.getTime()?[s.getTime()]:[n.getTime()]:void 0;case"time-window":return o&&n?[o.getTime(),n.getTime()]:void 0}}get activeValue(){switch(this.popoverDisplay){case"none":return;case"always":return this.viewModel?.timeExtent;case"auto":switch(this._activeValue){case void 0:return;case"all":return this.viewModel?.timeExtent;default:return new Date(this._activeValue)}}}async destroy(){await this.manager.destroy()}#c(){return e=>{if(e){this.#e=e,this.#t.observe(e);return}this.#e&&(this.#t.unobserve(this.#e),this.#e=void 0)}}#d(){let e=Number.parseInt(window.getComputedStyle(this.el).getPropertyValue("--arcgis-internal-time-bar-slider-tick-gap"),10);return Number.isFinite(e)&&e>0?e:this.#i}#m(e,i){let{viewModel:t}=this,{start:s,end:r}=e;if(!t||!s||!r)return;let o=(r.getTime()-s.getTime())/i;return t.tickFormats.find(({duration:n})=>n>this.#d()*o)??t.tickFormats.at(-1)}#u(){this.lockTimeWindow=!this.lockTimeWindow}#h(e){this._activeValue=e.target.activeValue}#g(e){let{viewModel:i}=this,t=i?.mode;t&&(i.timeExtent=this.#v(e.target.values,t),this._activeValue=e.target.activeValue)}#v([e,i],t){switch(t){case"cumulative-from-end":return new l({start:new Date(e),end:null});case"cumulative-from-start":return new l({start:null,end:new Date(e)});case"instant":return new l({start:new Date(e),end:new Date(e)});case"time-window":return new l({start:new Date(e),end:new Date(i??e)})}}#r(){let{messages:e,showLockTimeWindow:i,viewModel:t}=this;if(!e||!i||!t)return null;let s=this.lockTimeWindow?"lock":"unlock",r=this.lockTimeWindow?e.unlockTimeWindow:e.lockTimeWindow;return a`<calcite-action .active=${this.lockTimeWindow} class="lock-time-window" .disabled=${!t.interactive||t.mode!=="time-window"} .icon=${s} @click=${this.#u} .text=${r} title=${r??g}></calcite-action>`}#o(){let e=this.viewModel?.fullTimeExtent?.end;return this.showMax&&e?a`<slot name=max><arcgis-time-bar-date .autoDestroyDisabled=${this.autoDestroyDisabled} class="max-date" .date=${e} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>`:a`<div class="hidden"></div>`}#n(){let e=this.viewModel?.fullTimeExtent?.start;return this.showMin&&e?a`<slot name=min><arcgis-time-bar-date .autoDestroyDisabled=${this.autoDestroyDisabled} class="min-date" .date=${e} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>`:a`<div class="hidden"></div>`}#w(){return this.popoverDisplay!=="none"?a`<div class="popover" slot=popover><slot name=popover>${this.#p()}</slot></div>`:null}#p(){let{activeValue:e,messages:i,viewModel:t}=this;if(!e||!i||!t)return null;switch(t.mode){case"cumulative-from-end":case"instant":let s=t.timeExtent?.start;return s?a`<arcgis-time-bar-date .autoDestroyDisabled=${this.autoDestroyDisabled} .date=${s} .viewModel=${t}></arcgis-time-bar-date>`:null;case"cumulative-from-start":let r=t.timeExtent?.end;return r?a`<arcgis-time-bar-date .autoDestroyDisabled=${this.autoDestroyDisabled} .date=${r} .viewModel=${t}></arcgis-time-bar-date>`:null;case"time-window":return e instanceof Date?a`<arcgis-time-bar-date .autoDestroyDisabled=${this.autoDestroyDisabled} .date=${e} .viewModel=${t}></arcgis-time-bar-date>`:a`<arcgis-time-bar-extent .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${i} .viewModel=${t}></arcgis-time-bar-extent>`}}#l(){let{messages:e,viewModel:i}=this;if(!i?.fullTimeExtent?.start||!i?.fullTimeExtent?.end||!e||(i.tickFormat=this.#m(i.fullTimeExtent,this._sliderWidth??this.#s),!i.tickFormat))return null;let t=i.fullTimeExtent.start.getTime(),s=i.fullTimeExtent.end.getTime();return a`<div class="slider-container" ${m(this.#c())}><arcgis-slider allow-values-overlap .autoDestroyDisabled=${this.autoDestroyDisabled} class=${h({slider:!0,"slider--has-ticks":this.showTicks,"slider--out-of-range":i.isOutOfRange})} .disabled=${!i.interactive} .fillPlacement=${this._sliderFillPlacement} .labelFormatter=${this.#a} .max=${s} .min=${t} @arcgisActiveValueChange=${this.#h} @arcgisInput=${this.#g} .popoverLabel=${e.timeExtent} .popoverDisplay=${this.popoverDisplay==="none"?"auto":this.popoverDisplay} precision=0 .steps=${i.effectiveStopsEpoch} .values=${this._timeExtentEpochValues} .valuesDraggingDisabled=${this.lockTimeWindow}>${this.#w()}${this.#b(i,t,s)}</arcgis-slider></div>`}#b(e,i,t){return this.showTicks?a`<div slot=content-end class="ticks-container"><slot name=content-end><arcgis-ticks .autoDestroyDisabled=${this.autoDestroyDisabled} .labelFormatter=${e.tickFormatter} .max=${t} .min=${i} mode=value show-labels .values=${e.tickValues}></arcgis-ticks></slot></div>`:null}render(){return a`<div class="root">${this._direction==="ltr"?a`${this.#r()}${this.#n()}${this.#l()}${this.#o()}`:a`${this.#o()}${this.#l()}${this.#n()}${this.#r()}`}</div>`}};v("arcgis-time-bar-slider",c);return c},"time/TimeExtent")
|