@arcgis/map-components 6.0.0-next.28 → 6.0.0-next.29

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 (52) hide show
  1. package/dist/cdn/A6DDWCVW.js +2 -0
  2. package/dist/cdn/{FUNBSU6V.js → AKIHNM7C.js} +1 -1
  3. package/dist/cdn/APCXGAD5.js +2 -0
  4. package/dist/cdn/{QVD4YHTQ.js → CGGVQCCL.js} +1 -1
  5. package/dist/cdn/FAPDKS2C.js +2 -0
  6. package/dist/cdn/J6ZEZ4NE.js +2 -0
  7. package/dist/cdn/NXLWTRS6.js +3 -0
  8. package/dist/cdn/{HSBDELT3.js → PJIES74D.js} +1 -1
  9. package/dist/cdn/{T4Z2B3T7.js → PSPUWCU5.js} +1 -1
  10. package/dist/cdn/{PYCFYJ6M.js → Q2KWXSLQ.js} +1 -1
  11. package/dist/cdn/UZXVNOOD.js +2 -0
  12. package/dist/cdn/index.js +1 -1
  13. package/dist/cdn/main.css +1 -1
  14. package/dist/components/arcgis-daylight/customElement.d.ts +30 -23
  15. package/dist/components/arcgis-feature-media/customElement.js +63 -60
  16. package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +1 -1
  17. package/dist/components/arcgis-popup/customElement.js +144 -138
  18. package/dist/components/arcgis-presentation/customElement.js +74 -75
  19. package/dist/components/arcgis-shadow-cast/customElement.d.ts +17 -10
  20. package/dist/components/arcgis-time-bar/customElement.js +1 -1
  21. package/dist/components/arcgis-utility-network-picker/customElement.d.ts +2 -2
  22. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +7 -4
  23. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +46 -38
  24. package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +19 -3
  25. package/dist/components/arcgis-utility-network-trace-locations/customElement.d.ts +22 -15
  26. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +70 -62
  27. package/dist/components/arcgis-video/customElement.d.ts +10 -0
  28. package/dist/components/arcgis-video/customElement.js +7 -4
  29. package/dist/components/arcgis-video-player/customElement.d.ts +17 -0
  30. package/dist/components/arcgis-video-player/customElement.js +57 -49
  31. package/dist/docs/api.json +1 -1
  32. package/dist/docs/docs.json +1 -1
  33. package/dist/docs/vscode.html-custom-data.json +1 -1
  34. package/dist/docs/web-types.json +1 -1
  35. package/dist/index.d.ts +0 -4
  36. package/dist/loader.js +5 -5
  37. package/dist/types/lumina.d.ts +1 -6
  38. package/dist/types/preact.d.ts +1 -7
  39. package/dist/types/react.d.ts +1 -8
  40. package/dist/types/stencil.d.ts +1 -6
  41. package/package.json +6 -6
  42. package/dist/cdn/3Y6GBQLR.js +0 -3
  43. package/dist/cdn/4CBB6BPG.js +0 -2
  44. package/dist/cdn/J4K4UZ37.js +0 -2
  45. package/dist/cdn/Q6A6EI6P.js +0 -2
  46. package/dist/cdn/R6X3R7P2.js +0 -2
  47. package/dist/cdn/ZJPYW3TN.js +0 -2
  48. package/dist/components/arcgis-feature-form-field/customElement.d.ts +0 -189
  49. package/dist/components/arcgis-feature-form-field/index.d.ts +0 -1
  50. package/dist/components/arcgis-feature-form-field/types.d.ts +0 -7
  51. package/dist/components/arcgis-feature-form-field-number/customElement.d.ts +0 -4
  52. package/dist/components/arcgis-feature-form-field-number/index.d.ts +0 -1
@@ -1,21 +1,21 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as v } from "../../chunks/runtime.js";
3
- import { ref as c } from "lit/directives/ref.js";
4
- import h from "@arcgis/core/Color.js";
5
- import R from "@arcgis/core/core/Collection.js";
2
+ import { c as R } from "../../chunks/runtime.js";
3
+ import { ref as h } from "lit/directives/ref.js";
4
+ import n from "@arcgis/core/Color.js";
5
+ import v from "@arcgis/core/core/Collection.js";
6
6
  import w from "@arcgis/core/core/Error.js";
7
7
  import { when as T } from "@arcgis/core/core/reactiveUtils.js";
8
8
  import $ from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
9
9
  import { LitElement as C, createEvent as r } from "@arcgis/lumina";
10
- import { usePropertyChange as E, bypassReadOnly as g } from "@arcgis/lumina/controllers";
11
- import { slotChangeGetAssignedElements as d } from "@arcgis/toolkit/dom/slots";
10
+ import { usePropertyChange as G, bypassReadOnly as g } from "@arcgis/lumina/controllers";
11
+ import { slotChangeGetAssignedElements as p } from "@arcgis/toolkit/dom/slots";
12
12
  import { log as u } from "@arcgis/toolkit/log";
13
- import { css as G, html as a } from "lit";
13
+ import { css as E, html as a } from "lit";
14
14
  import { u as S } from "../../chunks/useT9n.js";
15
15
  import { m as k } from "../../chunks/useViewModel.js";
16
- import { l as p } from "../../chunks/async-utils.js";
17
- import { a as m } from "../../chunks/types.js";
18
- const P = G`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-space-lg);--arcgis-internal-panel-actions-gap: var(--calcite-space-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;--calcite-panel-background-color: var(--calcite-color-surface-1);min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-surface-2)}calcite-notice{margin:var(--calcite-space-md)}arcgis-utility-network-trace-results,slot[name=results]::slotted(arcgis-utility-network-trace-results){--arcgis-internal-trace-results-height: 100%;height:100%}slot[name=results]::slotted(:not(arcgis-utility-network-trace-results)){display:none}slot[name=results]::slotted([arcgis-hidden-results-slot-item]){display:none}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-space-md) var(--calcite-space-md) 0}}`, x = k($), f = "arcgis-utility-network-trace-results", y = "arcgis-hidden-results-slot-item", _ = [
16
+ import { l as m } from "../../chunks/async-utils.js";
17
+ import { a as d } from "../../chunks/types.js";
18
+ const P = E`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-space-lg);--arcgis-internal-panel-actions-gap: var(--calcite-space-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;--calcite-panel-background-color: var(--calcite-color-surface-1);min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-surface-2)}calcite-notice{margin:var(--calcite-space-md)}arcgis-utility-network-trace-results,slot[name=results]::slotted(arcgis-utility-network-trace-results){--arcgis-internal-trace-results-height: 100%;height:100%}slot[name=results]::slotted(:not(arcgis-utility-network-trace-results)){display:none}slot[name=results]::slotted([arcgis-hidden-results-slot-item]){display:none}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-space-md) var(--calcite-space-md) 0}}`, x = k($), y = "arcgis-utility-network-trace-results", f = "arcgis-hidden-results-slot-item", A = [
19
19
  "actions",
20
20
  "autoDestroyDisabled",
21
21
  "aggregatedGeometryResultsGraphicsColor",
@@ -32,7 +32,7 @@ const P = G`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 3
32
32
  "traceResult",
33
33
  "view"
34
34
  ];
35
- class A extends C {
35
+ class _ extends C {
36
36
  constructor() {
37
37
  super(...arguments), this._messages = S({ blocking: !0 }), this.#s = x(this), this.#r = (e) => {
38
38
  const { detail: t, target: s } = e;
@@ -43,11 +43,13 @@ class A extends C {
43
43
  e.stopPropagation(), this.arcgisTraceResultFeaturesReady.emit(), this.arcgisTraceResultReady.emit();
44
44
  }, this.#a = (e) => {
45
45
  e.stopPropagation(), this.arcgisTriggerAction.emit(e.detail);
46
- }, this._activeTab = "input", this._showMissingTerminalWarning = !1, this._showNoStartingPointsWarning = !1, this._slottedElements = [], this._mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryResultsGraphicsColor = new h(m), this.aggregatedGeometryResultsSize = 12, this.disableHighlightFeatureResults = !1, this.flowItems = new R(), this.hideActionBar = !1, this.hideClearResultsCount = !1, this.hideGraphics = !1, this.hidePlaceholder = !1, this.hideFeatureResults = !1, this.includeDefaultActionsDisabled = !1, this.state = this.#s.state, this.view = this.#s.view, this.arcgisError = r(), this.arcgisHideGraphicsChange = r(), this.arcgisPropertyChange = E()("aggregatedGeometryResultsGraphicsColor", "hideGraphics", "state", "traceError", "traceResult"), this.arcgisReady = r(), this.arcgisTraceLocationSelectEnd = r(), this.arcgisTraceLocationSelectStart = r(), this.arcgisTraceResultClear = r(), this.arcgisTraceResultFeaturesReady = r(), this.arcgisTraceResultReady = r(), this.arcgisTriggerAction = r();
46
+ }, this._activeTab = "input", this._showMissingTerminalWarning = !1, this._showNoStartingPointsWarning = !1, this._slottedElements = [], this._mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryResultsGraphicsColor = new n(d), this.aggregatedGeometryResultsSize = 12, this.disableHighlightFeatureResults = !1, this.flowItems = new v(), this.hideActionBar = !1, this.hideClearResultsCount = !1, this.hideGraphics = !1, this.hidePlaceholder = !1, this.hideFeatureResults = !1, this.includeDefaultActionsDisabled = !1, this.state = this.#s.state, this.view = this.#s.view, this.arcgisError = r(), this.arcgisHideGraphicsChange = r(), this.arcgisPropertyChange = G()("aggregatedGeometryGraphicsColor", "aggregatedGeometryResultsGraphicsColor", "hideGraphics", "state", "traceError", "traceResult"), this.arcgisReady = r(), this.arcgisTraceLocationSelectEnd = r(), this.arcgisTraceLocationSelectStart = r(), this.arcgisTraceResultClear = r(), this.arcgisTraceResultFeaturesReady = r(), this.arcgisTraceResultReady = r(), this.arcgisTriggerAction = r();
47
47
  }
48
48
  static {
49
49
  this.properties = { _activeTab: 16, _showMissingTerminalWarning: 16, _showNoStartingPointsWarning: 16, _slottedElements: 16, _mode: 16, actions: 0, autoDestroyDisabled: 5, beforeMapInteraction: 0, aggregatedGeometryResultsGraphicsColor: [1, { converter: {
50
- fromAttribute: (e) => h.fromString(e) ?? new h(m)
50
+ fromAttribute: (e) => n.fromString(e) ?? new n(d)
51
+ } }], aggregatedGeometryGraphicsColor: [1, { converter: {
52
+ fromAttribute: (e) => n.fromString(e) ?? new n(d)
51
53
  } }], aggregatedGeometryResultsSize: 9, disableHighlightFeatureResults: 5, flowItems: 32, hideActionBar: 5, hideClearResultsCount: 5, hideGraphics: 5, hidePlaceholder: 5, hideFeatureResults: 5, includeDefaultActionsDisabled: 5, label: 3, messageOverrides: 0, traceResultFeatures: 32, traceResult: 0, traceError: 32, referenceElement: 1, state: 32, view: 0 };
52
54
  }
53
55
  static {
@@ -61,12 +63,18 @@ class A extends C {
61
63
  #h;
62
64
  #s;
63
65
  get #p() {
64
- return Array.from(this.el.children).some((e) => e.slot === "results" && e.matches(f));
66
+ return Array.from(this.el.children).some((e) => e.slot === "results" && e.matches(y));
65
67
  }
66
68
  #r;
67
69
  #n;
68
70
  #o;
69
71
  #a;
72
+ get aggregatedGeometryGraphicsColor() {
73
+ return this.aggregatedGeometryResultsGraphicsColor;
74
+ }
75
+ set aggregatedGeometryGraphicsColor(e) {
76
+ this.aggregatedGeometryResultsGraphicsColor = e;
77
+ }
70
78
  get traceResultFeatures() {
71
79
  return this.#e?.traceResultFeatures ?? [];
72
80
  }
@@ -77,7 +85,7 @@ class A extends C {
77
85
  this.#t?.destroy()
78
86
  ]);
79
87
  for (const t of e)
80
- t.status === "rejected" && p(t.reason, this, "Error while destroying trace analysis component");
88
+ t.status === "rejected" && m(t.reason, this, "Error while destroying trace analysis component");
81
89
  this.#t = void 0, this.#e = void 0, await this.manager.destroy();
82
90
  }
83
91
  load() {
@@ -86,7 +94,7 @@ class A extends C {
86
94
  ]);
87
95
  }
88
96
  willUpdate(e) {
89
- _.some((t) => e.has(t)) && this.#l(this.#e);
97
+ A.some((t) => e.has(t)) && this.#l(this.#e);
90
98
  }
91
99
  #g() {
92
100
  this.traceResult = void 0, g(() => this.traceError = void 0), this.#e?.clearResults(), this.#h?.flowItems.removeAll();
@@ -94,8 +102,8 @@ class A extends C {
94
102
  #m() {
95
103
  if (!this.#t)
96
104
  return;
97
- const { traceLocations: e, traceLocationDetails: t, traceConfiguration: s, isSubnetworkNameTraceSelected: i } = this.#t, n = !!s?.subnetworkName, l = e?.some((o) => o.type === "starting-point"), b = t?.some((o) => !!o.flagProperties.terminalConfiguration && !o.flagProperties.selectedTerminals?.size) ?? !1;
98
- this._showNoStartingPointsWarning = !i && !l || i && !n, this._showMissingTerminalWarning = b;
105
+ const { traceLocations: e, traceLocationDetails: t, traceConfiguration: s, isSubnetworkNameTraceSelected: i } = this.#t, o = !!s?.subnetworkName, c = e?.some((l) => l.type === "starting-point"), b = t?.some((l) => !!l.flagProperties.terminalConfiguration && !l.flagProperties.selectedTerminals?.size) ?? !1;
106
+ this._showNoStartingPointsWarning = !i && !c || i && !o, this._showMissingTerminalWarning = b;
99
107
  }
100
108
  #i(e) {
101
109
  this._activeTab = e;
@@ -125,13 +133,13 @@ class A extends C {
125
133
  };
126
134
  Object.assign(e, t);
127
135
  }
128
- #f(e) {
136
+ #y(e) {
129
137
  e && (e.addEventListener("arcgisPropertyChange", this.#r), e.addEventListener("arcgisResultsReady", this.#o), e.addEventListener("arcgisTraceResultClear", this.#n), e.addEventListener("arcgisTriggerAction", this.#a));
130
138
  }
131
139
  #u(e) {
132
140
  e && (e.removeEventListener("arcgisPropertyChange", this.#r), e.removeEventListener("arcgisResultsReady", this.#o), e.removeEventListener("arcgisTraceResultClear", this.#n), e.removeEventListener("arcgisTriggerAction", this.#a));
133
141
  }
134
- #y(e) {
142
+ #f(e) {
135
143
  const { _messages: t } = this;
136
144
  switch (e) {
137
145
  case "no-user-type-extension":
@@ -164,29 +172,29 @@ class A extends C {
164
172
  outSpatialReference: this.view?.spatialReference
165
173
  });
166
174
  } catch (i) {
167
- p(i, this, "Error while running trace"), g(() => this.traceError = i), this.traceResult = void 0, this.arcgisError.emit();
175
+ m(i, this, "Error while running trace"), g(() => this.traceError = i), this.traceResult = void 0, this.arcgisError.emit();
168
176
  }
169
177
  }
170
- #v() {
178
+ #R() {
171
179
  this.#m(), !(this._showNoStartingPointsWarning || this._showMissingTerminalWarning) && (this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1, this.#g(), this.#i("results"), this.#b());
172
180
  }
173
- #R(e) {
181
+ #v(e) {
174
182
  e && (this.#t = e);
175
183
  }
176
184
  #d(e) {
177
- !e || e === this.#e || (this.#u(this.#e), this.#e = e, this.#f(e));
185
+ !e || e === this.#e || (this.#u(this.#e), this.#e = e, this.#y(e));
178
186
  }
179
187
  #w(e) {
180
188
  this.#h = e;
181
189
  }
182
190
  #T(e) {
183
- this._slottedElements = d(e);
184
- const t = d(e, f);
191
+ this._slottedElements = p(e);
192
+ const t = p(e, y);
185
193
  if ((!t.length || t.length < this._slottedElements.length) && u("warn", this, "The trace results pane only renders instances of `arcgis-utility-network-trace-results` in the `results` slot."), t.length > 1 && u("warn", this, "Multiple `arcgis-utility-network-trace-results` elements were provided in the `results` slot. Only the first will render."), !t.length)
186
194
  return;
187
195
  const [s] = t;
188
196
  for (const i of t)
189
- i === s ? i.removeAttribute(y) : i.setAttribute(y, "");
197
+ i === s ? i.removeAttribute(f) : i.setAttribute(f, "");
190
198
  this.#d(s), this.#l(s);
191
199
  }
192
200
  #$(e) {
@@ -195,11 +203,11 @@ class A extends C {
195
203
  #C(e) {
196
204
  e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit();
197
205
  }
198
- #E(e) {
206
+ #G(e) {
199
207
  const { detail: t, target: s } = e;
200
208
  e.stopPropagation(), t.name === "selectedUtilityNetwork" && (this.#s.utilityNetwork = s.selectedUtilityNetwork, this.#l(this.#e)), t.name === "selectedNamedTraceConfiguration" && (this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1), t.name === "mode" && (this._mode = s.mode);
201
209
  }
202
- #G() {
210
+ #E() {
203
211
  const { _messages: e } = this;
204
212
  return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${() => this._showMissingTerminalWarning = !1}><div slot=title>${e.errors.missingTerminalTitle}</div><div slot=message>${e.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`;
205
213
  }
@@ -208,31 +216,31 @@ class A extends C {
208
216
  return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${() => this._showNoStartingPointsWarning = !1}><div slot=title>${e.errors.noStartingPointsTitle}</div><div slot=message>${e.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`;
209
217
  }
210
218
  #k() {
211
- return a`<calcite-tab .selected=${this._activeTab === "results"}>${this.state === "executing" && a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>` || ""}<arcgis-utility-network-trace-results-pane hide-warnings .hidden=${this.state === "executing"} ${c(this.#w)}><slot name=results @slotchange=${this.#T}></slot>${this.#p ? null : a`<arcgis-utility-network-trace-results .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryResultsGraphicsColor=${this.aggregatedGeometryResultsGraphicsColor} .aggregatedGeometryResultsSize=${this.aggregatedGeometryResultsSize} .disableHighlightFeatureResults=${this.disableHighlightFeatureResults} expanded .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .hideGraphics=${this.hideGraphics} .hidePlaceholder=${this.hidePlaceholder} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .layers=${this.#c} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceError=${this.traceError} .traceResult=${this.traceResult} .utilityNetwork=${this.#s.utilityNetwork ?? void 0} .view=${this.view ?? void 0} ${c(this.#d)}></arcgis-utility-network-trace-results>`}</arcgis-utility-network-trace-results-pane></calcite-tab>`;
219
+ return a`<calcite-tab .selected=${this._activeTab === "results"}>${this.state === "executing" && a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>` || ""}<arcgis-utility-network-trace-results-pane hide-warnings .hidden=${this.state === "executing"} ${h(this.#w)}><slot name=results @slotchange=${this.#T}></slot>${this.#p ? null : a`<arcgis-utility-network-trace-results .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryResultsGraphicsColor=${this.aggregatedGeometryResultsGraphicsColor} .aggregatedGeometryResultsSize=${this.aggregatedGeometryResultsSize} .disableHighlightFeatureResults=${this.disableHighlightFeatureResults} expanded .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .hideGraphics=${this.hideGraphics} .hidePlaceholder=${this.hidePlaceholder} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .layers=${this.#c} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceError=${this.traceError} .traceResult=${this.traceResult} .utilityNetwork=${this.#s.utilityNetwork ?? void 0} .view=${this.view ?? void 0} ${h(this.#d)}></arcgis-utility-network-trace-results>`}</arcgis-utility-network-trace-results-pane></calcite-tab>`;
212
220
  }
213
221
  #P() {
214
- const { _messages: e, traceResult: t } = this, i = !!(t?.elements.length || t?.globalFunctionResults.length || t?.aggregatedGeometry) && this.#e?.state === "ready", n = this.#e?.numFeatureResults ?? 0, l = n > 0 && !this.hideFeatureResults && !this.hideClearResultsCount && this.state !== "executing";
222
+ const { _messages: e, traceResult: t } = this, i = !!(t?.elements.length || t?.globalFunctionResults.length || t?.aggregatedGeometry) && this.#e?.state === "ready", o = this.#e?.numFeatureResults ?? 0, c = o > 0 && !this.hideFeatureResults && !this.hideClearResultsCount && this.state !== "executing";
215
223
  return a`<calcite-button appearance=outline width=full @click=${() => {
216
224
  this.#i("input"), this.#g();
217
- }} .disabled=${!i} slot=footer>${l ? e.buttons.clearResultsCustom.replace("{number}", n.toString()) : e.buttons.clearResultsGeneric}</calcite-button>`;
225
+ }} .disabled=${!i} slot=footer>${c ? e.buttons.clearResultsCustom.replace("{number}", o.toString()) : e.buttons.clearResultsGeneric}</calcite-button>`;
218
226
  }
219
227
  #x() {
220
- const { _mode: e } = this, { loadError: t } = this.#s, i = (t === "no-user-type-extension" || t === "sceneView-not-supported" ? a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#y(t)}</div></calcite-notice>` : void 0) ?? a`${this._showNoStartingPointsWarning && e === "default" && this.#S() || ""}${this._showMissingTerminalWarning && e === "default" && this.#G() || ""}<arcgis-utility-network-trace-inputs .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .view=${this.view ?? void 0} .beforeMapInteraction=${this.beforeMapInteraction} @arcgisPropertyChange=${this.#E} @arcgisTraceLocationSelectEnd=${this.#C} @arcgisTraceLocationSelectStart=${this.#$} @arcgisTriggerAction=${this.#a} ${c(this.#R)}></arcgis-utility-network-trace-inputs>`;
228
+ const { _mode: e } = this, { loadError: t } = this.#s, i = (t === "no-user-type-extension" || t === "sceneView-not-supported" ? a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#f(t)}</div></calcite-notice>` : void 0) ?? a`${this._showNoStartingPointsWarning && e === "default" && this.#S() || ""}${this._showMissingTerminalWarning && e === "default" && this.#E() || ""}<arcgis-utility-network-trace-inputs .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .view=${this.view ?? void 0} .beforeMapInteraction=${this.beforeMapInteraction} @arcgisPropertyChange=${this.#G} @arcgisTraceLocationSelectEnd=${this.#C} @arcgisTraceLocationSelectStart=${this.#$} @arcgisTriggerAction=${this.#a} ${h(this.#v)}></arcgis-utility-network-trace-inputs>`;
221
229
  return a`<calcite-tab .selected=${this._activeTab === "input"}><div class="inputs-tab-container">${i}</div></calcite-tab>`;
222
230
  }
223
- #_() {
231
+ #A() {
224
232
  const { state: e } = this;
225
233
  if (this._mode !== "default")
226
234
  return null;
227
235
  const t = e === "disabled" || e === "loading" || !this.#t?.traceConfiguration;
228
- return a`<calcite-button appearance=solid width=full @click=${this.#v} slot=footer .disabled=${t}>${this._messages.buttons.getResults}</calcite-button>`;
236
+ return a`<calcite-button appearance=solid width=full @click=${this.#R} slot=footer .disabled=${t}>${this._messages.buttons.getResults}</calcite-button>`;
229
237
  }
230
238
  render() {
231
239
  const { _activeTab: e, state: t } = this;
232
- return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @calciteTabsActivate=${() => this.#i("input")} .selected=${e === "input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @calciteTabsActivate=${() => this.#i("results")} .selected=${e === "results"} .disabled=${t === "disabled" || t === "loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#x()}${this.#k()}</calcite-tabs>${e === "input" ? this.#_() : null}${e === "results" ? this.#P() : null}</calcite-panel>`;
240
+ return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @calciteTabsActivate=${() => this.#i("input")} .selected=${e === "input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @calciteTabsActivate=${() => this.#i("results")} .selected=${e === "results"} .disabled=${t === "disabled" || t === "loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#x()}${this.#k()}</calcite-tabs>${e === "input" ? this.#A() : null}${e === "results" ? this.#P() : null}</calcite-panel>`;
233
241
  }
234
242
  }
235
- v("arcgis-utility-network-trace-analysis", A);
243
+ R("arcgis-utility-network-trace-analysis", _);
236
244
  export {
237
- A as ArcgisUtilityNetworkTraceAnalysis
245
+ _ as ArcgisUtilityNetworkTraceAnalysis
238
246
  };
@@ -14,7 +14,8 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
14
14
  * [UtilityNetwork](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/)
15
15
  * and provide its named trace configurations through
16
16
  * [traceConfigurations](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-configuration-picker/#traceConfigurations).
17
- * The component displays a title for a single configuration or a picker for multiple configurations.
17
+ * The component displays a title for a single configuration or a
18
+ * [combobox](https://developers.arcgis.com/calcite-design-system/components/combobox/) for multiple configurations.
18
19
  * Changing the list resets the selection to the first configuration backed by a
19
20
  * [UNTraceConfiguration](https://developers.arcgis.com/javascript/latest/references/core/networks/support/UNTraceConfiguration/).
20
21
  *
@@ -94,7 +95,7 @@ export abstract class ArcgisUtilityNetworkTraceConfigurationPicker extends LitEl
94
95
  accessor error: string | undefined;
95
96
  /**
96
97
  * The heading above the
97
- * [traceConfigurations](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-configuration-picker/#traceConfigurations) selector.
98
+ * [traceConfigurations](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-configuration-picker/#traceConfigurations) combobox or title.
98
99
  * When not set, the component uses the localized trace configuration label.
99
100
  */
100
101
  accessor heading: string | undefined;
@@ -110,7 +111,7 @@ export abstract class ArcgisUtilityNetworkTraceConfigurationPicker extends LitEl
110
111
  /**
111
112
  * Indicates whether to hide the domain network, tier, and target tier names from
112
113
  * [selectedNamedTraceConfiguration](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-configuration-picker/#selectedNamedTraceConfiguration).
113
- * This does not hide the subnetwork name selector.
114
+ * This does not hide the subnetwork selection control.
114
115
  *
115
116
  * @default false
116
117
  */
@@ -186,11 +187,26 @@ export abstract class ArcgisUtilityNetworkTraceConfigurationPicker extends LitEl
186
187
  /**
187
188
  * The named trace configurations available for selection. Each configuration must contain a
188
189
  * [UNTraceConfiguration](https://developers.arcgis.com/javascript/latest/references/core/networks/support/UNTraceConfiguration/).
190
+ * Your application must set this property explicitly; the component does not derive the configurations
191
+ * from the utility network or map. For example, assign the loaded utility network's
192
+ * [sharedNamedTraceConfigurations](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/#sharedNamedTraceConfigurations).
193
+ *
189
194
  * Changing this array resets
190
195
  * [selectedNamedTraceConfiguration](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-configuration-picker/#selectedNamedTraceConfiguration)
191
196
  * to the first entry backed by a `UNTraceConfiguration`. An empty array displays an error.
192
197
  *
193
198
  * @required
199
+ * @example
200
+ * Provide configurations with a specific tag from an existing utility network.
201
+ * ```js
202
+ * const picker = document.querySelector("arcgis-utility-network-trace-configuration-picker");
203
+ * await Promise.all([picker.componentOnReady(), utilityNetwork.load()]);
204
+ *
205
+ * picker.utilityNetwork = utilityNetwork;
206
+ * picker.traceConfigurations = utilityNetwork.sharedNamedTraceConfigurations.filter(
207
+ * (configuration) => configuration.tags.includes("your-tag-name"),
208
+ * );
209
+ * ```
194
210
  */
195
211
  accessor traceConfigurations: NamedTraceConfiguration[];
196
212
  /**
@@ -11,6 +11,28 @@ import type SketchViewModel from "@arcgis/core/widgets/Sketch/SketchViewModel.js
11
11
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
12
12
  import type { T9nMeta } from "@arcgis/lumina/controllers";
13
13
 
14
+ /**
15
+ * A trace location with its display, terminal, and spatial information
16
+ * maintained by [arcgis-utility-network-trace-locations](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-locations/).
17
+ */
18
+ export interface TraceLocationDetails {
19
+ /** The trace location used for trace execution. */
20
+ traceLocation: TraceLocation;
21
+ /** Display settings and terminal selections for the location. */
22
+ flagProperties: {
23
+ title: string;
24
+ expanded?: boolean;
25
+ terminalConfiguration?: TerminalConfiguration;
26
+ selectedTerminals?: Set<number>;
27
+ };
28
+ /** The selected map position, feature, and marker graphic. */
29
+ spatialProperties: {
30
+ mapPoint?: Point;
31
+ mapGraphic?: Graphic;
32
+ flagGraphic?: Graphic;
33
+ };
34
+ }
35
+
14
36
  /**
15
37
  * The Utility Network Trace Locations component selects and manages trace locations.
16
38
  * Users can add locations from the map, remove individual locations, clear the list, select
@@ -342,21 +364,6 @@ export abstract class ArcgisUtilityNetworkTraceLocations extends LitElement {
342
364
  };
343
365
  }
344
366
 
345
- export interface TraceLocationDetails {
346
- traceLocation: TraceLocation;
347
- flagProperties: {
348
- title: string;
349
- expanded?: boolean;
350
- terminalConfiguration?: TerminalConfiguration;
351
- selectedTerminals?: Set<number>;
352
- };
353
- spatialProperties: {
354
- mapPoint?: Point;
355
- mapGraphic?: Graphic;
356
- flagGraphic?: Graphic;
357
- };
358
- }
359
-
360
367
  export type TraceLocationType = "barrier" | "starting-point" | "stopping-point";
361
368
 
362
369
  export interface SelectStartPayload {
@@ -11,17 +11,17 @@ import R from "@arcgis/core/layers/GraphicsLayer.js";
11
11
  import T from "@arcgis/core/rest/networks/support/TraceLocation.js";
12
12
  import k from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
13
13
  import B from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
14
- import { LitElement as N, createEvent as x } from "@arcgis/lumina";
14
+ import { LitElement as q, createEvent as x } from "@arcgis/lumina";
15
15
  import { log as p, composeMissingPropertyMessage as b } from "@arcgis/toolkit/log";
16
- import { u as q } from "../../chunks/useT9n.js";
17
- import { a as D, d as j, e as v, i as O } from "../../chunks/layer-utils.js";
18
- import { css as H, html as u } from "lit";
19
- import G from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
16
+ import { u as D } from "../../chunks/useT9n.js";
17
+ import { a as N, d as j, e as G, i as O } from "../../chunks/layer-utils.js";
18
+ import { css as H, html as d } from "lit";
19
+ import v from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
20
20
  import { substitute as U } from "@arcgis/core/intl.js";
21
21
  const W = H`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{display:flex;justify-content:center}calcite-list{margin:0 var(--calcite-space-sm) var(--calcite-space-sm);background-color:var(--calcite-color-surface-2);border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);overflow:hidden}calcite-list-item[selected] [slot=content-bottom]{display:block}.warning{color:var(--calcite-color-status-danger)}.terminals{padding:var(--calcite-space-sm) var(--calcite-space-md);display:flex;flex-direction:column}.filter-barrier{display:flex;justify-content:space-between;align-items:center;width:100%}`, $ = `utility-network-trace-locations-sketch-${Date.now()}`;
22
- class S extends N {
22
+ class S extends q {
23
23
  constructor() {
24
- super(...arguments), this._messages = q({ blocking: !0 }), this._isSelectWaiting = !1, this.traceLocationType = "starting-point", this.traceLocations = new w(), this.filterLayers = new w(), this.spatialTolerance = 0.05, this.autoDestroyDisabled = !1, this.arcgisTraceLocationSelectEnd = x(), this.arcgisTraceLocationSelectStart = x(), this.arcgisError = x();
24
+ super(...arguments), this._messages = D({ blocking: !0 }), this._isSelectWaiting = !1, this.traceLocationType = "starting-point", this.traceLocations = new w(), this.filterLayers = new w(), this.spatialTolerance = 0.05, this.autoDestroyDisabled = !1, this.arcgisTraceLocationSelectEnd = x(), this.arcgisTraceLocationSelectStart = x(), this.arcgisError = x();
25
25
  }
26
26
  static {
27
27
  this.properties = { _isSelectWaiting: 16, beforeMapInteraction: 0, afterMapInteraction: 0, messageOverrides: 0, view: 0, traceLocationType: 1, traceLocations: 0, filterLayers: 0, spatialTolerance: 9, error: 1, autoDestroyDisabled: 5, utilityNetwork: 0, heading: 1, sketchViewModel: 32 };
@@ -49,7 +49,7 @@ class S extends N {
49
49
  listMode: "hide",
50
50
  title: t
51
51
  });
52
- return D(e, i), i;
52
+ return N(e, i), i;
53
53
  }
54
54
  return r;
55
55
  }
@@ -89,11 +89,11 @@ class S extends N {
89
89
  const e = new w();
90
90
  this.filterLayers?.forEach((t) => {
91
91
  j(t) ? t.sublayers.forEach((r) => {
92
- e.add(new G({
92
+ e.add(new v({
93
93
  layer: r,
94
94
  enabled: !0
95
95
  }));
96
- }) : e.add(new G({
96
+ }) : e.add(new v({
97
97
  layer: t,
98
98
  enabled: !0
99
99
  }));
@@ -113,16 +113,16 @@ class S extends N {
113
113
  return p("warn", this, "Unable to project flag point to source geometry spatial reference."), -1;
114
114
  s = f;
115
115
  }
116
- const n = _(r, s);
117
- if (n.isEmpty)
116
+ const c = _(r, s);
117
+ if (c.isEmpty)
118
118
  return p("warn", this, "Unable to compute nearest coordinate for polyline flag."), -1;
119
- const o = n.coordinate, c = o.x - 0.5, l = o.y - 0.5, d = o.x + 0.5, m = o.y + 0.5, g = new A({
119
+ const o = c.coordinate, l = o.x - 0.5, n = o.y - 0.5, u = o.x + 0.5, m = o.y + 0.5, g = new A({
120
120
  hasZ: !1,
121
121
  hasM: !0,
122
122
  paths: [
123
123
  [
124
- [c, l],
125
- [d, m]
124
+ [l, n],
125
+ [u, m]
126
126
  ]
127
127
  ],
128
128
  spatialReference: r.spatialReference
@@ -174,19 +174,25 @@ class S extends N {
174
174
  this.#e("warn", this._messages.errors.noHitResult), this.#t(t, r);
175
175
  return;
176
176
  }
177
- const s = a.geometry, n = t.toScreen(s);
178
- if (!n) {
177
+ const s = a.geometry, c = t.toScreen(s);
178
+ if (!c) {
179
179
  this.#e("warn", this._messages.errors.noHitResult), this.#t(t, r);
180
180
  return;
181
181
  }
182
- const c = (await t.hitTest(n, {
182
+ const l = (await t.hitTest(c, {
183
183
  include: this.filterLayers
184
- })).results.filter((d) => d.type === "graphic" && d?.layer && d.graphic);
185
- if (!c.length) {
184
+ })).results.filter((n) => n.type === "graphic" && n?.layer && n.graphic);
185
+ if (!l.length) {
186
186
  this.#e("info", this._messages.errors.noHitResult), this.#t(t, r);
187
187
  return;
188
188
  }
189
- this.#i(), await this.#u(c, s, t) ? this.arcgisTraceLocationSelectEnd.emit() : this.#t(t, r);
189
+ this.#i();
190
+ try {
191
+ await this.#u(l, s, t) ? this.arcgisTraceLocationSelectEnd.emit() : this.#t(t, r);
192
+ } catch (n) {
193
+ const u = n instanceof Error ? n.message : String(n);
194
+ this.#e("error", u), this.arcgisTraceLocationSelectEnd.emit();
195
+ }
190
196
  }
191
197
  #i() {
192
198
  const { view: e, sketchViewModel: t } = this;
@@ -201,58 +207,60 @@ class S extends N {
201
207
  return this.#e("error", this._messages.errors.noHitResult), !1;
202
208
  let a = e[0].graphic;
203
209
  if (this.afterMapInteraction) {
204
- const n = e.map((o) => {
205
- const c = o, l = c.graphic;
206
- return l.origin = c.layer, l.sourceLayer = c.layer, l;
210
+ const c = e.map((o) => {
211
+ const l = o, n = l.graphic;
212
+ return n.origin = l.layer, n.sourceLayer = l.layer, n;
207
213
  });
208
214
  try {
209
- a = await this.afterMapInteraction(n);
215
+ a = await this.afterMapInteraction(c);
210
216
  } catch {
211
217
  a = null;
212
218
  }
213
219
  }
214
220
  if (!a)
215
- return p("error", this, "No graphic available from hit test results."), this.arcgisTraceLocationSelectEnd.emit(), !0;
221
+ return !0;
216
222
  const s = await this.#h(a);
217
- return s ? await this.#m(s, t, r) : (this.#e("error", this._messages.errors.missingAttributes), this.arcgisTraceLocationSelectEnd.emit(), !0);
223
+ if (!s)
224
+ throw new Error(this._messages.errors.missingAttributes);
225
+ return await this.#m(s, t, r);
218
226
  }
219
227
  async #h(e) {
220
- const t = (v(e.layer), e.layer), r = t.geometryType === null, i = t.fieldsIndex?.get("assetgroup") ?? !1, a = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", s = t.fieldsIndex?.get("assettype") ?? !1, n = t.fieldsIndex?.get("assettype")?.name ?? "assettype", o = e.getGlobalId(), c = e.getObjectId(), l = i ? !!e.getAttribute(a) : !0, d = s ? !!e.getAttribute(n) : !0, m = !!e.geometry;
221
- if (o && c && l && d && (m || r))
228
+ const t = (G(e.layer), e.layer), r = t.geometryType === null, i = t.fieldsIndex?.get("assetgroup") ?? !1, a = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", s = t.fieldsIndex?.get("assettype") ?? !1, c = t.fieldsIndex?.get("assettype")?.name ?? "assettype", o = e.getGlobalId(), l = e.getObjectId(), n = i ? !!e.getAttribute(a) : !0, u = s ? !!e.getAttribute(c) : !0, m = !!e.geometry;
229
+ if (o && l && n && u && (m || r))
222
230
  return e;
223
231
  const g = t.createQuery();
224
- return g.objectIds = [c], (await t.queryFeatures(g)).features[0] || null;
232
+ return g.objectIds = [l], (await t.queryFeatures(g)).features[0] || null;
225
233
  }
226
234
  async #m(e, t, r) {
227
- const { traceLocations: i } = this, a = e.getGlobalId() ?? "", s = e.geometry?.type, n = await this.#f(e, t);
228
- if (!n)
235
+ const { traceLocations: i } = this, a = e.getGlobalId() ?? "", s = e.geometry?.type, c = await this.#f(e, t);
236
+ if (!c)
229
237
  return this.#e("error", this._messages.errors.errorGeneratingTraceLocationDetails), !1;
230
- const o = i?.filter((l) => l.spatialProperties.mapGraphic?.getGlobalId() === a) ?? [];
238
+ const o = i?.filter((n) => n.spatialProperties.mapGraphic?.getGlobalId() === a) ?? [];
231
239
  if (o.length > 0) {
232
240
  if (s !== "polyline")
233
241
  return this.#e("warn", this._messages.errors.duplicateTraceLocationDetails), !1;
234
- if (o.some((l) => Math.abs(l.traceLocation.percentAlong - n.traceLocation.percentAlong) <= this.spatialTolerance))
242
+ if (o.some((n) => Math.abs(n.traceLocation.percentAlong - c.traceLocation.percentAlong) <= this.spatialTolerance))
235
243
  return this.#e("warn", this._messages.errors.duplicateTraceLocationDetailsWithinTolerance), !1;
236
244
  }
237
- const c = this.#y(e, t, r);
238
- return c ? (n.spatialProperties.flagGraphic = c, i?.add(n), !0) : (this.#e("warn", this._messages.errors.errorAdding), !1);
245
+ const l = this.#y(e, t, r);
246
+ return l ? (c.spatialProperties.flagGraphic = l, i?.add(c), !0) : (this.#e("warn", this._messages.errors.errorAdding), !1);
239
247
  }
240
248
  async #f(e, t) {
241
- const { traceLocationType: r, utilityNetwork: i } = this, a = e.getGlobalId() ?? "", s = e.geometry?.type, n = await this.#g(e);
249
+ const { traceLocationType: r, utilityNetwork: i } = this, a = e.getGlobalId() ?? "", s = e.geometry?.type, c = await this.#g(e);
242
250
  if (s === "point" || s === "polygon") {
243
- const o = i?.getTerminalConfiguration(e), c = o ? o.terminals[0].id : 1;
251
+ const o = i?.getTerminalConfiguration(e), l = o ? o.terminals[0].id : 1;
244
252
  return {
245
253
  traceLocation: new T({
246
254
  type: r,
247
255
  isFilterBarrier: !1,
248
256
  globalId: a,
249
- terminalId: c
257
+ terminalId: l
250
258
  }),
251
259
  flagProperties: {
252
- title: n,
260
+ title: c,
253
261
  expanded: !1,
254
262
  terminalConfiguration: o ?? void 0,
255
- selectedTerminals: o ? /* @__PURE__ */ new Set([c]) : void 0
263
+ selectedTerminals: o ? /* @__PURE__ */ new Set([l]) : void 0
256
264
  },
257
265
  spatialProperties: {
258
266
  mapPoint: t,
@@ -269,7 +277,7 @@ class S extends N {
269
277
  percentAlong: o
270
278
  }),
271
279
  flagProperties: {
272
- title: n,
280
+ title: c,
273
281
  expanded: !1,
274
282
  terminalConfiguration: void 0,
275
283
  selectedTerminals: void 0
@@ -280,20 +288,20 @@ class S extends N {
280
288
  }
281
289
  };
282
290
  } else if (!s) {
283
- const o = O(e.layer) ? e.layer.parent : e.layer, c = o && this.#c.includes(o.layerId), l = i?.getTerminalConfiguration(e), d = l ? l.terminals[0].id : c ? -1 : 1, m = c ? 0.5 : -1;
291
+ const o = O(e.layer) ? e.layer.parent : e.layer, l = o && this.#c.includes(o.layerId), n = i?.getTerminalConfiguration(e), u = n ? n.terminals[0].id : l ? -1 : 1, m = l ? 0.5 : -1;
284
292
  return {
285
293
  traceLocation: new T({
286
294
  type: r,
287
295
  isFilterBarrier: !1,
288
296
  globalId: a,
289
- terminalId: d,
297
+ terminalId: u,
290
298
  percentAlong: m
291
299
  }),
292
300
  flagProperties: {
293
- title: n,
301
+ title: c,
294
302
  expanded: !1,
295
- terminalConfiguration: l ?? void 0,
296
- selectedTerminals: l ? /* @__PURE__ */ new Set([d]) : void 0
303
+ terminalConfiguration: n ?? void 0,
304
+ selectedTerminals: n ? /* @__PURE__ */ new Set([u]) : void 0
297
305
  },
298
306
  spatialProperties: {
299
307
  mapPoint: t,
@@ -304,7 +312,7 @@ class S extends N {
304
312
  return null;
305
313
  }
306
314
  async #g(e) {
307
- const t = (v(e.layer), e.layer);
315
+ const t = (G(e.layer), e.layer);
308
316
  return ("getFeatureTitle" in t ? await t.getFeatureTitle(e) : null) || e.getObjectId()?.toString() || this._messages.unknown;
309
317
  }
310
318
  #y(e, t, r) {
@@ -350,25 +358,25 @@ class S extends N {
350
358
  }), t?.removeAll();
351
359
  }
352
360
  #L(e, t) {
353
- const { flagProperties: r } = e, { selectedTerminals: i } = r, { name: a, id: s } = t, n = i?.has(s) ?? !1;
354
- return u`<calcite-label layout=inline><calcite-checkbox .value=${s} .checked=${n} @calciteCheckboxChange=${(o) => {
361
+ const { flagProperties: r } = e, { selectedTerminals: i } = r, { name: a, id: s } = t, c = i?.has(s) ?? !1;
362
+ return d`<calcite-label layout=inline><calcite-checkbox .value=${s} .checked=${c} @calciteCheckboxChange=${(o) => {
355
363
  o.target.checked ? i?.add(s) : i?.delete(s), this.requestUpdate();
356
364
  }}></calcite-checkbox>${a}</calcite-label>`;
357
365
  }
358
366
  #T() {
359
- return u`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`;
367
+ return d`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`;
360
368
  }
361
369
  #k(e) {
362
370
  const { traceLocation: t } = e;
363
- return u`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${t.isFilterBarrier} @calciteSwitchChange=${(r) => {
371
+ return d`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${t.isFilterBarrier} @calciteSwitchChange=${(r) => {
364
372
  t.isFilterBarrier = r.target.checked;
365
373
  }}></calcite-switch></div></calcite-label>`;
366
374
  }
367
375
  #x(e) {
368
376
  const { flagProperties: t } = e, { terminalConfiguration: r, selectedTerminals: i } = t, a = e.traceLocation.type === "barrier", s = r && r.terminals.length > 0 && i?.size === 0;
369
- return u`<calcite-action .icon=${t.expanded ? "chevron-up" : "chevron-down"} slot=actions-end scale=s text @click=${() => {
377
+ return d`<calcite-action .icon=${t.expanded ? "chevron-up" : "chevron-down"} slot=actions-end scale=s text @click=${() => {
370
378
  t.expanded = !t.expanded, this.requestUpdate();
371
- }}></calcite-action>${s && u`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>` || ""}${t.expanded && u`<div class="terminals" slot=content-bottom>${a && this.#k(e) || ""}${r && this.#S(e) || ""}${s && this.#T() || ""}</div>` || ""}`;
379
+ }}></calcite-action>${s && d`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>` || ""}${t.expanded && d`<div class="terminals" slot=content-bottom>${a && this.#k(e) || ""}${r && this.#S(e) || ""}${s && this.#T() || ""}</div>` || ""}`;
372
380
  }
373
381
  #S(e) {
374
382
  const { flagProperties: t } = e, { terminalConfiguration: r } = t;
@@ -377,19 +385,19 @@ class S extends N {
377
385
  const i = r.terminals;
378
386
  return i.length ? i.length === 1 ? [] : i.map((s) => this.#L(e, s)) : (p("warn", this, "`terminalConfiguration.terminals` is required but either missing or empty.`"), []);
379
387
  }
380
- #v(e) {
381
- const { flagProperties: t } = e, { terminalConfiguration: r, expanded: i, title: a } = t, s = r && r.id !== 0, n = e.traceLocation.type === "barrier", o = s || n, c = r?.name ?? void 0;
382
- return u`<calcite-list-item .label=${a} .description=${c} .value=${a} .expanded=${i}>${o ? this.#x(e) : u`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${() => this.#a(e)}></calcite-action></calcite-list-item>`;
383
- }
384
388
  #G(e) {
389
+ const { flagProperties: t } = e, { terminalConfiguration: r, expanded: i, title: a } = t, s = r && r.id !== 0, c = e.traceLocation.type === "barrier", o = s || c, l = r?.name ?? void 0;
390
+ return d`<calcite-list-item .label=${a} .description=${l} .value=${a} .expanded=${i}>${o ? this.#x(e) : d`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${() => this.#a(e)}></calcite-action></calcite-list-item>`;
391
+ }
392
+ #v(e) {
385
393
  if (!e.length)
386
394
  return null;
387
- const { traceLocationType: t } = this, r = e.map((a) => this.#v(a)).toArray(), i = U(this._messages.labels.list, { type: t });
388
- return u`<div><calcite-list interaction-mode=static selection-mode=none .label=${i}>${r}</calcite-list></div>`;
395
+ const { traceLocationType: t } = this, r = e.map((a) => this.#G(a)).toArray(), i = U(this._messages.labels.list, { type: t });
396
+ return d`<div><calcite-list interaction-mode=static selection-mode=none .label=${i}>${r}</calcite-list></div>`;
389
397
  }
390
398
  #$() {
391
- const { traceLocationType: e, _messages: t, traceLocations: r, heading: i } = this, a = e === "starting-point" ? t.types.startingPoint : e === "barrier" ? t.types.barrier : t.types.stoppingPoint, s = i ?? a.heading, n = a.description, o = a.buttonText;
392
- return u`<calcite-block .heading=${s} .label=${s} expanded .description=${n}>${r?.length ? u`<calcite-button slot=actions-end appearance=transparent .label=${t.buttons.clear} @click=${() => this.#w()}>${t.buttons.clear}</calcite-button>${this.#G(r)}` : null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${o} @click=${() => this.#l()}>${o}</calcite-button></div></calcite-block>`;
399
+ const { traceLocationType: e, _messages: t, traceLocations: r, heading: i } = this, a = e === "starting-point" ? t.types.startingPoint : e === "barrier" ? t.types.barrier : t.types.stoppingPoint, s = i ?? a.heading, c = a.description, o = a.buttonText;
400
+ return d`<calcite-block .heading=${s} .label=${s} expanded .description=${c}>${r?.length ? d`<calcite-button slot=actions-end appearance=transparent .label=${t.buttons.clear} @click=${() => this.#w()}>${t.buttons.clear}</calcite-button>${this.#v(r)}` : null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${o} @click=${() => this.#l()}>${o}</calcite-button></div></calcite-block>`;
393
401
  }
394
402
  render() {
395
403
  return this.#$();