@arcgis/map-components 5.2.0-next.50 → 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.
- package/README.md +2 -2
- package/dist/cdn/4JAQPYHG.js +2 -0
- package/dist/cdn/7RN4FELN.js +2 -0
- package/dist/cdn/{TXPI3GGA.js → AIVVE6PW.js} +1 -1
- package/dist/cdn/{KBQRHXQ4.js → BCDL4T34.js} +1 -1
- package/dist/cdn/H5DDBPGU.js +2 -0
- package/dist/cdn/HFJDGHMV.js +2 -0
- package/dist/cdn/HGL6PAIG.js +2 -0
- package/dist/cdn/NWUV3BTR.js +2 -0
- package/dist/cdn/{6RSIIYYJ.js → QA56535U.js} +1 -1
- package/dist/cdn/U26MQUQF.js +2 -0
- package/dist/cdn/UOXJUYC7.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +14 -7
- package/dist/components/arcgis-paste/customElement.js +1 -4
- package/dist/components/arcgis-unit-radio-button-group/customElement.js +1 -4
- package/dist/components/arcgis-unit-select/customElement.js +1 -4
- package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +59 -53
- package/dist/components/arcgis-utility-network-subnetwork-info/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-subnetwork-info/customElement.js +12 -12
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +116 -105
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +199 -182
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +68 -67
- package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +26 -26
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +128 -108
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cdn/3BU2B6F7.js +0 -2
- package/dist/cdn/3HHUVV6D.js +0 -2
- package/dist/cdn/4GZ7DNJF.js +0 -2
- package/dist/cdn/CWFOZVE7.js +0 -2
- package/dist/cdn/J6ZHNOE2.js +0 -2
- package/dist/cdn/MUAJSX4F.js +0 -2
- package/dist/cdn/MUFXNQE3.js +0 -2
- package/dist/cdn/NKWXCVN3.js +0 -2
|
@@ -1,103 +1,109 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { LitElement as w, createEvent as
|
|
10
|
-
import { log as
|
|
11
|
-
import { html as
|
|
12
|
-
import { u } from "../../chunks/useT9n.js";
|
|
13
|
-
import {
|
|
14
|
-
const
|
|
15
|
-
class
|
|
2
|
+
import { c as l } from "../../chunks/runtime.js";
|
|
3
|
+
import c from "@arcgis/core/Color.js";
|
|
4
|
+
import p from "@arcgis/core/Graphic.js";
|
|
5
|
+
import n from "@arcgis/core/layers/GraphicsLayer.js";
|
|
6
|
+
import g from "@arcgis/core/symbols/SimpleFillSymbol.js";
|
|
7
|
+
import d from "@arcgis/core/symbols/SimpleLineSymbol.js";
|
|
8
|
+
import y from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
|
|
9
|
+
import { LitElement as w, createEvent as f, nothing as u } from "@arcgis/lumina";
|
|
10
|
+
import { log as r, composeMissingPropertyMessage as o } from "@arcgis/toolkit/log";
|
|
11
|
+
import { html as G } from "lit";
|
|
12
|
+
import { u as v } from "../../chunks/useT9n.js";
|
|
13
|
+
import { a as h, i as b } from "../../chunks/layer-utils.js";
|
|
14
|
+
const a = 12;
|
|
15
|
+
class C extends w {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(...arguments), this.
|
|
18
|
-
const e = this.geometry, { line: i, multipoint: r, polygon: c } = e;
|
|
19
|
-
this._graphics = [i, r, c].filter((t) => t != null).map((t) => this._makeGraphicFromGeometry(t)), this._graphicsLayer.addMany(this._graphics);
|
|
20
|
-
}, this._createGraphicsLayer = () => {
|
|
21
|
-
const e = this.view.map, i = this._graphicsLayerName, r = e.findLayerById(i);
|
|
22
|
-
if (r && L(r)) {
|
|
23
|
-
this._graphicsLayer = r;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
this._graphicsLayer = new l({
|
|
27
|
-
id: i,
|
|
28
|
-
listMode: "hide",
|
|
29
|
-
title: i
|
|
30
|
-
}), o(this.view, this._graphicsLayer);
|
|
31
|
-
}, this.hideGraphics = !1, this.graphicsColor = new p([255, 255, 0, 0.6]), this.autoDestroyDisabled = !1, this.arcgisHideGraphicsChange = _();
|
|
17
|
+
super(...arguments), this._messages = v({ blocking: !0 }), this.#t = "arcgis-utility-network-aggregated-geometry-graphics", this.#i = [], this.hideGraphics = !1, this.graphicsColor = new c([255, 255, 0, 0.6]), this.autoDestroyDisabled = !1, this.arcgisHideGraphicsChange = f();
|
|
32
18
|
}
|
|
33
19
|
static {
|
|
34
20
|
this.properties = { geometry: 0, hideGraphics: 5, graphicsColor: 0, view: 0, autoDestroyDisabled: 5 };
|
|
35
21
|
}
|
|
22
|
+
#e;
|
|
23
|
+
#t;
|
|
24
|
+
#i;
|
|
36
25
|
async destroy() {
|
|
37
|
-
this.view?.map && this
|
|
26
|
+
this.view?.map && this.#e && this.view.map.remove(this.#e), await this.manager.destroy();
|
|
38
27
|
}
|
|
39
28
|
connectedCallback() {
|
|
40
|
-
super.connectedCallback(), this.view && this
|
|
29
|
+
super.connectedCallback(), this.view && this.#e && h(this.view, this.#e);
|
|
41
30
|
}
|
|
42
31
|
load() {
|
|
43
|
-
!this.geometry || !this.view?.map || this
|
|
32
|
+
!this.geometry || !this.view?.map || this.#r();
|
|
44
33
|
}
|
|
45
34
|
willUpdate(e) {
|
|
46
|
-
if (e.has("graphicsColor") && this
|
|
35
|
+
if (e.has("graphicsColor") && this.#m(), e.has("geometry") && (this.#e?.removeAll(), this.#s()), e.has("view")) {
|
|
47
36
|
const i = e.get("view");
|
|
48
|
-
i?.map && this
|
|
37
|
+
i?.map && this.#e && (i.map.remove(this.#e), this.#r(), this.#s());
|
|
49
38
|
}
|
|
50
39
|
}
|
|
51
40
|
loaded() {
|
|
52
|
-
this.geometry ||
|
|
41
|
+
this.geometry || r("error", this, o("geometry")), this.view ? this.view.map || r("error", this, o("The property `view` was provided, but `view.map` is null. Cannot draw aggregated geometry.")) : r("error", this, o("view"));
|
|
53
42
|
}
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
#s() {
|
|
44
|
+
const e = this.geometry, { line: i, multipoint: t, polygon: m } = e;
|
|
45
|
+
this.#i = [i, t, m].filter((s) => s != null).map((s) => this.#h(s)), this.#e.addMany(this.#i);
|
|
56
46
|
}
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
#r() {
|
|
48
|
+
const e = this.view.map, i = this.#t, t = e.findLayerById(i);
|
|
49
|
+
if (t && b(t)) {
|
|
50
|
+
this.#e = t;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.#e = new n({
|
|
54
|
+
id: i,
|
|
55
|
+
listMode: "hide",
|
|
56
|
+
title: i
|
|
57
|
+
}), h(this.view, this.#e);
|
|
58
|
+
}
|
|
59
|
+
#a() {
|
|
60
|
+
this.hideGraphics = !this.hideGraphics, this.hideGraphics ? this.#e?.removeAll() : this.#e?.addMany(this.#i), this.arcgisHideGraphicsChange.emit(this.hideGraphics);
|
|
61
|
+
}
|
|
62
|
+
#h(e) {
|
|
63
|
+
return new p({
|
|
59
64
|
geometry: e,
|
|
60
|
-
symbol: this
|
|
65
|
+
symbol: this.#o(e)
|
|
61
66
|
});
|
|
62
67
|
}
|
|
63
|
-
|
|
68
|
+
#o(e) {
|
|
64
69
|
const i = this.graphicsColor;
|
|
65
70
|
switch (e.type) {
|
|
66
71
|
case "multipoint":
|
|
67
|
-
return new
|
|
72
|
+
return new y({
|
|
68
73
|
color: i,
|
|
69
|
-
size:
|
|
74
|
+
size: a,
|
|
70
75
|
outline: {
|
|
71
76
|
color: i,
|
|
72
77
|
width: 0
|
|
73
78
|
}
|
|
74
79
|
});
|
|
75
80
|
case "polygon":
|
|
76
|
-
return new
|
|
81
|
+
return new g({
|
|
77
82
|
color: i,
|
|
78
83
|
outline: {
|
|
79
84
|
color: i,
|
|
80
|
-
width:
|
|
85
|
+
width: a
|
|
81
86
|
}
|
|
82
87
|
});
|
|
83
88
|
case "polyline":
|
|
84
|
-
return new
|
|
89
|
+
return new d({
|
|
85
90
|
color: i,
|
|
86
|
-
width:
|
|
91
|
+
width: a
|
|
87
92
|
});
|
|
88
93
|
}
|
|
89
94
|
}
|
|
90
|
-
|
|
91
|
-
this
|
|
95
|
+
#m() {
|
|
96
|
+
this.#e?.graphics.forEach((e) => {
|
|
92
97
|
const i = e.geometry;
|
|
93
|
-
e.symbol = this
|
|
98
|
+
e.symbol = this.#o(i);
|
|
94
99
|
});
|
|
95
100
|
}
|
|
96
101
|
render() {
|
|
97
|
-
|
|
102
|
+
const { _messages: e } = this;
|
|
103
|
+
return G`<calcite-switch .checked=${!this.hideGraphics} .label=${e.labels.showGraphicsToggle} label-text-end=${e.showGraphics ?? u} @calciteSwitchChange=${this.#a}></calcite-switch>`;
|
|
98
104
|
}
|
|
99
105
|
}
|
|
100
|
-
|
|
106
|
+
l("arcgis-utility-network-aggregated-geometry", C);
|
|
101
107
|
export {
|
|
102
|
-
|
|
108
|
+
C as ArcgisUtilityNetworkAggregatedGeometry
|
|
103
109
|
};
|
|
@@ -25,5 +25,5 @@ export abstract class ArcgisUtilityNetworkSubnetworkInfo extends LitElement {
|
|
|
25
25
|
tier: string;
|
|
26
26
|
}; }>;
|
|
27
27
|
/** @required */
|
|
28
|
-
accessor
|
|
28
|
+
accessor namedTraceConfiguration: NamedTraceConfiguration | undefined;
|
|
29
29
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as l } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as c, html as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { u } from "../../chunks/useT9n.js";
|
|
6
|
-
import { log as
|
|
3
|
+
import { css as c, html as s } from "lit";
|
|
4
|
+
import { LitElement as u } from "@arcgis/lumina";
|
|
5
|
+
import { u as d } from "../../chunks/useT9n.js";
|
|
6
|
+
import { log as o, composeMissingPropertyMessage as n } from "@arcgis/toolkit/log";
|
|
7
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)}`;
|
|
8
|
-
class g extends
|
|
8
|
+
class g extends u {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this._messages =
|
|
10
|
+
super(...arguments), this._messages = d({ blocking: !0 });
|
|
11
11
|
}
|
|
12
12
|
static {
|
|
13
|
-
this.properties = {
|
|
13
|
+
this.properties = { namedTraceConfiguration: 0 };
|
|
14
14
|
}
|
|
15
15
|
static {
|
|
16
16
|
this.styles = m;
|
|
17
17
|
}
|
|
18
18
|
loaded() {
|
|
19
|
-
this.
|
|
19
|
+
this.namedTraceConfiguration || o("warn", this, n("namedTraceConfiguration"));
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
const { _messages: e,
|
|
22
|
+
const { _messages: e, namedTraceConfiguration: r } = this;
|
|
23
23
|
if (!r?.traceConfiguration)
|
|
24
|
-
return
|
|
24
|
+
return o("error", this, n("namedTraceConfig.traceConfiguration")), null;
|
|
25
25
|
const { domainNetworkName: a, tierName: i, targetTierName: t } = r.traceConfiguration;
|
|
26
|
-
return !a && !i && !t ? (
|
|
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
27
|
}
|
|
28
28
|
_renderKeyValuePair(e, r) {
|
|
29
|
-
return
|
|
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>`;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
l("arcgis-utility-network-subnetwork-info", g);
|
|
@@ -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
|
|
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
|
|
9
|
-
import
|
|
10
|
-
import { LitElement as
|
|
11
|
-
import { log as
|
|
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
|
|
14
|
-
import { l as
|
|
15
|
-
const
|
|
16
|
-
class
|
|
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
|
|
19
|
-
this
|
|
20
|
-
}, this
|
|
21
|
-
|
|
22
|
-
}, this
|
|
23
|
-
|
|
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.
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
45
|
+
return this.#i?.traceResultFeatures ?? [];
|
|
38
46
|
}
|
|
39
47
|
async destroy() {
|
|
40
|
-
this
|
|
48
|
+
this.#c(), this.#i?.destroy(), this.#e?.destroy(), await this.manager.destroy();
|
|
41
49
|
}
|
|
42
50
|
load() {
|
|
43
51
|
this.manager.onLifecycle(() => [
|
|
44
|
-
|
|
52
|
+
f(() => !this.#t.utilityNetwork, () => this._switchTab("input"))
|
|
45
53
|
]);
|
|
46
54
|
}
|
|
47
|
-
|
|
48
|
-
this._traceResult = void 0, this
|
|
55
|
+
#o() {
|
|
56
|
+
this._traceResult = void 0, this.#c(), this.#d();
|
|
49
57
|
}
|
|
50
|
-
|
|
51
|
-
if (!this
|
|
58
|
+
#g() {
|
|
59
|
+
if (!this.#e)
|
|
52
60
|
return;
|
|
53
|
-
const { traceLocations:
|
|
54
|
-
this._traceError = void 0, this._showNoStartingPointsWarning = !
|
|
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(
|
|
57
|
-
this._activeTab =
|
|
64
|
+
_switchTab(t) {
|
|
65
|
+
this._activeTab = t;
|
|
58
66
|
}
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
#u(t) {
|
|
68
|
+
const { _messages: e } = this;
|
|
69
|
+
switch (t) {
|
|
61
70
|
case "no-user-type-extension":
|
|
62
|
-
return
|
|
71
|
+
return e.errors.loadErrors.noUserTypeExtension;
|
|
63
72
|
case "no-utility-network":
|
|
64
|
-
return
|
|
73
|
+
return e.errors.loadErrors.noUtilityNetwork;
|
|
65
74
|
case "no-view":
|
|
66
|
-
return
|
|
75
|
+
return e.errors.loadErrors.noView;
|
|
67
76
|
case "sceneView-not-supported":
|
|
68
|
-
return
|
|
77
|
+
return e.errors.loadErrors.sceneViewNotSupported;
|
|
69
78
|
default:
|
|
70
|
-
return
|
|
79
|
+
return t;
|
|
71
80
|
}
|
|
72
81
|
}
|
|
73
|
-
|
|
74
|
-
this.
|
|
82
|
+
#c() {
|
|
83
|
+
this.#a.forEach((t) => t.remove()), this.#a = [];
|
|
75
84
|
}
|
|
76
|
-
|
|
77
|
-
this
|
|
85
|
+
#d() {
|
|
86
|
+
this.#i?.clearAggregatedGeometryGraphics();
|
|
78
87
|
}
|
|
79
|
-
|
|
80
|
-
const { _traceResult:
|
|
81
|
-
if (!
|
|
88
|
+
#p() {
|
|
89
|
+
const { _traceResult: t, view: e } = this, r = this.#t.utilityNetwork;
|
|
90
|
+
if (!r || !t?.elements || !e)
|
|
82
91
|
return;
|
|
83
|
-
|
|
84
|
-
const c =
|
|
85
|
-
const h =
|
|
86
|
-
if (
|
|
87
|
-
const p = Number(
|
|
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
|
|
95
|
-
this.
|
|
103
|
+
const l = c.highlight(i.objectIds);
|
|
104
|
+
this.#a.push(l);
|
|
96
105
|
});
|
|
97
106
|
}
|
|
98
|
-
async
|
|
99
|
-
const
|
|
100
|
-
if (!(
|
|
101
|
-
|
|
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
|
|
113
|
+
const r = this.#e?.traceLocations;
|
|
105
114
|
try {
|
|
106
|
-
this._traceResult = await this.
|
|
107
|
-
traceType:
|
|
108
|
-
traceConfiguration:
|
|
109
|
-
traceLocations:
|
|
110
|
-
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
|
|
113
|
-
} catch (
|
|
114
|
-
|
|
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
|
-
|
|
118
|
-
|
|
126
|
+
#y(t) {
|
|
127
|
+
t.stopPropagation(), this.arcgisHideGraphicsChange.emit(t.detail);
|
|
119
128
|
}
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
#f(t) {
|
|
130
|
+
t.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented && t.preventDefault();
|
|
122
131
|
}
|
|
123
|
-
|
|
124
|
-
|
|
132
|
+
#b(t) {
|
|
133
|
+
t.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit();
|
|
125
134
|
}
|
|
126
|
-
|
|
127
|
-
|
|
135
|
+
#w(t) {
|
|
136
|
+
t.stopPropagation(), this.arcgisTraceResultFeaturesReady.emit();
|
|
128
137
|
}
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
this.aggregatedGeometryGraphicsColor = new d(
|
|
138
|
+
#v(t) {
|
|
139
|
+
const e = t.detail;
|
|
140
|
+
this.aggregatedGeometryGraphicsColor = new d(e);
|
|
132
141
|
}
|
|
133
|
-
|
|
142
|
+
#T() {
|
|
134
143
|
this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1;
|
|
135
144
|
}
|
|
136
|
-
|
|
137
|
-
this.
|
|
145
|
+
#$() {
|
|
146
|
+
this.#t.utilityNetwork = this.#e?.selectedUtilityNetwork;
|
|
138
147
|
}
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
143
|
-
|
|
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
|
-
|
|
146
|
-
return u(`${this.el.id}__results-tab-item`,
|
|
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
|
-
|
|
149
|
-
const { _traceResult: e } = this,
|
|
150
|
-
return
|
|
151
|
-
this._switchTab("input"), this
|
|
152
|
-
}} .disabled=${!
|
|
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
|
-
|
|
155
|
-
const { loadError: e } = this
|
|
156
|
-
|
|
157
|
-
}} @arcgisSelectedNamedTraceConfigurationChange=${this
|
|
158
|
-
return u(`${this.el.id}__inputs-tab-item`,
|
|
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
|
-
|
|
161
|
-
const { state:
|
|
171
|
+
#S() {
|
|
172
|
+
const { state: t } = this;
|
|
162
173
|
if (this._mode !== "default")
|
|
163
174
|
return null;
|
|
164
|
-
const
|
|
165
|
-
return
|
|
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:
|
|
169
|
-
return
|
|
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",
|
|
183
|
+
m("arcgis-utility-network-trace-analysis", x);
|
|
173
184
|
export {
|
|
174
|
-
|
|
185
|
+
x as ArcgisUtilityNetworkTraceAnalysis
|
|
175
186
|
};
|