@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
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as f } from "../../chunks/runtime.js";
|
|
3
3
|
import { ref as d } from "lit/directives/ref.js";
|
|
4
4
|
import c from "@arcgis/core/core/Collection.js";
|
|
5
|
-
import { watch as
|
|
6
|
-
import { substitute as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
5
|
+
import { watch as w } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
|
+
import { substitute as y } from "@arcgis/core/intl.js";
|
|
7
|
+
import k from "@arcgis/core/layers/GraphicsLayer.js";
|
|
8
|
+
import S from "@arcgis/core/networks/support/UNTraceConfiguration.js";
|
|
9
|
+
import T from "@arcgis/core/rest/networks/support/TraceLocation.js";
|
|
10
10
|
import m from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
|
|
11
|
-
import
|
|
12
|
-
import { LitElement as
|
|
13
|
-
import { usePropertyChange as
|
|
14
|
-
import { log as h, composeMissingPropertyMessage as
|
|
15
|
-
import { css as
|
|
16
|
-
import { u as
|
|
11
|
+
import N from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
|
|
12
|
+
import { LitElement as C, createEvent as l } from "@arcgis/lumina";
|
|
13
|
+
import { usePropertyChange as L } from "@arcgis/lumina/controllers";
|
|
14
|
+
import { log as h, composeMissingPropertyMessage as $, composeEmptyPropertyMessage as v } from "@arcgis/toolkit/log";
|
|
15
|
+
import { css as I, html as r } from "lit";
|
|
16
|
+
import { u as P } from "../../chunks/useT9n.js";
|
|
17
17
|
import { l as g } from "../../chunks/async-utils.js";
|
|
18
|
-
import {
|
|
19
|
-
const
|
|
20
|
-
class
|
|
18
|
+
import { a as E, i as p, c as F, q as _, b as x } from "../../chunks/layer-utils.js";
|
|
19
|
+
const U = I`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`, u = `utility-network-trace-inputs-sketch-${Date.now()}`, A = 20;
|
|
20
|
+
class D extends C {
|
|
21
21
|
constructor() {
|
|
22
|
-
super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages =
|
|
22
|
+
super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages = P({ blocking: !0 }), this._layerIdToLayer = /* @__PURE__ */ new Map(), this._startingPoints = new c(), this._barriers = new c(), this._stoppingPoints = new c(), this._subnetworkTraceTypes = /* @__PURE__ */ new Set([
|
|
23
23
|
"subnetwork",
|
|
24
24
|
"subnetwork-controller",
|
|
25
25
|
"upstream",
|
|
@@ -27,12 +27,12 @@ class M extends N {
|
|
|
27
27
|
"isolation"
|
|
28
28
|
]), this._setUpMap = () => {
|
|
29
29
|
if (this._error = void 0, !this.view?.map) {
|
|
30
|
-
this._error = this._messages.errors.noView, this.
|
|
30
|
+
this._error = this._messages.errors.noView, this._utilityNetworks = void 0;
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
const e = this.view.map;
|
|
34
34
|
this._setupUtilityNetworks(e), this._setupSketchViewModel(e);
|
|
35
|
-
}, this._hitTestPromise = null, this.
|
|
35
|
+
}, this._hitTestPromise = null, this._maxNumCandidateFeatures = 20, this._traceLocationStartingRefChange = (e) => {
|
|
36
36
|
e && (this._traceLocationStartingElement = e);
|
|
37
37
|
}, this._traceLocationBarrierRefChange = (e) => {
|
|
38
38
|
e && (this._traceLocationBarrierElement = e);
|
|
@@ -41,29 +41,29 @@ class M extends N {
|
|
|
41
41
|
}, this._featuresComponentRefChange = (e) => {
|
|
42
42
|
e && (this._featuresComponentElement = e);
|
|
43
43
|
}, this._handleFeaturesPropertyChange = ({ detail: e, target: t }) => {
|
|
44
|
-
(e.name === "selectedDrillInFeature" || e.name === "selectedFeature") && (this.
|
|
45
|
-
}, this.
|
|
44
|
+
(e.name === "selectedDrillInFeature" || e.name === "selectedFeature") && (this._selectedFeature = t.selectedDrillInFeature ?? t.selectedFeature ?? void 0);
|
|
45
|
+
}, this._candidateFeatures = [], this._compatibleSubnetworkNames = [], this._namedTraceConfigurations = [], this._subnetworkNamesState = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = L()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = l(), this.arcgisTraceInputsChange = l(), this.arcgisTraceLocationSelectEnd = l(), this.arcgisTraceLocationSelectStart = l(), this.arcgisUtilityNetworkChange = l();
|
|
46
46
|
}
|
|
47
47
|
static {
|
|
48
|
-
this.properties = {
|
|
48
|
+
this.properties = { _selectedFeature: 16, _candidateFeatures: 16, _compatibleSubnetworkNames: 16, _subnetworksTable: 16, _namedTraceConfigurations: 16, _utilityNetworks: 16, _traceConfiguration: 16, _error: 16, _subnetworkNamesState: 16, _activeTraceLocationType: 16, _exceedDisplayLimit: 16, beforeTraceLocationSelectStart: 0, view: 0, selectedUtilityNetwork: 0, selectedNamedTraceConfiguration: 0, autoDestroyDisabled: 5, hideActionBar: 5, traceConfiguration: 32, isSubnetworkNameTraceSelected: 32, referenceElement: 1, mode: 3, traceLocationFlagInfos: 32, traceLocations: 32 };
|
|
49
49
|
}
|
|
50
50
|
static {
|
|
51
|
-
this.styles =
|
|
51
|
+
this.styles = U;
|
|
52
52
|
}
|
|
53
|
-
get
|
|
54
|
-
return this.
|
|
53
|
+
get _selectedSubnetworkName() {
|
|
54
|
+
return this._traceConfiguration?.subnetworkName ?? void 0;
|
|
55
55
|
}
|
|
56
|
-
set
|
|
57
|
-
this.
|
|
56
|
+
set _selectedSubnetworkName(e) {
|
|
57
|
+
this._traceConfiguration && (this._traceConfiguration.subnetworkName = e);
|
|
58
58
|
}
|
|
59
|
-
get
|
|
59
|
+
get _allLayersAndTables() {
|
|
60
60
|
const { view: e } = this;
|
|
61
61
|
return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
|
|
62
62
|
}
|
|
63
|
-
get
|
|
63
|
+
get _showStartingPoints() {
|
|
64
64
|
return !this.isSubnetworkNameTraceSelected;
|
|
65
65
|
}
|
|
66
|
-
get
|
|
66
|
+
get _showStoppingPoints() {
|
|
67
67
|
const e = this.selectedNamedTraceConfiguration?.traceType;
|
|
68
68
|
return e === "path" || e === "circuit";
|
|
69
69
|
}
|
|
@@ -71,8 +71,8 @@ class M extends N {
|
|
|
71
71
|
const e = this.selectedUtilityNetwork?.dataElement?.domainNetworks;
|
|
72
72
|
return e ? e.map((t) => t.subnetworkLayerId).filter((t) => t != null && t > -1) : [];
|
|
73
73
|
}
|
|
74
|
-
get
|
|
75
|
-
return this.
|
|
74
|
+
get traceConfiguration() {
|
|
75
|
+
return this._traceConfiguration;
|
|
76
76
|
}
|
|
77
77
|
get isSubnetworkNameTraceSelected() {
|
|
78
78
|
const { selectedNamedTraceConfiguration: e } = this;
|
|
@@ -83,25 +83,25 @@ class M extends N {
|
|
|
83
83
|
}
|
|
84
84
|
get traceLocations() {
|
|
85
85
|
const e = [];
|
|
86
|
-
return this.
|
|
86
|
+
return this._showStartingPoints && this._startingPoints.forEach((t) => e.push(...this._createTraceLocations(t))), this._showStoppingPoints && this._stoppingPoints.forEach((t) => e.push(...this._createTraceLocations(t))), this._barriers.forEach((t) => e.push(...this._createTraceLocations(t))), e;
|
|
87
87
|
}
|
|
88
88
|
async destroy() {
|
|
89
|
-
this.
|
|
89
|
+
this._removeGraphicsLayerById(u), this._clearTraceLocations(), this._sketchViewModel?.cancel(), this._featuresComponentElement?.destroy(), this._traceLocationStartingElement?.destroy(), this._traceLocationBarrierElement?.destroy(), this._traceLocationStoppingElement?.destroy(), await this.manager.destroy();
|
|
90
90
|
}
|
|
91
91
|
load() {
|
|
92
92
|
this._setUpMap(), this.manager.onLifecycle(() => [
|
|
93
|
-
|
|
93
|
+
w(() => this.view?.map, () => this._setUpMap())
|
|
94
94
|
]);
|
|
95
95
|
}
|
|
96
96
|
willUpdate(e) {
|
|
97
|
-
e.has("
|
|
97
|
+
e.has("_utilityNetworks") && this._handleUtilityNetworksChange(), e.has("selectedUtilityNetwork") && (this.arcgisUtilityNetworkChange.emit(), this._handleSelectedUtilityNetworkChange()), e.has("selectedNamedTraceConfiguration") && (this.arcgisTraceInputsChange.emit(), this.arcgisSelectedNamedTraceConfigurationChange.emit(), this._handleTraceConfigChange());
|
|
98
98
|
}
|
|
99
99
|
disconnectedCallback() {
|
|
100
100
|
super.disconnectedCallback(), this._layerIdToLayer.clear();
|
|
101
101
|
}
|
|
102
102
|
_createTraceLocations(e) {
|
|
103
103
|
const t = e.flagProperties.selectedTerminals;
|
|
104
|
-
return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new
|
|
104
|
+
return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new T({
|
|
105
105
|
type: e.traceLocation.type,
|
|
106
106
|
isFilterBarrier: e.traceLocation.isFilterBarrier,
|
|
107
107
|
globalId: e.traceLocation.globalId,
|
|
@@ -118,32 +118,32 @@ class M extends N {
|
|
|
118
118
|
e.spatialProperties.flagGraphic && this.view?.graphics.remove(e.spatialProperties.flagGraphic);
|
|
119
119
|
}), this._stoppingPoints.removeAll();
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
_createGraphicsLayerById(e, t) {
|
|
122
122
|
if (!e.findLayerById(t)) {
|
|
123
|
-
const a = new
|
|
123
|
+
const a = new k({
|
|
124
124
|
id: t,
|
|
125
125
|
listMode: "hide",
|
|
126
126
|
title: t
|
|
127
127
|
});
|
|
128
|
-
|
|
128
|
+
E(this.view, a);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
_getGraphicsLayerById(e, t) {
|
|
132
132
|
const i = e.findLayerById(t);
|
|
133
|
-
return
|
|
133
|
+
return p(i) ? (e.reorder(i, e.layers.length - 1), i) : null;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
_removeGraphicsLayerById(e) {
|
|
136
136
|
if (!this.view?.map)
|
|
137
137
|
return;
|
|
138
138
|
const { map: t } = this.view, i = t?.findLayerById(e);
|
|
139
|
-
i &&
|
|
139
|
+
i && p(i) && t?.remove(i);
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
_setSnappingOptions() {
|
|
142
142
|
if (!this._sketchViewModel)
|
|
143
143
|
return;
|
|
144
144
|
const e = new c();
|
|
145
|
-
this.
|
|
146
|
-
|
|
145
|
+
this._utilityNetworkLayers?.forEach((t) => {
|
|
146
|
+
F(t) ? t.sublayers.forEach((i) => {
|
|
147
147
|
e.add(new m({
|
|
148
148
|
layer: i,
|
|
149
149
|
enabled: !0
|
|
@@ -158,40 +158,38 @@ class M extends N {
|
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
_initializeSketchViewModel(e) {
|
|
161
|
-
const { view: t } = this, i = this.
|
|
162
|
-
return new
|
|
161
|
+
const { view: t } = this, i = this._getGraphicsLayerById(e, u);
|
|
162
|
+
return new N({
|
|
163
163
|
layer: i,
|
|
164
164
|
view: t
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
_setupSketchViewModel(e) {
|
|
168
|
-
this.
|
|
168
|
+
this._createGraphicsLayerById(e, u), this._sketchViewModel = this._initializeSketchViewModel(e), this._setSnappingOptions();
|
|
169
169
|
}
|
|
170
170
|
_clearSubnetworks() {
|
|
171
|
-
this.
|
|
171
|
+
this._selectedSubnetworkName = void 0, this._subnetworksTable = void 0, this._compatibleSubnetworkNames = [];
|
|
172
172
|
}
|
|
173
173
|
async _loadSubnetworksTable() {
|
|
174
|
-
this.
|
|
174
|
+
this._subnetworksTable || (this._subnetworksTable = await this.selectedUtilityNetwork?.loadSubnetworksTable());
|
|
175
175
|
}
|
|
176
176
|
async _querySubnetworks() {
|
|
177
|
-
const {
|
|
177
|
+
const { _subnetworksTable: e } = this;
|
|
178
178
|
if (!e)
|
|
179
179
|
return;
|
|
180
|
-
const t = e.fieldsIndex.get("SUBNETWORKNAME"), i = (o, n,
|
|
180
|
+
const t = e.fieldsIndex.get("SUBNETWORKNAME"), i = (o, n, b) => n === 0 || o.getAttribute(t.name) !== b[n - 1].getAttribute(t.name), a = e.createQuery();
|
|
181
181
|
a.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, a.where = this._getSubnetworkQueryWhereClause(), a.outFields = [t.name], a.orderByFields = [t.name];
|
|
182
|
-
const { features: s } = await
|
|
183
|
-
this.
|
|
182
|
+
const { features: s } = await _(e, a, void 0, !1);
|
|
183
|
+
this._compatibleSubnetworkNames = s.filter(i).map((o) => o.getAttribute(t.name));
|
|
184
184
|
}
|
|
185
185
|
_getSubnetworkQueryWhereClause() {
|
|
186
|
-
const e = this.
|
|
186
|
+
const e = this._traceConfiguration, t = `DOMAINNETWORKNAME = '${e.domainNetworkName}'`, i = `TIERNAME = '${e.tierName}'`;
|
|
187
187
|
return [t, i].join(" AND ");
|
|
188
188
|
}
|
|
189
|
-
async
|
|
190
|
-
await this._loadSubnetworksTable(), await this._querySubnetworks();
|
|
191
|
-
const { compatibleSubnetworkNames: t } = this;
|
|
192
|
-
e.subnetworkName && !t.some((i) => i === e.subnetworkName) && (this.selectedSubnetworkName = t.at(0));
|
|
189
|
+
async _handleSubnetworkTraceConfigurationChange(e) {
|
|
190
|
+
await this._loadSubnetworksTable(), await this._querySubnetworks(), e.subnetworkName && !this._compatibleSubnetworkNames.some((t) => t === e.subnetworkName) && (this._selectedSubnetworkName = this._compatibleSubnetworkNames.at(0));
|
|
193
191
|
}
|
|
194
|
-
|
|
192
|
+
_selectTraceConfigurationByGlobalId(e) {
|
|
195
193
|
const t = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find((i) => i.globalId === e);
|
|
196
194
|
if (!t) {
|
|
197
195
|
h("error", this, "`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");
|
|
@@ -201,11 +199,11 @@ class M extends N {
|
|
|
201
199
|
}
|
|
202
200
|
async _handleTraceConfigChange() {
|
|
203
201
|
const { selectedNamedTraceConfiguration: e } = this;
|
|
204
|
-
if (!(e?.traceConfiguration instanceof
|
|
205
|
-
h("error", this,
|
|
202
|
+
if (!(e?.traceConfiguration instanceof S)) {
|
|
203
|
+
h("error", this, $("selectedNamedTraceConfiguration.traceConfiguration")), this._traceConfiguration = void 0;
|
|
206
204
|
return;
|
|
207
205
|
}
|
|
208
|
-
this.
|
|
206
|
+
this._traceConfiguration = e.traceConfiguration.clone(), this.isSubnetworkNameTraceSelected && (this._subnetworkNamesState = "loading", await this._handleSubnetworkTraceConfigurationChange(this._traceConfiguration), this._subnetworkNamesState = "ready");
|
|
209
207
|
}
|
|
210
208
|
async _handleSelectedUtilityNetworkChange() {
|
|
211
209
|
const { selectedUtilityNetwork: e } = this;
|
|
@@ -214,18 +212,18 @@ class M extends N {
|
|
|
214
212
|
} catch (t) {
|
|
215
213
|
g(t, this, "Error while loading the selected utility network");
|
|
216
214
|
}
|
|
217
|
-
this._clearSubnetworks(), this._setupTraceConfigurations(), this.
|
|
215
|
+
this._clearSubnetworks(), this._setupTraceConfigurations(), this._setUtilityNetworkLayers(), this._clearTraceLocations();
|
|
218
216
|
}
|
|
219
217
|
_setupTraceConfigurations() {
|
|
220
|
-
this.
|
|
218
|
+
this._traceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this._namedTraceConfigurations = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter((e) => e.traceType !== "circuit").sort((e, t) => e.title.localeCompare(t.title)) || [], this._namedTraceConfigurations.length ? this.selectedNamedTraceConfiguration = this._namedTraceConfigurations.at(0) : h("error", this, "The selected utility network has no compatible named trace configurations.");
|
|
221
219
|
}
|
|
222
|
-
|
|
220
|
+
_setUtilityNetworkLayers() {
|
|
223
221
|
const { selectedUtilityNetwork: e } = this;
|
|
224
|
-
this.
|
|
222
|
+
this._utilityNetworkLayers = new c(this._allLayersAndTables.filter((t) => e?.isUtilityLayer(t) && !this._subnetworkLayerIds.includes(t.layerId))), this._setSnappingOptions();
|
|
225
223
|
}
|
|
226
224
|
_handleUtilityNetworksChange() {
|
|
227
|
-
const {
|
|
228
|
-
e?.length ? (!t || !e.includes(t)) && (this.selectedUtilityNetwork = e.at(0)) : (h("error", this,
|
|
225
|
+
const { _utilityNetworks: e, selectedUtilityNetwork: t } = this;
|
|
226
|
+
e?.length ? (!t || !e.includes(t)) && (this.selectedUtilityNetwork = e.at(0)) : (h("error", this, v("_utilityNetworks")), this.selectedUtilityNetwork = void 0, this._error = this._messages.errors.noUtilityNetwork);
|
|
229
227
|
}
|
|
230
228
|
async _setupUtilityNetworks(e) {
|
|
231
229
|
try {
|
|
@@ -233,7 +231,7 @@ class M extends N {
|
|
|
233
231
|
} catch (t) {
|
|
234
232
|
g(t, this, "Error while loading `view.map`");
|
|
235
233
|
} finally {
|
|
236
|
-
this.
|
|
234
|
+
this._utilityNetworks = e.utilityNetworks || new c();
|
|
237
235
|
}
|
|
238
236
|
}
|
|
239
237
|
_handleTraceLocationSelectStart(e) {
|
|
@@ -246,7 +244,7 @@ class M extends N {
|
|
|
246
244
|
_getLayerByLayerId(e) {
|
|
247
245
|
if (e == null)
|
|
248
246
|
return;
|
|
249
|
-
const { _layerIdToLayer: t,
|
|
247
|
+
const { _layerIdToLayer: t, _utilityNetworkLayers: i } = this;
|
|
250
248
|
if (t.get(e))
|
|
251
249
|
return t.get(e);
|
|
252
250
|
if (!i)
|
|
@@ -257,7 +255,7 @@ class M extends N {
|
|
|
257
255
|
async _queryFeaturesOnLayer(e, t) {
|
|
258
256
|
const i = e.createQuery();
|
|
259
257
|
i.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, i.objectIds = t.map((s) => s.getObjectId()), i.outFields = ["*"];
|
|
260
|
-
const { features: a } = await
|
|
258
|
+
const { features: a } = await _(e, i);
|
|
261
259
|
return a.forEach((s) => {
|
|
262
260
|
if (!s.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)) {
|
|
263
261
|
const o = s.layer;
|
|
@@ -282,7 +280,7 @@ class M extends N {
|
|
|
282
280
|
})), i;
|
|
283
281
|
}
|
|
284
282
|
async _handleHitTestComplete(e) {
|
|
285
|
-
return this._exceedDisplayLimit = e.length > this.
|
|
283
|
+
return this._exceedDisplayLimit = e.length > this._maxNumCandidateFeatures, this._candidateFeatures = await this._queryFeatures(e.slice(0, this._maxNumCandidateFeatures)), this._candidateFeatures.length === 0 ? (this._handleAddSpatialCancelClick(), await Promise.reject(Error("No features found"))) : (this._candidateFeatures.length === 1 && (this._selectedFeature = this._candidateFeatures.at(0)), this.mode = "add-spatial-feature", this._hitTestPromise?.reject(), this._hitTestPromise = Promise.withResolvers(), await this._hitTestPromise.promise);
|
|
286
284
|
}
|
|
287
285
|
_handleTraceLocationSelectEnd(e) {
|
|
288
286
|
e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit(), this._activeTraceLocationType = void 0, this.mode = "default", this._handleAddSpatialCancelClick();
|
|
@@ -291,95 +289,96 @@ class M extends N {
|
|
|
291
289
|
e?.stopPropagation(), this._featuresComponentElement?.clear(), this._handleFeaturesClose(), this._sketchViewModel?.cancel();
|
|
292
290
|
}
|
|
293
291
|
_handleFeaturesClose() {
|
|
294
|
-
this.mode = "default", this.
|
|
292
|
+
this.mode = "default", this._candidateFeatures = [], this._selectedFeature = void 0, this._hitTestPromise?.reject(), this._hitTestPromise = null;
|
|
295
293
|
}
|
|
296
294
|
_handleAddSpatialAddClick() {
|
|
297
|
-
const { _hitTestPromise: e, _featuresComponentElement: t,
|
|
295
|
+
const { _hitTestPromise: e, _featuresComponentElement: t, _selectedFeature: i } = this;
|
|
298
296
|
if (e && t) {
|
|
299
297
|
if (!i)
|
|
300
298
|
return;
|
|
301
299
|
e.resolve(i), this._hitTestPromise = null;
|
|
302
300
|
}
|
|
303
301
|
}
|
|
304
|
-
|
|
302
|
+
_renderError(e, t = !1, i) {
|
|
305
303
|
return r`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`;
|
|
306
304
|
}
|
|
307
|
-
|
|
305
|
+
_renderLoader() {
|
|
308
306
|
return r`<calcite-loader label=loading></calcite-loader>`;
|
|
309
307
|
}
|
|
310
|
-
|
|
311
|
-
const e = this.
|
|
308
|
+
_renderTraceSelection() {
|
|
309
|
+
const e = this._namedTraceConfigurations.map((i) => r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId === this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`), t = this._messages.labels.traceConfiguration;
|
|
312
310
|
return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
|
|
313
|
-
|
|
311
|
+
const a = i.selectedItems[0]?.value;
|
|
312
|
+
this._selectTraceConfigurationByGlobalId(a);
|
|
314
313
|
}}>${e}</calcite-combobox></calcite-block>`;
|
|
315
314
|
}
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
return r`<calcite-block .heading=${
|
|
319
|
-
const
|
|
320
|
-
this.selectedUtilityNetwork?.id !==
|
|
321
|
-
}}>${
|
|
315
|
+
_renderUtilityNetworkSelection() {
|
|
316
|
+
const e = this._messages.labels.utilityNetwork, t = this._utilityNetworks?.map((i) => r`<calcite-combobox-item .value=${i.id} .heading=${i.title || i.id} .selected=${i.id === this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);
|
|
317
|
+
return r`<calcite-block .heading=${e} .label=${e} expanded><calcite-combobox .label=${e} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
|
|
318
|
+
const a = i.selectedItems[0]?.value;
|
|
319
|
+
this.selectedUtilityNetwork?.id !== a && (this.selectedUtilityNetwork = this._utilityNetworks?.find((s) => s.id === a));
|
|
320
|
+
}}>${t}</calcite-combobox></calcite-block>`;
|
|
322
321
|
}
|
|
323
|
-
|
|
322
|
+
_renderDefaultMode() {
|
|
324
323
|
const { selectedUtilityNetwork: e } = this, { noView: t, noUtilityNetwork: i } = this._messages.errors;
|
|
325
324
|
let a;
|
|
326
|
-
return this._error === t || this._error === i ? a = this.
|
|
325
|
+
return this._error === t || this._error === i ? a = this._renderError(this._error, !1, "exclamation-mark-triangle") : !e?.loaded && !e?.loadError ? a = this._renderLoader() : a = this._renderContent(), r`<calcite-flow-item .selected=${this.mode === "default"}>${a}</calcite-flow-item>`;
|
|
327
326
|
}
|
|
328
|
-
|
|
329
|
-
const { _messages: e,
|
|
330
|
-
return r`<calcite-flow-item .selected=${
|
|
327
|
+
_renderSpatialSelectInstructions() {
|
|
328
|
+
const { _messages: e, mode: t } = this, i = this._activeTraceLocationType === "starting-point" ? e.labels.addSpatial.startingPoint : this._activeTraceLocationType === "barrier" ? e.labels.addSpatial.barrier : e.labels.addSpatial.stoppingPoint;
|
|
329
|
+
return r`<calcite-flow-item .selected=${t === "add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${(a) => this._handleAddSpatialCancelClick(a)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`;
|
|
331
330
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
if (!e.length)
|
|
331
|
+
_renderCandidateFeatures() {
|
|
332
|
+
if (!this._candidateFeatures.length)
|
|
335
333
|
return this.mode = "default", null;
|
|
336
|
-
const
|
|
337
|
-
return r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${
|
|
334
|
+
const e = this._activeTraceLocationType === "starting-point" ? this._messages.labels.addSpatial.startingPoint : this._activeTraceLocationType === "barrier" ? this._messages.labels.addSpatial.barrier : this._messages.labels.addSpatial.stoppingPoint, t = this._candidateFeatures.length === 1 ? "feature" : "list";
|
|
335
|
+
return r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${this._candidateFeatures} .featureMenuTitle=${e} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${t} @arcgisClose=${() => this._handleFeaturesClose()} @arcgisPropertyChange=${this._handleFeaturesPropertyChange} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this._featuresComponentRefChange)}></arcgis-features-next>`;
|
|
338
336
|
}
|
|
339
|
-
|
|
340
|
-
const { mode: e, _messages: t,
|
|
341
|
-
limit: this.
|
|
337
|
+
_renderAddSpatialFooter() {
|
|
338
|
+
const { mode: e, _messages: t, _selectedFeature: i, selectedUtilityNetwork: a } = this, s = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o = y(t.warnings.exceededDisplayLimit, {
|
|
339
|
+
limit: this._maxNumCandidateFeatures.toString()
|
|
342
340
|
}), n = i ? !(a?.isUtilityLayer(i.layer) ?? !0) : !0;
|
|
343
341
|
return r`${s && r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>` || ""}<calcite-button appearance=outline width=full @click=${() => this._handleAddSpatialCancelClick()} slot=footer>${t.buttons.cancel}</calcite-button>${e === "add-spatial-feature" && r`<calcite-button width=full slot=footer appearance=solid @click=${() => this._handleAddSpatialAddClick()} .disabled=${n}>${t.buttons.add}</calcite-button>` || ""}`;
|
|
344
342
|
}
|
|
345
|
-
|
|
346
|
-
return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.
|
|
343
|
+
_renderStartingPointSelection() {
|
|
344
|
+
return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._utilityNetworkLayers} .traceLocations=${this._startingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this._traceLocationStartingRefChange)}></arcgis-utility-network-trace-location>`;
|
|
347
345
|
}
|
|
348
|
-
|
|
349
|
-
return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.
|
|
346
|
+
_renderStoppingPointSelection() {
|
|
347
|
+
return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._utilityNetworkLayers} .traceLocations=${this._stoppingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this._traceLocationStoppingRefChange)}></arcgis-utility-network-trace-location>`;
|
|
350
348
|
}
|
|
351
|
-
|
|
352
|
-
return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.
|
|
349
|
+
_renderBarrierSelection() {
|
|
350
|
+
return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._utilityNetworkLayers} .traceLocations=${this._barriers} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this._traceLocationBarrierRefChange)}></arcgis-utility-network-trace-location>`;
|
|
353
351
|
}
|
|
354
|
-
|
|
355
|
-
return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .status=${this.
|
|
352
|
+
_renderSubnetworkNameInput() {
|
|
353
|
+
return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .status=${this._selectedSubnetworkName ? "valid" : "invalid"} .value=${this._selectedSubnetworkName} @calciteInputInput=${(e) => this._selectedSubnetworkName = e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`;
|
|
356
354
|
}
|
|
357
|
-
|
|
355
|
+
_renderSubnetworkSelectList() {
|
|
358
356
|
return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: e }) => {
|
|
359
|
-
|
|
360
|
-
|
|
357
|
+
const t = e.selectedItems[0]?.value;
|
|
358
|
+
this._selectedSubnetworkName = t;
|
|
359
|
+
}}>${this._compatibleSubnetworkNames.map((e) => r`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e === this._selectedSubnetworkName}></calcite-combobox-item>`)}</calcite-combobox>`;
|
|
361
360
|
}
|
|
362
|
-
|
|
363
|
-
const
|
|
364
|
-
return this.isSubnetworkNameTraceSelected ? this._subnetworkNamesState === "loading" ? r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>` :
|
|
361
|
+
_renderSubnetworkSelection() {
|
|
362
|
+
const e = this._messages.labels.subnetworkName;
|
|
363
|
+
return this.isSubnetworkNameTraceSelected ? this._subnetworkNamesState === "loading" ? r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>` : this._compatibleSubnetworkNames.length ? r`<calcite-block .heading=${e} .label=${e} expanded>${this._compatibleSubnetworkNames.length > A ? this._renderSubnetworkNameInput() : this._renderSubnetworkSelectList()}</calcite-block>` : this._renderError(this._messages.errors.noCompatibleSubnetworks, !1, "exclamation-mark-triangle") : null;
|
|
365
364
|
}
|
|
366
|
-
|
|
367
|
-
const {
|
|
368
|
-
return
|
|
365
|
+
_renderSubnetworkInfo() {
|
|
366
|
+
const { selectedNamedTraceConfiguration: e } = this;
|
|
367
|
+
return this._traceConfiguration && e?.traceType && this._subnetworkTraceTypes.has(e.traceType) ? r`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfig=${e}></arcgis-utility-network-subnetwork-info></calcite-block>` : null;
|
|
369
368
|
}
|
|
370
|
-
|
|
371
|
-
const {
|
|
372
|
-
let
|
|
373
|
-
this.selectedUtilityNetwork?.loadError ?
|
|
374
|
-
const
|
|
375
|
-
return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${
|
|
369
|
+
_renderContent() {
|
|
370
|
+
const { noTraceConfiguration: e, noNamedTraceConfigurations: t, utilityNetworkLoadFailed: i } = this._messages.errors, a = this._utilityNetworks && this._utilityNetworks.length > 1 ? this._renderUtilityNetworkSelection() : null;
|
|
371
|
+
let s;
|
|
372
|
+
this.selectedUtilityNetwork?.loadError ? s = this._renderError(i, !1, "exclamation-mark-triangle") : this._namedTraceConfigurations.length || (s = this._renderError(t, !1, "exclamation-mark-triangle"));
|
|
373
|
+
const o = r`${this._renderTraceSelection()}${this._renderSubnetworkInfo()}${this._renderSubnetworkSelection()}`, n = this.traceConfiguration ? r`${this._showStartingPoints ? this._renderStartingPointSelection() : null}${this._showStoppingPoints ? this._renderStoppingPointSelection() : null}${this._renderBarrierSelection()}` : this._renderError(e, !1, "exclamation-mark-triangle");
|
|
374
|
+
return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${a}${s ?? r`${o}${n}`}</calcite-block-group>`;
|
|
376
375
|
}
|
|
377
376
|
render() {
|
|
378
377
|
const { mode: e } = this;
|
|
379
|
-
return r`<calcite-panel>${e === "add-spatial-feature" ? this.
|
|
378
|
+
return r`<calcite-panel>${e === "add-spatial-feature" ? this._renderCandidateFeatures() : null}<calcite-flow .hidden=${e === "add-spatial-feature"}>${this._renderDefaultMode()}${this._renderSpatialSelectInstructions()}</calcite-flow>${e !== "default" ? this._renderAddSpatialFooter() : null}</calcite-panel>`;
|
|
380
379
|
}
|
|
381
380
|
}
|
|
382
|
-
|
|
381
|
+
f("arcgis-utility-network-trace-inputs", D);
|
|
383
382
|
export {
|
|
384
|
-
|
|
383
|
+
D as ArcgisUtilityNetworkTraceInputs
|
|
385
384
|
};
|
|
@@ -13,40 +13,19 @@ 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 locations on the map to use as trace inputs.
|
|
19
17
|
*
|
|
20
18
|
* @since 4.34
|
|
21
19
|
* @internal
|
|
22
20
|
*/
|
|
23
21
|
export abstract class ArcgisUtilityNetworkTraceLocation extends LitElement {
|
|
24
|
-
/**
|
|
25
|
-
* A function to run after a hit test is performed to select a trace location. If left empty, the first graphic from the hit test results will be used as the trace location.
|
|
26
|
-
* This function allows for modification of the selected graphic before it is added as a trace location, such as changing its attributes or geometry.
|
|
27
|
-
* If the promise is rejected, the selection process will be cancelled.
|
|
28
|
-
*
|
|
29
|
-
* @internal
|
|
30
|
-
*/
|
|
31
|
-
accessor afterHitTest: ((graphics: Graphic[]) => Promise<Graphic>) | undefined;
|
|
32
|
-
/** @default false */
|
|
33
|
-
accessor autoDestroyDisabled: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* A function to run before trace location selection starts.
|
|
36
|
-
*
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
|
-
accessor beforeTraceLocationSelectStart: (() => Promise<void>) | undefined;
|
|
40
|
-
accessor filterLayers: Collection<Layer> | undefined;
|
|
41
22
|
/** @internal */
|
|
42
|
-
protected
|
|
23
|
+
protected _messages: {
|
|
43
24
|
buttons: { clear: string; };
|
|
44
25
|
componentLabel: string;
|
|
45
26
|
errors: {};
|
|
46
|
-
labels: {
|
|
47
|
-
|
|
48
|
-
unknown: string;
|
|
49
|
-
};
|
|
27
|
+
labels: { close: string; };
|
|
28
|
+
unknown: string;
|
|
50
29
|
types: {
|
|
51
30
|
barrier: {
|
|
52
31
|
buttonText: string;
|
|
@@ -71,10 +50,8 @@ export abstract class ArcgisUtilityNetworkTraceLocation extends LitElement {
|
|
|
71
50
|
buttons: { clear: string; };
|
|
72
51
|
componentLabel: string;
|
|
73
52
|
errors: {};
|
|
74
|
-
labels: {
|
|
75
|
-
|
|
76
|
-
unknown: string;
|
|
77
|
-
};
|
|
53
|
+
labels: { close: string; };
|
|
54
|
+
unknown: string;
|
|
78
55
|
types: {
|
|
79
56
|
barrier: {
|
|
80
57
|
buttonText: string;
|
|
@@ -96,6 +73,31 @@ export abstract class ArcgisUtilityNetworkTraceLocation extends LitElement {
|
|
|
96
73
|
};
|
|
97
74
|
};
|
|
98
75
|
}>;
|
|
76
|
+
/**
|
|
77
|
+
* A function to run after a hit test is performed to select a trace location. If left empty, the first graphic from the hit test results will be used as the trace location.
|
|
78
|
+
* This function allows for modification of the selected graphic before it is added as a trace location, such as changing its attributes or geometry.
|
|
79
|
+
* If the promise is rejected, the selection process will be cancelled.
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
accessor afterHitTest: ((graphics: Graphic[]) => Promise<Graphic>) | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* If true, the component will not be destroyed automatically when it is
|
|
86
|
+
* disconnected from the document. This is useful when you want to move the
|
|
87
|
+
* component to a different place on the page, or temporarily hide it. If this
|
|
88
|
+
* is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-location/#destroy) method when you are done to
|
|
89
|
+
* prevent memory leaks.
|
|
90
|
+
*
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
accessor autoDestroyDisabled: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* A function to run before trace location selection starts.
|
|
96
|
+
*
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
accessor beforeTraceLocationSelectStart: (() => Promise<void>) | undefined;
|
|
100
|
+
accessor filterLayers: Collection<Layer> | undefined;
|
|
99
101
|
accessor sketchViewModel: SketchViewModel | undefined;
|
|
100
102
|
/** @default 0.05 */
|
|
101
103
|
accessor spatialTolerance: number;
|
|
@@ -104,7 +106,10 @@ export abstract class ArcgisUtilityNetworkTraceLocation extends LitElement {
|
|
|
104
106
|
accessor traceLocationType: TraceLocationType;
|
|
105
107
|
/** @required */
|
|
106
108
|
accessor utilityNetwork: UtilityNetwork | undefined;
|
|
107
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* The view associated with the component.
|
|
111
|
+
* > **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-location component will be associated with a map or scene component rather than using the `view` property.
|
|
112
|
+
*/
|
|
108
113
|
accessor view: MapView | undefined;
|
|
109
114
|
/** Permanently destroy the component. */
|
|
110
115
|
destroy(): Promise<void>;
|