@arcgis/map-components 5.2.0-next.93 → 5.2.0-next.94

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 (61) hide show
  1. package/dist/cdn/{RJSJ53UD.js → 2S3PMUG2.js} +1 -1
  2. package/dist/cdn/2Z6FVTKT.js +2 -0
  3. package/dist/cdn/{DDGANMOY.js → 3FEDJ3XZ.js} +1 -1
  4. package/dist/cdn/3MZKVY6A.js +2 -0
  5. package/dist/cdn/{IORWRMMG.js → 3ZRONF3M.js} +1 -1
  6. package/dist/cdn/5A6MVUCS.js +3 -0
  7. package/dist/cdn/{DCGOOUOL.js → 5QVEXW3X.js} +1 -1
  8. package/dist/cdn/{KX3XJGXZ.js → 76XDS6TG.js} +1 -1
  9. package/dist/cdn/7N4V2IN6.js +2 -0
  10. package/dist/cdn/BKC42MLS.js +2 -0
  11. package/dist/cdn/{BSLVN2NW.js → DEH55KP3.js} +1 -1
  12. package/dist/cdn/DKP73IZU.js +2 -0
  13. package/dist/cdn/ISX6CEA3.js +2 -0
  14. package/dist/cdn/JZHBJAXX.js +2 -0
  15. package/dist/cdn/{DMFYRFSD.js → NHU5Q4AZ.js} +1 -1
  16. package/dist/cdn/O3G7XPDI.js +2 -0
  17. package/dist/cdn/{35VRWQWE.js → O45XRDXJ.js} +1 -1
  18. package/dist/cdn/{FD7U6V53.js → UNOCR34T.js} +1 -1
  19. package/dist/cdn/{R6ZUE6GP.js → VURES5AT.js} +1 -1
  20. package/dist/cdn/assets/utility-network-trace-configuration-picker/t9n/messages.en.json +1 -0
  21. package/dist/cdn/index.js +1 -1
  22. package/dist/cdn/main.css +1 -1
  23. package/dist/chunks/keyboard-utils.js +14 -8
  24. package/dist/chunks/layer-list-item.js +13 -13
  25. package/dist/chunks/useArcgisViewReadyError.js +14 -9
  26. package/dist/components/arcgis-feature-media/customElement.js +47 -47
  27. package/dist/components/arcgis-features/customElement.js +17 -17
  28. package/dist/components/arcgis-features-next/customElement.js +31 -27
  29. package/dist/components/arcgis-navigation-toggle/customElement.js +1 -1
  30. package/dist/components/arcgis-utility-network-picker/customElement.js +18 -15
  31. package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +89 -0
  32. package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.js +137 -0
  33. package/dist/components/arcgis-utility-network-trace-configuration-picker/index.js +9 -0
  34. package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.js +137 -206
  35. package/dist/components/arcgis-utility-network-trace-inputs-next/index.js +1 -6
  36. package/dist/components/arcgis-weather/customElement.js +1 -1
  37. package/dist/docs/api.json +1 -1
  38. package/dist/docs/docs.json +1 -1
  39. package/dist/docs/vscode.html-custom-data.json +1 -1
  40. package/dist/docs/web-types.json +1 -1
  41. package/dist/index.d.ts +9 -3
  42. package/dist/loader.js +1 -1
  43. package/dist/types/lumina.d.ts +5 -3
  44. package/dist/types/preact.d.ts +6 -4
  45. package/dist/types/react.d.ts +7 -5
  46. package/dist/types/stencil.d.ts +5 -3
  47. package/package.json +5 -5
  48. package/dist/cdn/32XG4IQO.js +0 -2
  49. package/dist/cdn/BXDUMWWE.js +0 -2
  50. package/dist/cdn/FLVENMD3.js +0 -2
  51. package/dist/cdn/HEYHZKI2.js +0 -3
  52. package/dist/cdn/I5DFLVVJ.js +0 -2
  53. package/dist/cdn/J3743ZYD.js +0 -2
  54. package/dist/cdn/KGXZG3YI.js +0 -2
  55. package/dist/cdn/NO6MFBNV.js +0 -2
  56. package/dist/cdn/NP5NJFWN.js +0 -2
  57. package/dist/cdn/assets/utility-network-subnetwork-info-next/t9n/messages.en.json +0 -1
  58. package/dist/components/arcgis-utility-network-subnetwork-info-next/customElement.d.ts +0 -29
  59. package/dist/components/arcgis-utility-network-subnetwork-info-next/customElement.js +0 -35
  60. package/dist/components/arcgis-utility-network-subnetwork-info-next/index.js +0 -1
  61. /package/dist/components/{arcgis-utility-network-subnetwork-info-next → arcgis-utility-network-trace-configuration-picker}/index.d.ts +0 -0
@@ -19,18 +19,18 @@ import { stripHTML as E } from "@arcgis/core/applications/Components/stringUtils
19
19
  import { substitute as d, formatNumber as C } from "@arcgis/core/intl.js";
20
20
  import { u as J } from "../../chunks/useT9n.js";
21
21
  import { when as Q, watch as u } from "@arcgis/core/core/reactiveUtils.js";
22
- import { a as R } from "../../chunks/maybe.js";
23
- import { a as Y, b as ee } from "../../chunks/keyboard-utils.js";
24
- const te = P`: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}`;
25
- function ie(v) {
22
+ import { a as O } from "../../chunks/maybe.js";
23
+ import { b as Y, a as ee, c as te } from "../../chunks/keyboard-utils.js";
24
+ const ie = P`: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}`;
25
+ function ae(v) {
26
26
  return v?.declaredClass.startsWith("esri.layers.") ?? !1;
27
27
  }
28
- function ae(v) {
28
+ function se(v) {
29
29
  if (!(!v || !("featureReduction" in v)))
30
30
  return v.featureReduction?.type;
31
31
  }
32
- const se = X(V), ne = 25;
33
- class oe extends U {
32
+ const ne = X(V), oe = 25;
33
+ class re extends U {
34
34
  constructor() {
35
35
  super(...arguments), this._zoomToFeature = new z({
36
36
  icon: "magnifying-glass-plus",
@@ -41,14 +41,14 @@ class oe extends U {
41
41
  }, this._featureMenuIntersectionObserver = new IntersectionObserver(this._featureMenuIntersectionObserverCallback, {
42
42
  root: window.document
43
43
  }), this._featureMenuIntersectionObserverNode = null, this._setFocusAnimationFrameId = null, this._setFocusAnimationFrameResolve = null, this._rootFlowItemNode = w(), this._featureMenuViewportNode = w(), this._actionBarMenuNode = w(), this._flowContainerNode = w(), this._aggregatedFeaturesComponent = w(), this.messages = J(), this._selectedFeatureComponent = w(), this._direction = K(), this._cancelOpenRelatedFeature = () => {
44
- this._openRelatedFeatureAbortController = R(this._openRelatedFeatureAbortController);
45
- }, this._spinnerVisible = !1, this._spinnerVisibilityTimeout = null, this._openRelatedFeatureAbortController = null, this.flowItems = new k(), 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.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 k(), 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 = j()("active", "collapsed", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = x(), this.arcgisClose = x(), this.arcgisTriggerAction = x();
44
+ this._openRelatedFeatureAbortController = O(this._openRelatedFeatureAbortController);
45
+ }, this._spinnerVisible = !1, this._spinnerVisibilityTimeout = null, this._openRelatedFeatureAbortController = null, this.flowItems = new k(), this._aggregatedFeatureCount = 0, this._selectedAggregatedFeatureIndex = -1, this._aggregatedFeaturesLoading = !1, this._hasActionsStartSlotContent = !1, this._hasActionsEndSlotContent = !1, this.viewModel = ne(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.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 k(), 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 = j()("active", "collapsed", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = x(), this.arcgisClose = x(), this.arcgisTriggerAction = x();
46
46
  }
47
47
  static {
48
48
  this.properties = { _openRelatedFeatureAbortController: 16, flowItems: 16, _aggregatedFeatureCount: 16, _selectedAggregatedFeatureIndex: 16, _aggregatedFeaturesLoading: 16, _hasActionsStartSlotContent: 16, _hasActionsEndSlotContent: 16, _hideActionText: 16, _featureNavigationVisible: 16, _isCollapsed: 16, _collapseEnabled: 16, _selectedFeatureHeading: 16, _selectedFeatureHeadingText: 16, _selectedFeatureContent: 16, _featureFlowItemSelected: 16, viewModel: 0, actions: 0, active: 0, autoDestroyDisabled: 5, focusTrapEnabled: 5, collapseDirection: 1, collapsed: 5, content: 1, defaultPopupTemplateEnabled: 5, effectiveHeading: 32, 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 };
49
49
  }
50
50
  static {
51
- this.styles = te;
51
+ this.styles = ie;
52
52
  }
53
53
  get _hideActionText() {
54
54
  if (!this.responsiveActionsEnabled)
@@ -164,7 +164,7 @@ class oe extends U {
164
164
  this._setFocusAnimationFrameId != null && (cancelAnimationFrame(this._setFocusAnimationFrameId), this._setFocusAnimationFrameId = null), this._resolveSetFocusAnimationFrame();
165
165
  }
166
166
  _cancelFetchingFeatures() {
167
- this._fetchFeaturesController = R(this._fetchFeaturesController);
167
+ this._fetchFeaturesController = O(this._fetchFeaturesController);
168
168
  }
169
169
  _handleClose() {
170
170
  this.close(), this.arcgisClose.emit();
@@ -175,7 +175,7 @@ class oe extends U {
175
175
  const i = a?.graphic;
176
176
  if (!i)
177
177
  return;
178
- const s = N(i), n = ie(s) ? s : null;
178
+ const s = N(i), n = ae(s) ? s : null;
179
179
  let o = t.get(n);
180
180
  o || (o = [], t.set(n, o)), o.push(a);
181
181
  }), t;
@@ -241,13 +241,20 @@ class oe extends U {
241
241
  _featureMenuIntersectionObserverCreated(e) {
242
242
  this._unobserveFeatureMenuObserver(), e && this._featureMenuIntersectionObserver.observe(e), this._featureMenuIntersectionObserverNode = e;
243
243
  }
244
+ _getActionLabel(e) {
245
+ const { messages: t } = this;
246
+ return e.id === "zoom-to-feature" ? d(t.zoomLabel ?? "", {
247
+ messages: t,
248
+ title: this._selectedFeatureHeadingText
249
+ }) : null;
250
+ }
244
251
  _getActionTitle(e) {
245
252
  const { messages: t, selectedFeature: a } = this, { id: i } = e, s = a?.attributes, n = e.title ?? "", o = i === "zoom-to-feature" ? d(n, { messages: t }) : i === "remove-selected-feature" ? d(n, { messages: t }) : i === "zoom-to-aggregated-features" ? d(n, { messages: t }) : i === "browse-aggregated-features" ? d(n, { messages: t }) : e.title;
246
253
  return o && s ? d(o, s) : o ?? "";
247
254
  }
248
255
  _onMainKeydown(e) {
249
256
  const { key: t } = e;
250
- e.defaultPrevented || (Y(t, this._direction) && (e.stopPropagation(), this._handleFeatureMenuBack(), this.previous()), ee(t, this._direction) && (e.stopPropagation(), this._handleFeatureMenuBack(), this.next()));
257
+ e.defaultPrevented || Y(e) || (ee(t, this._direction, { horizontalOnly: !0 }) && (e.preventDefault(), e.stopPropagation(), this._handleFeatureMenuBack(), this.previous()), te(t, this._direction, { horizontalOnly: !0 }) && (e.preventDefault(), e.stopPropagation(), this._handleFeatureMenuBack(), this.next()));
251
258
  }
252
259
  _featureMenuViewportScrollTop() {
253
260
  this._featureMenuViewportNode.value?.scrollContentTo({ top: 0 });
@@ -261,7 +268,7 @@ class oe extends U {
261
268
  }
262
269
  _viewScaleChange() {
263
270
  const { selectedFeature: e } = this;
264
- !e?.isAggregate || ae(N(e)) !== "cluster" || (this.viewModel.aggregatedFeaturesEnabled = !1, this.open = !1, this.clear());
271
+ !e?.isAggregate || se(N(e)) !== "cluster" || (this.viewModel.aggregatedFeaturesEnabled = !1, this.open = !1, this.clear());
265
272
  }
266
273
  _viewChange() {
267
274
  this.viewModel.clear(), this.open = !1, this._aggregatedFeatureCount = 0, this._removeFlowItems();
@@ -313,7 +320,7 @@ class oe extends U {
313
320
  _getSpinnerTrackLocation() {
314
321
  return !this.hideSpinner && this.viewModel.open && this.viewModel?.waitingForResult ? this._spinnerVisible ? !0 : (this._spinnerVisibilityTimeout ??= setTimeout(() => {
315
322
  this._spinnerVisibilityTimeout = null, this._spinnerVisible = !0, this._createSpinner();
316
- }, ne), !1) : (this._clearSpinnerVisibilityTimeout(), this._spinnerVisible = !1, !1);
323
+ }, oe), !1) : (this._clearSpinnerVisibilityTimeout(), this._spinnerVisible = !1, !1);
317
324
  }
318
325
  _createSpinner() {
319
326
  const e = this.referenceElement;
@@ -393,27 +400,24 @@ class oe extends U {
393
400
  });
394
401
  if (s === "feature" && !n)
395
402
  return null;
396
- const B = !o;
403
+ const R = !o;
397
404
  return r`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${y(T({
398
405
  "flow-item-collapsed": c
399
406
  }))} .closable=${!t} .closed=${!F} .collapsed=${s === "list" && c} .collapseDirection=${this.collapseDirection ?? (g ? "down" : "up")} .collapsible=${s === "list" && l} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand, back: I }} .description=${this.hideFeatureMenuHeading ? void 0 : d(i.total ?? "", {
400
407
  total: p.length
401
- })} .heading=${this.hideFeatureMenuHeading ? void 0 : A} .headingLevel=${m} .loading=${e.waitingForContents} .selected=${B} @calciteFlowItemBack=${(O) => {
402
- O.preventDefault(), this._handleFeatureMenuBack();
408
+ })} .heading=${this.hideFeatureMenuHeading ? void 0 : A} .headingLevel=${m} .loading=${e.waitingForContents} .selected=${R} @calciteFlowItemBack=${(B) => {
409
+ B.preventDefault(), this._handleFeatureMenuBack();
403
410
  }} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${f(this._featureMenuViewportNode)}>${s === "list" ? this._renderHeaderActions() : null}${M ? r`<calcite-loader class="loader" inline .label=${i.loading ?? ""} slot=header-actions-end></calcite-loader>` : null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${f(this._featureMenuIntersectionObserverCreated)}></div>${s === "feature" ? r`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${I} title=${I ?? h}>${i.back}</calcite-button>` : null}</calcite-flow-item>`;
404
411
  }
405
412
  _renderFlowItem(e, t) {
406
- const { messages: a, hideCloseButton: i, hideSelectFeature: s, active: n, hideHeading: o } = this, l = "graphic" in e && "isFeatureFromTable" in e && !e.isFeatureFromTable, c = l && !s, g = e.flowType === "feature-association", m = a.returnToInitialFeature ?? "", F = a?.selectFeature, p = this._getActionTitle(this._zoomToFeature), _ = d(a.zoomLabel ?? "", {
407
- messages: a,
408
- title: this._selectedFeatureHeadingText
409
- }), $ = !this.hideActionBar && g && l, M = e.flowType === "feature" && this.viewModel.aggregatedFeaturesEnabled ? r`<div class="footer" slot=footer>${this._renderPagination(() => {
413
+ const { messages: a, hideCloseButton: i, hideSelectFeature: s, active: n, hideHeading: o } = this, l = "graphic" in e && "isFeatureFromTable" in e && !e.isFeatureFromTable, c = l && !s, g = e.flowType === "feature-association", m = a.returnToInitialFeature ?? "", F = a?.selectFeature, p = this._getActionTitle(this._zoomToFeature), _ = this._getActionLabel(this._zoomToFeature), $ = !this.hideActionBar && g && l, M = e.flowType === "feature" && this.viewModel.aggregatedFeaturesEnabled ? r`<div class="footer" slot=footer>${this._renderPagination(() => {
410
414
  this._aggregatedFeaturesComponent.value?.previous();
411
415
  }, () => {
412
416
  this._aggregatedFeaturesComponent.value?.next();
413
417
  })}${this._renderFeaturePaginationText(this._aggregatedFeatureCount, this._selectedAggregatedFeatureIndex)}</div>` : null;
414
418
  return r`<calcite-flow-item .closable=${!i} .closed=${!n} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${E(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${o ? void 0 : E(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${(A) => {
415
419
  A.preventDefault(), this._handleDrillInBackClick();
416
- }} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${o ? null : r`<div slot=heading><div .innerHTML=${b.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${b.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${m ?? ""} title=${m ?? "" ?? h}></calcite-action>${c ? r`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${F ?? ""} title=${F ?? h}></calcite-action>` : null}${$ ? r`<calcite-action-bar expand-toggle-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=${p} title=${_ ?? h} .label=${_} @click=${() => W(this.viewModel, this._zoomToFeature, e)}></calcite-action></calcite-action-group></calcite-action-bar>` : null}<div class="container">${e}</div>${M}</calcite-flow-item>`;
420
+ }} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${o ? null : r`<div slot=heading><div .innerHTML=${b.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${b.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${m ?? ""} title=${m ?? "" ?? h}></calcite-action>${c ? r`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${F ?? ""} title=${F ?? h}></calcite-action>` : null}${$ ? r`<calcite-action-bar expand-toggle-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=${p} title=${_ ?? p ?? h} .label=${_ ?? p} @click=${() => W(this.viewModel, this._zoomToFeature, e)}></calcite-action></calcite-action-group></calcite-action-bar>` : null}<div class="container">${e}</div>${M}</calcite-flow-item>`;
417
421
  }
418
422
  _renderContentContainer() {
419
423
  const e = this.flowItems?.toArray(), t = e.length > 0, a = this.viewModel.aggregatedFeaturesEnabled && this.viewModel.selectedFeature?.isAggregate && !t, i = a && e.length === 0, s = e.length === 0 && this._featureFlowItemSelected && !a, n = e?.map((c, g) => this._renderFlowItem(c, this._featureFlowItemSelected && g === e.length - 1)), o = this._renderBrowseAggregateContainer(!!i), l = this.initialDisplayMode === "list" ? [this._renderFeatureMenuContainer(), this._renderContentFeature(s)] : [this._renderContentFeature(s), this._renderFeatureMenuContainer()];
@@ -437,8 +441,8 @@ class oe extends U {
437
441
  }
438
442
  _renderActions(e) {
439
443
  return e.map((t) => {
440
- const a = this._getActionTitle(t);
441
- 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=${a ?? ""} title=${a ?? h} .hidden=${!t.visible} @click=${() => this._triggerAction(t)}></calcite-action>`;
444
+ const a = this._getActionTitle(t), i = this._getActionLabel(t);
445
+ 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=${a ?? ""} .label=${i ?? a} title=${i ?? a ?? h} .hidden=${!t.visible} @click=${() => this._triggerAction(t)}></calcite-action>`;
442
446
  });
443
447
  }
444
448
  _renderContent() {
@@ -446,7 +450,7 @@ class oe extends U {
446
450
  return t ? r`<arcgis-feature-next .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} .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" ? S(e, r`<div .innerHTML=${b.sanitize(e) ?? ""}></div>`) : e ?? null;
447
451
  }
448
452
  }
449
- H("arcgis-features-next", oe);
453
+ H("arcgis-features-next", re);
450
454
  export {
451
- oe as ArcgisFeaturesNext
455
+ re as ArcgisFeaturesNext
452
456
  };
@@ -8,7 +8,7 @@ import { css as _, html as M } from "lit";
8
8
  import { u as A } from "../../chunks/useT9n.js";
9
9
  import { u as $ } from "../../chunks/useView.js";
10
10
  import { g as x } from "../../chunks/globalCss.js";
11
- import { b as w, a as R } from "../../chunks/keyboard-utils.js";
11
+ import { c as w, a as R } from "../../chunks/keyboard-utils.js";
12
12
  const k = _`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);calcite-button{--calcite-offset-invert-focus: 1}display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}}:host{display:flex;inline-size:fit-content;block-size:fit-content}.root{--calcite-internal-action-bar-padding: 0;--calcite-internal-action-bar-gap: 0;--calcite-action-corner-radius: 0}calcite-action-group{--calcite-internal-action-group-gap: 0}`, r = {
13
13
  pan: "move",
14
14
  rotate: "rotate"
@@ -8,7 +8,7 @@ import { log as o } from "@arcgis/toolkit/log";
8
8
  import { css as y, html as s } from "lit";
9
9
  import { l } from "../../chunks/async-utils.js";
10
10
  import { u as g } from "../../chunks/useT9n.js";
11
- const k = y`:host{height:100%;flex-grow:1}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-label{margin:0 var(--calcite-space-md)}calcite-block calcite-notice{margin:var(--calcite-space-md) var(--calcite-space-md) 0}calcite-notice{margin:var(--calcite-space-md)}`;
11
+ const k = y`:host{height:100%;flex-grow:1}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block :is(calcite-combobox,calcite-label,calcite-notice){margin:0 var(--calcite-space-md) var(--calcite-space-md)}calcite-block :last-child{margin-bottom:0}calcite-notice{margin:var(--calcite-space-md)}`;
12
12
  class u extends n {
13
13
  constructor() {
14
14
  super(...arguments), this._messages = g({ blocking: !0 }), this.hideErrors = !1, this.hideLoader = !1, this.state = "loading", this.arcgisPropertyChange = w()("selectedUtilityNetwork", "state"), this.arcgisError = m();
@@ -25,20 +25,23 @@ class u extends n {
25
25
  ]);
26
26
  }
27
27
  willUpdate(t) {
28
- t.has("_utilityNetworks") && this.#r(), t.has("selectedUtilityNetwork") && this.#s();
28
+ t.has("_utilityNetworks") && this.#s(), t.has("selectedUtilityNetwork") && this.#o();
29
29
  }
30
30
  #t(t) {
31
31
  this.error = t, this.state = "error", this.arcgisError.emit();
32
32
  }
33
+ #i() {
34
+ this.error = void 0, this.state = "ready";
35
+ }
33
36
  #e() {
34
37
  if (this.error = void 0, this.state = "loading", !this.view?.map) {
35
38
  o("error", this, this._messages.errors.noView), this._utilityNetworks = void 0, this.#t(this._messages.errors.noView);
36
39
  return;
37
40
  }
38
41
  const t = this.view.map;
39
- this.#i(t);
42
+ this.#r(t);
40
43
  }
41
- async #i(t) {
44
+ async #r(t) {
42
45
  try {
43
46
  t.loaded || await t.load();
44
47
  } catch (e) {
@@ -47,42 +50,42 @@ class u extends n {
47
50
  this._utilityNetworks = t.utilityNetworks || new h();
48
51
  }
49
52
  }
50
- #r() {
53
+ #s() {
51
54
  const { selectedUtilityNetwork: t, _utilityNetworks: e } = this;
52
55
  e?.length ? (!t || !e.includes(t)) && (this.selectedUtilityNetwork = e.at(0)) : (this.#t(this._messages.errors.noUtilityNetwork), o("error", this, this._messages.errors.noUtilityNetwork), this.selectedUtilityNetwork = void 0);
53
56
  }
54
- async #s() {
57
+ async #o() {
55
58
  const { selectedUtilityNetwork: t } = this;
56
59
  try {
57
- t && !t.loaded && await t.load(), this.state = "ready";
60
+ t && !t.loaded && await t.load(), this.#i();
58
61
  } catch (e) {
59
62
  l(e, this, this._messages.errors.utilityNetworkLoadFailed), this.#t(this._messages.errors.utilityNetworkLoadFailed);
60
63
  }
61
64
  }
62
- #o() {
65
+ #l() {
63
66
  return this.hideLoader ? null : s`<calcite-loader label=loading></calcite-loader>`;
64
67
  }
65
- #l(t, e = !1, i) {
68
+ #a(t, e = !1, i) {
66
69
  return this.hideErrors ? null : s`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`;
67
70
  }
68
- #a() {
71
+ #c() {
69
72
  const t = this._messages.labels.utilityNetwork, e = this._utilityNetworks?.map((i) => s`<calcite-combobox-item .value=${i.id} .heading=${i.title || i.id} .selected=${i.id === this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);
70
73
  return s`<calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
71
74
  const r = i.selectedItems[0]?.value;
72
75
  this.selectedUtilityNetwork?.id !== r && (this.selectedUtilityNetwork = this._utilityNetworks?.find((a) => a.id === r));
73
76
  }}>${e}</calcite-combobox>`;
74
77
  }
75
- #c() {
78
+ #h() {
76
79
  const { selectedUtilityNetwork: t } = this;
77
80
  return s`<calcite-label>${t?.title}</calcite-label>`;
78
81
  }
79
- #h(t) {
80
- const e = this._messages.labels.utilityNetwork, i = this.heading || e, r = this._utilityNetworks?.length ? this._utilityNetworks?.length === 1 ? this.#c() : this.#a() : void 0;
82
+ #d(t) {
83
+ const e = this._messages.labels.utilityNetwork, i = this.heading || e, r = this._utilityNetworks?.length ? this._utilityNetworks?.length === 1 ? this.#h() : this.#c() : void 0;
81
84
  return s`<calcite-block .heading=${i} .label=${e} expanded>${r}${t}</calcite-block>`;
82
85
  }
83
86
  render() {
84
- const { error: t, state: e, selectedUtilityNetwork: i } = this, r = e === "error" && t ? this.#l(t, !1, "exclamation-mark-triangle") : void 0;
85
- return !r && !i?.loaded && !i?.loadError ? this.#o() : e === "error" && r && !this._utilityNetworks?.length ? r : this.#h(r);
87
+ const { error: t, state: e, selectedUtilityNetwork: i } = this, r = e === "error" && t ? this.#a(t, !1, "exclamation-mark-triangle") : void 0;
88
+ return !r && !i?.loaded && !i?.loadError ? this.#l() : e === "error" && r && !this._utilityNetworks?.length ? r : this.#d(r);
86
89
  }
87
90
  }
88
91
  c("arcgis-utility-network-picker", u);
@@ -0,0 +1,89 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type NamedTraceConfiguration from "@arcgis/core/networks/support/NamedTraceConfiguration.js";
3
+ import type UNTraceConfiguration from "@arcgis/core/networks/support/UNTraceConfiguration.js";
4
+ import type UtilityNetwork from "@arcgis/core/networks/UtilityNetwork.js";
5
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
6
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
7
+
8
+ /**
9
+ * Selects a named trace configuration from a list and displays subnetwork fields from the named trace configuration:
10
+ * Domain network name, tier name, and target tier name.
11
+ *
12
+ * @since 5.2
13
+ * @internal
14
+ */
15
+ export abstract class ArcgisUtilityNetworkTraceConfigurationPicker extends LitElement {
16
+ /** @internal */
17
+ protected _messages: {
18
+ errors: {
19
+ noCompatibleSubnetworks: string;
20
+ noTraceConfiguration: string;
21
+ traceConfigurationNotFound: string;
22
+ noTraceConfigurations: string;
23
+ };
24
+ headings: {
25
+ domainNetwork: string;
26
+ targetTier: string;
27
+ tier: string;
28
+ };
29
+ instructions: { enterSubnetworkName: string; };
30
+ labels: {
31
+ subnetworkInfo: string;
32
+ subnetworkName: string;
33
+ tooManySubnetworks: string;
34
+ traceConfiguration: string;
35
+ };
36
+ } & T9nMeta<{
37
+ errors: {
38
+ noCompatibleSubnetworks: string;
39
+ noTraceConfiguration: string;
40
+ traceConfigurationNotFound: string;
41
+ noTraceConfigurations: string;
42
+ };
43
+ headings: {
44
+ domainNetwork: string;
45
+ targetTier: string;
46
+ tier: string;
47
+ };
48
+ instructions: { enterSubnetworkName: string; };
49
+ labels: {
50
+ subnetworkInfo: string;
51
+ subnetworkName: string;
52
+ tooManySubnetworks: string;
53
+ traceConfiguration: string;
54
+ };
55
+ }>;
56
+ accessor error: string | undefined;
57
+ accessor heading: string | undefined;
58
+ /** @default false */
59
+ accessor hideErrors: boolean;
60
+ /** @default false */
61
+ accessor hideSubnetworkInfo: boolean;
62
+ /**
63
+ * Whether a the user has selected a named trace configuration that executes a
64
+ * subnetwork trace with a specified subnetwork name.
65
+ *
66
+ * @default false
67
+ * @internal
68
+ */
69
+ get isSubnetworkNameTraceSelected(): boolean;
70
+ accessor selectedNamedTraceConfiguration: NamedTraceConfiguration | undefined;
71
+ /** @default "ready" */
72
+ accessor state: "error" | "loading" | "ready";
73
+ /**
74
+ * A clone of the utility network trace configuration associated with
75
+ * the selected named trace configuration. Updates on this object are
76
+ * used to reflect the user's changes to the named trace configuration.
77
+ */
78
+ accessor traceConfiguration: UNTraceConfiguration | undefined;
79
+ /** @required */
80
+ accessor traceConfigurations: NamedTraceConfiguration[];
81
+ /** @required */
82
+ accessor utilityNetwork: UtilityNetwork | undefined;
83
+ readonly arcgisError: import("@arcgis/lumina").TargetedEvent<this, void>;
84
+ readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "selectedNamedTraceConfiguration" | "traceConfiguration"; }>;
85
+ readonly "@eventTypes": {
86
+ arcgisError: ArcgisUtilityNetworkTraceConfigurationPicker["arcgisError"]["detail"];
87
+ arcgisPropertyChange: ArcgisUtilityNetworkTraceConfigurationPicker["arcgisPropertyChange"]["detail"];
88
+ };
89
+ }
@@ -0,0 +1,137 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as u } from "../../chunks/runtime.js";
3
+ import m from "@arcgis/core/networks/support/UNTraceConfiguration.js";
4
+ import { LitElement as d, createEvent as h } from "@arcgis/lumina";
5
+ import { u as b } from "../../chunks/useT9n.js";
6
+ import { css as g, html as r } from "lit";
7
+ import { log as c } from "@arcgis/toolkit/log";
8
+ import { usePropertyChange as f } from "@arcgis/lumina/controllers";
9
+ import { q as k } from "../../chunks/layer-utils.js";
10
+ const w = g`:host{height:100%;flex-grow:1}.subnetwork-details{border-radius:var(--calcite-border-radius);border:solid 1px var(--calcite-color-border-3)}.key-value-pair{padding:var(--calcite-space-sm)}.key-value-pair__key{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-3)}.key-value-pair__value{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block :is(calcite-combobox,calcite-input,calcite-label,calcite-notice){margin:0 var(--calcite-space-md) var(--calcite-space-md)}calcite-block>:last-child{margin-bottom:0}calcite-block calcite-input-message{padding:var(--calcite-space-sm) var(--calcite-space-md) 0}calcite-notice{margin:var(--calcite-space-md)}#subnetwork-info-block{margin:var(--calcite-space-md) var(--calcite-space-md) 0}.inline-loader{--calcite-loader-spacing: var(--calcite-space-md)}`, C = 20, p = /* @__PURE__ */ new Set(["subnetwork", "subnetwork-controller", "upstream", "downstream", "isolation"]);
11
+ class N extends d {
12
+ constructor() {
13
+ super(...arguments), this._messages = b({ blocking: !0 }), this._subnetworkNamesState = "ready", this._compatibleSubnetworkNames = [], this.traceConfigurations = [], this.hideSubnetworkInfo = !1, this.hideErrors = !1, this.state = "ready", this.arcgisPropertyChange = f()("selectedNamedTraceConfiguration", "traceConfiguration"), this.arcgisError = h();
14
+ }
15
+ static {
16
+ this.properties = { _subnetworksTable: 16, _subnetworkNamesState: 16, _compatibleSubnetworkNames: 16, selectedNamedTraceConfiguration: 0, traceConfigurations: 0, utilityNetwork: 0, heading: 1, traceConfiguration: 0, isSubnetworkNameTraceSelected: 32, hideSubnetworkInfo: 5, hideErrors: 5, error: 1, state: 1 };
17
+ }
18
+ static {
19
+ this.styles = w;
20
+ }
21
+ get #e() {
22
+ return this.traceConfiguration?.subnetworkName ?? void 0;
23
+ }
24
+ set #e(e) {
25
+ this.traceConfiguration && (this.traceConfiguration.subnetworkName = e);
26
+ }
27
+ get isSubnetworkNameTraceSelected() {
28
+ const { selectedNamedTraceConfiguration: e } = this;
29
+ return !!e?.traceConfiguration?.subnetworkName && e?.traceType === "subnetwork";
30
+ }
31
+ willUpdate(e) {
32
+ e.has("traceConfigurations") && this.#d(), e.has("selectedNamedTraceConfiguration") && this.#o(), e.has("utilityNetwork") && this.#m();
33
+ }
34
+ async #o() {
35
+ const { selectedNamedTraceConfiguration: e, _messages: t } = this;
36
+ if (!(e?.traceConfiguration instanceof m)) {
37
+ this.#t(t.errors.noTraceConfiguration), this.traceConfiguration = void 0, this.arcgisPropertyChange.emit({ name: "traceConfiguration" });
38
+ return;
39
+ }
40
+ this.#i(), this.traceConfiguration = e.traceConfiguration.clone(), this.arcgisPropertyChange.emit({ name: "selectedNamedTraceConfiguration" }), this.arcgisPropertyChange.emit({ name: "traceConfiguration" }), this.isSubnetworkNameTraceSelected && (this._subnetworkNamesState = "loading", this.state = "loading", await this.#s(this.traceConfiguration), this._subnetworkNamesState = "ready", this.state = "ready");
41
+ }
42
+ async #s(e) {
43
+ await this.#n(), await this.#c(), e.subnetworkName && !this._compatibleSubnetworkNames.some((t) => t === e.subnetworkName) && (this.#e = this._compatibleSubnetworkNames.at(0));
44
+ }
45
+ async #n() {
46
+ this._subnetworksTable || (this._subnetworksTable = await this.utilityNetwork?.loadSubnetworksTable());
47
+ }
48
+ async #c() {
49
+ const { _subnetworksTable: e } = this;
50
+ if (!e)
51
+ return;
52
+ const t = e.fieldsIndex.get("SUBNETWORKNAME"), i = (s, n, l) => n === 0 || s.getAttribute(t.name) !== l[n - 1].getAttribute(t.name), a = e.createQuery();
53
+ a.gdbVersion = this.utilityNetwork?.gdbVersion, a.where = this.#l(), a.outFields = [t.name], a.orderByFields = [t.name];
54
+ const { features: o } = await k(e, a, void 0, !1);
55
+ this._compatibleSubnetworkNames = o.filter(i).map((s) => s.getAttribute(t.name));
56
+ }
57
+ #l() {
58
+ const e = this.traceConfiguration, t = `DOMAINNETWORKNAME = '${e.domainNetworkName}'`, i = `TIERNAME = '${e.tierName}'`;
59
+ return [t, i].join(" AND ");
60
+ }
61
+ #u(e) {
62
+ const t = this.traceConfigurations.find((i) => i.globalId === e);
63
+ if (!t) {
64
+ this.#t(this._messages.errors.traceConfigurationNotFound), this.traceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0;
65
+ return;
66
+ }
67
+ this.#i(), this.selectedNamedTraceConfiguration = t;
68
+ }
69
+ #m() {
70
+ this.#e = void 0, this._subnetworksTable = void 0, this._compatibleSubnetworkNames = [];
71
+ }
72
+ #d() {
73
+ this.traceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this.traceConfigurations.length ? (this.#i(), this.selectedNamedTraceConfiguration = this.traceConfigurations.at(0), this.#o()) : this.#t(this._messages.errors.noTraceConfigurations);
74
+ }
75
+ #t(e) {
76
+ c("error", this, e), this.error = e, this.state = "error", this.arcgisError.emit();
77
+ }
78
+ #i() {
79
+ this.error = void 0, this.state = "ready";
80
+ }
81
+ #a(e, t) {
82
+ return r`<div class="key-value-pair"><div class="key-value-pair__key">${e}</div><div class="key-value-pair__value">${t}</div></div>`;
83
+ }
84
+ #r(e, t = !1, i = "exclamation-mark-triangle") {
85
+ return this.hideErrors ? null : r`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`;
86
+ }
87
+ #h() {
88
+ const { selectedNamedTraceConfiguration: e } = this;
89
+ return r`<calcite-label>${e?.title}</calcite-label>`;
90
+ }
91
+ #b() {
92
+ const e = this.traceConfigurations.map((i) => r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId === this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`), t = this._messages.labels.traceConfiguration;
93
+ return r`<calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
94
+ const a = i.selectedItems[0]?.value;
95
+ this.#u(a);
96
+ }}>${e}</calcite-combobox>`;
97
+ }
98
+ #g() {
99
+ const { _messages: e } = this;
100
+ if (this.error === e.errors.noTraceConfigurations)
101
+ return this.#r(e.errors.noTraceConfigurations);
102
+ const t = this.error ? this.#r(this.error) : null, i = this.traceConfigurations.length > 1 ? this.#b() : this.#h(), a = this._messages.labels.traceConfiguration, o = this.heading ?? a;
103
+ return r`<calcite-block .heading=${o} .label=${a} expanded>${i}${t}</calcite-block>`;
104
+ }
105
+ #f() {
106
+ if (this.hideSubnetworkInfo)
107
+ return null;
108
+ const { _messages: e, selectedNamedTraceConfiguration: t } = this;
109
+ if (!t?.traceConfiguration)
110
+ return this.traceConfiguration = void 0, this.#t(this._messages.errors.noTraceConfiguration), null;
111
+ this.#i();
112
+ const { domainNetworkName: i, tierName: a, targetTierName: o } = t.traceConfiguration;
113
+ return !i && !a && !o ? (c("warn", this, "`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."), null) : r`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><div class="subnetwork-details">${i ? this.#a(e.headings.domainNetwork, i) : null}${a ? this.#a(e.headings.tier, a) : null}${o ? this.#a(e.headings.targetTier, o) : null}</div></calcite-block>`;
114
+ }
115
+ #k() {
116
+ const { _messages: e } = this, t = e.labels.subnetworkName;
117
+ return this.isSubnetworkNameTraceSelected ? this._subnetworkNamesState === "loading" ? r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>` : this._compatibleSubnetworkNames.length ? r`<calcite-block .heading=${t} .label=${t} expanded>${this._compatibleSubnetworkNames.length > C ? this.#w() : this.#C()}</calcite-block>` : this.#r(e.errors.noCompatibleSubnetworks) : null;
118
+ }
119
+ #w() {
120
+ const { _messages: e } = this;
121
+ return r`<calcite-input clearable type=text .placeholder=${e.instructions.enterSubnetworkName} max-length=64 .status=${this.#e ? "valid" : "invalid"} .value=${this.#e} @calciteInputInput=${(t) => this.#e = t.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${e.labels.tooManySubnetworks}</calcite-input-message>`;
122
+ }
123
+ #C() {
124
+ return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: e }) => {
125
+ const t = e.selectedItems[0]?.value;
126
+ this.#e = t;
127
+ }}>${this._compatibleSubnetworkNames.map((e) => r`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e === this.#e}></calcite-combobox-item>`)}</calcite-combobox>`;
128
+ }
129
+ render() {
130
+ const { selectedNamedTraceConfiguration: e } = this, i = e?.traceType && p.has(e.traceType) ? r`${this.#f()}${this.#k()}` : null;
131
+ return r`${this.#g()}${i}`;
132
+ }
133
+ }
134
+ u("arcgis-utility-network-trace-configuration-picker", N);
135
+ export {
136
+ N as ArcgisUtilityNetworkTraceConfigurationPicker
137
+ };
@@ -0,0 +1,9 @@
1
+ import "@esri/calcite-components/components/calcite-notice";
2
+ import "@esri/calcite-components/components/calcite-label";
3
+ import "@esri/calcite-components/components/calcite-combobox-item";
4
+ import "@esri/calcite-components/components/calcite-combobox";
5
+ import "@esri/calcite-components/components/calcite-block";
6
+ import "@esri/calcite-components/components/calcite-loader";
7
+ import "@esri/calcite-components/components/calcite-input";
8
+ import "@esri/calcite-components/components/calcite-input-message";
9
+ export * from "./customElement.js";