@arcgis/map-components 5.1.0-next.74 → 5.1.0-next.76
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/5CKHTWHC.js +2 -0
- package/dist/cdn/6D72H6LD.js +2 -0
- package/dist/cdn/AG7LUCV3.js +2 -0
- package/dist/cdn/APYGTRF2.js +2 -0
- package/dist/cdn/CUYGLJRU.js +2 -0
- package/dist/cdn/G7KHJU6J.js +2 -0
- package/dist/cdn/HL4M23YL.js +2 -0
- package/dist/cdn/MNXYDKVS.js +2 -0
- package/dist/cdn/PP7ZT3L2.js +2 -0
- package/dist/cdn/QW4QGAIG.js +2 -0
- package/dist/cdn/SD7DMWPD.js +2 -0
- package/dist/cdn/{KGLUFWJ7.js → T66WG4I4.js} +1 -1
- package/dist/cdn/V2HLEYHF.js +3 -0
- package/dist/cdn/WO2BX7U2.js +2 -0
- package/dist/cdn/XOTOQOK6.js +2 -0
- package/dist/cdn/YFXHW7I2.js +2 -0
- package/dist/cdn/YLKEVZLN.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/resources.js +35 -0
- package/dist/chunks/slots.js +12 -40
- package/dist/chunks/useArcgisViewReadyError.js +20 -19
- package/dist/chunks/video-utils.js +12 -0
- package/dist/components/arcgis-feature/customElement.js +75 -53
- package/dist/components/arcgis-feature-media/customElement.js +222 -211
- package/dist/components/arcgis-feature-relationship/customElement.js +69 -68
- package/dist/components/arcgis-features/customElement.d.ts +2 -2
- package/dist/components/arcgis-features/customElement.js +44 -44
- package/dist/components/arcgis-link-chart/customElement.js +2 -1
- package/dist/components/arcgis-map/customElement.js +7 -6
- package/dist/components/arcgis-popup/customElement.d.ts +2 -2
- package/dist/components/arcgis-presentation/customElement.js +256 -109
- 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-video/customElement.js +10 -9
- package/dist/components/arcgis-video-player/customElement.js +22 -21
- package/dist/components/arcgis-video-player-action-bar/customElement.js +14 -17
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -1
- package/package.json +5 -5
- package/dist/cdn/5EAOM22D.js +0 -2
- package/dist/cdn/7J7GJZ35.js +0 -2
- package/dist/cdn/AHDX7DZE.js +0 -2
- package/dist/cdn/CQCKW6L4.js +0 -2
- package/dist/cdn/EXZFAJW4.js +0 -3
- package/dist/cdn/GHSQJ4UC.js +0 -2
- package/dist/cdn/NYCLIJ7T.js +0 -2
- package/dist/cdn/OPXYBLHE.js +0 -2
- package/dist/cdn/QPMWCCXQ.js +0 -2
- package/dist/cdn/UPVWARLK.js +0 -2
- package/dist/cdn/YCM6SOEX.js +0 -2
- package/dist/cdn/YCN7F3YY.js +0 -2
- package/dist/cdn/Z4OSJFVK.js +0 -2
|
@@ -139,7 +139,7 @@ export abstract class ArcgisPopup extends LitElement {
|
|
|
139
139
|
*/
|
|
140
140
|
accessor actions: Collection<PopupAction>;
|
|
141
141
|
/**
|
|
142
|
-
* Indicates if the component is active when it is visible and is not [waiting](https://developers.arcgis.com/javascript/latest/references/core/
|
|
142
|
+
* Indicates if the component is active when it is visible and is not [waiting](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#waitingForResult).
|
|
143
143
|
*
|
|
144
144
|
* @default false
|
|
145
145
|
*/
|
|
@@ -471,7 +471,7 @@ export abstract class ArcgisPopup extends LitElement {
|
|
|
471
471
|
*
|
|
472
472
|
* @default false
|
|
473
473
|
* @see [fetchFeatures()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/#fetchFeatures)
|
|
474
|
-
* @see [active](https://developers.arcgis.com/javascript/latest/references/core/
|
|
474
|
+
* @see [active](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#active)
|
|
475
475
|
* @see [clear()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/#clear)
|
|
476
476
|
* @since 5.0
|
|
477
477
|
* @example
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { GenericController 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
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { fetchPopupFeaturesFromGraphics as
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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;
|
|
27
28
|
};
|
|
28
|
-
let
|
|
29
|
+
let d = class extends T {
|
|
29
30
|
//#region Lifecycle
|
|
30
31
|
constructor(s) {
|
|
31
32
|
super(s), this.keyboardNavigationEnabled = !1, this._subscribeToSlideEvents = (e) => {
|
|
@@ -46,7 +47,7 @@ let o = class extends L {
|
|
|
46
47
|
this._unSubscribeToSlideEvents(this.visibleSlides);
|
|
47
48
|
}
|
|
48
49
|
get visibleSlides() {
|
|
49
|
-
return this.view?.map?.presentation?.slides?.filter((s) => !s.hidden) ?? new
|
|
50
|
+
return this.view?.map?.presentation?.slides?.filter((s) => !s.hidden) ?? new I();
|
|
50
51
|
}
|
|
51
52
|
get lastSlideSelected() {
|
|
52
53
|
return this.getSlideIndexBySlideId(this.slideId) === this.visibleSlides.length - 1;
|
|
@@ -76,8 +77,8 @@ let o = class extends L {
|
|
|
76
77
|
const t = ["ArrowLeft", "ArrowRight", "PageUp", "PageDown"];
|
|
77
78
|
if (document.activeElement?.nodeName.toLowerCase() === "arcgis-scene" || !t.includes(s.code))
|
|
78
79
|
return;
|
|
79
|
-
const r = e === "rtl" ? "ArrowRight" : "ArrowLeft",
|
|
80
|
-
this.navigateInPresentation(
|
|
80
|
+
const r = e === "rtl" ? "ArrowRight" : "ArrowLeft", o = s.code === r || s.code === "PageUp" ? -1 : 1;
|
|
81
|
+
this.navigateInPresentation(o);
|
|
81
82
|
}
|
|
82
83
|
//#endregion
|
|
83
84
|
//#region Private Methods
|
|
@@ -86,15 +87,15 @@ let o = class extends L {
|
|
|
86
87
|
return this.visibleSlides.getItemAt(s);
|
|
87
88
|
}
|
|
88
89
|
async _applySlide(s) {
|
|
89
|
-
this.view && await
|
|
90
|
+
this.view && await B(s.applyTo(this.view));
|
|
90
91
|
}
|
|
91
92
|
_startWatchVisibleSlides() {
|
|
92
93
|
this._subscribeToSlideEvents(this.visibleSlides), this.addHandles(
|
|
93
|
-
|
|
94
|
+
V(
|
|
94
95
|
() => this.visibleSlides,
|
|
95
96
|
"change",
|
|
96
97
|
(s) => {
|
|
97
|
-
this._subscribeToSlideEvents(new
|
|
98
|
+
this._subscribeToSlideEvents(new I(s.added)), this._unSubscribeToSlideEvents(new I(s.removed));
|
|
98
99
|
},
|
|
99
100
|
{
|
|
100
101
|
onListenerAdd: this._subscribeToSlideEvents,
|
|
@@ -111,50 +112,50 @@ let o = class extends L {
|
|
|
111
112
|
}
|
|
112
113
|
//#endregion
|
|
113
114
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
],
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
],
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
],
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
],
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
],
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
],
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
],
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
],
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
],
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
],
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
],
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
],
|
|
150
|
-
class
|
|
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 {
|
|
151
152
|
constructor(e) {
|
|
152
153
|
super(e);
|
|
153
154
|
}
|
|
154
155
|
hostLoaded() {
|
|
155
156
|
this.component.manager.onLifecycle(() => {
|
|
156
157
|
const e = this.component;
|
|
157
|
-
|
|
158
|
+
S(() => e.referenceElement).then((t) => {
|
|
158
159
|
this._isArcgisScene(t) && (this._sceneRef = t);
|
|
159
160
|
});
|
|
160
161
|
});
|
|
@@ -187,15 +188,15 @@ class W extends I {
|
|
|
187
188
|
const r = t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;
|
|
188
189
|
if (r?.layerId == null)
|
|
189
190
|
return { success: !1, features: i };
|
|
190
|
-
const { layer: n, sublayer:
|
|
191
|
+
const { layer: n, sublayer: o } = this._getLayersFromView(e, r.layerId, r?.sublayerId);
|
|
191
192
|
if (!n)
|
|
192
193
|
return { success: !1, features: i };
|
|
193
|
-
const
|
|
194
|
-
if (!
|
|
194
|
+
const a = o ?? n;
|
|
195
|
+
if (!a || !this._layerTypeSupportsCapturePopup(a))
|
|
195
196
|
return { success: !1, features: i };
|
|
196
|
-
if (i = await this._fetchFeaturesFromQueryable(e, t, n,
|
|
197
|
-
const
|
|
198
|
-
return this._setFallbackPopupTemplate(
|
|
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 };
|
|
199
200
|
}
|
|
200
201
|
return { success: !1, features: i };
|
|
201
202
|
}
|
|
@@ -213,16 +214,16 @@ class W extends I {
|
|
|
213
214
|
return e && e.length > 0 && e[0].attributes && Object.entries(e[0].attributes)?.length > 1;
|
|
214
215
|
}
|
|
215
216
|
async _fetchFeaturesFromQueryable(e, t, i, r, n) {
|
|
216
|
-
const
|
|
217
|
-
if (
|
|
217
|
+
const o = t.features?.getItemAt(t.selectedFeatureIndex);
|
|
218
|
+
if (o?.id == null)
|
|
218
219
|
return await Promise.resolve([]);
|
|
219
|
-
const
|
|
220
|
-
await
|
|
221
|
-
const
|
|
222
|
-
await
|
|
223
|
-
const
|
|
224
|
-
let
|
|
225
|
-
return this._featureHasBeenFilledWithAttributes(
|
|
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])), _;
|
|
226
227
|
}
|
|
227
228
|
_tryGetBuildingComponentSublayerView(e, t, i) {
|
|
228
229
|
let r;
|
|
@@ -245,23 +246,23 @@ class W extends I {
|
|
|
245
246
|
e.geometry == null && t && (e.geometry = t.clone());
|
|
246
247
|
}
|
|
247
248
|
_createFeatureGraphic(e, t, i, r) {
|
|
248
|
-
const n = this._getGlobalIdFieldNameFromLayer(i),
|
|
249
|
-
return
|
|
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;
|
|
250
251
|
}
|
|
251
252
|
_getGraphicOrigin(e, t) {
|
|
252
253
|
switch (e.type) {
|
|
253
254
|
case "csv":
|
|
254
|
-
return new
|
|
255
|
+
return new H(e);
|
|
255
256
|
case "feature":
|
|
256
|
-
return new
|
|
257
|
+
return new Q(e);
|
|
257
258
|
case "geojson":
|
|
258
|
-
return new
|
|
259
|
+
return new j(e);
|
|
259
260
|
case "scene":
|
|
260
|
-
return new
|
|
261
|
+
return new W(e);
|
|
261
262
|
case "wfs":
|
|
262
|
-
return new
|
|
263
|
+
return new K(e);
|
|
263
264
|
case "building-scene":
|
|
264
|
-
return t ? new
|
|
265
|
+
return t ? new U(t) : void 0;
|
|
265
266
|
default:
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
@@ -270,7 +271,7 @@ class W extends I {
|
|
|
270
271
|
return e != null && ["csv", "feature", "geojson", "wfs", "scene", "building-component"].includes(e.type);
|
|
271
272
|
}
|
|
272
273
|
_isLayer(e) {
|
|
273
|
-
return !!e && e instanceof
|
|
274
|
+
return !!e && e instanceof D;
|
|
274
275
|
}
|
|
275
276
|
_isBuildingSceneLayer(e) {
|
|
276
277
|
return e?.type === "building-scene";
|
|
@@ -280,22 +281,141 @@ class W extends I {
|
|
|
280
281
|
}
|
|
281
282
|
//#endregion
|
|
282
283
|
}
|
|
283
|
-
const
|
|
284
|
-
|
|
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 {
|
|
285
405
|
constructor() {
|
|
286
|
-
super(...arguments), this._messages =
|
|
406
|
+
super(...arguments), this._messages = N(), this.viewModel = ae(this), this._direction = G(), this._captureArrowKeysForNavigation = (e) => {
|
|
287
407
|
this.viewModel.captureArrowKeysForNavigation(e, this._direction);
|
|
288
|
-
}, this._useFeatureRefPopup =
|
|
408
|
+
}, this._useFeatureRefPopup = Z(this), this._handleApplySlideStart = () => {
|
|
289
409
|
this._useFeatureRefPopup.closePopup();
|
|
290
410
|
}, this._handleApplySlideComplete = (e) => {
|
|
291
411
|
this._useFeatureRefPopup.openPopup(e);
|
|
292
|
-
}, this.autoDestroyDisabled = !1, this.view = this.viewModel.view, this.scale = "m", this.keyboardNavigationEnabled = !1, this.popupDisabled = !1, this.arcgisPopupFeatureNotFound =
|
|
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();
|
|
293
413
|
}
|
|
294
414
|
static {
|
|
295
|
-
this.properties = { slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5, popupDisabled: 5 };
|
|
415
|
+
this.properties = { _slotSizesController: 16, slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5, popupDisabled: 5 };
|
|
296
416
|
}
|
|
297
417
|
static {
|
|
298
|
-
this.styles =
|
|
418
|
+
this.styles = q;
|
|
299
419
|
}
|
|
300
420
|
get slideId() {
|
|
301
421
|
return this.viewModel.slideId;
|
|
@@ -307,22 +427,49 @@ class Q extends F {
|
|
|
307
427
|
await this.manager.destroy();
|
|
308
428
|
}
|
|
309
429
|
loaded() {
|
|
310
|
-
this.manager.onLifecycle(() =>
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
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
|
+
});
|
|
314
440
|
});
|
|
315
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
|
+
}
|
|
316
454
|
render() {
|
|
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() {
|
|
317
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";
|
|
318
|
-
return
|
|
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>`;
|
|
319
463
|
}
|
|
320
464
|
_renderSlideCounter() {
|
|
321
465
|
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 ?
|
|
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>`;
|
|
323
470
|
}
|
|
324
471
|
}
|
|
325
|
-
|
|
472
|
+
z("arcgis-presentation", le);
|
|
326
473
|
export {
|
|
327
|
-
|
|
474
|
+
le as ArcgisPresentation
|
|
328
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 {
|