@arcgis/map-components 5.2.0-next.44 → 5.2.0-next.45
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/dist/cdn/{UYCPX64L.js → 35EU7G2H.js} +1 -1
- package/dist/cdn/3BU2B6F7.js +2 -0
- package/dist/cdn/3HHUVV6D.js +2 -0
- package/dist/cdn/{OENFGUIN.js → 5KMBHKTM.js} +1 -1
- package/dist/cdn/CWFOZVE7.js +2 -0
- package/dist/cdn/J6ZHNOE2.js +2 -0
- package/dist/cdn/MUAJSX4F.js +2 -0
- package/dist/cdn/MUFXNQE3.js +2 -0
- package/dist/cdn/{JXHS44R7.js → NXOZVS4Z.js} +1 -1
- package/dist/cdn/{DAEEPAST.js → OW2CJGSF.js} +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/unit-select/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/layer-utils.js +3 -3
- package/dist/components/arcgis-daylight/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +4 -2
- package/dist/components/arcgis-feature-templates/customElement.js +1 -1
- package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +1 -1
- package/dist/components/arcgis-feature-utility-network-associations/customElement.js +11 -11
- package/dist/components/arcgis-unit-radio-button-group/customElement.js +10 -7
- package/dist/components/arcgis-unit-select/customElement.js +6 -3
- package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.d.ts +0 -2
- package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +15 -18
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +58 -59
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +17 -9
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +125 -126
- package/dist/components/arcgis-utility-network-trace-location/customElement.d.ts +34 -29
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +128 -127
- package/dist/components/arcgis-utility-network-trace-location-list/customElement.d.ts +6 -4
- package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +31 -32
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +10 -9
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +22 -22
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +3 -3
- package/dist/types/lumina.d.ts +4 -5
- package/dist/types/preact.d.ts +4 -5
- package/dist/types/react.d.ts +4 -5
- package/dist/types/stencil.d.ts +4 -5
- package/package.json +4 -4
- package/dist/cdn/3AKY7DQG.js +0 -2
- package/dist/cdn/BIZFPS3V.js +0 -2
- package/dist/cdn/CNV6ALQO.js +0 -2
- package/dist/cdn/DNSZMLAX.js +0 -2
- package/dist/cdn/HKEXPCDW.js +0 -2
- package/dist/cdn/JQ35LUF5.js +0 -2
|
@@ -22,15 +22,18 @@ class y extends m {
|
|
|
22
22
|
render() {
|
|
23
23
|
const {
|
|
24
24
|
messages: t,
|
|
25
|
-
options:
|
|
25
|
+
options: i = [],
|
|
26
26
|
// when running in the CI, sometimes this ends up being `undefined`, for unclear reasons.
|
|
27
27
|
selectLabel: s,
|
|
28
|
-
value:
|
|
28
|
+
value: l,
|
|
29
29
|
arcgisUnitSelectChange: c
|
|
30
30
|
} = this;
|
|
31
31
|
return a`<calcite-label class="root" .layout=${this.layout} .scale=${this.scale}>${s}<calcite-select .label=${s} @calciteSelectChange=${(e) => {
|
|
32
32
|
c.emit(e.target.value);
|
|
33
|
-
}} .scale=${this.scale}>${o(
|
|
33
|
+
}} .scale=${this.scale}>${o(i, (e) => e, (e) => a`<calcite-option .selected=${e === l} .value=${e}>${g(e) ? t.systems?.[e] : (
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
35
|
+
t.units?.[e]
|
|
36
|
+
)}</calcite-option>`)}</calcite-select></calcite-label>`;
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
r("arcgis-unit-select", y);
|
|
@@ -9,9 +9,7 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
|
9
9
|
* This is a sub-component used by the **ArcgisUtilityNetworkTraceAnalysis** component.
|
|
10
10
|
*
|
|
11
11
|
* This sub-component renders the aggregated geometry from a `TraceResult` on a view.
|
|
12
|
-
* The component does not project the geometry on the client.
|
|
13
12
|
* This sub-component also renders a "Show graphics" toggle which shows or hides the aggregated geometry graphics.
|
|
14
|
-
*
|
|
15
13
|
* The user can specify a color to render the aggregated geometry graphics in.
|
|
16
14
|
*
|
|
17
15
|
* The map layer with the aggregated geometry graphics is removed on component disconnect.
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as m } from "../../chunks/runtime.js";
|
|
3
3
|
import p from "@arcgis/core/Color.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import g from "@arcgis/core/Graphic.js";
|
|
5
|
+
import l from "@arcgis/core/layers/GraphicsLayer.js";
|
|
6
6
|
import y from "@arcgis/core/symbols/SimpleFillSymbol.js";
|
|
7
7
|
import n from "@arcgis/core/symbols/SimpleLineSymbol.js";
|
|
8
8
|
import d from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
|
|
9
|
-
import { LitElement as w, createEvent as _, nothing as
|
|
9
|
+
import { LitElement as w, createEvent as _, nothing as G } from "@arcgis/lumina";
|
|
10
10
|
import { log as s, composeMissingPropertyMessage as a } from "@arcgis/toolkit/log";
|
|
11
|
-
import {
|
|
12
|
-
import { u
|
|
13
|
-
import {
|
|
14
|
-
const
|
|
15
|
-
class
|
|
11
|
+
import { html as f } from "lit";
|
|
12
|
+
import { u } from "../../chunks/useT9n.js";
|
|
13
|
+
import { i as L, a as o } from "../../chunks/layer-utils.js";
|
|
14
|
+
const h = 12;
|
|
15
|
+
class v extends w {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(...arguments), this._graphicsLayerName = "arcgis-utility-network-aggregated-geometry-graphics", this._messages =
|
|
17
|
+
super(...arguments), this._graphicsLayerName = "arcgis-utility-network-aggregated-geometry-graphics", this._messages = u({ blocking: !0 }), this._graphics = [], this._addAggregatedGeometryToView = () => {
|
|
18
18
|
const e = this.geometry, { line: i, multipoint: r, polygon: c } = e;
|
|
19
19
|
this._graphics = [i, r, c].filter((t) => t != null).map((t) => this._makeGraphicFromGeometry(t)), this._graphicsLayer.addMany(this._graphics);
|
|
20
20
|
}, this._createGraphicsLayer = () => {
|
|
21
21
|
const e = this.view.map, i = this._graphicsLayerName, r = e.findLayerById(i);
|
|
22
|
-
if (r &&
|
|
22
|
+
if (r && L(r)) {
|
|
23
23
|
this._graphicsLayer = r;
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
this._graphicsLayer = new
|
|
26
|
+
this._graphicsLayer = new l({
|
|
27
27
|
id: i,
|
|
28
28
|
listMode: "hide",
|
|
29
29
|
title: i
|
|
@@ -33,9 +33,6 @@ class S extends w {
|
|
|
33
33
|
static {
|
|
34
34
|
this.properties = { geometry: 0, hideGraphics: 5, graphicsColor: 0, view: 0, autoDestroyDisabled: 5 };
|
|
35
35
|
}
|
|
36
|
-
static {
|
|
37
|
-
this.styles = b;
|
|
38
|
-
}
|
|
39
36
|
async destroy() {
|
|
40
37
|
this.view?.map && this._graphicsLayer && this.view.map.remove(this._graphicsLayer), await this.manager.destroy();
|
|
41
38
|
}
|
|
@@ -58,7 +55,7 @@ class S extends w {
|
|
|
58
55
|
this.hideGraphics = !this.hideGraphics, this.hideGraphics ? this._graphicsLayer?.removeAll() : this._graphicsLayer?.addMany(this._graphics), this.arcgisHideGraphicsChange.emit(this.hideGraphics);
|
|
59
56
|
}
|
|
60
57
|
_makeGraphicFromGeometry(e) {
|
|
61
|
-
return new
|
|
58
|
+
return new g({
|
|
62
59
|
geometry: e,
|
|
63
60
|
symbol: this._makeSymbolForGeometry(e)
|
|
64
61
|
});
|
|
@@ -97,10 +94,10 @@ class S extends w {
|
|
|
97
94
|
});
|
|
98
95
|
}
|
|
99
96
|
render() {
|
|
100
|
-
return
|
|
97
|
+
return f`<calcite-switch .checked=${!this.hideGraphics} .label=${this._messages.labels.showGraphicsToggle} label-text-end=${this._messages.showGraphics ?? G} @calciteSwitchChange=${this._handleShowGraphicsChange}></calcite-switch>`;
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
|
-
m("arcgis-utility-network-aggregated-geometry",
|
|
100
|
+
m("arcgis-utility-network-aggregated-geometry", v);
|
|
104
101
|
export {
|
|
105
|
-
|
|
102
|
+
v as ArcgisUtilityNetworkAggregatedGeometry
|
|
106
103
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
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 _, html as s } 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
|
|
12
|
-
import { u as
|
|
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";
|
|
12
|
+
import { u as T } from "../../chunks/useT9n.js";
|
|
13
13
|
import { m as v } from "../../chunks/useViewModel.js";
|
|
14
14
|
import { l as R } from "../../chunks/async-utils.js";
|
|
15
|
-
const $ =
|
|
16
|
-
class E extends
|
|
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 {
|
|
17
17
|
constructor() {
|
|
18
|
-
super(...arguments), this._messages =
|
|
19
|
-
this._setTraceWarnings(), !(this.
|
|
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
20
|
}, this._handleTraceInputsRefChange = (e) => {
|
|
21
21
|
e && (this._traceInputsElement = e);
|
|
22
22
|
}, this._handleTraceResultsRefChange = (e) => {
|
|
23
23
|
e && (this._traceResultsElement = e);
|
|
24
|
-
}, this.
|
|
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();
|
|
25
25
|
}
|
|
26
26
|
static {
|
|
27
|
-
this.properties = {
|
|
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
30
|
this.styles = $;
|
|
31
31
|
}
|
|
32
|
-
get
|
|
32
|
+
get _allLayersAndTables() {
|
|
33
33
|
const { view: e } = this;
|
|
34
34
|
return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
|
|
35
35
|
}
|
|
@@ -41,32 +41,31 @@ class E extends w {
|
|
|
41
41
|
}
|
|
42
42
|
load() {
|
|
43
43
|
this.manager.onLifecycle(() => [
|
|
44
|
-
|
|
44
|
+
y(() => !this._viewModel.utilityNetwork, () => this._switchTab("input"))
|
|
45
45
|
]);
|
|
46
46
|
}
|
|
47
47
|
_clearTraceResult() {
|
|
48
|
-
this.
|
|
48
|
+
this._traceResult = void 0, this._clearHighlights(), this._clearAggregatedGeometryGraphics();
|
|
49
49
|
}
|
|
50
50
|
_setTraceWarnings() {
|
|
51
51
|
if (!this._traceInputsElement)
|
|
52
52
|
return;
|
|
53
|
-
const { traceLocations: e, traceLocationFlagInfos: t,
|
|
54
|
-
this.
|
|
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;
|
|
55
55
|
}
|
|
56
56
|
_switchTab(e) {
|
|
57
|
-
this.
|
|
57
|
+
this._activeTab = e;
|
|
58
58
|
}
|
|
59
59
|
_getLoadError(e) {
|
|
60
|
-
const { _messages: t } = this;
|
|
61
60
|
switch (e) {
|
|
62
61
|
case "no-user-type-extension":
|
|
63
|
-
return
|
|
62
|
+
return this._messages.errors.loadErrors.noUserTypeExtension;
|
|
64
63
|
case "no-utility-network":
|
|
65
|
-
return
|
|
64
|
+
return this._messages.errors.loadErrors.noUtilityNetwork;
|
|
66
65
|
case "no-view":
|
|
67
|
-
return
|
|
66
|
+
return this._messages.errors.loadErrors.noView;
|
|
68
67
|
case "sceneView-not-supported":
|
|
69
|
-
return
|
|
68
|
+
return this._messages.errors.loadErrors.sceneViewNotSupported;
|
|
70
69
|
default:
|
|
71
70
|
return e;
|
|
72
71
|
}
|
|
@@ -78,41 +77,41 @@ class E extends w {
|
|
|
78
77
|
this._traceResultsElement?.clearAggregatedGeometryGraphics();
|
|
79
78
|
}
|
|
80
79
|
_highlightResults() {
|
|
81
|
-
const {
|
|
82
|
-
if (!
|
|
80
|
+
const { _traceResult: e, view: t } = this, i = this._viewModel.utilityNetwork;
|
|
81
|
+
if (!i || !e?.elements || !t)
|
|
83
82
|
return;
|
|
84
|
-
|
|
85
|
-
const c = t.allLayerViews.find((
|
|
86
|
-
const h =
|
|
87
|
-
if (
|
|
88
|
-
const p = Number(
|
|
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());
|
|
89
88
|
return h.layerId === p;
|
|
90
89
|
}
|
|
91
90
|
return !1;
|
|
92
91
|
});
|
|
93
92
|
if (!c)
|
|
94
93
|
return;
|
|
95
|
-
const o = c.highlight(
|
|
94
|
+
const o = c.highlight(l.objectIds);
|
|
96
95
|
this._highlightHandles.push(o);
|
|
97
96
|
});
|
|
98
97
|
}
|
|
99
98
|
async _runTrace() {
|
|
100
|
-
const e = this._traceInputsElement?.selectedNamedTraceConfiguration, t = this._traceInputsElement?.
|
|
99
|
+
const e = this._traceInputsElement?.selectedNamedTraceConfiguration, t = this._traceInputsElement?.traceConfiguration;
|
|
101
100
|
if (!(e?.traceType && t)) {
|
|
102
|
-
|
|
101
|
+
w("error", this, "Trace configuration not found");
|
|
103
102
|
return;
|
|
104
103
|
}
|
|
105
|
-
const
|
|
104
|
+
const i = this._traceInputsElement?.traceLocations;
|
|
106
105
|
try {
|
|
107
|
-
this.
|
|
106
|
+
this._traceResult = await this._viewModel.executeTraceConfiguration({
|
|
108
107
|
traceType: e.traceType,
|
|
109
108
|
traceConfiguration: t,
|
|
110
|
-
traceLocations:
|
|
109
|
+
traceLocations: i ?? [],
|
|
111
110
|
resultTypes: e.resultTypes,
|
|
112
111
|
outSpatialReference: this.view?.spatialReference
|
|
113
112
|
}), this.disableHighlightFeatureResults || this._highlightResults();
|
|
114
|
-
} catch (
|
|
115
|
-
R(
|
|
113
|
+
} catch (a) {
|
|
114
|
+
R(a, this, "Error while running trace"), this._traceError = a, this._traceResult = void 0;
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
117
|
_handleHideGraphicsChange(e) {
|
|
@@ -132,42 +131,42 @@ class E extends w {
|
|
|
132
131
|
this.aggregatedGeometryGraphicsColor = new d(t);
|
|
133
132
|
}
|
|
134
133
|
_handleSelectedNamedTraceConfigurationChange() {
|
|
135
|
-
this.
|
|
134
|
+
this._showNoStartingPointsWarning = !1, this._showMissingTerminalWarning = !1;
|
|
136
135
|
}
|
|
137
136
|
_handleUtilityNetworkChange() {
|
|
138
137
|
this._viewModel.utilityNetwork = this._traceInputsElement?.selectedUtilityNetwork;
|
|
139
138
|
}
|
|
140
|
-
|
|
141
|
-
return s`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${() => this.
|
|
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>`;
|
|
142
141
|
}
|
|
143
|
-
|
|
144
|
-
return s`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${() => this.
|
|
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>`;
|
|
145
144
|
}
|
|
146
|
-
|
|
147
|
-
return u(`${this.el.id}__results-tab-item`, s`<calcite-tab .selected=${this.
|
|
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>`);
|
|
148
147
|
}
|
|
149
|
-
|
|
150
|
-
const {
|
|
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;
|
|
151
150
|
return s`<calcite-button appearance=outline width=full @click=${() => {
|
|
152
151
|
this._switchTab("input"), this._clearTraceResult(), this.arcgisTraceResultClear.emit();
|
|
153
|
-
}} .disabled=${!
|
|
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>`;
|
|
154
153
|
}
|
|
155
|
-
|
|
156
|
-
const {
|
|
157
|
-
|
|
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);
|
|
158
157
|
}} @arcgisSelectedNamedTraceConfigurationChange=${this._handleSelectedNamedTraceConfigurationChange} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisUtilityNetworkChange=${this._handleUtilityNetworkChange} ${g(this._handleTraceInputsRefChange)}></arcgis-utility-network-trace-inputs>`;
|
|
159
|
-
return u(`${this.el.id}__inputs-tab-item`, s`<calcite-tab .selected=${this.
|
|
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>`);
|
|
160
159
|
}
|
|
161
|
-
|
|
162
|
-
const {
|
|
163
|
-
if (
|
|
160
|
+
_renderInputFooter() {
|
|
161
|
+
const { state: e } = this;
|
|
162
|
+
if (this._mode !== "default")
|
|
164
163
|
return null;
|
|
165
|
-
const
|
|
166
|
-
return s`<calcite-button appearance=solid width=full @click=${this._handleRunTraceButtonClick} slot=footer .disabled=${
|
|
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>`;
|
|
167
166
|
}
|
|
168
167
|
render() {
|
|
169
|
-
const {
|
|
170
|
-
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.
|
|
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>`;
|
|
171
170
|
}
|
|
172
171
|
}
|
|
173
172
|
m("arcgis-utility-network-trace-analysis", E);
|
|
@@ -13,8 +13,6 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* This is a sub-component used by the **ArcgisUtilityNetworkTraceAnalysis** component.
|
|
16
|
-
*
|
|
17
|
-
* This sub-component takes a map view as an input.
|
|
18
16
|
* It allows users to select utility networks, trace configurations, and input features for tracing.
|
|
19
17
|
*
|
|
20
18
|
* @since 4.34
|
|
@@ -131,15 +129,29 @@ export abstract class ArcgisUtilityNetworkTraceInputs extends LitElement {
|
|
|
131
129
|
*/
|
|
132
130
|
accessor hideActionBar: boolean;
|
|
133
131
|
/**
|
|
132
|
+
* Whether a the user has selected a named trace configuration that executes a
|
|
133
|
+
* subnetwork trace with a specified subnetwork name.
|
|
134
|
+
*
|
|
134
135
|
* @default false
|
|
135
136
|
* @internal
|
|
136
137
|
*/
|
|
137
138
|
get isSubnetworkNameTraceSelected(): boolean;
|
|
138
139
|
/** @default "default" */
|
|
139
140
|
accessor mode: UtilityNetworkTraceAnalysisDisplayMode;
|
|
141
|
+
/**
|
|
142
|
+
* By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
|
|
143
|
+
*
|
|
144
|
+
* @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component)
|
|
145
|
+
*/
|
|
140
146
|
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
141
147
|
accessor selectedNamedTraceConfiguration: NamedTraceConfiguration | undefined;
|
|
142
148
|
accessor selectedUtilityNetwork: UtilityNetwork | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* A clone of the utility network trace configuration associated with
|
|
151
|
+
* the selected named trace configuration. Updates on this object are
|
|
152
|
+
* used to reflect the user's changes to the named trace configuration.
|
|
153
|
+
*/
|
|
154
|
+
get traceConfiguration(): UNTraceConfiguration | undefined;
|
|
143
155
|
/**
|
|
144
156
|
* Supplementary information about the points selected on the map to run the trace.
|
|
145
157
|
* I.e., feature title, terminal configuration, selected terminals, and spatial properties.
|
|
@@ -149,19 +161,15 @@ export abstract class ArcgisUtilityNetworkTraceInputs extends LitElement {
|
|
|
149
161
|
get traceLocationFlagInfos(): Collection<FlagInfo>;
|
|
150
162
|
get traceLocations(): TraceLocation[];
|
|
151
163
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* used to reflect the user's changes to the named trace configuration.
|
|
164
|
+
* The view associated with the component.
|
|
165
|
+
* > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-utility-network-trace-inputs component will be associated with a map or scene component rather than using the `view` property.
|
|
155
166
|
*/
|
|
156
|
-
get unTraceConfiguration(): UNTraceConfiguration | undefined;
|
|
157
|
-
/** @required */
|
|
158
167
|
accessor view: MapView | undefined;
|
|
159
168
|
/** Permanently destroy the component. */
|
|
160
169
|
destroy(): Promise<void>;
|
|
161
170
|
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "mode"; }>;
|
|
162
171
|
/** Fires when the user changes the selected named trace configuration. */
|
|
163
172
|
readonly arcgisSelectedNamedTraceConfigurationChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
164
|
-
/** There will be more added to this event as we increase the functionality of this component */
|
|
165
173
|
readonly arcgisTraceInputsChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
166
174
|
/**
|
|
167
175
|
* Fires when the user completes the selection of a trace location.
|
|
@@ -176,7 +184,7 @@ export abstract class ArcgisUtilityNetworkTraceInputs extends LitElement {
|
|
|
176
184
|
* @internal
|
|
177
185
|
*/
|
|
178
186
|
readonly arcgisTraceLocationSelectStart: import("@arcgis/lumina").TargetedEvent<this, SelectStartPayload>;
|
|
179
|
-
/**
|
|
187
|
+
/** Fires when the user changes the selected utility network. */
|
|
180
188
|
readonly arcgisUtilityNetworkChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
181
189
|
readonly "@eventTypes": {
|
|
182
190
|
arcgisPropertyChange: ArcgisUtilityNetworkTraceInputs["arcgisPropertyChange"]["detail"];
|