@arcgis/map-components 5.2.0-next.103 → 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.
Files changed (87) hide show
  1. package/dist/cdn/{YVQJ4XD4.js → 3IQBOCXJ.js} +1 -1
  2. package/dist/cdn/{S7JDLOX2.js → 4J23LF6M.js} +1 -1
  3. package/dist/cdn/{J624KHFL.js → 4R53HBKQ.js} +1 -1
  4. package/dist/cdn/{A3KD2UAY.js → 5ASN6KWI.js} +1 -1
  5. package/dist/cdn/{GGKOLSCH.js → 6AUGGEEP.js} +1 -1
  6. package/dist/cdn/{YEN7K65V.js → 7HFQ4IJ2.js} +1 -1
  7. package/dist/cdn/{ZUWNZX6G.js → BCGLGOZZ.js} +1 -1
  8. package/dist/cdn/EBPGSTIL.js +2 -0
  9. package/dist/cdn/{TZEAPNBI.js → IFJS7BSY.js} +1 -1
  10. package/dist/cdn/{KJTWHP5I.js → ITQE4OCT.js} +1 -1
  11. package/dist/cdn/{4YU2AF7S.js → M4IP3YJG.js} +1 -1
  12. package/dist/cdn/PBIEHFTW.js +2 -0
  13. package/dist/cdn/{GLMK45AB.js → PCQRHDV6.js} +1 -1
  14. package/dist/cdn/{6ZE7BJTS.js → R2WAEZ4G.js} +1 -1
  15. package/dist/cdn/{DVGE5VPK.js → S3U3C6H7.js} +1 -1
  16. package/dist/cdn/{3AIQYNSA.js → SWSQAOGC.js} +1 -1
  17. package/dist/cdn/{ZCRUGROJ.js → SXAPY3VV.js} +1 -1
  18. package/dist/cdn/{VULA5TJD.js → TROUKXL3.js} +1 -1
  19. package/dist/cdn/US6Z6V5I.js +2 -0
  20. package/dist/cdn/VB64Q5DB.js +2 -0
  21. package/dist/cdn/WNZ2XRBD.js +2 -0
  22. package/dist/cdn/{WAFRMU5C.js → WUHDP2W5.js} +1 -1
  23. package/dist/cdn/{HJ7TFEPK.js → YSWBEPQF.js} +2 -2
  24. package/dist/cdn/{BZGHEINJ.js → ZO4SS6VB.js} +1 -1
  25. package/dist/cdn/index.js +1 -1
  26. package/dist/chunks/slots.js +1 -1
  27. package/dist/components/arcgis-editor/customElement.d.ts +8 -2
  28. package/dist/components/arcgis-editor/customElement.js +2 -2
  29. package/dist/components/arcgis-layer-list-next/customElement.js +12 -7
  30. package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +2 -2
  31. package/dist/components/arcgis-time-bar/customElement.js +147 -146
  32. package/dist/components/arcgis-time-bar/types.d.ts +1 -2
  33. package/dist/components/arcgis-time-bar-slider/customElement.d.ts +1 -0
  34. package/dist/components/arcgis-time-bar-slider/customElement.js +53 -57
  35. package/dist/docs/api.json +1 -1
  36. package/dist/docs/docs.json +1 -1
  37. package/dist/docs/vscode.html-custom-data.json +1 -1
  38. package/dist/docs/web-types.json +1 -1
  39. package/package.json +6 -6
  40. package/dist/cdn/65FGHESR.js +0 -2
  41. package/dist/cdn/EDGLEFG3.js +0 -2
  42. package/dist/cdn/F2ZADKF4.js +0 -2
  43. package/dist/cdn/SA4IYYIE.js +0 -2
  44. package/dist/cdn/ZABYV3VA.js +0 -2
  45. /package/dist/cdn/{6RT7GRX4.js → 2YXG2UVO.js} +0 -0
  46. /package/dist/cdn/{AA2HLLIM.js → 3477AJGP.js} +0 -0
  47. /package/dist/cdn/{2ZG7S6GM.js → 46RONL5G.js} +0 -0
  48. /package/dist/cdn/{GJAC7GKP.js → 4TMO432K.js} +0 -0
  49. /package/dist/cdn/{4J6DMRVO.js → 4TXSVEFQ.js} +0 -0
  50. /package/dist/cdn/{TKEBTPPA.js → 5D7JP2MD.js} +0 -0
  51. /package/dist/cdn/{7JKYXV7H.js → 6AXSN2JJ.js} +0 -0
  52. /package/dist/cdn/{QJBQ3JLC.js → 6T2UQ2JE.js} +0 -0
  53. /package/dist/cdn/{6B4ROFUM.js → 7BTU3W4U.js} +0 -0
  54. /package/dist/cdn/{E3AEBH36.js → AH7T5E6X.js} +0 -0
  55. /package/dist/cdn/{DSPV4EIK.js → ATBK5KMZ.js} +0 -0
  56. /package/dist/cdn/{D2FVI5JG.js → BN7OHAZB.js} +0 -0
  57. /package/dist/cdn/{657KH5W3.js → C66EUSNM.js} +0 -0
  58. /package/dist/cdn/{HRTVHZHG.js → EHCISJXP.js} +0 -0
  59. /package/dist/cdn/{G7DHB4QN.js → F5GIAKDV.js} +0 -0
  60. /package/dist/cdn/{YWQU6EBN.js → H6I3JKBD.js} +0 -0
  61. /package/dist/cdn/{H3RDAWS7.js → HMK6VULW.js} +0 -0
  62. /package/dist/cdn/{JU4MCJPU.js → I4D3VLLY.js} +0 -0
  63. /package/dist/cdn/{HDYBFSI5.js → K2MQIU34.js} +0 -0
  64. /package/dist/cdn/{OTTKYEPK.js → K3DQPSQI.js} +0 -0
  65. /package/dist/cdn/{TTBQBEDS.js → NXYIGLH3.js} +0 -0
  66. /package/dist/cdn/{SE4NXMGA.js → O5WV2YAQ.js} +0 -0
  67. /package/dist/cdn/{D5LP3DJA.js → OTQZC2PT.js} +0 -0
  68. /package/dist/cdn/{SOOVHYLT.js → P3ZJGUIA.js} +0 -0
  69. /package/dist/cdn/{3VWL4SN7.js → PEXZHNPA.js} +0 -0
  70. /package/dist/cdn/{T5QDEAAE.js → QCZLDGXP.js} +0 -0
  71. /package/dist/cdn/{X2MAQDWV.js → SWTIFZKP.js} +0 -0
  72. /package/dist/cdn/{J3KTKVLP.js → T46FMVXL.js} +0 -0
  73. /package/dist/cdn/{DNQGXWL3.js → TPPHNJZM.js} +0 -0
  74. /package/dist/cdn/{LG3G4BFF.js → TRVSOZ6E.js} +0 -0
  75. /package/dist/cdn/{VFHHDNXC.js → TSBXS3ZU.js} +0 -0
  76. /package/dist/cdn/{GLZMKGGW.js → TUC2QO55.js} +0 -0
  77. /package/dist/cdn/{IU63DGNP.js → TVEUPC5T.js} +0 -0
  78. /package/dist/cdn/{B6JLKBMG.js → U2O4UBGQ.js} +0 -0
  79. /package/dist/cdn/{7NO3F7GQ.js → UKEFVOLB.js} +0 -0
  80. /package/dist/cdn/{4F6FNH6V.js → VESS43VK.js} +0 -0
  81. /package/dist/cdn/{KVIE42LT.js → W452TPUB.js} +0 -0
  82. /package/dist/cdn/{JHF7SGKM.js → XVRI7KL6.js} +0 -0
  83. /package/dist/cdn/{FRGVEQAZ.js → XWROBCOJ.js} +0 -0
  84. /package/dist/cdn/{ADZF7IHV.js → XX5K2YYE.js} +0 -0
  85. /package/dist/cdn/{OO4SKY7C.js → YC6OF77P.js} +0 -0
  86. /package/dist/cdn/{HH4A44WX.js → YFA64UQH.js} +0 -0
  87. /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 u } from "../../chunks/runtime.js";
3
- import { css as h, html as a } from "lit";
4
- import c from "@arcgis/core/time/TimeExtent.js";
5
- import { LitElement as v, nothing as f, safeClassMap as g } from "@arcgis/lumina";
6
- import { createRef as o, ref as d } from "lit/directives/ref.js";
7
- import { m as w } from "../../chunks/handle.js";
8
- import { watch as x } from "@arcgis/core/core/reactiveUtils.js";
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.#e = new ResizeObserver(() => {
13
- const e = this.#r.value?.clientWidth;
14
- e && (this._sliderWidth = e);
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 = p;
18
+ this.styles = f;
22
19
  }
23
- #e;
24
20
  #t;
25
21
  #i;
26
22
  #s;
27
- #n;
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
- async loaded() {
75
- this.manager.onLifecycle(() => [
76
- x(() => this.#a.value, (e) => {
77
- this.#e.disconnect(), e && this.#e.observe(e);
78
- }, { initial: !0 }),
79
- w(() => {
80
- this.#e.disconnect();
81
- })
82
- ]);
83
- }
84
- #l(e, t) {
85
- const { viewModel: i } = this;
86
- if (!i)
87
- return;
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: m }) => m > this.#n * n) ?? i.tickFormats.at(-1);
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
- #o(e) {
93
+ #d(e) {
98
94
  const { viewModel: t } = this, i = t?.mode;
99
- i && (t.timeExtent = this.#d(e.target.values, i), this._activeValue = e.target.activeValue);
95
+ i && (t.timeExtent = this.#m(e.target.values, i), this._activeValue = e.target.activeValue);
100
96
  }
101
- #d([e, t], i) {
97
+ #m([e, t], i) {
102
98
  switch (i) {
103
99
  case "cumulative-from-end":
104
- return new c({ start: new Date(e), end: null });
100
+ return new o({ start: new Date(e), end: null });
105
101
  case "cumulative-from-start":
106
- return new c({ start: null, end: new Date(e) });
102
+ return new o({ start: null, end: new Date(e) });
107
103
  case "instant":
108
- return new c({ start: new Date(e), end: new Date(e) });
104
+ return new o({ start: new Date(e), end: new Date(e) });
109
105
  case "time-window":
110
- return new c({ start: new Date(e), end: new Date(t ?? e) });
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.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>`;
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.showTimeExtentPopover ? a`<div class="popover" slot=popover><slot name=popover>${this.#v()}</slot></div>` : null;
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 || !this._sliderWidth)
123
+ if (!e?.fullTimeExtent?.start || !e?.fullTimeExtent?.end)
131
124
  return null;
132
- const t = this.#l(e.fullTimeExtent, this._sliderWidth);
125
+ const t = this.#o(e.fullTimeExtent, this._sliderWidth ?? this.#r);
133
126
  if (!t)
134
127
  return null;
135
- (!this.#t || !this.#s || !this.#i || this.#t !== t) && (this.#t = t, this.#s = e.getTickValues(t.minor), this.#i = e.getTickValues(t.major), e.majorTickFormat = t.format);
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 ?? f} .max=${s} .min=${i} @arcgisActiveValueChange=${this.#c} @arcgisInput=${this.#o} precision=0 .steps=${e.effectiveStopsEpoch} .values=${this._timeExtentEpochValues} ${d(this.#r)}>${this.#h()}${this.#g(e, i, s)}</arcgis-slider>`;
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
- #g(e, t, i) {
144
- return this.showTicks ? a`<div slot=content-end class="ticks-container"><arcgis-ticks class="minor-ticks" .max=${i} .min=${t} mode=value .values=${this.#s}></arcgis-ticks><arcgis-ticks class="major-ticks" .labelFormatter=${e.majorTickFormatter} .max=${i} .min=${t} mode=value show-labels .values=${this.#i}></arcgis-ticks></div>` : null;
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
- u("arcgis-time-bar-slider", T);
143
+ d("arcgis-time-bar-slider", w);
148
144
  export {
149
- T as ArcgisTimeBarSlider
145
+ w as ArcgisTimeBarSlider
150
146
  };