@arcgis/map-components 5.2.0-next.146 → 5.2.0-next.148

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.
@@ -1,28 +1,28 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as O } from "../../chunks/runtime.js";
2
+ import { c as N } from "../../chunks/runtime.js";
3
3
  import { css as B, html as a } from "lit";
4
- import { keyed as T } from "lit/directives/keyed.js";
4
+ import { keyed as I } from "lit/directives/keyed.js";
5
5
  import H from "@arcgis/core/support/actions/ActionButton.js";
6
6
  import E from "@arcgis/core/core/Collection.js";
7
7
  import P from "@arcgis/core/popup/FeaturesModel.js";
8
8
  import { LitElement as z, createEvent as y, renderElement as V, nothing as g, safeClassMap as x } from "@arcgis/lumina";
9
9
  import { useDirection as Z, usePropertyChange as U, bypassReadOnly as D } from "@arcgis/lumina/controllers";
10
- import { classes as I } from "@arcgis/toolkit/dom";
10
+ import { classes as T } from "@arcgis/toolkit/dom";
11
11
  import { slotChangeHasContent as S } from "@arcgis/toolkit/dom/slots";
12
- import { createRef as _, ref as f } from "lit/directives/ref.js";
12
+ import { createRef as _, ref as m } from "lit/directives/ref.js";
13
13
  import { initializeProjection as K } from "@arcgis/core/applications/Components/featureUtils.js";
14
14
  import { t as j } from "../../chunks/action-utils.js";
15
15
  import { m as q } from "../../chunks/useViewModel.js";
16
16
  import { renderingSanitizer as w } from "@arcgis/core/applications/Components/sanitizerUtils.js";
17
17
  import { stripHTML as b } from "@arcgis/core/applications/Components/stringUtils.js";
18
- import { substitute as d, formatNumber as $ } from "@arcgis/core/intl.js";
18
+ import { substitute as h, formatNumber as C } from "@arcgis/core/intl.js";
19
19
  import { u as G } from "../../chunks/useT9n.js";
20
- import { when as W, watch as h } from "@arcgis/core/core/reactiveUtils.js";
20
+ import { when as W, watch as u } from "@arcgis/core/core/reactiveUtils.js";
21
21
  import { getGraphicOriginTitle as X } from "@arcgis/core/graphic/getGraphicOriginTitle.js";
22
- import { a as k } from "../../chunks/maybe.js";
22
+ import { a as R } from "../../chunks/maybe.js";
23
23
  import { b as J, a as Q, c as Y } from "../../chunks/keyboard-utils.js";
24
- import { g as R } from "../../chunks/feature-utils.js";
25
- const ee = B`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}.diagnostics-notice{padding:var(--calcite-space-md)}`;
24
+ import { g as k } from "../../chunks/feature-utils.js";
25
+ const ee = B`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 0}.feature-menu-observer{flex:0 0 1px;height:1px;margin-block-start:-1px}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}.diagnostics-notice{padding:var(--calcite-space-md)}`;
26
26
  function te(v) {
27
27
  return v?.declaredClass.startsWith("esri.layers.") ?? !1;
28
28
  }
@@ -38,11 +38,11 @@ class oe extends z {
38
38
  id: "zoom-to-feature",
39
39
  title: "{messages.zoom}"
40
40
  }), this._fetchFeaturesController = null, this._featureMenuIntersectionObserverCallback = ([e]) => {
41
- e?.isIntersecting && this.viewModel.featurePage != null && this.viewModel.featurePage++;
41
+ e?.isIntersecting && this._loadMoreFeatures();
42
42
  }, this._featureMenuIntersectionObserver = new IntersectionObserver(this._featureMenuIntersectionObserverCallback, {
43
43
  root: window.document
44
44
  }), this._featureMenuIntersectionObserverNode = null, this._setFocusAnimationFrameId = null, this._setFocusAnimationFrameResolve = null, this._rootFlowItemNode = _(), this._featureMenuViewportNode = _(), this._actionBarMenuNode = _(), this._flowContainerNode = _(), this._aggregatedFeaturesComponent = _(), this.messages = G(), this._selectedFeatureComponent = _(), this._actionFlowItems = /* @__PURE__ */ new WeakSet(), this._direction = Z(), this._cancelOpenRelatedFeature = () => {
45
- this._openRelatedFeatureAbortController = k(this._openRelatedFeatureAbortController);
45
+ this._openRelatedFeatureAbortController = R(this._openRelatedFeatureAbortController);
46
46
  }, this._spinnerVisible = !1, this._spinnerVisibilityTimeout = null, this._openRelatedFeatureAbortController = null, this.flowItems = new E(), this._aggregatedFeatureCount = 0, this._selectedAggregatedFeatureIndex = -1, this._aggregatedFeaturesLoading = !1, this._hasActionsStartSlotContent = !1, this._hasActionsEndSlotContent = !1, this.viewModel = se(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.autoDestroyDisabled = !1, this.focusTrapEnabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.diagnostics = this.viewModel.diagnostics, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.effectiveHeading = this.viewModel.effectiveHeading, this.featureCount = this.viewModel.featureCount, this.featureMenuOpen = !1, this.featureNavigationTop = !1, this.features = this.viewModel.features, this.featuresPerPage = this.viewModel.featuresPerPage, this.featureItemAbilities = this.viewModel.featureItemAbilities, this.goToOverride = this.viewModel.goToOverride, this.headerActions = new E(), this.heading = this.viewModel.heading, this.headingLevel = 2, this.hideActionBar = !1, this.hideCloseButton = !1, this.hideFeatureMenuHeading = !1, this.hideFeatureNavigation = !1, this.hideFeatureListLayerTitle = !1, this.hideHeading = !1, this.hideSelectFeature = !1, this.hideSpinner = !1, this.hideContent = !1, this.chartAnimationDisabled = this.viewModel.featureItemAbilities?.chartAnimation, this.hideAttachmentsContent = this.viewModel.featureItemAbilities?.attachmentsContent, this.hideEmptyRelationshipContent = !1, this.hideCustomContent = this.viewModel.featureItemAbilities?.customContent, this.hideExpressionContent = !1, this.hideFieldsContent = this.viewModel.featureItemAbilities?.fieldsContent, this.hideMediaContent = this.viewModel.featureItemAbilities?.mediaContent, this.hideRelationshipContent = this.viewModel.featureItemAbilities?.relationshipContent, this.hideTextContent = this.viewModel.featureItemAbilities?.textContent, this.hideUtilityNetworkContent = this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent, this.hideLastEditedInfo = !1, this.highlightDisabled = this.viewModel.highlightEnabled, this.includeDefaultActionsDisabled = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.viewModel.initialDisplayMode, this.location = this.viewModel.location, this.map = this.viewModel.map, this.open = this.viewModel.open, this.responsiveActionsEnabled = !1, this.selectedFeature = this.viewModel.selectedFeature, this.selectedFeatureIndex = this.viewModel.selectedFeatureIndex, this.showCollapseButton = !1, this.spatialReference = this.viewModel.spatialReference, this.state = this.viewModel.state, this.timeZone = this.viewModel.timeZone, this.updateLocationEnabled = this.viewModel.updateLocationEnabled, this.view = this.viewModel.view, this.arcgisClose = y(), this.arcgisPropertyChange = U()("active", "collapsed", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = y(), this.arcgisTriggerAction = y();
47
47
  }
48
48
  static {
@@ -70,7 +70,7 @@ class oe extends z {
70
70
  return this.viewModel.selectedFeatureItem?.heading;
71
71
  }
72
72
  get _selectedFeatureHeadingText() {
73
- return this._selectedFeatureHeading ?? this.messages.untitled;
73
+ return this._selectedFeatureHeading || (this.viewModel.selectedFeatureItem?.state === "loading" ? this.messages.loading : this.messages.untitled);
74
74
  }
75
75
  get _selectedFeatureContent() {
76
76
  return this.viewModel.selectedFeatureItem?.content;
@@ -89,12 +89,12 @@ class oe extends z {
89
89
  }
90
90
  async fetchFeatures(e, t) {
91
91
  this._cancelFetchingFeatures();
92
- const { signal: i } = t ?? {}, s = new AbortController(), { signal: n } = s, r = i ? AbortSignal.any([n, i]) : n;
92
+ const { signal: i } = t ?? {}, s = new AbortController(), { signal: n } = s, o = i ? AbortSignal.any([n, i]) : n;
93
93
  this._fetchFeaturesController = s, !e && this.view && this.location && (await K(this.location.spatialReference, this.view.spatialReference, null, {
94
- signal: r
94
+ signal: o
95
95
  }), e = this.view.toScreen(this.location) ?? void 0), e && await this.viewModel.fetchFeatures(e, {
96
96
  ...t,
97
- signal: r
97
+ signal: o
98
98
  });
99
99
  }
100
100
  next() {
@@ -122,30 +122,39 @@ class oe extends z {
122
122
  }
123
123
  updated() {
124
124
  const e = this._selectedFeatureComponent.value ?? void 0;
125
- this.selectedFeatureComponent !== e && D(() => this.selectedFeatureComponent = e);
125
+ this.selectedFeatureComponent !== e && D(() => this.selectedFeatureComponent = e), this.componentOnReady().then(() => {
126
+ const t = this._featureMenuIntersectionObserverNode;
127
+ this.isConnected && t && (this._featureMenuIntersectionObserver.unobserve(t), this._featureMenuIntersectionObserver.observe(t));
128
+ });
126
129
  }
127
130
  loaded() {
128
131
  this.manager.onLifecycle(() => [
129
132
  W(() => [this.initialDisplayMode === "list" && !!this.viewModel?.selectedFeature, this.viewModel?.active], () => {
130
133
  this.setFocus();
131
134
  }),
132
- h(() => [this.flowItems?.length, this.featureMenuOpen], () => {
135
+ u(() => [this.flowItems?.length, this.featureMenuOpen], () => {
133
136
  this.setFocus();
134
137
  }),
135
- h(() => this.viewModel?.selectedFeatureIndex, (e, t) => this._selectedFeatureIndexUpdated(e, t)),
136
- h(() => this.viewModel?.view?.scale, () => this._viewScaleChange()),
137
- h(() => this.viewModel?.view, (e, t) => t && this._viewChange()),
138
- h(() => this._spinnerEl?.screenLocation, () => this._closeOpenActionMenu()),
139
- h(() => this.selectedFeatureComponent?.viewModel, () => this._removeFlowItems()),
140
- h(() => this.viewModel?.featureItems, () => this._featureMenuViewportScrollTop()),
141
- h(() => this.flowItems.toArray(), () => this._handleFlowItemsChange(), { initial: !0 }),
142
- h(() => this.viewModel.aggregatedFeaturesEnabled, (e) => {
138
+ u(() => this.viewModel?.selectedFeatureIndex, (e, t) => this._selectedFeatureIndexUpdated(e, t)),
139
+ u(() => this.viewModel?.view?.scale, () => this._viewScaleChange()),
140
+ u(() => this.viewModel?.view, (e, t) => t && this._viewChange()),
141
+ u(() => this._spinnerEl?.screenLocation, () => this._closeOpenActionMenu()),
142
+ u(() => this.selectedFeatureComponent?.viewModel, () => this._removeFlowItems()),
143
+ u(() => [this.viewModel?.features.at(0), this.viewModel?.featureCount ?? 0], ([e, t], i) => {
144
+ const [s, n] = i ?? [void 0, 0];
145
+ (e !== s || t < n) && this._featureMenuViewportScrollTop();
146
+ }),
147
+ u(() => [this.featureMenuOpen, this.initialDisplayMode, this.open], () => {
148
+ this.viewModel.featureMenuOpen = this.featureMenuOpen, this.open && (this.featureMenuOpen || this.initialDisplayMode === "list") && (this.viewModel.featurePage = 1);
149
+ }, { initial: !0 }),
150
+ u(() => this.flowItems.toArray(), () => this._handleFlowItemsChange(), { initial: !0 }),
151
+ u(() => this.viewModel.aggregatedFeaturesEnabled, (e) => {
143
152
  e || (this._aggregatedFeatureCount = 0, this._selectedAggregatedFeatureIndex = -1, this._aggregatedFeaturesLoading = !1, this._removeFlowItems());
144
153
  }),
145
- h(() => this.referenceElement, (e, t) => {
154
+ u(() => this.referenceElement, (e, t) => {
146
155
  this._removeSpinner(t), this._createSpinner();
147
156
  }, { initial: !0 }),
148
- h(() => [
157
+ u(() => [
149
158
  this.hideSpinner,
150
159
  this.viewModel?.view,
151
160
  this.viewModel?.location,
@@ -158,6 +167,10 @@ class oe extends z {
158
167
  disconnectedCallback() {
159
168
  super.disconnectedCallback(), this._clearSpinnerVisibilityTimeout(), this._cancelSetFocusAnimationFrame(), this._removeSpinner(this.referenceElement);
160
169
  }
170
+ _loadMoreFeatures() {
171
+ const { viewModel: e } = this, { featurePage: t, featuresPerPage: i, features: s } = e;
172
+ e.open && (this.initialDisplayMode === "list" || this.featureMenuOpen) && t != null && t * i < s.length && (e.featurePage = t + 1);
173
+ }
161
174
  _resolveSetFocusAnimationFrame() {
162
175
  const e = this._setFocusAnimationFrameResolve;
163
176
  this._setFocusAnimationFrameResolve = null, e?.();
@@ -166,21 +179,19 @@ class oe extends z {
166
179
  this._setFocusAnimationFrameId != null && (cancelAnimationFrame(this._setFocusAnimationFrameId), this._setFocusAnimationFrameId = null), this._resolveSetFocusAnimationFrame();
167
180
  }
168
181
  _cancelFetchingFeatures() {
169
- this._fetchFeaturesController = k(this._fetchFeaturesController);
182
+ this._fetchFeaturesController = R(this._fetchFeaturesController);
170
183
  }
171
184
  _handleClose() {
172
185
  this.close(), this.arcgisClose.emit();
173
186
  }
174
187
  _groupResultsByLayer() {
175
- const { featureItems: e } = this.viewModel, t = /* @__PURE__ */ new Map();
176
- return e.forEach((i) => {
177
- const s = i?.graphic;
178
- if (!s)
179
- return;
180
- const n = R(s), r = te(n) ? n : null;
181
- let o = t.get(r);
182
- o || (o = [], t.set(r, o)), o.push(i);
183
- }), t;
188
+ const { features: e, featurePage: t, featuresPerPage: i } = this.viewModel, s = /* @__PURE__ */ new Map(), n = Math.min((t ?? 0) * i, e.length);
189
+ for (let o = 0; o < n; o++) {
190
+ const r = e[o], l = k(r), c = te(l) ? l : null;
191
+ let d = s.get(c);
192
+ d || (d = [], s.set(c, d)), d.push(o);
193
+ }
194
+ return s;
184
195
  }
185
196
  _handleCollapseToggle() {
186
197
  this.collapsed = !this.collapsed;
@@ -200,8 +211,8 @@ class oe extends z {
200
211
  const { labelPointExecute: n } = await import("@arcgis/core/geometry/operators/labelPointOperator.js");
201
212
  if (t.signal.aborted)
202
213
  return;
203
- const r = n(s);
204
- r != null && (this.location = r), this.features = [i], this.open = !0, this._openRelatedFeatureAbortController = null;
214
+ const o = n(s);
215
+ o != null && (this.location = o), this.features = [i], this.open = !0, this._openRelatedFeatureAbortController = null;
205
216
  }
206
217
  _handlePaginationMenuButton() {
207
218
  this._updateFeatureMenu();
@@ -241,18 +252,22 @@ class oe extends z {
241
252
  this._featureMenuIntersectionObserverNode && this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode);
242
253
  }
243
254
  _featureMenuIntersectionObserverCreated(e) {
244
- this._unobserveFeatureMenuObserver(), e && this._featureMenuIntersectionObserver.observe(e), this._featureMenuIntersectionObserverNode = e;
255
+ e !== this._featureMenuIntersectionObserverNode && (this._unobserveFeatureMenuObserver(), this._featureMenuIntersectionObserverNode = e ?? null);
245
256
  }
246
257
  _getActionLabel(e, t) {
247
258
  const { messages: i } = this;
248
- return e.id === "zoom-to-feature" ? d(i.zoomLabel ?? "", {
249
- messages: i,
250
- title: t ? b(t.heading ?? i.untitled ?? "") : this._selectedFeatureHeadingText
251
- }) : null;
259
+ if (e.id === "zoom-to-feature") {
260
+ const s = t ? b(t.heading || (("state" in t && t.state === "loading" ? i.loading : i.untitled) ?? "")) : this._selectedFeatureHeadingText;
261
+ return h(i.zoomLabel ?? "", {
262
+ messages: i,
263
+ title: s
264
+ });
265
+ }
266
+ return null;
252
267
  }
253
268
  _getActionTitle(e, t) {
254
- const { messages: i } = this, s = t ? t.graphic : this.selectedFeature, { id: n } = e, r = s?.attributes, o = e.title ?? "", l = n === "zoom-to-feature" ? d(o, { messages: i }) : n === "remove-selected-feature" ? d(o, { messages: i }) : n === "zoom-to-aggregated-features" ? d(o, { messages: i }) : n === "browse-aggregated-features" ? d(o, { messages: i }) : e.title;
255
- return l && r ? d(l, r) : l ?? "";
269
+ const { messages: i } = this, s = t ? t.graphic : this.selectedFeature, { id: n } = e, o = s?.attributes, r = e.title ?? "", l = n === "zoom-to-feature" ? h(r, { messages: i }) : n === "remove-selected-feature" ? h(r, { messages: i }) : n === "zoom-to-aggregated-features" ? h(r, { messages: i }) : n === "browse-aggregated-features" ? h(r, { messages: i }) : e.title;
270
+ return l && o ? h(l, o) : l ?? "";
256
271
  }
257
272
  _onMainKeydown(e) {
258
273
  const { key: t } = e;
@@ -273,7 +288,7 @@ class oe extends z {
273
288
  j(e, this.viewModel, i), this.arcgisTriggerAction.emit({ action: e });
274
289
  }
275
290
  _viewScaleChange() {
276
- const { selectedFeature: e } = this, t = R(e);
291
+ const { selectedFeature: e } = this, t = k(e);
277
292
  !e?.isAggregate || ie(t) !== "cluster" || (this.viewModel.aggregatedFeaturesEnabled = !1, this.open = !1, this.clear());
278
293
  }
279
294
  _viewChange() {
@@ -344,7 +359,7 @@ class oe extends z {
344
359
  if (t && !t.allActions)
345
360
  return [];
346
361
  const s = t ? t.isFeatureFromTable : i?.isFeatureFromTable;
347
- return (t?.allActions ?? i?.allActions ?? (!e && this.viewModel.includeDefaultActions ? this.viewModel.defaultActions.concat(this.viewModel.actions) : this.viewModel.actions)).toArray().filter((o) => !(e && o.id === "browse-aggregated-features") && !(s && !this.location && o.id === this._zoomToFeature.id));
362
+ return (t?.allActions ?? i?.allActions ?? (!e && this.viewModel.includeDefaultActions ? this.viewModel.defaultActions.concat(this.viewModel.actions) : this.viewModel.actions)).toArray().filter((r) => !(e && r.id === "browse-aggregated-features") && !(s && !this.location && r.id === this._zoomToFeature.id));
348
363
  }
349
364
  render() {
350
365
  return a`<div class="root">${this._renderContentContainer()}</div>`;
@@ -363,36 +378,31 @@ class oe extends z {
363
378
  }
364
379
  _renderFeaturePaginationText(e, t) {
365
380
  const { messages: i } = this;
366
- return a`<div class="pagination-text">${d(i.pageText ?? "", {
367
- index: $(t + 1),
368
- total: $(e)
381
+ return a`<div class="pagination-text">${h(i.pageText ?? "", {
382
+ index: C(t + 1),
383
+ total: C(e)
369
384
  })}</div>`;
370
385
  }
371
386
  _renderFeatureMenuButton() {
372
387
  const { messages: e, viewModel: t } = this, { featureCount: i, streamingFeatures: s, selectedFeatureIndex: n } = t;
373
- return a`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures ?? ""} .loading=${s} @click=${this._handlePaginationMenuButton} .text=${d(e.pageText ?? "", {
374
- index: $(n + 1),
375
- total: $(i)
388
+ return a`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures ?? ""} .loading=${s} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText ?? "", {
389
+ index: C(n + 1),
390
+ total: C(i)
376
391
  })} text-enabled title=${e.showAllFeatures ?? "" ?? g}></calcite-action>`;
377
392
  }
378
393
  _renderPagination(e, t) {
379
394
  const { previous: i, next: s } = this.messages;
380
395
  return a`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${i ?? ""} @click=${e} .text=${i ?? ""} title=${i ?? "" ?? g}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${s ?? ""} @click=${t} .text=${s ?? ""} title=${s ?? "" ?? g}></calcite-action></calcite-action-group></calcite-action-bar>`;
381
396
  }
382
- _renderFeatureMenuItem(e, t) {
383
- const { initialDisplayMode: i } = this, { selectedFeatureItem: s } = this.viewModel, n = e === s;
384
- return a`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${() => this._setActiveFeature(t)} @mouseleave=${this._removeActiveFeature} @mouseover=${() => this._setActiveFeature(t)} .selected=${n} @calciteListItemSelect=${() => this._selectFeature(t)}><span .innerHTML=${(w.sanitize(e.heading) || this.messages.untitled) ?? ""} slot=content></span>${i === "list" ? a`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>` : null}</calcite-list-item>`;
397
+ _renderFeatureMenuItem(e) {
398
+ const { initialDisplayMode: t } = this, { featureModels: i, selectedFeatureIndex: s } = this.viewModel, n = i[e], o = e === s;
399
+ return a`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${() => this._setActiveFeature(e)} @mouseleave=${this._removeActiveFeature} @mouseover=${() => this._setActiveFeature(e)} .selected=${o} @calciteListItemSelect=${() => this._selectFeature(e)}><span .innerHTML=${(w.sanitize(n?.heading ?? "") || (n?.state === "loading" ? this.messages.loading : this.messages.untitled)) ?? ""} slot=content></span>${t === "list" ? a`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>` : null}</calcite-list-item>`;
385
400
  }
386
401
  _renderFeatureMenu() {
387
- const { messages: e, viewModel: t } = this, i = this._groupResultsByLayer(), s = /* @__PURE__ */ new Map();
388
- t.featureItems.forEach((r, o) => s.set(r, o));
389
- const n = this.initialDisplayMode === "list" ? "none" : "single";
390
- return t.featureItems.length ? a`<calcite-list display-mode=flat .label=${e?.featuresList ?? ""} selection-appearance=icon .selectionMode=${n}>${Array.from(i.keys(), (r) => {
391
- const o = i.get(r)?.map((c) => {
392
- const u = s.get(c);
393
- return u == null ? null : this._renderFeatureMenuItem(c, u);
394
- }), l = r ? r.title ?? this.messages.untitled : null;
395
- return !this.hideFeatureListLayerTitle && l !== null ? T(r ?? "map-graphics", a`<calcite-list-item-group .heading=${l}>${o}</calcite-list-item-group>`) : o;
402
+ const { messages: e, viewModel: t } = this, i = this._groupResultsByLayer(), s = this.initialDisplayMode === "list" ? "none" : "single";
403
+ return t.features.length ? a`<calcite-list display-mode=flat .label=${e?.featuresList ?? ""} selection-appearance=icon .selectionMode=${s}>${Array.from(i, ([n, o]) => {
404
+ const r = o.map((c) => this._renderFeatureMenuItem(c)), l = n ? n.title ?? this.messages.untitled : null;
405
+ return !this.hideFeatureListLayerTitle && l !== null ? I(n ?? "map-graphics", a`<calcite-list-item-group .heading=${l}>${r}</calcite-list-item-group>`) : r;
396
406
  })}</calcite-list>` : null;
397
407
  }
398
408
  _renderHeaderAction(e) {
@@ -403,14 +413,14 @@ class oe extends z {
403
413
  return this.headerActions.map((e) => this._renderHeaderAction(e)).toArray();
404
414
  }
405
415
  _renderContentFeature(e) {
406
- const { headingLevel: t, hideCloseButton: i, _isCollapsed: s, _collapseEnabled: n, featureNavigationTop: r, initialDisplayMode: o, selectedFeature: l, hideHeading: c } = this, { active: u, selectedFeatureItem: m, content: C } = this.viewModel, p = this._getHeading();
407
- if (o === "list" && !l)
416
+ const { headingLevel: t, hideCloseButton: i, _isCollapsed: s, _collapseEnabled: n, featureNavigationTop: o, initialDisplayMode: r, selectedFeature: l, hideHeading: c } = this, { active: d, selectedFeatureItem: f, content: M } = this.viewModel, p = this._getHeading();
417
+ if (r === "list" && !l)
408
418
  return null;
409
- const F = m ? !m.content : !C;
410
- return a`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${x(I({
419
+ const F = f ? !f.content : !M;
420
+ return a`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${x(T({
411
421
  "content-feature": !0,
412
422
  "flow-item-collapsed": s
413
- }))} .closable=${!i} .closed=${!u} .collapsed=${s} .collapseDirection=${this.collapseDirection ?? (r ? "down" : "up")} .collapsible=${n} .headingLevel=${t} .selected=${e} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand }} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!c && p ? b(p) : void 0} ${f(this._rootFlowItemNode)}>${this._renderHeader()}${!c && p ? a`<div slot=heading><div .innerHTML=${w.sanitize(p ?? "") ?? ""}></div></div>` : null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${x(I("container", "content-container", {
423
+ }))} .closable=${!i} .closed=${!d} .collapsed=${s} .collapseDirection=${this.collapseDirection ?? (o ? "down" : "up")} .collapsible=${n} .headingLevel=${t} .selected=${e} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand }} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!c && p ? b(p) : void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!c && p ? a`<div slot=heading><div .innerHTML=${w.sanitize(p ?? "") ?? ""}></div></div>` : null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${x(T("container", "content-container", {
414
424
  "content-hidden": F
415
425
  }))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`;
416
426
  }
@@ -431,49 +441,49 @@ class oe extends z {
431
441
  return i?.size ? a`<calcite-notice class="diagnostics-notice" open kind=info scale=s><span slot=title>${e.maxRecordCountHeading}</span><div slot=message>${i.size <= ae ? this._renderDiagnosticsList(i) : this._renderDiagnosticsMultipleLayers()}</div></calcite-notice>` : null;
432
442
  }
433
443
  _renderFeatureMenuContainer() {
434
- const { viewModel: e, hideCloseButton: t, featureMenuTitle: i, messages: s, initialDisplayMode: n, featureMenuOpen: r, _featureFlowItemSelected: o, _collapseEnabled: l, _isCollapsed: c, featureNavigationTop: u, headingLevel: m } = this, { active: C, featureItems: p, streamingFeatures: F } = e, M = i ?? s.selectFeature, A = d(s.backLabel ?? "", {
444
+ const { viewModel: e, hideCloseButton: t, featureMenuTitle: i, messages: s, initialDisplayMode: n, featureMenuOpen: o, _featureFlowItemSelected: r, _collapseEnabled: l, _isCollapsed: c, featureNavigationTop: d, headingLevel: f } = this, { active: M, features: p, streamingFeatures: F } = e, $ = i ?? s.selectFeature, A = h(s.backLabel ?? "", {
435
445
  title: this._selectedFeatureHeadingText
436
446
  });
437
- if (n === "feature" && !r)
447
+ if (n === "feature" && !o)
438
448
  return null;
439
- const L = !o;
440
- return a`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${x(I({
449
+ const L = !r;
450
+ return a`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${x(T({
441
451
  "flow-item-collapsed": c
442
- }))} .closable=${!t} .closed=${!C} .collapsed=${n === "list" && c} .collapseDirection=${this.collapseDirection ?? (u ? "down" : "up")} .collapsible=${n === "list" && l} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand, back: A }} .description=${this.hideFeatureMenuHeading ? void 0 : d(s.total ?? "", {
452
+ }))} .closable=${!t} .closed=${!M} .collapsed=${n === "list" && c} .collapseDirection=${this.collapseDirection ?? (d ? "down" : "up")} .collapsible=${n === "list" && l} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand, back: A }} .description=${this.hideFeatureMenuHeading ? void 0 : h(s.total ?? "", {
443
453
  total: p.length
444
- })} .heading=${this.hideFeatureMenuHeading ? void 0 : M} .headingLevel=${m} .loading=${e.waitingForContents} .selected=${L} @calciteFlowItemBack=${(N) => {
445
- N.preventDefault(), this._handleFeatureMenuBack();
446
- }} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${f(this._featureMenuViewportNode)}>${n === "list" ? this._renderHeaderActions() : null}${F ? a`<calcite-loader class="loader" inline .label=${s.loading ?? ""} slot=header-actions-end></calcite-loader>` : null}${this._renderDiagnostics()}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${f(this._featureMenuIntersectionObserverCreated)}></div>${n === "feature" ? a`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${A} title=${A ?? g}>${s.back}</calcite-button>` : null}</calcite-flow-item>`;
454
+ })} .heading=${this.hideFeatureMenuHeading ? void 0 : $} .headingLevel=${f} .loading=${e.waitingForResult} .selected=${L} @calciteFlowItemBack=${(O) => {
455
+ O.preventDefault(), this._handleFeatureMenuBack();
456
+ }} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${n === "list" ? this._renderHeaderActions() : null}${F ? a`<calcite-loader class="loader" inline .label=${s.loading ?? ""} slot=header-actions-end></calcite-loader>` : null}${this._renderDiagnostics()}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" aria-hidden=true ${m(this._featureMenuIntersectionObserverCreated)}></div>${n === "feature" ? a`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${A} title=${A ?? g}>${s.back}</calcite-button>` : null}</calcite-flow-item>`;
447
457
  }
448
458
  _renderFlowItem(e, t) {
449
- const { hideCloseButton: i, active: s, hideHeading: n, hideSelectFeature: r, messages: o } = this, l = o.returnToInitialFeature ?? "", c = o?.selectFeature, u = "showAllEnabled" in e ? e.showAllEnabled : !1, m = e.flowType === "feature" || e.flowType === "feature-association" || e.flowType === "feature-relationship" && !u, p = e.flowType !== "feature" && m && "isFeatureFromTable" in e && !e.isFeatureFromTable && !r, F = e.flowType === "feature" && this.viewModel.aggregatedFeaturesEnabled ? a`<div class="footer" slot=footer>${this._renderPagination(() => {
459
+ const { hideCloseButton: i, active: s, hideHeading: n, hideSelectFeature: o, messages: r } = this, l = r.returnToInitialFeature ?? "", c = r?.selectFeature, d = "showAllEnabled" in e ? e.showAllEnabled : !1, f = e.flowType === "feature" || e.flowType === "feature-association" || e.flowType === "feature-relationship" && !d, p = e.flowType !== "feature" && f && "isFeatureFromTable" in e && !e.isFeatureFromTable && !o, F = e.flowType === "feature" && this.viewModel.aggregatedFeaturesEnabled ? a`<div class="footer" slot=footer>${this._renderPagination(() => {
450
460
  this._aggregatedFeaturesComponent.value?.previous();
451
461
  }, () => {
452
462
  this._aggregatedFeaturesComponent.value?.next();
453
463
  })}${this._renderFeaturePaginationText(this._aggregatedFeatureCount, this._selectedAggregatedFeatureIndex)}</div>` : null;
454
- return a`<calcite-flow-item .closable=${!i} .closed=${!s} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${b(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${n ? void 0 : b(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${(M) => {
455
- M.preventDefault(), this._handleDrillInBackClick();
456
- }} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${n ? null : a`<div slot=heading><div .innerHTML=${w.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${w.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${l ?? ""} title=${l ?? "" ?? g}></calcite-action>${p ? a`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${c ?? ""} title=${c ?? g}></calcite-action>` : null}${m && this._renderActionBar(e) || ""}<div class="container">${e}</div>${F}</calcite-flow-item>`;
464
+ return a`<calcite-flow-item .closable=${!i} .closed=${!s} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${b(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${n ? void 0 : b(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${($) => {
465
+ $.preventDefault(), this._handleDrillInBackClick();
466
+ }} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${n ? null : a`<div slot=heading><div .innerHTML=${w.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${w.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${l ?? ""} title=${l ?? "" ?? g}></calcite-action>${p ? a`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${c ?? ""} title=${c ?? g}></calcite-action>` : null}${f && this._renderActionBar(e) || ""}<div class="container">${e}</div>${F}</calcite-flow-item>`;
457
467
  }
458
468
  _renderContentContainer() {
459
- const e = this.flowItems?.toArray(), t = e.length > 0, i = this.viewModel.aggregatedFeaturesEnabled && this.viewModel.selectedFeature?.isAggregate && !t, s = i && e.length === 0, n = e.length === 0 && this._featureFlowItemSelected && !i, r = e?.map((c, u) => this._renderFlowItem(c, this._featureFlowItemSelected && u === e.length - 1)), o = this._renderBrowseAggregateContainer(!!s), l = this.initialDisplayMode === "list" ? [this._renderFeatureMenuContainer(), this._renderContentFeature(n)] : [this._renderContentFeature(n), this._renderFeatureMenuContainer()];
460
- return a`<calcite-flow ${f(this._flowContainerNode)}>${l}${o}${r}</calcite-flow>`;
469
+ const e = this.flowItems?.toArray(), t = e.length > 0, i = this.viewModel.aggregatedFeaturesEnabled && this.viewModel.selectedFeature?.isAggregate && !t, s = i && e.length === 0, n = e.length === 0 && this._featureFlowItemSelected && !i, o = e?.map((c, d) => this._renderFlowItem(c, this._featureFlowItemSelected && d === e.length - 1)), r = this._renderBrowseAggregateContainer(!!s), l = this.initialDisplayMode === "list" ? [this._renderFeatureMenuContainer(), this._renderContentFeature(n)] : [this._renderContentFeature(n), this._renderFeatureMenuContainer()];
470
+ return a`<calcite-flow ${m(this._flowContainerNode)}>${l}${r}${o}</calcite-flow>`;
461
471
  }
462
472
  _renderBrowseAggregateContainer(e) {
463
- const { hideCloseButton: t, active: i, messages: s } = this, { selectedFeature: n } = this.viewModel, r = this.viewModel.aggregatedFeaturesEnabled && n?.isAggregate, o = d(s.backLabel ?? "", {
473
+ const { hideCloseButton: t, active: i, messages: s } = this, { selectedFeature: n } = this.viewModel, o = this.viewModel.aggregatedFeaturesEnabled && n?.isAggregate, r = h(s.backLabel ?? "", {
464
474
  title: this._selectedFeatureHeadingText
465
475
  });
466
- return r ? a`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!i} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount ? d(s.total ?? "", {
476
+ return o ? a`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!i} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount ? h(s.total ?? "", {
467
477
  total: this._aggregatedFeatureCount
468
478
  }) : ""} .heading=${s.aggregatedFeatures} @calciteFlowItemBack=${(l) => {
469
479
  l.preventDefault(), this.viewModel.aggregatedFeaturesEnabled = !1;
470
480
  }} .messageOverrides=${{
471
- back: o
472
- }} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${n ?? void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel + 1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map ?? void 0} .messageOverrides=${this.messageOverrides} .messages=${s} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} .view=${this.view ?? void 0} ${f(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${() => this.viewModel.aggregatedFeaturesEnabled = !1} slot=footer-start scale=s width=full .label=${o} title=${o ?? g}>${s.back}</calcite-button></calcite-flow-item>` : null;
481
+ back: r
482
+ }} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${n ?? void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel + 1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map ?? void 0} .messageOverrides=${this.messageOverrides} .messages=${s} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} .view=${this.view ?? void 0} ${m(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${() => this.viewModel.aggregatedFeaturesEnabled = !1} slot=footer-start scale=s width=full .label=${r} title=${r ?? g}>${s.back}</calcite-button></calcite-flow-item>` : null;
473
483
  }
474
484
  _renderActionBar(e) {
475
485
  const t = this.#e(e), i = !!t.length || this._hasActionsStartSlotContent || this._hasActionsEndSlotContent, s = this._isCollapsed || this.hideActionBar || !i;
476
- return a`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s ? void 0 : "action-bar") ?? g} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${f(this._actionBarMenuNode)}>${this._renderActions(t, e)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`;
486
+ return a`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s ? void 0 : "action-bar") ?? g} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${m(this._actionBarMenuNode)}>${this._renderActions(t, e)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`;
477
487
  }
478
488
  _renderActions(e, t) {
479
489
  return e.map((i) => {
@@ -483,10 +493,10 @@ class oe extends z {
483
493
  }
484
494
  _renderContent() {
485
495
  const { content: e, selectedFeatureItem: t, includeDefaultActions: i, actions: s } = this.viewModel;
486
- return t ? a`<arcgis-feature-next .actions=${s} .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel + 1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .includeDefaultActions=${i} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${f(this._selectedFeatureComponent)}></arcgis-feature-next>` : typeof e == "string" ? T(e, a`<div .innerHTML=${w.sanitize(e) ?? ""}></div>`) : e ?? null;
496
+ return t ? a`<arcgis-feature-next .actions=${s} .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel + 1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .includeDefaultActions=${i} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature-next>` : typeof e == "string" ? I(e, a`<div .innerHTML=${w.sanitize(e) ?? ""}></div>`) : e ?? null;
487
497
  }
488
498
  }
489
- O("arcgis-features-next", oe);
499
+ N("arcgis-features-next", oe);
490
500
  export {
491
501
  oe as ArcgisFeaturesNext
492
502
  };
@@ -33,7 +33,7 @@ import type { LayerView2DFor, ResizeAlign } from "@arcgis/core/views/2d/types.js
33
33
  import type { DoubleClickEvent, DoubleTapDragEvent, FocusRegionSelectEvent, VerticalTwoFingerDragEvent, PointerUpEvent, PointerMoveEvent, PointerLeaveEvent, PointerEnterEvent, PointerDownEvent, ViewMouseWheelEvent, LayerViewDestroyEvent, LayerViewCreateErrorEvent, LayerViewCreateEvent, KeyUpEvent, KeyDownEvent, ImmediateDoubleClickEvent, ImmediateClickEvent, HoldEvent, DragEvent, ClickEvent } from "@arcgis/core/views/input/types.js";
34
34
  import type { AnalysisViewDestroyEvent, AnalysisViewCreateErrorEvent, AnalysisViewCreateEvent, ToScreenOptions2D, Screenshot, UserSettings, ViewHitTestResult, HitTestOptions, GoToOptions2D, GoToTarget2D } from "@arcgis/core/views/types.js";
35
35
  import type { AnalysisView2DUnion } from "@arcgis/core/views/2d/analysis/types.js";
36
- import type { ScreenPoint, ScreenRect } from "@arcgis/core/core/types.js";
36
+ import type { ScreenPoint, ScreenPolygon, ScreenRect } from "@arcgis/core/core/types.js";
37
37
  import type { FetchPopupFeaturesOptions, ViewPopupOpenOptions } from "@arcgis/core/views/PopupView.js";
38
38
  import type { ReadonlyCollection } from "@arcgis/core/core/Collection.js";
39
39
  import type { ViewPadding } from "@arcgis/core/views/ui/types.js";
@@ -1154,7 +1154,7 @@ export abstract class ArcgisMap extends LitElement {
1154
1154
  * });
1155
1155
  * ```
1156
1156
  */
1157
- hitTest(hitTarget: MouseEvent | ScreenPoint | ScreenRect, options?: HitTestOptions): Promise<ViewHitTestResult>;
1157
+ hitTest(hitTarget: MouseEvent | ScreenPoint | ScreenPolygon | ScreenRect, options?: HitTestOptions): Promise<ViewHitTestResult>;
1158
1158
  /**
1159
1159
  * Opens the popup at the given location with content defined either explicitly with content or driven
1160
1160
  * from the PopupTemplate of input features.
@@ -5,11 +5,11 @@ import P from "@arcgis/core/popup/FeaturesModel.js";
5
5
  import { u as O } from "../../chunks/useT9n.js";
6
6
  import { useDirection as F, usePropertyChange as $ } from "@arcgis/lumina/controllers";
7
7
  import { m as S } from "../../chunks/useViewModel.js";
8
- import { LitElement as N, createEvent as _, safeStyleMap as L, safeClassMap as y } from "@arcgis/lumina";
9
- import { stripHTML as T } from "@arcgis/core/applications/Components/stringUtils.js";
8
+ import { LitElement as T, createEvent as _, safeStyleMap as N, safeClassMap as y } from "@arcgis/lumina";
9
+ import { stripHTML as L } from "@arcgis/core/applications/Components/stringUtils.js";
10
10
  import { classes as x } from "@arcgis/toolkit/dom";
11
11
  import { createRef as g, ref as m } from "lit/directives/ref.js";
12
- import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
12
+ import { watch as h } from "@arcgis/core/core/reactiveUtils.js";
13
13
  import H from "@arcgis/core/support/actions/ActionButton.js";
14
14
  import { t as B } from "../../chunks/screenLocation.js";
15
15
  import "../arcgis-search-result-renderer/customElement.js";
@@ -24,9 +24,9 @@ const I = S(P), D = {
24
24
  width: 544
25
25
  }
26
26
  };
27
- class R extends N {
27
+ class R extends T {
28
28
  constructor() {
29
- super(...arguments), this._direction = F(), this._featuresComponent = g(), this._dockAction = new H({ id: "popup-dock-action" }), this._mainContainerNode = g(), this._pointerNode = g(), this.messages = O(), this.viewModel = I(this), this._containerNode = g(), this._popupResizeObserver = new ResizeObserver(() => this._positionContainer()), this._positionContainer = () => {
29
+ super(...arguments), this._direction = F(), this._headingText = { html: "", text: "" }, this._featuresComponent = g(), this._dockAction = new H({ id: "popup-dock-action" }), this._mainContainerNode = g(), this._pointerNode = g(), this.messages = O(), this.viewModel = I(this), this._containerNode = g(), this._popupResizeObserver = new ResizeObserver(() => this._positionContainer()), this._positionContainer = () => {
30
30
  this.positionStyle = this._calculatePositionStyle();
31
31
  }, this.screenLocation = B(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.alignment = "auto", this.autoCloseEnabled = !1, this.autoDestroyDisabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.diagnostics = this.viewModel.diagnostics, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.dockEnabled = !1, this.effectiveHeading = this.viewModel.effectiveHeading, this.featureCount = this.viewModel.featureCount, this.featureMenuOpen = !1, this.features = this.viewModel.features, this.featureStream = this.viewModel.featureStream, this.focusTrapDisabled = !1, this.goToOverride = this.viewModel.goToOverride, this.heading = this.viewModel.heading, this.headingLevel = 2, this.hideActionBar = !1, this.hideCloseButton = !1, this.hideCollapseButton = !1, this.hideFeatureMenuHeading = !1, this.hideFeatureNavigation = !1, this.hideFeatureListLayerTitle = !1, this.hideEmptyRelationshipContent = !1, this.hideHeading = !1, this.hideSpinner = !1, this.highlightDisabled = this.viewModel.highlightEnabled, this.includeDefaultActionsDisabled = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.viewModel.initialDisplayMode, this.location = this.viewModel.location, this.open = this.viewModel.open, this.selectedFeature = this.viewModel.selectedFeature, this.selectedFeatureIndex = this.viewModel.selectedFeatureIndex, this.state = this.viewModel.state, this.topLayerDisabled = !1, this.updateLocationEnabled = this.viewModel.updateLocationEnabled, this.view = this.viewModel.view, this.arcgisPropertyChange = $()("active", "collapsed", "currentAlignment", "dockEnabled", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = _(), this.arcgisClose = _(), this.arcgisTriggerAction = _();
32
32
  }
@@ -90,13 +90,13 @@ class R extends N {
90
90
  }
91
91
  loaded() {
92
92
  this.manager.onLifecycle(() => [
93
- p(() => [this.viewModel?.view?.widthBreakpoint, this._effectiveDockEnabled, this._direction], () => this._handleDockIcon(), { initial: !0 }),
94
- p(() => [this._effectiveDockEnabled, this.messages?.undock, this.messages?.dock], () => this._handleDockEnabled(), { initial: !0 }),
95
- p(() => [this.dockOptions, this._featuresComponent.value, this.viewModel?.view?.focusRegionEnabled], () => {
93
+ h(() => [this.viewModel?.view?.widthBreakpoint, this._effectiveDockEnabled, this._direction], () => this._handleDockIcon(), { initial: !0 }),
94
+ h(() => [this._effectiveDockEnabled, this.messages?.undock, this.messages?.dock], () => this._handleDockEnabled(), { initial: !0 }),
95
+ h(() => [this.dockOptions, this._featuresComponent.value, this.viewModel?.view?.focusRegionEnabled], () => {
96
96
  const { _dockAction: t, dockOptions: e } = this, o = this._featuresComponent.value?.headerActions;
97
97
  o?.remove(t), e.buttonEnabled && !this.viewModel?.view?.focusRegionEnabled && o?.add(t);
98
98
  }, { initial: !0 }),
99
- p(() => [
99
+ h(() => [
100
100
  this._pointerNode.value,
101
101
  this.alignment,
102
102
  this.currentAlignment,
@@ -107,16 +107,16 @@ class R extends N {
107
107
  this.viewModel?.location,
108
108
  this.viewModel?.view?.size
109
109
  ], () => this._positionContainer(), { initial: !0 }),
110
- p(() => this._mainContainerNode.value, (t) => {
110
+ h(() => this._mainContainerNode.value, (t) => {
111
111
  this._syncPopupResizeObserver(t);
112
112
  }, { initial: !0 }),
113
- p(() => this.viewModel?.view?.size, (t, e) => this._updateDockEnabledForViewSize(t, e)),
114
- p(() => this.viewModel?.view?.ready, () => this._setDockEnabledForViewSize(this.dockOptions), { initial: !0 }),
115
- p(() => this.view?.map, (t) => {
113
+ h(() => this.viewModel?.view?.size, (t, e) => this._updateDockEnabledForViewSize(t, e)),
114
+ h(() => this.viewModel?.view?.ready, () => this._setDockEnabledForViewSize(this.dockOptions), { initial: !0 }),
115
+ h(() => this.view?.map, (t) => {
116
116
  this.viewModel.map = t;
117
117
  }, { initial: !0 }),
118
- p(() => this.screenLocation, (t, e) => this._autoClose(t, e)),
119
- p(() => [this.active, this._containerNode.value, this._effectiveDockEnabled, this.topLayerDisabled], () => this._togglePopover(), { initial: !0 })
118
+ h(() => this.screenLocation, (t, e) => this._autoClose(t, e)),
119
+ h(() => [this.active, this._containerNode.value, this._effectiveDockEnabled, this.topLayerDisabled], () => this._togglePopover(), { initial: !0 })
120
120
  ]);
121
121
  }
122
122
  disconnectedCallback() {
@@ -148,33 +148,37 @@ class R extends N {
148
148
  const { _pointerNode: t } = this, e = t.value ? window.getComputedStyle(t.value) : null, o = f(e?.height), i = f(e?.width);
149
149
  return Math.hypot(o, i);
150
150
  }
151
+ _getHeadingText() {
152
+ const t = this.heading ?? "";
153
+ return this._headingText.html !== t && (this._headingText = { html: t, text: L(t) }), this._headingText.text;
154
+ }
151
155
  _calculateAutoAlignment(t) {
152
156
  if (t !== "auto")
153
157
  return t;
154
158
  const { _mainContainerNode: e, _popupRect: o, viewModel: i } = this, { view: s } = i, { screenLocation: n } = this;
155
159
  if (n == null || !s || !o || !e.value)
156
160
  return "top-center";
157
- const r = window.getComputedStyle(e.value), l = f(r.maxHeight), a = f(r.height), d = this._getPointerSize(), { height: c, width: v } = o, h = v + d, u = Math.max(c, l, a) + d, C = this._isOutsideView({
161
+ const r = window.getComputedStyle(e.value), l = f(r.maxHeight), a = f(r.height), d = this._getPointerSize(), { height: c, width: v } = o, p = v + d, u = Math.max(c, l, a) + d, C = this._isOutsideView({
158
162
  popupHeight: u,
159
- popupWidth: h,
163
+ popupWidth: p,
160
164
  screenLocation: n,
161
165
  side: "right",
162
166
  view: s
163
167
  }), M = this._isOutsideView({
164
168
  popupHeight: u,
165
- popupWidth: h,
169
+ popupWidth: p,
166
170
  screenLocation: n,
167
171
  side: "left",
168
172
  view: s
169
173
  }), k = this._isOutsideView({
170
174
  popupHeight: u,
171
- popupWidth: h,
175
+ popupWidth: p,
172
176
  screenLocation: n,
173
177
  side: "top",
174
178
  view: s
175
179
  }), z = this._isOutsideView({
176
180
  popupHeight: u,
177
- popupWidth: h,
181
+ popupWidth: p,
178
182
  screenLocation: n,
179
183
  side: "bottom",
180
184
  view: s
@@ -338,9 +342,9 @@ class R extends N {
338
342
  "is-sm-height-breakpoint": c === "small",
339
343
  "is-xs-height-breakpoint": c === "xsmall"
340
344
  };
341
- return w`<div style=${L(s)} class=${y(x("root", v, {
345
+ return w`<div style=${N(s)} class=${y(x("root", v, {
342
346
  hidden: !n || !s && !e
343
- }))} .ariaHidden=${!n} .ariaLabel=${T(this.heading ?? "")} popover=manual ${m(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`;
347
+ }))} .ariaHidden=${!n} .ariaLabel=${this._getHeadingText()} popover=manual ${m(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`;
344
348
  }
345
349
  _renderPointer() {
346
350
  return !this._effectiveDockEnabled || !this.active ? w`<div class="pointer" role=presentation><div class=${y(x("pointer-direction", "shadow"))} ${m(this._pointerNode)}></div></div>` : null;