@arcgis/map-components 5.2.0-next.86 → 5.2.0-next.87
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/3IY3D62Z.js +2 -0
- package/dist/cdn/{YXA3DG4H.js → 3W4IH5LQ.js} +1 -1
- package/dist/cdn/5L5UYV3H.js +2 -0
- package/dist/cdn/6NGRUK5C.js +2 -0
- package/dist/cdn/BPHJ4VBC.js +2 -0
- package/dist/cdn/CFB4ZR5F.js +2 -0
- package/dist/cdn/D6MRDGUC.js +2 -0
- package/dist/cdn/EFUTKX2O.js +2 -0
- package/dist/cdn/{PNSES5YC.js → EGUVICJF.js} +1 -1
- package/dist/cdn/FXK4G4VK.js +2 -0
- package/dist/cdn/GNVPXNTX.js +2 -0
- package/dist/cdn/HTEIMRY6.js +2 -0
- package/dist/cdn/I2D75Q7M.js +2 -0
- package/dist/cdn/IMG5GOJB.js +2 -0
- package/dist/cdn/IOZ5U2X7.js +2 -0
- package/dist/cdn/K3N6NHJW.js +2 -0
- package/dist/cdn/KN4PG54T.js +2 -0
- package/dist/cdn/{56NINR5L.js → KNMMVZVV.js} +1 -1
- package/dist/cdn/M66G67OC.js +2 -0
- package/dist/cdn/MQX2F54G.js +2 -0
- package/dist/cdn/NFWFRHUT.js +2 -0
- package/dist/cdn/PCEAIDCB.js +2 -0
- package/dist/cdn/PMU2DO3P.js +2 -0
- package/dist/cdn/{LTGPFC6N.js → PWEF6IKF.js} +1 -1
- package/dist/cdn/{HWLBIEGO.js → RS5BEGC5.js} +1 -1
- package/dist/cdn/{K4V76SMR.js → TAIZWQYU.js} +1 -1
- package/dist/cdn/TCMRGJTC.js +2 -0
- package/dist/cdn/TPG3TU6B.js +2 -0
- package/dist/cdn/TSZ26CSX.js +2 -0
- package/dist/cdn/V4W4ZP6M.js +2 -0
- package/dist/cdn/XM2OBGXW.js +2 -0
- package/dist/cdn/assets/presentation/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-picker/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/constants2.js +6 -0
- package/dist/chunks/useArcgisViewReadyError.js +42 -27
- package/dist/components/arcgis-aggregated-features/customElement.js +0 -1
- package/dist/components/arcgis-bookmarks/customElement.js +0 -1
- package/dist/components/arcgis-feature-next/customElement.js +4 -4
- package/dist/components/arcgis-features/customElement.js +3 -3
- package/dist/components/arcgis-features-next/customElement.js +98 -86
- package/dist/components/arcgis-features-next/index.js +0 -1
- package/dist/components/arcgis-grid-controls/customElement.js +1 -1
- package/dist/components/arcgis-link-chart/customElement.d.ts +9 -5
- package/dist/components/arcgis-link-chart/customElement.js +24 -18
- package/dist/components/arcgis-map/customElement.d.ts +9 -5
- package/dist/components/arcgis-map/customElement.js +19 -13
- package/dist/components/arcgis-oriented-imagery-viewer-non-panoramic-viewer/customElement.js +0 -2
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +15 -16
- package/dist/components/arcgis-paste/customElement.js +0 -1
- package/dist/components/arcgis-popup/customElement.d.ts +7 -7
- package/dist/components/arcgis-popup/customElement.js +10 -13
- package/dist/components/arcgis-presentation/PresentationViewModel.d.ts +6 -0
- package/dist/components/arcgis-presentation/customElement.d.ts +8 -6
- package/dist/components/arcgis-presentation/customElement.js +206 -165
- package/dist/components/arcgis-presentation/index.js +2 -0
- package/dist/components/arcgis-presentation-captions/customElement.js +4 -4
- package/dist/components/arcgis-presentation-slide-list/customElement.js +49 -0
- package/dist/components/arcgis-presentation-slide-list/index.js +3 -0
- package/dist/components/arcgis-scene/customElement.d.ts +9 -5
- package/dist/components/arcgis-scene/customElement.js +21 -15
- package/dist/components/arcgis-template-image/customElement.js +0 -1
- package/dist/components/arcgis-time-bar/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-picker/customElement.d.ts +56 -0
- package/dist/components/arcgis-utility-network-picker/customElement.js +91 -0
- package/dist/components/arcgis-utility-network-picker/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-picker/index.js +7 -0
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +0 -1
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +0 -1
- package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.js +123 -140
- package/dist/components/arcgis-utility-network-trace-inputs-next/index.js +2 -1
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +0 -2
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +0 -2
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +0 -2
- package/dist/components/arcgis-version-management-service-item/customElement.js +3 -4
- package/dist/components/arcgis-video/customElement.d.ts +5 -3
- package/dist/components/arcgis-video-player-actions-group/customElement.js +6 -6
- package/dist/components/arcgis-video-player-controls-group/customElement.js +1 -1
- 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/index.d.ts +10 -0
- package/dist/loader.js +4 -2
- package/dist/types/lumina.d.ts +9 -2
- package/dist/types/preact.d.ts +10 -2
- package/dist/types/react.d.ts +11 -2
- package/dist/types/stencil.d.ts +9 -2
- package/package.json +7 -7
- package/dist/cdn/42TPQKQZ.js +0 -2
- package/dist/cdn/4T6ECCFH.js +0 -2
- package/dist/cdn/4UBDCXSK.js +0 -2
- package/dist/cdn/6MEC4BFN.js +0 -2
- package/dist/cdn/AJ7XRBWN.js +0 -2
- package/dist/cdn/ARVN7QLQ.js +0 -2
- package/dist/cdn/BVDQQOCR.js +0 -2
- package/dist/cdn/DKBC3UMW.js +0 -2
- package/dist/cdn/DSIL7TYR.js +0 -2
- package/dist/cdn/G2PAKIMS.js +0 -2
- package/dist/cdn/JOOHHKWH.js +0 -2
- package/dist/cdn/KS5TQB2A.js +0 -2
- package/dist/cdn/NAQYIBE5.js +0 -2
- package/dist/cdn/NBYN44GP.js +0 -2
- package/dist/cdn/NGB5WVIG.js +0 -2
- package/dist/cdn/PBNP6WFU.js +0 -2
- package/dist/cdn/RDARV7HC.js +0 -2
- package/dist/cdn/RXAUCQQC.js +0 -2
- package/dist/cdn/S22ZRUS7.js +0 -2
- package/dist/cdn/SVOAX4K6.js +0 -2
- package/dist/cdn/TI4BX367.js +0 -2
- package/dist/cdn/W5WXJT7N.js +0 -2
- package/dist/cdn/YTC3XBSZ.js +0 -2
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { GenericController as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { u as
|
|
7
|
-
import { m as
|
|
8
|
-
import { property as d, subclass as
|
|
9
|
-
import
|
|
2
|
+
import { c as O } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as z, html as g } from "lit";
|
|
4
|
+
import { GenericController as P, proxyExports as E, useDirection as B } from "@arcgis/lumina/controllers";
|
|
5
|
+
import { LitElement as G, createEvent as v, nothing as S } from "@arcgis/lumina";
|
|
6
|
+
import { u as R } from "../../chunks/useT9n.js";
|
|
7
|
+
import { m as T } from "../../chunks/useViewModel.js";
|
|
8
|
+
import { property as d, subclass as N } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
9
|
+
import H from "@arcgis/core/core/Accessor.js";
|
|
10
10
|
import w from "@arcgis/core/core/Collection.js";
|
|
11
|
-
import { ignoreAbortErrors as
|
|
12
|
-
import { watch as u, on as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
11
|
+
import { ignoreAbortErrors as k } from "@arcgis/core/core/promiseUtils.js";
|
|
12
|
+
import { watch as u, on as D, whenOnce as _ } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
|
+
import V from "@arcgis/core/Graphic.js";
|
|
14
|
+
import M from "@arcgis/core/layers/Layer.js";
|
|
15
|
+
import j from "@arcgis/core/graphic/CSVGraphicOrigin.js";
|
|
16
|
+
import W from "@arcgis/core/graphic/GeoJSONGraphicOrigin.js";
|
|
17
17
|
import K from "@arcgis/core/graphic/SceneGraphicOrigin.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { fetchPopupFeaturesFromGraphics as
|
|
18
|
+
import U from "@arcgis/core/graphic/WFSGraphicOrigin.js";
|
|
19
|
+
import Q from "@arcgis/core/graphic/BuildingGraphicOrigin.js";
|
|
20
|
+
import q from "@arcgis/core/graphic/FeatureGraphicOrigin.js";
|
|
21
|
+
import { fetchPopupFeaturesFromGraphics as A } from "@arcgis/core/applications/SceneViewer/sceneViewerUtils.js";
|
|
22
22
|
import { s as I } from "../../chunks/resources.js";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
import { d as C, p as J } from "../../chunks/constants2.js";
|
|
24
|
+
const X = z`:host{width:100%;height:100%;padding:var(--calcite-space-none);margin:var(--calcite-space-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{display:flex;width:100%;justify-content:flex-end;padding-top:var(--calcite-space-lg);padding-inline-start:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation-container{display:flex;flex-direction:column;margin-inline-start:var(--calcite-space-lg);margin-block:auto calc(var(--calcite-space-lg) + var(--internal-attribution-height));width:fit-content;height:100%}.navigation{width:fit-content;display:flex;align-items:center;background-color:var(--calcite-color-surface-2);box-shadow:var(--arcgis-internal-box-shadow);pointer-events:auto}.navigation-slide-list-container{position:relative;height:100%;min-height:0;margin-block-start:var(--calcite-space-lg)}.slide-list-action-container{height:100%;align-content:center;border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.slide-list-action{padding-inline:var(--calcite-space-sm)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-space-base)}.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;min-width:var(--calcite-spacing-md);text-align:center}.legend-container{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:auto;max-height:calc(100vh - 136px);overflow:hidden auto}.legend{padding:var(--esri-widget-padding);background-color:var(--calcite-color-surface-2)}`;
|
|
25
|
+
var Y = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, o = (i, e, t, s) => {
|
|
26
|
+
for (var n = s > 1 ? void 0 : s ? Z(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
26
27
|
(a = i[r]) && (n = (s ? a(e, t, n) : a(n)) || n);
|
|
27
|
-
return s && n &&
|
|
28
|
+
return s && n && Y(e, t, n), n;
|
|
28
29
|
};
|
|
29
|
-
let
|
|
30
|
+
let l = class extends H {
|
|
30
31
|
//endregion
|
|
31
32
|
//#region Lifecycle
|
|
32
33
|
constructor(i) {
|
|
@@ -102,7 +103,7 @@ let o = class extends E {
|
|
|
102
103
|
navigateInPresentation(i) {
|
|
103
104
|
const e = this.slideIndex + i;
|
|
104
105
|
let t = this._getSlideBySlideIndex(e);
|
|
105
|
-
t ??= this._getSlideBySlideIndex(0), t && this.
|
|
106
|
+
t ??= this._getSlideBySlideIndex(0), t && this.applySlide(t);
|
|
106
107
|
}
|
|
107
108
|
captureArrowKeysForNavigation(i, e) {
|
|
108
109
|
const t = ["ArrowLeft", "ArrowRight", "PageUp", "PageDown"];
|
|
@@ -125,6 +126,17 @@ let o = class extends E {
|
|
|
125
126
|
getSlideBySlideId(i) {
|
|
126
127
|
return this.visibleSlides.find((e) => e.id === i);
|
|
127
128
|
}
|
|
129
|
+
async applySlide(i, e, t) {
|
|
130
|
+
if (this.view) {
|
|
131
|
+
const s = t ? { signal: t?.signal } : {};
|
|
132
|
+
await k(
|
|
133
|
+
i.applyTo(this.view, {
|
|
134
|
+
...s,
|
|
135
|
+
animate: !e
|
|
136
|
+
})
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
128
140
|
//#endregion
|
|
129
141
|
//#region Private Methods
|
|
130
142
|
_getSlideBySlideIndex(i) {
|
|
@@ -133,14 +145,11 @@ let o = class extends E {
|
|
|
133
145
|
}
|
|
134
146
|
async _applySlideById(i) {
|
|
135
147
|
const e = i ? this.getSlideBySlideId(i) : void 0;
|
|
136
|
-
e && await this.
|
|
137
|
-
}
|
|
138
|
-
async _applySlide(i) {
|
|
139
|
-
this.view && await H(i.applyTo(this.view));
|
|
148
|
+
e && await this.applySlide(e);
|
|
140
149
|
}
|
|
141
150
|
_startWatchSlides() {
|
|
142
151
|
this._subscribeToSlideEvents(this.slides), this.addHandles(
|
|
143
|
-
|
|
152
|
+
D(
|
|
144
153
|
() => this.slides,
|
|
145
154
|
"change",
|
|
146
155
|
(i) => {
|
|
@@ -164,58 +173,58 @@ let o = class extends E {
|
|
|
164
173
|
}
|
|
165
174
|
//#endregion
|
|
166
175
|
};
|
|
167
|
-
|
|
176
|
+
o([
|
|
168
177
|
d()
|
|
169
|
-
],
|
|
170
|
-
|
|
178
|
+
], l.prototype, "_slideId", 2);
|
|
179
|
+
o([
|
|
171
180
|
d()
|
|
172
|
-
],
|
|
173
|
-
|
|
181
|
+
], l.prototype, "view", 2);
|
|
182
|
+
o([
|
|
174
183
|
d()
|
|
175
|
-
],
|
|
176
|
-
|
|
184
|
+
], l.prototype, "slideId", 1);
|
|
185
|
+
o([
|
|
177
186
|
d()
|
|
178
|
-
],
|
|
179
|
-
|
|
187
|
+
], l.prototype, "transitionActive", 2);
|
|
188
|
+
o([
|
|
180
189
|
d()
|
|
181
|
-
],
|
|
182
|
-
|
|
190
|
+
], l.prototype, "showLegend", 2);
|
|
191
|
+
o([
|
|
183
192
|
d()
|
|
184
|
-
],
|
|
185
|
-
|
|
193
|
+
], l.prototype, "keyboardNavigationEnabled", 2);
|
|
194
|
+
o([
|
|
186
195
|
d()
|
|
187
|
-
],
|
|
188
|
-
|
|
196
|
+
], l.prototype, "visibleSlides", 1);
|
|
197
|
+
o([
|
|
189
198
|
d()
|
|
190
|
-
],
|
|
191
|
-
|
|
199
|
+
], l.prototype, "slides", 1);
|
|
200
|
+
o([
|
|
192
201
|
d()
|
|
193
|
-
],
|
|
194
|
-
|
|
202
|
+
], l.prototype, "lastSlideSelected", 1);
|
|
203
|
+
o([
|
|
195
204
|
d()
|
|
196
|
-
],
|
|
197
|
-
|
|
205
|
+
], l.prototype, "firstSlideSelected", 1);
|
|
206
|
+
o([
|
|
198
207
|
d()
|
|
199
|
-
],
|
|
200
|
-
|
|
208
|
+
], l.prototype, "slideSelected", 1);
|
|
209
|
+
o([
|
|
201
210
|
d()
|
|
202
|
-
],
|
|
203
|
-
|
|
211
|
+
], l.prototype, "hasOnlyOneSlide", 1);
|
|
212
|
+
o([
|
|
204
213
|
d()
|
|
205
|
-
],
|
|
206
|
-
|
|
214
|
+
], l.prototype, "onApplySlideStart", 2);
|
|
215
|
+
o([
|
|
207
216
|
d()
|
|
208
|
-
],
|
|
209
|
-
|
|
217
|
+
], l.prototype, "onApplySlideComplete", 2);
|
|
218
|
+
o([
|
|
210
219
|
d()
|
|
211
|
-
],
|
|
212
|
-
|
|
220
|
+
], l.prototype, "onApplySlideCancel", 2);
|
|
221
|
+
o([
|
|
213
222
|
d()
|
|
214
|
-
],
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
],
|
|
218
|
-
class
|
|
223
|
+
], l.prototype, "getSlideIndexBySlideId", 1);
|
|
224
|
+
l = o([
|
|
225
|
+
N("components.presentation.PresentationViewModel")
|
|
226
|
+
], l);
|
|
227
|
+
class ee extends P {
|
|
219
228
|
constructor(e) {
|
|
220
229
|
super(e);
|
|
221
230
|
}
|
|
@@ -262,8 +271,8 @@ class Y extends C {
|
|
|
262
271
|
if (!c || !this._layerTypeSupportsCapturePopup(c))
|
|
263
272
|
return { success: !1, features: s };
|
|
264
273
|
if (s = await this._fetchFeaturesFromQueryable(e, t, r, a, c), s && this._featureHasBeenFilledWithAttributes(s)) {
|
|
265
|
-
const
|
|
266
|
-
return this._setFallbackPopupTemplate(
|
|
274
|
+
const h = s[0];
|
|
275
|
+
return this._setFallbackPopupTemplate(h, a, r), this._setFallbackGeometry(h, t?.location), { success: !0, features: s, popupInfo: t };
|
|
267
276
|
}
|
|
268
277
|
return { success: !1, features: s };
|
|
269
278
|
}
|
|
@@ -286,11 +295,11 @@ class Y extends C {
|
|
|
286
295
|
return await Promise.resolve([]);
|
|
287
296
|
const c = await e.whenLayerView(s);
|
|
288
297
|
await _(() => !c.updating);
|
|
289
|
-
const
|
|
290
|
-
await _(() => !
|
|
291
|
-
const
|
|
292
|
-
let x = await
|
|
293
|
-
return this._featureHasBeenFilledWithAttributes(x) || (await _(() => !e.updating), x = await
|
|
298
|
+
const p = this._tryGetBuildingComponentSublayerView(s, n, c) ?? c;
|
|
299
|
+
await _(() => !p.updating);
|
|
300
|
+
const y = this._createFeatureGraphic(s, n, r, a.id);
|
|
301
|
+
let x = await A(p, [y]);
|
|
302
|
+
return this._featureHasBeenFilledWithAttributes(x) || (await _(() => !e.updating), x = await A(p, [y])), x;
|
|
294
303
|
}
|
|
295
304
|
_tryGetBuildingComponentSublayerView(e, t, s) {
|
|
296
305
|
let n;
|
|
@@ -313,23 +322,23 @@ class Y extends C {
|
|
|
313
322
|
e.geometry == null && t && (e.geometry = t.clone());
|
|
314
323
|
}
|
|
315
324
|
_createFeatureGraphic(e, t, s, n) {
|
|
316
|
-
const r = this._getGlobalIdFieldNameFromLayer(s), a = n.type === "global-id" && r ? r : s.objectIdField, c = this._getGraphicOrigin(e, t),
|
|
317
|
-
return
|
|
325
|
+
const r = this._getGlobalIdFieldNameFromLayer(s), a = n.type === "global-id" && r ? r : s.objectIdField, c = this._getGraphicOrigin(e, t), h = new V({ attributes: {}, layer: e, origin: c });
|
|
326
|
+
return h.attributes[a] = n.value, h;
|
|
318
327
|
}
|
|
319
328
|
_getGraphicOrigin(e, t) {
|
|
320
329
|
switch (e.type) {
|
|
321
330
|
case "csv":
|
|
322
|
-
return new
|
|
331
|
+
return new j(e);
|
|
323
332
|
case "feature":
|
|
324
|
-
return new
|
|
333
|
+
return new q(e);
|
|
325
334
|
case "geojson":
|
|
326
|
-
return new
|
|
335
|
+
return new W(e);
|
|
327
336
|
case "scene":
|
|
328
337
|
return new K(e);
|
|
329
338
|
case "wfs":
|
|
330
|
-
return new
|
|
339
|
+
return new U(e);
|
|
331
340
|
case "building-scene":
|
|
332
|
-
return t ? new
|
|
341
|
+
return t ? new Q(t) : void 0;
|
|
333
342
|
default:
|
|
334
343
|
return;
|
|
335
344
|
}
|
|
@@ -338,7 +347,7 @@ class Y extends C {
|
|
|
338
347
|
return e != null && ["csv", "feature", "geojson", "wfs", "scene", "building-component"].includes(e.type);
|
|
339
348
|
}
|
|
340
349
|
_isLayer(e) {
|
|
341
|
-
return !!e && e instanceof
|
|
350
|
+
return !!e && e instanceof M;
|
|
342
351
|
}
|
|
343
352
|
_isBuildingSceneLayer(e) {
|
|
344
353
|
return e?.type === "building-scene";
|
|
@@ -348,28 +357,28 @@ class Y extends C {
|
|
|
348
357
|
}
|
|
349
358
|
//#endregion
|
|
350
359
|
}
|
|
351
|
-
const
|
|
352
|
-
topCenter: { ...
|
|
353
|
-
topLeft: { ...
|
|
354
|
-
topRight: { ...
|
|
355
|
-
bottomCenter: { ...
|
|
356
|
-
bottomLeft: { ...
|
|
357
|
-
bottomRight: { ...
|
|
358
|
-
}),
|
|
360
|
+
const te = (i) => new ee(i), m = Object.freeze({ width: 0, height: 0 }), b = /* @__PURE__ */ new WeakMap(), f = () => ({
|
|
361
|
+
topCenter: { ...m },
|
|
362
|
+
topLeft: { ...m },
|
|
363
|
+
topRight: { ...m },
|
|
364
|
+
bottomCenter: { ...m },
|
|
365
|
+
bottomLeft: { ...m },
|
|
366
|
+
bottomRight: { ...m }
|
|
367
|
+
}), $ = (i) => ({
|
|
359
368
|
topCenter: { ...i.topCenter },
|
|
360
369
|
topLeft: { ...i.topLeft },
|
|
361
370
|
topRight: { ...i.topRight },
|
|
362
371
|
bottomCenter: { ...i.bottomCenter },
|
|
363
372
|
bottomLeft: { ...i.bottomLeft },
|
|
364
373
|
bottomRight: { ...i.bottomRight }
|
|
365
|
-
}),
|
|
374
|
+
}), F = (i) => {
|
|
366
375
|
let e = b.get(i);
|
|
367
376
|
return e || (e = {
|
|
368
377
|
observedGroups: /* @__PURE__ */ new Map(),
|
|
369
|
-
observedSizes:
|
|
378
|
+
observedSizes: f(),
|
|
370
379
|
subscribers: /* @__PURE__ */ new Set()
|
|
371
380
|
}, b.set(i, e)), e;
|
|
372
|
-
},
|
|
381
|
+
}, ie = (i) => {
|
|
373
382
|
const e = i?.topCenter.value, t = i?.topLeft.value, s = i?.topRight.value, n = i?.bottomCenter.value, r = i?.bottomLeft.value, a = i?.bottomRight.value;
|
|
374
383
|
return e && t && s && n && r && a ? {
|
|
375
384
|
topCenter: e,
|
|
@@ -379,46 +388,46 @@ const Z = (i) => new Y(i), S = Object.freeze({ width: 0, height: 0 }), b = /* @_
|
|
|
379
388
|
bottomLeft: r,
|
|
380
389
|
bottomRight: a
|
|
381
390
|
} : null;
|
|
382
|
-
},
|
|
383
|
-
const e =
|
|
391
|
+
}, se = (i, e) => I.every((t) => i.get(t) === e[t]), ne = (i) => {
|
|
392
|
+
const e = $(i.observedSizes);
|
|
384
393
|
i.subscribers.forEach((t) => t(e));
|
|
385
|
-
},
|
|
394
|
+
}, re = (i, e) => {
|
|
386
395
|
const t = b.get(i);
|
|
387
396
|
if (!t)
|
|
388
397
|
return;
|
|
389
398
|
let s = !1;
|
|
390
399
|
e.forEach((n) => {
|
|
391
|
-
const r = I.find((
|
|
400
|
+
const r = I.find((y) => t.observedGroups.get(y) === n.target);
|
|
392
401
|
if (!r)
|
|
393
402
|
return;
|
|
394
|
-
const { width: a, height: c } = n.contentRect,
|
|
395
|
-
|
|
396
|
-
}), s &&
|
|
397
|
-
},
|
|
398
|
-
const t =
|
|
403
|
+
const { width: a, height: c } = n.contentRect, h = { width: a, height: c }, p = t.observedSizes[r];
|
|
404
|
+
p.width === h.width && p.height === h.height || (t.observedSizes[r] = h, s = !0);
|
|
405
|
+
}), s && ne(t);
|
|
406
|
+
}, L = (i, e) => {
|
|
407
|
+
const t = F(i);
|
|
399
408
|
t.resizeObserver || (t.resizeObserver = new ResizeObserver((n) => {
|
|
400
|
-
|
|
409
|
+
re(i, n);
|
|
401
410
|
}));
|
|
402
|
-
const s =
|
|
411
|
+
const s = ie(e);
|
|
403
412
|
if (!s) {
|
|
404
413
|
t.observedGroups.size > 0 && (t.resizeObserver.disconnect(), t.observedGroups.clear());
|
|
405
414
|
return;
|
|
406
415
|
}
|
|
407
|
-
|
|
416
|
+
se(t.observedGroups, s) || (t.resizeObserver.disconnect(), t.observedGroups.clear(), I.forEach((n) => {
|
|
408
417
|
const r = s[n];
|
|
409
418
|
t.observedGroups.set(n, r), t.resizeObserver?.observe(r);
|
|
410
419
|
}));
|
|
411
|
-
},
|
|
412
|
-
const t =
|
|
413
|
-
return t.subscribers.add(e), e(
|
|
420
|
+
}, ae = (i, e) => {
|
|
421
|
+
const t = F(i);
|
|
422
|
+
return t.subscribers.add(e), e($(t.observedSizes)), () => {
|
|
414
423
|
const s = b.get(i);
|
|
415
424
|
s && (s.subscribers.delete(e), s.subscribers.size === 0 && (s.resizeObserver?.disconnect(), s.observedGroups.clear(), b.delete(i)));
|
|
416
425
|
};
|
|
417
426
|
};
|
|
418
|
-
class
|
|
427
|
+
class le extends P {
|
|
419
428
|
// References to the slot group elements owned by the host component.
|
|
420
|
-
#t;
|
|
421
429
|
#e;
|
|
430
|
+
#t;
|
|
422
431
|
#i;
|
|
423
432
|
/**
|
|
424
433
|
* Creates a controller that measures the host component's slot group containers.
|
|
@@ -426,24 +435,24 @@ class re extends C {
|
|
|
426
435
|
* @param component The host component that owns the slot group elements.
|
|
427
436
|
*/
|
|
428
437
|
constructor(e) {
|
|
429
|
-
super(e), this.exports =
|
|
438
|
+
super(e), this.exports = f();
|
|
430
439
|
}
|
|
431
440
|
hostDisconnected() {
|
|
432
|
-
this.#i?.(), this.#i = void 0, this.#
|
|
441
|
+
this.#i?.(), this.#i = void 0, this.#t = void 0, this.#e = void 0, this.exports = f();
|
|
433
442
|
}
|
|
434
443
|
hostLifecycle() {
|
|
435
444
|
return [
|
|
436
445
|
u(
|
|
437
446
|
() => this.#s(),
|
|
438
447
|
(t) => {
|
|
439
|
-
if (this.#
|
|
440
|
-
if (this.#i?.(), this.#i = void 0, this.#
|
|
441
|
-
this.exports =
|
|
448
|
+
if (this.#t !== t) {
|
|
449
|
+
if (this.#i?.(), this.#i = void 0, this.#t = t, this.#e = t?.slotGroupRefs, !t) {
|
|
450
|
+
this.exports = f();
|
|
442
451
|
return;
|
|
443
452
|
}
|
|
444
|
-
this.#i =
|
|
453
|
+
this.#i = ae(t, (s) => {
|
|
445
454
|
this.#n(s) || (this.exports = s);
|
|
446
|
-
}),
|
|
455
|
+
}), L(t, this.#e);
|
|
447
456
|
}
|
|
448
457
|
},
|
|
449
458
|
{ sync: !0, initial: !0 }
|
|
@@ -451,7 +460,7 @@ class re extends C {
|
|
|
451
460
|
u(
|
|
452
461
|
() => this.#s()?.slotGroupRefs,
|
|
453
462
|
(t) => {
|
|
454
|
-
this.#
|
|
463
|
+
this.#e = t, this.#t && t && L(this.#t, t);
|
|
455
464
|
},
|
|
456
465
|
{ sync: !0, initial: !0 }
|
|
457
466
|
)
|
|
@@ -462,109 +471,141 @@ class re extends C {
|
|
|
462
471
|
return e && typeof e != "string" ? e : void 0;
|
|
463
472
|
}
|
|
464
473
|
hostUpdated() {
|
|
465
|
-
!this.#
|
|
474
|
+
!this.#t || !this.#e || L(this.#t, this.#e);
|
|
466
475
|
}
|
|
467
476
|
// Compares the newly measured sizes against the currently exported values.
|
|
468
477
|
#n(e) {
|
|
469
|
-
const t = this.exports ??
|
|
478
|
+
const t = this.exports ?? f();
|
|
470
479
|
return I.every((s) => {
|
|
471
480
|
const n = t[s], r = e[s];
|
|
472
481
|
return n.width === r.width && n.height === r.height;
|
|
473
482
|
});
|
|
474
483
|
}
|
|
475
484
|
}
|
|
476
|
-
const
|
|
477
|
-
class
|
|
485
|
+
const oe = E(le), de = T(l);
|
|
486
|
+
class ce extends G {
|
|
478
487
|
constructor() {
|
|
479
|
-
super(...arguments), this._messages =
|
|
480
|
-
this.
|
|
481
|
-
}, this
|
|
482
|
-
this.
|
|
483
|
-
}, this
|
|
484
|
-
this.
|
|
485
|
-
}, this
|
|
486
|
-
this.arcgisSlideApplyCancel.emit({ slide: e });
|
|
487
|
-
}, this
|
|
488
|
+
super(...arguments), this._messages = R(), this.#e = de(this), this.#t = B(), this.#s = (e) => {
|
|
489
|
+
this.#e.captureArrowKeysForNavigation(e, this.#t);
|
|
490
|
+
}, this.#n = te(this), this.#a = null, this.#o = (e) => {
|
|
491
|
+
this.#n.closePopup(), this.arcgisSlideApplyStart.emit({ slide: e });
|
|
492
|
+
}, this.#d = (e) => {
|
|
493
|
+
this.#n.openPopup(e), this.sliceAnalysisInteractive && this.#e.setSliceAnalysisInteractive(!0), this.arcgisSlideApplyComplete.emit({ slide: e });
|
|
494
|
+
}, this.#c = (e) => {
|
|
495
|
+
this.sliceAnalysisInteractive && this.#e.setSliceAnalysisInteractive(!0), this.arcgisSlideApplyCancel.emit({ slide: e });
|
|
496
|
+
}, this.#h = (e) => {
|
|
497
|
+
const t = e.detail?.selectedSlide;
|
|
498
|
+
if (!t)
|
|
499
|
+
return;
|
|
500
|
+
this.#r?.abort(), this.#r = new AbortController();
|
|
501
|
+
const s = Date.now(), n = this.#a !== null && s - this.#a < C;
|
|
502
|
+
if (this.#a = s, this.#e.applySlide(t, n, this.#r), n) {
|
|
503
|
+
this._showSlideList = !1;
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
setTimeout(() => {
|
|
507
|
+
this.#r?.signal.aborted || (this._showSlideList = !1, this.#e.applySlide(t, !1, this.#r));
|
|
508
|
+
}, C);
|
|
509
|
+
}, this.#l = () => {
|
|
510
|
+
this._showSlideList = !1;
|
|
511
|
+
}, this._showSlideList = !1, this.autoDestroyDisabled = !1, this.view = this.#e.view, this.visualScale = "m", this.keyboardNavigationEnabled = !1, this.slidePopupDisabled = !1, this.slideCaptionsDisabled = !1, this.slideLegendDisabled = !1, this.sliceAnalysisInteractive = !1, this.navigationHidden = !1, this.arcgisPopupFeatureNotFound = v(), this.arcgisPopupFeaturesRetrieved = v(), this.arcgisReady = v(), this.arcgisSlideApplyCancel = v(), this.arcgisSlideApplyComplete = v(), this.arcgisSlideApplyStart = v();
|
|
488
512
|
}
|
|
489
513
|
static {
|
|
490
|
-
this.properties = { _slotSizesController: 16,
|
|
514
|
+
this.properties = { _slotSizesController: 16, _showSlideList: 16, slideId: 1, autoDestroyDisabled: 5, view: 0, visualScale: 1, keyboardNavigationEnabled: 5, slidePopupDisabled: 5, slideCaptionsDisabled: 5, slideLegendDisabled: 5, sliceAnalysisInteractive: 5, navigationHidden: 5 };
|
|
491
515
|
}
|
|
492
516
|
static {
|
|
493
|
-
this.styles =
|
|
517
|
+
this.styles = X;
|
|
494
518
|
}
|
|
519
|
+
#e;
|
|
520
|
+
#t;
|
|
521
|
+
#i;
|
|
522
|
+
#s;
|
|
523
|
+
#n;
|
|
524
|
+
#r;
|
|
525
|
+
#a;
|
|
526
|
+
#o;
|
|
527
|
+
#d;
|
|
528
|
+
#c;
|
|
529
|
+
#h;
|
|
530
|
+
#l;
|
|
531
|
+
#u;
|
|
532
|
+
#p;
|
|
495
533
|
get slideId() {
|
|
496
|
-
return this.
|
|
534
|
+
return this.#e.slideId;
|
|
497
535
|
}
|
|
498
536
|
set slideId(e) {
|
|
499
|
-
this.
|
|
537
|
+
this.#e.slideId = e;
|
|
500
538
|
}
|
|
501
539
|
async destroy() {
|
|
502
540
|
await this.manager.destroy();
|
|
503
541
|
}
|
|
504
542
|
loaded() {
|
|
505
|
-
this.
|
|
543
|
+
this.#e.onApplySlideStart = this.#o, this.#e.onApplySlideComplete = this.#d, this.#e.onApplySlideCancel = this.#c, this.#m();
|
|
506
544
|
const e = this;
|
|
507
545
|
this.manager.onLifecycle(() => [
|
|
508
546
|
u(() => this.slidePopupDisabled, (t) => {
|
|
509
547
|
if (this.slideId && !t) {
|
|
510
|
-
const s = this.
|
|
511
|
-
s && this
|
|
512
|
-
} else t && this
|
|
548
|
+
const s = this.#e.getSlideBySlideId(this.slideId);
|
|
549
|
+
s && this.#n?.openPopup(s);
|
|
550
|
+
} else t && this.#n?.closePopup(!0);
|
|
513
551
|
}),
|
|
514
552
|
u(() => this.sliceAnalysisInteractive, (t) => {
|
|
515
|
-
this.
|
|
553
|
+
this.#e.setSliceAnalysisInteractive(t);
|
|
516
554
|
}, { initial: !0 }),
|
|
517
555
|
u(() => e.referenceElement, (t) => {
|
|
518
|
-
this
|
|
556
|
+
this.#g(t) && (this._slotSizesController = oe(this), this.#p = this.#v());
|
|
519
557
|
}, { once: !0, initial: !0 }),
|
|
520
558
|
{
|
|
521
559
|
remove: () => {
|
|
522
|
-
document.removeEventListener("keydown", this
|
|
560
|
+
document.removeEventListener("keydown", this.#s), this.#u?.removeEventListener("arcgisSlideListClose", this.#l), this.#i?.remove(), this.#p?.remove(), this.#r?.abort();
|
|
523
561
|
}
|
|
524
562
|
}
|
|
525
563
|
]);
|
|
526
564
|
}
|
|
527
|
-
|
|
565
|
+
#g(e) {
|
|
528
566
|
return e === void 0 || typeof e == "string" ? !1 : "tagName" in e && e.tagName === "ARCGIS-SCENE";
|
|
529
567
|
}
|
|
530
|
-
|
|
531
|
-
return u(() => this._slotSizesController, (e) => this
|
|
568
|
+
#v() {
|
|
569
|
+
return u(() => this._slotSizesController, (e) => this.#S(e?.topLeft, e?.topRight, e?.bottomLeft, e?.bottomRight), { initial: !0 });
|
|
532
570
|
}
|
|
533
|
-
|
|
534
|
-
const r = this
|
|
535
|
-
r > 0 ? this.el.style.setProperty("--arcgis-internal-presentation-padding-start", `calc(var(--calcite-
|
|
536
|
-
const
|
|
537
|
-
this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top",
|
|
571
|
+
#S(e, t, s, n) {
|
|
572
|
+
const r = this.#t === "ltr" ? e?.width ?? 0 : t?.width ?? 0, a = this.#t === "ltr" ? t?.width ?? 0 : e?.width ?? 0, c = Math.max(e?.height ?? 0, t?.height ?? 0), h = Math.max(s?.height ?? 0, n?.height ?? 0);
|
|
573
|
+
r > 0 ? this.el.style.setProperty("--arcgis-internal-presentation-padding-start", `calc(var(--calcite-space-lg) + ${r.toString()}px)`) : this.el.style.setProperty("--arcgis-internal-presentation-padding-start", "0px"), a > 0 ? this.el.style.setProperty("--arcgis-internal-presentation-padding-end", `calc(var(--calcite-space-lg) + ${a.toString()}px)`) : this.el.style.setProperty("--arcgis-internal-presentation-padding-end", "0px");
|
|
574
|
+
const p = r <= Math.max(c, h) && a <= Math.max(c, h);
|
|
575
|
+
this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top", p ? "0" : `${c}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom", p ? "0" : `${h}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start", p ? `${r}px` : "0"), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end", p ? `${a}px` : "0");
|
|
538
576
|
}
|
|
539
|
-
|
|
540
|
-
this
|
|
541
|
-
document.removeEventListener("keydown", this
|
|
577
|
+
#m() {
|
|
578
|
+
this.#i = u(() => this.keyboardNavigationEnabled, (e) => {
|
|
579
|
+
document.removeEventListener("keydown", this.#s), e && document.addEventListener("keydown", this.#s);
|
|
542
580
|
}, { initial: !0 });
|
|
543
581
|
}
|
|
544
582
|
render() {
|
|
545
|
-
if (this
|
|
583
|
+
if (this.#e?.visibleSlides?.length === 0)
|
|
546
584
|
return g`<div></div>`;
|
|
547
|
-
const e = this.
|
|
585
|
+
const e = this.#e.visibleSlides.find((r) => r.id === this.slideId), t = this.#f(), s = this.#y(e), n = this.#w();
|
|
548
586
|
return g`<div class="root"><div class="presentation-content">${s}${n}</div>${t}</div>`;
|
|
549
587
|
}
|
|
550
|
-
|
|
588
|
+
#f() {
|
|
551
589
|
if (this.navigationHidden)
|
|
552
590
|
return null;
|
|
553
|
-
const e = this.
|
|
554
|
-
return g`<div class="navigation"><calcite-button appearance=transparent icon-start=${s ??
|
|
591
|
+
const e = this.#e.lastSlideSelected && !this.#e.hasOnlyOneSlide, t = this.#t === "rtl", s = t ? "chevron-right" : "chevron-left", n = t ? "chevron-left" : "chevron-right", r = this.#_();
|
|
592
|
+
return g`<div class="navigation-container"><div class="navigation-slide-list-container">${r}</div><div class="navigation"><div class="slide-list-action-container"><calcite-action id=${J} class="slide-list-action" .text=${this._messages.slideList ?? ""} selection-appearance=highlight icon=list .scale=${this.visualScale === "l" ? "m" : "s"} .label=${this._messages.slideList} title=${this._messages.slideList ?? S} .active=${this._showSlideList} @click=${() => this._showSlideList = !this._showSlideList}></calcite-action></div><calcite-button appearance=transparent icon-start=${s ?? S} icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .disabled=${this.#e.firstSlideSelected || !this.#e.slideSelected} .label=${this._messages.previous} title=${this._messages.previous ?? S} @click=${() => this.#e.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this.#b()}</div><calcite-button appearance=transparent icon-start=${(e ? "reset" : n) ?? S} icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .label=${e ? this._messages.restart : this._messages.next} title=${(e ? this._messages.restart : this._messages.next) ?? S} @click=${() => this.#e.navigateInPresentation(1)}></calcite-button></div></div>`;
|
|
593
|
+
}
|
|
594
|
+
#b() {
|
|
595
|
+
const e = this.#e.slideIndex + 1, t = this._messages?.slideNavAriaText?.replace("${index}", e.toString()).replace("${numberOfSlides}", this.#e.visibleSlides.length.toString());
|
|
596
|
+
return this.#e.slideSelected ? g`<p role=banner aria-label=${t ?? S} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div>/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides.length}</p></p>` : g`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides?.length} ${this._messages?.slides}</p>`;
|
|
555
597
|
}
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
return this.viewModel.slideSelected ? g`<p role=banner aria-label=${t ?? y} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div class="slide-counter-text-element">/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this.viewModel.visibleSlides.length}</p></p>` : g`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.viewModel.visibleSlides?.length} ${this._messages?.slides}</p>`;
|
|
598
|
+
#y(e) {
|
|
599
|
+
return this.slideCaptionsDisabled ? null : g`<arcgis-presentation-captions .slide=${e} .transitionActive=${this.#e.transitionActive}></arcgis-presentation-captions>`;
|
|
559
600
|
}
|
|
560
|
-
|
|
561
|
-
return this.
|
|
601
|
+
#w() {
|
|
602
|
+
return this.slideLegendDisabled || !this.#e.showLegend ? null : g`<calcite-panel data-testid=presentation-legend class="legend-container" .heading=${this._messages.legend} closable @calcitePanelClose=${() => this.#e.showLegend = !1}><arcgis-legend class="legend" .view=${this.view} @arcgisReady=${(e) => e.stopPropagation()}></arcgis-legend></calcite-panel>`;
|
|
562
603
|
}
|
|
563
|
-
|
|
564
|
-
return this.
|
|
604
|
+
#_() {
|
|
605
|
+
return this._showSlideList ? g`<arcgis-presentation-slide-list .slides=${this.#e.visibleSlides} .slideId=${this.#e.slideId} .label=${this._messages.slideList} .visualScale=${this.visualScale} @arcgisSlideListItemSelected=${this.#h} @arcgisSlideListOutsideClick=${this.#l}></arcgis-presentation-slide-list>` : null;
|
|
565
606
|
}
|
|
566
607
|
}
|
|
567
|
-
|
|
608
|
+
O("arcgis-presentation", ce);
|
|
568
609
|
export {
|
|
569
|
-
|
|
610
|
+
ce as ArcgisPresentation
|
|
570
611
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-action";
|
|
1
2
|
import "@esri/calcite-components/components/calcite-button";
|
|
2
3
|
import "../arcgis-presentation-captions/index.js";
|
|
3
4
|
import "@esri/calcite-components/components/calcite-panel";
|
|
4
5
|
import "../arcgis-legend/index.js";
|
|
6
|
+
import "../arcgis-presentation-slide-list/index.js";
|
|
5
7
|
export * from "./customElement.js";
|