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

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 (47) hide show
  1. package/README.md +2 -2
  2. package/dist/cdn/4JAQPYHG.js +2 -0
  3. package/dist/cdn/{7L4FPBGQ.js → 6G7UWNCY.js} +1 -1
  4. package/dist/cdn/7RN4FELN.js +2 -0
  5. package/dist/cdn/{TXPI3GGA.js → AIVVE6PW.js} +1 -1
  6. package/dist/cdn/{KBQRHXQ4.js → BCDL4T34.js} +1 -1
  7. package/dist/cdn/H5DDBPGU.js +2 -0
  8. package/dist/cdn/HFJDGHMV.js +2 -0
  9. package/dist/cdn/HGL6PAIG.js +2 -0
  10. package/dist/cdn/NWUV3BTR.js +2 -0
  11. package/dist/cdn/{JUBO5HRV.js → PGKGXEJ7.js} +1 -1
  12. package/dist/cdn/{6RSIIYYJ.js → QA56535U.js} +1 -1
  13. package/dist/cdn/SDBR2UYJ.js +2 -0
  14. package/dist/cdn/U26MQUQF.js +2 -0
  15. package/dist/cdn/UOXJUYC7.js +2 -0
  16. package/dist/cdn/index.js +1 -1
  17. package/dist/chunks/useArcgisViewReadyError.js +14 -7
  18. package/dist/components/arcgis-multi-feature-form/customElement.d.ts +9 -7
  19. package/dist/components/arcgis-multi-feature-form/customElement.js +98 -21
  20. package/dist/components/arcgis-paste/customElement.js +1 -1
  21. package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +59 -53
  22. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.d.ts +1 -1
  23. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.js +12 -12
  24. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +116 -105
  25. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +199 -182
  26. package/dist/components/arcgis-utility-network-trace-location/customElement.js +68 -67
  27. package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +26 -26
  28. package/dist/components/arcgis-utility-network-trace-results/customElement.js +128 -108
  29. package/dist/docs/api.json +1 -1
  30. package/dist/docs/docs.json +1 -1
  31. package/dist/docs/vscode.html-custom-data.json +1 -1
  32. package/dist/docs/web-types.json +1 -1
  33. package/dist/loader.js +2 -2
  34. package/dist/types/lumina.d.ts +2 -2
  35. package/dist/types/preact.d.ts +2 -2
  36. package/dist/types/react.d.ts +2 -2
  37. package/dist/types/stencil.d.ts +2 -2
  38. package/package.json +4 -4
  39. package/dist/cdn/3BU2B6F7.js +0 -2
  40. package/dist/cdn/3HHUVV6D.js +0 -2
  41. package/dist/cdn/4GZ7DNJF.js +0 -2
  42. package/dist/cdn/CWFOZVE7.js +0 -2
  43. package/dist/cdn/J6ZHNOE2.js +0 -2
  44. package/dist/cdn/MUAJSX4F.js +0 -2
  45. package/dist/cdn/MUFXNQE3.js +0 -2
  46. package/dist/cdn/NKWXCVN3.js +0 -2
  47. package/dist/cdn/WMUI4UFI.js +0 -2
@@ -1,175 +1,186 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as m } from "../../chunks/runtime.js";
3
- import { css as _, html as s } from "lit";
3
+ import { css as y, html as a } from "lit";
4
4
  import { ref as g } from "lit/directives/ref.js";
5
5
  import { keyed as u } from "lit/directives/keyed.js";
6
6
  import d from "@arcgis/core/Color.js";
7
7
  import "@arcgis/core/core/Error.js";
8
- import { when as y } from "@arcgis/core/core/reactiveUtils.js";
9
- import f from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
10
- import { LitElement as b, createEvent as n } from "@arcgis/lumina";
11
- import { log as w } from "@arcgis/toolkit/log";
8
+ import { when as f } from "@arcgis/core/core/reactiveUtils.js";
9
+ import b from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
10
+ import { LitElement as w, createEvent as o } from "@arcgis/lumina";
11
+ import { log as v } from "@arcgis/toolkit/log";
12
12
  import { u as T } from "../../chunks/useT9n.js";
13
- import { m as v } from "../../chunks/useViewModel.js";
14
- import { l as R } from "../../chunks/async-utils.js";
15
- const $ = _`: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 = v(f);
16
- class E extends b {
13
+ import { m as $ } from "../../chunks/useViewModel.js";
14
+ import { l as _ } from "../../chunks/async-utils.js";
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
+ class x extends w {
17
17
  constructor() {
18
- super(...arguments), this._messages = T({ blocking: !0 }), this._viewModel = C(this), this._highlightHandles = [], this._handleRunTraceButtonClick = () => {
19
- this._setTraceWarnings(), !(this._showNoStartingPointsWarning || this._showMissingTerminalWarning) && (this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1, this._clearTraceResult(), this._switchTab("results"), this._runTrace());
20
- }, this._handleTraceInputsRefChange = (e) => {
21
- e && (this._traceInputsElement = e);
22
- }, this._handleTraceResultsRefChange = (e) => {
23
- e && (this._traceResultsElement = e);
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._viewModel.state, this.view = this._viewModel.view, this.arcgisHideGraphicsChange = n(), this.arcgisReady = n(), this.arcgisTraceLocationSelectEnd = n(), this.arcgisTraceLocationSelectStart = n(), this.arcgisTraceResultClear = n(), this.arcgisTraceResultFeaturesReady = n();
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();
25
25
  }
26
26
  static {
27
27
  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 };
28
28
  }
29
29
  static {
30
- this.styles = $;
31
- }
32
- get _allLayersAndTables() {
33
- const { view: e } = this;
34
- return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
35
- }
30
+ this.styles = R;
31
+ }
32
+ #t;
33
+ #e;
34
+ #i;
35
+ get #l() {
36
+ const { view: t } = this;
37
+ return t?.map ? t.map.allLayers.toArray().concat(t.map.allTables.toArray()) : [];
38
+ }
39
+ #h;
40
+ #a;
41
+ #s;
42
+ #r;
43
+ #n;
36
44
  get traceResultFeatures() {
37
- return this._traceResultsElement?.traceResultFeatures ?? [];
45
+ return this.#i?.traceResultFeatures ?? [];
38
46
  }
39
47
  async destroy() {
40
- this._clearHighlights(), this._traceResultsElement?.destroy(), this._traceInputsElement?.destroy(), await this.manager.destroy();
48
+ this.#c(), this.#i?.destroy(), this.#e?.destroy(), await this.manager.destroy();
41
49
  }
42
50
  load() {
43
51
  this.manager.onLifecycle(() => [
44
- y(() => !this._viewModel.utilityNetwork, () => this._switchTab("input"))
52
+ f(() => !this.#t.utilityNetwork, () => this._switchTab("input"))
45
53
  ]);
46
54
  }
47
- _clearTraceResult() {
48
- this._traceResult = void 0, this._clearHighlights(), this._clearAggregatedGeometryGraphics();
55
+ #o() {
56
+ this._traceResult = void 0, this.#c(), this.#d();
49
57
  }
50
- _setTraceWarnings() {
51
- if (!this._traceInputsElement)
58
+ #g() {
59
+ if (!this.#e)
52
60
  return;
53
- const { traceLocations: e, traceLocationFlagInfos: t, traceConfiguration: i, isSubnetworkNameTraceSelected: a } = this._traceInputsElement, l = !!i?.subnetworkName, c = e?.some((r) => r.type === "starting-point"), o = t?.some((r) => !!r.flagProperties.terminalConfiguration && !r.flagProperties.selectedTerminals?.size) ?? !1;
54
- this._traceError = void 0, this._showNoStartingPointsWarning = !a && !c || a && !l, this._showMissingTerminalWarning = o;
61
+ 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
+ this._traceError = void 0, this._showNoStartingPointsWarning = !s && !c || s && !i, this._showMissingTerminalWarning = l;
55
63
  }
56
- _switchTab(e) {
57
- this._activeTab = e;
64
+ _switchTab(t) {
65
+ this._activeTab = t;
58
66
  }
59
- _getLoadError(e) {
60
- switch (e) {
67
+ #u(t) {
68
+ const { _messages: e } = this;
69
+ switch (t) {
61
70
  case "no-user-type-extension":
62
- return this._messages.errors.loadErrors.noUserTypeExtension;
71
+ return e.errors.loadErrors.noUserTypeExtension;
63
72
  case "no-utility-network":
64
- return this._messages.errors.loadErrors.noUtilityNetwork;
73
+ return e.errors.loadErrors.noUtilityNetwork;
65
74
  case "no-view":
66
- return this._messages.errors.loadErrors.noView;
75
+ return e.errors.loadErrors.noView;
67
76
  case "sceneView-not-supported":
68
- return this._messages.errors.loadErrors.sceneViewNotSupported;
77
+ return e.errors.loadErrors.sceneViewNotSupported;
69
78
  default:
70
- return e;
79
+ return t;
71
80
  }
72
81
  }
73
- _clearHighlights() {
74
- this._highlightHandles.forEach((e) => e.remove()), this._highlightHandles = [];
82
+ #c() {
83
+ this.#a.forEach((t) => t.remove()), this.#a = [];
75
84
  }
76
- _clearAggregatedGeometryGraphics() {
77
- this._traceResultsElement?.clearAggregatedGeometryGraphics();
85
+ #d() {
86
+ this.#i?.clearAggregatedGeometryGraphics();
78
87
  }
79
- _highlightResults() {
80
- const { _traceResult: e, view: t } = this, i = this._viewModel.utilityNetwork;
81
- if (!i || !e?.elements || !t)
88
+ #p() {
89
+ const { _traceResult: t, view: e } = this, r = this.#t.utilityNetwork;
90
+ if (!r || !t?.elements || !e)
82
91
  return;
83
- i.getObjectIdsFromElements(e.elements).forEach((l) => {
84
- const c = t.allLayerViews.find((r) => {
85
- const h = r.layer;
86
- if (i.isUtilityLayer(h)) {
87
- const p = Number(l.layerUrl.split("/").pop());
92
+ r.getObjectIdsFromElements(t.elements).forEach((i) => {
93
+ const c = e.allLayerViews.find((n) => {
94
+ const h = n.layer;
95
+ if (r.isUtilityLayer(h)) {
96
+ const p = Number(i.layerUrl.split("/").pop());
88
97
  return h.layerId === p;
89
98
  }
90
99
  return !1;
91
100
  });
92
101
  if (!c)
93
102
  return;
94
- const o = c.highlight(l.objectIds);
95
- this._highlightHandles.push(o);
103
+ const l = c.highlight(i.objectIds);
104
+ this.#a.push(l);
96
105
  });
97
106
  }
98
- async _runTrace() {
99
- const e = this._traceInputsElement?.selectedNamedTraceConfiguration, t = this._traceInputsElement?.traceConfiguration;
100
- if (!(e?.traceType && t)) {
101
- w("error", this, "Trace configuration not found");
107
+ async #m() {
108
+ const t = this.#e?.selectedNamedTraceConfiguration, e = this.#e?.traceConfiguration;
109
+ if (!(t?.traceType && e)) {
110
+ v("error", this, "Trace configuration not found");
102
111
  return;
103
112
  }
104
- const i = this._traceInputsElement?.traceLocations;
113
+ const r = this.#e?.traceLocations;
105
114
  try {
106
- this._traceResult = await this._viewModel.executeTraceConfiguration({
107
- traceType: e.traceType,
108
- traceConfiguration: t,
109
- traceLocations: i ?? [],
110
- resultTypes: e.resultTypes,
115
+ this._traceResult = await this.#t.executeTraceConfiguration({
116
+ traceType: t.traceType,
117
+ traceConfiguration: e,
118
+ traceLocations: r ?? [],
119
+ resultTypes: t.resultTypes,
111
120
  outSpatialReference: this.view?.spatialReference
112
- }), this.disableHighlightFeatureResults || this._highlightResults();
113
- } catch (a) {
114
- R(a, this, "Error while running trace"), this._traceError = a, this._traceResult = void 0;
121
+ }), this.disableHighlightFeatureResults || this.#p();
122
+ } catch (s) {
123
+ _(s, this, "Error while running trace"), this._traceError = s, this._traceResult = void 0;
115
124
  }
116
125
  }
117
- _handleHideGraphicsChange(e) {
118
- e.stopPropagation(), this.arcgisHideGraphicsChange.emit(e.detail);
126
+ #y(t) {
127
+ t.stopPropagation(), this.arcgisHideGraphicsChange.emit(t.detail);
119
128
  }
120
- _handleTraceLocationSelectStart(e) {
121
- e.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented && e.preventDefault();
129
+ #f(t) {
130
+ t.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented && t.preventDefault();
122
131
  }
123
- _handleTraceLocationSelectEnd(e) {
124
- e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit();
132
+ #b(t) {
133
+ t.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit();
125
134
  }
126
- _handleTraceResultFeaturesReady(e) {
127
- e.stopPropagation(), this.arcgisTraceResultFeaturesReady.emit();
135
+ #w(t) {
136
+ t.stopPropagation(), this.arcgisTraceResultFeaturesReady.emit();
128
137
  }
129
- _handleAggregatedGeometryGraphicsColorChange(e) {
130
- const t = e.detail;
131
- this.aggregatedGeometryGraphicsColor = new d(t);
138
+ #v(t) {
139
+ const e = t.detail;
140
+ this.aggregatedGeometryGraphicsColor = new d(e);
132
141
  }
133
- _handleSelectedNamedTraceConfigurationChange() {
142
+ #T() {
134
143
  this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1;
135
144
  }
136
- _handleUtilityNetworkChange() {
137
- this._viewModel.utilityNetwork = this._traceInputsElement?.selectedUtilityNetwork;
145
+ #$() {
146
+ this.#t.utilityNetwork = this.#e?.selectedUtilityNetwork;
138
147
  }
139
- _renderMissingTerminalWarning() {
140
- return s`<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>${this._messages.errors.missingTerminalTitle}</div><div slot=message>${this._messages.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`;
148
+ #_() {
149
+ const { _messages: t } = this;
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>`;
141
151
  }
142
- _renderNoStartingPointsWarning() {
143
- return s`<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>${this._messages.errors.noStartingPointsTitle}</div><div slot=message>${this._messages.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`;
152
+ #R() {
153
+ const { _messages: t } = this;
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>`;
144
155
  }
145
- _renderResultsTab() {
146
- return u(`${this.el.id}__results-tab-item`, s`<calcite-tab .selected=${this._activeTab === "results"}>${this.state === "executing" ? s`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>` : s`<arcgis-utility-network-trace-results .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this._allLayersAndTables} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceConfigTitle=${this._selectedNamedTraceConfiguration?.title} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this._viewModel.utilityNetwork ?? void 0} .view=${this.view ?? void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this._handleAggregatedGeometryGraphicsColorChange} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} @arcgisTraceResultFeaturesReady=${this._handleTraceResultFeaturesReady} ${g(this._handleTraceResultsRefChange)}></arcgis-utility-network-trace-results>`}</calcite-tab>`);
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>`);
147
158
  }
148
- _renderResultsFooter() {
149
- const { _traceResult: e } = this, i = !!(e?.elements.length || e?.globalFunctionResults.length || e?.aggregatedGeometry) && this._traceResultsElement?.state === "ready", a = this._traceResultsElement?.numResults ?? 0;
150
- return s`<calcite-button appearance=outline width=full @click=${() => {
151
- this._switchTab("input"), this._clearTraceResult(), this.arcgisTraceResultClear.emit();
152
- }} .disabled=${!i} slot=footer>${a > 0 && !this.hideFeatureResults && this.state !== "executing" ? this._messages.buttons.clearResultsCustom.replace("{number}", a.toString()) : this._messages.buttons.clearResultsGeneric}</calcite-button>`;
159
+ #x() {
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
+ return a`<calcite-button appearance=outline width=full @click=${() => {
162
+ this._switchTab("input"), this.#o(), this.arcgisTraceResultClear.emit();
163
+ }} .disabled=${!s} slot=footer>${i > 0 && !this.hideFeatureResults && this.state !== "executing" ? t.buttons.clearResultsCustom.replace("{number}", i.toString()) : t.buttons.clearResultsGeneric}</calcite-button>`;
153
164
  }
154
- _renderInputTab() {
155
- const { loadError: e } = this._viewModel, i = (e === "no-user-type-extension" || e === "sceneView-not-supported" ? s`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this._getLoadError(e)}</div></calcite-notice>` : void 0) ?? s`${this._showNoStartingPointsWarning && this._mode === "default" && this._renderNoStartingPointsWarning() || ""}${this._showMissingTerminalWarning && this._mode === "default" && this._renderMissingTerminalWarning() || ""}<arcgis-utility-network-trace-inputs .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view ?? void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${(a) => {
156
- a.stopPropagation(), a.detail.name === "mode" && (this._mode = a.target.mode);
157
- }} @arcgisSelectedNamedTraceConfigurationChange=${this._handleSelectedNamedTraceConfigurationChange} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisUtilityNetworkChange=${this._handleUtilityNetworkChange} ${g(this._handleTraceInputsRefChange)}></arcgis-utility-network-trace-inputs>`;
158
- return u(`${this.el.id}__inputs-tab-item`, s`<calcite-tab .selected=${this._activeTab === "input"}><div class="inputs-tab-container">${i}</div></calcite-tab>`);
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) => {
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>`;
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>`);
159
170
  }
160
- _renderInputFooter() {
161
- const { state: e } = this;
171
+ #S() {
172
+ const { state: t } = this;
162
173
  if (this._mode !== "default")
163
174
  return null;
164
- const t = e === "disabled" || e === "loading" || !this._traceInputsElement?.traceConfiguration;
165
- return s`<calcite-button appearance=solid width=full @click=${this._handleRunTraceButtonClick} slot=footer .disabled=${t}>${this._messages.buttons.getResults}</calcite-button>`;
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>`;
166
177
  }
167
178
  render() {
168
- const { _activeTab: e, state: t } = this;
169
- return s`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${() => this._switchTab("input")} .selected=${e === "input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${() => this._switchTab("results")} .selected=${e === "results"} .disabled=${t === "disabled" || t === "loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this._renderInputTab()}${this._renderResultsTab()}</calcite-tabs>${e === "input" ? this._renderInputFooter() : null}${e === "results" ? this._renderResultsFooter() : null}</calcite-panel>`;
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>`;
170
181
  }
171
182
  }
172
- m("arcgis-utility-network-trace-analysis", E);
183
+ m("arcgis-utility-network-trace-analysis", x);
173
184
  export {
174
- E as ArcgisUtilityNetworkTraceAnalysis
185
+ x as ArcgisUtilityNetworkTraceAnalysis
175
186
  };