@arcgis/map-components 5.2.0-next.26 → 5.2.0-next.28
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/3JEAUEUY.js +2 -0
- package/dist/cdn/{VAYZZ5OC.js → 3PM2WTS4.js} +1 -1
- package/dist/cdn/4LB5GOV2.js +2 -0
- package/dist/cdn/{HOIUABRJ.js → A5W6D3EH.js} +1 -1
- package/dist/cdn/BM3NHWBY.js +2 -0
- package/dist/cdn/YNIECEKR.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-feature-utility-network-associations/customElement.js +86 -93
- package/dist/components/arcgis-features/customElement.d.ts +2 -2
- package/dist/components/arcgis-features/customElement.js +23 -21
- package/dist/components/arcgis-features-next/customElement.d.ts +0 -7
- package/dist/components/arcgis-features-next/customElement.js +1 -5
- package/dist/components/arcgis-popup/customElement.d.ts +0 -9
- package/dist/components/arcgis-popup/customElement.js +0 -3
- package/dist/components/arcgis-presentation/PresentationViewModel.d.ts +4 -1
- package/dist/components/arcgis-presentation/customElement.d.ts +7 -0
- package/dist/components/arcgis-presentation/customElement.js +117 -101
- package/dist/components/arcgis-search/customElement.js +5 -5
- 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 +3 -3
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cdn/H6MYLGUN.js +0 -2
- package/dist/cdn/MGAHLABQ.js +0 -2
- package/dist/cdn/W5HSEDAR.js +0 -2
- package/dist/cdn/XMBA7QLQ.js +0 -2
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { GenericController as
|
|
5
|
-
import { LitElement as R, createEvent as
|
|
6
|
-
import { u as
|
|
7
|
-
import { m as
|
|
8
|
-
import { property as d, subclass as
|
|
2
|
+
import { c as z } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as M, html as g } from "lit";
|
|
4
|
+
import { GenericController as C, proxyExports as O, useDirection as $ } from "@arcgis/lumina/controllers";
|
|
5
|
+
import { LitElement as R, createEvent as v, nothing as y } from "@arcgis/lumina";
|
|
6
|
+
import { u as N } from "../../chunks/useT9n.js";
|
|
7
|
+
import { m as B } from "../../chunks/useViewModel.js";
|
|
8
|
+
import { property as d, subclass as G } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
9
9
|
import E from "@arcgis/core/core/Accessor.js";
|
|
10
|
-
import
|
|
11
|
-
import { ignoreAbortErrors as
|
|
12
|
-
import { watch as
|
|
13
|
-
import
|
|
10
|
+
import w from "@arcgis/core/core/Collection.js";
|
|
11
|
+
import { ignoreAbortErrors as H } from "@arcgis/core/core/promiseUtils.js";
|
|
12
|
+
import { watch as u, on as T, whenOnce as _ } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
|
+
import D from "@arcgis/core/Graphic.js";
|
|
14
14
|
import V from "@arcgis/core/layers/Layer.js";
|
|
15
15
|
import k from "@arcgis/core/graphic/CSVGraphicOrigin.js";
|
|
16
16
|
import j from "@arcgis/core/graphic/GeoJSONGraphicOrigin.js";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import K from "@arcgis/core/graphic/SceneGraphicOrigin.js";
|
|
18
|
+
import W from "@arcgis/core/graphic/WFSGraphicOrigin.js";
|
|
19
19
|
import U from "@arcgis/core/graphic/BuildingGraphicOrigin.js";
|
|
20
20
|
import Q from "@arcgis/core/graphic/FeatureGraphicOrigin.js";
|
|
21
|
-
import { fetchPopupFeaturesFromGraphics as
|
|
22
|
-
import { s as
|
|
23
|
-
const q =
|
|
21
|
+
import { fetchPopupFeaturesFromGraphics as P } from "@arcgis/core/applications/SceneViewer/sceneViewerUtils.js";
|
|
22
|
+
import { s as I } from "../../chunks/resources.js";
|
|
23
|
+
const q = M`:host{width:100%;height:100%;padding:var(--calcite-spacing-none);margin:var(--calcite-spacing-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{display:flex;width:100%;justify-content:flex-end;padding-top:var(--calcite-spacing-lg);padding-inline-start:calc(var(--calcite-spacing-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-spacing-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation{width:fit-content;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);margin-block:auto calc(var(--calcite-spacing-lg) + var(--internal-attribution-height));margin-inline-start:var(--calcite-spacing-lg)}.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}.legend{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:auto;max-height:calc(100vh - 136px);overflow:hidden auto}`;
|
|
24
24
|
var J = Object.defineProperty, X = Object.getOwnPropertyDescriptor, l = (i, e, t, s) => {
|
|
25
25
|
for (var n = s > 1 ? void 0 : s ? X(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
26
26
|
(a = i[r]) && (n = (s ? a(e, t, n) : a(n)) || n);
|
|
@@ -43,7 +43,7 @@ let o = class extends E {
|
|
|
43
43
|
}
|
|
44
44
|
initialize() {
|
|
45
45
|
this.addHandles(
|
|
46
|
-
|
|
46
|
+
u(
|
|
47
47
|
() => this.view?.map,
|
|
48
48
|
(i, e) => {
|
|
49
49
|
if (this.hasHandles("sceneLoaded") && this.removeHandles("sceneLoaded"), e) {
|
|
@@ -51,7 +51,7 @@ let o = class extends E {
|
|
|
51
51
|
t && t.length > 0 && this._unsubscribeToSlideEvents(t);
|
|
52
52
|
}
|
|
53
53
|
i && this.addHandles(
|
|
54
|
-
|
|
54
|
+
u(
|
|
55
55
|
() => i.loaded,
|
|
56
56
|
(t) => {
|
|
57
57
|
t && (this.removeHandles("sceneLoaded"), this._startWatchSlides(), this._slideId && this._applySlideById(this._slideId));
|
|
@@ -75,10 +75,10 @@ let o = class extends E {
|
|
|
75
75
|
i === void 0 || !this.view?.map?.loaded ? this._slideId = i : this._applySlideById(i);
|
|
76
76
|
}
|
|
77
77
|
get visibleSlides() {
|
|
78
|
-
return this.view?.map?.presentation?.slides?.filter((i) => !i.hidden) ?? new
|
|
78
|
+
return this.view?.map?.presentation?.slides?.filter((i) => !i.hidden) ?? new w();
|
|
79
79
|
}
|
|
80
80
|
get slides() {
|
|
81
|
-
return this.view?.map?.presentation?.slides ?? new
|
|
81
|
+
return this.view?.map?.presentation?.slides ?? new w();
|
|
82
82
|
}
|
|
83
83
|
get lastSlideSelected() {
|
|
84
84
|
return this.getSlideIndexBySlideId(this.slideId) === this.visibleSlides.length - 1;
|
|
@@ -111,16 +111,19 @@ let o = class extends E {
|
|
|
111
111
|
const n = e === "rtl" ? "ArrowRight" : "ArrowLeft", a = i.code === n || i.code === "PageUp" ? -1 : 1;
|
|
112
112
|
this.navigateInPresentation(a);
|
|
113
113
|
}
|
|
114
|
-
async setSliceAnalysisInteractive() {
|
|
114
|
+
async setSliceAnalysisInteractive(i) {
|
|
115
115
|
if (!this.view?.analyses?.length)
|
|
116
116
|
return;
|
|
117
|
-
const
|
|
118
|
-
(
|
|
117
|
+
const e = this.view.analyses.find(
|
|
118
|
+
(s) => s.type === "slice" && s.origin?.type === "web-scene"
|
|
119
119
|
);
|
|
120
|
-
if (!
|
|
120
|
+
if (!e)
|
|
121
121
|
return;
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const t = await this.view.whenAnalysisView(e);
|
|
123
|
+
t && (t.interactive = i);
|
|
124
|
+
}
|
|
125
|
+
getSlideBySlideId(i) {
|
|
126
|
+
return this.visibleSlides.find((e) => e.id === i);
|
|
124
127
|
}
|
|
125
128
|
//#endregion
|
|
126
129
|
//#region Private Methods
|
|
@@ -129,22 +132,19 @@ let o = class extends E {
|
|
|
129
132
|
return this.visibleSlides.getItemAt(i);
|
|
130
133
|
}
|
|
131
134
|
async _applySlideById(i) {
|
|
132
|
-
const e = i ? this.
|
|
135
|
+
const e = i ? this.getSlideBySlideId(i) : void 0;
|
|
133
136
|
e && await this._applySlide(e);
|
|
134
137
|
}
|
|
135
|
-
_getSlideBySlideId(i) {
|
|
136
|
-
return this.visibleSlides.find((e) => e.id === i);
|
|
137
|
-
}
|
|
138
138
|
async _applySlide(i) {
|
|
139
|
-
this.view && await
|
|
139
|
+
this.view && await H(i.applyTo(this.view));
|
|
140
140
|
}
|
|
141
141
|
_startWatchSlides() {
|
|
142
142
|
this._subscribeToSlideEvents(this.slides), this.addHandles(
|
|
143
|
-
|
|
143
|
+
T(
|
|
144
144
|
() => this.slides,
|
|
145
145
|
"change",
|
|
146
146
|
(i) => {
|
|
147
|
-
this._subscribeToSlideEvents(new
|
|
147
|
+
this._subscribeToSlideEvents(new w(i.added)), this._unsubscribeToSlideEvents(new w(i.removed));
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
onListenerAdd: this._subscribeToSlideEvents,
|
|
@@ -213,16 +213,16 @@ l([
|
|
|
213
213
|
d()
|
|
214
214
|
], o.prototype, "getSlideIndexBySlideId", 1);
|
|
215
215
|
o = l([
|
|
216
|
-
|
|
216
|
+
G("components.presentation.PresentationViewModel")
|
|
217
217
|
], o);
|
|
218
|
-
class Y extends
|
|
218
|
+
class Y extends C {
|
|
219
219
|
constructor(e) {
|
|
220
220
|
super(e);
|
|
221
221
|
}
|
|
222
222
|
hostLoaded() {
|
|
223
223
|
this.component.manager.onLifecycle(() => {
|
|
224
224
|
const e = this.component;
|
|
225
|
-
|
|
225
|
+
_(() => e.referenceElement).then((t) => {
|
|
226
226
|
this._isArcgisScene(t) && (this._sceneRef = t);
|
|
227
227
|
});
|
|
228
228
|
});
|
|
@@ -238,8 +238,8 @@ class Y extends P {
|
|
|
238
238
|
_isArcgisScene(e) {
|
|
239
239
|
return e === void 0 || typeof e == "string" ? !1 : "tagName" in e && e.tagName === "ARCGIS-SCENE";
|
|
240
240
|
}
|
|
241
|
-
closePopup() {
|
|
242
|
-
this.component.slidePopupDisabled || this._sceneRef?.closePopup();
|
|
241
|
+
closePopup(e) {
|
|
242
|
+
(!this.component.slidePopupDisabled || e) && this._sceneRef?.closePopup();
|
|
243
243
|
}
|
|
244
244
|
async _handlePopupFeatureFound(e, t, s) {
|
|
245
245
|
const n = s?.location ?? void 0;
|
|
@@ -265,7 +265,6 @@ class Y extends P {
|
|
|
265
265
|
const p = s[0];
|
|
266
266
|
return this._setFallbackPopupTemplate(p, a, r), this._setFallbackGeometry(p, t?.location), { success: !0, features: s, popupInfo: t };
|
|
267
267
|
}
|
|
268
|
-
debugger;
|
|
269
268
|
return { success: !1, features: s };
|
|
270
269
|
}
|
|
271
270
|
_getLayersFromView(e, t, s) {
|
|
@@ -286,12 +285,12 @@ class Y extends P {
|
|
|
286
285
|
if (a?.id == null)
|
|
287
286
|
return await Promise.resolve([]);
|
|
288
287
|
const c = await e.whenLayerView(s);
|
|
289
|
-
await
|
|
288
|
+
await _(() => !c.updating);
|
|
290
289
|
const h = this._tryGetBuildingComponentSublayerView(s, n, c) ?? c;
|
|
291
|
-
await
|
|
292
|
-
const
|
|
293
|
-
let
|
|
294
|
-
return this._featureHasBeenFilledWithAttributes(
|
|
290
|
+
await _(() => !h.updating);
|
|
291
|
+
const f = this._createFeatureGraphic(s, n, r, a.id);
|
|
292
|
+
let x = await P(h, [f]);
|
|
293
|
+
return this._featureHasBeenFilledWithAttributes(x) || (await _(() => !e.updating), x = await P(h, [f])), x;
|
|
295
294
|
}
|
|
296
295
|
_tryGetBuildingComponentSublayerView(e, t, s) {
|
|
297
296
|
let n;
|
|
@@ -314,7 +313,7 @@ class Y extends P {
|
|
|
314
313
|
e.geometry == null && t && (e.geometry = t.clone());
|
|
315
314
|
}
|
|
316
315
|
_createFeatureGraphic(e, t, s, n) {
|
|
317
|
-
const r = this._getGlobalIdFieldNameFromLayer(s), a = n.type === "global-id" && r ? r : s.objectIdField, c = this._getGraphicOrigin(e, t), p = new
|
|
316
|
+
const r = this._getGlobalIdFieldNameFromLayer(s), a = n.type === "global-id" && r ? r : s.objectIdField, c = this._getGraphicOrigin(e, t), p = new D({ attributes: {}, layer: e, origin: c });
|
|
318
317
|
return p.attributes[a] = n.value, p;
|
|
319
318
|
}
|
|
320
319
|
_getGraphicOrigin(e, t) {
|
|
@@ -326,9 +325,9 @@ class Y extends P {
|
|
|
326
325
|
case "geojson":
|
|
327
326
|
return new j(e);
|
|
328
327
|
case "scene":
|
|
329
|
-
return new W(e);
|
|
330
|
-
case "wfs":
|
|
331
328
|
return new K(e);
|
|
329
|
+
case "wfs":
|
|
330
|
+
return new W(e);
|
|
332
331
|
case "building-scene":
|
|
333
332
|
return t ? new U(t) : void 0;
|
|
334
333
|
default:
|
|
@@ -349,27 +348,27 @@ class Y extends P {
|
|
|
349
348
|
}
|
|
350
349
|
//#endregion
|
|
351
350
|
}
|
|
352
|
-
const Z = (i) => new Y(i),
|
|
353
|
-
topCenter: { ...
|
|
354
|
-
topLeft: { ...
|
|
355
|
-
topRight: { ...
|
|
356
|
-
bottomCenter: { ...
|
|
357
|
-
bottomLeft: { ...
|
|
358
|
-
bottomRight: { ...
|
|
359
|
-
}),
|
|
351
|
+
const Z = (i) => new Y(i), S = Object.freeze({ width: 0, height: 0 }), b = /* @__PURE__ */ new WeakMap(), m = () => ({
|
|
352
|
+
topCenter: { ...S },
|
|
353
|
+
topLeft: { ...S },
|
|
354
|
+
topRight: { ...S },
|
|
355
|
+
bottomCenter: { ...S },
|
|
356
|
+
bottomLeft: { ...S },
|
|
357
|
+
bottomRight: { ...S }
|
|
358
|
+
}), F = (i) => ({
|
|
360
359
|
topCenter: { ...i.topCenter },
|
|
361
360
|
topLeft: { ...i.topLeft },
|
|
362
361
|
topRight: { ...i.topRight },
|
|
363
362
|
bottomCenter: { ...i.bottomCenter },
|
|
364
363
|
bottomLeft: { ...i.bottomLeft },
|
|
365
364
|
bottomRight: { ...i.bottomRight }
|
|
366
|
-
}),
|
|
367
|
-
let e =
|
|
365
|
+
}), L = (i) => {
|
|
366
|
+
let e = b.get(i);
|
|
368
367
|
return e || (e = {
|
|
369
368
|
observedGroups: /* @__PURE__ */ new Map(),
|
|
370
|
-
observedSizes:
|
|
369
|
+
observedSizes: m(),
|
|
371
370
|
subscribers: /* @__PURE__ */ new Set()
|
|
372
|
-
},
|
|
371
|
+
}, b.set(i, e)), e;
|
|
373
372
|
}, ee = (i) => {
|
|
374
373
|
const e = i?.topCenter.value, t = i?.topLeft.value, s = i?.topRight.value, n = i?.bottomCenter.value, r = i?.bottomLeft.value, a = i?.bottomRight.value;
|
|
375
374
|
return e && t && s && n && r && a ? {
|
|
@@ -380,23 +379,23 @@ const Z = (i) => new Y(i), v = Object.freeze({ width: 0, height: 0 }), f = /* @_
|
|
|
380
379
|
bottomLeft: r,
|
|
381
380
|
bottomRight: a
|
|
382
381
|
} : null;
|
|
383
|
-
}, te = (i, e) =>
|
|
384
|
-
const e =
|
|
382
|
+
}, te = (i, e) => I.every((t) => i.get(t) === e[t]), ie = (i) => {
|
|
383
|
+
const e = F(i.observedSizes);
|
|
385
384
|
i.subscribers.forEach((t) => t(e));
|
|
386
385
|
}, se = (i, e) => {
|
|
387
|
-
const t =
|
|
386
|
+
const t = b.get(i);
|
|
388
387
|
if (!t)
|
|
389
388
|
return;
|
|
390
389
|
let s = !1;
|
|
391
390
|
e.forEach((n) => {
|
|
392
|
-
const r =
|
|
391
|
+
const r = I.find((f) => t.observedGroups.get(f) === n.target);
|
|
393
392
|
if (!r)
|
|
394
393
|
return;
|
|
395
394
|
const { width: a, height: c } = n.contentRect, p = { width: a, height: c }, h = t.observedSizes[r];
|
|
396
395
|
h.width === p.width && h.height === p.height || (t.observedSizes[r] = p, s = !0);
|
|
397
396
|
}), s && ie(t);
|
|
398
397
|
}, A = (i, e) => {
|
|
399
|
-
const t =
|
|
398
|
+
const t = L(i);
|
|
400
399
|
t.resizeObserver || (t.resizeObserver = new ResizeObserver((n) => {
|
|
401
400
|
se(i, n);
|
|
402
401
|
}));
|
|
@@ -405,18 +404,18 @@ const Z = (i) => new Y(i), v = Object.freeze({ width: 0, height: 0 }), f = /* @_
|
|
|
405
404
|
t.observedGroups.size > 0 && (t.resizeObserver.disconnect(), t.observedGroups.clear());
|
|
406
405
|
return;
|
|
407
406
|
}
|
|
408
|
-
te(t.observedGroups, s) || (t.resizeObserver.disconnect(), t.observedGroups.clear(),
|
|
407
|
+
te(t.observedGroups, s) || (t.resizeObserver.disconnect(), t.observedGroups.clear(), I.forEach((n) => {
|
|
409
408
|
const r = s[n];
|
|
410
409
|
t.observedGroups.set(n, r), t.resizeObserver?.observe(r);
|
|
411
410
|
}));
|
|
412
411
|
}, ne = (i, e) => {
|
|
413
|
-
const t =
|
|
414
|
-
return t.subscribers.add(e), e(
|
|
415
|
-
const s =
|
|
416
|
-
s && (s.subscribers.delete(e), s.subscribers.size === 0 && (s.resizeObserver?.disconnect(), s.observedGroups.clear(),
|
|
412
|
+
const t = L(i);
|
|
413
|
+
return t.subscribers.add(e), e(F(t.observedSizes)), () => {
|
|
414
|
+
const s = b.get(i);
|
|
415
|
+
s && (s.subscribers.delete(e), s.subscribers.size === 0 && (s.resizeObserver?.disconnect(), s.observedGroups.clear(), b.delete(i)));
|
|
417
416
|
};
|
|
418
417
|
};
|
|
419
|
-
class re extends
|
|
418
|
+
class re extends C {
|
|
420
419
|
// References to the slot group elements owned by the host component.
|
|
421
420
|
#t;
|
|
422
421
|
#e;
|
|
@@ -427,19 +426,19 @@ class re extends P {
|
|
|
427
426
|
* @param component The host component that owns the slot group elements.
|
|
428
427
|
*/
|
|
429
428
|
constructor(e) {
|
|
430
|
-
super(e), this.exports =
|
|
429
|
+
super(e), this.exports = m();
|
|
431
430
|
}
|
|
432
431
|
hostDisconnected() {
|
|
433
|
-
this.#i?.(), this.#i = void 0, this.#e = void 0, this.#t = void 0, this.exports =
|
|
432
|
+
this.#i?.(), this.#i = void 0, this.#e = void 0, this.#t = void 0, this.exports = m();
|
|
434
433
|
}
|
|
435
434
|
hostLifecycle() {
|
|
436
435
|
return [
|
|
437
|
-
|
|
436
|
+
u(
|
|
438
437
|
() => this.#s(),
|
|
439
438
|
(t) => {
|
|
440
439
|
if (this.#e !== t) {
|
|
441
440
|
if (this.#i?.(), this.#i = void 0, this.#e = t, this.#t = t?.slotGroupRefs, !t) {
|
|
442
|
-
this.exports =
|
|
441
|
+
this.exports = m();
|
|
443
442
|
return;
|
|
444
443
|
}
|
|
445
444
|
this.#i = ne(t, (s) => {
|
|
@@ -449,7 +448,7 @@ class re extends P {
|
|
|
449
448
|
},
|
|
450
449
|
{ sync: !0, initial: !0 }
|
|
451
450
|
),
|
|
452
|
-
|
|
451
|
+
u(
|
|
453
452
|
() => this.#s()?.slotGroupRefs,
|
|
454
453
|
(t) => {
|
|
455
454
|
this.#t = t, this.#e && t && A(this.#e, t);
|
|
@@ -467,28 +466,28 @@ class re extends P {
|
|
|
467
466
|
}
|
|
468
467
|
// Compares the newly measured sizes against the currently exported values.
|
|
469
468
|
#n(e) {
|
|
470
|
-
const t = this.exports ??
|
|
471
|
-
return
|
|
469
|
+
const t = this.exports ?? m();
|
|
470
|
+
return I.every((s) => {
|
|
472
471
|
const n = t[s], r = e[s];
|
|
473
472
|
return n.width === r.width && n.height === r.height;
|
|
474
473
|
});
|
|
475
474
|
}
|
|
476
475
|
}
|
|
477
|
-
const ae =
|
|
476
|
+
const ae = O(re), oe = B(o);
|
|
478
477
|
class le extends R {
|
|
479
478
|
constructor() {
|
|
480
|
-
super(...arguments), this._messages =
|
|
479
|
+
super(...arguments), this._messages = N(), this.viewModel = oe(this), this._direction = $(), this._captureArrowKeysForNavigation = (e) => {
|
|
481
480
|
this.viewModel.captureArrowKeysForNavigation(e, this._direction);
|
|
482
481
|
}, this._useFeatureRefPopup = Z(this), this._handleApplySlideStart = (e) => {
|
|
483
482
|
this._useFeatureRefPopup.closePopup(), this.arcgisSlideApplyStart.emit({ slide: e });
|
|
484
483
|
}, this._handleApplySlideComplete = (e) => {
|
|
485
|
-
this._useFeatureRefPopup.openPopup(e), this.sliceAnalysisInteractive && this.viewModel.setSliceAnalysisInteractive(), this.arcgisSlideApplyComplete.emit({ slide: e });
|
|
484
|
+
this._useFeatureRefPopup.openPopup(e), this.sliceAnalysisInteractive && this.viewModel.setSliceAnalysisInteractive(!0), this.arcgisSlideApplyComplete.emit({ slide: e });
|
|
486
485
|
}, this._handleApplySlideCancel = (e) => {
|
|
487
486
|
this.arcgisSlideApplyCancel.emit({ slide: e });
|
|
488
|
-
}, this.autoDestroyDisabled = !1, this.view = this.viewModel.view, this.scale = "m", this.keyboardNavigationEnabled = !1, this.slidePopupDisabled = !1, this.slideCaptionsDisabled = !1, this.slideLegendDisabled = !1, this.sliceAnalysisInteractive = !1, this.arcgisPopupFeatureNotFound =
|
|
487
|
+
}, this.autoDestroyDisabled = !1, this.view = this.viewModel.view, this.scale = "m", this.keyboardNavigationEnabled = !1, this.slidePopupDisabled = !1, this.slideCaptionsDisabled = !1, this.slideLegendDisabled = !1, this.sliceAnalysisInteractive = !1, this.navigationHidden = !1, this.arcgisPopupFeatureNotFound = v(), this.arcgisPopupFeaturesRetrieved = v(), this.arcgisSlideApplyStart = v(), this.arcgisSlideApplyCancel = v(), this.arcgisSlideApplyComplete = v(), this.arcgisReady = v();
|
|
489
488
|
}
|
|
490
489
|
static {
|
|
491
|
-
this.properties = { _slotSizesController: 16, slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5, slidePopupDisabled: 5, slideCaptionsDisabled: 5, slideLegendDisabled: 5, sliceAnalysisInteractive: 5 };
|
|
490
|
+
this.properties = { _slotSizesController: 16, _slotSizeHandle: 16, slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5, slidePopupDisabled: 5, slideCaptionsDisabled: 5, slideLegendDisabled: 5, sliceAnalysisInteractive: 5, navigationHidden: 5 };
|
|
492
491
|
}
|
|
493
492
|
static {
|
|
494
493
|
this.styles = q;
|
|
@@ -503,23 +502,33 @@ class le extends R {
|
|
|
503
502
|
await this.manager.destroy();
|
|
504
503
|
}
|
|
505
504
|
loaded() {
|
|
506
|
-
this.
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
505
|
+
this.viewModel.onApplySlideStart = this._handleApplySlideStart, this.viewModel.onApplySlideComplete = this._handleApplySlideComplete, this.viewModel.onApplySlideCancel = this._handleApplySlideCancel, this._enableKeyboardNavigation();
|
|
506
|
+
const e = this;
|
|
507
|
+
this.manager.onLifecycle(() => [
|
|
508
|
+
u(() => this.slidePopupDisabled, (t) => {
|
|
509
|
+
if (this.slideId && !t) {
|
|
510
|
+
const s = this.viewModel.getSlideBySlideId(this.slideId);
|
|
511
|
+
s && this._useFeatureRefPopup.openPopup(s);
|
|
512
|
+
} else t && this._useFeatureRefPopup.closePopup(!0);
|
|
513
|
+
}),
|
|
514
|
+
u(() => this.sliceAnalysisInteractive, (t) => {
|
|
515
|
+
this.viewModel.setSliceAnalysisInteractive(t);
|
|
516
|
+
}, { initial: !0 }),
|
|
517
|
+
u(() => e.referenceElement, (t) => {
|
|
518
|
+
this._isArcgisScene(t) && (this._slotSizesController = ae(this), this._slotSizeHandle = this._watchSceneViewSlotSizes());
|
|
519
|
+
}, { once: !0, initial: !0 }),
|
|
520
|
+
{
|
|
521
|
+
remove: () => {
|
|
522
|
+
document.removeEventListener("keydown", this._captureArrowKeysForNavigation), this._keyboardHandle?.remove(), this._slotSizeHandle?.remove();
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
]);
|
|
517
526
|
}
|
|
518
527
|
_isArcgisScene(e) {
|
|
519
528
|
return e === void 0 || typeof e == "string" ? !1 : "tagName" in e && e.tagName === "ARCGIS-SCENE";
|
|
520
529
|
}
|
|
521
530
|
_watchSceneViewSlotSizes() {
|
|
522
|
-
return
|
|
531
|
+
return u(() => this._slotSizesController, (e) => this._updatePresentationCaptionsPadding(e?.topLeft, e?.topRight, e?.bottomLeft, e?.bottomRight), { initial: !0 });
|
|
523
532
|
}
|
|
524
533
|
_updatePresentationCaptionsPadding(e, t, s, n) {
|
|
525
534
|
const r = this._direction === "ltr" ? e?.width ?? 0 : t?.width ?? 0, a = this._direction === "ltr" ? t?.width ?? 0 : e?.width ?? 0, c = Math.max(e?.height ?? 0, t?.height ?? 0), p = Math.max(s?.height ?? 0, n?.height ?? 0);
|
|
@@ -527,28 +536,35 @@ class le extends R {
|
|
|
527
536
|
const h = r <= Math.max(c, p) && a <= Math.max(c, p);
|
|
528
537
|
this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top", h ? "0" : `${c}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom", h ? "0" : `${p}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start", h ? `${r}px` : "0"), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end", h ? `${a}px` : "0");
|
|
529
538
|
}
|
|
539
|
+
_enableKeyboardNavigation() {
|
|
540
|
+
this._keyboardHandle = u(() => this.keyboardNavigationEnabled, (e) => {
|
|
541
|
+
document.removeEventListener("keydown", this._captureArrowKeysForNavigation), e && document.addEventListener("keydown", this._captureArrowKeysForNavigation);
|
|
542
|
+
}, { initial: !0 });
|
|
543
|
+
}
|
|
530
544
|
render() {
|
|
531
545
|
if (this.viewModel.visibleSlides.length === 0)
|
|
532
|
-
return
|
|
546
|
+
return g`<div></div>`;
|
|
533
547
|
const e = this.viewModel.visibleSlides.find((r) => r.id === this.slideId), t = this._renderNavigation(), s = this._renderCaptions(e), n = this._renderLegend();
|
|
534
|
-
return
|
|
548
|
+
return g`<div class="root"><div class="presentation-content">${s}${n}</div>${t}</div>`;
|
|
535
549
|
}
|
|
536
550
|
_renderNavigation() {
|
|
551
|
+
if (this.navigationHidden)
|
|
552
|
+
return null;
|
|
537
553
|
const e = this.viewModel.lastSlideSelected && !this.viewModel.hasOnlyOneSlide, t = this._direction === "rtl", s = t ? "chevron-right" : "chevron-left", n = t ? "chevron-left" : "chevron-right";
|
|
538
|
-
return
|
|
554
|
+
return g`<div class="navigation"><calcite-button appearance=transparent icon-start=${s ?? y} kind=neutral .scale=${this.scale} .disabled=${this.viewModel.firstSlideSelected || !this.viewModel.slideSelected} .label=${this._messages.previous} title=${this._messages.previous ?? y} @click=${() => this.viewModel.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this._renderSlideCounter()}</div><calcite-button appearance=transparent icon-start=${(e ? "reset" : n) ?? y} kind=neutral .scale=${this.scale} .label=${e ? this._messages.restart : this._messages.next} title=${(e ? this._messages.restart : this._messages.next) ?? y} @click=${() => this.viewModel.navigateInPresentation(1)}></calcite-button></div>`;
|
|
539
555
|
}
|
|
540
556
|
_renderSlideCounter() {
|
|
541
557
|
const e = this.viewModel.slideIndex + 1, t = this._messages?.slideNavAriaText?.replace("${index}", e.toString()).replace("${numberOfSlides}", this.viewModel.visibleSlides.length.toString());
|
|
542
|
-
return this.viewModel.slideSelected ?
|
|
558
|
+
return this.viewModel.slideSelected ? g`<p role=banner aria-label=${t ?? y} 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>` : g`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.viewModel.visibleSlides?.length} ${this._messages?.slides}</p>`;
|
|
543
559
|
}
|
|
544
560
|
_renderCaptions(e) {
|
|
545
|
-
return this.slideCaptionsDisabled ? null :
|
|
561
|
+
return this.slideCaptionsDisabled ? null : g`<arcgis-presentation-captions .slide=${e} .transitionActive=${this.viewModel.transitionActive}></arcgis-presentation-captions>`;
|
|
546
562
|
}
|
|
547
563
|
_renderLegend() {
|
|
548
|
-
return this.slideLegendDisabled || !this.viewModel.showLegend ? null :
|
|
564
|
+
return this.slideLegendDisabled || !this.viewModel.showLegend ? null : g`<calcite-panel data-testid=presentation-legend class="legend" .heading=${this._messages.legend} closable @calcitePanelClose=${() => this.viewModel.showLegend = !1}><arcgis-legend .view=${this.view} @arcgisReady=${(e) => e.stopPropagation()}></arcgis-legend></calcite-panel>`;
|
|
549
565
|
}
|
|
550
566
|
}
|
|
551
|
-
|
|
567
|
+
z("arcgis-presentation", le);
|
|
552
568
|
export {
|
|
553
569
|
le as ArcgisPresentation
|
|
554
570
|
};
|
|
@@ -207,12 +207,12 @@ class z extends f {
|
|
|
207
207
|
const { allSources: t, activeSourceIndex: i } = this.viewModel, { sourceIndex: r } = e, o = e.results?.length, l = t.length > 1 && i === -1, c = this._getSourceName(r);
|
|
208
208
|
return o && l ? s`<calcite-autocomplete-item-group .heading=${c}>${this._renderSuggestGroup(e)}</calcite-autocomplete-item-group>` : this._renderSuggestGroup(e);
|
|
209
209
|
}
|
|
210
|
-
_renderSuggestion(
|
|
211
|
-
const r = {
|
|
212
|
-
key:
|
|
213
|
-
sourceIndex:
|
|
210
|
+
_renderSuggestion(e) {
|
|
211
|
+
const { key: t, sourceIndex: i, text: r } = e, o = {
|
|
212
|
+
key: t,
|
|
213
|
+
sourceIndex: i
|
|
214
214
|
};
|
|
215
|
-
return s`<calcite-autocomplete-item .heading=${
|
|
215
|
+
return s`<calcite-autocomplete-item .heading=${r ?? this.messages.untitledResult ?? ""} .value=${JSON.stringify(o)} .selected=${e === this.viewModel.selectedSuggestion}></calcite-autocomplete-item>`;
|
|
216
216
|
}
|
|
217
217
|
_renderSource(e) {
|
|
218
218
|
const t = this._getSourceName(e);
|