@arcgis/map-components 5.2.0-next.22 → 5.2.0-next.24
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/{BXK5DVDN.js → 4BJSMXKG.js} +1 -1
- package/dist/cdn/5RXWVXJA.js +2 -0
- package/dist/cdn/BGWYOIKY.js +2 -0
- package/dist/cdn/BV6DN77M.js +2 -0
- package/dist/cdn/CXHORYLL.js +2 -0
- package/dist/cdn/{MJ2AUX7N.js → F7ZQA7S5.js} +1 -1
- package/dist/cdn/{HFDHHI2B.js → FHL4L2ZY.js} +1 -1
- package/dist/cdn/{2BESNRQI.js → FPX4MV2U.js} +1 -1
- package/dist/cdn/IXWSTLNL.js +2 -0
- package/dist/cdn/KLKFMZ7U.js +2 -0
- package/dist/cdn/NR6V3DTH.js +2 -0
- package/dist/cdn/P3U6DQN6.js +2 -0
- package/dist/cdn/{UA3OPWND.js → PGCAY24R.js} +1 -1
- package/dist/cdn/{T5KVNE3U.js → PKBVONJW.js} +1 -1
- package/dist/cdn/{Z257GCMR.js → Q4PNCUBK.js} +1 -1
- package/dist/cdn/{XVNU3EUN.js → UCEBZVNP.js} +1 -1
- package/dist/cdn/{XPD6NXPE.js → UGOZSFW2.js} +1 -1
- package/dist/cdn/VRWFDVP6.js +2 -0
- package/dist/cdn/VZVNKP6W.js +2 -0
- package/dist/cdn/ZAYZVEUD.js +2 -0
- package/dist/cdn/assets/basemap-layer-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/catalog-layer-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/table-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-list-item-indicator.js +1 -1
- package/dist/chunks/layer-list-item.js +6 -0
- package/dist/chunks/layer-list-utils.js +6 -6
- package/dist/chunks/slots.js +1 -1
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +241 -0
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +329 -0
- package/dist/components/arcgis-basemap-layer-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-basemap-layer-list-next/index.js +14 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +179 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +263 -0
- package/dist/components/arcgis-catalog-layer-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-catalog-layer-list-next/index.js +10 -0
- package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +6 -0
- package/dist/components/arcgis-directions/customElement.d.ts +1 -0
- package/dist/components/arcgis-expand/customElement.js +1 -1
- package/dist/components/arcgis-feature-table/customElement.js +17 -17
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +67 -66
- package/dist/components/arcgis-layer-list-next/index.js +2 -2
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +1 -1
- package/dist/components/arcgis-presentation/customElement.d.ts +18 -0
- package/dist/components/arcgis-presentation/customElement.js +90 -88
- package/dist/components/arcgis-search/customElement.d.ts +6 -1
- package/dist/components/arcgis-table-list-next/customElement.d.ts +235 -0
- package/dist/components/arcgis-table-list-next/customElement.js +200 -0
- package/dist/components/arcgis-table-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-table-list-next/index.js +7 -0
- 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 +30 -0
- package/dist/loader.js +3 -0
- package/dist/types/lumina.d.ts +28 -0
- package/dist/types/preact.d.ts +31 -0
- package/dist/types/react.d.ts +34 -0
- package/dist/types/stencil.d.ts +28 -0
- package/dist/utils/layer-list-utils.d.ts +10 -0
- package/package.json +4 -4
- package/dist/cdn/BMJ6NYIZ.js +0 -2
- package/dist/cdn/QJSXXDUJ.js +0 -2
- package/dist/cdn/SFSNTAYE.js +0 -2
- package/dist/cdn/VIVVY7GT.js +0 -2
- package/dist/cdn/WLMFCIBM.js +0 -2
- package/dist/cdn/XTGCV3LY.js +0 -2
- /package/dist/cdn/{T4OPNOZJ.js → OTZMVWAB.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as O } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as z, html as u } from "lit";
|
|
4
|
-
import { GenericController as
|
|
5
|
-
import { LitElement as R, createEvent as
|
|
4
|
+
import { GenericController as P, proxyExports as M, useDirection as $ } from "@arcgis/lumina/controllers";
|
|
5
|
+
import { LitElement as R, createEvent as g, nothing as m } from "@arcgis/lumina";
|
|
6
6
|
import { u as G } from "../../chunks/useT9n.js";
|
|
7
7
|
import { m as N } from "../../chunks/useViewModel.js";
|
|
8
8
|
import { property as d, subclass as B } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
9
9
|
import E from "@arcgis/core/core/Accessor.js";
|
|
10
|
-
import
|
|
10
|
+
import _ from "@arcgis/core/core/Collection.js";
|
|
11
11
|
import { ignoreAbortErrors as T } from "@arcgis/core/core/promiseUtils.js";
|
|
12
|
-
import { watch as
|
|
12
|
+
import { watch as S, on as D, whenOnce as y } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
13
|
import H from "@arcgis/core/Graphic.js";
|
|
14
14
|
import V from "@arcgis/core/layers/Layer.js";
|
|
15
15
|
import k from "@arcgis/core/graphic/CSVGraphicOrigin.js";
|
|
@@ -18,15 +18,15 @@ import W from "@arcgis/core/graphic/SceneGraphicOrigin.js";
|
|
|
18
18
|
import K from "@arcgis/core/graphic/WFSGraphicOrigin.js";
|
|
19
19
|
import U from "@arcgis/core/graphic/BuildingGraphicOrigin.js";
|
|
20
20
|
import Q from "@arcgis/core/graphic/FeatureGraphicOrigin.js";
|
|
21
|
-
import { fetchPopupFeaturesFromGraphics as
|
|
22
|
-
import { s as
|
|
21
|
+
import { fetchPopupFeaturesFromGraphics as C } from "@arcgis/core/applications/SceneViewer/sceneViewerUtils.js";
|
|
22
|
+
import { s as x } from "../../chunks/resources.js";
|
|
23
23
|
const q = z`:host{width:100%;height:100%;padding:var(--calcite-spacing-none);margin:var(--calcite-spacing-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{display:flex;width:100%;justify-content:flex-end;padding-top:var(--calcite-spacing-lg);padding-inline-start:calc(var(--calcite-spacing-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-spacing-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation{width:fit-content;pointer-events:auto;display:flex;align-items:center;gap:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);box-shadow:var(--arcgis-internal-box-shadow);margin-block:auto calc(var(--calcite-spacing-lg) + var(--internal-attribution-height));margin-inline-start:var(--calcite-spacing-lg)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-spacing-base);min-width:64px}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums}.legend{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:auto;max-height:calc(100vh - 136px);overflow:hidden auto}`;
|
|
24
24
|
var J = Object.defineProperty, X = Object.getOwnPropertyDescriptor, l = (i, e, t, s) => {
|
|
25
|
-
for (var n = s > 1 ? void 0 : s ? X(e, t) : e, r = i.length - 1,
|
|
26
|
-
(
|
|
25
|
+
for (var n = s > 1 ? void 0 : s ? X(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
26
|
+
(a = i[r]) && (n = (s ? a(e, t, n) : a(n)) || n);
|
|
27
27
|
return s && n && J(e, t, n), n;
|
|
28
28
|
};
|
|
29
|
-
let
|
|
29
|
+
let o = class extends E {
|
|
30
30
|
//endregion
|
|
31
31
|
//#region Lifecycle
|
|
32
32
|
constructor(i) {
|
|
@@ -43,7 +43,7 @@ let a = class extends E {
|
|
|
43
43
|
}
|
|
44
44
|
initialize() {
|
|
45
45
|
this.addHandles(
|
|
46
|
-
|
|
46
|
+
S(
|
|
47
47
|
() => this.view?.map,
|
|
48
48
|
(i, e) => {
|
|
49
49
|
if (this.hasHandles("sceneLoaded") && this.removeHandles("sceneLoaded"), e) {
|
|
@@ -51,7 +51,7 @@ let a = class extends E {
|
|
|
51
51
|
t && t.length > 0 && this._unsubscribeToSlideEvents(t);
|
|
52
52
|
}
|
|
53
53
|
i && this.addHandles(
|
|
54
|
-
|
|
54
|
+
S(
|
|
55
55
|
() => i.loaded,
|
|
56
56
|
(t) => {
|
|
57
57
|
t && (this.removeHandles("sceneLoaded"), this._startWatchSlides(), this._slideId && this._applySlideById(this._slideId));
|
|
@@ -75,10 +75,10 @@ let a = class extends E {
|
|
|
75
75
|
i === void 0 || !this.view?.map?.loaded ? this._slideId = i : this._applySlideById(i);
|
|
76
76
|
}
|
|
77
77
|
get visibleSlides() {
|
|
78
|
-
return this.view?.map?.presentation?.slides?.filter((i) => !i.hidden) ?? new
|
|
78
|
+
return this.view?.map?.presentation?.slides?.filter((i) => !i.hidden) ?? new _();
|
|
79
79
|
}
|
|
80
80
|
get slides() {
|
|
81
|
-
return this.view?.map?.presentation?.slides ?? new
|
|
81
|
+
return this.view?.map?.presentation?.slides ?? new _();
|
|
82
82
|
}
|
|
83
83
|
get lastSlideSelected() {
|
|
84
84
|
return this.getSlideIndexBySlideId(this.slideId) === this.visibleSlides.length - 1;
|
|
@@ -108,8 +108,8 @@ let a = class extends E {
|
|
|
108
108
|
const t = ["ArrowLeft", "ArrowRight", "PageUp", "PageDown"];
|
|
109
109
|
if (document.activeElement?.nodeName.toLowerCase() === "arcgis-scene" || !t.includes(i.code))
|
|
110
110
|
return;
|
|
111
|
-
const n = e === "rtl" ? "ArrowRight" : "ArrowLeft",
|
|
112
|
-
this.navigateInPresentation(
|
|
111
|
+
const n = e === "rtl" ? "ArrowRight" : "ArrowLeft", a = i.code === n || i.code === "PageUp" ? -1 : 1;
|
|
112
|
+
this.navigateInPresentation(a);
|
|
113
113
|
}
|
|
114
114
|
async setSliceAnalysisInteractive() {
|
|
115
115
|
if (!this.view?.analyses?.length)
|
|
@@ -144,7 +144,7 @@ let a = class extends E {
|
|
|
144
144
|
() => this.slides,
|
|
145
145
|
"change",
|
|
146
146
|
(i) => {
|
|
147
|
-
this._subscribeToSlideEvents(new
|
|
147
|
+
this._subscribeToSlideEvents(new _(i.added)), this._unsubscribeToSlideEvents(new _(i.removed));
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
onListenerAdd: this._subscribeToSlideEvents,
|
|
@@ -166,63 +166,63 @@ let a = class extends E {
|
|
|
166
166
|
};
|
|
167
167
|
l([
|
|
168
168
|
d()
|
|
169
|
-
],
|
|
169
|
+
], o.prototype, "_slideId", 2);
|
|
170
170
|
l([
|
|
171
171
|
d()
|
|
172
|
-
],
|
|
172
|
+
], o.prototype, "view", 2);
|
|
173
173
|
l([
|
|
174
174
|
d()
|
|
175
|
-
],
|
|
175
|
+
], o.prototype, "slideId", 1);
|
|
176
176
|
l([
|
|
177
177
|
d()
|
|
178
|
-
],
|
|
178
|
+
], o.prototype, "transitionActive", 2);
|
|
179
179
|
l([
|
|
180
180
|
d()
|
|
181
|
-
],
|
|
181
|
+
], o.prototype, "showLegend", 2);
|
|
182
182
|
l([
|
|
183
183
|
d()
|
|
184
|
-
],
|
|
184
|
+
], o.prototype, "keyboardNavigationEnabled", 2);
|
|
185
185
|
l([
|
|
186
186
|
d()
|
|
187
|
-
],
|
|
187
|
+
], o.prototype, "visibleSlides", 1);
|
|
188
188
|
l([
|
|
189
189
|
d()
|
|
190
|
-
],
|
|
190
|
+
], o.prototype, "slides", 1);
|
|
191
191
|
l([
|
|
192
192
|
d()
|
|
193
|
-
],
|
|
193
|
+
], o.prototype, "lastSlideSelected", 1);
|
|
194
194
|
l([
|
|
195
195
|
d()
|
|
196
|
-
],
|
|
196
|
+
], o.prototype, "firstSlideSelected", 1);
|
|
197
197
|
l([
|
|
198
198
|
d()
|
|
199
|
-
],
|
|
199
|
+
], o.prototype, "slideSelected", 1);
|
|
200
200
|
l([
|
|
201
201
|
d()
|
|
202
|
-
],
|
|
202
|
+
], o.prototype, "hasOnlyOneSlide", 1);
|
|
203
203
|
l([
|
|
204
204
|
d()
|
|
205
|
-
],
|
|
205
|
+
], o.prototype, "onApplySlideStart", 2);
|
|
206
206
|
l([
|
|
207
207
|
d()
|
|
208
|
-
],
|
|
208
|
+
], o.prototype, "onApplySlideComplete", 2);
|
|
209
209
|
l([
|
|
210
210
|
d()
|
|
211
|
-
],
|
|
211
|
+
], o.prototype, "onApplySlideCancel", 2);
|
|
212
212
|
l([
|
|
213
213
|
d()
|
|
214
|
-
],
|
|
215
|
-
|
|
214
|
+
], o.prototype, "getSlideIndexBySlideId", 1);
|
|
215
|
+
o = l([
|
|
216
216
|
B("components.presentation.PresentationViewModel")
|
|
217
|
-
],
|
|
218
|
-
class Y extends
|
|
217
|
+
], o);
|
|
218
|
+
class Y extends P {
|
|
219
219
|
constructor(e) {
|
|
220
220
|
super(e);
|
|
221
221
|
}
|
|
222
222
|
hostLoaded() {
|
|
223
223
|
this.component.manager.onLifecycle(() => {
|
|
224
224
|
const e = this.component;
|
|
225
|
-
|
|
225
|
+
y(() => e.referenceElement).then((t) => {
|
|
226
226
|
this._isArcgisScene(t) && (this._sceneRef = t);
|
|
227
227
|
});
|
|
228
228
|
});
|
|
@@ -255,15 +255,15 @@ class Y extends C {
|
|
|
255
255
|
const n = t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;
|
|
256
256
|
if (n?.layerId == null)
|
|
257
257
|
return { success: !1, features: s };
|
|
258
|
-
const { layer: r, sublayer:
|
|
258
|
+
const { layer: r, sublayer: a } = this._getLayersFromView(e, n.layerId, n?.sublayerId);
|
|
259
259
|
if (!r)
|
|
260
260
|
return { success: !1, features: s };
|
|
261
|
-
const c =
|
|
261
|
+
const c = a ?? r;
|
|
262
262
|
if (!c || !this._layerTypeSupportsCapturePopup(c))
|
|
263
263
|
return { success: !1, features: s };
|
|
264
|
-
if (s = await this._fetchFeaturesFromQueryable(e, t, r,
|
|
264
|
+
if (s = await this._fetchFeaturesFromQueryable(e, t, r, a, c), s && this._featureHasBeenFilledWithAttributes(s)) {
|
|
265
265
|
const p = s[0];
|
|
266
|
-
return this._setFallbackPopupTemplate(p,
|
|
266
|
+
return this._setFallbackPopupTemplate(p, a, r), this._setFallbackGeometry(p, t?.location), { success: !0, features: s, popupInfo: t };
|
|
267
267
|
}
|
|
268
268
|
debugger;
|
|
269
269
|
return { success: !1, features: s };
|
|
@@ -282,16 +282,16 @@ class Y extends C {
|
|
|
282
282
|
return e && e.length > 0 && e[0].attributes && Object.entries(e[0].attributes)?.length > 1;
|
|
283
283
|
}
|
|
284
284
|
async _fetchFeaturesFromQueryable(e, t, s, n, r) {
|
|
285
|
-
const
|
|
286
|
-
if (
|
|
285
|
+
const a = t.features?.getItemAt(t.selectedFeatureIndex);
|
|
286
|
+
if (a?.id == null)
|
|
287
287
|
return await Promise.resolve([]);
|
|
288
288
|
const c = await e.whenLayerView(s);
|
|
289
|
-
await
|
|
289
|
+
await y(() => !c.updating);
|
|
290
290
|
const h = this._tryGetBuildingComponentSublayerView(s, n, c) ?? c;
|
|
291
|
-
await
|
|
292
|
-
const
|
|
293
|
-
let
|
|
294
|
-
return this._featureHasBeenFilledWithAttributes(
|
|
291
|
+
await y(() => !h.updating);
|
|
292
|
+
const w = this._createFeatureGraphic(s, n, r, a.id);
|
|
293
|
+
let I = await C(h, [w]);
|
|
294
|
+
return this._featureHasBeenFilledWithAttributes(I) || (await y(() => !e.updating), I = await C(h, [w])), I;
|
|
295
295
|
}
|
|
296
296
|
_tryGetBuildingComponentSublayerView(e, t, s) {
|
|
297
297
|
let n;
|
|
@@ -314,8 +314,8 @@ class Y extends C {
|
|
|
314
314
|
e.geometry == null && t && (e.geometry = t.clone());
|
|
315
315
|
}
|
|
316
316
|
_createFeatureGraphic(e, t, s, n) {
|
|
317
|
-
const r = this._getGlobalIdFieldNameFromLayer(s),
|
|
318
|
-
return p.attributes[
|
|
317
|
+
const r = this._getGlobalIdFieldNameFromLayer(s), a = n.type === "global-id" && r ? r : s.objectIdField, c = this._getGraphicOrigin(e, t), p = new H({ attributes: {}, layer: e, origin: c });
|
|
318
|
+
return p.attributes[a] = n.value, p;
|
|
319
319
|
}
|
|
320
320
|
_getGraphicOrigin(e, t) {
|
|
321
321
|
switch (e.type) {
|
|
@@ -349,13 +349,13 @@ class Y extends C {
|
|
|
349
349
|
}
|
|
350
350
|
//#endregion
|
|
351
351
|
}
|
|
352
|
-
const Z = (i) => new Y(i),
|
|
353
|
-
topCenter: { ...
|
|
354
|
-
topLeft: { ...
|
|
355
|
-
topRight: { ...
|
|
356
|
-
bottomCenter: { ...
|
|
357
|
-
bottomLeft: { ...
|
|
358
|
-
bottomRight: { ...
|
|
352
|
+
const Z = (i) => new Y(i), v = Object.freeze({ width: 0, height: 0 }), f = /* @__PURE__ */ new WeakMap(), b = () => ({
|
|
353
|
+
topCenter: { ...v },
|
|
354
|
+
topLeft: { ...v },
|
|
355
|
+
topRight: { ...v },
|
|
356
|
+
bottomCenter: { ...v },
|
|
357
|
+
bottomLeft: { ...v },
|
|
358
|
+
bottomRight: { ...v }
|
|
359
359
|
}), L = (i) => ({
|
|
360
360
|
topCenter: { ...i.topCenter },
|
|
361
361
|
topLeft: { ...i.topLeft },
|
|
@@ -364,35 +364,35 @@ const Z = (i) => new Y(i), g = Object.freeze({ width: 0, height: 0 }), y = /* @_
|
|
|
364
364
|
bottomLeft: { ...i.bottomLeft },
|
|
365
365
|
bottomRight: { ...i.bottomRight }
|
|
366
366
|
}), F = (i) => {
|
|
367
|
-
let e =
|
|
367
|
+
let e = f.get(i);
|
|
368
368
|
return e || (e = {
|
|
369
369
|
observedGroups: /* @__PURE__ */ new Map(),
|
|
370
370
|
observedSizes: b(),
|
|
371
371
|
subscribers: /* @__PURE__ */ new Set()
|
|
372
|
-
},
|
|
372
|
+
}, f.set(i, e)), e;
|
|
373
373
|
}, ee = (i) => {
|
|
374
|
-
const e = i?.topCenter.value, t = i?.topLeft.value, s = i?.topRight.value, n = i?.bottomCenter.value, r = i?.bottomLeft.value,
|
|
375
|
-
return e && t && s && n && r &&
|
|
374
|
+
const e = i?.topCenter.value, t = i?.topLeft.value, s = i?.topRight.value, n = i?.bottomCenter.value, r = i?.bottomLeft.value, a = i?.bottomRight.value;
|
|
375
|
+
return e && t && s && n && r && a ? {
|
|
376
376
|
topCenter: e,
|
|
377
377
|
topLeft: t,
|
|
378
378
|
topRight: s,
|
|
379
379
|
bottomCenter: n,
|
|
380
380
|
bottomLeft: r,
|
|
381
|
-
bottomRight:
|
|
381
|
+
bottomRight: a
|
|
382
382
|
} : null;
|
|
383
|
-
}, te = (i, e) =>
|
|
383
|
+
}, te = (i, e) => x.every((t) => i.get(t) === e[t]), ie = (i) => {
|
|
384
384
|
const e = L(i.observedSizes);
|
|
385
385
|
i.subscribers.forEach((t) => t(e));
|
|
386
386
|
}, se = (i, e) => {
|
|
387
|
-
const t =
|
|
387
|
+
const t = f.get(i);
|
|
388
388
|
if (!t)
|
|
389
389
|
return;
|
|
390
390
|
let s = !1;
|
|
391
391
|
e.forEach((n) => {
|
|
392
|
-
const r =
|
|
392
|
+
const r = x.find((w) => t.observedGroups.get(w) === n.target);
|
|
393
393
|
if (!r)
|
|
394
394
|
return;
|
|
395
|
-
const { width:
|
|
395
|
+
const { width: a, height: c } = n.contentRect, p = { width: a, height: c }, h = t.observedSizes[r];
|
|
396
396
|
h.width === p.width && h.height === p.height || (t.observedSizes[r] = p, s = !0);
|
|
397
397
|
}), s && ie(t);
|
|
398
398
|
}, A = (i, e) => {
|
|
@@ -405,18 +405,18 @@ const Z = (i) => new Y(i), g = Object.freeze({ width: 0, height: 0 }), y = /* @_
|
|
|
405
405
|
t.observedGroups.size > 0 && (t.resizeObserver.disconnect(), t.observedGroups.clear());
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
te(t.observedGroups, s) || (t.resizeObserver.disconnect(), t.observedGroups.clear(),
|
|
408
|
+
te(t.observedGroups, s) || (t.resizeObserver.disconnect(), t.observedGroups.clear(), x.forEach((n) => {
|
|
409
409
|
const r = s[n];
|
|
410
410
|
t.observedGroups.set(n, r), t.resizeObserver?.observe(r);
|
|
411
411
|
}));
|
|
412
412
|
}, ne = (i, e) => {
|
|
413
413
|
const t = F(i);
|
|
414
414
|
return t.subscribers.add(e), e(L(t.observedSizes)), () => {
|
|
415
|
-
const s =
|
|
416
|
-
s && (s.subscribers.delete(e), s.subscribers.size === 0 && (s.resizeObserver?.disconnect(), s.observedGroups.clear(),
|
|
415
|
+
const s = f.get(i);
|
|
416
|
+
s && (s.subscribers.delete(e), s.subscribers.size === 0 && (s.resizeObserver?.disconnect(), s.observedGroups.clear(), f.delete(i)));
|
|
417
417
|
};
|
|
418
418
|
};
|
|
419
|
-
class re extends
|
|
419
|
+
class re extends P {
|
|
420
420
|
// References to the slot group elements owned by the host component.
|
|
421
421
|
#t;
|
|
422
422
|
#e;
|
|
@@ -434,7 +434,7 @@ class re extends C {
|
|
|
434
434
|
}
|
|
435
435
|
hostLifecycle() {
|
|
436
436
|
return [
|
|
437
|
-
|
|
437
|
+
S(
|
|
438
438
|
() => this.#s(),
|
|
439
439
|
(t) => {
|
|
440
440
|
if (this.#e !== t) {
|
|
@@ -449,7 +449,7 @@ class re extends C {
|
|
|
449
449
|
},
|
|
450
450
|
{ sync: !0, initial: !0 }
|
|
451
451
|
),
|
|
452
|
-
|
|
452
|
+
S(
|
|
453
453
|
() => this.#s()?.slotGroupRefs,
|
|
454
454
|
(t) => {
|
|
455
455
|
this.#t = t, this.#e && t && A(this.#e, t);
|
|
@@ -468,22 +468,24 @@ class re extends C {
|
|
|
468
468
|
// Compares the newly measured sizes against the currently exported values.
|
|
469
469
|
#n(e) {
|
|
470
470
|
const t = this.exports ?? b();
|
|
471
|
-
return
|
|
471
|
+
return x.every((s) => {
|
|
472
472
|
const n = t[s], r = e[s];
|
|
473
473
|
return n.width === r.width && n.height === r.height;
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
const
|
|
477
|
+
const ae = M(re), oe = N(o);
|
|
478
478
|
class le extends R {
|
|
479
479
|
constructor() {
|
|
480
|
-
super(...arguments), this._messages = G(), this.viewModel =
|
|
480
|
+
super(...arguments), this._messages = G(), this.viewModel = oe(this), this._direction = $(), this._captureArrowKeysForNavigation = (e) => {
|
|
481
481
|
this.viewModel.captureArrowKeysForNavigation(e, this._direction);
|
|
482
|
-
}, this._useFeatureRefPopup = Z(this), this._handleApplySlideStart = () => {
|
|
483
|
-
this._useFeatureRefPopup.closePopup();
|
|
482
|
+
}, this._useFeatureRefPopup = Z(this), this._handleApplySlideStart = (e) => {
|
|
483
|
+
this._useFeatureRefPopup.closePopup(), this.arcgisSlideApplyStart.emit({ slide: e });
|
|
484
484
|
}, this._handleApplySlideComplete = (e) => {
|
|
485
|
-
this._useFeatureRefPopup.openPopup(e), this.sliceAnalysisInteractive && this.viewModel.setSliceAnalysisInteractive();
|
|
486
|
-
}, this.
|
|
485
|
+
this._useFeatureRefPopup.openPopup(e), this.sliceAnalysisInteractive && this.viewModel.setSliceAnalysisInteractive(), this.arcgisSlideApplyComplete.emit({ slide: e });
|
|
486
|
+
}, this._handleApplySlideCancel = (e) => {
|
|
487
|
+
this.arcgisSlideApplyCancel.emit({ slide: e });
|
|
488
|
+
}, this.autoDestroyDisabled = !1, this.view = this.viewModel.view, this.scale = "m", this.keyboardNavigationEnabled = !1, this.slidePopupDisabled = !1, this.slideCaptionsDisabled = !1, this.slideLegendDisabled = !1, this.sliceAnalysisInteractive = !1, this.arcgisPopupFeatureNotFound = g(), this.arcgisPopupFeaturesRetrieved = g(), this.arcgisSlideApplyStart = g(), this.arcgisSlideApplyCancel = g(), this.arcgisSlideApplyComplete = g(), this.arcgisReady = g();
|
|
487
489
|
}
|
|
488
490
|
static {
|
|
489
491
|
this.properties = { _slotSizesController: 16, slideId: 1, autoDestroyDisabled: 5, view: 0, scale: 1, keyboardNavigationEnabled: 5, slidePopupDisabled: 5, slideCaptionsDisabled: 5, slideLegendDisabled: 5, sliceAnalysisInteractive: 5 };
|
|
@@ -502,12 +504,12 @@ class le extends R {
|
|
|
502
504
|
}
|
|
503
505
|
loaded() {
|
|
504
506
|
this.manager.onLifecycle(() => {
|
|
505
|
-
this.viewModel.onApplySlideStart = this._handleApplySlideStart, this.viewModel.onApplySlideComplete = this._handleApplySlideComplete, this._keyboardHandle =
|
|
507
|
+
this.viewModel.onApplySlideStart = this._handleApplySlideStart, this.viewModel.onApplySlideComplete = this._handleApplySlideComplete, this.viewModel.onApplySlideCancel = this._handleApplySlideCancel, this._keyboardHandle = S(() => this.keyboardNavigationEnabled, (t) => {
|
|
506
508
|
document.removeEventListener("keydown", this._captureArrowKeysForNavigation), t && document.addEventListener("keydown", this._captureArrowKeysForNavigation);
|
|
507
509
|
}, { initial: !0 });
|
|
508
510
|
const e = this;
|
|
509
|
-
|
|
510
|
-
this._isArcgisScene(t) && (this._slotSizesController =
|
|
511
|
+
y(() => e.referenceElement).then((t) => {
|
|
512
|
+
this._isArcgisScene(t) && (this._slotSizesController = ae(this), this._watchSceneViewSlotSizes());
|
|
511
513
|
}), this.manager.onDisconnected(() => {
|
|
512
514
|
document.removeEventListener("keydown", this._captureArrowKeysForNavigation), this._keyboardHandle?.remove();
|
|
513
515
|
});
|
|
@@ -517,13 +519,13 @@ class le extends R {
|
|
|
517
519
|
return e === void 0 || typeof e == "string" ? !1 : "tagName" in e && e.tagName === "ARCGIS-SCENE";
|
|
518
520
|
}
|
|
519
521
|
_watchSceneViewSlotSizes() {
|
|
520
|
-
return
|
|
522
|
+
return S(() => this._slotSizesController, (e) => this._updatePresentationCaptionsPadding(e?.topLeft, e?.topRight, e?.bottomLeft, e?.bottomRight), { initial: !0 });
|
|
521
523
|
}
|
|
522
524
|
_updatePresentationCaptionsPadding(e, t, s, n) {
|
|
523
|
-
const r = this._direction === "ltr" ? e?.width ?? 0 : t?.width ?? 0,
|
|
524
|
-
r > 0 ? this.el.style.setProperty("--arcgis-internal-presentation-padding-start", `calc(var(--calcite-spacing-lg) + ${r.toString()}px)`) : this.el.style.setProperty("--arcgis-internal-presentation-padding-start", "0px"),
|
|
525
|
-
const h = r <= Math.max(c, p) &&
|
|
526
|
-
this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top", h ? "0" : `${c}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom", h ? "0" : `${p}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start", h ? `${r}px` : "0"), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end", h ? `${
|
|
525
|
+
const r = this._direction === "ltr" ? e?.width ?? 0 : t?.width ?? 0, a = this._direction === "ltr" ? t?.width ?? 0 : e?.width ?? 0, c = Math.max(e?.height ?? 0, t?.height ?? 0), p = Math.max(s?.height ?? 0, n?.height ?? 0);
|
|
526
|
+
r > 0 ? this.el.style.setProperty("--arcgis-internal-presentation-padding-start", `calc(var(--calcite-spacing-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-spacing-lg) + ${a.toString()}px)`) : this.el.style.setProperty("--arcgis-internal-presentation-padding-end", "0px");
|
|
527
|
+
const h = r <= Math.max(c, p) && a <= Math.max(c, p);
|
|
528
|
+
this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top", h ? "0" : `${c}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom", h ? "0" : `${p}px`), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start", h ? `${r}px` : "0"), this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end", h ? `${a}px` : "0");
|
|
527
529
|
}
|
|
528
530
|
render() {
|
|
529
531
|
if (this.viewModel.visibleSlides.length === 0)
|
|
@@ -533,11 +535,11 @@ class le extends R {
|
|
|
533
535
|
}
|
|
534
536
|
_renderNavigation() {
|
|
535
537
|
const e = this.viewModel.lastSlideSelected && !this.viewModel.hasOnlyOneSlide, t = this._direction === "rtl", s = t ? "chevron-right" : "chevron-left", n = t ? "chevron-left" : "chevron-right";
|
|
536
|
-
return u`<div class="navigation"><calcite-button appearance=transparent icon-start=${s ??
|
|
538
|
+
return u`<div class="navigation"><calcite-button appearance=transparent icon-start=${s ?? m} kind=neutral .scale=${this.scale} .disabled=${this.viewModel.firstSlideSelected || !this.viewModel.slideSelected} .label=${this._messages.previous} title=${this._messages.previous ?? m} @click=${() => this.viewModel.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this._renderSlideCounter()}</div><calcite-button appearance=transparent icon-start=${(e ? "reset" : n) ?? m} kind=neutral .scale=${this.scale} .label=${e ? this._messages.restart : this._messages.next} title=${(e ? this._messages.restart : this._messages.next) ?? m} @click=${() => this.viewModel.navigateInPresentation(1)}></calcite-button></div>`;
|
|
537
539
|
}
|
|
538
540
|
_renderSlideCounter() {
|
|
539
541
|
const e = this.viewModel.slideIndex + 1, t = this._messages?.slideNavAriaText?.replace("${index}", e.toString()).replace("${numberOfSlides}", this.viewModel.visibleSlides.length.toString());
|
|
540
|
-
return this.viewModel.slideSelected ? u`<p role=banner aria-label=${t ??
|
|
542
|
+
return this.viewModel.slideSelected ? u`<p role=banner aria-label=${t ?? m} 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>`;
|
|
541
543
|
}
|
|
542
544
|
_renderCaptions(e) {
|
|
543
545
|
return this.slideCaptionsDisabled ? null : u`<arcgis-presentation-captions .slide=${e} .transitionActive=${this.viewModel.transitionActive}></arcgis-presentation-captions>`;
|
|
@@ -24,6 +24,9 @@ import type { GoToOverride } from "@arcgis/core/widgets/support/types.js";
|
|
|
24
24
|
* If a global apiKey is present, the Search component uses this URL: `https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer`. If an apiKey
|
|
25
25
|
* is present on the LocatorSearchSource, then the Search component uses the URL defined by the LocatorSearchSource.url property.
|
|
26
26
|
*
|
|
27
|
+
* For popups, we recommend using either [popup-component-enabled](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#popupComponentEnabled),
|
|
28
|
+
* or adding the [arcgis-popup](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/) to your view components as a best practice.
|
|
29
|
+
*
|
|
27
30
|
* The Search component sets the view on the Search result. The level of detail (LOD) at the center of the view depends on the data source, with higher quality data
|
|
28
31
|
* sources returning extents closer to the `feature` obtained from the search. To manually define the scale of the view at the Search result, use the `zoomScale` property
|
|
29
32
|
* of the LocatorSearchSource or LayerSearchSource. Search component results are typically sorted according to their relevance to the search and their relative importance.
|
|
@@ -31,9 +34,11 @@ import type { GoToOverride } from "@arcgis/core/widgets/support/types.js";
|
|
|
31
34
|
* specified point (the center of the view) by passing in the `location parameter`. Features closest to the input location show up higher in the list of results.
|
|
32
35
|
* This behavior can be changed by using the localSearchDisabled property.
|
|
33
36
|
*
|
|
34
|
-
*
|
|
37
|
+
* Starting with version `5.1`, on [@arcgisSelectResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-search/#event-arcgisSelectResult) the selected search result is announced to assistive technologies. Visit the [Accessibility guide](https://developers.arcgis.com/javascript/latest/accessibility/#assistive-technologies) to learn more
|
|
35
38
|
* about live announcements supporting more audiences.
|
|
36
39
|
*
|
|
40
|
+
* @see [Sample - Search component with multiple sources](https://developers.arcgis.com/javascript/latest/sample-code/search-component-multisource/)
|
|
41
|
+
* @see [Sample - Search component with custom source](https://developers.arcgis.com/javascript/latest/sample-code/search-component-customsource/)
|
|
37
42
|
* @since 4.28
|
|
38
43
|
*/
|
|
39
44
|
export abstract class ArcgisSearch extends LitElement {
|