@arcgis/map-components 5.1.0-next.70 → 5.1.0-next.72

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 (78) hide show
  1. package/dist/cdn/3E5YVI67.js +2 -0
  2. package/dist/cdn/DSWEKHYV.js +2 -0
  3. package/dist/cdn/EQVGDKPR.js +2 -0
  4. package/dist/cdn/ISTXVEU6.js +2 -0
  5. package/dist/cdn/MEHQNI5S.js +2 -0
  6. package/dist/cdn/Z4OSJFVK.js +2 -0
  7. package/dist/cdn/assets/slider-scale-range/t9n/messages.ar.json +1 -1
  8. package/dist/cdn/assets/slider-scale-range/t9n/messages.bg.json +1 -1
  9. package/dist/cdn/assets/slider-scale-range/t9n/messages.bs.json +1 -1
  10. package/dist/cdn/assets/slider-scale-range/t9n/messages.ca.json +1 -1
  11. package/dist/cdn/assets/slider-scale-range/t9n/messages.cs.json +1 -1
  12. package/dist/cdn/assets/slider-scale-range/t9n/messages.da.json +1 -1
  13. package/dist/cdn/assets/slider-scale-range/t9n/messages.de.json +1 -1
  14. package/dist/cdn/assets/slider-scale-range/t9n/messages.el.json +1 -1
  15. package/dist/cdn/assets/slider-scale-range/t9n/messages.en.json +1 -1
  16. package/dist/cdn/assets/slider-scale-range/t9n/messages.es.json +1 -1
  17. package/dist/cdn/assets/slider-scale-range/t9n/messages.et.json +1 -1
  18. package/dist/cdn/assets/slider-scale-range/t9n/messages.fi.json +1 -1
  19. package/dist/cdn/assets/slider-scale-range/t9n/messages.fr.json +1 -1
  20. package/dist/cdn/assets/slider-scale-range/t9n/messages.he.json +1 -1
  21. package/dist/cdn/assets/slider-scale-range/t9n/messages.hr.json +1 -1
  22. package/dist/cdn/assets/slider-scale-range/t9n/messages.hu.json +1 -1
  23. package/dist/cdn/assets/slider-scale-range/t9n/messages.id.json +1 -1
  24. package/dist/cdn/assets/slider-scale-range/t9n/messages.it.json +1 -1
  25. package/dist/cdn/assets/slider-scale-range/t9n/messages.ja.json +1 -1
  26. package/dist/cdn/assets/slider-scale-range/t9n/messages.ko.json +1 -1
  27. package/dist/cdn/assets/slider-scale-range/t9n/messages.lt.json +1 -1
  28. package/dist/cdn/assets/slider-scale-range/t9n/messages.lv.json +1 -1
  29. package/dist/cdn/assets/slider-scale-range/t9n/messages.nl.json +1 -1
  30. package/dist/cdn/assets/slider-scale-range/t9n/messages.no.json +1 -1
  31. package/dist/cdn/assets/slider-scale-range/t9n/messages.pl.json +1 -1
  32. package/dist/cdn/assets/slider-scale-range/t9n/messages.pt-BR.json +1 -1
  33. package/dist/cdn/assets/slider-scale-range/t9n/messages.pt-PT.json +1 -1
  34. package/dist/cdn/assets/slider-scale-range/t9n/messages.ro.json +1 -1
  35. package/dist/cdn/assets/slider-scale-range/t9n/messages.ru.json +1 -1
  36. package/dist/cdn/assets/slider-scale-range/t9n/messages.sk.json +1 -1
  37. package/dist/cdn/assets/slider-scale-range/t9n/messages.sl.json +1 -1
  38. package/dist/cdn/assets/slider-scale-range/t9n/messages.sr.json +1 -1
  39. package/dist/cdn/assets/slider-scale-range/t9n/messages.sv.json +1 -1
  40. package/dist/cdn/assets/slider-scale-range/t9n/messages.th.json +1 -1
  41. package/dist/cdn/assets/slider-scale-range/t9n/messages.tr.json +1 -1
  42. package/dist/cdn/assets/slider-scale-range/t9n/messages.uk.json +1 -1
  43. package/dist/cdn/assets/slider-scale-range/t9n/messages.vi.json +1 -1
  44. package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-CN.json +1 -1
  45. package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-HK.json +1 -1
  46. package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-TW.json +1 -1
  47. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.en.json +1 -1
  48. package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.en.json +1 -1
  49. package/dist/cdn/index.js +1 -1
  50. package/dist/components/arcgis-popup/customElement.d.ts +0 -1
  51. package/dist/components/arcgis-presentation/PresentationViewModel.d.ts +1 -3
  52. package/dist/components/arcgis-presentation/customElement.d.ts +0 -48
  53. package/dist/components/arcgis-presentation/customElement.js +87 -242
  54. package/dist/components/arcgis-slider-scale-range/customElement.d.ts +2 -0
  55. package/dist/components/arcgis-slider-scale-range/customElement.js +52 -51
  56. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +6 -0
  57. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +22 -25
  58. package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +9 -1
  59. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +22 -19
  60. package/dist/components/arcgis-utility-network-trace-location/customElement.js +24 -22
  61. package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +18 -18
  62. package/dist/docs/api.json +1 -1
  63. package/dist/docs/docs.json +1 -1
  64. package/dist/docs/vscode.html-custom-data.json +1 -1
  65. package/dist/docs/web-types.json +1 -1
  66. package/dist/loader.js +2 -2
  67. package/dist/types/lumina.d.ts +1 -3
  68. package/dist/types/preact.d.ts +1 -3
  69. package/dist/types/react.d.ts +1 -3
  70. package/dist/types/stencil.d.ts +1 -3
  71. package/package.json +4 -4
  72. package/dist/cdn/66MVIWL6.js +0 -2
  73. package/dist/cdn/A5EKENWD.js +0 -2
  74. package/dist/cdn/CCU5PXRH.js +0 -2
  75. package/dist/cdn/LE4EZMBM.js +0 -2
  76. package/dist/cdn/PF6CET5C.js +0 -2
  77. package/dist/cdn/WYTALJLT.js +0 -2
  78. /package/dist/cdn/assets/slider-scale-range/t9n/{ScaleRangeSlider.json → messages.ScaleRangeSlider.json} +0 -0
@@ -1,41 +1,32 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as w } from "../../chunks/runtime.js";
3
- import { css as _, html as h } from "lit";
4
- import { GenericController as I, useDirection as x } from "@arcgis/lumina/controllers";
5
- import { LitElement as F, createEvent as S, nothing as u } from "@arcgis/lumina";
6
- import { u as P } from "../../chunks/useT9n.js";
7
- import { m as A } from "../../chunks/useViewModel.js";
8
- import { property as d, subclass as C } from "@arcgis/core/core/accessorSupport/decorators.js";
9
- import L from "@arcgis/core/core/Accessor.js";
10
- import y from "@arcgis/core/core/Collection.js";
11
- import { ignoreAbortErrors as E } from "@arcgis/core/core/promiseUtils.js";
12
- import { on as O, whenOnce as g, watch as M } from "@arcgis/core/core/reactiveUtils.js";
13
- import N from "@arcgis/core/Graphic.js";
14
- import T from "@arcgis/core/layers/Layer.js";
15
- import B from "@arcgis/core/graphic/CSVGraphicOrigin.js";
16
- import G from "@arcgis/core/graphic/GeoJSONGraphicOrigin.js";
17
- import R from "@arcgis/core/graphic/SceneGraphicOrigin.js";
18
- import $ from "@arcgis/core/graphic/WFSGraphicOrigin.js";
19
- import V from "@arcgis/core/graphic/BuildingGraphicOrigin.js";
20
- import k from "@arcgis/core/graphic/FeatureGraphicOrigin.js";
21
- import { fetchPopupFeaturesFromGraphics as b } from "@arcgis/core/applications/SceneViewer/sceneViewerUtils.js";
22
- const D = _`:host{width:100%;height:100%;padding:var(--calcite-spacing-none);margin:var(--calcite-spacing-none);display:flex}p{padding:0;margin:0}.root{--internal-attribution-height: 16px;pointer-events:auto;display:flex;align-items:center;gap:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);box-shadow:var(--arcgis-internal-box-shadow);align-self:flex-end;margin-block:auto calc(var(--calcite-spacing-fixed-xl) + var(--internal-attribution-height));margin-inline-start:var(--calcite-spacing-fixed-xl)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-spacing-base);min-width:64px}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums}`;
23
- var H = Object.defineProperty, j = Object.getOwnPropertyDescriptor, l = (s, e, t, i) => {
24
- for (var r = i > 1 ? void 0 : i ? j(e, t) : e, n = s.length - 1, a; n >= 0; n--)
25
- (a = s[n]) && (r = (i ? a(e, t, r) : a(r)) || r);
26
- return i && r && H(e, t, r), r;
2
+ import { c as v } from "../../chunks/runtime.js";
3
+ import { css as g, html as h } from "lit";
4
+ import { useDirection as u } from "@arcgis/lumina/controllers";
5
+ import { LitElement as S, createEvent as m, nothing as a } from "@arcgis/lumina";
6
+ import { u as b } from "../../chunks/useT9n.js";
7
+ import { m as w } from "../../chunks/useViewModel.js";
8
+ import { property as d, subclass as y } from "@arcgis/core/core/accessorSupport/decorators.js";
9
+ import f from "@arcgis/core/core/Accessor.js";
10
+ import p from "@arcgis/core/core/Collection.js";
11
+ import { ignoreAbortErrors as x } from "@arcgis/core/core/promiseUtils.js";
12
+ import { on as I, watch as _ } from "@arcgis/core/core/reactiveUtils.js";
13
+ const E = g`:host{width:100%;height:100%;padding:var(--calcite-spacing-none);margin:var(--calcite-spacing-none);display:flex}p{padding:0;margin:0}.root{--internal-attribution-height: 16px;pointer-events:auto;display:flex;align-items:center;gap:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);box-shadow:var(--arcgis-internal-box-shadow);align-self:flex-end;margin-block:auto calc(var(--calcite-spacing-fixed-xl) + var(--internal-attribution-height));margin-inline-start:var(--calcite-spacing-fixed-xl)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-spacing-base);min-width:64px}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums}`;
14
+ var M = Object.defineProperty, A = Object.getOwnPropertyDescriptor, r = (e, t, i, l) => {
15
+ for (var n = l > 1 ? void 0 : l ? A(t, i) : t, c = e.length - 1, o; c >= 0; c--)
16
+ (o = e[c]) && (n = (l ? o(t, i, n) : o(n)) || n);
17
+ return l && n && M(t, i, n), n;
27
18
  };
28
- let o = class extends L {
19
+ let s = class extends f {
29
20
  //#region Lifecycle
30
- constructor(s) {
31
- super(s), this.keyboardNavigationEnabled = !1, this._subscribeToSlideEvents = (e) => {
32
- this._unSubscribeToSlideEvents(e), e.forEach((t) => {
33
- const i = t.on("apply-slide-start", () => this._onApplySlideStart(t)), r = t.on("apply-slide-complete", () => this._onApplySlideComplete(t));
34
- this.addHandles(i, t.id), this.addHandles(r, t.id);
21
+ constructor(e) {
22
+ super(e), this.keyboardNavigationEnabled = !1, this._subscribeToSlideEvents = (t) => {
23
+ this._unSubscribeToSlideEvents(t), t.forEach((i) => {
24
+ const l = i.on("apply-slide-start", () => this._onApplySlideStart(i));
25
+ this.addHandles(l, i.id);
35
26
  });
36
- }, this._unSubscribeToSlideEvents = (e) => {
37
- e.forEach((t) => {
38
- this.hasHandles(t.id) && this.removeHandles(t.id);
27
+ }, this._unSubscribeToSlideEvents = (t) => {
28
+ t.forEach((i) => {
29
+ this.hasHandles(i.id) && this.removeHandles(i.id);
39
30
  });
40
31
  };
41
32
  }
@@ -46,7 +37,7 @@ let o = class extends L {
46
37
  this._unSubscribeToSlideEvents(this.visibleSlides);
47
38
  }
48
39
  get visibleSlides() {
49
- return this.view?.map?.presentation?.slides?.filter((s) => !s.hidden) ?? new y();
40
+ return this.view?.map?.presentation?.slides?.filter((e) => !e.hidden) ?? new p();
50
41
  }
51
42
  get lastSlideSelected() {
52
43
  return this.getSlideIndexBySlideId(this.slideId) === this.visibleSlides.length - 1;
@@ -63,38 +54,38 @@ let o = class extends L {
63
54
  get slideIndex() {
64
55
  return this.getSlideIndexBySlideId(this.slideId);
65
56
  }
66
- getSlideIndexBySlideId(s) {
67
- let e = -1;
68
- return s && (e = this.visibleSlides.findIndex((t) => t.id === s)), e;
57
+ getSlideIndexBySlideId(e) {
58
+ let t = -1;
59
+ return e && (t = this.visibleSlides.findIndex((i) => i.id === e)), t;
69
60
  }
70
- navigateInPresentation(s) {
71
- const e = this.slideIndex + s;
72
- let t = this._getSlideBySlideIndex(e);
73
- t ??= this._getSlideBySlideIndex(0), t && this._applySlide(t);
61
+ navigateInPresentation(e) {
62
+ const t = this.slideIndex + e;
63
+ let i = this._getSlideBySlideIndex(t);
64
+ i ??= this._getSlideBySlideIndex(0), i && this._applySlide(i);
74
65
  }
75
- captureArrowKeysForNavigation(s, e) {
76
- const t = ["ArrowLeft", "ArrowRight", "PageUp", "PageDown"];
77
- if (document.activeElement?.nodeName.toLowerCase() === "arcgis-scene" || !t.includes(s.code))
66
+ captureArrowKeysForNavigation(e, t) {
67
+ const i = ["ArrowLeft", "ArrowRight", "PageUp", "PageDown"];
68
+ if (document.activeElement?.nodeName.toLowerCase() === "arcgis-scene" || !i.includes(e.code))
78
69
  return;
79
- const r = e === "rtl" ? "ArrowRight" : "ArrowLeft", a = s.code === r || s.code === "PageUp" ? -1 : 1;
80
- this.navigateInPresentation(a);
70
+ const n = t === "rtl" ? "ArrowRight" : "ArrowLeft", o = e.code === n || e.code === "PageUp" ? -1 : 1;
71
+ this.navigateInPresentation(o);
81
72
  }
82
73
  //#endregion
83
74
  //#region Private Methods
84
- _getSlideBySlideIndex(s) {
85
- if (s != null && s >= 0 && s < this.visibleSlides.length)
86
- return this.visibleSlides.getItemAt(s);
75
+ _getSlideBySlideIndex(e) {
76
+ if (e != null && e >= 0 && e < this.visibleSlides.length)
77
+ return this.visibleSlides.getItemAt(e);
87
78
  }
88
- async _applySlide(s) {
89
- this.view && await E(s.applyTo(this.view));
79
+ async _applySlide(e) {
80
+ this.view && await x(e.applyTo(this.view));
90
81
  }
91
82
  _startWatchVisibleSlides() {
92
83
  this._subscribeToSlideEvents(this.visibleSlides), this.addHandles(
93
- O(
84
+ I(
94
85
  () => this.visibleSlides,
95
86
  "change",
96
- (s) => {
97
- this._subscribeToSlideEvents(new y(s.added)), this._unSubscribeToSlideEvents(new y(s.removed));
87
+ (e) => {
88
+ this._subscribeToSlideEvents(new p(e.added)), this._unSubscribeToSlideEvents(new p(e.removed));
98
89
  },
99
90
  {
100
91
  onListenerAdd: this._subscribeToSlideEvents,
@@ -103,226 +94,80 @@ let o = class extends L {
103
94
  )
104
95
  );
105
96
  }
106
- _onApplySlideStart(s) {
107
- this.slideId = s.id, this.onApplySlideStart?.(s);
108
- }
109
- _onApplySlideComplete(s) {
110
- this.onApplySlideComplete?.(s);
97
+ _onApplySlideStart(e) {
98
+ this.slideId = e.id;
111
99
  }
112
100
  //#endregion
113
101
  };
114
- l([
115
- d()
116
- ], o.prototype, "view", 2);
117
- l([
118
- d()
119
- ], o.prototype, "slideId", 2);
120
- l([
102
+ r([
121
103
  d()
122
- ], o.prototype, "keyboardNavigationEnabled", 2);
123
- l([
104
+ ], s.prototype, "view", 2);
105
+ r([
124
106
  d()
125
- ], o.prototype, "visibleSlides", 1);
126
- l([
107
+ ], s.prototype, "slideId", 2);
108
+ r([
127
109
  d()
128
- ], o.prototype, "lastSlideSelected", 1);
129
- l([
110
+ ], s.prototype, "keyboardNavigationEnabled", 2);
111
+ r([
130
112
  d()
131
- ], o.prototype, "firstSlideSelected", 1);
132
- l([
113
+ ], s.prototype, "visibleSlides", 1);
114
+ r([
133
115
  d()
134
- ], o.prototype, "slideSelected", 1);
135
- l([
116
+ ], s.prototype, "lastSlideSelected", 1);
117
+ r([
136
118
  d()
137
- ], o.prototype, "hasOnlyOneSlide", 1);
138
- l([
119
+ ], s.prototype, "firstSlideSelected", 1);
120
+ r([
139
121
  d()
140
- ], o.prototype, "onApplySlideStart", 2);
141
- l([
122
+ ], s.prototype, "slideSelected", 1);
123
+ r([
142
124
  d()
143
- ], o.prototype, "onApplySlideComplete", 2);
144
- l([
125
+ ], s.prototype, "hasOnlyOneSlide", 1);
126
+ r([
145
127
  d()
146
- ], o.prototype, "getSlideIndexBySlideId", 1);
147
- o = l([
148
- C("components.presentation.PresentationViewModel")
149
- ], o);
150
- class W extends I {
151
- constructor(e) {
152
- super(e);
153
- }
154
- hostLoaded() {
155
- this.component.manager.onLifecycle(() => {
156
- const e = this.component;
157
- g(() => e.referenceElement).then((t) => {
158
- this._isArcgisScene(t) && (this._sceneRef = t);
159
- });
160
- });
161
- }
162
- openPopup(e) {
163
- this.component.view && this.component.slideId === e.id && e.elements.popupInfo != null && this._preparePopupFeature(this.component.view, e.elements.popupInfo).then(
164
- ({ success: t, features: i, popupInfo: r }) => {
165
- this.component.slideId === e.id && (t ? this._handlePopupFeatureFound(e, i, r) : this.component.arcgisPopupFeatureNotFound.emit({ slide: e }));
166
- }
167
- );
168
- }
169
- //#region Private Methods
170
- _isArcgisScene(e) {
171
- return e === void 0 || typeof e == "string" ? !1 : "tagName" in e && e.tagName === "ARCGIS-SCENE";
172
- }
173
- closePopup() {
174
- this.component.popupDisabled || this._sceneRef?.closePopup();
175
- }
176
- async _handlePopupFeatureFound(e, t, i) {
177
- const r = i?.location ?? void 0;
178
- this.component.arcgisPopupFeaturesRetrieved.emit({ slide: e, features: t, location: r }), this.component.popupDisabled || await this._sceneRef?.openPopup({
179
- features: t,
180
- location: r
181
- });
182
- }
183
- async _preparePopupFeature(e, t) {
184
- let i = [];
185
- if (!t.features?.length || t.features.length === 0)
186
- return { success: !1, features: i };
187
- const r = t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;
188
- if (r?.layerId == null)
189
- return { success: !1, features: i };
190
- const { layer: n, sublayer: a } = this._getLayersFromView(e, r.layerId, r?.sublayerId);
191
- if (!n)
192
- return { success: !1, features: i };
193
- const c = a ?? n;
194
- if (!c || !this._layerTypeSupportsCapturePopup(c))
195
- return { success: !1, features: i };
196
- if (i = await this._fetchFeaturesFromQueryable(e, t, n, a, c), i && this._featureHasBeenFilledWithAttributes(i)) {
197
- const p = i[0];
198
- return this._setFallbackPopupTemplate(p, a, n), this._setFallbackGeometry(p, t?.location), { success: !0, features: i, popupInfo: t };
199
- }
200
- return { success: !1, features: i };
201
- }
202
- _getLayersFromView(e, t, i) {
203
- const r = e.map?.allLayers?.find((a) => a.id === t), n = this._getBuildingSceneLayerSublayer(r, i);
204
- return { layer: r, sublayer: n };
205
- }
206
- _getBuildingSceneLayerSublayer(e, t) {
207
- let i;
208
- return e && this._isLayer(e) && this._isBuildingSceneLayer(e) && t != null && (i = e.allSublayers.find(
209
- (r) => r.id === t && r.type === "building-component"
210
- )), i;
211
- }
212
- _featureHasBeenFilledWithAttributes(e) {
213
- return e && e.length > 0 && e[0].attributes && Object.entries(e[0].attributes)?.length > 1;
214
- }
215
- async _fetchFeaturesFromQueryable(e, t, i, r, n) {
216
- const a = t.features?.getItemAt(t.selectedFeatureIndex);
217
- if (a?.id == null)
218
- return await Promise.resolve([]);
219
- const c = await e.whenLayerView(i);
220
- await g(() => !c.updating);
221
- const m = this._tryGetBuildingComponentSublayerView(i, r, c) ?? c;
222
- await g(() => !m.updating);
223
- const f = this._createFeatureGraphic(i, r, n, a.id);
224
- let v = await b(m, [f]);
225
- return this._featureHasBeenFilledWithAttributes(v) || (await g(() => !e.updating), v = await b(m, [f])), v;
226
- }
227
- _tryGetBuildingComponentSublayerView(e, t, i) {
228
- let r;
229
- return this._isLayer(e) && this._isBuildingSceneLayer(e) && t != null && (r = i.sublayerViews.find(
230
- (n) => n.sublayer.id === t.id
231
- )), r;
232
- }
233
- _setFallbackPopupTemplate(e, t, i) {
234
- e.popupTemplate == null && (e.popupTemplate = t?.popupTemplate ? t.popupTemplate : i.popupTemplate);
235
- }
236
- /**
237
- * If there is no geometry of the feature in the service,
238
- * the popup highlights the location point in the scene.
239
- *
240
- * @param popupFeature
241
- * @param location
242
- * @private
243
- */
244
- _setFallbackGeometry(e, t) {
245
- e.geometry == null && t && (e.geometry = t.clone());
246
- }
247
- _createFeatureGraphic(e, t, i, r) {
248
- const n = this._getGlobalIdFieldNameFromLayer(i), a = r.type === "global-id" && n ? n : i.objectIdField, c = this._getGraphicOrigin(e, t), p = new N({ attributes: {}, layer: e, origin: c });
249
- return p.attributes[a] = r.value, p;
250
- }
251
- _getGraphicOrigin(e, t) {
252
- switch (e.type) {
253
- case "csv":
254
- return new B(e);
255
- case "feature":
256
- return new k(e);
257
- case "geojson":
258
- return new G(e);
259
- case "scene":
260
- return new R(e);
261
- case "wfs":
262
- return new $(e);
263
- case "building-scene":
264
- return t ? new V(t) : void 0;
265
- default:
266
- return;
267
- }
268
- }
269
- _layerTypeSupportsCapturePopup(e) {
270
- return e != null && ["csv", "feature", "geojson", "wfs", "scene", "building-component"].includes(e.type);
271
- }
272
- _isLayer(e) {
273
- return !!e && e instanceof T;
274
- }
275
- _isBuildingSceneLayer(e) {
276
- return e?.type === "building-scene";
277
- }
278
- _getGlobalIdFieldNameFromLayer(e) {
279
- return e.fields?.find((t) => t.type === "global-id")?.name;
280
- }
281
- //#endregion
282
- }
283
- const K = (s) => new W(s), z = A(o);
284
- class Q extends F {
128
+ ], s.prototype, "getSlideIndexBySlideId", 1);
129
+ s = r([
130
+ y("components.presentation.PresentationViewModel")
131
+ ], s);
132
+ const $ = w(s);
133
+ class P extends S {
285
134
  constructor() {
286
- super(...arguments), this._messages = P(), this.viewModel = z(this), this._direction = x(), this._captureArrowKeysForNavigation = (e) => {
287
- this.viewModel.captureArrowKeysForNavigation(e, this._direction);
288
- }, this._useFeatureRefPopup = K(this), this._handleApplySlideStart = () => {
289
- this._useFeatureRefPopup.closePopup();
290
- }, this._handleApplySlideComplete = (e) => {
291
- this._useFeatureRefPopup.openPopup(e);
292
- }, this.autoDestroyDisabled = !1, this.view = this.viewModel.view, this.scale = "m", this.keyboardNavigationEnabled = !1, this.popupDisabled = !1, this.arcgisPopupFeatureNotFound = S(), this.arcgisPopupFeaturesRetrieved = S(), this.arcgisReady = S();
135
+ super(...arguments), this._messages = b(), this.viewModel = $(this), this._direction = u(), this._captureArrowKeysForNavigation = (t) => {
136
+ this.viewModel.captureArrowKeysForNavigation(t, this._direction);
137
+ }, this.autoDestroyDisabled = !1, this.view = this.viewModel.view, this.scale = "m", this.keyboardNavigationEnabled = !1, this.arcgisReady = m();
293
138
  }
294
139
  static {
295
- this.properties = { slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5, popupDisabled: 5 };
140
+ this.properties = { slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5 };
296
141
  }
297
142
  static {
298
- this.styles = D;
143
+ this.styles = E;
299
144
  }
300
145
  get slideId() {
301
146
  return this.viewModel.slideId;
302
147
  }
303
- set slideId(e) {
304
- this.viewModel.slideId = e;
148
+ set slideId(t) {
149
+ this.viewModel.slideId = t;
305
150
  }
306
151
  async destroy() {
307
152
  await this.manager.destroy();
308
153
  }
309
154
  loaded() {
310
- this.manager.onLifecycle(() => (this.viewModel.onApplySlideStart = this._handleApplySlideStart, this.viewModel.onApplySlideComplete = this._handleApplySlideComplete, M(() => this.keyboardNavigationEnabled, (t) => {
311
- document.removeEventListener("keydown", this._captureArrowKeysForNavigation), t && document.addEventListener("keydown", this._captureArrowKeysForNavigation);
312
- }, { initial: !0 }))), this.manager.onDisconnected(() => {
155
+ this.manager.onLifecycle(() => _(() => this.keyboardNavigationEnabled, (i) => {
156
+ document.removeEventListener("keydown", this._captureArrowKeysForNavigation), i && document.addEventListener("keydown", this._captureArrowKeysForNavigation);
157
+ }, { initial: !0 })), this.manager.onDisconnected(() => {
313
158
  document.removeEventListener("keydown", this._captureArrowKeysForNavigation);
314
159
  });
315
160
  }
316
161
  render() {
317
- const e = this.viewModel.lastSlideSelected && !this.viewModel.hasOnlyOneSlide, t = this._direction === "rtl", i = t ? "chevron-right" : "chevron-left", r = t ? "chevron-left" : "chevron-right";
318
- return this.viewModel.visibleSlides.length === 0 ? h`<div></div>` : h`<div class="root"><calcite-button appearance=transparent icon-start=${i ?? u} kind=neutral .scale=${this.scale} .disabled=${this.viewModel.firstSlideSelected || !this.viewModel.slideSelected} .label=${this._messages.previous} title=${this._messages.previous ?? u} @click=${() => this.viewModel.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this._renderSlideCounter()}</div><calcite-button appearance=transparent icon-start=${(e ? "reset" : r) ?? u} kind=neutral .scale=${this.scale} .label=${e ? this._messages.restart : this._messages.next} title=${(e ? this._messages.restart : this._messages.next) ?? u} @click=${() => this.viewModel.navigateInPresentation(1)}></calcite-button></div>`;
162
+ const t = this.viewModel.lastSlideSelected && !this.viewModel.hasOnlyOneSlide, i = this._direction === "rtl", l = i ? "chevron-right" : "chevron-left", n = i ? "chevron-left" : "chevron-right";
163
+ return this.viewModel.visibleSlides.length === 0 ? h`<div></div>` : h`<div class="root"><calcite-button appearance=transparent icon-start=${l ?? a} kind=neutral .scale=${this.scale} .disabled=${this.viewModel.firstSlideSelected || !this.viewModel.slideSelected} .label=${this._messages.previous} title=${this._messages.previous ?? a} @click=${() => this.viewModel.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this._renderSlideCounter()}</div><calcite-button appearance=transparent icon-start=${(t ? "reset" : n) ?? a} kind=neutral .scale=${this.scale} .label=${t ? this._messages.restart : this._messages.next} title=${(t ? this._messages.restart : this._messages.next) ?? a} @click=${() => this.viewModel.navigateInPresentation(1)}></calcite-button></div>`;
319
164
  }
320
165
  _renderSlideCounter() {
321
- const e = this.viewModel.slideIndex + 1, t = this._messages?.slideNavAriaText?.replace("${index}", e.toString()).replace("${numberOfSlides}", this.viewModel.visibleSlides.length.toString());
322
- return this.viewModel.slideSelected ? h`<p role=banner aria-label=${t ?? u} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div class="slide-counter-text-element">/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this.viewModel.visibleSlides.length}</p></p>` : h`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.viewModel.visibleSlides?.length} ${this._messages?.slides}</p>`;
166
+ const t = this.viewModel.slideIndex + 1, i = this._messages?.slideNavAriaText?.replace("${index}", t.toString()).replace("${numberOfSlides}", this.viewModel.visibleSlides.length.toString());
167
+ return this.viewModel.slideSelected ? h`<p role=banner aria-label=${i ?? a} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${t}</div><div class="slide-counter-text-element">/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this.viewModel.visibleSlides.length}</p></p>` : h`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.viewModel.visibleSlides?.length} ${this._messages?.slides}</p>`;
323
168
  }
324
169
  }
325
- w("arcgis-presentation", Q);
170
+ v("arcgis-presentation", P);
326
171
  export {
327
- Q as ArcgisPresentation
172
+ P as ArcgisPresentation
328
173
  };
@@ -98,6 +98,7 @@ export abstract class ArcgisSliderScaleRange extends LitElement {
98
98
  setToSelectOne: string;
99
99
  aboveSuffix: string;
100
100
  belowSuffix: string;
101
+ currentScale: string;
101
102
  scaleRangeLabels: {
102
103
  world: string;
103
104
  continent: string;
@@ -156,6 +157,7 @@ export abstract class ArcgisSliderScaleRange extends LitElement {
156
157
  setToSelectOne: string;
157
158
  aboveSuffix: string;
158
159
  belowSuffix: string;
160
+ currentScale: string;
159
161
  scaleRangeLabels: {
160
162
  world: string;
161
163
  continent: string;