@arcgis/map-components 5.2.0-next.97 → 5.2.0-next.99
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/65FGHESR.js +2 -0
- package/dist/cdn/{MIIHAXAZ.js → JB5333UG.js} +1 -1
- package/dist/cdn/{OCHBUJAT.js → JGSPD7XA.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-feature-form/customElement.d.ts +10 -1
- package/dist/components/arcgis-feature-form/customElement.js +2 -2
- package/dist/components/arcgis-time-bar/customElement.d.ts +1 -0
- package/dist/components/arcgis-time-bar/customElement.js +40 -40
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.js +14 -14
- 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 +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +5 -5
- package/dist/cdn/BQJHJ74K.js +0 -2
package/dist/loader.js
CHANGED
|
@@ -40,7 +40,7 @@ const s = t(e, {
|
|
|
40
40
|
"arcgis-feature-element-info": [() => import("./components/arcgis-feature-element-info/customElement.js"), "description,heading,headingLevel"],
|
|
41
41
|
"arcgis-feature-expression": [() => import("./components/arcgis-feature-expression/customElement.js"), "expressionInfo:,expressionInfos:,fieldInfoMap:,graphic:,headingLevel,interceptor:,layer:,location:,map:,messages:,spatialReference:,values:,view:"],
|
|
42
42
|
"arcgis-feature-fields": [() => import("./components/arcgis-feature-fields/customElement.js"), "description,expressionInfos:,fieldInfos:,graphic:,heading,headingLevel,isContentFieldInfos,layer:,messages:,values:"],
|
|
43
|
-
"arcgis-feature-form": [() => import("./components/arcgis-feature-form/customElement.js"), "autoDestroyDisabled,disabled,editType,feature:,formTemplate:,groupDisplay,headingLevel,hideReadOnlyNotice,icon,label,layer:,map:,referenceElement,state:,timeZone
|
|
43
|
+
"arcgis-feature-form": [() => import("./components/arcgis-feature-form/customElement.js"), "autoDestroyDisabled,disabled,editType,feature:,formTemplate:,groupDisplay,headingLevel,hideReadOnlyNotice,icon,label,layer:,map:,referenceElement,state:,timeZone,view:;destroy,getValues,submit"],
|
|
44
44
|
"arcgis-feature-media": [() => import("./components/arcgis-feature-media/customElement.js"), "activeMediaInfo:,activeMediaInfoIndex,chartAnimationDisabled,description,expressionValues:,fieldInfoMap:,formattedMediaInfoCount:,formattedMediaInfos:,formattedValues:,graphic:,heading,headingLevel,layer:,mediaInfos:,messages:,popupTemplate:,relatedInfos:,values:;;next,previous,setActiveMedia"],
|
|
45
45
|
"arcgis-feature-next": [() => import("./components/arcgis-feature-next/customElement.js"), "autoDestroyDisabled,chartAnimationDisabled,defaultPopupTemplateEnabled,flowItems:,flowType,graphic:,heading:,headingLevel,hideAttachmentsContent,hideContent,hideCustomContent,hideEmptyRelationshipContent,hideExpressionContent,hideFieldsContent,hideHeading,hideLastEditedInfo,hideMediaContent,hideTextContent,icon,isFeatureFromTable:,label,location:,map:,messageOverrides:,messages:,referenceElement,showRelationshipContent,showUtilityNetworkContent,spatialReference:,state:,timeZone,view:,viewModel:;destroy,updateGeometry;nextMedia,previousMedia,setActiveMedia"],
|
|
46
46
|
"arcgis-feature-relationship": [() => import("./components/arcgis-feature-relationship/customElement.js"), "activeCategory:,allItemsDescription:,autoDestroyDisabled,description,displayCount,empty,featurePage,featuresPerPage,flowItems:,flowType,graphic:,heading,headingLevel,hideDescription,hideEmptyRelationshipContent,hideHeading,label,layer:,map:,messages:,orderByFields:,relationshipId,showAllEnabled,spatialReference:,timeZone,useFeatureNextFlowItem,values:,view:;destroy"],
|
package/dist/types/lumina.d.ts
CHANGED
|
@@ -296,7 +296,7 @@ interface LuminaArcgisFeature extends Partial<Pick<ArcgisFeature, "autoDestroyDi
|
|
|
296
296
|
onarcgisReady?: EventHandler<ArcgisFeature["arcgisReady"]>;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
interface LuminaArcgisFeatureForm extends Partial<Pick<ArcgisFeatureForm, "autoDestroyDisabled" | "disabled" | "editType" | "feature" | "formTemplate" | "groupDisplay" | "headingLevel" | "hideReadOnlyNotice" | "label" | "layer" | "map" | "referenceElement" | "timeZone">>, ArcgisFeatureFormSetterTypes, h.JSX.HTMLAttributes<ArcgisFeatureForm> {
|
|
299
|
+
interface LuminaArcgisFeatureForm extends Partial<Pick<ArcgisFeatureForm, "autoDestroyDisabled" | "disabled" | "editType" | "feature" | "formTemplate" | "groupDisplay" | "headingLevel" | "hideReadOnlyNotice" | "label" | "layer" | "map" | "referenceElement" | "timeZone" | "view">>, ArcgisFeatureFormSetterTypes, h.JSX.HTMLAttributes<ArcgisFeatureForm> {
|
|
300
300
|
onarcgisPropertyChange?: EventHandler<ArcgisFeatureForm["arcgisPropertyChange"]>;
|
|
301
301
|
onarcgisReady?: EventHandler<ArcgisFeatureForm["arcgisReady"]>;
|
|
302
302
|
onarcgisSubmit?: EventHandler<ArcgisFeatureForm["arcgisSubmit"]>;
|
package/dist/types/preact.d.ts
CHANGED
|
@@ -297,7 +297,7 @@ interface PreactArcgisFeature extends Partial<Pick<ArcgisFeature, "autoDestroyDi
|
|
|
297
297
|
onarcgisReady?: EventHandler<ArcgisFeature["arcgisReady"]>;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
interface PreactArcgisFeatureForm extends Partial<Pick<ArcgisFeatureForm, "autoDestroyDisabled" | "disabled" | "editType" | "feature" | "formTemplate" | "groupDisplay" | "headingLevel" | "hideReadOnlyNotice" | "label" | "layer" | "map" | "referenceElement" | "timeZone">>, ArcgisFeatureFormSetterTypes, HTMLAttributes<ArcgisFeatureForm> {
|
|
300
|
+
interface PreactArcgisFeatureForm extends Partial<Pick<ArcgisFeatureForm, "autoDestroyDisabled" | "disabled" | "editType" | "feature" | "formTemplate" | "groupDisplay" | "headingLevel" | "hideReadOnlyNotice" | "label" | "layer" | "map" | "referenceElement" | "timeZone" | "view">>, ArcgisFeatureFormSetterTypes, HTMLAttributes<ArcgisFeatureForm> {
|
|
301
301
|
onarcgisPropertyChange?: EventHandler<ArcgisFeatureForm["arcgisPropertyChange"]>;
|
|
302
302
|
onarcgisReady?: EventHandler<ArcgisFeatureForm["arcgisReady"]>;
|
|
303
303
|
onarcgisSubmit?: EventHandler<ArcgisFeatureForm["arcgisSubmit"]>;
|
package/dist/types/react.d.ts
CHANGED
|
@@ -297,7 +297,7 @@ interface ReactArcgisFeature extends Partial<Pick<ArcgisFeature, "autoDestroyDis
|
|
|
297
297
|
onarcgisReady?: EventHandler<ArcgisFeature["arcgisReady"]>;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
interface ReactArcgisFeatureForm extends Partial<Pick<ArcgisFeatureForm, "autoDestroyDisabled" | "disabled" | "editType" | "feature" | "formTemplate" | "groupDisplay" | "headingLevel" | "hideReadOnlyNotice" | "label" | "layer" | "map" | "referenceElement" | "timeZone">>, ArcgisFeatureFormSetterTypes, HTMLProps<ArcgisFeatureForm> {
|
|
300
|
+
interface ReactArcgisFeatureForm extends Partial<Pick<ArcgisFeatureForm, "autoDestroyDisabled" | "disabled" | "editType" | "feature" | "formTemplate" | "groupDisplay" | "headingLevel" | "hideReadOnlyNotice" | "label" | "layer" | "map" | "referenceElement" | "timeZone" | "view">>, ArcgisFeatureFormSetterTypes, HTMLProps<ArcgisFeatureForm> {
|
|
301
301
|
onarcgisPropertyChange?: EventHandler<ArcgisFeatureForm["arcgisPropertyChange"]>;
|
|
302
302
|
onarcgisReady?: EventHandler<ArcgisFeatureForm["arcgisReady"]>;
|
|
303
303
|
onarcgisSubmit?: EventHandler<ArcgisFeatureForm["arcgisSubmit"]>;
|
package/dist/types/stencil.d.ts
CHANGED
|
@@ -297,7 +297,7 @@ interface StencilArcgisFeature extends Partial<Pick<ArcgisFeature, "autoDestroyD
|
|
|
297
297
|
onArcgisReady?: EventHandler<ArcgisFeature["arcgisReady"]>;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
interface StencilArcgisFeatureForm extends Partial<Pick<ArcgisFeatureForm, "autoDestroyDisabled" | "disabled" | "editType" | "feature" | "formTemplate" | "groupDisplay" | "headingLevel" | "hideReadOnlyNotice" | "label" | "layer" | "map" | "referenceElement" | "timeZone">>, ArcgisFeatureFormSetterTypes, StencilJsx.HTMLAttributes<ArcgisFeatureForm> {
|
|
300
|
+
interface StencilArcgisFeatureForm extends Partial<Pick<ArcgisFeatureForm, "autoDestroyDisabled" | "disabled" | "editType" | "feature" | "formTemplate" | "groupDisplay" | "headingLevel" | "hideReadOnlyNotice" | "label" | "layer" | "map" | "referenceElement" | "timeZone" | "view">>, ArcgisFeatureFormSetterTypes, StencilJsx.HTMLAttributes<ArcgisFeatureForm> {
|
|
301
301
|
onArcgisPropertyChange?: EventHandler<ArcgisFeatureForm["arcgisPropertyChange"]>;
|
|
302
302
|
onArcgisReady?: EventHandler<ArcgisFeatureForm["arcgisReady"]>;
|
|
303
303
|
onArcgisSubmit?: EventHandler<ArcgisFeatureForm["arcgisSubmit"]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/map-components",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.99",
|
|
4
4
|
"description": "ArcGIS Map Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"2D",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@amcharts/amcharts5": "~5.20.4",
|
|
46
|
-
"@arcgis/common-components": "5.2.0-next.
|
|
47
|
-
"@arcgis/lumina": "5.2.0-next.
|
|
48
|
-
"@arcgis/toolkit": "5.2.0-next.
|
|
46
|
+
"@arcgis/common-components": "5.2.0-next.99",
|
|
47
|
+
"@arcgis/lumina": "5.2.0-next.99",
|
|
48
|
+
"@arcgis/toolkit": "5.2.0-next.99",
|
|
49
49
|
"lit": "^3.3.0",
|
|
50
50
|
"lodash-es": "^4.18.1",
|
|
51
51
|
"tslib": "^2.8.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@arcgis/core": "5.2.0-next.
|
|
54
|
+
"@arcgis/core": "5.2.0-next.99",
|
|
55
55
|
"@esri/calcite-components": "^5.2.0-next.65"
|
|
56
56
|
},
|
|
57
57
|
"css.customData": [
|
package/dist/cdn/BQJHJ74K.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import g from"./BV3Q2Y7F.js";import{a as U,k as Y}from"./O7RSAJOS.js";import f from"./A3DPBGUE.js";import"./VJVKFKSG.js";import e from"./IE7XJM27.js";import{a as H}from"./5UVZPECS.js";import c from"./WFPR2VUW.js";import b from"./YOIVWFJK.js";import{e as B,g as I}from"./6ERK6Z6K.js";import"./M6LV7VM5.js";import a from"./JVC76RB3.js";import"./QUZTFUWM.js";import{b as N}from"./HYRFW7KG.js";import{L as A,M,N as z,T as W,a as R,b as d,o as j,w as C}from"./RM4OPQBM.js";import"./H6RQVSYM.js";export default $arcgis.t(([ut,x,mt,ct,{convertDateFormatToIntlOptions:T},it,{getTimeSliderSettingsFromWebDocument:ht},{property:l,subclass:dt},{watch:w,whenOnce:at},,,,L,{d:q,f:K,i:V},{a:G,b:J,c:S,d:$,e:Q,f:X,g:tt,h:k,i:et}])=>{var nt=new WeakMap,ot=new WeakMap;function vt(t){let{locale:e,formatOptions:a}=t,n=yt(a),u=new Intl.DateTimeFormat(e,n);return nt.set(t,u),u}function pt(t){let{locale:e,formatOptions:a}=t,n=new Intl.NumberFormat(e,a);return ot.set(t,n),n}function gt(t){return nt.get(t)??vt(t)}function ft(t){return ot.get(t)??pt(t)}function yt(t){return t.timeZone?{...t,timeZone:Y(t.timeZone)}:t}var i=(t,e,a)=>({minorTick:t,majorTick:e,majorTickFormat:a}),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"}},wt=[i({value:1,unit:"milliseconds"},{value:20,unit:"milliseconds"},s.sf),i({value:2,unit:"milliseconds"},{value:50,unit:"milliseconds"},s.sf),i({value:5,unit:"milliseconds"},{value:100,unit:"milliseconds"},s.sf),i({value:10,unit:"milliseconds"},{value:200,unit:"milliseconds"},s.sf),i({value:20,unit:"milliseconds"},{value:500,unit:"milliseconds"},s.sf),i({value:50,unit:"milliseconds"},{value:1,unit:"seconds"},s.s),i({value:100,unit:"milliseconds"},{value:2,unit:"seconds"},s.s),i({value:200,unit:"milliseconds"},{value:5,unit:"seconds"},s.s),i({value:500,unit:"milliseconds"},{value:10,unit:"seconds"},s.s),i({value:1,unit:"seconds"},{value:20,unit:"seconds"},s.ms),i({value:2,unit:"seconds"},{value:30,unit:"seconds"},s.ms),i({value:5,unit:"seconds"},{value:1,unit:"minutes"},s.mi),i({value:10,unit:"seconds"},{value:2,unit:"minutes"},s.mi),i({value:20,unit:"seconds"},{value:5,unit:"minutes"},s.mi),i({value:40,unit:"seconds"},{value:10,unit:"minutes"},s.mi),i({value:1,unit:"minutes"},{value:30,unit:"minutes"},s.hm),i({value:2,unit:"minutes"},{value:1,unit:"hours"},s.hm),i({value:5,unit:"minutes"},{value:2,unit:"hours"},s.hm),i({value:10,unit:"minutes"},{value:4,unit:"hours"},s.hm),i({value:20,unit:"minutes"},{value:8,unit:"hours"},s.hm),i({value:40,unit:"minutes"},{value:1,unit:"days"},s.dm),i({value:1,unit:"hours"},{value:1,unit:"days"},s.dm),i({value:2,unit:"hours"},{value:2,unit:"days"},s.dm),i({value:5,unit:"hours"},{value:4,unit:"days"},s.dm),i({value:10,unit:"hours"},{value:10,unit:"days"},s.dm),i({value:20,unit:"hours"},{value:15,unit:"days"},s.dm),i({value:1,unit:"days"},{value:20,unit:"days"},s.dm),i({value:2,unit:"days"},{value:1,unit:"months"},s.m),i({value:5,unit:"days"},{value:3,unit:"months"},s.m),i({value:10,unit:"days"},{value:6,unit:"months"},s.my),i({value:20,unit:"days"},{value:1,unit:"years"},s.y),i({value:1,unit:"months"},{value:2,unit:"years"},s.y),i({value:2,unit:"months"},{value:4,unit:"years"},s.y),i({value:5,unit:"months"},{value:10,unit:"years"},s.y),i({value:1,unit:"years"},{value:20,unit:"years"},s.y),i({value:2,unit:"years"},{value:50,unit:"years"},s.y),i({value:5,unit:"years"},{value:100,unit:"years"},s.y),i({value:10,unit:"years"},{value:200,unit:"years"},s.y),i({value:20,unit:"years"},{value:500,unit:"years"},s.y),i({value:50,unit:"years"},{value:1e3,unit:"years"},s.y),i({value:1,unit:"centuries"},{value:20,unit:"centuries"},s.y),i({value:2,unit:"centuries"},{value:50,unit:"centuries"},s.y),i({value:5,unit:"centuries"},{value:100,unit:"centuries"},s.y),i({value:10,unit:"centuries"},{value:200,unit:"centuries"},s.y),i({value:20,unit:"centuries"},{value:500,unit:"centuries"},s.y),i({value:50,unit:"centuries"},{value:1e3,unit:"centuries"},s.y),i({value:100,unit:"centuries"},{value:2e3,unit:"centuries"},s.y),i({value:200,unit:"centuries"},{value:5e3,unit:"centuries"},s.y),i({value:500,unit:"centuries"},{value:1e4,unit:"centuries"},s.y),i({value:1e3,unit:"centuries"},{value:2e4,unit:"centuries"},s.y)];function xt(t){return wt.map(({minorTick:e,majorTick:a,majorTickFormat:n},u)=>{let c=new it(e),m=new it(a),p=c.toMilliseconds(),f={...n,timeZone:t};return{minor:c,major:m,duration:p,format:f,index:u}})}var bt=Object.defineProperty,Et=Object.getOwnPropertyDescriptor,rt=t=>{throw TypeError(t)},r=(t,e,a,n)=>{for(var u=n>1?void 0:n?Et(e,a):e,c=t.length-1,m;c>=0;c--)(m=t[c])&&(u=(n?m(e,a,u):m(u))||u);return n&&u&&bt(e,a,u),u},lt=(t,e,a)=>e.has(t)||rt("Cannot "+a),D=(t,e,a)=>(lt(t,e,"read from private field"),a?a.call(t):e.get(t)),st=(t,e,a)=>e.has(t)?rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),v=(t,e,a)=>(lt(t,e,"access private method"),a),b,h,P,Z,E,_,F,o=class extends ut{constructor(){super(...arguments),st(this,h),st(this,b,new AbortController),this.disabled=!1,this.format="date",this.loadPersistedSettingsDisabled=!1,this.loop=!1,this.mode="time-window",this.savePersistedSettingsDisabled=!1,this.stops=G}get _adjustedMajorTickFormat(){let{era:t,timeZone:e}=this;return{...this.majorTickFormat,era:this.majorTickFormat?.year?t:void 0,timeZone:e}}get _dateFormat(){let{era:t,timeZone:e}=this;return{...T("short-date"),era:t,timeZone:e}}get _dateTimeFormat(){let{era:t,timeZone:e}=this;return{...T("short-date"),...T("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 _timeFormat(){let{timeZone:t}=this;return{...T("long-time"),timeZone:t}}get effectiveStops(){let{fullTimeExtent:t,stops:e}=this;if(!e)return;if($(e)){let{dates:n}=e;if(!n?.length)return;let u=n.sort((g,y)=>g.getTime()-y.getTime());if(!t?.start||!t?.end)return u;let{start:c,end:m}=t,p=c.getTime(),f=m.getTime();return u.filter(g=>{let y=g.getTime();return y>=p&&y<=f})}let a=e.timeExtent??t;if(a)return S(e)?X(a,e.count):tt(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")}get isOutOfRange(){let{timeExtent:t,fullTimeExtent:e}=this,{start:a,end:n}=e??{};if(!a||!n||!t||t.isAllTime||t.isEmpty)return!0;let{start:u,end:c}=t??{},m=u!=null&&(u<a||u>n),p=c!=null&&(c>n||c<a);return m||p}get majorTickFormatter(){return t=>this._formatDate(t,this._adjustedMajorTickFormat)}set playRate(t){t<=0||t>1e3*60*60||(this.state==="playing"&&v(this,h,Z).call(this),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}get tickFormats(){return xt(this.timeZone)}get timeZone(){return this._userTimeZone??this.viewTimeZone??U}set timeZone(t){this._userTimeZone=t??void 0}get viewTimeZone(){return this.view?.type==="2d"?this.view.timeZone:void 0}destroy(){D(this,b).abort(),this.view?.unregisterComponent(this),v(this,h,_).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)}getTickValues(t){let{fullTimeExtent:e,timeZone:a}=this;if(!e)return[];let{start:n,end:u}=e;return!n||!u?[]:et(n,u,t,a).map(c=>c.getTime())}async initialize(){this.addHandles([w(()=>this.effectiveStops,t=>{t&&(this.timeExtent??=k(t,this.mode))},{initial:!0}),w(()=>this.timeExtent,t=>{!this.view||this.view.timeExtent&&t?.equals(this.view.timeExtent)||(!t||t.isAllTime)&&(!this.view.timeExtent||this.view.timeExtent.isAllTime)||(this.view.timeExtent=t)},{initial:!0}),w(()=>this.view,t=>{t?.timeExtent&&(this.timeExtent=t.timeExtent)}),w(()=>this.view,(t,e)=>{e?.unregisterComponent(this),t?.registerComponent(this)},{initial:!0,sync:!0}),w(()=>this.view?.timeExtent,t=>{!t||t.equals(this.timeExtent)||t.isAllTime&&(!this.timeExtent||this.timeExtent.isAllTime)||(this.timeExtent=t??void 0)}),w(()=>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 x({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-start":this.timeExtent=new x({start:null,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-end":this.timeExtent=new x({start:this.timeExtent.start??this.timeExtent.end,end:null});break;case"instant":this.timeExtent=new x({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.start??this.timeExtent.end});break}})]),await K((async()=>{if(await at(()=>this.view?.ready,{signal:D(this,b).signal}),this.loadPersistedSettingsDisabled)return;let t=await ht(this.view?.map,D(this,b).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(){v(this,h,E).call(this,{forward:!0,allowRestart:!1})}play(){v(this,h,Z).call(this)}previous(){v(this,h,E).call(this,{forward:!1,allowRestart:!1})}stop(){v(this,h,_).call(this)}updateWebDocument(t){if(this.savePersistedSettingsDisabled)return;let e=new mt({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:S(this.stops)?this.stops.count:null,numThumbs:this.mode==="time-window"?2:1,stopDelay:this.playRate,stopInterval:Q(this.stops)?this.stops.interval:null,stops:$(this.stops)?this.stops.dates:null});t.widgets??=new ct,t.widgets.timeSlider=e}_formatDate(t,e){return gt({locale:this.locale,formatOptions:e}).format(t)}_formatNumber(t,e){return ft({locale:this.locale,formatOptions:e}).format(t)}};b=new WeakMap;h=new WeakSet;P=async function(){try{let{view:t}=this,e=this._animationController?.signal;await Promise.all([V(this.playRate,e),t&&at(()=>!t.updating,e)])}catch(t){q(t)||j("error","arcgis-slider-time","animation error",{detail:{error:t}}),this._animationController=void 0;return}v(this,h,E).call(this,{forward:!0,allowRestart:!1}),this._animationController&&v(this,h,P).call(this)};Z=function(){v(this,h,_).call(this),this._animationController=new AbortController,v(this,h,E).call(this,{forward:!0,allowRestart:!0}),v(this,h,P).call(this)};E=function({forward:t,allowRestart:e}){let{_thumbPositions:a,effectiveStopsEpoch:n}=this;if(!a||!n)return;let u=a.map(m=>{let p=n.indexOf(m);if(p!==-1)return p;let f=n.reduce((g,y)=>Math.abs(y-m)<Math.abs(g-m)?y:g);return n.indexOf(f)}),c=u.map(m=>m+=t?1:-1);if(c.some(m=>m<0||m>n.length-1))if(this.loop||e){let m=Math.min(...u),p=Math.max(...u),f=(t?u.map(g=>g-m):u.map(g=>g+(n.length-1-p))).map(g=>n[g]);this.timeExtent=v(this,h,F).call(this,f)}else this.state==="playing"&&this.stop();else{let m=c.map(p=>n[p]);this.timeExtent=v(this,h,F).call(this,m)}};_=function(){this._animationController?.abort(),this._animationController=void 0};F=function(t){if(!t)return;let e=[...t].sort((a,n)=>a-n).map(a=>new Date(a));return k(e,this.mode)};r([l()],o.prototype,"_adjustedMajorTickFormat",1);r([l()],o.prototype,"_animationController",2);r([l()],o.prototype,"_dateFormat",1);r([l()],o.prototype,"_dateTimeFormat",1);r([l()],o.prototype,"_thumbPositions",1);r([l()],o.prototype,"_timeFormat",1);r([l()],o.prototype,"_userTimeZone",2);r([l()],o.prototype,"disabled",2);r([l()],o.prototype,"effectiveStops",1);r([l()],o.prototype,"effectiveStopsEpoch",1);r([l()],o.prototype,"era",1);r([l()],o.prototype,"format",2);r([l({type:x})],o.prototype,"fullTimeExtent",2);r([l()],o.prototype,"interactive",1);r([l()],o.prototype,"isOutOfRange",1);r([l()],o.prototype,"loadPersistedSettingsDisabled",2);r([l()],o.prototype,"locale",2);r([l()],o.prototype,"loop",2);r([l()],o.prototype,"majorTickFormat",2);r([l()],o.prototype,"majorTickFormatter",1);r([l()],o.prototype,"mode",2);r([l({value:1e3})],o.prototype,"playRate",1);r([l()],o.prototype,"savePersistedSettingsDisabled",2);r([l()],o.prototype,"state",1);r([l({cast:J})],o.prototype,"stops",2);r([l()],o.prototype,"tickFormats",1);r([l({type:x})],o.prototype,"timeExtent",2);r([l()],o.prototype,"timeZone",1);r([l()],o.prototype,"view",2);r([l()],o.prototype,"viewTimeZone",1);o=r([dt("components.time-bar.TimeBarViewModel")],o);var Tt=R`: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;--arcgis-time-bar-shadow: none}::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: var(--arcgis-time-bar-shadow);--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))}`,_t=L(o),O=class extends z{constructor(){super(...arguments),this._viewModel=_t(this),this.messages=H({name:"time-bar",blocking:!0}),this.#t=A(),this.#e=B(),this.#i=e=>{this._settingsActionElement=e},this.autoDestroyDisabled=!1,this.disabled=this._viewModel.disabled,this.effectiveStops=this._viewModel.effectiveStops,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.savePersistedSettingsDisabled=this._viewModel.savePersistedSettingsDisabled,this.showNext=!1,this.showPlay=!1,this.showPrevious=!1,this.showSettings=!1,this.state=this._viewModel.state,this.stops=this._viewModel.stops,this.timeExtent=this._viewModel.timeExtent,this.timeZone=this._viewModel.timeZone,this.toolbarKind="floating",this.view=this._viewModel.view,this.arcgisPropertyChange=I()("effectiveStops","fullTimeExtent","state","timeExtent"),this.arcgisReady=C()}static{this.properties={_settingsActionElement:16,autoDestroyDisabled:5,disabled:5,effectiveStops:32,format:1,fullTimeExtent:0,icon:1,label:1,loadPersistedSettingsDisabled:5,loop:5,messageOverrides:0,mode:1,playRate:9,referenceElement:1,savePersistedSettingsDisabled:5,showNext:5,showPlay:5,showPrevious:5,showSettings:5,state:32,stops:0,timeExtent:0,timeZone:1,toolbarKind:1,view:0}}static{this.styles=Tt}#t;#e;#i;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,n=N(a).at(0)??a.querySelector("arcgis-time-bar-extent");n&&(n.viewModel=this._viewModel)}async#c(){switch(this.state){case"disabled":case"playing":return await this.stop();case"ready":return await this.play()}}render(){return d`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-disabled .floating=${this.toolbarKind==="floating"}>${this.#e==="ltr"?d`${this.#a()}${this.#u()}${this.#l()}${this.#s()}`:d`${this.#l()}${this.#u()}${this.#a()}${this.#s()}`}</calcite-action-bar></div>`}#s(){return d`<slot name=actions-end slot=actions-end></slot>`}#a(){return this.showPrevious||this.showPlay||this.showNext?d`<calcite-action-group>${this.#e==="ltr"?d`${this.#o()}${this.#r()}${this.#n()}`:d`${this.#n()}${this.#r()}${this.#o()}`}</calcite-action-group>`:null}#n(){return this.showNext?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"} icon=forward @click=${this.next} .text=${this.messages.next}></calcite-action>`:null}#o(){return this.showPlay?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length} .icon=${this.state==="playing"?"pause-f":"play-f"} @click=${this.#c} .text=${this.state==="playing"?this.messages.stop:this.messages.play}></calcite-action>`:null}#r(){return this.showPrevious?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"} icon=reverse @click=${this.previous} .text=${this.messages.previous}></calcite-action>`:null}#l(){return this.showSettings?d`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal ${M(this.#i)}></calcite-action>${this._settingsActionElement?d`<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 class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${M(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>`:void 0}</calcite-action-group>`:null}#u(){return d`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#m}><arcgis-time-bar-extent class="label" .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`}};W("arcgis-time-bar",O);return O},"core/Accessor","time/TimeExtent","webdoc/widgets/TimeSlider","webdoc/Widgets","intl","time/TimeInterval","support/timeUtils","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,e,f,g)
|