@arcgis/map-components 5.2.0-next.54 → 5.2.0-next.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as l } from "../../chunks/runtime.js";
3
- import { css as c, html as s } from "lit";
2
+ import { c } from "../../chunks/runtime.js";
3
+ import { css as l, html as s } from "lit";
4
4
  import { LitElement as u } from "@arcgis/lumina";
5
5
  import { u as d } from "../../chunks/useT9n.js";
6
6
  import { log as o, composeMissingPropertyMessage as n } from "@arcgis/toolkit/log";
7
- const m = c`.subnetwork-details{border-radius:var(--calcite-border-radius);border:solid 1px var(--calcite-color-border-3)}.key-value-pair{padding:var(--calcite-spacing-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)}`;
7
+ const m = l`.subnetwork-details{border-radius:var(--calcite-border-radius);border:solid 1px var(--calcite-color-border-3)}.key-value-pair{padding:var(--calcite-spacing-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)}`;
8
8
  class g extends u {
9
9
  constructor() {
10
10
  super(...arguments), this._messages = d({ blocking: !0 });
@@ -18,18 +18,18 @@ class g extends u {
18
18
  loaded() {
19
19
  this.namedTraceConfiguration || o("warn", this, n("namedTraceConfiguration"));
20
20
  }
21
+ #e(e, r) {
22
+ return s`<div class="key-value-pair"><div class="key-value-pair__key">${e}</div><div class="key-value-pair__value">${r}</div></div>`;
23
+ }
21
24
  render() {
22
25
  const { _messages: e, namedTraceConfiguration: r } = this;
23
26
  if (!r?.traceConfiguration)
24
27
  return o("error", this, n("namedTraceConfig.traceConfiguration")), null;
25
- const { domainNetworkName: a, tierName: i, targetTierName: t } = r.traceConfiguration;
26
- return !a && !i && !t ? (o("warn", this, "`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."), null) : s`<div class="subnetwork-details">${a ? this._renderKeyValuePair(e.headings.domainNetwork, a) : null}${i ? this._renderKeyValuePair(e.headings.tier, i) : null}${t ? this._renderKeyValuePair(e.headings.targetTier, t) : null}</div>`;
27
- }
28
- _renderKeyValuePair(e, r) {
29
- return s`<div class="key-value-pair"><div class="key-value-pair__key">${e}</div><div class="key-value-pair__value">${r}</div></div>`;
28
+ const { domainNetworkName: i, tierName: a, targetTierName: t } = r.traceConfiguration;
29
+ return !i && !a && !t ? (o("warn", this, "`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."), null) : s`<div class="subnetwork-details">${i ? this.#e(e.headings.domainNetwork, i) : null}${a ? this.#e(e.headings.tier, a) : null}${t ? this.#e(e.headings.targetTier, t) : null}</div>`;
30
30
  }
31
31
  }
32
- l("arcgis-utility-network-subnetwork-info", g);
32
+ c("arcgis-utility-network-subnetwork-info", g);
33
33
  export {
34
34
  g as ArcgisUtilityNetworkSubnetworkInfo
35
35
  };
@@ -15,13 +15,7 @@ import { l as _ } from "../../chunks/async-utils.js";
15
15
  const R = y`: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-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-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;min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`, C = $(b);
16
16
  class x extends w {
17
17
  constructor() {
18
- super(...arguments), this._messages = T({ blocking: !0 }), this.#t = C(this), this.#a = [], this.#s = () => {
19
- this.#g(), !(this._showNoStartingPointsWarning || this._showMissingTerminalWarning) && (this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1, this.#o(), this._switchTab("results"), this.#m());
20
- }, this.#r = (t) => {
21
- t && (this.#e = t);
22
- }, this.#n = (t) => {
23
- t && (this.#i = t);
24
- }, this._activeTab = "input", this._showMissingTerminalWarning = !1, this._showNoStartingPointsWarning = !1, this._mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryGraphicsColor = new d([255, 255, 0, 0.6]), this.disableHighlightFeatureResults = !1, this.hideActionBar = !1, this.hideFeatureResults = !1, this.state = this.#t.state, this.view = this.#t.view, this.arcgisHideGraphicsChange = o(), this.arcgisReady = o(), this.arcgisTraceLocationSelectEnd = o(), this.arcgisTraceLocationSelectStart = o(), this.arcgisTraceResultClear = o(), this.arcgisTraceResultFeaturesReady = o();
18
+ super(...arguments), this._messages = T({ blocking: !0 }), this.#t = C(this), this.#s = [], this._activeTab = "input", this._showMissingTerminalWarning = !1, this._showNoStartingPointsWarning = !1, this._mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryGraphicsColor = new d([255, 255, 0, 0.6]), this.disableHighlightFeatureResults = !1, this.hideActionBar = !1, this.hideFeatureResults = !1, this.state = this.#t.state, this.view = this.#t.view, this.arcgisHideGraphicsChange = o(), this.arcgisReady = o(), this.arcgisTraceLocationSelectEnd = o(), this.arcgisTraceLocationSelectStart = o(), this.arcgisTraceResultClear = o(), this.arcgisTraceResultFeaturesReady = o();
25
19
  }
26
20
  static {
27
21
  this.properties = { _activeTab: 16, _traceError: 16, _traceResult: 16, _showMissingTerminalWarning: 16, _showNoStartingPointsWarning: 16, _mode: 16, autoDestroyDisabled: 5, beforeTraceLocationSelectStart: 0, aggregatedGeometryGraphicsColor: 0, disableHighlightFeatureResults: 5, hideActionBar: 5, hideFeatureResults: 5, label: 3, messageOverrides: 0, traceResultFeatures: 32, referenceElement: 1, state: 32, view: 0 };
@@ -32,39 +26,36 @@ class x extends w {
32
26
  #t;
33
27
  #e;
34
28
  #i;
35
- get #l() {
29
+ get #o() {
36
30
  const { view: t } = this;
37
31
  return t?.map ? t.map.allLayers.toArray().concat(t.map.allTables.toArray()) : [];
38
32
  }
39
- #h;
40
- #a;
33
+ #c;
41
34
  #s;
42
- #r;
43
- #n;
44
35
  get traceResultFeatures() {
45
36
  return this.#i?.traceResultFeatures ?? [];
46
37
  }
47
38
  async destroy() {
48
- this.#c(), this.#i?.destroy(), this.#e?.destroy(), await this.manager.destroy();
39
+ this.#n(), this.#i?.destroy(), this.#e?.destroy(), await this.manager.destroy();
49
40
  }
50
41
  load() {
51
42
  this.manager.onLifecycle(() => [
52
- f(() => !this.#t.utilityNetwork, () => this._switchTab("input"))
43
+ f(() => !this.#t.utilityNetwork, () => this.#a("input"))
53
44
  ]);
54
45
  }
55
- #o() {
56
- this._traceResult = void 0, this.#c(), this.#d();
46
+ #r() {
47
+ this._traceResult = void 0, this.#n(), this.#g();
57
48
  }
58
- #g() {
49
+ #l() {
59
50
  if (!this.#e)
60
51
  return;
61
52
  const { traceLocations: t, traceLocationFlagInfos: e, traceConfiguration: r, isSubnetworkNameTraceSelected: s } = this.#e, i = !!r?.subnetworkName, c = t?.some((n) => n.type === "starting-point"), l = e?.some((n) => !!n.flagProperties.terminalConfiguration && !n.flagProperties.selectedTerminals?.size) ?? !1;
62
53
  this._traceError = void 0, this._showNoStartingPointsWarning = !s && !c || s && !i, this._showMissingTerminalWarning = l;
63
54
  }
64
- _switchTab(t) {
55
+ #a(t) {
65
56
  this._activeTab = t;
66
57
  }
67
- #u(t) {
58
+ #h(t) {
68
59
  const { _messages: e } = this;
69
60
  switch (t) {
70
61
  case "no-user-type-extension":
@@ -79,13 +70,13 @@ class x extends w {
79
70
  return t;
80
71
  }
81
72
  }
82
- #c() {
83
- this.#a.forEach((t) => t.remove()), this.#a = [];
73
+ #n() {
74
+ this.#s.forEach((t) => t.remove()), this.#s = [];
84
75
  }
85
- #d() {
76
+ #g() {
86
77
  this.#i?.clearAggregatedGeometryGraphics();
87
78
  }
88
- #p() {
79
+ #u() {
89
80
  const { _traceResult: t, view: e } = this, r = this.#t.utilityNetwork;
90
81
  if (!r || !t?.elements || !e)
91
82
  return;
@@ -101,10 +92,10 @@ class x extends w {
101
92
  if (!c)
102
93
  return;
103
94
  const l = c.highlight(i.objectIds);
104
- this.#a.push(l);
95
+ this.#s.push(l);
105
96
  });
106
97
  }
107
- async #m() {
98
+ async #d() {
108
99
  const t = this.#e?.selectedNamedTraceConfiguration, e = this.#e?.traceConfiguration;
109
100
  if (!(t?.traceType && e)) {
110
101
  v("error", this, "Trace configuration not found");
@@ -118,66 +109,75 @@ class x extends w {
118
109
  traceLocations: r ?? [],
119
110
  resultTypes: t.resultTypes,
120
111
  outSpatialReference: this.view?.spatialReference
121
- }), this.disableHighlightFeatureResults || this.#p();
112
+ }), this.disableHighlightFeatureResults || this.#u();
122
113
  } catch (s) {
123
114
  _(s, this, "Error while running trace"), this._traceError = s, this._traceResult = void 0;
124
115
  }
125
116
  }
117
+ #p() {
118
+ this.#l(), !(this._showNoStartingPointsWarning || this._showMissingTerminalWarning) && (this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1, this.#r(), this.#a("results"), this.#d());
119
+ }
120
+ #m(t) {
121
+ t && (this.#e = t);
122
+ }
126
123
  #y(t) {
127
- t.stopPropagation(), this.arcgisHideGraphicsChange.emit(t.detail);
124
+ t && (this.#i = t);
128
125
  }
129
126
  #f(t) {
130
- t.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented && t.preventDefault();
127
+ t.stopPropagation(), this.arcgisHideGraphicsChange.emit(t.detail);
131
128
  }
132
129
  #b(t) {
133
- t.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit();
130
+ t.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented && t.preventDefault();
134
131
  }
135
132
  #w(t) {
136
- t.stopPropagation(), this.arcgisTraceResultFeaturesReady.emit();
133
+ t.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit();
137
134
  }
138
135
  #v(t) {
136
+ t.stopPropagation(), this.arcgisTraceResultFeaturesReady.emit();
137
+ }
138
+ #T(t) {
139
139
  const e = t.detail;
140
140
  this.aggregatedGeometryGraphicsColor = new d(e);
141
141
  }
142
- #T() {
142
+ #$() {
143
143
  this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1;
144
144
  }
145
- #$() {
145
+ #_() {
146
146
  this.#t.utilityNetwork = this.#e?.selectedUtilityNetwork;
147
147
  }
148
- #_() {
148
+ #R() {
149
149
  const { _messages: t } = this;
150
150
  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>${t.errors.missingTerminalTitle}</div><div slot=message>${t.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`;
151
151
  }
152
- #R() {
152
+ #C() {
153
153
  const { _messages: t } = this;
154
154
  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>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`;
155
155
  }
156
- #C() {
157
- return u(`${this.el.id}__results-tab-item`, 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>` : a`<arcgis-utility-network-trace-results .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this.#l} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceConfigTitle=${this.#h?.title} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork ?? void 0} .view=${this.view ?? void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this.#v} @arcgisHideGraphicsChange=${this.#y} @arcgisTraceResultFeaturesReady=${this.#w} ${g(this.#n)}></arcgis-utility-network-trace-results>`}</calcite-tab>`);
158
- }
159
156
  #x() {
157
+ return u(`${this.el.id}__results-tab-item`, 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>` : a`<arcgis-utility-network-trace-results .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this.#o} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceConfigTitle=${this.#c?.title} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork ?? void 0} .view=${this.view ?? void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this.#T} @arcgisHideGraphicsChange=${this.#f} @arcgisTraceResultFeaturesReady=${this.#v} ${g(this.#y)}></arcgis-utility-network-trace-results>`}</calcite-tab>`);
158
+ }
159
+ #k() {
160
160
  const { _messages: t, _traceResult: e } = this, s = !!(e?.elements.length || e?.globalFunctionResults.length || e?.aggregatedGeometry) && this.#i?.state === "ready", i = this.#i?.numResults ?? 0;
161
161
  return a`<calcite-button appearance=outline width=full @click=${() => {
162
- this._switchTab("input"), this.#o(), this.arcgisTraceResultClear.emit();
162
+ this.#a("input"), this.#r(), this.arcgisTraceResultClear.emit();
163
163
  }} .disabled=${!s} slot=footer>${i > 0 && !this.hideFeatureResults && this.state !== "executing" ? t.buttons.clearResultsCustom.replace("{number}", i.toString()) : t.buttons.clearResultsGeneric}</calcite-button>`;
164
164
  }
165
- #k() {
166
- const { _mode: t } = this, { loadError: e } = this.#t, s = (e === "no-user-type-extension" || e === "sceneView-not-supported" ? a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#u(e)}</div></calcite-notice>` : void 0) ?? a`${this._showNoStartingPointsWarning && t === "default" && this.#R() || ""}${this._showMissingTerminalWarning && t === "default" && this.#_() || ""}<arcgis-utility-network-trace-inputs .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view ?? void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${(i) => {
165
+ #S() {
166
+ const { _mode: t } = this, { loadError: e } = this.#t, s = (e === "no-user-type-extension" || e === "sceneView-not-supported" ? a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#h(e)}</div></calcite-notice>` : void 0) ?? a`${this._showNoStartingPointsWarning && t === "default" && this.#C() || ""}${this._showMissingTerminalWarning && t === "default" && this.#R() || ""}<arcgis-utility-network-trace-inputs .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view ?? void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${(i) => {
167
167
  i.stopPropagation(), i.detail.name === "mode" && (this._mode = i.target.mode);
168
- }} @arcgisSelectedNamedTraceConfigurationChange=${this.#T} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationSelectStart=${this.#f} @arcgisUtilityNetworkChange=${this.#$} ${g(this.#r)}></arcgis-utility-network-trace-inputs>`;
168
+ }} @arcgisSelectedNamedTraceConfigurationChange=${this.#$} @arcgisTraceLocationSelectEnd=${this.#w} @arcgisTraceLocationSelectStart=${this.#b} @arcgisUtilityNetworkChange=${this.#_} ${g(this.#m)}></arcgis-utility-network-trace-inputs>`;
169
169
  return u(`${this.el.id}__inputs-tab-item`, a`<calcite-tab .selected=${this._activeTab === "input"}><div class="inputs-tab-container">${s}</div></calcite-tab>`);
170
170
  }
171
- #S() {
171
+ #N() {
172
172
  const { state: t } = this;
173
173
  if (this._mode !== "default")
174
174
  return null;
175
175
  const e = t === "disabled" || t === "loading" || !this.#e?.traceConfiguration;
176
- return a`<calcite-button appearance=solid width=full @click=${this.#s} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`;
176
+ return a`<calcite-button appearance=solid width=full @click=${this.#p} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`;
177
177
  }
178
178
  render() {
179
179
  const { _activeTab: t, state: e } = this;
180
- return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${() => this._switchTab("input")} .selected=${t === "input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${() => this._switchTab("results")} .selected=${t === "results"} .disabled=${e === "disabled" || e === "loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#k()}${this.#C()}</calcite-tabs>${t === "input" ? this.#S() : null}${t === "results" ? this.#x() : null}</calcite-panel>`;
180
+ return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${() => this.#a("input")} .selected=${t === "input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${() => this.#a("results")} .selected=${t === "results"} .disabled=${e === "disabled" || e === "loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#S()}${this.#x()}</calcite-tabs>${t === "input" ? this.#N() : null}${t === "results" ? this.#k() : null}</calcite-panel>`;
181
181
  }
182
182
  }
183
183
  m("arcgis-utility-network-trace-analysis", x);
@@ -19,24 +19,7 @@ import { a as F, i as f, c as E, q as b, b as U } from "../../chunks/layer-utils
19
19
  const P = I`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`, m = `utility-network-trace-inputs-sketch-${Date.now()}`, D = 20;
20
20
  class A extends C {
21
21
  constructor() {
22
- super(...arguments), this._messages = x({ blocking: !0 }), this.#h = !0, this.#u = /* @__PURE__ */ new Map(), this.#r = new c(), this.#s = new c(), this.#o = new c(), this.#y = /* @__PURE__ */ new Set(["subnetwork", "subnetwork-controller", "upstream", "downstream", "isolation"]), this.#m = () => {
23
- if (this._error = void 0, !this.view?.map) {
24
- this._error = this._messages.errors.noView, this._utilityNetworks = void 0;
25
- return;
26
- }
27
- const e = this.view.map;
28
- this.#J(e), this.#B(e);
29
- }, this.#i = null, this.#l = 20, this.#T = (e) => {
30
- e && (this.#w = e);
31
- }, this.#N = (e) => {
32
- e && (this.#k = e);
33
- }, this.#$ = (e) => {
34
- e && (this.#S = e);
35
- }, this.#C = (e) => {
36
- e && (this.#c = e);
37
- }, this.#v = ({ detail: e, target: t }) => {
38
- (e.name === "selectedDrillInFeature" || e.name === "selectedFeature") && (this._selectedFeature = t.selectedDrillInFeature ?? t.selectedFeature ?? void 0);
39
- }, this._candidateFeatures = [], this._compatibleSubnetworkNames = [], this._namedTraceConfigurations = [], this._subnetworkNamesState = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = L()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = l(), this.arcgisTraceInputsChange = l(), this.arcgisTraceLocationSelectEnd = l(), this.arcgisTraceLocationSelectStart = l(), this.arcgisUtilityNetworkChange = l();
22
+ super(...arguments), this._messages = x({ blocking: !0 }), this.#h = !0, this.#u = /* @__PURE__ */ new Map(), this.#r = new c(), this.#s = new c(), this.#o = new c(), this.#b = /* @__PURE__ */ new Set(["subnetwork", "subnetwork-controller", "upstream", "downstream", "isolation"]), this.#i = null, this.#l = 20, this._candidateFeatures = [], this._compatibleSubnetworkNames = [], this._namedTraceConfigurations = [], this._subnetworkNamesState = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = L()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = l(), this.arcgisTraceInputsChange = l(), this.arcgisTraceLocationSelectEnd = l(), this.arcgisTraceLocationSelectStart = l(), this.arcgisUtilityNetworkChange = l();
40
23
  }
41
24
  static {
42
25
  this.properties = { _selectedFeature: 16, _candidateFeatures: 16, _compatibleSubnetworkNames: 16, _subnetworksTable: 16, _namedTraceConfigurations: 16, _utilityNetworks: 16, _traceConfiguration: 16, _error: 16, _subnetworkNamesState: 16, _activeTraceLocationType: 16, _exceedDisplayLimit: 16, beforeTraceLocationSelectStart: 0, view: 0, selectedUtilityNetwork: 0, selectedNamedTraceConfiguration: 0, autoDestroyDisabled: 5, hideActionBar: 5, traceConfiguration: 32, isSubnetworkNameTraceSelected: 32, referenceElement: 1, mode: 3, traceLocationFlagInfos: 32, traceLocations: 32 };
@@ -51,7 +34,7 @@ class A extends C {
51
34
  this._traceConfiguration && (this._traceConfiguration.subnetworkName = e);
52
35
  }
53
36
  #h;
54
- get #E() {
37
+ get #_() {
55
38
  const { view: e } = this;
56
39
  return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
57
40
  }
@@ -61,30 +44,27 @@ class A extends C {
61
44
  #r;
62
45
  #s;
63
46
  #o;
64
- #y;
65
- #m;
47
+ #b;
66
48
  #i;
67
49
  #c;
50
+ #y;
68
51
  #w;
69
52
  #k;
70
- #S;
71
53
  #l;
72
- #T;
73
- #N;
74
- #$;
75
- #C;
76
- get #L() {
54
+ get #S() {
77
55
  return !this.isSubnetworkNameTraceSelected;
78
56
  }
79
- get #_() {
57
+ get #T() {
80
58
  const e = this.selectedNamedTraceConfiguration?.traceType;
81
59
  return e === "path" || e === "circuit";
82
60
  }
83
- get #U() {
61
+ get #v() {
84
62
  const e = this.selectedUtilityNetwork?.dataElement?.domainNetworks;
85
63
  return e ? e.map((t) => t.subnetworkLayerId).filter((t) => t != null && t > -1) : [];
86
64
  }
87
- #v;
65
+ #I({ detail: e, target: t }) {
66
+ (e.name === "selectedDrillInFeature" || e.name === "selectedFeature") && (this._selectedFeature = t.selectedDrillInFeature ?? t.selectedFeature ?? void 0);
67
+ }
88
68
  get traceConfiguration() {
89
69
  return this._traceConfiguration;
90
70
  }
@@ -97,14 +77,14 @@ class A extends C {
97
77
  }
98
78
  get traceLocations() {
99
79
  const e = [];
100
- return this.#L && this.#r.forEach((t) => e.push(...this.#g(t))), this.#_ && this.#o.forEach((t) => e.push(...this.#g(t))), this.#s.forEach((t) => e.push(...this.#g(t))), e;
80
+ return this.#S && this.#r.forEach((t) => e.push(...this.#m(t))), this.#T && this.#o.forEach((t) => e.push(...this.#m(t))), this.#s.forEach((t) => e.push(...this.#m(t))), e;
101
81
  }
102
82
  async destroy() {
103
- this.#A(m), this.#I(), this.#t?.cancel(), this.#c?.destroy(), this.#w?.destroy(), this.#k?.destroy(), this.#S?.destroy(), await this.manager.destroy();
83
+ this.#A(m), this.#$(), this.#t?.cancel(), this.#c?.destroy(), this.#y?.destroy(), this.#w?.destroy(), this.#k?.destroy(), await this.manager.destroy();
104
84
  }
105
85
  load() {
106
- this.#m(), this.manager.onLifecycle(() => [
107
- w(() => this.view?.map, () => this.#m())
86
+ this.#N(), this.manager.onLifecycle(() => [
87
+ w(() => this.view?.map, () => this.#N())
108
88
  ]);
109
89
  }
110
90
  willUpdate(e) {
@@ -113,7 +93,27 @@ class A extends C {
113
93
  disconnectedCallback() {
114
94
  super.disconnectedCallback(), this.#u.clear();
115
95
  }
116
- #g(e) {
96
+ #N() {
97
+ if (this._error = void 0, !this.view?.map) {
98
+ this._error = this._messages.errors.noView, this._utilityNetworks = void 0;
99
+ return;
100
+ }
101
+ const e = this.view.map;
102
+ this.#J(e), this.#B(e);
103
+ }
104
+ #x(e) {
105
+ e && (this.#y = e);
106
+ }
107
+ #F(e) {
108
+ e && (this.#w = e);
109
+ }
110
+ #E(e) {
111
+ e && (this.#k = e);
112
+ }
113
+ #U(e) {
114
+ e && (this.#c = e);
115
+ }
116
+ #m(e) {
117
117
  const t = e.flagProperties.selectedTerminals;
118
118
  return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new N({
119
119
  type: e.traceLocation.type,
@@ -123,7 +123,7 @@ class A extends C {
123
123
  terminalId: i
124
124
  })) : [e.traceLocation];
125
125
  }
126
- #I() {
126
+ #$() {
127
127
  const { view: e } = this;
128
128
  this.#r.forEach((t) => {
129
129
  t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
@@ -153,7 +153,7 @@ class A extends C {
153
153
  const { map: t } = this.view, i = t?.findLayerById(e);
154
154
  i && f(i) && t?.remove(i);
155
155
  }
156
- #x() {
156
+ #C() {
157
157
  if (!this.#t)
158
158
  return;
159
159
  const e = new c();
@@ -180,7 +180,7 @@ class A extends C {
180
180
  });
181
181
  }
182
182
  #B(e) {
183
- this.#P(e, m), this.#t = this.#M(e), this.#x();
183
+ this.#P(e, m), this.#t = this.#M(e), this.#C();
184
184
  }
185
185
  #G() {
186
186
  this.#e = void 0, this._subnetworksTable = void 0, this._compatibleSubnetworkNames = [];
@@ -227,14 +227,14 @@ class A extends C {
227
227
  } catch (t) {
228
228
  p(t, this, "Error while loading the selected utility network");
229
229
  }
230
- this.#G(), this.#W(), this.#Q(), this.#I();
230
+ this.#G(), this.#W(), this.#Q(), this.#$();
231
231
  }
232
232
  #W() {
233
233
  this._traceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this._namedTraceConfigurations = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter((e) => e.traceType !== "circuit").sort((e, t) => e.title.localeCompare(t.title)) || [], this._namedTraceConfigurations.length ? this.selectedNamedTraceConfiguration = this._namedTraceConfigurations.at(0) : h("error", this, "The selected utility network has no compatible named trace configurations.");
234
234
  }
235
235
  #Q() {
236
236
  const { selectedUtilityNetwork: e } = this;
237
- this.#a = new c(this.#E.filter((t) => e?.isUtilityLayer(t) && !this.#U.includes(t.layerId))), this.#x();
237
+ this.#a = new c(this.#_.filter((t) => e?.isUtilityLayer(t) && !this.#v.includes(t.layerId))), this.#C();
238
238
  }
239
239
  #K() {
240
240
  const { _utilityNetworks: e, selectedUtilityNetwork: t } = this;
@@ -249,7 +249,7 @@ class A extends C {
249
249
  this._utilityNetworks = e.utilityNetworks || new c();
250
250
  }
251
251
  }
252
- #p(e) {
252
+ #g(e) {
253
253
  if (e.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented) {
254
254
  e.preventDefault();
255
255
  return;
@@ -294,16 +294,16 @@ class A extends C {
294
294
  i.push(...o);
295
295
  })), i;
296
296
  }
297
- async #f(e) {
297
+ async #p(e) {
298
298
  return this._exceedDisplayLimit = e.length > this.#l, this._candidateFeatures = await this.#Z(e.slice(0, this.#l)), this._candidateFeatures.length === 0 ? (this.#d(), await Promise.reject(Error("No features found"))) : (this._candidateFeatures.length === 1 && (this._selectedFeature = this._candidateFeatures.at(0)), this.mode = "add-spatial-feature", this.#i?.reject(), this.#i = Promise.withResolvers(), await this.#i.promise);
299
299
  }
300
- #b(e) {
300
+ #f(e) {
301
301
  e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit(), this._activeTraceLocationType = void 0, this.mode = "default", this.#d();
302
302
  }
303
303
  #d(e) {
304
- e?.stopPropagation(), this.#c?.clear(), this.#F(), this.#t?.cancel();
304
+ e?.stopPropagation(), this.#c?.clear(), this.#L(), this.#t?.cancel();
305
305
  }
306
- #F() {
306
+ #L() {
307
307
  this.mode = "default", this._candidateFeatures = [], this._selectedFeature = void 0, this.#i?.reject(), this.#i = null;
308
308
  }
309
309
  #ee() {
@@ -348,7 +348,7 @@ class A extends C {
348
348
  if (!t.length)
349
349
  return this.mode = "default", null;
350
350
  const a = e === "starting-point" ? i.labels.addSpatial.startingPoint : e === "barrier" ? i.labels.addSpatial.barrier : i.labels.addSpatial.stoppingPoint, r = t.length === 1 ? "feature" : "list";
351
- return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#h} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${() => this.#F()} @arcgisPropertyChange=${this.#v} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#C)}></arcgis-features-next>`;
351
+ return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#h} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${() => this.#L()} @arcgisPropertyChange=${this.#I} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#U)}></arcgis-features-next>`;
352
352
  }
353
353
  #ne() {
354
354
  const { mode: e, _messages: t, _selectedFeature: i, selectedUtilityNetwork: a } = this, r = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o = k(t.warnings.exceededDisplayLimit, {
@@ -357,13 +357,13 @@ class A extends C {
357
357
  return s`${r && s`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>` || ""}<calcite-button appearance=outline width=full @click=${() => this.#d()} slot=footer>${t.buttons.cancel}</calcite-button>${e === "add-spatial-feature" && s`<calcite-button width=full slot=footer appearance=solid @click=${() => this.#ee()} .disabled=${n}>${t.buttons.add}</calcite-button>` || ""}`;
358
358
  }
359
359
  #ce() {
360
- return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#f.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#T)}></arcgis-utility-network-trace-location>`;
360
+ return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#x)}></arcgis-utility-network-trace-location>`;
361
361
  }
362
362
  #le() {
363
- return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#f.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#$)}></arcgis-utility-network-trace-location>`;
363
+ return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#E)}></arcgis-utility-network-trace-location>`;
364
364
  }
365
365
  #de() {
366
- return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#f.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#N)}></arcgis-utility-network-trace-location>`;
366
+ return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#F)}></arcgis-utility-network-trace-location>`;
367
367
  }
368
368
  #he() {
369
369
  const { _messages: e } = this;
@@ -381,13 +381,13 @@ class A extends C {
381
381
  }
382
382
  #ge() {
383
383
  const { selectedNamedTraceConfiguration: e } = this;
384
- return this._traceConfiguration && e?.traceType && this.#y.has(e.traceType) ? s`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfiguration=${e}></arcgis-utility-network-subnetwork-info></calcite-block>` : null;
384
+ return this._traceConfiguration && e?.traceType && this.#b.has(e.traceType) ? s`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfiguration=${e}></arcgis-utility-network-subnetwork-info></calcite-block>` : null;
385
385
  }
386
386
  #pe() {
387
387
  const { _messages: e } = this, { noTraceConfiguration: t, noNamedTraceConfigurations: i, utilityNetworkLoadFailed: a } = e.errors, r = this._utilityNetworks && this._utilityNetworks.length > 1 ? this.#ae() : null;
388
388
  let o;
389
389
  this.selectedUtilityNetwork?.loadError ? o = this.#n(a, !1, "exclamation-mark-triangle") : this._namedTraceConfigurations.length || (o = this.#n(i, !1, "exclamation-mark-triangle"));
390
- const n = s`${this.#ie()}${this.#ge()}${this.#me()}`, u = this.traceConfiguration ? s`${this.#L ? this.#ce() : null}${this.#_ ? this.#le() : null}${this.#de()}` : this.#n(t, !1, "exclamation-mark-triangle");
390
+ const n = s`${this.#ie()}${this.#ge()}${this.#me()}`, u = this.traceConfiguration ? s`${this.#S ? this.#ce() : null}${this.#T ? this.#le() : null}${this.#de()}` : this.#n(t, !1, "exclamation-mark-triangle");
391
391
  return s`<calcite-block-group .label=${e.labels.traceInputs}>${r}${o ?? s`${n}${u}`}</calcite-block-group>`;
392
392
  }
393
393
  render() {