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