@arcgis/map-components 5.1.0-next.73 → 5.1.0-next.75
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/{AHDX7DZE.js → 2IXIUNGH.js} +1 -1
- package/dist/cdn/2LHTH7PU.js +2 -0
- package/dist/cdn/3ATNVL7S.js +2 -0
- package/dist/cdn/3TVO5LIN.js +2 -0
- package/dist/cdn/5CKHTWHC.js +2 -0
- package/dist/cdn/{Y4JRHCFK.js → 5J37HLFL.js} +1 -1
- package/dist/cdn/{554S4GT7.js → 5N7UWAVE.js} +1 -1
- package/dist/cdn/6D72H6LD.js +2 -0
- package/dist/cdn/{G3GSHZCN.js → A26DRZN4.js} +1 -1
- package/dist/cdn/ACAAYGKC.js +2 -0
- package/dist/cdn/{MEHQNI5S.js → APKTL7SO.js} +1 -1
- package/dist/cdn/APYGTRF2.js +2 -0
- package/dist/cdn/{USOVBTPF.js → B2S3QOVD.js} +1 -1
- package/dist/cdn/{CSCRKC7T.js → BH32Z76H.js} +1 -1
- package/dist/cdn/{VRFNBGEQ.js → CQCKW6L4.js} +1 -1
- package/dist/cdn/CUYGLJRU.js +2 -0
- package/dist/cdn/{VLGUP7FS.js → DJOFGKNV.js} +1 -1
- package/dist/cdn/EXZFAJW4.js +3 -0
- package/dist/cdn/FM3AT2SL.js +2 -0
- package/dist/cdn/{EVRD2ZXE.js → HAKD7266.js} +1 -1
- package/dist/cdn/{UQQFJYIC.js → IP6NIPH4.js} +1 -1
- package/dist/cdn/{TSMQD5L3.js → JE27PKO6.js} +1 -1
- package/dist/cdn/{VJ5MPLHQ.js → KGLUFWJ7.js} +1 -1
- package/dist/cdn/{UEOQ2WED.js → LWQZWUXM.js} +1 -1
- package/dist/cdn/{CLUML3RK.js → LZUWGRAM.js} +1 -1
- package/dist/cdn/{QAB2Y3S4.js → M7RBOMBN.js} +1 -1
- package/dist/cdn/{EDEFI5P6.js → N2ZR7Q6F.js} +1 -1
- package/dist/cdn/{OHCJG4B7.js → NMP4CEPM.js} +1 -1
- package/dist/cdn/O6JPYYGF.js +2 -0
- package/dist/cdn/{LWCHPGXD.js → OEYAER33.js} +1 -1
- package/dist/cdn/{QSERDTHV.js → QZBFM3AA.js} +1 -1
- package/dist/cdn/{CPYD7PR4.js → S6KYM3LN.js} +1 -1
- package/dist/cdn/{Y2ZNQZCC.js → SJDBMERA.js} +1 -1
- package/dist/cdn/{KPPYOTL2.js → STRMIFOQ.js} +1 -1
- package/dist/cdn/{MRSAL7QR.js → TL3BHZ3H.js} +1 -1
- package/dist/cdn/{D3BM7IK7.js → V3BMEZZP.js} +1 -1
- package/dist/cdn/{LCVZHLJV.js → WULZBTNW.js} +1 -1
- package/dist/cdn/{3W5SAKRU.js → YCM6SOEX.js} +1 -1
- package/dist/cdn/YFXHW7I2.js +2 -0
- package/dist/cdn/YLKEVZLN.js +2 -0
- package/dist/cdn/ZVDWGIFU.js +2 -0
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/async-utils.js +76 -68
- package/dist/chunks/feature-utils.js +5 -3
- package/dist/chunks/resources.js +35 -0
- package/dist/chunks/slots.js +12 -40
- package/dist/components/arcgis-feature-media/customElement.js +199 -172
- package/dist/components/arcgis-feature-relationship/customElement.js +1 -1
- package/dist/components/arcgis-link-chart/customElement.js +2 -1
- package/dist/components/arcgis-map/customElement.js +7 -6
- package/dist/components/arcgis-presentation/PresentationViewModel.d.ts +3 -1
- package/dist/components/arcgis-presentation/customElement.d.ts +48 -0
- package/dist/components/arcgis-presentation/customElement.js +398 -96
- package/dist/components/arcgis-presentation/index.js +1 -0
- package/dist/components/arcgis-presentation-captions/customElement.js +37 -0
- package/dist/components/arcgis-presentation-captions/index.js +1 -0
- package/dist/components/arcgis-scene/customElement.js +2 -1
- package/dist/components/arcgis-slider-scale-range/customElement.js +8 -8
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +30 -30
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +26 -26
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +11 -8
- package/dist/components/arcgis-video/customElement.js +13 -12
- package/dist/components/arcgis-video-player/customElement.d.ts +13 -2
- 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 +2 -1
- package/dist/types/lumina.d.ts +3 -1
- package/dist/types/preact.d.ts +3 -1
- package/dist/types/react.d.ts +3 -1
- package/dist/types/stencil.d.ts +3 -1
- package/package.json +5 -5
- package/dist/cdn/3E5YVI67.js +0 -2
- package/dist/cdn/4LHL7RRT.js +0 -3
- package/dist/cdn/5MHPKAFK.js +0 -2
- package/dist/cdn/6BSMOKA6.js +0 -2
- package/dist/cdn/DSWEKHYV.js +0 -2
- package/dist/cdn/EQVGDKPR.js +0 -2
- package/dist/cdn/ISTXVEU6.js +0 -2
- package/dist/cdn/NYCLIJ7T.js +0 -2
- package/dist/cdn/OPXYBLHE.js +0 -2
- package/dist/cdn/QUNBDVIO.js +0 -2
- package/dist/cdn/YCN7F3YY.js +0 -2
- package/dist/cdn/Z4OSJFVK.js +0 -2
|
@@ -1,32 +1,42 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { useDirection as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { u as
|
|
7
|
-
import { m as
|
|
8
|
-
import { property as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { ignoreAbortErrors as
|
|
12
|
-
import { on as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import { c as z } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as O, html as u } from "lit";
|
|
4
|
+
import { GenericController as A, proxyExports as R, useDirection as G } from "@arcgis/lumina/controllers";
|
|
5
|
+
import { LitElement as M, createEvent as x, nothing as g } from "@arcgis/lumina";
|
|
6
|
+
import { u as N } from "../../chunks/useT9n.js";
|
|
7
|
+
import { m as $ } from "../../chunks/useViewModel.js";
|
|
8
|
+
import { property as h, subclass as E } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
9
|
+
import T from "@arcgis/core/core/Accessor.js";
|
|
10
|
+
import I from "@arcgis/core/core/Collection.js";
|
|
11
|
+
import { ignoreAbortErrors as B } from "@arcgis/core/core/promiseUtils.js";
|
|
12
|
+
import { on as V, whenOnce as S, watch as y } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
|
+
import k from "@arcgis/core/Graphic.js";
|
|
14
|
+
import D from "@arcgis/core/layers/Layer.js";
|
|
15
|
+
import H from "@arcgis/core/graphic/CSVGraphicOrigin.js";
|
|
16
|
+
import j from "@arcgis/core/graphic/GeoJSONGraphicOrigin.js";
|
|
17
|
+
import W from "@arcgis/core/graphic/SceneGraphicOrigin.js";
|
|
18
|
+
import K from "@arcgis/core/graphic/WFSGraphicOrigin.js";
|
|
19
|
+
import U from "@arcgis/core/graphic/BuildingGraphicOrigin.js";
|
|
20
|
+
import Q from "@arcgis/core/graphic/FeatureGraphicOrigin.js";
|
|
21
|
+
import { fetchPopupFeaturesFromGraphics as F } from "@arcgis/core/applications/SceneViewer/sceneViewerUtils.js";
|
|
22
|
+
import { s as w } from "../../chunks/resources.js";
|
|
23
|
+
const q = O`: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}`;
|
|
24
|
+
var J = Object.defineProperty, X = Object.getOwnPropertyDescriptor, c = (s, e, t, i) => {
|
|
25
|
+
for (var r = i > 1 ? void 0 : i ? X(e, t) : e, n = s.length - 1, o; n >= 0; n--)
|
|
26
|
+
(o = s[n]) && (r = (i ? o(e, t, r) : o(r)) || r);
|
|
27
|
+
return i && r && J(e, t, r), r;
|
|
18
28
|
};
|
|
19
|
-
let
|
|
29
|
+
let d = class extends T {
|
|
20
30
|
//#region Lifecycle
|
|
21
|
-
constructor(
|
|
22
|
-
super(
|
|
23
|
-
this._unSubscribeToSlideEvents(
|
|
24
|
-
const
|
|
25
|
-
this.addHandles(
|
|
31
|
+
constructor(s) {
|
|
32
|
+
super(s), this.keyboardNavigationEnabled = !1, this._subscribeToSlideEvents = (e) => {
|
|
33
|
+
this._unSubscribeToSlideEvents(e), e.forEach((t) => {
|
|
34
|
+
const i = t.on("apply-slide-start", () => this._onApplySlideStart(t)), r = t.on("apply-slide-complete", () => this._onApplySlideComplete(t));
|
|
35
|
+
this.addHandles(i, t.id), this.addHandles(r, t.id);
|
|
26
36
|
});
|
|
27
|
-
}, this._unSubscribeToSlideEvents = (
|
|
28
|
-
|
|
29
|
-
this.hasHandles(
|
|
37
|
+
}, this._unSubscribeToSlideEvents = (e) => {
|
|
38
|
+
e.forEach((t) => {
|
|
39
|
+
this.hasHandles(t.id) && this.removeHandles(t.id);
|
|
30
40
|
});
|
|
31
41
|
};
|
|
32
42
|
}
|
|
@@ -37,7 +47,7 @@ let s = class extends f {
|
|
|
37
47
|
this._unSubscribeToSlideEvents(this.visibleSlides);
|
|
38
48
|
}
|
|
39
49
|
get visibleSlides() {
|
|
40
|
-
return this.view?.map?.presentation?.slides?.filter((
|
|
50
|
+
return this.view?.map?.presentation?.slides?.filter((s) => !s.hidden) ?? new I();
|
|
41
51
|
}
|
|
42
52
|
get lastSlideSelected() {
|
|
43
53
|
return this.getSlideIndexBySlideId(this.slideId) === this.visibleSlides.length - 1;
|
|
@@ -54,38 +64,38 @@ let s = class extends f {
|
|
|
54
64
|
get slideIndex() {
|
|
55
65
|
return this.getSlideIndexBySlideId(this.slideId);
|
|
56
66
|
}
|
|
57
|
-
getSlideIndexBySlideId(
|
|
58
|
-
let
|
|
59
|
-
return
|
|
67
|
+
getSlideIndexBySlideId(s) {
|
|
68
|
+
let e = -1;
|
|
69
|
+
return s && (e = this.visibleSlides.findIndex((t) => t.id === s)), e;
|
|
60
70
|
}
|
|
61
|
-
navigateInPresentation(
|
|
62
|
-
const
|
|
63
|
-
let
|
|
64
|
-
|
|
71
|
+
navigateInPresentation(s) {
|
|
72
|
+
const e = this.slideIndex + s;
|
|
73
|
+
let t = this._getSlideBySlideIndex(e);
|
|
74
|
+
t ??= this._getSlideBySlideIndex(0), t && this._applySlide(t);
|
|
65
75
|
}
|
|
66
|
-
captureArrowKeysForNavigation(
|
|
67
|
-
const
|
|
68
|
-
if (document.activeElement?.nodeName.toLowerCase() === "arcgis-scene" || !
|
|
76
|
+
captureArrowKeysForNavigation(s, e) {
|
|
77
|
+
const t = ["ArrowLeft", "ArrowRight", "PageUp", "PageDown"];
|
|
78
|
+
if (document.activeElement?.nodeName.toLowerCase() === "arcgis-scene" || !t.includes(s.code))
|
|
69
79
|
return;
|
|
70
|
-
const
|
|
80
|
+
const r = e === "rtl" ? "ArrowRight" : "ArrowLeft", o = s.code === r || s.code === "PageUp" ? -1 : 1;
|
|
71
81
|
this.navigateInPresentation(o);
|
|
72
82
|
}
|
|
73
83
|
//#endregion
|
|
74
84
|
//#region Private Methods
|
|
75
|
-
_getSlideBySlideIndex(
|
|
76
|
-
if (
|
|
77
|
-
return this.visibleSlides.getItemAt(
|
|
85
|
+
_getSlideBySlideIndex(s) {
|
|
86
|
+
if (s != null && s >= 0 && s < this.visibleSlides.length)
|
|
87
|
+
return this.visibleSlides.getItemAt(s);
|
|
78
88
|
}
|
|
79
|
-
async _applySlide(
|
|
80
|
-
this.view && await
|
|
89
|
+
async _applySlide(s) {
|
|
90
|
+
this.view && await B(s.applyTo(this.view));
|
|
81
91
|
}
|
|
82
92
|
_startWatchVisibleSlides() {
|
|
83
93
|
this._subscribeToSlideEvents(this.visibleSlides), this.addHandles(
|
|
84
|
-
|
|
94
|
+
V(
|
|
85
95
|
() => this.visibleSlides,
|
|
86
96
|
"change",
|
|
87
|
-
(
|
|
88
|
-
this._subscribeToSlideEvents(new
|
|
97
|
+
(s) => {
|
|
98
|
+
this._subscribeToSlideEvents(new I(s.added)), this._unSubscribeToSlideEvents(new I(s.removed));
|
|
89
99
|
},
|
|
90
100
|
{
|
|
91
101
|
onListenerAdd: this._subscribeToSlideEvents,
|
|
@@ -94,80 +104,372 @@ let s = class extends f {
|
|
|
94
104
|
)
|
|
95
105
|
);
|
|
96
106
|
}
|
|
97
|
-
_onApplySlideStart(
|
|
98
|
-
this.slideId =
|
|
107
|
+
_onApplySlideStart(s) {
|
|
108
|
+
this.slideId = s.id, this.onApplySlideStart?.(s);
|
|
109
|
+
}
|
|
110
|
+
_onApplySlideComplete(s) {
|
|
111
|
+
this.onApplySlideComplete?.(s);
|
|
99
112
|
}
|
|
100
113
|
//#endregion
|
|
101
114
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
],
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
],
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
],
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
],
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
],
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
],
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
],
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
],
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
],
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
],
|
|
132
|
-
|
|
133
|
-
|
|
115
|
+
c([
|
|
116
|
+
h()
|
|
117
|
+
], d.prototype, "view", 2);
|
|
118
|
+
c([
|
|
119
|
+
h()
|
|
120
|
+
], d.prototype, "slideId", 2);
|
|
121
|
+
c([
|
|
122
|
+
h()
|
|
123
|
+
], d.prototype, "keyboardNavigationEnabled", 2);
|
|
124
|
+
c([
|
|
125
|
+
h()
|
|
126
|
+
], d.prototype, "visibleSlides", 1);
|
|
127
|
+
c([
|
|
128
|
+
h()
|
|
129
|
+
], d.prototype, "lastSlideSelected", 1);
|
|
130
|
+
c([
|
|
131
|
+
h()
|
|
132
|
+
], d.prototype, "firstSlideSelected", 1);
|
|
133
|
+
c([
|
|
134
|
+
h()
|
|
135
|
+
], d.prototype, "slideSelected", 1);
|
|
136
|
+
c([
|
|
137
|
+
h()
|
|
138
|
+
], d.prototype, "hasOnlyOneSlide", 1);
|
|
139
|
+
c([
|
|
140
|
+
h()
|
|
141
|
+
], d.prototype, "onApplySlideStart", 2);
|
|
142
|
+
c([
|
|
143
|
+
h()
|
|
144
|
+
], d.prototype, "onApplySlideComplete", 2);
|
|
145
|
+
c([
|
|
146
|
+
h()
|
|
147
|
+
], d.prototype, "getSlideIndexBySlideId", 1);
|
|
148
|
+
d = c([
|
|
149
|
+
E("components.presentation.PresentationViewModel")
|
|
150
|
+
], d);
|
|
151
|
+
class Y extends A {
|
|
152
|
+
constructor(e) {
|
|
153
|
+
super(e);
|
|
154
|
+
}
|
|
155
|
+
hostLoaded() {
|
|
156
|
+
this.component.manager.onLifecycle(() => {
|
|
157
|
+
const e = this.component;
|
|
158
|
+
S(() => e.referenceElement).then((t) => {
|
|
159
|
+
this._isArcgisScene(t) && (this._sceneRef = t);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
openPopup(e) {
|
|
164
|
+
this.component.view && this.component.slideId === e.id && e.elements.popupInfo != null && this._preparePopupFeature(this.component.view, e.elements.popupInfo).then(
|
|
165
|
+
({ success: t, features: i, popupInfo: r }) => {
|
|
166
|
+
this.component.slideId === e.id && (t ? this._handlePopupFeatureFound(e, i, r) : this.component.arcgisPopupFeatureNotFound.emit({ slide: e }));
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
//#region Private Methods
|
|
171
|
+
_isArcgisScene(e) {
|
|
172
|
+
return e === void 0 || typeof e == "string" ? !1 : "tagName" in e && e.tagName === "ARCGIS-SCENE";
|
|
173
|
+
}
|
|
174
|
+
closePopup() {
|
|
175
|
+
this.component.popupDisabled || this._sceneRef?.closePopup();
|
|
176
|
+
}
|
|
177
|
+
async _handlePopupFeatureFound(e, t, i) {
|
|
178
|
+
const r = i?.location ?? void 0;
|
|
179
|
+
this.component.arcgisPopupFeaturesRetrieved.emit({ slide: e, features: t, location: r }), this.component.popupDisabled || await this._sceneRef?.openPopup({
|
|
180
|
+
features: t,
|
|
181
|
+
location: r
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
async _preparePopupFeature(e, t) {
|
|
185
|
+
let i = [];
|
|
186
|
+
if (!t.features?.length || t.features.length === 0)
|
|
187
|
+
return { success: !1, features: i };
|
|
188
|
+
const r = t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;
|
|
189
|
+
if (r?.layerId == null)
|
|
190
|
+
return { success: !1, features: i };
|
|
191
|
+
const { layer: n, sublayer: o } = this._getLayersFromView(e, r.layerId, r?.sublayerId);
|
|
192
|
+
if (!n)
|
|
193
|
+
return { success: !1, features: i };
|
|
194
|
+
const a = o ?? n;
|
|
195
|
+
if (!a || !this._layerTypeSupportsCapturePopup(a))
|
|
196
|
+
return { success: !1, features: i };
|
|
197
|
+
if (i = await this._fetchFeaturesFromQueryable(e, t, n, o, a), i && this._featureHasBeenFilledWithAttributes(i)) {
|
|
198
|
+
const l = i[0];
|
|
199
|
+
return this._setFallbackPopupTemplate(l, o, n), this._setFallbackGeometry(l, t?.location), { success: !0, features: i, popupInfo: t };
|
|
200
|
+
}
|
|
201
|
+
return { success: !1, features: i };
|
|
202
|
+
}
|
|
203
|
+
_getLayersFromView(e, t, i) {
|
|
204
|
+
const r = e.map?.findLayerById(t) ?? void 0, n = this._getBuildingSceneLayerSublayer(r, i);
|
|
205
|
+
return { layer: r, sublayer: n };
|
|
206
|
+
}
|
|
207
|
+
_getBuildingSceneLayerSublayer(e, t) {
|
|
208
|
+
let i;
|
|
209
|
+
return e && this._isLayer(e) && this._isBuildingSceneLayer(e) && t != null && (i = e.allSublayers.find(
|
|
210
|
+
(r) => r.id === t && r.type === "building-component"
|
|
211
|
+
)), i;
|
|
212
|
+
}
|
|
213
|
+
_featureHasBeenFilledWithAttributes(e) {
|
|
214
|
+
return e && e.length > 0 && e[0].attributes && Object.entries(e[0].attributes)?.length > 1;
|
|
215
|
+
}
|
|
216
|
+
async _fetchFeaturesFromQueryable(e, t, i, r, n) {
|
|
217
|
+
const o = t.features?.getItemAt(t.selectedFeatureIndex);
|
|
218
|
+
if (o?.id == null)
|
|
219
|
+
return await Promise.resolve([]);
|
|
220
|
+
const a = await e.whenLayerView(i);
|
|
221
|
+
await S(() => !a.updating);
|
|
222
|
+
const p = this._tryGetBuildingComponentSublayerView(i, r, a) ?? a;
|
|
223
|
+
await S(() => !p.updating);
|
|
224
|
+
const b = this._createFeatureGraphic(i, r, n, o.id);
|
|
225
|
+
let _ = await F(p, [b]);
|
|
226
|
+
return this._featureHasBeenFilledWithAttributes(_) || (await S(() => !e.updating), _ = await F(p, [b])), _;
|
|
227
|
+
}
|
|
228
|
+
_tryGetBuildingComponentSublayerView(e, t, i) {
|
|
229
|
+
let r;
|
|
230
|
+
return this._isLayer(e) && this._isBuildingSceneLayer(e) && t != null && (r = i.sublayerViews.find(
|
|
231
|
+
(n) => n.sublayer.id === t.id
|
|
232
|
+
)), r;
|
|
233
|
+
}
|
|
234
|
+
_setFallbackPopupTemplate(e, t, i) {
|
|
235
|
+
e.popupTemplate == null && (e.popupTemplate = t?.popupTemplate ? t.popupTemplate : i.popupTemplate);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* If there is no geometry of the feature in the service,
|
|
239
|
+
* the popup highlights the location point in the scene.
|
|
240
|
+
*
|
|
241
|
+
* @param popupFeature
|
|
242
|
+
* @param location
|
|
243
|
+
* @private
|
|
244
|
+
*/
|
|
245
|
+
_setFallbackGeometry(e, t) {
|
|
246
|
+
e.geometry == null && t && (e.geometry = t.clone());
|
|
247
|
+
}
|
|
248
|
+
_createFeatureGraphic(e, t, i, r) {
|
|
249
|
+
const n = this._getGlobalIdFieldNameFromLayer(i), o = r.type === "global-id" && n ? n : i.objectIdField, a = this._getGraphicOrigin(e, t), l = new k({ attributes: {}, layer: e, origin: a });
|
|
250
|
+
return l.attributes[o] = r.value, l;
|
|
251
|
+
}
|
|
252
|
+
_getGraphicOrigin(e, t) {
|
|
253
|
+
switch (e.type) {
|
|
254
|
+
case "csv":
|
|
255
|
+
return new H(e);
|
|
256
|
+
case "feature":
|
|
257
|
+
return new Q(e);
|
|
258
|
+
case "geojson":
|
|
259
|
+
return new j(e);
|
|
260
|
+
case "scene":
|
|
261
|
+
return new W(e);
|
|
262
|
+
case "wfs":
|
|
263
|
+
return new K(e);
|
|
264
|
+
case "building-scene":
|
|
265
|
+
return t ? new U(t) : void 0;
|
|
266
|
+
default:
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
_layerTypeSupportsCapturePopup(e) {
|
|
271
|
+
return e != null && ["csv", "feature", "geojson", "wfs", "scene", "building-component"].includes(e.type);
|
|
272
|
+
}
|
|
273
|
+
_isLayer(e) {
|
|
274
|
+
return !!e && e instanceof D;
|
|
275
|
+
}
|
|
276
|
+
_isBuildingSceneLayer(e) {
|
|
277
|
+
return e?.type === "building-scene";
|
|
278
|
+
}
|
|
279
|
+
_getGlobalIdFieldNameFromLayer(e) {
|
|
280
|
+
return e.fields?.find((t) => t.type === "global-id")?.name;
|
|
281
|
+
}
|
|
282
|
+
//#endregion
|
|
283
|
+
}
|
|
284
|
+
const Z = (s) => new Y(s), f = Object.freeze({ width: 0, height: 0 }), m = /* @__PURE__ */ new WeakMap(), v = () => ({
|
|
285
|
+
topLeft: { ...f },
|
|
286
|
+
topRight: { ...f },
|
|
287
|
+
bottomLeft: { ...f },
|
|
288
|
+
bottomRight: { ...f }
|
|
289
|
+
}), C = (s) => ({
|
|
290
|
+
topLeft: { ...s.topLeft },
|
|
291
|
+
topRight: { ...s.topRight },
|
|
292
|
+
bottomLeft: { ...s.bottomLeft },
|
|
293
|
+
bottomRight: { ...s.bottomRight }
|
|
294
|
+
}), L = (s) => {
|
|
295
|
+
let e = m.get(s);
|
|
296
|
+
return e || (e = {
|
|
297
|
+
observedGroups: /* @__PURE__ */ new Map(),
|
|
298
|
+
observedSizes: v(),
|
|
299
|
+
subscribers: /* @__PURE__ */ new Set()
|
|
300
|
+
}, m.set(s, e)), e;
|
|
301
|
+
}, ee = (s) => {
|
|
302
|
+
const e = s?.topLeft.value, t = s?.topRight.value, i = s?.bottomLeft.value, r = s?.bottomRight.value;
|
|
303
|
+
return e && t && i && r ? {
|
|
304
|
+
topLeft: e,
|
|
305
|
+
topRight: t,
|
|
306
|
+
bottomLeft: i,
|
|
307
|
+
bottomRight: r
|
|
308
|
+
} : null;
|
|
309
|
+
}, te = (s, e) => w.every((t) => s.get(t) === e[t]), ie = (s) => {
|
|
310
|
+
const e = C(s.observedSizes);
|
|
311
|
+
s.subscribers.forEach((t) => t(e));
|
|
312
|
+
}, se = (s, e) => {
|
|
313
|
+
const t = m.get(s);
|
|
314
|
+
if (!t)
|
|
315
|
+
return;
|
|
316
|
+
let i = !1;
|
|
317
|
+
e.forEach((r) => {
|
|
318
|
+
const n = w.find((b) => t.observedGroups.get(b) === r.target);
|
|
319
|
+
if (!n)
|
|
320
|
+
return;
|
|
321
|
+
const { width: o, height: a } = r.contentRect, l = { width: o, height: a }, p = t.observedSizes[n];
|
|
322
|
+
p.width === l.width && p.height === l.height || (t.observedSizes[n] = l, i = !0);
|
|
323
|
+
}), i && ie(t);
|
|
324
|
+
}, P = (s, e) => {
|
|
325
|
+
const t = L(s);
|
|
326
|
+
t.resizeObserver || (t.resizeObserver = new ResizeObserver((r) => {
|
|
327
|
+
se(s, r);
|
|
328
|
+
}));
|
|
329
|
+
const i = ee(e);
|
|
330
|
+
if (!i) {
|
|
331
|
+
t.observedGroups.size > 0 && (t.resizeObserver.disconnect(), t.observedGroups.clear());
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
te(t.observedGroups, i) || (t.resizeObserver.disconnect(), t.observedGroups.clear(), w.forEach((r) => {
|
|
335
|
+
const n = i[r];
|
|
336
|
+
t.observedGroups.set(r, n), t.resizeObserver?.observe(n);
|
|
337
|
+
}));
|
|
338
|
+
}, re = (s, e) => {
|
|
339
|
+
const t = L(s);
|
|
340
|
+
return t.subscribers.add(e), e(C(t.observedSizes)), () => {
|
|
341
|
+
const i = m.get(s);
|
|
342
|
+
i && (i.subscribers.delete(e), i.subscribers.size === 0 && (i.resizeObserver?.disconnect(), i.observedGroups.clear(), m.delete(s)));
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
class ne extends A {
|
|
346
|
+
// References to the slot group elements owned by the host component.
|
|
347
|
+
#t;
|
|
348
|
+
#e;
|
|
349
|
+
#i;
|
|
350
|
+
/**
|
|
351
|
+
* Creates a controller that measures the host component's slot group containers.
|
|
352
|
+
*
|
|
353
|
+
* @param component The host component that owns the slot group elements.
|
|
354
|
+
*/
|
|
355
|
+
constructor(e) {
|
|
356
|
+
super(e), this.exports = v();
|
|
357
|
+
}
|
|
358
|
+
hostDisconnected() {
|
|
359
|
+
this.#i?.(), this.#i = void 0, this.#e = void 0, this.#t = void 0, this.exports = v();
|
|
360
|
+
}
|
|
361
|
+
hostLifecycle() {
|
|
362
|
+
return [
|
|
363
|
+
y(
|
|
364
|
+
() => this.#s(),
|
|
365
|
+
(t) => {
|
|
366
|
+
if (this.#e !== t) {
|
|
367
|
+
if (this.#i?.(), this.#i = void 0, this.#e = t, this.#t = t?.slotGroupRefs, !t) {
|
|
368
|
+
this.exports = v();
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
this.#i = re(t, (i) => {
|
|
372
|
+
this.#r(i) || (this.exports = i);
|
|
373
|
+
}), P(t, this.#t);
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
{ sync: !0, initial: !0 }
|
|
377
|
+
),
|
|
378
|
+
y(
|
|
379
|
+
() => this.#s()?.slotGroupRefs,
|
|
380
|
+
(t) => {
|
|
381
|
+
this.#t = t, this.#e && t && P(this.#e, t);
|
|
382
|
+
},
|
|
383
|
+
{ sync: !0, initial: !0 }
|
|
384
|
+
)
|
|
385
|
+
];
|
|
386
|
+
}
|
|
387
|
+
#s() {
|
|
388
|
+
const { referenceElement: e } = this.component;
|
|
389
|
+
return e && typeof e != "string" ? e : void 0;
|
|
390
|
+
}
|
|
391
|
+
hostUpdated() {
|
|
392
|
+
!this.#e || !this.#t || P(this.#e, this.#t);
|
|
393
|
+
}
|
|
394
|
+
// Compares the newly measured sizes against the currently exported values.
|
|
395
|
+
#r(e) {
|
|
396
|
+
const t = this.exports ?? v();
|
|
397
|
+
return w.every((i) => {
|
|
398
|
+
const r = t[i], n = e[i];
|
|
399
|
+
return r.width === n.width && r.height === n.height;
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
const oe = R(ne), ae = $(d);
|
|
404
|
+
class le extends M {
|
|
134
405
|
constructor() {
|
|
135
|
-
super(...arguments), this._messages =
|
|
136
|
-
this.viewModel.captureArrowKeysForNavigation(
|
|
137
|
-
}, this.
|
|
406
|
+
super(...arguments), this._messages = N(), this.viewModel = ae(this), this._direction = G(), this._captureArrowKeysForNavigation = (e) => {
|
|
407
|
+
this.viewModel.captureArrowKeysForNavigation(e, this._direction);
|
|
408
|
+
}, this._useFeatureRefPopup = Z(this), this._handleApplySlideStart = () => {
|
|
409
|
+
this._useFeatureRefPopup.closePopup();
|
|
410
|
+
}, this._handleApplySlideComplete = (e) => {
|
|
411
|
+
this._useFeatureRefPopup.openPopup(e);
|
|
412
|
+
}, this.autoDestroyDisabled = !1, this.view = this.viewModel.view, this.scale = "m", this.keyboardNavigationEnabled = !1, this.popupDisabled = !1, this.arcgisPopupFeatureNotFound = x(), this.arcgisPopupFeaturesRetrieved = x(), this.arcgisReady = x();
|
|
138
413
|
}
|
|
139
414
|
static {
|
|
140
|
-
this.properties = { slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5 };
|
|
415
|
+
this.properties = { _slotSizesController: 16, slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5, popupDisabled: 5 };
|
|
141
416
|
}
|
|
142
417
|
static {
|
|
143
|
-
this.styles =
|
|
418
|
+
this.styles = q;
|
|
144
419
|
}
|
|
145
420
|
get slideId() {
|
|
146
421
|
return this.viewModel.slideId;
|
|
147
422
|
}
|
|
148
|
-
set slideId(
|
|
149
|
-
this.viewModel.slideId =
|
|
423
|
+
set slideId(e) {
|
|
424
|
+
this.viewModel.slideId = e;
|
|
150
425
|
}
|
|
151
426
|
async destroy() {
|
|
152
427
|
await this.manager.destroy();
|
|
153
428
|
}
|
|
154
429
|
loaded() {
|
|
155
|
-
this.manager.onLifecycle(() =>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
430
|
+
this.manager.onLifecycle(() => {
|
|
431
|
+
this.viewModel.onApplySlideStart = this._handleApplySlideStart, this.viewModel.onApplySlideComplete = this._handleApplySlideComplete, this._keyboardHandle = y(() => this.keyboardNavigationEnabled, (t) => {
|
|
432
|
+
document.removeEventListener("keydown", this._captureArrowKeysForNavigation), t && document.addEventListener("keydown", this._captureArrowKeysForNavigation);
|
|
433
|
+
}, { initial: !0 });
|
|
434
|
+
const e = this;
|
|
435
|
+
S(() => e.referenceElement).then((t) => {
|
|
436
|
+
this._isArcgisScene(t) && (this._slotSizesController = oe(this), this._watchSceneViewSlotSizes());
|
|
437
|
+
}), this.manager.onDisconnected(() => {
|
|
438
|
+
document.removeEventListener("keydown", this._captureArrowKeysForNavigation), this._keyboardHandle?.remove();
|
|
439
|
+
});
|
|
159
440
|
});
|
|
160
441
|
}
|
|
442
|
+
_isArcgisScene(e) {
|
|
443
|
+
return e === void 0 || typeof e == "string" ? !1 : "tagName" in e && e.tagName === "ARCGIS-SCENE";
|
|
444
|
+
}
|
|
445
|
+
_watchSceneViewSlotSizes() {
|
|
446
|
+
return y(() => this._slotSizesController, (e) => this._updatePresentationCaptionsPadding(e?.topLeft, e?.topRight, e?.bottomLeft, e?.bottomRight), { initial: !0 });
|
|
447
|
+
}
|
|
448
|
+
_updatePresentationCaptionsPadding(e, t, i, r) {
|
|
449
|
+
const n = this._direction === "ltr" ? e?.width ?? 0 : t?.width ?? 0, o = this._direction === "ltr" ? t?.width ?? 0 : e?.width ?? 0, a = Math.max(e?.height ?? 0, t?.height ?? 0), l = Math.max(i?.height ?? 0, r?.height ?? 0);
|
|
450
|
+
this.el.style.setProperty("--arcgis-internal-presentation-captions-padding-start", `${n.toString()}px`), this.el.style.setProperty("--arcgis-internal-presentation-captions-padding-end", `${o.toString()}px`);
|
|
451
|
+
const p = n <= Math.max(a, l) && o <= Math.max(a, l);
|
|
452
|
+
this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top", p ? "0" : `${a}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom", p ? "0" : `${l}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start", p ? `${n}px` : "0"), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end", p ? `${o}px` : "0");
|
|
453
|
+
}
|
|
161
454
|
render() {
|
|
162
|
-
|
|
163
|
-
|
|
455
|
+
if (this.viewModel.visibleSlides.length === 0)
|
|
456
|
+
return u`<div></div>`;
|
|
457
|
+
const e = this.viewModel.visibleSlides.find((r) => r.id === this.slideId), t = this._renderNavigation(), i = this._renderCaptions(e);
|
|
458
|
+
return u`${i}${t}`;
|
|
459
|
+
}
|
|
460
|
+
_renderNavigation() {
|
|
461
|
+
const e = this.viewModel.lastSlideSelected && !this.viewModel.hasOnlyOneSlide, t = this._direction === "rtl", i = t ? "chevron-right" : "chevron-left", r = t ? "chevron-left" : "chevron-right";
|
|
462
|
+
return u`<div class="root"><calcite-button appearance=transparent icon-start=${i ?? g} kind=neutral .scale=${this.scale} .disabled=${this.viewModel.firstSlideSelected || !this.viewModel.slideSelected} .label=${this._messages.previous} title=${this._messages.previous ?? g} @click=${() => this.viewModel.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this._renderSlideCounter()}</div><calcite-button appearance=transparent icon-start=${(e ? "reset" : r) ?? g} kind=neutral .scale=${this.scale} .label=${e ? this._messages.restart : this._messages.next} title=${(e ? this._messages.restart : this._messages.next) ?? g} @click=${() => this.viewModel.navigateInPresentation(1)}></calcite-button></div>`;
|
|
164
463
|
}
|
|
165
464
|
_renderSlideCounter() {
|
|
166
|
-
const
|
|
167
|
-
return this.viewModel.slideSelected ?
|
|
465
|
+
const e = this.viewModel.slideIndex + 1, t = this._messages?.slideNavAriaText?.replace("${index}", e.toString()).replace("${numberOfSlides}", this.viewModel.visibleSlides.length.toString());
|
|
466
|
+
return this.viewModel.slideSelected ? u`<p role=banner aria-label=${t ?? g} 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>` : u`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.viewModel.visibleSlides?.length} ${this._messages?.slides}</p>`;
|
|
467
|
+
}
|
|
468
|
+
_renderCaptions(e) {
|
|
469
|
+
return u`<arcgis-presentation-captions .slide=${e}></arcgis-presentation-captions>`;
|
|
168
470
|
}
|
|
169
471
|
}
|
|
170
|
-
|
|
472
|
+
z("arcgis-presentation", le);
|
|
171
473
|
export {
|
|
172
|
-
|
|
474
|
+
le as ArcgisPresentation
|
|
173
475
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { c as g } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as l, html as c } from "lit";
|
|
4
|
+
import { LitElement as s, createEvent as b } from "@arcgis/lumina";
|
|
5
|
+
import "@arcgis/core/core/accessorSupport/decorators.js";
|
|
6
|
+
const p = l`:host{--arcgis-internal-presentation-captions-padding-start: unset;--arcgis-internal-presentation-captions-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}.captions-container{width:100%;height:100%;padding-inline-start:calc(var(--arcgis-internal-presentation-captions-padding-start) + var(--calcite-space-lg));padding-inline-end:calc(var(--arcgis-internal-presentation-captions-padding-end) + var(--calcite-space-lg))}.captions{height:auto;position:relative;box-sizing:border-box;transition:padding .05s ease-in 0s;min-height:48px;max-width:max(400px,40%);padding:12px 16px;&:before{content:"";position:absolute;inset-block:-16px -144px;inset-inline:calc(-64px - var(--arcgis-internal-presentation-captions-padding-start)) calc(0px - max(360px,32vw));background:var(--caption-gradient);mask:var(--caption-gradient-mask-before);opacity:var(--calcite-opacity-half);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--caption-gradient-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}:dir(rtl) .captions{&:before{mask:var(--caption-gradient-mask-before-RTL)}}.title{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;text-shadow:var(--title-text-shadow);font-size:var(--caption-title-font-size);font-family:Avenir Next World,sans-serif;font-style:normal;font-weight:var(--calcite-font-weight-bold);line-height:var(--calcite-font-line-height-relative-snug);margin-bottom:2px;color:var(--calcite-color-text-1)}.captions-description{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;text-shadow:var(--description-text-shadow);font-size:var(--caption-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-1)}.cover-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;padding-block-start:calc(var(--arcgis-internal-presentation-cover-padding-top) + var(--calcite-space-lg));padding-block-end:calc(var(--arcgis-internal-presentation-cover-padding-bottom) + var(--calcite-space-lg))}.cover{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-inline:8px;min-height:88px;min-width:200px;position:relative;padding-inline-start:calc(var(--arcgis-internal-presentation-cover-padding-start) + 16px);padding-inline-end:calc(var(--arcgis-internal-presentation-cover-padding-end) + 16px);opacity:1;transition:opacity .25s,color .25s;&:before{content:"";position:absolute;inset:calc(0vw - max(320px,12vw,18vh)) calc(0vw - max(320px,24vw));border-radius:120px;background:var(--cover-gradient-before);mask:var(--cover-mask-before);opacity:var(--calcite-opacity-half);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--cover-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}.cover-description{text-wrap:pretty;text-align:center;text-shadow:var(--description-text-shadow);font-size:var(--cover-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);display:-webkit-box;max-width:75ch;overflow-wrap:break-word;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;color:var(--calcite-color-text-1)}:host{width:100%;height:100%;position:absolute;top:0;left:0;display:flex;align-items:flex-start;box-sizing:border-box;--caption-gradient: linear-gradient( 180deg, rgb(255 255 255 / 100%) 0%, rgb(255 255 255 / 98.3%) 8.1%, rgb(255 255 255 / 95%) 15.5%, rgb(255 255 255 / 90%) 22.5%, rgb(255 255 255 / 83.3%) 29%, rgb(255 255 255 / 73.3%) 35%, rgb(255 255 255 / 65%) 41%, rgb(255 255 255 / 55%) 47%, rgb(255 255 255 / 45%) 53%, rgb(255 255 255 / 35%) 59%, rgb(255 255 255 / 26.7%) 65%, rgb(255 255 255 / 18.3%) 71%, rgb(255 255 255 / 10%) 77%, rgb(255 255 255 / 4%) 84.5%, rgb(255 255 255 / 1%) 91%, rgb(255 255 255 / 0%) 100% );--title-text-shadow: 0 1px 1px #fff3, 0 0 3px #fff2, 0 0 6px #fff2;--caption-gradient-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-before-RTL: linear-gradient( 270deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--description-text-shadow: 0 .5px .5px #fff2, 0 1px 1px #fff2, 0 0 8px #fff2;--caption-title-font-size: max(var(--calcite-font-size-xxl), calc(18px + .64vw) );--caption-description-font-size: max(var(--calcite-font-size), calc(10px + .4vw) );--cover-description-font-size: max(var(--calcite-font-size-md), calc(10px + .5vw) );--cover-gradient-before: linear-gradient( 0deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 4%, rgb(255 255 255 / 4%) 7.7%, rgb(255 255 255 / 10%) 11.2%, rgb(255 255 255 / 18.3%) 14.5%, rgb(255 255 255 / 26.7%) 17.5%, rgb(255 255 255 / 35%) 20.5%, rgb(255 255 255 / 45%) 23.5%, rgb(255 255 255 / 55%) 26.5%, rgb(255 255 255 / 65%) 29.5%, rgb(255 255 255 / 73.3%) 32.5%, rgb(255 255 255 / 83.3%) 35.5%, rgb(255 255 255 / 90%) 38.5%, rgb(255 255 255 / 95%) 42.2%, rgb(255 255 255 / 98.3%) 46%, rgb(255 255 255 / 100%) 50%, rgb(255 255 255 / 98.3%) 54%, rgb(255 255 255 / 95%) 57.8%, rgb(255 255 255 / 90%) 61.5%, rgb(255 255 255 / 83.3%) 64.5%, rgb(255 255 255 / 73.3%) 67.5%, rgb(255 255 255 / 65%) 70.5%, rgb(255 255 255 / 55%) 73.5%, rgb(255 255 255 / 45%) 76.5%, rgb(255 255 255 / 35%) 79.5%, rgb(255 255 255 / 26.7%) 82.5%, rgb(255 255 255 / 18.3%) 85.5%, rgb(255 255 255 / 10%) 88.8%, rgb(255 255 255 / 4%) 92.3%, rgb(255 255 255 / 1%) 96%, rgb(255 255 255 / 0%) 100% );--cover-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 3.2%, rgb(255 255 255 / 4%) 6.2%, rgb(255 255 255 / 10%) 9%, rgb(255 255 255 / 18.3%) 11.6%, rgb(255 255 255 / 26.7%) 14%, rgb(255 255 255 / 35%) 16.4%, rgb(255 255 255 / 45%) 18.8%, rgb(255 255 255 / 55%) 21.2%, rgb(255 255 255 / 65%) 23.6%, rgb(255 255 255 / 73.3%) 26%, rgb(255 255 255 / 83.3%) 28.4%, rgb(255 255 255 / 90%) 30.8%, rgb(255 255 255 / 95%) 33.8%, rgb(255 255 255 / 98.3%) 36.8%, rgb(255 255 255 / 100%) 40%, rgb(255 255 255 / 100%) 60%, rgb(255 255 255 / 98.3%) 63.2%, rgb(255 255 255 / 95%) 66.2%, rgb(255 255 255 / 90%) 69.2%, rgb(255 255 255 / 83.3%) 71.6%, rgb(255 255 255 / 73.3%) 74%, rgb(255 255 255 / 65%) 76.4%, rgb(255 255 255 / 55%) 78.8%, rgb(255 255 255 / 45%) 81.2%, rgb(255 255 255 / 35%) 83.6%, rgb(255 255 255 / 26.7%) 86%, rgb(255 255 255 / 18.3%) 88.4%, rgb(255 255 255 / 10%) 91%, rgb(255 255 255 / 4%) 93.9%, rgb(255 255 255 / 1%) 96.8%, rgb(255 255 255 / 0%) 100% );--cover-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--cover-gradient-phone: linear-gradient( 0deg, rgb(255 255 255 / 0%) .59%, rgb(255 255 255 / 4%) 4.94%, rgb(255 255 255 / 50%) 25.87%, rgb(255 255 255 / 70%) 37.02%, rgb(255 255 255 / 80%) 48.43%, rgb(255 255 255 / 70%) 60.34%, rgb(255 255 255 / 30%) 80.55%, rgb(255 255 255 / 4%) 93.22%, rgb(255 255 255 / 0%) 99.74% );.fadeOut{opacity:1!important}}`, n = 50, o = 256;
|
|
7
|
+
class d extends s {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.autoDestroyDisabled = !1, this.arcgisReady = b();
|
|
10
|
+
}
|
|
11
|
+
static {
|
|
12
|
+
this.properties = { slide: 0, autoDestroyDisabled: 5 };
|
|
13
|
+
}
|
|
14
|
+
static {
|
|
15
|
+
this.styles = p;
|
|
16
|
+
}
|
|
17
|
+
async destroy() {
|
|
18
|
+
await this.manager.destroy();
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
const e = this.slide?.layout;
|
|
22
|
+
if (!this.slide?.layout || this.slide.layout === "none")
|
|
23
|
+
return null;
|
|
24
|
+
const r = this.slide.title?.text, t = this.slide.description?.text, a = r?.length && r.length > n ? `${r?.substring(0, n)}...` : r, i = t?.length && t.length > o ? `${t?.substring(0, o)}...` : t;
|
|
25
|
+
return e === "caption" ? this._renderCaptions(a, i) : this._renderCover(a, i);
|
|
26
|
+
}
|
|
27
|
+
_renderCover(e, r) {
|
|
28
|
+
return c`<div class="cover-container"><div class="cover"><div class="title">${e}</div><div class="cover-description">${r}</div></div></div>`;
|
|
29
|
+
}
|
|
30
|
+
_renderCaptions(e, r) {
|
|
31
|
+
return c`<div class="captions-container"><div class="captions"><div class="title">${e}</div><div class="captions-description">${r}</div></div></div>`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
g("arcgis-presentation-captions", d);
|
|
35
|
+
export {
|
|
36
|
+
d as ArcgisPresentationCaptions
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -11,7 +11,8 @@ import { reEmitEvent as t, reCreateAccessor as y, makeAccessorController as w }
|
|
|
11
11
|
import { createRef as o, ref as h } from "lit/directives/ref.js";
|
|
12
12
|
import { U as f, u as b, a as V } from "../../chunks/useArcgisViewReadyError.js";
|
|
13
13
|
import { s as C } from "../../chunks/esri-main.js";
|
|
14
|
-
import { s as E
|
|
14
|
+
import { s as E } from "../../chunks/slots.js";
|
|
15
|
+
import { C as c } from "../../chunks/resources.js";
|
|
15
16
|
import { b as _, c as A, p as P, i as R } from "../../chunks/component-utils.js";
|
|
16
17
|
const D = w(g, {}), I = w(u, {});
|
|
17
18
|
class M extends d {
|