@arcgis/map-components 5.2.0-next.147 → 5.2.0-next.149
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/2SNOYPTJ.js +2 -0
- package/dist/cdn/{2COOBXHG.js → 5K2YXXCE.js} +1 -1
- package/dist/cdn/{QOQRNYM5.js → 6YP2FZDY.js} +1 -1
- package/dist/cdn/{7UWE25UH.js → BOJOJ5VV.js} +1 -1
- package/dist/cdn/I3KUEZ7I.js +2 -0
- package/dist/cdn/J7YDON4X.js +2 -0
- package/dist/cdn/KVN3M4C6.js +2 -0
- package/dist/cdn/{3JRPMLOZ.js → LOIUI4KA.js} +1 -1
- package/dist/cdn/RZNCVTKT.js +2 -0
- package/dist/cdn/X3DYJCL3.js +2 -0
- package/dist/cdn/ZPWEX7I6.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +120 -106
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +3 -3
- package/dist/components/arcgis-editor/customElement.d.ts +10 -0
- package/dist/components/arcgis-editor/customElement.js +3 -0
- package/dist/components/arcgis-elevation-profile/customElement.js +93 -89
- package/dist/components/arcgis-features/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-features-next/customElement.js +102 -92
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-link-chart/customElement.d.ts +20 -10
- package/dist/components/arcgis-link-chart/customElement.js +5 -5
- package/dist/components/arcgis-map/customElement.d.ts +22 -12
- package/dist/components/arcgis-map/customElement.js +9 -9
- package/dist/components/arcgis-popup/customElement.d.ts +2 -2
- package/dist/components/arcgis-popup/customElement.js +32 -28
- package/dist/components/arcgis-scene/customElement.d.ts +20 -10
- package/dist/components/arcgis-scene/customElement.js +9 -9
- package/dist/components/arcgis-table-list-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-time-bar/customElement.js +23 -24
- package/dist/components/arcgis-time-bar-slider/customElement.js +46 -45
- package/dist/components/arcgis-video/customElement.js +6 -6
- 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 +4 -4
- package/dist/types/lumina.d.ts +3 -3
- package/dist/types/preact.d.ts +3 -3
- package/dist/types/react.d.ts +3 -3
- package/dist/types/stencil.d.ts +3 -3
- package/package.json +6 -6
- package/dist/cdn/3KZAH5OY.js +0 -2
- package/dist/cdn/63FA3UEL.js +0 -2
- package/dist/cdn/AENNGCAE.js +0 -2
- package/dist/cdn/IETZFE3P.js +0 -2
- package/dist/cdn/JRQYT5SI.js +0 -2
- package/dist/cdn/NBDQBLRI.js +0 -2
- package/dist/cdn/R6HUY6QI.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as q } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as H, html as p, nothing as
|
|
3
|
+
import { css as H, html as p, nothing as b } from "lit";
|
|
4
4
|
import j from "@arcgis/core/core/Accessor.js";
|
|
5
5
|
import f from "@arcgis/core/time/TimeExtent.js";
|
|
6
6
|
import L from "@arcgis/core/webdoc/widgets/TimeSlider.js";
|
|
@@ -22,7 +22,7 @@ import { useDirection as vt, usePropertyChange as gt } from "@arcgis/lumina/cont
|
|
|
22
22
|
import { u as ft } from "../../chunks/useT9n.js";
|
|
23
23
|
const z = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap();
|
|
24
24
|
function yt(t) {
|
|
25
|
-
const { locale: e, formatOptions: a } = t, n =
|
|
25
|
+
const { locale: e, formatOptions: a } = t, n = bt(a), c = new Intl.DateTimeFormat(e, n);
|
|
26
26
|
return z.set(t, c), c;
|
|
27
27
|
}
|
|
28
28
|
function wt(t) {
|
|
@@ -32,10 +32,10 @@ function wt(t) {
|
|
|
32
32
|
function xt(t) {
|
|
33
33
|
return z.get(t) ?? yt(t);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function _t(t) {
|
|
36
36
|
return W.get(t) ?? wt(t);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function bt(t) {
|
|
39
39
|
return t.timeZone ? {
|
|
40
40
|
...t,
|
|
41
41
|
timeZone: st(t.timeZone)
|
|
@@ -189,13 +189,13 @@ let o = class extends j {
|
|
|
189
189
|
const { dates: n } = e;
|
|
190
190
|
if (!n?.length)
|
|
191
191
|
return;
|
|
192
|
-
const c = n.sort(($,
|
|
192
|
+
const c = n.sort(($, _) => $.getTime() - _.getTime());
|
|
193
193
|
if (!t?.start || !t?.end)
|
|
194
194
|
return c;
|
|
195
195
|
const { start: h, end: u } = t, y = h.getTime(), v = u.getTime();
|
|
196
196
|
return c.filter(($) => {
|
|
197
|
-
const
|
|
198
|
-
return
|
|
197
|
+
const _ = $.getTime();
|
|
198
|
+
return _ >= y && _ <= v;
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
const a = e.timeExtent ?? t;
|
|
@@ -377,7 +377,7 @@ let o = class extends j {
|
|
|
377
377
|
return xt({ locale: this.locale, formatOptions: e }).format(t);
|
|
378
378
|
}
|
|
379
379
|
_formatNumber(t, e) {
|
|
380
|
-
return
|
|
380
|
+
return _t({ locale: this.locale, formatOptions: e }).format(t);
|
|
381
381
|
}
|
|
382
382
|
//#endregion
|
|
383
383
|
};
|
|
@@ -532,7 +532,7 @@ o = r([
|
|
|
532
532
|
const Dt = H`: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-view-corner-radius: var(--arcgis-view-corner-radius, 0px);--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 = pt(o);
|
|
533
533
|
class kt extends ht {
|
|
534
534
|
constructor() {
|
|
535
|
-
super(...arguments), this._viewModel = Pt(this), this.messages = ft({ name: "time-bar", blocking: !0 }), this.#t = ut(), this.#e =
|
|
535
|
+
super(...arguments), this._direction = vt(), this._viewModel = Pt(this), this.messages = ft({ name: "time-bar", blocking: !0 }), this.#t = ut(), this.#e = (e) => {
|
|
536
536
|
this._settingsActionElement = e;
|
|
537
537
|
}, 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 = gt()("effectiveStops", "fullTimeExtent", "state", "timeExtent"), this.arcgisReady = mt();
|
|
538
538
|
}
|
|
@@ -544,7 +544,6 @@ class kt extends ht {
|
|
|
544
544
|
}
|
|
545
545
|
#t;
|
|
546
546
|
#e;
|
|
547
|
-
#i;
|
|
548
547
|
async applyTimeSettings(e) {
|
|
549
548
|
this._viewModel.set(e);
|
|
550
549
|
}
|
|
@@ -569,7 +568,7 @@ class kt extends ht {
|
|
|
569
568
|
willUpdate(e) {
|
|
570
569
|
e.has("messages") && (this._viewModel.locale = this.messages._lang);
|
|
571
570
|
}
|
|
572
|
-
#
|
|
571
|
+
#h(e) {
|
|
573
572
|
const { currentTarget: a } = e, n = (
|
|
574
573
|
// prioritizes slotted element (if it exists)
|
|
575
574
|
dt(a).at(0) ?? // fallback to default label
|
|
@@ -577,7 +576,7 @@ class kt extends ht {
|
|
|
577
576
|
);
|
|
578
577
|
n && (n.messages = this.messages, n.viewModel = this._viewModel);
|
|
579
578
|
}
|
|
580
|
-
async #
|
|
579
|
+
async #m() {
|
|
581
580
|
switch (this.state) {
|
|
582
581
|
case "disabled":
|
|
583
582
|
case "playing":
|
|
@@ -587,33 +586,33 @@ class kt extends ht {
|
|
|
587
586
|
}
|
|
588
587
|
}
|
|
589
588
|
render() {
|
|
590
|
-
return p`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-toggle-disabled .floating=${this.floating} overflow-mode=none>${this
|
|
589
|
+
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>`;
|
|
591
590
|
}
|
|
592
|
-
#
|
|
591
|
+
#i() {
|
|
593
592
|
return this.showNext || this.showPlay || this.showPrevious || this.showTimeExtent || this.showSettings ? null : p`<calcite-action disabled .text=${this.messages.componentLabel} text-enabled></calcite-action>`;
|
|
594
593
|
}
|
|
595
|
-
#
|
|
594
|
+
#s() {
|
|
596
595
|
return p`<slot name=actions-end slot=actions-end></slot>`;
|
|
597
596
|
}
|
|
597
|
+
#a() {
|
|
598
|
+
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;
|
|
599
|
+
}
|
|
598
600
|
#n() {
|
|
599
|
-
return this.
|
|
601
|
+
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 ?? b}></calcite-action>` : null;
|
|
600
602
|
}
|
|
601
603
|
#o() {
|
|
602
|
-
return this.
|
|
604
|
+
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.#m} .text=${this.state === "playing" ? this.messages.stop : this.messages.play} title=${(this.state === "playing" ? this.messages.stop : this.messages.play) ?? b}></calcite-action>` : null;
|
|
603
605
|
}
|
|
604
606
|
#r() {
|
|
605
|
-
return this.
|
|
607
|
+
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 ?? b}></calcite-action>` : null;
|
|
606
608
|
}
|
|
607
609
|
#l() {
|
|
608
|
-
return this.
|
|
609
|
-
}
|
|
610
|
-
#c() {
|
|
611
|
-
return this.showSettings ? p`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal title=${this.messages.settings ?? _} ${I(this.#i)}></calcite-action>${this._settingsActionElement ? p`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${() => {
|
|
610
|
+
return this.showSettings ? p`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal title=${this.messages.settings ?? b} ${I(this.#e)}></calcite-action>${this._settingsActionElement ? p`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${() => {
|
|
612
611
|
this.#t.value?.navigateToOverview();
|
|
613
612
|
}} overlay-positioning=fixed><slot name=settings><arcgis-time-bar-settings .autoDestroyDisabled=${this.autoDestroyDisabled} class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${I(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>` : void 0}</calcite-action-group>` : null;
|
|
614
613
|
}
|
|
615
|
-
#
|
|
616
|
-
return this.showTimeExtent ? p`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#
|
|
614
|
+
#c() {
|
|
615
|
+
return this.showTimeExtent ? p`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#h}><arcgis-time-bar-extent .autoDestroyDisabled=${this.autoDestroyDisabled} class="label" .messages=${this.messages} .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>` : null;
|
|
617
616
|
}
|
|
618
617
|
}
|
|
619
618
|
q("arcgis-time-bar", kt);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as d } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as m, html as
|
|
3
|
+
import { css as m, html as a } from "lit";
|
|
4
4
|
import { ref as u } from "lit/directives/ref.js";
|
|
5
5
|
import l from "@arcgis/core/time/TimeExtent.js";
|
|
6
|
-
import { LitElement as h, nothing as
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { LitElement as h, nothing as g, safeClassMap as v } from "@arcgis/lumina";
|
|
7
|
+
import { useDirection as w } from "@arcgis/lumina/controllers";
|
|
8
|
+
const p = m`: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)}}`;
|
|
9
|
+
class f extends h {
|
|
9
10
|
constructor() {
|
|
10
|
-
super(...arguments), this.#t = new ResizeObserver(([e]) => {
|
|
11
|
+
super(...arguments), this._direction = w(), this.#t = new ResizeObserver(([e]) => {
|
|
11
12
|
this._sliderWidth = e.contentRect.width;
|
|
12
13
|
}), this.#a = 100, this.#r = 100, this.#n = (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;
|
|
13
14
|
}
|
|
@@ -15,7 +16,7 @@ class p extends h {
|
|
|
15
16
|
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 };
|
|
16
17
|
}
|
|
17
18
|
static {
|
|
18
|
-
this.styles =
|
|
19
|
+
this.styles = p;
|
|
19
20
|
}
|
|
20
21
|
#t;
|
|
21
22
|
#i;
|
|
@@ -46,8 +47,8 @@ class p extends h {
|
|
|
46
47
|
const { start: t, end: s } = i;
|
|
47
48
|
if (!t || !s)
|
|
48
49
|
return;
|
|
49
|
-
const { timeExtent:
|
|
50
|
-
if (!
|
|
50
|
+
const { timeExtent: r } = e;
|
|
51
|
+
if (!r)
|
|
51
52
|
switch (e.mode) {
|
|
52
53
|
case "cumulative-from-end":
|
|
53
54
|
case "instant":
|
|
@@ -57,7 +58,7 @@ class p extends h {
|
|
|
57
58
|
case "time-window":
|
|
58
59
|
return [t.getTime(), s.getTime()];
|
|
59
60
|
}
|
|
60
|
-
const { start: o, end: n } =
|
|
61
|
+
const { start: o, end: n } = r;
|
|
61
62
|
switch (e.mode) {
|
|
62
63
|
case "cumulative-from-end":
|
|
63
64
|
case "instant":
|
|
@@ -88,7 +89,7 @@ class p extends h {
|
|
|
88
89
|
async destroy() {
|
|
89
90
|
await this.manager.destroy();
|
|
90
91
|
}
|
|
91
|
-
#
|
|
92
|
+
#m() {
|
|
92
93
|
return (e) => {
|
|
93
94
|
if (e) {
|
|
94
95
|
this.#e = e, this.#t.observe(e);
|
|
@@ -97,28 +98,28 @@ class p extends h {
|
|
|
97
98
|
this.#e && (this.#t.unobserve(this.#e), this.#e = void 0);
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
|
-
#
|
|
101
|
+
#u() {
|
|
101
102
|
const e = Number.parseInt(window.getComputedStyle(this.el).getPropertyValue("--arcgis-internal-time-bar-slider-tick-gap"), 10);
|
|
102
103
|
return Number.isFinite(e) && e > 0 ? e : this.#a;
|
|
103
104
|
}
|
|
104
|
-
#
|
|
105
|
-
const { viewModel: t } = this, { start: s, end:
|
|
106
|
-
if (!t || !s || !
|
|
105
|
+
#h(e, i) {
|
|
106
|
+
const { viewModel: t } = this, { start: s, end: r } = e;
|
|
107
|
+
if (!t || !s || !r)
|
|
107
108
|
return;
|
|
108
|
-
const n = (
|
|
109
|
-
return t.tickFormats.find(({ duration: c }) => c > this.#
|
|
109
|
+
const n = (r.getTime() - s.getTime()) / i;
|
|
110
|
+
return t.tickFormats.find(({ duration: c }) => c > this.#u() * n) ?? t.tickFormats.at(-1);
|
|
110
111
|
}
|
|
111
|
-
#
|
|
112
|
+
#g() {
|
|
112
113
|
this.lockTimeWindow = !this.lockTimeWindow;
|
|
113
114
|
}
|
|
114
|
-
#
|
|
115
|
+
#v(e) {
|
|
115
116
|
this._activeValue = e.target.activeValue;
|
|
116
117
|
}
|
|
117
|
-
#
|
|
118
|
+
#w(e) {
|
|
118
119
|
const { viewModel: i } = this, t = i?.mode;
|
|
119
|
-
t && (i.timeExtent = this.#
|
|
120
|
+
t && (i.timeExtent = this.#p(e.target.values, t), this._activeValue = e.target.activeValue);
|
|
120
121
|
}
|
|
121
|
-
#
|
|
122
|
+
#p([e, i], t) {
|
|
122
123
|
switch (t) {
|
|
123
124
|
case "cumulative-from-end":
|
|
124
125
|
return new l({ start: new Date(e), end: null });
|
|
@@ -130,25 +131,25 @@ class p extends h {
|
|
|
130
131
|
return new l({ start: new Date(e), end: new Date(i ?? e) });
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
|
-
#
|
|
134
|
+
#o() {
|
|
134
135
|
const { messages: e, showLockTimeWindow: i, viewModel: t } = this;
|
|
135
136
|
if (!e || !i || !t)
|
|
136
137
|
return null;
|
|
137
|
-
const s = this.lockTimeWindow ? "lock" : "unlock",
|
|
138
|
-
return
|
|
138
|
+
const s = this.lockTimeWindow ? "lock" : "unlock", r = this.lockTimeWindow ? e.unlockTimeWindow : e.lockTimeWindow;
|
|
139
|
+
return a`<calcite-action .active=${this.lockTimeWindow} class="lock-time-window" .disabled=${t.disabled || t.mode !== "time-window"} .icon=${s} @click=${this.#g} .text=${r} title=${r ?? g}></calcite-action>`;
|
|
139
140
|
}
|
|
140
|
-
#
|
|
141
|
+
#l() {
|
|
141
142
|
const e = this.viewModel?.fullTimeExtent?.end;
|
|
142
|
-
return this.showMax && e ?
|
|
143
|
+
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>`;
|
|
143
144
|
}
|
|
144
|
-
#
|
|
145
|
+
#c() {
|
|
145
146
|
const e = this.viewModel?.fullTimeExtent?.start;
|
|
146
|
-
return this.showMin && e ?
|
|
147
|
-
}
|
|
148
|
-
#p() {
|
|
149
|
-
return this.popoverDisplay !== "none" ? r`<div class="popover" slot=popover><slot name=popover>${this.#f()}</slot></div>` : null;
|
|
147
|
+
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>`;
|
|
150
148
|
}
|
|
151
149
|
#f() {
|
|
150
|
+
return this.popoverDisplay !== "none" ? a`<div class="popover" slot=popover><slot name=popover>${this.#b()}</slot></div>` : null;
|
|
151
|
+
}
|
|
152
|
+
#b() {
|
|
152
153
|
const { activeValue: e, messages: i, viewModel: t } = this;
|
|
153
154
|
if (!e || !i || !t)
|
|
154
155
|
return null;
|
|
@@ -156,37 +157,37 @@ class p extends h {
|
|
|
156
157
|
case "cumulative-from-end":
|
|
157
158
|
case "instant":
|
|
158
159
|
const s = t.timeExtent?.start;
|
|
159
|
-
return s ?
|
|
160
|
+
return s ? a`<arcgis-time-bar-date .autoDestroyDisabled=${this.autoDestroyDisabled} .date=${s} .viewModel=${t}></arcgis-time-bar-date>` : null;
|
|
160
161
|
case "cumulative-from-start":
|
|
161
|
-
const
|
|
162
|
-
return
|
|
162
|
+
const r = t.timeExtent?.end;
|
|
163
|
+
return r ? a`<arcgis-time-bar-date .autoDestroyDisabled=${this.autoDestroyDisabled} .date=${r} .viewModel=${t}></arcgis-time-bar-date>` : null;
|
|
163
164
|
case "time-window":
|
|
164
|
-
return e instanceof Date ?
|
|
165
|
+
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>`;
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
|
-
#
|
|
168
|
+
#d() {
|
|
168
169
|
const { messages: e, viewModel: i } = this;
|
|
169
170
|
if (!i?.fullTimeExtent?.start || !i?.fullTimeExtent?.end || !e)
|
|
170
171
|
return null;
|
|
171
|
-
const t = this.#
|
|
172
|
+
const t = this.#h(i.fullTimeExtent, this._sliderWidth ?? this.#r);
|
|
172
173
|
if (!t)
|
|
173
174
|
return null;
|
|
174
175
|
(!this.#i || !this.#s || this.#i !== t) && (this.#i = t, this.#s = i.getTickValues(t.timeInterval), i.tickFormat = t.format);
|
|
175
|
-
const s = i.fullTimeExtent.start.getTime(),
|
|
176
|
-
return
|
|
176
|
+
const s = i.fullTimeExtent.start.getTime(), r = i.fullTimeExtent.end.getTime();
|
|
177
|
+
return a`<div class="slider-container" ${u(this.#m())}><arcgis-slider allow-values-overlap .autoDestroyDisabled=${this.autoDestroyDisabled} class=${v({
|
|
177
178
|
slider: !0,
|
|
178
179
|
"slider--has-ticks": this.showTicks,
|
|
179
180
|
"slider--out-of-range": i.isOutOfRange
|
|
180
|
-
})} .disabled=${!i.interactive} .fillPlacement=${this._sliderFillPlacement} .labelFormatter=${this.#n} .max=${
|
|
181
|
+
})} .disabled=${!i.interactive} .fillPlacement=${this._sliderFillPlacement} .labelFormatter=${this.#n} .max=${r} .min=${s} @arcgisActiveValueChange=${this.#v} @arcgisInput=${this.#w} .popoverLabel=${e.timeExtent} .popoverDisplay=${this.popoverDisplay === "none" ? "auto" : this.popoverDisplay} precision=0 .steps=${i.effectiveStopsEpoch} .values=${this._timeExtentEpochValues} .valuesDraggingDisabled=${this.lockTimeWindow}>${this.#f()}${this.#k(i, s, r)}</arcgis-slider></div>`;
|
|
181
182
|
}
|
|
182
|
-
#
|
|
183
|
-
return this.showTicks ?
|
|
183
|
+
#k(e, i, t) {
|
|
184
|
+
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=${this.#s}></arcgis-ticks></slot></div>` : null;
|
|
184
185
|
}
|
|
185
186
|
render() {
|
|
186
|
-
return
|
|
187
|
+
return a`<div class="root">${this._direction === "ltr" ? a`${this.#o()}${this.#c()}${this.#d()}${this.#l()}` : a`${this.#l()}${this.#d()}${this.#c()}${this.#o()}`}</div>`;
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
|
-
d("arcgis-time-bar-slider",
|
|
190
|
+
d("arcgis-time-bar-slider", f);
|
|
190
191
|
export {
|
|
191
|
-
|
|
192
|
+
f as ArcgisTimeBarSlider
|
|
192
193
|
};
|
|
@@ -8,10 +8,10 @@ import { LitElement as c, createEvent as m, safeClassMap as d } from "@arcgis/lu
|
|
|
8
8
|
import { makeAccessorController as f } from "@arcgis/lumina-toolkit/useAccessor";
|
|
9
9
|
import { createRef as s, ref as a } from "lit/directives/ref.js";
|
|
10
10
|
import { C as r } from "../../chunks/resources.js";
|
|
11
|
-
import { c as p, s as y, S as
|
|
12
|
-
import { s as
|
|
13
|
-
const
|
|
14
|
-
omitProps: ["container", "
|
|
11
|
+
import { c as p, s as y, S as u } from "../../chunks/slots.js";
|
|
12
|
+
import { s as w } from "../../chunks/esri-main.js";
|
|
13
|
+
const v = h`:host{width:100%;height:100%}`, R = f(l, {
|
|
14
|
+
omitProps: ["container", "focusRegionVisible", "focusRegionShortcutEnabled", "navigation", "scale", "ui"]
|
|
15
15
|
});
|
|
16
16
|
class g extends c {
|
|
17
17
|
constructor() {
|
|
@@ -21,7 +21,7 @@ class g extends c {
|
|
|
21
21
|
this.properties = { autoDestroyDisabled: 5, view: 32, aria: 0, attributionMode: 1, ready: 36, layer: 0, map: 0, operationalDataVisible: 5 };
|
|
22
22
|
}
|
|
23
23
|
static {
|
|
24
|
-
this.styles = [
|
|
24
|
+
this.styles = [w, y, v];
|
|
25
25
|
}
|
|
26
26
|
get aria() {
|
|
27
27
|
return this.view?.aria;
|
|
@@ -47,7 +47,7 @@ class g extends c {
|
|
|
47
47
|
return e`<div class=${`root ${r.base}`} ${a(this._mapRef)}></div>`;
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return e`${this.renderMain()}<section class=${d(r.containerUI)} ${a(this._containerRef)}>${
|
|
50
|
+
return e`${this.renderMain()}<section class=${d(r.containerUI)} ${a(this._containerRef)}>${u({ direction: this._direction, slotGroupRefs: this._slotGroupRefs })}</section>`;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
o("arcgis-video", g);
|