@arcgis/map-components 6.0.0-next.21 → 6.0.0-next.23
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/{G56N6RF4.js → 2S6RQ6Q4.js} +1 -1
- package/dist/cdn/{WUWF6ZDM.js → 2Z36ICJZ.js} +1 -1
- package/dist/cdn/{2NM6UWC4.js → 47CFYOUT.js} +1 -1
- package/dist/cdn/4N4XDCDQ.js +2 -0
- package/dist/cdn/{7ZWBGSCM.js → 4NG7CALI.js} +1 -1
- package/dist/cdn/{UFK7DHVC.js → 4WZ7Y57Q.js} +1 -1
- package/dist/cdn/{NTHSQXKG.js → 5DEJDR4W.js} +1 -1
- package/dist/cdn/{LUW2PXWZ.js → 5PPYHS6V.js} +1 -1
- package/dist/cdn/{M5OK7RKI.js → 66GRDX36.js} +1 -1
- package/dist/cdn/{SAQ5BNZJ.js → 6CKQPMJB.js} +1 -1
- package/dist/cdn/6GGKA7MT.js +2 -0
- package/dist/cdn/{XPBFBRSY.js → 6K4IASNK.js} +1 -1
- package/dist/cdn/{7LO6ACC7.js → 6VV5SX76.js} +1 -1
- package/dist/cdn/{Y3E2FJPQ.js → 74WM2EIB.js} +1 -1
- package/dist/cdn/{3GN3DAON.js → A7YFCO3R.js} +1 -1
- package/dist/cdn/{FDESUDJ5.js → AIF4MCBB.js} +1 -1
- package/dist/cdn/{3SXQLU4S.js → APFZ2FVO.js} +1 -1
- package/dist/cdn/{VLHURRRU.js → BM3FQ4OG.js} +1 -1
- package/dist/cdn/{LWVYNWD5.js → CGE6E3O3.js} +1 -1
- package/dist/cdn/{JUYPQUPQ.js → E5CGORXN.js} +1 -1
- package/dist/cdn/EJVFK7JX.js +2 -0
- package/dist/cdn/{SDLZ4BNM.js → EVWWTIEQ.js} +1 -1
- package/dist/cdn/{BUH3AQ7E.js → FTLNYN3G.js} +1 -1
- package/dist/cdn/{BJ35LPCU.js → G7BWEBJH.js} +1 -1
- package/dist/cdn/GIQT67VT.js +2 -0
- package/dist/cdn/{AOGDXJ2J.js → H66E4VOY.js} +1 -1
- package/dist/cdn/{BDZHLGVT.js → HL6WL2YA.js} +1 -1
- package/dist/cdn/{GQQTIX2X.js → HQXC5XLE.js} +1 -1
- package/dist/cdn/HTONXZBP.js +2 -0
- package/dist/cdn/{F2DTKJTK.js → HUWIY53T.js} +1 -1
- package/dist/cdn/{UE6EBLH3.js → IKVGZFZ6.js} +1 -1
- package/dist/cdn/{NKFAPBY3.js → JRO4IBJP.js} +1 -1
- package/dist/cdn/KXDLX4RE.js +2 -0
- package/dist/cdn/{4I6F64B2.js → LKKCTKMQ.js} +1 -1
- package/dist/cdn/MW27GSDX.js +2 -0
- package/dist/cdn/{LXJURAXP.js → NLG5U5ZN.js} +1 -1
- package/dist/cdn/{4LNXCEM5.js → NORQIOSX.js} +1 -1
- package/dist/cdn/{BLYXYNGB.js → PPGKQRNY.js} +1 -1
- package/dist/cdn/{DS6EUOYE.js → PW3QCZXY.js} +1 -1
- package/dist/cdn/{7EIN5VCY.js → Q2GYNZYQ.js} +1 -1
- package/dist/cdn/{SJGQALDG.js → Q2ZQOGM2.js} +1 -1
- package/dist/cdn/{NHMHVWNB.js → QKNHYZYS.js} +1 -1
- package/dist/cdn/{ZC5YVHZ3.js → QQLN6RWA.js} +1 -1
- package/dist/cdn/{BJJZGYBG.js → R6ARQKAY.js} +1 -1
- package/dist/cdn/RFO3M46K.js +2 -0
- package/dist/cdn/{YBXCTOS7.js → RQPOCDJS.js} +1 -1
- package/dist/cdn/SLWZHNVT.js +2 -0
- package/dist/cdn/TKIWKCDA.js +2 -0
- package/dist/cdn/{WTAAQHO3.js → TM4FFRX5.js} +1 -1
- package/dist/cdn/{SKAZPI3A.js → TTERKXN5.js} +1 -1
- package/dist/cdn/{LKGURYDH.js → TTWQ7RNF.js} +1 -1
- package/dist/cdn/{VHZM25YV.js → UB6BQW3G.js} +1 -1
- package/dist/cdn/{DGSTI5DI.js → UJURQACP.js} +1 -1
- package/dist/cdn/V3J5GQHD.js +2 -0
- package/dist/cdn/{UHDJ2SI5.js → VW35MSDL.js} +1 -1
- package/dist/cdn/{3B4VHD67.js → XN3MG6YU.js} +1 -1
- package/dist/cdn/XWBR6FXI.js +2 -0
- package/dist/cdn/{B2TICPHR.js → Y5ZZCA3R.js} +1 -1
- package/dist/cdn/{4IG6WUCI.js → YTZZRJ7Z.js} +1 -1
- package/dist/cdn/{OQ6SYZBT.js → YXIJXXTK.js} +1 -1
- package/dist/cdn/{L6FLCEH6.js → Z3674FMT.js} +1 -1
- package/dist/cdn/ZF7NUFAT.js +2 -0
- package/dist/cdn/assets/video-player/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +155 -151
- package/dist/chunks/useViewModel.js +7 -7
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +88 -86
- package/dist/components/arcgis-daylight/customElement.js +2 -1
- package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
- package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +14 -15
- package/dist/components/arcgis-layer-list-item-indicator/customElement.js +2 -2
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +97 -95
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +5 -5
- package/dist/components/arcgis-search/customElement.d.ts +12 -0
- package/dist/components/arcgis-search/customElement.js +3 -0
- package/dist/components/arcgis-sketch/customElement.d.ts +308 -30
- package/dist/components/arcgis-sketch/customElement.js +48 -21
- package/dist/components/arcgis-swipe/customElement.d.ts +0 -22
- package/dist/components/arcgis-swipe/customElement.js +45 -63
- package/dist/components/arcgis-table-list-next/customElement.js +55 -54
- package/dist/components/arcgis-time-bar/customElement.d.ts +484 -409
- package/dist/components/arcgis-time-bar/types.d.ts +36 -15
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
- package/dist/components/arcgis-time-slider/customElement.d.ts +2 -2
- package/dist/components/arcgis-track/customElement.d.ts +12 -3
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +42 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +20 -17
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -70
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -2
- package/dist/components/arcgis-video-player/customElement.d.ts +18 -0
- package/dist/components/arcgis-video-player/customElement.js +72 -72
- package/dist/components/arcgis-video-player/index.js +4 -4
- package/dist/components/arcgis-video-player-action-bar/customElement.js +1 -1
- package/dist/components/arcgis-video-player-previews/customElement.js +159 -0
- package/dist/components/arcgis-video-player-settings/customElement.js +17 -16
- package/dist/components/arcgis-video-player-slider/customElement.js +23 -12
- package/dist/components/arcgis-video-player-slider/index.js +1 -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 +0 -20
- package/dist/loader.js +4 -5
- package/dist/types/lumina.d.ts +3 -24
- package/dist/types/preact.d.ts +3 -26
- package/dist/types/react.d.ts +3 -28
- package/dist/types/stencil.d.ts +3 -24
- package/package.json +6 -6
- package/dist/cdn/COSETVX4.js +0 -2
- package/dist/cdn/ED2T4ASN.js +0 -2
- package/dist/cdn/F74YQZ2X.js +0 -2
- package/dist/cdn/KXD4VEKE.js +0 -2
- package/dist/cdn/MBLS5ES4.js +0 -2
- package/dist/cdn/OJJSIN3V.js +0 -2
- package/dist/cdn/P3565WG3.js +0 -2
- package/dist/cdn/PHVKEWZ7.js +0 -2
- package/dist/cdn/QAOT2TJ6.js +0 -2
- package/dist/cdn/QKGJVGXJ.js +0 -2
- package/dist/cdn/QVJ2FUNW.js +0 -2
- package/dist/cdn/UI4IEVSV.js +0 -2
- package/dist/cdn/UPCWZNTA.js +0 -2
- package/dist/cdn/VEV3AAVP.js +0 -2
- package/dist/components/arcgis-scale-range-slider/customElement.d.ts +0 -158
- package/dist/components/arcgis-scale-range-slider/customElement.js +0 -26
- package/dist/components/arcgis-scale-range-slider/index.d.ts +0 -1
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
- package/dist/components/arcgis-value-picker-legacy/customElement.d.ts +0 -642
- package/dist/components/arcgis-value-picker-legacy/customElement.js +0 -39
- package/dist/components/arcgis-value-picker-legacy/index.d.ts +0 -1
- package/dist/components/arcgis-value-picker-legacy/index.js +0 -1
- /package/dist/components/{arcgis-scale-range-slider → arcgis-video-player-previews}/index.js +0 -0
|
@@ -1,114 +1,118 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { html as
|
|
3
|
-
import { initializeProjection as
|
|
4
|
-
import { signal as
|
|
5
|
-
import { watch as f, when as
|
|
6
|
-
import
|
|
2
|
+
import { html as L } from "lit";
|
|
3
|
+
import { initializeProjection as x } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
4
|
+
import { signal as F } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
5
|
+
import { watch as f, when as O } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
|
+
import R from "@arcgis/core/geometry/Point.js";
|
|
7
7
|
import A from "@arcgis/core/Graphic.js";
|
|
8
|
-
import { GenericController as
|
|
8
|
+
import { GenericController as M, useDirection as G, makeController as V, makeGenericController as C } from "@arcgis/lumina/controllers";
|
|
9
9
|
import { getSlotAssignedElements as D } from "@arcgis/toolkit/dom/slots";
|
|
10
10
|
import { whenOrAbort as S } from "@arcgis/toolkit/promise";
|
|
11
|
-
import { createRef as
|
|
12
|
-
import { c as
|
|
13
|
-
import { i as
|
|
14
|
-
import { observeAncestorsMutation as
|
|
15
|
-
import { createEvent as
|
|
16
|
-
async function*
|
|
17
|
-
for (const
|
|
18
|
-
const i = await S(
|
|
11
|
+
import { createRef as w } from "lit/directives/ref.js";
|
|
12
|
+
import { c as T, S as k } from "./slots.js";
|
|
13
|
+
import { i as H, t as U } from "./async-utils.js";
|
|
14
|
+
import { observeAncestorsMutation as j, unsafeGetCalciteModeName as z } from "@arcgis/toolkit/dom";
|
|
15
|
+
import { createEvent as P } from "@arcgis/lumina";
|
|
16
|
+
async function* B(s, t) {
|
|
17
|
+
for (const e of s) {
|
|
18
|
+
const i = await S(e, t).catch(() => {
|
|
19
19
|
});
|
|
20
|
-
if (
|
|
20
|
+
if (t.aborted)
|
|
21
21
|
return;
|
|
22
22
|
yield* Array.isArray(i) ? i.filter((o) => o instanceof A) : [];
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
async function*
|
|
25
|
+
async function* y() {
|
|
26
26
|
yield* [];
|
|
27
27
|
}
|
|
28
|
-
async function*
|
|
29
|
-
await S(
|
|
28
|
+
async function* W(s, t) {
|
|
29
|
+
await S(s, t).catch(() => {
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
async function
|
|
32
|
+
async function $(s, t, e, i) {
|
|
33
33
|
let o;
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
36
|
-
const n = Promise.withResolvers(),
|
|
34
|
+
if (e instanceof R ? (await x(e.spatialReference, s.spatialReference), U(i.signal), o = s.toScreen(e)) : o = e, !o)
|
|
35
|
+
return y();
|
|
36
|
+
const n = Promise.withResolvers(), r = s.fetchPopupFeatures(o, {
|
|
37
37
|
...i,
|
|
38
|
-
defaultPopupTemplateEnabled:
|
|
38
|
+
defaultPopupTemplateEnabled: t.defaultPopupTemplateEnabled,
|
|
39
39
|
hitTestResolver: n
|
|
40
|
-
}) ??
|
|
41
|
-
return await n.promise,
|
|
40
|
+
}) ?? y();
|
|
41
|
+
return await n.promise, r;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
if (
|
|
45
|
-
return
|
|
46
|
-
const
|
|
47
|
-
return
|
|
43
|
+
function v(s, t) {
|
|
44
|
+
if (t instanceof R)
|
|
45
|
+
return t;
|
|
46
|
+
const e = "width" in t ? { x: t.x + t.width / 2, y: t.y + t.height / 2 } : t;
|
|
47
|
+
return s.toMap(e) ?? void 0;
|
|
48
48
|
}
|
|
49
|
-
async function
|
|
49
|
+
async function q(s, t, e, i) {
|
|
50
50
|
const o = {};
|
|
51
51
|
return {
|
|
52
52
|
diagnostics: o,
|
|
53
|
-
featureStream: await
|
|
53
|
+
featureStream: await $(s, t, e, {
|
|
54
54
|
diagnostics: o,
|
|
55
55
|
signal: i
|
|
56
56
|
}),
|
|
57
|
-
location:
|
|
57
|
+
location: v(s, e)
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
class
|
|
60
|
+
class st extends M {
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region Lifecycle
|
|
63
|
-
constructor(
|
|
64
|
-
super(
|
|
65
|
-
const i =
|
|
63
|
+
constructor(t) {
|
|
64
|
+
super(t), this.direction = G(), this.popupRef = w(), this.uiContainerRef = w(), this.#a = F(void 0), this.#t = null, this.#n = null, this.#r = 0, this.slotGroupRefs = T(), this.attributionHeight = 0, this.component.listenOn(globalThis, "unhandledrejection", (e) => {
|
|
65
|
+
const i = e.reason;
|
|
66
66
|
if (i?.name === "webgl:required") {
|
|
67
67
|
const { name: o } = i;
|
|
68
68
|
this.webGLError = { name: o };
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
#a;
|
|
73
|
+
#i;
|
|
74
|
+
get #h() {
|
|
75
|
+
return !this.component.popupDisabled && (this.component.popupComponentEnabled || !!this.popupElement && this.popupElement !== this.#i);
|
|
74
76
|
}
|
|
75
77
|
get popupElement() {
|
|
76
|
-
return this.
|
|
78
|
+
return this.#a.value;
|
|
77
79
|
}
|
|
78
|
-
set popupElement(
|
|
79
|
-
this.
|
|
80
|
+
set popupElement(t) {
|
|
81
|
+
this.#a.value = t;
|
|
80
82
|
}
|
|
81
|
-
#
|
|
83
|
+
#t;
|
|
84
|
+
#n;
|
|
85
|
+
#r;
|
|
82
86
|
//#endregion
|
|
83
87
|
//#region Private Methods
|
|
84
88
|
hostLifecycle() {
|
|
85
|
-
const { view:
|
|
89
|
+
const { view: t } = this.component, e = t.focusRegionShortcutEnabled;
|
|
86
90
|
return [
|
|
87
91
|
...[
|
|
88
|
-
f(() => this.component.focusRegionShortcutEnabled ?? this
|
|
92
|
+
f(() => this.component.focusRegionShortcutEnabled ?? this.#h, (o) => {
|
|
89
93
|
this.component.view.focusRegionShortcutEnabled = o;
|
|
90
94
|
}, { initial: !0, sync: !0 }),
|
|
91
|
-
|
|
92
|
-
this
|
|
95
|
+
O(() => this.component.view.ready, () => {
|
|
96
|
+
this.#o();
|
|
93
97
|
}),
|
|
94
98
|
f(() => this.component.view.popup?.visible, (o, n) => {
|
|
95
|
-
(o || n) && this
|
|
99
|
+
(o || n) && this.#e(), o && this.popupElement?.open && (this.popupElement.open = !1);
|
|
96
100
|
}, { initial: !0 }),
|
|
97
101
|
f(
|
|
98
102
|
() => this.component.popupElement?.open,
|
|
99
103
|
(o, n) => {
|
|
100
|
-
n && !o && this
|
|
104
|
+
n && !o && this.#e();
|
|
101
105
|
},
|
|
102
106
|
// Using sync to preemptively prevent a close notification from canceling a replacement operation.
|
|
103
107
|
{ initial: !0, sync: !0 }
|
|
104
108
|
),
|
|
105
|
-
this.component.view.on("focus-region-select", (o) => this
|
|
109
|
+
this.component.view.on("focus-region-select", (o) => this.#g(o)),
|
|
106
110
|
this.component.view.on(
|
|
107
111
|
"click",
|
|
108
112
|
[],
|
|
109
113
|
(o) => {
|
|
110
114
|
const n = o.native;
|
|
111
|
-
o.button !== 0 || n?.ctrlKey || n?.metaKey || this
|
|
115
|
+
o.button !== 0 || n?.ctrlKey || n?.metaKey || this.#v(o).catch(() => {
|
|
112
116
|
});
|
|
113
117
|
},
|
|
114
118
|
// @ts-ignore: Core supports a click listener priority argument, needed for Popup click
|
|
@@ -117,100 +121,100 @@ class re extends F {
|
|
|
117
121
|
],
|
|
118
122
|
{
|
|
119
123
|
remove: () => {
|
|
120
|
-
|
|
124
|
+
t.focusRegionShortcutEnabled = e;
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
127
|
];
|
|
124
128
|
}
|
|
125
129
|
hostConnected() {
|
|
126
|
-
this
|
|
130
|
+
this.#l();
|
|
127
131
|
}
|
|
128
132
|
hostUpdated() {
|
|
129
|
-
this.component.el.isConnected && this
|
|
133
|
+
this.component.el.isConnected && this.#l(), this.component.popupComponentEnabled ? this.#o() : (this.popupElement === this.#i && (this.#e(), this.#d(), this.popupElement = void 0), this.#i = void 0);
|
|
130
134
|
}
|
|
131
135
|
hostDestroy() {
|
|
132
|
-
this
|
|
136
|
+
this.#e(), this.#f();
|
|
133
137
|
}
|
|
134
138
|
hostDisconnected() {
|
|
135
|
-
this
|
|
139
|
+
this.#f();
|
|
136
140
|
}
|
|
137
|
-
async openPopup(
|
|
138
|
-
this
|
|
139
|
-
const
|
|
140
|
-
this
|
|
141
|
+
async openPopup(t = {}) {
|
|
142
|
+
this.#o();
|
|
143
|
+
const e = this.popupElement, i = t.location ?? e?.location, o = !!e && !t.featureStream && !t.promises?.length && !!t.fetchFeatures && !!i;
|
|
144
|
+
this.#e();
|
|
141
145
|
const n = new AbortController();
|
|
142
|
-
if (this
|
|
143
|
-
const { fetchFeatures:
|
|
144
|
-
|
|
145
|
-
}),
|
|
146
|
+
if (this.#n = n, e) {
|
|
147
|
+
const { fetchFeatures: r, shouldFocus: p, title: a, featureStream: c, promises: m, location: u, ...g } = t, d = u ? v(this.component.view, u) : void 0, E = u ?? i, h = o && E ? q(this.component.view, e, E, n.signal) : null, b = h ? Promise.withResolvers() : null;
|
|
148
|
+
h && b && (h.catch(() => {
|
|
149
|
+
}), e.featureStream = W(b.promise, n.signal));
|
|
146
150
|
try {
|
|
147
|
-
await
|
|
148
|
-
} catch (
|
|
149
|
-
throw
|
|
151
|
+
await e.componentOnReady();
|
|
152
|
+
} catch (l) {
|
|
153
|
+
throw h && this.#s(n) && (n.abort(), e.open = !1, await e.clear()), l;
|
|
150
154
|
}
|
|
151
|
-
if (!this
|
|
155
|
+
if (!this.#s(n))
|
|
152
156
|
return;
|
|
153
|
-
if (
|
|
157
|
+
if (h)
|
|
154
158
|
try {
|
|
155
|
-
const
|
|
156
|
-
if (!this
|
|
159
|
+
const l = await h;
|
|
160
|
+
if (!this.#s(n))
|
|
157
161
|
return;
|
|
158
|
-
Object.assign(
|
|
159
|
-
} catch (
|
|
160
|
-
if (!
|
|
161
|
-
throw this
|
|
162
|
+
Object.assign(e, g), a !== void 0 && (e.heading = a), await e.openFeatureStream(l);
|
|
163
|
+
} catch (l) {
|
|
164
|
+
if (!H(l))
|
|
165
|
+
throw this.#s(n) && (e.open = !1, await e.clear()), l;
|
|
162
166
|
return;
|
|
163
167
|
} finally {
|
|
164
168
|
b?.resolve();
|
|
165
169
|
}
|
|
166
170
|
else
|
|
167
|
-
Object.assign(
|
|
168
|
-
featureStream:
|
|
171
|
+
Object.assign(e, g), a !== void 0 && (e.heading = a), c ? await e.openFeatureStream({ featureStream: c, location: d }) : m?.length ? await e.openFeatureStream({
|
|
172
|
+
featureStream: B(m, n.signal),
|
|
169
173
|
location: d
|
|
170
|
-
}) : (
|
|
171
|
-
p && this
|
|
174
|
+
}) : (e.featureStream = null, u !== void 0 && (e.location = d), e.open = !0);
|
|
175
|
+
p && this.#s(n) && await e.setFocus();
|
|
172
176
|
} else {
|
|
173
|
-
const { location:
|
|
177
|
+
const { location: r, ...p } = t;
|
|
174
178
|
await this.component.view.openPopup({
|
|
175
179
|
...p,
|
|
176
|
-
location:
|
|
180
|
+
location: r ? v(this.component.view, r) : void 0
|
|
177
181
|
});
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
184
|
closePopup() {
|
|
181
|
-
this
|
|
185
|
+
this.#e(), this.popupElement ? (this.popupElement.open = !1, this.popupElement.clear()) : this.component.view.closePopup();
|
|
182
186
|
}
|
|
183
|
-
|
|
184
|
-
this
|
|
187
|
+
#e() {
|
|
188
|
+
this.#n?.abort(), this.#n = null;
|
|
185
189
|
}
|
|
186
|
-
|
|
187
|
-
return this
|
|
190
|
+
#s(t) {
|
|
191
|
+
return this.#n === t && !t.signal.aborted;
|
|
188
192
|
}
|
|
189
|
-
|
|
190
|
-
this.component.popupComponentEnabled && this.popupRef.value && !this.popupElement && (this
|
|
193
|
+
#o() {
|
|
194
|
+
this.component.popupComponentEnabled && this.popupRef.value && !this.popupElement && (this.#i = this.popupRef.value, this.popupElement = this.popupRef.value, this.popupElement.referenceElement = this.component.el, this.popupElement.view = this.component.view);
|
|
191
195
|
}
|
|
192
|
-
handleAttributionHeightChange(
|
|
193
|
-
this.attributionHeight !==
|
|
196
|
+
handleAttributionHeightChange(t) {
|
|
197
|
+
this.attributionHeight !== t && (this.attributionHeight = t, this.#u()?.style.setProperty("--arcgis-internal-attribution-space-top", `${this.attributionHeight}px`));
|
|
194
198
|
}
|
|
195
|
-
|
|
196
|
-
const
|
|
197
|
-
if (
|
|
198
|
-
this.#
|
|
199
|
-
for (const p of
|
|
200
|
-
p && this.#
|
|
201
|
-
this
|
|
199
|
+
#l() {
|
|
200
|
+
const t = this.#u(), { topLeft: e, topRight: i, bottomLeft: o, bottomRight: n } = this.slotGroupRefs, r = [e.value, i.value, o.value, n.value];
|
|
201
|
+
if (t) {
|
|
202
|
+
this.#t ??= new ResizeObserver(() => this.#c()), this.#t.disconnect(), this.#t.observe(t);
|
|
203
|
+
for (const p of r)
|
|
204
|
+
p && this.#t.observe(p, { box: "border-box" });
|
|
205
|
+
this.#c();
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
-
if (!(
|
|
208
|
+
#c() {
|
|
209
|
+
const t = this.#u(), { topLeft: e, topRight: i, bottomLeft: o, bottomRight: n } = this.slotGroupRefs;
|
|
210
|
+
if (!(t && e.value && i.value && o.value && n.value))
|
|
207
211
|
return;
|
|
208
|
-
const
|
|
209
|
-
this
|
|
212
|
+
const r = t.getBoundingClientRect(), p = this.#m(r, e.value, i.value), a = this.#m(r, o.value, n.value);
|
|
213
|
+
this.#p(t, "--arcgis-internal-top-center-max-width", p.maxWidth), this.#p(t, "--arcgis-internal-top-center-position", p.position), this.#p(t, "--arcgis-internal-bottom-center-max-width", a.maxWidth), this.#p(t, "--arcgis-internal-bottom-center-position", a.position);
|
|
210
214
|
}
|
|
211
|
-
|
|
215
|
+
#p(t, e, i) {
|
|
212
216
|
const o = `${i}px`;
|
|
213
|
-
|
|
217
|
+
t.style.getPropertyValue(e) !== o && t.style.setProperty(e, o);
|
|
214
218
|
}
|
|
215
219
|
/*
|
|
216
220
|
* Both sides occupied: reserve the larger extent on both sides so the center
|
|
@@ -227,77 +231,77 @@ class re extends F {
|
|
|
227
231
|
* | center |
|
|
228
232
|
* ^ position
|
|
229
233
|
*/
|
|
230
|
-
|
|
231
|
-
const o =
|
|
234
|
+
#m(t, e, i) {
|
|
235
|
+
const o = e.getBoundingClientRect(), n = i.getBoundingClientRect(), r = o.width > 0, p = n.width > 0, a = o.right - t.left, c = t.right - n.left, m = r && p, u = m ? Math.max(0, t.width - 2 * Math.max(a, c)) : Math.max(0, t.width - a - c);
|
|
232
236
|
return {
|
|
233
237
|
maxWidth: u,
|
|
234
|
-
position: m ?
|
|
238
|
+
position: m ? t.width / 2 : a + u / 2
|
|
235
239
|
};
|
|
236
240
|
}
|
|
237
|
-
|
|
238
|
-
this.#
|
|
241
|
+
#f() {
|
|
242
|
+
this.#t?.disconnect(), this.#t = null;
|
|
239
243
|
}
|
|
240
|
-
|
|
244
|
+
#u() {
|
|
241
245
|
return this.uiContainerRef.value;
|
|
242
246
|
}
|
|
243
|
-
|
|
247
|
+
#b() {
|
|
244
248
|
this.component.view && (this.component.popupComponentEnabled || this.popupElement) && (this.previousViewPopupEnabled ??= this.component.view.popupEnabled, this.component.view.popupEnabled = !1);
|
|
245
249
|
}
|
|
246
|
-
|
|
250
|
+
#d() {
|
|
247
251
|
this.component.view && this.previousViewPopupEnabled !== void 0 && (this.component.view.popupEnabled = this.previousViewPopupEnabled, this.previousViewPopupEnabled = void 0);
|
|
248
252
|
}
|
|
249
|
-
async
|
|
250
|
-
if (this
|
|
251
|
-
this
|
|
253
|
+
async #v(t) {
|
|
254
|
+
if (this.#o(), !this.component.popupDisabled) {
|
|
255
|
+
this.#r++, this.#b();
|
|
252
256
|
try {
|
|
253
257
|
this.popupElement && await this.openPopup({
|
|
254
258
|
fetchFeatures: !0,
|
|
255
|
-
location: { x:
|
|
259
|
+
location: { x: t.x, y: t.y }
|
|
256
260
|
});
|
|
257
261
|
} finally {
|
|
258
|
-
this
|
|
262
|
+
this.#r--, this.#r || this.#d();
|
|
259
263
|
}
|
|
260
264
|
}
|
|
261
265
|
}
|
|
262
|
-
|
|
263
|
-
this
|
|
264
|
-
const { focusRegion:
|
|
265
|
-
!
|
|
266
|
+
#g(t) {
|
|
267
|
+
this.#o(), !(!this.#h || !this.popupElement) && queueMicrotask(() => {
|
|
268
|
+
const { focusRegion: e } = this.component.view;
|
|
269
|
+
!t.defaultPrevented && e && this.openPopup({ fetchFeatures: !0, location: e }).catch(() => {
|
|
266
270
|
});
|
|
267
271
|
});
|
|
268
272
|
}
|
|
269
|
-
|
|
270
|
-
const
|
|
271
|
-
|
|
273
|
+
#E(t) {
|
|
274
|
+
const e = D(t.target, "arcgis-popup")[0];
|
|
275
|
+
e ? this.popupElement = e : this.popupElement !== this.#i && (this.popupElement = void 0, this.#o());
|
|
272
276
|
}
|
|
273
|
-
|
|
274
|
-
return this.webGLError ?
|
|
277
|
+
#w() {
|
|
278
|
+
return this.webGLError ? L`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>` : null;
|
|
275
279
|
}
|
|
276
280
|
//#endregion
|
|
277
281
|
//#region Rendering
|
|
278
282
|
render() {
|
|
279
|
-
return k({ direction: this.direction, popupComponentEnabled: this.component.popupComponentEnabled, slotGroupRefs: this.slotGroupRefs, handlePopupSlotChange: (
|
|
283
|
+
return k({ direction: this.direction, popupComponentEnabled: this.component.popupComponentEnabled, slotGroupRefs: this.slotGroupRefs, handlePopupSlotChange: (t) => this.#E(t), webGLErrorElement: this.#w(), popupElement: this.popupRef });
|
|
280
284
|
}
|
|
281
285
|
}
|
|
282
|
-
function
|
|
283
|
-
|
|
286
|
+
function rt(s) {
|
|
287
|
+
V((t, e) => {
|
|
284
288
|
const i = () => {
|
|
285
|
-
if (
|
|
289
|
+
if (s.attributionMode !== "auto")
|
|
286
290
|
return;
|
|
287
|
-
const o =
|
|
288
|
-
|
|
291
|
+
const o = z(s.el);
|
|
292
|
+
s.view.attributionMode !== o && (s.view.attributionMode = o);
|
|
289
293
|
};
|
|
290
|
-
|
|
291
|
-
o.has("attributionMode") &&
|
|
294
|
+
e.onLifecycle(() => (i(), j(s.el, ["class"], i))), e.onUpdate((o) => {
|
|
295
|
+
o.has("attributionMode") && s.attributionMode === "auto" && i();
|
|
292
296
|
});
|
|
293
297
|
});
|
|
294
298
|
}
|
|
295
|
-
const
|
|
296
|
-
const
|
|
297
|
-
return
|
|
299
|
+
const pt = C((s, t) => {
|
|
300
|
+
const e = P();
|
|
301
|
+
return t.onLifecycle(
|
|
298
302
|
() => f(
|
|
299
303
|
() => {
|
|
300
|
-
const { map: i } =
|
|
304
|
+
const { map: i } = s;
|
|
301
305
|
if (!i || i.destroyed)
|
|
302
306
|
return [];
|
|
303
307
|
const o = [];
|
|
@@ -306,26 +310,26 @@ const pe = P((r, e) => {
|
|
|
306
310
|
}), o;
|
|
307
311
|
},
|
|
308
312
|
(i) => {
|
|
309
|
-
i.length && (
|
|
313
|
+
i.length && (s.loadErrorSources = i, e.emit());
|
|
310
314
|
}
|
|
311
315
|
)
|
|
312
|
-
),
|
|
313
|
-
}),
|
|
314
|
-
(
|
|
315
|
-
const
|
|
316
|
-
return
|
|
316
|
+
), e;
|
|
317
|
+
}), at = C(
|
|
318
|
+
(s, t) => {
|
|
319
|
+
const e = P();
|
|
320
|
+
return t.onLifecycle(
|
|
317
321
|
() => f(
|
|
318
|
-
() =>
|
|
322
|
+
() => s.view?.readyState,
|
|
319
323
|
(i) => {
|
|
320
|
-
(i === "map-content-error" || i === "rendering-error") &&
|
|
324
|
+
(i === "map-content-error" || i === "rendering-error") && e.emit();
|
|
321
325
|
}
|
|
322
326
|
)
|
|
323
|
-
),
|
|
327
|
+
), e;
|
|
324
328
|
}
|
|
325
329
|
);
|
|
326
330
|
export {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
+
st as U,
|
|
332
|
+
at as a,
|
|
333
|
+
rt as b,
|
|
334
|
+
pt as u
|
|
331
335
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { proxyExports as
|
|
3
|
-
import { AccessorController as
|
|
4
|
-
import { isEsriInternalEnv as
|
|
2
|
+
import { proxyExports as s } from "@arcgis/lumina/controllers";
|
|
3
|
+
import { AccessorController as n } from "@arcgis/lumina-toolkit/useAccessor";
|
|
4
|
+
import { isEsriInternalEnv as i } from "@arcgis/toolkit/error";
|
|
5
5
|
import { V as l } from "./useView.js";
|
|
6
6
|
import { watch as a } from "@arcgis/core/core/reactiveUtils.js";
|
|
7
|
-
const u = (t, e) => (o) =>
|
|
8
|
-
class
|
|
7
|
+
const u = (t, e) => (o) => m(o, t);
|
|
8
|
+
class r extends n {
|
|
9
9
|
#o = void 0;
|
|
10
10
|
constructor(e, o) {
|
|
11
11
|
super(e, o), new l(this.component);
|
|
@@ -24,8 +24,8 @@ class s extends i {
|
|
|
24
24
|
this.#o?.remove(), super.hostDestroy();
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
process.env.NODE_ENV !== "production" &&
|
|
28
|
-
const
|
|
27
|
+
process.env.NODE_ENV !== "production" && i() && (r.devOnly$allowedPropNameMismatches = /* @__PURE__ */ new Set(["el", "manager", "open"]));
|
|
28
|
+
const m = s(r);
|
|
29
29
|
export {
|
|
30
30
|
u as m
|
|
31
31
|
};
|