@arcgis/map-components 5.2.0-next.102 → 5.2.0-next.104
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/{YVQJ4XD4.js → 3IQBOCXJ.js} +1 -1
- package/dist/cdn/{S7JDLOX2.js → 4J23LF6M.js} +1 -1
- package/dist/cdn/{J624KHFL.js → 4R53HBKQ.js} +1 -1
- package/dist/cdn/{A3KD2UAY.js → 5ASN6KWI.js} +1 -1
- package/dist/cdn/{GGKOLSCH.js → 6AUGGEEP.js} +1 -1
- package/dist/cdn/{YEN7K65V.js → 7HFQ4IJ2.js} +1 -1
- package/dist/cdn/{ZUWNZX6G.js → BCGLGOZZ.js} +1 -1
- package/dist/cdn/EBPGSTIL.js +2 -0
- package/dist/cdn/{TZEAPNBI.js → IFJS7BSY.js} +1 -1
- package/dist/cdn/{KJTWHP5I.js → ITQE4OCT.js} +1 -1
- package/dist/cdn/{4YU2AF7S.js → M4IP3YJG.js} +1 -1
- package/dist/cdn/PBIEHFTW.js +2 -0
- package/dist/cdn/{GLMK45AB.js → PCQRHDV6.js} +1 -1
- package/dist/cdn/{6ZE7BJTS.js → R2WAEZ4G.js} +1 -1
- package/dist/cdn/{DVGE5VPK.js → S3U3C6H7.js} +1 -1
- package/dist/cdn/{3AIQYNSA.js → SWSQAOGC.js} +1 -1
- package/dist/cdn/{ZCRUGROJ.js → SXAPY3VV.js} +1 -1
- package/dist/cdn/{VULA5TJD.js → TROUKXL3.js} +1 -1
- package/dist/cdn/US6Z6V5I.js +2 -0
- package/dist/cdn/VB64Q5DB.js +2 -0
- package/dist/cdn/WNZ2XRBD.js +2 -0
- package/dist/cdn/{WAFRMU5C.js → WUHDP2W5.js} +1 -1
- package/dist/cdn/{HJ7TFEPK.js → YSWBEPQF.js} +2 -2
- package/dist/cdn/{BZGHEINJ.js → ZO4SS6VB.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/slots.js +1 -1
- package/dist/components/arcgis-editor/customElement.d.ts +8 -2
- package/dist/components/arcgis-editor/customElement.js +2 -2
- package/dist/components/arcgis-layer-list-next/customElement.js +12 -7
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +2 -2
- package/dist/components/arcgis-time-bar/customElement.js +147 -146
- package/dist/components/arcgis-time-bar/types.d.ts +1 -2
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +1 -0
- package/dist/components/arcgis-time-bar-slider/customElement.js +53 -57
- 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/package.json +6 -6
- package/dist/cdn/65FGHESR.js +0 -2
- package/dist/cdn/EDGLEFG3.js +0 -2
- package/dist/cdn/F2ZADKF4.js +0 -2
- package/dist/cdn/SA4IYYIE.js +0 -2
- package/dist/cdn/ZABYV3VA.js +0 -2
- /package/dist/cdn/{6RT7GRX4.js → 2YXG2UVO.js} +0 -0
- /package/dist/cdn/{AA2HLLIM.js → 3477AJGP.js} +0 -0
- /package/dist/cdn/{2ZG7S6GM.js → 46RONL5G.js} +0 -0
- /package/dist/cdn/{GJAC7GKP.js → 4TMO432K.js} +0 -0
- /package/dist/cdn/{4J6DMRVO.js → 4TXSVEFQ.js} +0 -0
- /package/dist/cdn/{TKEBTPPA.js → 5D7JP2MD.js} +0 -0
- /package/dist/cdn/{7JKYXV7H.js → 6AXSN2JJ.js} +0 -0
- /package/dist/cdn/{QJBQ3JLC.js → 6T2UQ2JE.js} +0 -0
- /package/dist/cdn/{6B4ROFUM.js → 7BTU3W4U.js} +0 -0
- /package/dist/cdn/{E3AEBH36.js → AH7T5E6X.js} +0 -0
- /package/dist/cdn/{DSPV4EIK.js → ATBK5KMZ.js} +0 -0
- /package/dist/cdn/{D2FVI5JG.js → BN7OHAZB.js} +0 -0
- /package/dist/cdn/{657KH5W3.js → C66EUSNM.js} +0 -0
- /package/dist/cdn/{HRTVHZHG.js → EHCISJXP.js} +0 -0
- /package/dist/cdn/{G7DHB4QN.js → F5GIAKDV.js} +0 -0
- /package/dist/cdn/{YWQU6EBN.js → H6I3JKBD.js} +0 -0
- /package/dist/cdn/{H3RDAWS7.js → HMK6VULW.js} +0 -0
- /package/dist/cdn/{JU4MCJPU.js → I4D3VLLY.js} +0 -0
- /package/dist/cdn/{HDYBFSI5.js → K2MQIU34.js} +0 -0
- /package/dist/cdn/{OTTKYEPK.js → K3DQPSQI.js} +0 -0
- /package/dist/cdn/{TTBQBEDS.js → NXYIGLH3.js} +0 -0
- /package/dist/cdn/{SE4NXMGA.js → O5WV2YAQ.js} +0 -0
- /package/dist/cdn/{D5LP3DJA.js → OTQZC2PT.js} +0 -0
- /package/dist/cdn/{SOOVHYLT.js → P3ZJGUIA.js} +0 -0
- /package/dist/cdn/{3VWL4SN7.js → PEXZHNPA.js} +0 -0
- /package/dist/cdn/{T5QDEAAE.js → QCZLDGXP.js} +0 -0
- /package/dist/cdn/{X2MAQDWV.js → SWTIFZKP.js} +0 -0
- /package/dist/cdn/{J3KTKVLP.js → T46FMVXL.js} +0 -0
- /package/dist/cdn/{DNQGXWL3.js → TPPHNJZM.js} +0 -0
- /package/dist/cdn/{LG3G4BFF.js → TRVSOZ6E.js} +0 -0
- /package/dist/cdn/{VFHHDNXC.js → TSBXS3ZU.js} +0 -0
- /package/dist/cdn/{GLZMKGGW.js → TUC2QO55.js} +0 -0
- /package/dist/cdn/{IU63DGNP.js → TVEUPC5T.js} +0 -0
- /package/dist/cdn/{B6JLKBMG.js → U2O4UBGQ.js} +0 -0
- /package/dist/cdn/{7NO3F7GQ.js → UKEFVOLB.js} +0 -0
- /package/dist/cdn/{4F6FNH6V.js → VESS43VK.js} +0 -0
- /package/dist/cdn/{KVIE42LT.js → W452TPUB.js} +0 -0
- /package/dist/cdn/{JHF7SGKM.js → XVRI7KL6.js} +0 -0
- /package/dist/cdn/{FRGVEQAZ.js → XWROBCOJ.js} +0 -0
- /package/dist/cdn/{ADZF7IHV.js → XX5K2YYE.js} +0 -0
- /package/dist/cdn/{OO4SKY7C.js → YC6OF77P.js} +0 -0
- /package/dist/cdn/{HH4A44WX.js → YFA64UQH.js} +0 -0
- /package/dist/cdn/{QH4RNPEX.js → YUCXRBNY.js} +0 -0
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const p = h`: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}.root{align-items:center;block-size:100%;display:flex;inline-size:100%}slot[name=max],slot[name=min]{display:flex}.slider{--labels-container-width: 100%;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}.max-date,.min-date{inline-size:calc(var(--calcite-size-md) * 3.125)}.popover{padding:var(--calcite-spacing-xxs) var(--calcite-spacing-xs) var(--calcite-spacing-xs)}.ticks-container{flex:1;position:relative;width:100%}.major-ticks,.minor-ticks{inset:0;position:absolute}.major-ticks,.minor-ticks{--arcgis-ticks-tick-transform: unset;--arcgis-ticks-tick-width: var(--calcite-size-px)}.minor-ticks{--arcgis-ticks-tick-length: var(--calcite-size-fixed-xxs)}.major-ticks{--arcgis-ticks-font-weight: var(--calcite-font-weight-normal)}.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)}`;
|
|
10
|
-
class T extends v {
|
|
2
|
+
import { c as d } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as m, html as a } from "lit";
|
|
4
|
+
import { ref as u } from "lit/directives/ref.js";
|
|
5
|
+
import o from "@arcgis/core/time/TimeExtent.js";
|
|
6
|
+
import { LitElement as h, nothing as v, safeClassMap as g } from "@arcgis/lumina";
|
|
7
|
+
const f = 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{--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}.max-date,.min-date{inline-size:calc(var(--calcite-size-md) * 3.125)}.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;--arcgis-ticks-font-weight: var(--calcite-font-weight-normal);--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)}`;
|
|
8
|
+
class w extends h {
|
|
11
9
|
constructor() {
|
|
12
|
-
super(...arguments), this.#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}), this.#n = 3, this.#a = o(), this.#r = o(), this._sliderWidth = 100, this.autoDestroyDisabled = !1, this.showMax = !1, this.showMin = !1, this.showTicks = !1, this.showTimeExtentPopover = !1;
|
|
10
|
+
super(...arguments), this.#t = new ResizeObserver(([e]) => {
|
|
11
|
+
this._sliderWidth = e.contentRect.width;
|
|
12
|
+
}), this.#a = 100, this.#r = 100, this.autoDestroyDisabled = !1, this.showMax = !1, this.showMin = !1, this.showTicks = !1, this.showTimeExtentPopover = !1;
|
|
16
13
|
}
|
|
17
14
|
static {
|
|
18
15
|
this.properties = { _activeValue: 16, _sliderFillPlacement: 16, _sliderWidth: 16, _timeExtentEpochValues: 16, activeValue: 32, autoDestroyDisabled: 5, showMax: 5, showMin: 5, showTicks: 5, showTimeExtentPopover: 5, viewModel: 0 };
|
|
19
16
|
}
|
|
20
17
|
static {
|
|
21
|
-
this.styles =
|
|
18
|
+
this.styles = f;
|
|
22
19
|
}
|
|
23
|
-
#e;
|
|
24
20
|
#t;
|
|
25
21
|
#i;
|
|
26
22
|
#s;
|
|
27
|
-
#
|
|
23
|
+
#e;
|
|
28
24
|
#a;
|
|
29
25
|
#r;
|
|
30
26
|
get _sliderFillPlacement() {
|
|
@@ -71,80 +67,80 @@ class T extends v {
|
|
|
71
67
|
async destroy() {
|
|
72
68
|
await this.manager.destroy();
|
|
73
69
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
this.#e
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const { start: s, end: r } = e;
|
|
89
|
-
if (!s || !r)
|
|
70
|
+
#n() {
|
|
71
|
+
return (e) => {
|
|
72
|
+
if (e) {
|
|
73
|
+
this.#e = e, this.#t.observe(e);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.#e && (this.#t.unobserve(this.#e), this.#e = void 0);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
#l() {
|
|
80
|
+
const e = Number.parseInt(window.getComputedStyle(this.el).getPropertyValue("--arcgis-internal-time-bar-slider-tick-gap"), 10);
|
|
81
|
+
return Number.isFinite(e) && e > 0 ? e : this.#a;
|
|
82
|
+
}
|
|
83
|
+
#o(e, t) {
|
|
84
|
+
const { viewModel: i } = this, { start: s, end: r } = e;
|
|
85
|
+
if (!i || !s || !r)
|
|
90
86
|
return;
|
|
91
87
|
const n = (r.getTime() - s.getTime()) / t;
|
|
92
|
-
return i.tickFormats.find(({ duration:
|
|
88
|
+
return i.tickFormats.find(({ duration: c }) => c > this.#l() * n) ?? i.tickFormats.at(-1);
|
|
93
89
|
}
|
|
94
90
|
#c(e) {
|
|
95
91
|
this._activeValue = e.target.activeValue;
|
|
96
92
|
}
|
|
97
|
-
#
|
|
93
|
+
#d(e) {
|
|
98
94
|
const { viewModel: t } = this, i = t?.mode;
|
|
99
|
-
i && (t.timeExtent = this.#
|
|
95
|
+
i && (t.timeExtent = this.#m(e.target.values, i), this._activeValue = e.target.activeValue);
|
|
100
96
|
}
|
|
101
|
-
#
|
|
97
|
+
#m([e, t], i) {
|
|
102
98
|
switch (i) {
|
|
103
99
|
case "cumulative-from-end":
|
|
104
|
-
return new
|
|
100
|
+
return new o({ start: new Date(e), end: null });
|
|
105
101
|
case "cumulative-from-start":
|
|
106
|
-
return new
|
|
102
|
+
return new o({ start: null, end: new Date(e) });
|
|
107
103
|
case "instant":
|
|
108
|
-
return new
|
|
104
|
+
return new o({ start: new Date(e), end: new Date(e) });
|
|
109
105
|
case "time-window":
|
|
110
|
-
return new
|
|
106
|
+
return new o({ start: new Date(e), end: new Date(t ?? e) });
|
|
111
107
|
}
|
|
112
108
|
}
|
|
113
|
-
render() {
|
|
114
|
-
return a`<div class="root" ${d(this.#a)}>${this.#u()}${this.#f()}${this.#m()}</div>`;
|
|
115
|
-
}
|
|
116
|
-
#m() {
|
|
117
|
-
return this.showMax ? a`<slot name=max><arcgis-time-bar-date class="max-date" .date=${this.viewModel?.fullTimeExtent?.end} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>` : a`<div class="hidden"></div>`;
|
|
118
|
-
}
|
|
119
109
|
#u() {
|
|
120
|
-
return this.
|
|
110
|
+
return this.showMax ? a`<slot name=max><arcgis-time-bar-date class="max-date" .date=${this.viewModel?.fullTimeExtent?.end} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>` : a`<div class="hidden"></div>`;
|
|
121
111
|
}
|
|
122
112
|
#h() {
|
|
123
|
-
return this.
|
|
113
|
+
return this.showMin ? a`<slot name=min><arcgis-time-bar-date class="min-date" .date=${this.viewModel?.fullTimeExtent?.start} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>` : a`<div class="hidden"></div>`;
|
|
124
114
|
}
|
|
125
115
|
#v() {
|
|
116
|
+
return this.showTimeExtentPopover ? a`<div class="popover" slot=popover><slot name=popover>${this.#g()}</slot></div>` : null;
|
|
117
|
+
}
|
|
118
|
+
#g() {
|
|
126
119
|
return this.activeValue ? this.activeValue instanceof Date ? a`<arcgis-time-bar-date .date=${this.activeValue} .viewModel=${this.viewModel}></arcgis-time-bar-date>` : a`<arcgis-time-bar-extent .viewModel=${this.viewModel}></arcgis-time-bar-extent>` : null;
|
|
127
120
|
}
|
|
128
121
|
#f() {
|
|
129
122
|
const { viewModel: e } = this;
|
|
130
|
-
if (!e?.fullTimeExtent?.start || !e?.fullTimeExtent?.end
|
|
123
|
+
if (!e?.fullTimeExtent?.start || !e?.fullTimeExtent?.end)
|
|
131
124
|
return null;
|
|
132
|
-
const t = this.#
|
|
125
|
+
const t = this.#o(e.fullTimeExtent, this._sliderWidth ?? this.#r);
|
|
133
126
|
if (!t)
|
|
134
127
|
return null;
|
|
135
|
-
(!this.#
|
|
128
|
+
(!this.#i || !this.#s || this.#i !== t) && (this.#i = t, this.#s = e.getTickValues(t.timeInterval), e.tickFormat = t.format);
|
|
136
129
|
const i = e.fullTimeExtent.start.getTime(), s = e.fullTimeExtent.end.getTime();
|
|
137
|
-
return a`<arcgis-slider allow-values-overlap class=${g({
|
|
130
|
+
return a`<div class="slider-container" ${u(this.#n())}><arcgis-slider allow-values-overlap class=${g({
|
|
138
131
|
slider: !0,
|
|
139
132
|
"slider--has-ticks": this.showTicks,
|
|
140
133
|
"slider--out-of-range": e.isOutOfRange
|
|
141
|
-
})} .disabled=${!e.interactive} fill-placement=${this._sliderFillPlacement ??
|
|
134
|
+
})} .disabled=${!e.interactive} fill-placement=${this._sliderFillPlacement ?? v} .max=${s} .min=${i} @arcgisActiveValueChange=${this.#c} @arcgisInput=${this.#d} precision=0 .steps=${e.effectiveStopsEpoch} .values=${this._timeExtentEpochValues}>${this.#v()}${this.#w(e, i, s)}</arcgis-slider></div>`;
|
|
142
135
|
}
|
|
143
|
-
#
|
|
144
|
-
return this.showTicks ? a`<div slot=content-end class="ticks-container"><
|
|
136
|
+
#w(e, t, i) {
|
|
137
|
+
return this.showTicks ? a`<div slot=content-end class="ticks-container"><slot name=content-end><arcgis-ticks .labelFormatter=${e.tickFormatter} .max=${i} .min=${t} mode=value show-labels .values=${this.#s}></arcgis-ticks></slot></div>` : null;
|
|
138
|
+
}
|
|
139
|
+
render() {
|
|
140
|
+
return a`<div class="root">${this.#h()}${this.#f()}${this.#u()}</div>`;
|
|
145
141
|
}
|
|
146
142
|
}
|
|
147
|
-
|
|
143
|
+
d("arcgis-time-bar-slider", w);
|
|
148
144
|
export {
|
|
149
|
-
|
|
145
|
+
w as ArcgisTimeBarSlider
|
|
150
146
|
};
|