@arcgis/map-components 5.2.0-next.51 → 5.2.0-next.52

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 (39) hide show
  1. package/README.md +2 -2
  2. package/dist/cdn/4JAQPYHG.js +2 -0
  3. package/dist/cdn/7RN4FELN.js +2 -0
  4. package/dist/cdn/{TXPI3GGA.js → AIVVE6PW.js} +1 -1
  5. package/dist/cdn/{KBQRHXQ4.js → BCDL4T34.js} +1 -1
  6. package/dist/cdn/H5DDBPGU.js +2 -0
  7. package/dist/cdn/HFJDGHMV.js +2 -0
  8. package/dist/cdn/HGL6PAIG.js +2 -0
  9. package/dist/cdn/NWUV3BTR.js +2 -0
  10. package/dist/cdn/{6RSIIYYJ.js → QA56535U.js} +1 -1
  11. package/dist/cdn/U26MQUQF.js +2 -0
  12. package/dist/cdn/UOXJUYC7.js +2 -0
  13. package/dist/cdn/index.js +1 -1
  14. package/dist/chunks/useArcgisViewReadyError.js +14 -7
  15. package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +59 -53
  16. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.d.ts +1 -1
  17. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.js +12 -12
  18. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +116 -105
  19. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +199 -182
  20. package/dist/components/arcgis-utility-network-trace-location/customElement.js +68 -67
  21. package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +26 -26
  22. package/dist/components/arcgis-utility-network-trace-results/customElement.js +128 -108
  23. package/dist/docs/api.json +1 -1
  24. package/dist/docs/docs.json +1 -1
  25. package/dist/docs/web-types.json +1 -1
  26. package/dist/loader.js +1 -1
  27. package/dist/types/lumina.d.ts +1 -1
  28. package/dist/types/preact.d.ts +1 -1
  29. package/dist/types/react.d.ts +1 -1
  30. package/dist/types/stencil.d.ts +1 -1
  31. package/package.json +4 -4
  32. package/dist/cdn/3BU2B6F7.js +0 -2
  33. package/dist/cdn/3HHUVV6D.js +0 -2
  34. package/dist/cdn/4GZ7DNJF.js +0 -2
  35. package/dist/cdn/CWFOZVE7.js +0 -2
  36. package/dist/cdn/J6ZHNOE2.js +0 -2
  37. package/dist/cdn/MUAJSX4F.js +0 -2
  38. package/dist/cdn/MUFXNQE3.js +0 -2
  39. package/dist/cdn/NKWXCVN3.js +0 -2
@@ -4,35 +4,35 @@ import y from "@arcgis/core/Color.js";
4
4
  import "@arcgis/core/core/Error.js";
5
5
  import "@arcgis/core/Graphic.js";
6
6
  import { LitElement as f, createEvent as d } from "@arcgis/lumina";
7
- import { log as o, composeMissingPropertyMessage as h, composeEmptyPropertyMessage as _ } from "@arcgis/toolkit/log";
8
- import { css as v, html as i } from "lit";
9
- import { createRef as b, ref as u } from "lit/directives/ref.js";
7
+ import { log as o, composeMissingPropertyMessage as g, composeEmptyPropertyMessage as v } from "@arcgis/toolkit/log";
8
+ import { css as b, html as l } from "lit";
9
+ import { createRef as $, ref as h } from "lit/directives/ref.js";
10
10
  import { u as w } from "../../chunks/useT9n.js";
11
- import { l as $ } from "../../chunks/async-utils.js";
12
- import { q as R, c as C } from "../../chunks/layer-utils.js";
13
- const E = v`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features-next{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;margin:0 var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{margin:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`, g = {
11
+ import { l as C } from "../../chunks/async-utils.js";
12
+ import { q as R, c as E } from "../../chunks/layer-utils.js";
13
+ const F = b`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features-next{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;margin:0 var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{margin:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`, u = {
14
14
  dirtyAreasDiscovered: -2147208511,
15
15
  noValidControllers: -2147208935,
16
16
  pathNotFound: -2147208444
17
17
  };
18
- class T extends f {
18
+ class k extends f {
19
19
  constructor() {
20
- super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages = w({ blocking: !0 }), this._elementsWithoutLayer = [], this._popoverElement = b(), this._layerIdToFeatures = /* @__PURE__ */ new Map(), this._layerIdToLayer = /* @__PURE__ */ new Map(), this._subtypeCodeToFeatures = /* @__PURE__ */ new Map(), this._sourceIdToElements = /* @__PURE__ */ new Map(), this._utilityNetworkLayers = [], this._queryFeaturesOnLayer = async ([e, t]) => {
21
- const a = this.utilityNetwork?.getLayerIdBySourceId(e), s = this._getLayerByLayerId(a), r = this._getElementsUniqueByGlobalId(t);
22
- if (a == null || !s) {
23
- this._elementsWithoutLayer.push(...r);
20
+ super(...arguments), this._messages = w({ blocking: !0 }), this.#c = !0, this.#t = [], this.#s = $(), this.#a = /* @__PURE__ */ new Map(), this.#o = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map(), this.#l = [], this.#d = async ([e, t]) => {
21
+ const s = this.utilityNetwork?.getLayerIdBySourceId(e), a = this.#p(s), i = this.#y(t);
22
+ if (s == null || !a) {
23
+ this.#t.push(...i);
24
24
  return;
25
25
  }
26
- const l = s.createQuery();
27
- l.gdbVersion = this.utilityNetwork?.gdbVersion, l.objectIds = r.map((c) => c.objectId), l.outFields = ["*"];
28
- const { features: n } = await R(s, l);
26
+ const r = a.createQuery();
27
+ r.gdbVersion = this.utilityNetwork?.gdbVersion, r.objectIds = i.map((c) => c.objectId), r.outFields = ["*"];
28
+ const { features: n } = await R(a, r);
29
29
  n.forEach((c) => {
30
30
  const m = c.layer;
31
- c.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled) || (c.popupTemplate = m.createPopupTemplate());
32
- }), C(s) ? n.forEach((c) => this._addOrCreateMapValue(this._subtypeCodeToFeatures, c.layer.subtypeCode, c)) : this._layerIdToFeatures.set(a, n);
33
- }, this._aggregateGeometryRefChange = (e) => {
34
- e && (this._aggregatedGeometryComponentElement = e);
35
- }, this._featuresRefChange = (e) => {
31
+ c.getEffectivePopupTemplate(this.#c) || (c.popupTemplate = m.createPopupTemplate());
32
+ }), E(a) ? n.forEach((c) => this.#g(this.#i, c.layer.subtypeCode, c)) : this.#a.set(s, n);
33
+ }, this.#h = (e) => {
34
+ e && (this.#n = e);
35
+ }, this.#u = (e) => {
36
36
  e && (this._featuresComponentElement = e);
37
37
  }, this._aggregatedGeometryDisabled = !1, this.aggregatedGeometryGraphicsColor = new y([255, 255, 0, 0.6]), this.hideActionBar = !1, this.hideFeatureResults = !1, this.isElementsSelected = !1, this.layers = [], this.state = "ready", this.traceResultFeatures = [], this.autoDestroyDisabled = !1, this.arcgisAggregatedGeometryGraphicsColorChange = d(), this.arcgisHideGraphicsChange = d(), this.arcgisSelectedResultTypeChange = d(), this.arcgisTraceResultFeaturesReady = d();
38
38
  }
@@ -40,151 +40,171 @@ class T extends f {
40
40
  this.properties = { _aggregatedGeometryDisabled: 16, _featuresComponentElement: 16, aggregatedGeometryGraphicsColor: 0, hideActionBar: 5, hideFeatureResults: 5, isElementsSelected: 5, layers: 0, messageOverrides: 0, numResults: 32, referenceElement: 1, state: 1, traceConfigTitle: 1, traceError: 0, traceResult: 0, traceResultFeatures: 0, utilityNetwork: 0, view: 0, autoDestroyDisabled: 5 };
41
41
  }
42
42
  static {
43
- this.styles = E;
44
- }
43
+ this.styles = F;
44
+ }
45
+ #c;
46
+ #t;
47
+ #n;
48
+ #s;
49
+ #a;
50
+ #o;
51
+ #i;
52
+ #r;
53
+ #l;
54
+ #d;
55
+ #h;
56
+ #u;
45
57
  get numResults() {
46
- return this.traceResultFeatures.length + this._elementsWithoutLayer.length;
58
+ return this.traceResultFeatures.length + this.#t.length;
47
59
  }
48
60
  clearAggregatedGeometryGraphics() {
49
- this._aggregatedGeometryComponentElement?.destroy();
61
+ this.#n?.destroy();
50
62
  }
51
63
  async destroy() {
52
- this._layerIdToFeatures.clear(), this._subtypeCodeToFeatures.clear(), this._sourceIdToElements.clear(), this._aggregatedGeometryComponentElement?.destroy(), this._featuresComponentElement?.destroy(), await this.manager.destroy();
64
+ this.#a.clear(), this.#i.clear(), this.#r.clear(), this.#n?.destroy(), this._featuresComponentElement?.destroy(), await this.manager.destroy();
53
65
  }
54
66
  load() {
55
- this.traceResult && (this._setSourceIdToElements(), this._loadDependencies().then(() => this._queryTraceResultsFeatures()).finally(() => {
67
+ this.traceResult && (this.#$(), this.#v().then(() => this.#b()).finally(() => {
56
68
  this.arcgisTraceResultFeaturesReady.emit(), this.state = "ready";
57
69
  }));
58
70
  }
59
71
  willUpdate(e) {
60
- e.has("isElementsSelected") && this.arcgisSelectedResultTypeChange.emit(), e.has("traceResult") && (this.isElementsSelected = !1, this.traceResult || (this.traceResultFeatures = [], this._elementsWithoutLayer = []));
72
+ e.has("isElementsSelected") && this.arcgisSelectedResultTypeChange.emit(), e.has("traceResult") && (this.isElementsSelected = !1, this.traceResult || (this.traceResultFeatures = [], this.#t = []));
61
73
  }
62
74
  loaded() {
63
- this.traceResult && (this.utilityNetwork || o("warn", this, h("utilityNetwork")), this.layers.length || o("warn", this, _("layers")), this.view || o("warn", this, h("view")));
75
+ this.traceResult && (this.utilityNetwork || o("warn", this, g("utilityNetwork")), this.layers.length || o("warn", this, v("layers")), this.view || o("warn", this, g("view")));
64
76
  }
65
77
  disconnectedCallback() {
66
- super.disconnectedCallback(), this._layerIdToLayer.clear();
78
+ super.disconnectedCallback(), this.#o.clear();
67
79
  }
68
- _addOrCreateMapValue(e, t, a) {
69
- const s = e.get(t);
70
- s == null ? e.set(t, [a]) : s.push(a);
80
+ #g(e, t, s) {
81
+ const a = e.get(t);
82
+ a == null ? e.set(t, [s]) : a.push(s);
71
83
  }
72
- _getLayerByLayerId(e) {
84
+ #p(e) {
73
85
  if (e == null)
74
86
  return;
75
- const { _layerIdToLayer: t, _utilityNetworkLayers: a } = this;
76
- if (t.get(e))
77
- return t.get(e);
78
- const s = a.find((r) => "layerId" in r && r.layerId === e);
79
- return s && t.set(e, s), s;
87
+ const t = this.#o, s = this.#l, a = t.get(e);
88
+ if (a)
89
+ return a;
90
+ if (!s)
91
+ return;
92
+ const i = s.find((r) => "layerId" in r && r.layerId === e);
93
+ return i && t.set(e, i), i;
80
94
  }
81
- _getElementsUniqueByGlobalId(e) {
95
+ #y(e) {
82
96
  return Array.from(new Map(e.map((t) => [t.globalId, t])).values());
83
97
  }
84
- _handleHideGraphicsChange(e) {
98
+ #f(e) {
85
99
  e.stopPropagation();
86
100
  const t = e.detail;
87
- this.arcgisHideGraphicsChange.emit(t), this._aggregatedGeometryDisabled = t, t && this._popoverElement.value?.open && (this._popoverElement.value.open = !1);
101
+ this.arcgisHideGraphicsChange.emit(t), this._aggregatedGeometryDisabled = t, t && this.#s.value?.open && (this.#s.value.open = !1);
88
102
  }
89
- async _loadDependencies() {
103
+ async #v() {
90
104
  const { layers: e, utilityNetwork: t } = this;
91
105
  if (!t)
92
106
  return;
93
107
  try {
94
108
  t.loaded || (this.state = "loading", await t.load());
95
- } catch (r) {
96
- $(r, this, "Error while loading the selected utility network");
109
+ } catch (i) {
110
+ C(i, this, "Error while loading the selected utility network");
97
111
  }
98
- this._utilityNetworkLayers = e.filter((r) => t.isUtilityLayer(r));
99
- const s = this._utilityNetworkLayers.filter((r) => !r.loaded).map((r) => r.load());
100
- s.length > 0 && (this.state = "loading", (await Promise.allSettled(s)).forEach((l) => {
101
- l.status === "rejected" && o("error", this, `Failed to load layer. Reason: ${l.reason}`);
112
+ this.#l = e.filter((i) => t.isUtilityLayer(i));
113
+ const a = this.#l.filter((i) => !i.loaded).map((i) => i.load());
114
+ a.length > 0 && (this.state = "loading", (await Promise.allSettled(a)).forEach((r) => {
115
+ r.status === "rejected" && o("error", this, `Failed to load layer. Reason: ${r.reason}`);
102
116
  }));
103
117
  }
104
- async _queryTraceResultsFeatures() {
105
- const e = Array.from(this._sourceIdToElements.entries());
118
+ async #b() {
119
+ const e = Array.from(this.#r.entries());
106
120
  if (!e.length)
107
121
  return;
108
122
  this.state = "loading";
109
- const t = e.map(this._queryFeaturesOnLayer);
110
- (await Promise.allSettled(t)).forEach((l, n) => {
111
- if (l.status === "rejected") {
123
+ const t = e.map(this.#d);
124
+ (await Promise.allSettled(t)).forEach((r, n) => {
125
+ if (r.status === "rejected") {
112
126
  const [c] = e[n];
113
- o("error", this, `Failed to query features for source ${c}. Reason: ${l.reason}`);
127
+ o("error", this, `Failed to query features for source ${c}. Reason: ${r.reason}`);
114
128
  }
115
129
  });
116
- const s = Array.from(this._layerIdToFeatures.values()), r = Array.from(this._subtypeCodeToFeatures.values());
117
- this.traceResultFeatures = s.concat(r).flat();
130
+ const a = Array.from(this.#a.values()), i = Array.from(this.#i.values());
131
+ this.traceResultFeatures = a.concat(i).flat();
118
132
  }
119
- _setSourceIdToElements() {
120
- this.traceResult.elements?.forEach((e) => this._addOrCreateMapValue(this._sourceIdToElements, e.networkSourceId, e));
133
+ #$() {
134
+ this.traceResult.elements?.forEach((e) => this.#g(this.#r, e.networkSourceId, e));
121
135
  }
122
136
  render() {
123
137
  const { traceError: e, traceResult: t } = this;
124
138
  if (e)
125
- return this._renderErrorLanding(e);
139
+ return this.#x(e);
126
140
  if (!t)
127
- return this._renderNoTraceLanding();
128
- const { elements: a, globalFunctionResults: s, aggregatedGeometry: r } = t, l = !a.length && !s.length && !r, n = a.length > 0 && !s.length && !r;
129
- return l ? this._renderNoResultsLanding() : this.state === "loading" ? this._renderGettingResults() : this.hideFeatureResults && n ? this._renderFeaturesAreHiddenLanding() : this.isElementsSelected || n ? i`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${n} hide-select-feature initial-display-mode=list .messageOverrides=${this.messageOverrides} @arcgisClose=${() => this.isElementsSelected = !1} open .referenceElement=${this.referenceElement} .view=${this.view} ${u(this._featuresRefChange)}></arcgis-features-next>` : this._renderLanding(t);
130
- }
131
- _renderGettingResults() {
132
- return i`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`;
133
- }
134
- _renderLanding(e) {
135
- const { elements: t, globalFunctionResults: a, aggregatedGeometry: s } = e;
136
- return i`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}${s != null ? this._renderAggregatedGeometry(s) : null}${s != null && !t.length ? this._renderNoSelectableResults() : null}${t.length > 0 ? this.hideFeatureResults ? this._renderFeaturesAreHidden() : this._renderElementsResults() : null}${a.length > 0 ? this._renderFunctionsResults(a) : null}</calcite-panel>`;
137
- }
138
- _renderAggregatedGeometry(e) {
139
- return i`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${this.aggregatedGeometryGraphicsColor} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} auto-destroy-disabled ${u(this._aggregateGeometryRefChange)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${this._messages.labels.aggregatedGeometryGraphicsColor} .color=${this.aggregatedGeometryGraphicsColor.toCss()} .disabled=${this._aggregatedGeometryDisabled}></calcite-swatch><calcite-popover .heading=${this._messages.headings.setColor} .label=${this._messages.headings.setColor} reference-element=geometry-color-swatch closable ${u(this._popoverElement)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${this.aggregatedGeometryGraphicsColor} @calciteColorPickerChange=${(t) => {
140
- const a = t.target.value;
141
- this.arcgisAggregatedGeometryGraphicsColorChange.emit(a);
142
- }} .disabled=${this._aggregatedGeometryDisabled}></calcite-color-picker></calcite-popover></div>`;
143
- }
144
- _renderFeaturesAreHiddenLanding() {
145
- return i`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}${this._renderFeaturesAreHidden()}</calcite-panel>`;
146
- }
147
- _renderFeaturesAreHidden() {
148
- return i`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`;
149
- }
150
- _renderNoSelectableResults() {
151
- return i`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`;
152
- }
153
- _renderElementsResults() {
154
- return i`<calcite-list .label=${this._messages.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${this._messages.headings.features} @calciteListItemSelect=${() => this.isElementsSelected = !0}><calcite-chip .label=${this._messages.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`;
155
- }
156
- _renderFunctionsResults(e) {
157
- return i`<div class="functions-heading">${this._messages.headings.functions}</div><calcite-table .caption=${this._messages.labels.functionResults}>${e.filter((t) => t.networkAttributeName != null && t.result != null && t.functionType != null).map((t) => {
158
- const { functionName: a, networkAttributeName: s, functionType: r, result: l } = t, n = a || `${s} ${r}`;
159
- return i`<calcite-table-row><calcite-table-cell>${n}</calcite-table-cell><calcite-table-cell>${l}</calcite-table-cell></calcite-table-row>`;
141
+ return this.#L();
142
+ const { elements: s, globalFunctionResults: a, aggregatedGeometry: i } = t, r = !s.length && !a.length && !i, n = s.length > 0 && !a.length && !i;
143
+ return r ? this.#T() : this.state === "loading" ? this.#w() : this.hideFeatureResults && n ? this.#E() : this.isElementsSelected || n ? l`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#c} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${n} hide-select-feature initial-display-mode=list .messageOverrides=${this.messageOverrides} @arcgisClose=${() => this.isElementsSelected = !1} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#u)}></arcgis-features-next>` : this.#C(t);
144
+ }
145
+ #w() {
146
+ return l`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`;
147
+ }
148
+ #C(e) {
149
+ const { elements: t, globalFunctionResults: s, aggregatedGeometry: a } = e;
150
+ return l`<calcite-panel class="white-panel-background">${this.#e()}${a != null ? this.#R(a) : null}${a != null && !t.length ? this.#F() : null}${t.length > 0 ? this.hideFeatureResults ? this.#m() : this.#k() : null}${s.length > 0 ? this.#G(s) : null}</calcite-panel>`;
151
+ }
152
+ #R(e) {
153
+ const { _aggregatedGeometryDisabled: t, aggregatedGeometryGraphicsColor: s, _messages: a } = this;
154
+ return l`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${s} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this.#f} auto-destroy-disabled ${h(this.#h)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${a.labels.aggregatedGeometryGraphicsColor} .color=${s.toCss()} .disabled=${t}></calcite-swatch><calcite-popover .heading=${a.headings.setColor} .label=${a.headings.setColor} reference-element=geometry-color-swatch closable ${h(this.#s)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${s} @calciteColorPickerChange=${(i) => {
155
+ const r = i.target.value;
156
+ this.arcgisAggregatedGeometryGraphicsColorChange.emit(r);
157
+ }} .disabled=${t}></calcite-color-picker></calcite-popover></div>`;
158
+ }
159
+ #E() {
160
+ return l`<calcite-panel class="white-panel-background">${this.#e()}${this.#m()}</calcite-panel>`;
161
+ }
162
+ #m() {
163
+ return l`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`;
164
+ }
165
+ #F() {
166
+ return l`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`;
167
+ }
168
+ #k() {
169
+ const { _messages: e } = this;
170
+ return l`<calcite-list .label=${e.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${e.headings.features} @calciteListItemSelect=${() => this.isElementsSelected = !0}><calcite-chip .label=${e.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`;
171
+ }
172
+ #G(e) {
173
+ const { _messages: t } = this;
174
+ return l`<div class="functions-heading">${t.headings.functions}</div><calcite-table .caption=${t.labels.functionResults}>${e.filter((s) => s.networkAttributeName != null && s.result != null && s.functionType != null).map((s) => {
175
+ const { functionName: a, networkAttributeName: i, functionType: r, result: n } = s, c = a || `${i} ${r}`;
176
+ return l`<calcite-table-row><calcite-table-cell>${c}</calcite-table-cell><calcite-table-cell>${n}</calcite-table-cell></calcite-table-row>`;
160
177
  })}</calcite-table>`;
161
178
  }
162
- _renderTraceResultsHeading() {
163
- return i`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle ? i`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>` : null}</div>`;
179
+ #e() {
180
+ return l`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle ? l`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>` : null}</div>`;
164
181
  }
165
- _renderErrorLanding(e) {
166
- let t = e.message;
182
+ #x(e) {
183
+ const { _messages: t } = this;
184
+ let s = e.message;
167
185
  switch (e.details?.raw?.extendedCode) {
168
- case g.dirtyAreasDiscovered:
169
- t = this._messages.traceErrors.dirtyAreasDiscovered;
186
+ case u.dirtyAreasDiscovered:
187
+ s = t.traceErrors.dirtyAreasDiscovered;
170
188
  break;
171
- case g.noValidControllers:
172
- t = this._messages.traceErrors.noValidControllers;
189
+ case u.noValidControllers:
190
+ s = t.traceErrors.noValidControllers;
173
191
  break;
174
- case g.pathNotFound:
175
- t = this._messages.traceErrors.pathNotFound;
192
+ case u.pathNotFound:
193
+ s = t.traceErrors.pathNotFound;
176
194
  break;
177
195
  }
178
- return i`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${this._messages.traceFailedHeading}</div><div class="no-results-description">${this._messages.traceFailedDescription}</div><div class="no-results-description">${t}</div></div></calcite-panel>`;
196
+ return l`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${t.traceFailedHeading}</div><div class="no-results-description">${t.traceFailedDescription}</div><div class="no-results-description">${s}</div></div></calcite-panel>`;
179
197
  }
180
- _renderNoResultsLanding() {
181
- return i`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${this._messages.noResultsHeading}</div><div class="no-results-description">${this._messages.noResultsDescription}</div></div></calcite-panel>`;
198
+ #T() {
199
+ const { _messages: e } = this;
200
+ return l`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${e.noResultsHeading}</div><div class="no-results-description">${e.noResultsDescription}</div></div></calcite-panel>`;
182
201
  }
183
- _renderNoTraceLanding() {
184
- return i`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${this._messages.noTraceConfigHeading}</div><div class="no-results-description">${this._messages.noTraceConfigDescription}</div></div></calcite-panel>`;
202
+ #L() {
203
+ const { _messages: e } = this;
204
+ return l`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${e.noTraceConfigHeading}</div><div class="no-results-description">${e.noTraceConfigDescription}</div></div></calcite-panel>`;
185
205
  }
186
206
  }
187
- p("arcgis-utility-network-trace-results", T);
207
+ p("arcgis-utility-network-trace-results", k);
188
208
  export {
189
- T as ArcgisUtilityNetworkTraceResults
209
+ k as ArcgisUtilityNetworkTraceResults
190
210
  };