@arcgis/map-components 5.1.0-next.84 → 5.1.0-next.85

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 (53) hide show
  1. package/dist/cdn/EIVHDZFM.js +2 -0
  2. package/dist/cdn/GUYOWFTW.js +2 -0
  3. package/dist/cdn/HN5OI754.js +2 -0
  4. package/dist/cdn/assets/time-slider/t9n/messages.ar.json +1 -1
  5. package/dist/cdn/assets/time-slider/t9n/messages.bg.json +1 -1
  6. package/dist/cdn/assets/time-slider/t9n/messages.bs.json +1 -1
  7. package/dist/cdn/assets/time-slider/t9n/messages.ca.json +1 -1
  8. package/dist/cdn/assets/time-slider/t9n/messages.cs.json +1 -1
  9. package/dist/cdn/assets/time-slider/t9n/messages.da.json +1 -1
  10. package/dist/cdn/assets/time-slider/t9n/messages.de.json +1 -1
  11. package/dist/cdn/assets/time-slider/t9n/messages.el.json +1 -1
  12. package/dist/cdn/assets/time-slider/t9n/messages.es.json +1 -1
  13. package/dist/cdn/assets/time-slider/t9n/messages.et.json +1 -1
  14. package/dist/cdn/assets/time-slider/t9n/messages.fi.json +1 -1
  15. package/dist/cdn/assets/time-slider/t9n/messages.fr.json +1 -1
  16. package/dist/cdn/assets/time-slider/t9n/messages.he.json +1 -1
  17. package/dist/cdn/assets/time-slider/t9n/messages.hr.json +1 -1
  18. package/dist/cdn/assets/time-slider/t9n/messages.hu.json +1 -1
  19. package/dist/cdn/assets/time-slider/t9n/messages.id.json +1 -1
  20. package/dist/cdn/assets/time-slider/t9n/messages.it.json +1 -1
  21. package/dist/cdn/assets/time-slider/t9n/messages.ja.json +1 -1
  22. package/dist/cdn/assets/time-slider/t9n/messages.ko.json +1 -1
  23. package/dist/cdn/assets/time-slider/t9n/messages.lt.json +1 -1
  24. package/dist/cdn/assets/time-slider/t9n/messages.lv.json +1 -1
  25. package/dist/cdn/assets/time-slider/t9n/messages.nl.json +1 -1
  26. package/dist/cdn/assets/time-slider/t9n/messages.no.json +1 -1
  27. package/dist/cdn/assets/time-slider/t9n/messages.pl.json +1 -1
  28. package/dist/cdn/assets/time-slider/t9n/messages.pt-BR.json +1 -1
  29. package/dist/cdn/assets/time-slider/t9n/messages.pt-PT.json +1 -1
  30. package/dist/cdn/assets/time-slider/t9n/messages.ro.json +1 -1
  31. package/dist/cdn/assets/time-slider/t9n/messages.ru.json +1 -1
  32. package/dist/cdn/assets/time-slider/t9n/messages.sk.json +1 -1
  33. package/dist/cdn/assets/time-slider/t9n/messages.sl.json +1 -1
  34. package/dist/cdn/assets/time-slider/t9n/messages.sr.json +1 -1
  35. package/dist/cdn/assets/time-slider/t9n/messages.sv.json +1 -1
  36. package/dist/cdn/assets/time-slider/t9n/messages.th.json +1 -1
  37. package/dist/cdn/assets/time-slider/t9n/messages.tr.json +1 -1
  38. package/dist/cdn/assets/time-slider/t9n/messages.uk.json +1 -1
  39. package/dist/cdn/assets/time-slider/t9n/messages.vi.json +1 -1
  40. package/dist/cdn/assets/time-slider/t9n/messages.zh-CN.json +1 -1
  41. package/dist/cdn/assets/time-slider/t9n/messages.zh-HK.json +1 -1
  42. package/dist/cdn/assets/time-slider/t9n/messages.zh-TW.json +1 -1
  43. package/dist/cdn/index.js +1 -1
  44. package/dist/components/arcgis-aggregated-features/customElement.js +27 -23
  45. package/dist/components/arcgis-features/customElement.js +99 -84
  46. package/dist/components/arcgis-time-of-day-slider/customElement.js +74 -46
  47. package/dist/docs/api.json +1 -1
  48. package/dist/docs/docs.json +1 -1
  49. package/dist/docs/web-types.json +1 -1
  50. package/package.json +4 -4
  51. package/dist/cdn/2NY3SFXY.js +0 -2
  52. package/dist/cdn/K6DM6L64.js +0 -2
  53. package/dist/cdn/YHD6DZQT.js +0 -2
@@ -1,29 +1,33 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { c as L } from "../../chunks/runtime.js";
3
- import { css as B, html as n } from "lit";
4
- import { keyed as M } from "lit/directives/keyed.js";
3
+ import { css as B, html as r } from "lit";
4
+ import { keyed as $ } from "lit/directives/keyed.js";
5
5
  import N from "@arcgis/core/support/actions/ActionButton.js";
6
- import x from "@arcgis/core/core/Collection.js";
7
- import R from "@arcgis/core/popup/Features.js";
8
- import { LitElement as O, createEvent as $, renderElement as S, nothing as g, safeClassMap as C } from "@arcgis/lumina";
9
- import { usePropertyChange as z, bypassReadOnly as T } from "@arcgis/lumina/controllers";
10
- import { classes as A } from "@arcgis/toolkit/dom";
11
- import { createRef as f, ref as p } from "lit/directives/ref.js";
12
- import { g as P } from "../../chunks/feature-utils.js";
6
+ import T from "@arcgis/core/core/Collection.js";
7
+ import O from "@arcgis/core/popup/Features.js";
8
+ import { LitElement as S, createEvent as C, renderElement as z, nothing as g, safeClassMap as A } from "@arcgis/lumina";
9
+ import { usePropertyChange as P, bypassReadOnly as k } from "@arcgis/lumina/controllers";
10
+ import { classes as y } from "@arcgis/toolkit/dom";
11
+ import { createRef as v, ref as f } from "lit/directives/ref.js";
12
+ import { g as D } from "../../chunks/feature-utils.js";
13
13
  import { initializeProjection as H } from "@arcgis/core/applications/Components/featureUtils.js";
14
- import { t as V, z as Z } from "../../chunks/action-utils.js";
14
+ import { t as Z, z as V } from "../../chunks/action-utils.js";
15
15
  import { m as U } from "../../chunks/useViewModel.js";
16
- import { renderingSanitizer as v } from "@arcgis/core/applications/Components/sanitizerUtils.js";
17
- import { stripHTML as y } from "@arcgis/core/applications/Components/stringUtils.js";
18
- import { substitute as h, formatNumber as w } from "@arcgis/core/intl.js";
16
+ import { renderingSanitizer as m } from "@arcgis/core/applications/Components/sanitizerUtils.js";
17
+ import { stripHTML as I } from "@arcgis/core/applications/Components/stringUtils.js";
18
+ import { substitute as u, formatNumber as _ } from "@arcgis/core/intl.js";
19
19
  import { u as j } from "../../chunks/useT9n.js";
20
- import { watch as l } from "@arcgis/core/core/reactiveUtils.js";
20
+ import { watch as d } from "@arcgis/core/core/reactiveUtils.js";
21
21
  const G = 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){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)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`;
22
- function K(I) {
23
- return I?.declaredClass.startsWith("esri.layers.") ?? !1;
22
+ function K(p) {
23
+ return p?.declaredClass.startsWith("esri.layers.") ?? !1;
24
24
  }
25
- const q = U(R);
26
- class W extends O {
25
+ function q(p) {
26
+ if (!(!p || !("featureReduction" in p)))
27
+ return p.featureReduction?.type;
28
+ }
29
+ const W = U(O);
30
+ class X extends S {
27
31
  constructor() {
28
32
  super(...arguments), this._zoomToFeature = new N({
29
33
  icon: "magnifying-glass-plus",
@@ -33,10 +37,10 @@ class W extends O {
33
37
  e?.isIntersecting && this.viewModel.featurePage != null && this.viewModel.featurePage++;
34
38
  }, this._featureMenuIntersectionObserver = new IntersectionObserver(this._featureMenuIntersectionObserverCallback, {
35
39
  root: window.document
36
- }), this._featureMenuIntersectionObserverNode = null, this._rootFlowItemNode = f(), this._featureMenuViewportNode = f(), this._actionBarMenuNode = f(), this._flowContainerNode = f(), this.messages = j(), this._selectedFeatureComponent = f(), this._cancelOpenRelatedFeature = () => {
40
+ }), this._featureMenuIntersectionObserverNode = null, this._rootFlowItemNode = v(), this._featureMenuViewportNode = v(), this._actionBarMenuNode = v(), this._flowContainerNode = v(), this.messages = j(), this._selectedFeatureComponent = v(), this._cancelOpenRelatedFeature = () => {
37
41
  const { _openRelatedFeatureAbortController: e } = this;
38
42
  e && e.abort(), this._openRelatedFeatureAbortController = null;
39
- }, this._openRelatedFeatureAbortController = null, this.flowItems = new x(), this._aggregatedFeatureCount = 0, this._aggregatedFeaturesLoading = !1, this.viewModel = q(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.autoDestroyDisabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, 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 x(), 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.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.promises = this.viewModel.promises, 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.arcgisPropertyChange = z()("active", "collapsed", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = $(), this.arcgisClose = $(), this.arcgisTriggerAction = $();
43
+ }, this._openRelatedFeatureAbortController = null, this.flowItems = new T(), this._aggregatedFeatureCount = 0, this._aggregatedFeaturesLoading = !1, this.viewModel = W(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.autoDestroyDisabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, 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 T(), 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.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.promises = this.viewModel.promises, 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.arcgisPropertyChange = P()("active", "collapsed", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = C(), this.arcgisClose = C(), this.arcgisTriggerAction = C();
40
44
  }
41
45
  static {
42
46
  this.properties = { _openRelatedFeatureAbortController: 16, flowItems: 16, _aggregatedFeatureCount: 16, _aggregatedFeaturesLoading: 16, _hideActionText: 16, _featureNavigationVisible: 16, _isCollapsed: 16, _collapseEnabled: 16, _featureFlowItemSelected: 16, viewModel: 0, actions: 0, active: 0, autoDestroyDisabled: 5, collapsed: 5, content: 1, defaultPopupTemplateEnabled: 5, featureCount: 9, featureMenuOpen: 5, featureMenuTitle: 1, featureNavigationTop: 5, features: 0, featuresPerPage: 9, featureItemAbilities: 0, goToOverride: 0, headerActions: 0, heading: 1, headingLevel: 9, hideActionBar: 5, hideCloseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFeatureListLayerTitle: 5, hideHeading: 5, hideSelectFeature: 5, hideSpinner: 5, hideContent: 5, chartAnimationDisabled: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, hideRelationshipContent: 5, hideTextContent: 5, hideUtilityNetworkContent: 5, hideLastEditedInfo: 5, highlightDisabled: 5, icon: 1, includeDefaultActionsDisabled: 5, initialDisplayMode: 1, label: 1, location: 0, map: 0, messageOverrides: 0, open: 5, referenceElement: 1, promises: 0, responsiveActionsEnabled: 5, selectedDrillInFeature: 32, selectedFeature: 0, selectedFeatureComponent: 32, selectedFeatureIndex: 9, showCollapseButton: 5, spatialReference: 0, state: 32, timeZone: 1, updateLocationEnabled: 5, view: 0 };
@@ -78,11 +82,11 @@ class W extends O {
78
82
  signal: o
79
83
  }), e = this.view.toScreen(this.location) ?? void 0), !e)
80
84
  return;
81
- const r = await this.viewModel.fetchFeatures(e, {
85
+ const n = await this.viewModel.fetchFeatures(e, {
82
86
  ...t,
83
87
  signal: o
84
88
  });
85
- this.location = r.location, this.promises = r.pendingFeatures;
89
+ this.location = n.location, this.promises = n.pendingFeatures;
86
90
  }
87
91
  async next() {
88
92
  return this.viewModel.next();
@@ -95,36 +99,37 @@ class W extends O {
95
99
  }
96
100
  async triggerAction(e) {
97
101
  if (!e.disabled)
98
- return e?.type === "toggle" && (e.value = !e.value), await V(e, this.viewModel);
102
+ return e?.type === "toggle" && (e.value = !e.value), await Z(e, this.viewModel);
99
103
  }
100
104
  loaded() {
101
105
  this.manager.onLifecycle(() => [
102
- l(() => this.viewModel?.selectedFeatureIndex, (e, t) => this._selectedFeatureIndexUpdated(e, t)),
103
- l(() => this.viewModel?.view, (e, t) => t && this._viewChange()),
104
- l(() => this._spinnerEl?.screenLocation, () => this._closeOpenActionMenu()),
105
- l(() => this.selectedFeatureComponent?.viewModel, () => this._removeFlowItems()),
106
- l(() => this.viewModel?.featureItems, () => this._featureMenuViewportScrollTop()),
107
- l(() => this.flowItems.length, () => {
106
+ d(() => this.viewModel?.selectedFeatureIndex, (e, t) => this._selectedFeatureIndexUpdated(e, t)),
107
+ d(() => this.viewModel?.view?.scale, () => this._viewScaleChange()),
108
+ d(() => this.viewModel?.view, (e, t) => t && this._viewChange()),
109
+ d(() => this._spinnerEl?.screenLocation, () => this._closeOpenActionMenu()),
110
+ d(() => this.selectedFeatureComponent?.viewModel, () => this._removeFlowItems()),
111
+ d(() => this.viewModel?.featureItems, () => this._featureMenuViewportScrollTop()),
112
+ d(() => this.flowItems.length, () => {
108
113
  const e = Array.from(this.flowItems).at(-1);
109
- T(() => this.selectedDrillInFeature = e?.graphic ?? void 0);
114
+ k(() => this.selectedDrillInFeature = e?.graphic ?? void 0);
110
115
  }),
111
- l(() => [this.flowItems?.length, this.featureMenuOpen], () => {
116
+ d(() => [this.flowItems?.length, this.featureMenuOpen], () => {
112
117
  this.setFocus();
113
118
  }),
114
- l(() => this.viewModel.aggregatedFeaturesEnabled, (e) => {
119
+ d(() => this.viewModel.aggregatedFeaturesEnabled, (e) => {
115
120
  e || (this._aggregatedFeatureCount = 0, this._aggregatedFeaturesLoading = !1, this._removeFlowItems());
116
121
  }),
117
- l(() => this.referenceElement, (e, t) => {
122
+ d(() => this.referenceElement, (e, t) => {
118
123
  this._destroySpinner(t), this._createSpinner();
119
124
  }, { initial: !0 }),
120
- l(() => [this.hideSpinner, this.viewModel?.view, this.viewModel?.location, this.viewModel?.waitingForResult], () => {
125
+ d(() => [this.hideSpinner, this.viewModel?.view, this.viewModel?.location, this.viewModel?.waitingForResult], () => {
121
126
  this._createSpinner();
122
127
  }, { initial: !0 })
123
128
  ]);
124
129
  }
125
130
  updated() {
126
131
  const e = this._selectedFeatureComponent.value ?? void 0;
127
- this.selectedFeatureComponent !== e && T(() => this.selectedFeatureComponent = e);
132
+ this.selectedFeatureComponent !== e && k(() => this.selectedFeatureComponent = e);
128
133
  }
129
134
  _cancelFetchingFeatures() {
130
135
  this._fetchFeaturesController?.abort(), this._fetchFeaturesController = null;
@@ -138,8 +143,9 @@ class W extends O {
138
143
  const a = i?.graphic;
139
144
  if (!a)
140
145
  return;
141
- const s = P(a), o = K(s) ? s : null, r = t.get(o) ?? [];
142
- t.set(o, [...r, i]);
146
+ const s = D(a), o = K(s) ? s : null;
147
+ let n = t.get(o);
148
+ n || (n = [], t.set(o, n)), n.push(i);
143
149
  }), t;
144
150
  }
145
151
  _handleCollapseToggle() {
@@ -204,8 +210,8 @@ class W extends O {
204
210
  this._unobserveFeatureMenuObserver(), e && this._featureMenuIntersectionObserver.observe(e), this._featureMenuIntersectionObserverNode = e;
205
211
  }
206
212
  _getActionTitle(e) {
207
- const { messages: t, selectedFeature: i } = this, { id: a } = e, s = i?.attributes, o = e.title ?? "", r = a === "zoom-to-feature" ? h(o, { messages: t }) : a === "remove-selected-feature" ? h(o, { messages: t }) : a === "zoom-to-clustered-features" ? h(o, { messages: t }) : a === "browse-aggregated-features" ? h(o, { messages: t }) : e.title;
208
- return r && s ? h(r, s) : r ?? "";
213
+ const { messages: t, selectedFeature: i } = this, { id: a } = e, s = i?.attributes, o = e.title ?? "", n = a === "zoom-to-feature" ? u(o, { messages: t }) : a === "remove-selected-feature" ? u(o, { messages: t }) : a === "zoom-to-clustered-features" ? u(o, { messages: t }) : a === "browse-aggregated-features" ? u(o, { messages: t }) : e.title;
214
+ return n && s ? u(n, s) : n ?? "";
209
215
  }
210
216
  _onMainKeydown(e) {
211
217
  const { key: t } = e;
@@ -221,6 +227,10 @@ class W extends O {
221
227
  _triggerAction(e) {
222
228
  this.triggerAction(e), this.arcgisTriggerAction.emit({ action: e });
223
229
  }
230
+ _viewScaleChange() {
231
+ const { selectedFeature: e } = this;
232
+ !e?.isAggregate || q(D(e)) !== "cluster" || (this.viewModel.aggregatedFeaturesEnabled = !1, this.open = !1, this.clear());
233
+ }
224
234
  _viewChange() {
225
235
  this.viewModel.clear(), this.open = !1, this._aggregatedFeatureCount = 0, this._removeFlowItems();
226
236
  }
@@ -257,10 +267,10 @@ class W extends O {
257
267
  }
258
268
  async _createSpinner() {
259
269
  const e = this.referenceElement;
260
- e && (await this._destroySpinner(e), this._spinnerEl = S(n`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading ?? ""} .trackLocation=${!this.hideSpinner && this.viewModel?.waitingForResult} .location=${this.viewModel?.location ?? void 0} .view=${this.viewModel?.view ?? void 0}></arcgis-spinner>`), e.manager?.component?.extraContent?.add(this._spinnerEl));
270
+ e && (await this._destroySpinner(e), this._spinnerEl = z(r`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading ?? ""} .trackLocation=${!this.hideSpinner && this.viewModel?.waitingForResult} .location=${this.viewModel?.location ?? void 0} .view=${this.viewModel?.view ?? void 0}></arcgis-spinner>`), e.manager?.component?.extraContent?.add(this._spinnerEl));
261
271
  }
262
272
  render() {
263
- return n`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`;
273
+ return r`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`;
264
274
  }
265
275
  _renderFeatureNavigation() {
266
276
  return [
@@ -269,101 +279,106 @@ class W extends O {
269
279
  ];
270
280
  }
271
281
  _renderHeader() {
272
- return this.featureNavigationTop && this._featureNavigationVisible ? n`<div class="header">${this._renderFeatureNavigation()}</div>` : null;
282
+ return this.featureNavigationTop && this._featureNavigationVisible ? r`<div class="header">${this._renderFeatureNavigation()}</div>` : null;
273
283
  }
274
284
  _renderFooter() {
275
- return !this.featureNavigationTop && this._featureNavigationVisible ? n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>` : null;
285
+ return !this.featureNavigationTop && this._featureNavigationVisible ? r`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>` : null;
276
286
  }
277
287
  _renderFeaturePaginationText() {
278
288
  const { messages: e, viewModel: t } = this, { featureCount: i, selectedFeatureIndex: a } = t;
279
- return n`<div class="pagination-text">${h(e.pageText ?? "", {
280
- index: w(a + 1),
281
- total: w(i)
289
+ return r`<div class="pagination-text">${u(e.pageText ?? "", {
290
+ index: _(a + 1),
291
+ total: _(i)
282
292
  })}</div>`;
283
293
  }
284
294
  _renderFeatureMenuButton() {
285
295
  const { messages: e, viewModel: t } = this, { featureCount: i, selectedFeatureIndex: a, pendingPromisesCount: s } = t;
286
- return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s > 0} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText ?? "", {
287
- index: w(a + 1),
288
- total: w(i)
296
+ return r`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s > 0} @click=${this._handlePaginationMenuButton} .text=${u(e.pageText ?? "", {
297
+ index: _(a + 1),
298
+ total: _(i)
289
299
  })} text-enabled title=${e.selectFeature ?? g}></calcite-action>`;
290
300
  }
291
301
  _renderPagination() {
292
302
  const { previous: e, next: t } = this.messages;
293
- return n`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e ?? ""} @click=${this._previousFeature} .text=${e ?? ""} title=${e ?? "" ?? g}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t ?? ""} @click=${this._nextFeature} .text=${t ?? ""} title=${t ?? "" ?? g}></calcite-action></calcite-action-group></calcite-action-bar>`;
303
+ return r`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e ?? ""} @click=${this._previousFeature} .text=${e ?? ""} title=${e ?? "" ?? g}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t ?? ""} @click=${this._nextFeature} .text=${t ?? ""} title=${t ?? "" ?? g}></calcite-action></calcite-action-group></calcite-action-bar>`;
294
304
  }
295
- _renderFeatureMenuItem(e) {
296
- const { initialDisplayMode: t } = this, { selectedFeatureItem: i, featureItems: a } = this.viewModel, s = e === i, o = a.indexOf(e);
297
- return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${() => this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${() => this._setActiveFeature(o)} .selected=${s} @calciteListItemSelect=${() => this._selectFeature(o)}><span .innerHTML=${(v.sanitize(e.heading) || this.messages.untitled) ?? ""} slot=content></span>${t === "list" ? n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>` : null}</calcite-list-item>`;
305
+ _renderFeatureMenuItem(e, t) {
306
+ const { initialDisplayMode: i } = this, { selectedFeatureItem: a } = this.viewModel, s = e === a;
307
+ return r`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${() => this._setActiveFeature(t)} @mouseleave=${this._removeActiveFeature} @mouseover=${() => this._setActiveFeature(t)} .selected=${s} @calciteListItemSelect=${() => this._selectFeature(t)}><span .innerHTML=${(m.sanitize(e.heading) || this.messages.untitled) ?? ""} slot=content></span>${i === "list" ? r`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>` : null}</calcite-list-item>`;
298
308
  }
299
309
  _renderFeatureMenu() {
300
- const { messages: e, viewModel: t } = this, i = this._groupResultsByLayer(), a = this.initialDisplayMode === "list" ? "none" : "single";
301
- return t.featureItems.length ? n`<calcite-list display-mode=flat .label=${e?.featuresList ?? ""} selection-appearance=icon .selectionMode=${a}>${Array.from(i.keys(), (s) => {
302
- const o = i.get(s)?.map((c) => this._renderFeatureMenuItem(c)), r = s ? s.title ?? this.messages.untitled : null;
303
- return !this.hideFeatureListLayerTitle && r !== null ? M(s ?? "map-graphics", n`<calcite-list-item-group .heading=${r}>${o}</calcite-list-item-group>`) : o;
310
+ const { messages: e, viewModel: t } = this, i = this._groupResultsByLayer(), a = /* @__PURE__ */ new Map();
311
+ t.featureItems.forEach((o, n) => a.set(o, n));
312
+ const s = this.initialDisplayMode === "list" ? "none" : "single";
313
+ return t.featureItems.length ? r`<calcite-list display-mode=flat .label=${e?.featuresList ?? ""} selection-appearance=icon .selectionMode=${s}>${Array.from(i.keys(), (o) => {
314
+ const n = i.get(o)?.map((c) => {
315
+ const l = a.get(c);
316
+ return l == null ? null : this._renderFeatureMenuItem(c, l);
317
+ }), h = o ? o.title ?? this.messages.untitled : null;
318
+ return !this.hideFeatureListLayerTitle && h !== null ? $(o ?? "map-graphics", r`<calcite-list-item-group .heading=${h}>${n}</calcite-list-item-group>`) : n;
304
319
  })}</calcite-list>` : null;
305
320
  }
306
321
  _renderHeaderAction(e) {
307
322
  const t = e.title || "";
308
- return e.visible ? n`<calcite-action .active=${e.type === "toggle" ? e.value : !1} .disabled=${e.disabled} .icon=${e.icon ?? void 0} .indicator=${e.active} .loading=${e.active} @click=${() => this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t ?? g}></calcite-action>` : null;
323
+ return e.visible ? r`<calcite-action .active=${e.type === "toggle" ? e.value : !1} .disabled=${e.disabled} .icon=${e.icon ?? void 0} .indicator=${e.active} .loading=${e.active} @click=${() => this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t ?? g}></calcite-action>` : null;
309
324
  }
310
325
  _renderHeaderActions() {
311
326
  return this.headerActions.map((e) => this._renderHeaderAction(e)).toArray();
312
327
  }
313
328
  _renderContentFeature(e) {
314
- const { headingLevel: t, hideCloseButton: i, _isCollapsed: a, _collapseEnabled: s, featureNavigationTop: o, initialDisplayMode: r, selectedFeature: c } = this, { active: u } = this.viewModel, d = this._getHeading();
315
- return r === "list" && !c ? null : n`<calcite-flow-item class=${C(A({
329
+ const { headingLevel: t, hideCloseButton: i, _isCollapsed: a, _collapseEnabled: s, featureNavigationTop: o, initialDisplayMode: n, selectedFeature: h } = this, { active: c } = this.viewModel, l = this._getHeading();
330
+ return n === "list" && !h ? null : r`<calcite-flow-item class=${A(y({
316
331
  "content-feature": !0,
317
332
  "flow-item-collapsed": a
318
- }))} .closable=${!i} .closed=${!u} .collapsed=${a} .collapseDirection=${o ? "down" : "up"} .collapsible=${s} .headingLevel=${t} .selected=${e} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${y(d)} ${p(this._rootFlowItemNode)}><div slot=heading><div .innerHTML=${v.sanitize(d ?? "") ?? ""}></div></div>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${C(A("container", "content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`;
333
+ }))} .closable=${!i} .closed=${!c} .collapsed=${a} .collapseDirection=${o ? "down" : "up"} .collapsible=${s} .headingLevel=${t} .selected=${e} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${I(l)} ${f(this._rootFlowItemNode)}><div slot=heading><div .innerHTML=${m.sanitize(l ?? "") ?? ""}></div></div>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${A(y("container", "content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`;
319
334
  }
320
335
  _renderFeatureMenuContainer() {
321
- const { viewModel: e, hideCloseButton: t, featureMenuTitle: i, messages: a, initialDisplayMode: s, featureMenuOpen: o, _featureFlowItemSelected: r, _collapseEnabled: c, _isCollapsed: u, featureNavigationTop: d, headingLevel: m } = this, { active: F, featureItems: _, pendingPromisesCount: b } = e, k = i ?? a.selectFeature;
336
+ const { viewModel: e, hideCloseButton: t, featureMenuTitle: i, messages: a, initialDisplayMode: s, featureMenuOpen: o, _featureFlowItemSelected: n, _collapseEnabled: h, _isCollapsed: c, featureNavigationTop: l, headingLevel: F } = this, { active: w, featureItems: b, pendingPromisesCount: M } = e, E = i ?? a.selectFeature;
322
337
  if (s === "feature" && !o)
323
338
  return null;
324
- const D = !r;
325
- return n`<calcite-flow-item class=${C(A({
326
- "flow-item-collapsed": u
327
- }))} .closable=${s === "list" && !t} .closed=${!F} .collapsed=${s === "list" && u} .collapseDirection=${d ? "down" : "up"} .collapsible=${s === "list" && c} .description=${this.hideFeatureMenuHeading ? void 0 : h(a.total ?? "", {
328
- total: _.length
329
- })} .heading=${this.hideFeatureMenuHeading ? void 0 : k} .headingLevel=${m} .loading=${e.waitingForContents} .selected=${D} @calciteFlowItemBack=${(E) => {
330
- E.preventDefault(), this._handleFeatureMenuBack();
331
- }} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${p(this._featureMenuViewportNode)}>${s === "list" ? this._renderHeaderActions() : null}${b > 0 ? n`<calcite-loader class="loader" inline .label=${a.loading ?? ""} slot=header-actions-end></calcite-loader>` : null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${p(this._featureMenuIntersectionObserverCreated)}></div>${s === "feature" ? n`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${a.back}</calcite-button>` : null}</calcite-flow-item>`;
339
+ const x = !n;
340
+ return r`<calcite-flow-item class=${A(y({
341
+ "flow-item-collapsed": c
342
+ }))} .closable=${s === "list" && !t} .closed=${!w} .collapsed=${s === "list" && c} .collapseDirection=${l ? "down" : "up"} .collapsible=${s === "list" && h} .description=${this.hideFeatureMenuHeading ? void 0 : u(a.total ?? "", {
343
+ total: b.length
344
+ })} .heading=${this.hideFeatureMenuHeading ? void 0 : E} .headingLevel=${F} .loading=${e.waitingForContents} .selected=${x} @calciteFlowItemBack=${(R) => {
345
+ R.preventDefault(), this._handleFeatureMenuBack();
346
+ }} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${f(this._featureMenuViewportNode)}>${s === "list" ? this._renderHeaderActions() : null}${M > 0 ? r`<calcite-loader class="loader" inline .label=${a.loading ?? ""} slot=header-actions-end></calcite-loader>` : null}<div class="container">${x ? this._renderFeatureMenu() : null}</div><div class="feature-menu-observer" ${f(this._featureMenuIntersectionObserverCreated)}></div>${s === "feature" ? r`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${a.back}</calcite-button>` : null}</calcite-flow-item>`;
332
347
  }
333
348
  _renderFlowItem(e, t) {
334
- const { messages: i, hideCloseButton: a, hideSelectFeature: s, active: o } = this, r = "graphic" in e && "isFeatureFromTable" in e && !e.isFeatureFromTable, c = r && !s, u = e.flowType === "feature-association", d = i.returnToInitialFeature ?? "", m = i?.selectFeature, F = this._getActionTitle(this._zoomToFeature), _ = !this.hideActionBar && u && r;
335
- return n`<calcite-flow-item .closable=${!a} .closed=${!o} .description=${y(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${this.hideHeading ? void 0 : y(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${(b) => {
336
- b.preventDefault(), this._handleDrillInBackClick();
337
- }} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${this.hideHeading ? null : n`<div slot=heading><div .innerHTML=${v.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${v.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${d ?? ""} title=${d ?? "" ?? g}></calcite-action>${c ? n`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${m ?? ""} title=${m ?? g}></calcite-action>` : null}${_ ? n`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${this._zoomToFeature.disabled} .icon=${this._zoomToFeature.icon ?? void 0} .loading=${this._zoomToFeature.active} scale=s text-enabled .text=${F} title=${F ?? g} @click=${() => Z(this.viewModel, this._zoomToFeature, e)}></calcite-action></calcite-action-group></calcite-action-bar>` : null}<div class="container">${e}</div></calcite-flow-item>`;
349
+ const { messages: i, hideCloseButton: a, hideSelectFeature: s, active: o } = this, n = "graphic" in e && "isFeatureFromTable" in e && !e.isFeatureFromTable, h = n && !s, c = e.flowType === "feature-association", l = i.returnToInitialFeature ?? "", F = i?.selectFeature, w = this._getActionTitle(this._zoomToFeature), b = !this.hideActionBar && c && n;
350
+ return r`<calcite-flow-item .closable=${!a} .closed=${!o} .description=${I(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${this.hideHeading ? void 0 : I(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${(M) => {
351
+ M.preventDefault(), this._handleDrillInBackClick();
352
+ }} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${this.hideHeading ? null : r`<div slot=heading><div .innerHTML=${m.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${m.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>${h ? r`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${F ?? ""} title=${F ?? g}></calcite-action>` : null}${b ? r`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${this._zoomToFeature.disabled} .icon=${this._zoomToFeature.icon ?? void 0} .loading=${this._zoomToFeature.active} scale=s text-enabled .text=${w} title=${w ?? g} @click=${() => V(this.viewModel, this._zoomToFeature, e)}></calcite-action></calcite-action-group></calcite-action-bar>` : null}<div class="container">${e}</div></calcite-flow-item>`;
338
353
  }
339
354
  _renderContentContainer() {
340
- const e = this.flowItems?.toArray(), t = e.length > 0, i = this.viewModel.aggregatedFeaturesEnabled && this.viewModel.selectedFeature?.isAggregate && !t, a = i && e.length === 0, s = e.length === 0 && this._featureFlowItemSelected && !i, o = e?.map((u, d) => this._renderFlowItem(u, this._featureFlowItemSelected && d === e.length - 1)), r = this._renderBrowseAggregateContainer(!!a), c = this.initialDisplayMode === "list" ? [this._renderFeatureMenuContainer(), this._renderContentFeature(s)] : [this._renderContentFeature(s), this._renderFeatureMenuContainer()];
341
- return n`<calcite-flow ${p(this._flowContainerNode)}>${c}${r}${o}</calcite-flow>`;
355
+ const e = this.flowItems?.toArray(), t = e.length > 0, i = this.viewModel.aggregatedFeaturesEnabled && this.viewModel.selectedFeature?.isAggregate && !t, a = i && e.length === 0, s = e.length === 0 && this._featureFlowItemSelected && !i, o = e?.map((c, l) => this._renderFlowItem(c, this._featureFlowItemSelected && l === e.length - 1)), n = this._renderBrowseAggregateContainer(!!a), h = this.initialDisplayMode === "list" ? [this._renderFeatureMenuContainer(), this._renderContentFeature(s)] : [this._renderContentFeature(s), this._renderFeatureMenuContainer()];
356
+ return r`<calcite-flow ${f(this._flowContainerNode)}>${h}${n}${o}</calcite-flow>`;
342
357
  }
343
358
  _renderBrowseAggregateContainer(e) {
344
359
  const { hideCloseButton: t, active: i, messages: a } = this, { selectedFeature: s } = this.viewModel;
345
- return this.viewModel.aggregatedFeaturesEnabled && s?.isAggregate ? n`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!i} .description=${this._aggregatedFeatureCount ? h(a.total ?? "", {
360
+ return this.viewModel.aggregatedFeaturesEnabled && s?.isAggregate ? r`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!i} .description=${this._aggregatedFeatureCount ? u(a.total ?? "", {
346
361
  total: this._aggregatedFeatureCount
347
- }) : ""} .heading=${a.aggregatedFeatures} @calciteFlowItemBack=${(r) => {
348
- r.preventDefault(), this.viewModel.aggregatedFeaturesEnabled = !1;
362
+ }) : ""} .heading=${a.aggregatedFeatures} @calciteFlowItemBack=${(n) => {
363
+ n.preventDefault(), this.viewModel.aggregatedFeaturesEnabled = !1;
349
364
  }} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .feature=${s ?? void 0} .flowItems=${this.flowItems} .map=${this.map ?? void 0} .messages=${a} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} .view=${this.view ?? void 0}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${() => this.viewModel.aggregatedFeaturesEnabled = !1} slot=footer-start width=full>${a.back}</calcite-button></calcite-flow-item>` : null;
350
365
  }
351
366
  _renderActionBar() {
352
367
  const e = this.viewModel.selectedFeatureItem?.isFeatureFromTable, t = this.viewModel.allActions.toArray(), i = e && !this.location ? t.filter((a) => a.id !== this._zoomToFeature.id) : t;
353
- return !this._isCollapsed && !this.hideActionBar && i.length ? n`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${p(this._actionBarMenuNode)}>${this._renderActions(i)}</calcite-action-group></calcite-action-bar>` : null;
368
+ return !this._isCollapsed && !this.hideActionBar && i.length ? r`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${f(this._actionBarMenuNode)}>${this._renderActions(i)}</calcite-action-group></calcite-action-bar>` : null;
354
369
  }
355
370
  _renderActions(e) {
356
371
  return e.map((t) => {
357
372
  const i = this._getActionTitle(t);
358
- return n`<calcite-action .active=${t.type === "toggle" ? t.value : !1} .disabled=${t.disabled} .icon=${t.icon ?? void 0} .loading=${t.active} scale=s .textEnabled=${!this._hideActionText} .text=${i ?? ""} title=${i ?? g} .hidden=${!t.visible} @click=${() => this._triggerAction(t)}></calcite-action>`;
373
+ return r`<calcite-action .active=${t.type === "toggle" ? t.value : !1} .disabled=${t.disabled} .icon=${t.icon ?? void 0} .loading=${t.active} scale=s .textEnabled=${!this._hideActionText} .text=${i ?? ""} title=${i ?? g} .hidden=${!t.visible} @click=${() => this._triggerAction(t)}></calcite-action>`;
359
374
  });
360
375
  }
361
376
  _renderContent() {
362
377
  const { content: e, selectedFeatureItem: t } = this.viewModel;
363
- return t ? M(t, n`<arcgis-feature .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} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${p(this._selectedFeatureComponent)}></arcgis-feature>`) : typeof e == "string" ? M(e, n`<div .innerHTML=${v.sanitize(e) ?? ""}></div>`) : e ?? null;
378
+ return t ? $(t, r`<arcgis-feature .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} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${f(this._selectedFeatureComponent)}></arcgis-feature>`) : typeof e == "string" ? $(e, r`<div .innerHTML=${m.sanitize(e) ?? ""}></div>`) : e ?? null;
364
379
  }
365
380
  }
366
- L("arcgis-features", W);
381
+ L("arcgis-features", X);
367
382
  export {
368
- W as ArcgisFeatures
383
+ X as ArcgisFeatures
369
384
  };
@@ -1,76 +1,104 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as u } from "../../chunks/runtime.js";
3
- import { keyed as p } from "lit/directives/keyed.js";
4
- import { substitute as k } from "@arcgis/core/intl.js";
5
- import { LitElement as T, createEvent as _, safeClassMap as v } from "@arcgis/lumina";
6
- import { useDirection as f } from "@arcgis/lumina/controllers";
7
- import { css as L, html as h } from "lit";
8
- import { u as F } from "../../chunks/useT9n.js";
2
+ import { c as k } from "../../chunks/runtime.js";
3
+ import { keyed as f } from "lit/directives/keyed.js";
4
+ import { substitute as T } from "@arcgis/core/intl.js";
5
+ import { LitElement as v, createEvent as _, safeClassMap as L } from "@arcgis/lumina";
6
+ import { useDirection as w } from "@arcgis/lumina/controllers";
7
+ import { css as F, html as d } from "lit";
8
+ import { u as y } from "../../chunks/useT9n.js";
9
9
  import { c as i } from "../../chunks/time-utils.js";
10
- const w = L`:host{display:block}arcgis-slider{--arcgis-slider-handle-size: .875rem;--ticks-font-size: .625rem;--label-font-size: .75rem;--label-padding-block-start: 3px;--label-padding-block-end: var(--calcite-spacing-lg);--calcite-font-size-sm: var(--label-font-size);display:block;margin-block-start:var(--padding-block-start, -.5rem);padding-block-end:var(--padding-block-end, .3rem);&.wrap-labels{padding-block-end:var(--wrapped-padding, .875rem)}}:host([visual-scale="s"]) arcgis-slider{--arcgis-slider-handle-size: .625rem;--ticks-font-size: .625rem;--label-font-size: .625rem;--label-padding-block-end: 1rem;--padding-block-end: .5rem;--wrapped-padding: 1.1rem}:host([visual-scale="l"]) arcgis-slider{--arcgis-slider-handle-size: 1rem;--ticks-font-size: .75rem;--label-font-size: .875rem;--label-padding-block-end: .94rem;--padding-block-end: .4rem;--wrapped-padding: 1.1rem}.ticks-container{width:100%;position:relative}.time-range-label{position:relative;width:100%;padding-block-start:var(--label-padding-block-start);padding-block-end:var(--label-padding-block-end);font-size:var(--label-font-size);font-variant-numeric:tabular-nums;line-height:1em;text-align:center}.main-ticks,.secondary-ticks{position:absolute;inset:0}.main-ticks{--arcgis-ticks-label-width: min-content;--arcgis-ticks-label-text-align: center;--arcgis-ticks-font-size: var(--ticks-font-size);white-space:nowrap;word-break:auto-phrase;font-variant-numeric:tabular-nums}.wrap-labels .main-ticks{white-space:normal}.secondary-ticks{--arcgis-ticks-tick-length: 3px;--arcgis-ticks-gap: 16px}`;
11
- class z extends T {
10
+ const p = "compact", b = /* @__PURE__ */ new Map([
11
+ ["fr", "full"],
12
+ ["he", "full"],
13
+ ["ja", "full"],
14
+ ["ko", "compact-wrap"],
15
+ ["zh-CN", "full"],
16
+ ["zh-HK", "full-wrap"],
17
+ ["zh-TW", "full-wrap"]
18
+ ]), z = /* @__PURE__ */ new Set(["compact-wrap", "full-wrap"]), m = {
19
+ hour: "numeric",
20
+ minute: "numeric",
21
+ timeZone: "UTC"
22
+ }, $ = {
23
+ hour: "numeric",
24
+ timeZone: "UTC"
25
+ }, h = (t) => "";
26
+ function x(t) {
27
+ const e = new Intl.DateTimeFormat(t, m), a = new Intl.DateTimeFormat(t, {
28
+ ...m,
29
+ hourCycle: "h24"
30
+ }), r = e.resolvedOptions().hour12 === !1;
31
+ return (o) => {
32
+ const l = i(o, "minutes", "milliseconds"), s = new Date(l);
33
+ return l !== 0 && s.getUTCHours() === 0 && s.getUTCMinutes() === 0 && r ? a.format(s) : e.format(s);
34
+ };
35
+ }
36
+ function C(t) {
37
+ const e = new Intl.DateTimeFormat(t, m), a = new Intl.DateTimeFormat(t, $), r = b.get(t) ?? p;
38
+ return (o) => {
39
+ const l = Math.round(i(o, "minutes", "hours")), s = i(l, "hours", "milliseconds"), c = new Date(s);
40
+ switch (r) {
41
+ case "full":
42
+ case "full-wrap":
43
+ return e.format(c);
44
+ case "compact-wrap":
45
+ return u(a.format(c), " ");
46
+ default:
47
+ return u(a.format(c), " ");
48
+ }
49
+ };
50
+ }
51
+ function S(t) {
52
+ return z.has(b.get(t) ?? p);
53
+ }
54
+ function u(t, e) {
55
+ return t.replace(/\S+/gu, D).replace(/\s+/gu, e);
56
+ }
57
+ function D(t) {
58
+ return Array.from(t).join("⁠");
59
+ }
60
+ const W = F`:host{display:block}arcgis-slider{--arcgis-slider-handle-size: .875rem;--ticks-font-size: .625rem;--label-font-size: .75rem;--label-padding-block-start: 3px;--label-padding-block-end: var(--calcite-spacing-lg);--calcite-font-size-sm: var(--label-font-size);display:block;margin-block-start:var(--padding-block-start, -.5rem);padding-block-end:var(--padding-block-end, .3rem);&.wrap-labels{padding-block-end:var(--wrapped-padding, .875rem)}}:host([visual-scale="s"]) arcgis-slider{--arcgis-slider-handle-size: .625rem;--ticks-font-size: .625rem;--label-font-size: .625rem;--label-padding-block-end: 1rem;--padding-block-end: .5rem;--wrapped-padding: 1.1rem}:host([visual-scale="l"]) arcgis-slider{--arcgis-slider-handle-size: 1rem;--ticks-font-size: .75rem;--label-font-size: .875rem;--label-padding-block-end: .94rem;--padding-block-end: .4rem;--wrapped-padding: 1.1rem}.ticks-container{width:100%;position:relative}.time-range-label{position:relative;width:100%;padding-block-start:var(--label-padding-block-start);padding-block-end:var(--label-padding-block-end);font-size:var(--label-font-size);font-variant-numeric:tabular-nums;line-height:1em;text-align:center}.main-ticks,.secondary-ticks{position:absolute;inset:0;--arcgis-ticks-outline-color: var(--calcite-color-foreground-1)}.main-ticks{--arcgis-ticks-gap: var(--calcite-space-md);--arcgis-ticks-tick-length: calc(var(--calcite-size-fixed-xxxs) * 2);--arcgis-ticks-label-width: min-content;--arcgis-ticks-label-text-align: center;--arcgis-ticks-font-size: var(--ticks-font-size);white-space:nowrap;word-break:auto-phrase;font-variant-numeric:tabular-nums}.wrap-labels .main-ticks{white-space:normal}.secondary-ticks{--arcgis-ticks-tick-length: var(--calcite-size-fixed-xxxs)}`;
61
+ class I extends v {
12
62
  constructor() {
13
- super(...arguments), this.messages = F({ blocking: !0 }), this._direction = f(), this._shouldWrapLabels = !1, this._sliderLabelFormatter = (e) => "", this._tickLabelFormatter = (e) => "", this.disabled = !1, this.mode = "range", this.startTime = 0, this.endTime = 0, this.visualScale = "m", this.arcgisTimeChange = _();
63
+ super(...arguments), this.messages = y({ blocking: !0 }), this._direction = w(), this._shouldWrapLabels = !1, this._sliderLabelFormatter = h, this._tickLabelFormatter = h, this.disabled = !1, this.mode = "range", this.startTime = 0, this.endTime = 0, this.visualScale = "m", this.arcgisTimeChange = _();
14
64
  }
15
65
  static {
16
66
  this.properties = { _shouldWrapLabels: 16, _values: 16, _sliderLabelFormatter: 16, _tickLabelFormatter: 16, disabled: 7, mode: 3, startTime: 9, endTime: 9, label: 1, steps: 9, visualScale: 3 };
17
67
  }
18
68
  static {
19
- this.styles = w;
69
+ this.styles = W;
20
70
  }
21
71
  willUpdate(e) {
22
72
  (e.has("mode") || e.has("startTime") || e.has("endTime")) && (this._values = this.mode === "single" ? [this.startTime] : [this.startTime, this.endTime]), e.has("messages") && this._updateLabelFormatters();
23
73
  }
24
- _getSliderLabelFormatter(e) {
25
- const t = new Intl.DateTimeFormat(e, g);
26
- return (a) => {
27
- const n = i(a, "minutes", "milliseconds"), m = new Date(n);
28
- let r = t.format(m);
29
- return n !== 0 && r === "00:00" && (r = "24:00"), r;
30
- };
31
- }
32
- _getTickLabelFormatter(e) {
33
- const t = new Intl.DateTimeFormat(e, g), a = new Intl.DateTimeFormat(e, y);
34
- return (n) => {
35
- const m = Math.round(i(n, "minutes", "hours")), r = i(m, "hours", "milliseconds"), c = new Date(r), d = t.formatToParts(c);
36
- return d.some((s) => s.type === "literal" && /\s/u.test(s.value)) ? a.format(c).replace(/\S+/gu, (s) => Array.from(s).join("⁠")) : d.map((s) => s.value).join("");
37
- };
38
- }
39
74
  _setStartTime(e) {
40
75
  this.startTime = e, this.arcgisTimeChange.emit();
41
76
  }
42
- _setRange(e, t) {
43
- this.startTime = e, this.endTime = t, this.arcgisTimeChange.emit();
77
+ _setRange(e, a) {
78
+ this.startTime = e, this.endTime = a, this.arcgisTimeChange.emit();
44
79
  }
45
80
  _updateLabelFormatters() {
46
81
  const e = this.messages._lang;
47
- this._sliderLabelFormatter = this._getSliderLabelFormatter(e), this._tickLabelFormatter = this._getTickLabelFormatter(e), this._shouldWrapLabels = ["ar", "bg", "el", "en", "ko", "zh-HK", "zh-TW"].includes(this.messages._t9nLocale);
82
+ this._sliderLabelFormatter = x(e), this._tickLabelFormatter = C(e), this._shouldWrapLabels = S(e);
48
83
  }
49
84
  _isolateTimeLabel(e) {
50
85
  return this._direction === "rtl" ? `⁨${e}⁩` : e;
51
86
  }
52
87
  render() {
53
88
  const e = this.mode === "single" && !this.disabled;
54
- return p(this.messages._lang, h`<arcgis-slider .ariaLabel=${this.label} class=${v({ "wrap-labels": this._shouldWrapLabels })} .disabled=${this.disabled} fill-placement=none .labelFormatter=${this._sliderLabelFormatter} layout=horizontal min=0 .max=${o} .steps=${this.steps ?? 1} .valueLabelsDisplay=${this.mode === "range" ? "hidden" : "always"} value-labels-placement=start .values=${this._values} @arcgisInput=${({ currentTarget: { values: t } }) => {
55
- this.mode === "single" ? this._setStartTime(t[0]) : this._setRange(t[0], t[1]);
56
- }}>${this.mode === "range" ? this._renderTimeRange() : void 0}<div class="ticks-container" slot=content-end><arcgis-ticks class="main-ticks" .interactive=${e} .labelFormatter=${this._tickLabelFormatter} layout=horizontal min=0 .max=${o} mode=value show-labels .values=${b} @arcgisTickClick=${(t) => this._setStartTime(t.detail.value)}></arcgis-ticks><arcgis-ticks class="secondary-ticks" layout=horizontal min=0 .max=${o} mode=value .values=${$} @arcgisTickClick=${(t) => this._setStartTime(t.detail.value)}></arcgis-ticks></div></arcgis-slider>`);
89
+ return f(this.messages._lang, d`<arcgis-slider .ariaLabel=${this.label} class=${L({ "wrap-labels": this._shouldWrapLabels })} .disabled=${this.disabled} fill-placement=none .labelFormatter=${this._sliderLabelFormatter} layout=horizontal min=0 .max=${n} .steps=${this.steps ?? 1} .valueLabelsDisplay=${this.mode === "range" ? "hidden" : "always"} value-labels-placement=start .values=${this._values} @arcgisInput=${({ currentTarget: { values: a } }) => {
90
+ this.mode === "single" ? this._setStartTime(a[0]) : this._setRange(a[0], a[1]);
91
+ }}>${this.mode === "range" ? this._renderTimeRange() : void 0}<div class="ticks-container" slot=content-end><arcgis-ticks class="main-ticks" .interactive=${e} .labelFormatter=${this._tickLabelFormatter} layout=horizontal min=0 .max=${n} mode=value show-labels .values=${g} @arcgisTickClick=${(a) => this._setStartTime(a.detail.value)}></arcgis-ticks><arcgis-ticks class="secondary-ticks" layout=horizontal min=0 .max=${n} mode=value .values=${O} @arcgisTickClick=${(a) => this._setStartTime(a.detail.value)}></arcgis-ticks></div></arcgis-slider>`);
57
92
  }
58
93
  _renderTimeRange() {
59
- const e = this._isolateTimeLabel(this._sliderLabelFormatter(this.startTime)), t = this._isolateTimeLabel(this._sliderLabelFormatter(this.endTime)), a = this.messages?.timeRange;
60
- return h`<div class="time-range-label" aria-live=polite slot=content-start>${k(a ?? "{start} — {end}", { start: e, end: t })}</div>`;
94
+ const e = this._isolateTimeLabel(this._sliderLabelFormatter(this.startTime)), a = this._isolateTimeLabel(this._sliderLabelFormatter(this.endTime)), r = this.messages?.timeRange;
95
+ return d`<div class="time-range-label" aria-live=polite slot=content-start>${T(r ?? "{start} — {end}", { start: e, end: a })}</div>`;
61
96
  }
62
97
  }
63
- const o = i(24, "hours", "minutes") - 1, b = [0, 6, 12, 18].map((l) => i(l, "hours", "minutes"));
64
- b.push(o);
65
- const $ = [2, 4, 8, 10, 14, 16, 20, 22].map((l) => i(l, "hours", "minutes")), g = {
66
- hour: "numeric",
67
- minute: "numeric",
68
- timeZone: "UTC"
69
- }, y = {
70
- hour: "numeric",
71
- timeZone: "UTC"
72
- };
73
- u("arcgis-time-of-day-slider", z);
98
+ const n = i(24, "hours", "minutes") - 1, g = [0, 6, 12, 18].map((t) => i(t, "hours", "minutes"));
99
+ g.push(n);
100
+ const O = [2, 4, 8, 10, 14, 16, 20, 22].map((t) => i(t, "hours", "minutes"));
101
+ k("arcgis-time-of-day-slider", I);
74
102
  export {
75
- z as ArcgisTimeOfDaySlider
103
+ I as ArcgisTimeOfDaySlider
76
104
  };