@arcgis/map-components 6.0.0-next.22 → 6.0.0-next.24

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 (154) hide show
  1. package/dist/cdn/{WUWF6ZDM.js → 2Z36ICJZ.js} +1 -1
  2. package/dist/cdn/{GQQTIX2X.js → 3HI5IZSQ.js} +1 -1
  3. package/dist/cdn/3KAC2MKA.js +2 -0
  4. package/dist/cdn/{2NM6UWC4.js → 47CFYOUT.js} +1 -1
  5. package/dist/cdn/4N4XDCDQ.js +2 -0
  6. package/dist/cdn/{7ZWBGSCM.js → 4NG7CALI.js} +1 -1
  7. package/dist/cdn/{NTHSQXKG.js → 5DEJDR4W.js} +1 -1
  8. package/dist/cdn/{LUW2PXWZ.js → 5PPYHS6V.js} +1 -1
  9. package/dist/cdn/{M5OK7RKI.js → 66GRDX36.js} +1 -1
  10. package/dist/cdn/{SAQ5BNZJ.js → 6CKQPMJB.js} +1 -1
  11. package/dist/cdn/6GE2WBKV.js +2 -0
  12. package/dist/cdn/6GGKA7MT.js +2 -0
  13. package/dist/cdn/{XPBFBRSY.js → 6K4IASNK.js} +1 -1
  14. package/dist/cdn/{7LO6ACC7.js → 6VV5SX76.js} +1 -1
  15. package/dist/cdn/{Y3E2FJPQ.js → 74WM2EIB.js} +1 -1
  16. package/dist/cdn/{4I6F64B2.js → 7U2V3LDM.js} +1 -1
  17. package/dist/cdn/{3GN3DAON.js → A7YFCO3R.js} +1 -1
  18. package/dist/cdn/{3SXQLU4S.js → APFZ2FVO.js} +1 -1
  19. package/dist/cdn/{VLHURRRU.js → BM3FQ4OG.js} +1 -1
  20. package/dist/cdn/{LWVYNWD5.js → CGE6E3O3.js} +1 -1
  21. package/dist/cdn/CVLOQWUD.js +2 -0
  22. package/dist/cdn/{NORQIOSX.js → DGXTCH6B.js} +1 -1
  23. package/dist/cdn/{JUYPQUPQ.js → E5CGORXN.js} +1 -1
  24. package/dist/cdn/E5X5BYWA.js +2 -0
  25. package/dist/cdn/ECF4B24M.js +2 -0
  26. package/dist/cdn/EJVFK7JX.js +2 -0
  27. package/dist/cdn/{BUH3AQ7E.js → FTLNYN3G.js} +1 -1
  28. package/dist/cdn/{BJ35LPCU.js → G7BWEBJH.js} +1 -1
  29. package/dist/cdn/GIQT67VT.js +2 -0
  30. package/dist/cdn/{V7DMA5ZO.js → GZ6UBR6R.js} +1 -1
  31. package/dist/cdn/{AOGDXJ2J.js → H66E4VOY.js} +1 -1
  32. package/dist/cdn/HADZXZIE.js +2 -0
  33. package/dist/cdn/{BDZHLGVT.js → HL6WL2YA.js} +1 -1
  34. package/dist/cdn/HTCPPGCR.js +2 -0
  35. package/dist/cdn/HTONXZBP.js +2 -0
  36. package/dist/cdn/{F2DTKJTK.js → HUWIY53T.js} +1 -1
  37. package/dist/cdn/{UE6EBLH3.js → IKVGZFZ6.js} +1 -1
  38. package/dist/cdn/{NKFAPBY3.js → JRO4IBJP.js} +1 -1
  39. package/dist/cdn/KXDLX4RE.js +2 -0
  40. package/dist/cdn/LHYI2QBZ.js +2 -0
  41. package/dist/cdn/{LXJURAXP.js → NLG5U5ZN.js} +1 -1
  42. package/dist/cdn/{BLYXYNGB.js → PPGKQRNY.js} +1 -1
  43. package/dist/cdn/{DS6EUOYE.js → PW3QCZXY.js} +1 -1
  44. package/dist/cdn/{7EIN5VCY.js → Q2GYNZYQ.js} +1 -1
  45. package/dist/cdn/{SJGQALDG.js → Q2ZQOGM2.js} +1 -1
  46. package/dist/cdn/{UFK7DHVC.js → QBRGIFBY.js} +1 -1
  47. package/dist/cdn/{ZC5YVHZ3.js → QQLN6RWA.js} +1 -1
  48. package/dist/cdn/QXEOEFF3.js +2 -0
  49. package/dist/cdn/{BJJZGYBG.js → R6ARQKAY.js} +1 -1
  50. package/dist/cdn/RFO3M46K.js +2 -0
  51. package/dist/cdn/{YBXCTOS7.js → RQPOCDJS.js} +1 -1
  52. package/dist/cdn/{CNJSDHZI.js → RT53VCER.js} +1 -1
  53. package/dist/cdn/{AIF4MCBB.js → RXKIZFNQ.js} +1 -1
  54. package/dist/cdn/{SKAZPI3A.js → TTERKXN5.js} +1 -1
  55. package/dist/cdn/{LKGURYDH.js → TTWQ7RNF.js} +1 -1
  56. package/dist/cdn/{VHZM25YV.js → UB6BQW3G.js} +1 -1
  57. package/dist/cdn/{DGSTI5DI.js → UJURQACP.js} +1 -1
  58. package/dist/cdn/{UHDJ2SI5.js → VW35MSDL.js} +1 -1
  59. package/dist/cdn/{IQGL3AGV.js → WU4NDBMC.js} +1 -1
  60. package/dist/cdn/{FRX4ZT35.js → XKGD4N75.js} +1 -1
  61. package/dist/cdn/{3B4VHD67.js → XN3MG6YU.js} +1 -1
  62. package/dist/cdn/{PFMWLSWQ.js → XWBR6FXI.js} +1 -1
  63. package/dist/cdn/{B2TICPHR.js → Y5ZZCA3R.js} +1 -1
  64. package/dist/cdn/YITBBUPR.js +2 -0
  65. package/dist/cdn/{4IG6WUCI.js → YTZZRJ7Z.js} +1 -1
  66. package/dist/cdn/{OQ6SYZBT.js → YXIJXXTK.js} +1 -1
  67. package/dist/cdn/{L6FLCEH6.js → Z3674FMT.js} +1 -1
  68. package/dist/cdn/assets/video-player/t9n/messages.en.json +1 -1
  69. package/dist/cdn/index.js +1 -1
  70. package/dist/cdn/main.css +1 -1
  71. package/dist/chunks/useArcgisViewReadyError.js +155 -151
  72. package/dist/chunks/useViewModel.js +7 -7
  73. package/dist/chunks/utils.js +17 -17
  74. package/dist/chunks/utils5.js +2 -2
  75. package/dist/components/arcgis-basemap-gallery/customElement.js +17 -17
  76. package/dist/components/arcgis-basemap-gallery-item/customElement.js +1 -1
  77. package/dist/components/arcgis-coordinate-conversion/customElement.d.ts +5 -0
  78. package/dist/components/arcgis-coordinate-conversion-next/customElement.d.ts +6 -5
  79. package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
  80. package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
  81. package/dist/components/arcgis-features-next/customElement.js +14 -15
  82. package/dist/components/arcgis-scale-bar/customElement.js +11 -11
  83. package/dist/components/arcgis-search/customElement.d.ts +12 -0
  84. package/dist/components/arcgis-search/customElement.js +3 -0
  85. package/dist/components/arcgis-sketch/customElement.js +1 -1
  86. package/dist/components/arcgis-swipe/customElement.d.ts +0 -22
  87. package/dist/components/arcgis-swipe/customElement.js +47 -65
  88. package/dist/components/arcgis-time-bar/customElement.d.ts +486 -409
  89. package/dist/components/arcgis-time-bar/types.d.ts +36 -15
  90. package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
  91. package/dist/components/arcgis-time-slider/customElement.d.ts +1 -0
  92. package/dist/components/arcgis-time-slider/customElement.js +8 -7
  93. package/dist/components/arcgis-track/customElement.d.ts +12 -3
  94. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +7 -0
  95. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +8 -5
  96. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +45 -2
  97. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +23 -20
  98. package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +125 -12
  99. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +9 -2
  100. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +60 -57
  101. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +7 -0
  102. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +12 -9
  103. package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +217 -14
  104. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +119 -108
  105. package/dist/components/arcgis-utility-network-trace-locations/customElement.d.ts +155 -8
  106. package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +9 -73
  107. package/dist/components/arcgis-utility-network-trace-results/customElement.js +132 -125
  108. package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -2
  109. package/dist/components/arcgis-video-player/customElement.d.ts +18 -0
  110. package/dist/components/arcgis-video-player/customElement.js +72 -72
  111. package/dist/components/arcgis-video-player/index.js +4 -4
  112. package/dist/components/arcgis-video-player-action-bar/customElement.js +1 -1
  113. package/dist/components/arcgis-video-player-previews/customElement.js +159 -0
  114. package/dist/components/arcgis-video-player-settings/customElement.js +17 -16
  115. package/dist/components/arcgis-video-player-slider/customElement.js +23 -12
  116. package/dist/components/arcgis-video-player-slider/index.js +1 -0
  117. package/dist/docs/api.json +1 -1
  118. package/dist/docs/docs.json +1 -1
  119. package/dist/docs/vscode.html-custom-data.json +1 -1
  120. package/dist/docs/web-types.json +1 -1
  121. package/dist/index.d.ts +0 -20
  122. package/dist/loader.js +6 -7
  123. package/dist/types/lumina.d.ts +2 -23
  124. package/dist/types/preact.d.ts +2 -25
  125. package/dist/types/react.d.ts +2 -27
  126. package/dist/types/stencil.d.ts +2 -23
  127. package/package.json +6 -6
  128. package/dist/cdn/2WJ53TNR.js +0 -2
  129. package/dist/cdn/5A7LDBDR.js +0 -2
  130. package/dist/cdn/COSETVX4.js +0 -2
  131. package/dist/cdn/F74YQZ2X.js +0 -2
  132. package/dist/cdn/H4BTVLCG.js +0 -2
  133. package/dist/cdn/KXD4VEKE.js +0 -2
  134. package/dist/cdn/MNL7ONFB.js +0 -2
  135. package/dist/cdn/NHMHVWNB.js +0 -2
  136. package/dist/cdn/NQ3COROI.js +0 -2
  137. package/dist/cdn/OJJSIN3V.js +0 -2
  138. package/dist/cdn/P3565WG3.js +0 -2
  139. package/dist/cdn/QAOT2TJ6.js +0 -2
  140. package/dist/cdn/QVJ2FUNW.js +0 -2
  141. package/dist/cdn/SIT5NBLS.js +0 -2
  142. package/dist/cdn/SU2SAOBL.js +0 -2
  143. package/dist/cdn/UI4IEVSV.js +0 -2
  144. package/dist/cdn/VEV3AAVP.js +0 -2
  145. package/dist/cdn/YYCTSS52.js +0 -2
  146. package/dist/components/arcgis-scale-range-slider/customElement.d.ts +0 -158
  147. package/dist/components/arcgis-scale-range-slider/customElement.js +0 -26
  148. package/dist/components/arcgis-scale-range-slider/index.d.ts +0 -1
  149. package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
  150. package/dist/components/arcgis-value-picker-legacy/customElement.d.ts +0 -642
  151. package/dist/components/arcgis-value-picker-legacy/customElement.js +0 -39
  152. package/dist/components/arcgis-value-picker-legacy/index.d.ts +0 -1
  153. package/dist/components/arcgis-value-picker-legacy/index.js +0 -1
  154. /package/dist/components/{arcgis-scale-range-slider → arcgis-video-player-previews}/index.js +0 -0
@@ -0,0 +1,159 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import { c as v } from "../../chunks/runtime.js";
3
+ import { ref as d } from "lit/directives/ref.js";
4
+ import { css as c, html as w } from "lit";
5
+ import m from "@arcgis/core/core/Error.js";
6
+ import u from "@arcgis/core/core/Handles.js";
7
+ import { on as a, watch as f, whenOnce as b } from "@arcgis/core/core/reactiveUtils.js";
8
+ import g from "@arcgis/core/request.js";
9
+ import { LitElement as _, nothing as p } from "@arcgis/lumina";
10
+ import { i as C, l as I } from "../../chunks/async-utils.js";
11
+ import { f as L } from "../../chunks/video-utils.js";
12
+ const M = c`:host{position:absolute;inset:0;pointer-events:none}.video-preview-container{position:absolute;bottom:calc(100% + var(--calcite-space-xs));z-index:1;box-sizing:border-box;transform:translate(-50%);pointer-events:none;border:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-surface-2)}.video-preview-container canvas{display:block;width:100%;height:auto}.video-preview-container .thumbnail-time{position:absolute;bottom:0;right:0;padding:var(--calcite-space-xs);background-color:var(--calcite-color-surface-2);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-xs);line-height:1;text-align:center;white-space:nowrap}`;
13
+ class P extends _ {
14
+ constructor() {
15
+ super(...arguments), this._previewsLoadId = 0, this.previewLeft = 0, this.previewTime = "", this.previewVisible = !1, this.previewWidth = 0;
16
+ }
17
+ static {
18
+ this.properties = { previewLeft: 16, previewTime: 16, previewVisible: 16, previewWidth: 16, referenceElement: 0, viewModel: 0 };
19
+ }
20
+ static {
21
+ this.styles = M;
22
+ }
23
+ updated() {
24
+ this.#o();
25
+ }
26
+ loaded() {
27
+ this.manager.onLifecycle(() => {
28
+ const i = new u(), t = (e) => this.#p(e);
29
+ return i.add([
30
+ a(() => this.referenceElement, "pointerenter", t),
31
+ a(() => this.referenceElement, "pointermove", t),
32
+ a(() => this.referenceElement, "pointerleave", () => this.#i()),
33
+ f(() => this.viewModel.layer, (e) => {
34
+ this.#l(e);
35
+ }, { initial: !0 }),
36
+ {
37
+ remove: () => {
38
+ this.#t(), this._previews?.close(), this._previews = void 0, this._previewsInfo = void 0, this.#i();
39
+ }
40
+ }
41
+ ]), { remove: () => i.destroy() };
42
+ });
43
+ }
44
+ #t() {
45
+ this._previewsLoadId++, this._previewsLoadController?.abort(), this._previewsLoadController = void 0;
46
+ }
47
+ #r(i, t) {
48
+ try {
49
+ return new URL(i, t);
50
+ } catch (e) {
51
+ throw new m("video-player:invalid-previews-url", "Unable to construct the video previews image URL.", {
52
+ urlFragment: i,
53
+ baseUrl: t,
54
+ error: e
55
+ });
56
+ }
57
+ }
58
+ #o() {
59
+ const { _previewContainer: i, _previews: t, _previewClip: e } = this;
60
+ !i || !t || !e || i.getContext("2d")?.drawImage(t, e.x, e.y, e.width, e.height, 0, 0, e.width, e.height);
61
+ }
62
+ async #s({ previewsImageUrl: i, previewsInfo: t, loadId: e, signal: r }) {
63
+ const { data: o } = await g(i.href, { responseType: "blob", signal: r }), s = await createImageBitmap(o);
64
+ if (e !== this._previewsLoadId || r.aborted) {
65
+ s.close();
66
+ return;
67
+ }
68
+ this._previews?.close(), this._previews = s, this._previewsInfo = t, this.requestUpdate();
69
+ }
70
+ #n(i, t, e) {
71
+ return e.thumbnailInfo.length > 0 ? this.#h(i, e) : this.#a(i, t, e);
72
+ }
73
+ #e(i, t) {
74
+ const e = Math.min(t.thumbnailInfo.length || t.count, t.numCols * t.numRows);
75
+ if (!(i < 0 || i >= e))
76
+ return {
77
+ x: i % t.numCols * t.width,
78
+ y: Math.floor(i / t.numCols) * t.height,
79
+ width: t.width,
80
+ height: t.height
81
+ };
82
+ }
83
+ #a(i, t, e) {
84
+ const r = Math.min(e.count, e.numCols * e.numRows);
85
+ if (r <= 0 || t <= 0)
86
+ return;
87
+ const o = Math.min(r - 1, Math.floor(i / t * r));
88
+ return this.#e(o, e);
89
+ }
90
+ #h(i, t) {
91
+ const e = t.thumbnailInfo, r = e.reduce((o, s, n) => Math.abs(s.offset - i) < Math.abs(e[o].offset - i) ? n : o, 0);
92
+ return this.#e(r, t);
93
+ }
94
+ async #l(i) {
95
+ const t = ++this._previewsLoadId;
96
+ if (this._previewsLoadController?.abort(), this._previewsLoadController = void 0, this._previews?.close(), this._previews = void 0, this._previewsInfo = void 0, this._previewClip = void 0, this.previewVisible = !1, this.requestUpdate(), !i)
97
+ return;
98
+ const e = new AbortController();
99
+ this._previewsLoadController = e;
100
+ try {
101
+ if (await b(() => i.loaded, e.signal), t !== this._previewsLoadId || e.signal.aborted)
102
+ return;
103
+ const r = i.previewsInfo;
104
+ if (!i.capabilities?.operations?.supportsPreviews || !r)
105
+ return;
106
+ const o = {
107
+ ...r,
108
+ count: r.count > 0 ? r.count : r.thumbnailInfo.length > 0 ? r.thumbnailInfo.length : r.numCols * r.numRows
109
+ }, s = this.#r(o.urlFragment, `${i.url}/${i.layerId}/`);
110
+ await this.#s({
111
+ previewsImageUrl: s,
112
+ previewsInfo: o,
113
+ loadId: t,
114
+ signal: e.signal
115
+ });
116
+ } catch (r) {
117
+ if (t !== this._previewsLoadId || e.signal.aborted || C(r))
118
+ return;
119
+ I(r, this, "Failed to load the video previews");
120
+ } finally {
121
+ this._previewsLoadController === e && (this._previewsLoadController = void 0);
122
+ }
123
+ }
124
+ #i() {
125
+ this.previewVisible = !1, this._previewClip = void 0;
126
+ }
127
+ #p(i) {
128
+ if (!(i instanceof PointerEvent))
129
+ return;
130
+ const t = this.viewModel.duration;
131
+ if (i.pointerType === "touch" || !this._previewsInfo || !this._previews || this._previewsInfo.numCols <= 0 || this._previewsInfo.numRows <= 0 || this._previewsInfo.width <= 0 || this._previewsInfo.height <= 0 || !Number.isFinite(t) || t <= 0) {
132
+ this.previewVisible = !1;
133
+ return;
134
+ }
135
+ const e = i.currentTarget instanceof HTMLElement ? i.currentTarget.getBoundingClientRect() : null;
136
+ if (!e || e.width <= 0) {
137
+ this.previewVisible = !1;
138
+ return;
139
+ }
140
+ const r = Math.max(0, Math.min(e.width, i.clientX - e.left)), s = r / e.width * t * 1e3, n = this.#n(s, t * 1e3, this._previewsInfo);
141
+ if (!n) {
142
+ this.previewVisible = !1;
143
+ return;
144
+ }
145
+ this._previewClip = n;
146
+ const h = Math.min(this._previewsInfo.width, e.width), l = h / 2;
147
+ this.previewLeft = Math.max(l, Math.min(e.width - l, r)), this.previewWidth = h, this.previewTime = L(s / 1e3), this.previewVisible = !0;
148
+ }
149
+ #v(i) {
150
+ this._previewContainer = i ?? void 0;
151
+ }
152
+ render() {
153
+ return this._previewsInfo ? w`<div class="video-preview-container" aria-hidden=true .hidden=${!this.previewVisible} style=${`left: ${this.previewLeft}px; width: ${this.previewWidth}px`}><canvas height=${this._previewsInfo.height ?? p} width=${this._previewsInfo.width ?? p} ${d(this.#v)}></canvas><span class="thumbnail-time">${this.previewTime}</span></div>` : null;
154
+ }
155
+ }
156
+ v("arcgis-video-player-previews", P);
157
+ export {
158
+ P as VideoPlayerPreviews
159
+ };
@@ -1,15 +1,15 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as v } from "../../chunks/runtime.js";
2
+ import { c as g } from "../../chunks/runtime.js";
3
3
  import { html as c } from "lit";
4
- import d from "@arcgis/core/Color.js";
5
- import { watch as g } from "@arcgis/core/core/reactiveUtils.js";
4
+ import h from "@arcgis/core/Color.js";
5
+ import { watch as r } from "@arcgis/core/core/reactiveUtils.js";
6
6
  import { LitElement as _ } from "@arcgis/lumina";
7
7
  import { useDirection as b } from "@arcgis/lumina/controllers";
8
- const u = ["Auto"], w = [0.25, 0.5, 1, 1.5, 2], r = new d([255, 127, 0]);
9
- function o(s, t) {
8
+ const u = ["Auto"], w = [0.25, 0.5, 1, 1.5, 2], d = new h([255, 127, 0]);
9
+ function a(s, t) {
10
10
  return `${t.format(s)}x`;
11
11
  }
12
- class k extends _ {
12
+ class y extends _ {
13
13
  constructor() {
14
14
  super(...arguments), this._color = null, this._speed = 1, this._quality = "Auto", this._direction = b(), this._disabled = !1;
15
15
  }
@@ -18,27 +18,28 @@ class k extends _ {
18
18
  }
19
19
  loaded() {
20
20
  this.manager.onLifecycle(() => [
21
- g(() => this.viewModel.state, (t) => {
21
+ r(() => this.viewModel.state, (t) => {
22
22
  this._disabled = t === "not-ready" || t === "waiting";
23
- }, { initial: !0 })
23
+ }, { initial: !0 }),
24
+ r(() => this.viewModel.layer?.loop, () => this.requestUpdate(), { initial: !0 })
24
25
  ]);
25
26
  }
26
27
  render() {
27
- const { viewModel: t, messages: e } = this, l = this._direction === "rtl" ? "chevron-left" : "chevron-right", a = new Intl.NumberFormat(this.messages._lang, {
28
+ const { viewModel: t, messages: e } = this, l = this._direction === "rtl" ? "chevron-left" : "chevron-right", o = new Intl.NumberFormat(this.messages._lang, {
28
29
  minimumFractionDigits: 0,
29
30
  maximumFractionDigits: 2
30
- }), h = c`<calcite-flow-item .heading=${e.playbackSpeed} .selected=${this._active === "speed"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-list .label=${e.playbackSpeed} selection-mode=single-persist>${w.map((i) => c`<calcite-list-item .disabled=${t?.layer?.isLive && i !== 1} .label=${o(i, a)} @click=${() => {
31
+ }), p = c`<calcite-flow-item .heading=${e.playbackSpeed} .selected=${this._active === "speed"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-list .label=${e.playbackSpeed} selection-mode=single-persist>${w.map((i) => c`<calcite-list-item .disabled=${t?.layer?.isLive && i !== 1} .label=${a(i, o)} @click=${() => {
31
32
  this._speed = i, t.changePlaybackSpeed(i);
32
- }} .selected=${i === this._speed}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`, m = c`<calcite-flow-item .heading=${e.quality} .selected=${this._active === "quality"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-list .label=${e.quality} selection-mode=single-persist>${u.map((i) => c`<calcite-list-item .label=${i} @click=${() => this._quality = i} .selected=${i === this._quality}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`, p = c`<calcite-flow-item .heading=${e.loopPlayback} .selected=${this._active === "loop"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-block .label=${e.loop} expanded><calcite-switch .disabled=${t?.layer?.isLive} .label=${e.loopPlayback} .checked=${t?.layer?.loop} .labelTextStart=${e.loop} @calciteSwitchChange=${() => {
33
+ }} .selected=${i === this._speed}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`, m = c`<calcite-flow-item .heading=${e.quality} .selected=${this._active === "quality"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-list .label=${e.quality} selection-mode=single-persist>${u.map((i) => c`<calcite-list-item .label=${i} @click=${() => this._quality = i} .selected=${i === this._quality}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`, $ = c`<calcite-flow-item .heading=${e.loopPlayback} .selected=${this._active === "loop"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-block .label=${e.loop} expanded><calcite-switch .disabled=${t?.layer?.isLive} .label=${t.layer?.loop ? e.loopEnabled : e.loopDisabled} .checked=${t?.layer?.loop} .labelTextStart=${e.loop} @calciteSwitchChange=${() => {
33
34
  t.toggleLoopPlayback();
34
- }}></calcite-switch></calcite-block></calcite-flow-item>`, $ = c`<calcite-flow-item .heading=${e.graphics} .selected=${this._active === "color"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-block .heading=${e.color} expanded><calcite-color-picker channels-disabled format=hex saved-disabled scale=s .value=${this._color?.toHex() ?? r.toHex()} @calciteColorPickerChange=${({ currentTarget: i }) => {
35
+ }}></calcite-switch></calcite-block></calcite-flow-item>`, v = c`<calcite-flow-item .heading=${e.graphics} .selected=${this._active === "color"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-block .heading=${e.color} expanded><calcite-color-picker channels-disabled format=hex saved-disabled scale=s .value=${this._color?.toHex() ?? d.toHex()} @calciteColorPickerChange=${({ currentTarget: i }) => {
35
36
  const n = i.value?.toString() ?? null;
36
- this._color = n ? new d(n) : null, this._color && t.changeGraphicsColor(this._color);
37
+ this._color = n ? new h(n) : null, this._color && t.changeGraphicsColor(this._color);
37
38
  }}></calcite-color-picker></calcite-block></calcite-flow-item>`;
38
- return c`<div><calcite-popover auto-close .label=${e.settings} overlay-positioning=fixed placement=top-end pointer-disabled reference-element=settings-action scale=s @calcitePopoverClose=${() => this._active = void 0}><calcite-flow><calcite-flow-item .heading=${e.settings} .selected=${!this._active}><calcite-list .label=${e.settings}><calcite-list-item .label=${e.loop} @click=${() => this._active = "loop"}><div slot=content-end><calcite-chip .label=${e.loopPlayback} .icon=${this.viewModel.layer?.loop ? "recurrence" : "break-recurrence"}></calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.speed} @click=${() => this._active = "speed"}><div slot=content-end><calcite-chip .label=${o(this._speed, a)} scale=s>${o(this._speed, a)}</calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.quality} @click=${() => this._active = "quality"}><div slot=content-end><calcite-chip .label=${this._quality} scale=s>${this._quality}</calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.graphics} @click=${() => this._active = "color"}><calcite-color-picker-swatch .color=${this._color?.toString() ?? r.toString()} scale=s slot=content-end></calcite-color-picker-swatch><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item></calcite-list></calcite-flow-item>${this._active === "speed" ? h : null}${this._active === "quality" ? m : null}${this._active === "color" ? $ : null}${this._active === "loop" ? p : null}</calcite-flow></calcite-popover><calcite-action alignment=center .disabled=${this._disabled} icon=sliders id=settings-action scale=s slot=trigger .text=${e.settings}></calcite-action></div>`;
39
+ return c`<div><calcite-popover auto-close .label=${e.settings} overlay-positioning=fixed placement=top-end pointer-disabled reference-element=settings-action scale=s @calcitePopoverClose=${() => this._active = void 0}><calcite-flow><calcite-flow-item .heading=${e.settings} .selected=${!this._active}><calcite-list .label=${e.settings}><calcite-list-item .label=${e.loop} @click=${() => this._active = "loop"}><div slot=content-end><calcite-chip .label=${e.loopPlayback} .icon=${this.viewModel.layer?.loop ? "recurrence" : "break-recurrence"}></calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.speed} @click=${() => this._active = "speed"}><div slot=content-end><calcite-chip .label=${a(this._speed, o)} scale=s>${a(this._speed, o)}</calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.quality} @click=${() => this._active = "quality"}><div slot=content-end><calcite-chip .label=${this._quality} scale=s>${this._quality}</calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.graphics} @click=${() => this._active = "color"}><calcite-color-picker-swatch .color=${this._color?.toString() ?? d.toString()} scale=s slot=content-end></calcite-color-picker-swatch><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item></calcite-list></calcite-flow-item>${this._active === "speed" ? p : null}${this._active === "quality" ? m : null}${this._active === "color" ? v : null}${this._active === "loop" ? $ : null}</calcite-flow></calcite-popover><calcite-action alignment=center .disabled=${this._disabled} icon=sliders id=settings-action scale=s slot=trigger .text=${e.settings}></calcite-action></div>`;
39
40
  }
40
41
  }
41
- v("arcgis-video-player-settings", k);
42
+ g("arcgis-video-player-settings", y);
42
43
  export {
43
- k as VideoPlayerSettings
44
+ y as VideoPlayerSettings
44
45
  };
@@ -1,27 +1,38 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as i } from "../../chunks/runtime.js";
3
- import { css as o, html as t } from "lit";
4
- import { LitElement as a } from "@arcgis/lumina";
5
- const l = o`:host{min-width:100px;flex:1 1 auto;display:flex;align-items:center;justify-content:center}.slider-progress-container{position:relative;z-index:1;flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center}.progress{--arcgis-internal-video-player-progress-width: 2px;appearance:none;position:absolute;top:calc(50% - var(--arcgis-internal-video-player-progress-width) / 2);left:var(--calcite-spacing-xs);border:none;background:var(--calcite-color-border-1);cursor:pointer;width:calc(100% - var(--calcite-spacing-xs) * 2);height:var(--arcgis-internal-video-player-progress-width)}.progress::-webkit-progress-bar{background-color:var(--calcite-color-border-3)}.progress::-webkit-progress-value{background-color:var(--calcite-color-border-input)}.progress::-moz-progress-bar{background-color:var(--calcite-color-border-3)}.slider{--calcite-slider-track-color: transparent;width:100%}`;
6
- class c extends a {
2
+ import { c } from "../../chunks/runtime.js";
3
+ import { css as n, html as o } from "lit";
4
+ import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
5
+ import { LitElement as d } from "@arcgis/lumina";
6
+ import { createRef as v, ref as u } from "lit/directives/ref.js";
7
+ import { f as t } from "../../chunks/video-utils.js";
8
+ const g = n`:host{min-width:100px;flex:1 1 auto;display:flex;align-items:center;justify-content:center;overflow:visible;position:relative;z-index:2}.slider-progress-container{position:relative;z-index:2;flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center}.progress{--arcgis-internal-video-player-progress-width: 2px;appearance:none;position:absolute;top:calc(50% - var(--arcgis-internal-video-player-progress-width) / 2);left:var(--calcite-spacing-xs);border:none;background:var(--calcite-color-border-1);cursor:pointer;width:calc(100% - var(--calcite-spacing-xs) * 2);height:var(--arcgis-internal-video-player-progress-width)}.progress::-webkit-progress-bar{background-color:var(--calcite-color-border-3)}.progress::-webkit-progress-value{background-color:var(--calcite-color-border-input)}.progress::-moz-progress-bar{background-color:var(--calcite-color-border-3)}.slider{--calcite-slider-track-color: transparent;cursor:pointer;width:100%}`;
9
+ class m extends d {
10
+ constructor() {
11
+ super(...arguments), this._progressContainer = v(), this._supportsPreviews = !1;
12
+ }
7
13
  static {
8
- this.properties = { viewModel: 0, buffered: 9, messages: 0, value: 9 };
14
+ this.properties = { _supportsPreviews: 16, buffered: 9, messages: 0, value: 9, viewModel: 0 };
9
15
  }
10
16
  static {
11
- this.styles = l;
17
+ this.styles = g;
18
+ }
19
+ loaded() {
20
+ this.manager.onLifecycle(() => p(() => this.viewModel.layer?.loaded && this.viewModel.layer.capabilities?.operations?.supportsPreviews, (e) => {
21
+ this._supportsPreviews = !!e;
22
+ }, { initial: !0 }));
12
23
  }
13
- _onSliderInput({ currentTarget: e }) {
24
+ #e({ currentTarget: e }) {
14
25
  if (typeof e.value == "number") {
15
26
  const r = e.value * this.viewModel.duration / 100;
16
27
  this.viewModel.seekTo(r);
17
28
  }
18
29
  }
19
30
  render() {
20
- const { buffered: e, messages: r, value: s } = this;
21
- return t`<div class="slider-progress-container" dir=ltr><progress class="progress" max=1 .value=${`${e}`}></progress><div class="slider"><calcite-slider .label=${r.playbackProgress} max=100 min=0 .value=${s} @calciteSliderInput=${this._onSliderInput}></calcite-slider></div></div>`;
31
+ const { buffered: e, messages: r, value: s } = this, i = this.viewModel.duration, a = t(s * i / 100), l = t(i);
32
+ return o`<div class="slider-progress-container" dir=ltr ${u(this._progressContainer)}><progress class="progress" aria-hidden=true max=1 .value=${`${e}`}></progress><div class="slider"><calcite-slider .label=${`${r.playbackProgress}: ${a} / ${l}`} max=100 min=0 .value=${s} @calciteSliderInput=${this.#e}></calcite-slider></div>${this._supportsPreviews ? o`<arcgis-video-player-previews .referenceElement=${this._progressContainer.value} .viewModel=${this.viewModel}></arcgis-video-player-previews>` : null}</div>`;
22
33
  }
23
34
  }
24
- i("arcgis-video-player-slider", c);
35
+ c("arcgis-video-player-slider", m);
25
36
  export {
26
- c as VideoPlayerSlider
37
+ m as VideoPlayerSlider
27
38
  };
@@ -1,2 +1,3 @@
1
1
  import "@esri/calcite-components/components/calcite-slider";
2
+ import "../arcgis-video-player-previews/index.js";
2
3
  export * from "./customElement.js";