@arcgis/map-components 5.2.0-next.105 → 5.2.0-next.106
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/2W7OTZWE.js +2 -0
- package/dist/cdn/{CB564G7T.js → 3Q5ZNKFA.js} +1 -1
- package/dist/cdn/54ST7ZFM.js +2 -0
- package/dist/cdn/5IWPAMQX.js +2 -0
- package/dist/cdn/{PXSNOIDS.js → 5VFOV7OL.js} +1 -1
- package/dist/cdn/{L4DWZT4V.js → 6CXH46LW.js} +1 -1
- package/dist/cdn/{6PKJBJML.js → 6FNDBTL7.js} +1 -1
- package/dist/cdn/BTDEIRWG.js +2 -0
- package/dist/cdn/{WLGR4IHZ.js → GTGJEBPK.js} +1 -1
- package/dist/cdn/{KGFMFLEB.js → HUPYGWUJ.js} +1 -1
- package/dist/cdn/J7ZMGZ6U.js +2 -0
- package/dist/cdn/{SHMHGYVB.js → KDM7EERW.js} +1 -1
- package/dist/cdn/{RC2T53I5.js → KXGRFYAN.js} +1 -1
- package/dist/cdn/{5FWT3N7B.js → N4ECCRHC.js} +1 -1
- package/dist/cdn/{EHMCN2NS.js → NG4IEHMS.js} +1 -1
- package/dist/cdn/P5JRSGJG.js +2 -0
- package/dist/cdn/{CKO4VE36.js → Q4VMXDGI.js} +1 -1
- package/dist/cdn/{72HH6FSN.js → RFAICLUF.js} +1 -1
- package/dist/cdn/{BNZQH6YD.js → T7L5Q45E.js} +1 -1
- package/dist/cdn/WJKXUGQQ.js +2 -0
- package/dist/cdn/{6SEM26SM.js → XYIEHNTE.js} +1 -1
- package/dist/cdn/{R2WAEZ4G.js → Y4XJQ6Z7.js} +1 -1
- package/dist/cdn/{BR6D5EO4.js → Y6UJT3A4.js} +1 -1
- package/dist/cdn/{EYHS3JDR.js → YBXUZO5Y.js} +1 -1
- package/dist/cdn/assets/layer-list-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-trace-locations/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/utils2.js +36 -28
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +25 -25
- package/dist/components/arcgis-coordinate-conversion-next/customElement.js +1 -1
- package/dist/components/arcgis-directional-pad/customElement.js +10 -10
- package/dist/components/arcgis-features/customElement.js +1 -1
- package/dist/components/arcgis-features-next/customElement.d.ts +2 -0
- package/dist/components/arcgis-features-next/customElement.js +2 -2
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +1 -1
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +27 -0
- package/dist/components/arcgis-layer-list-next/customElement.js +22 -22
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +44 -44
- package/dist/components/arcgis-layer-list-next/types.d.ts +9 -0
- package/dist/components/arcgis-link-chart-layout-switcher/customElement.js +5 -5
- package/dist/components/arcgis-navigation-toggle/customElement.js +1 -1
- package/dist/components/arcgis-paste/customElement.js +1 -1
- package/dist/components/arcgis-popup/customElement.d.ts +2 -0
- package/dist/components/arcgis-print-layout-panel/customElement.js +1 -1
- package/dist/components/arcgis-print-map-only-panel/customElement.js +1 -1
- package/dist/components/arcgis-reverse-geocode-list/customElement.js +1 -1
- package/dist/components/arcgis-scene/customElement.d.ts +10 -0
- package/dist/components/arcgis-time-bar/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.js +101 -161
- package/dist/components/arcgis-utility-network-trace-inputs-next/index.js +1 -1
- package/dist/components/{arcgis-utility-network-trace-location-next → arcgis-utility-network-trace-locations}/customElement.d.ts +47 -26
- package/dist/components/arcgis-utility-network-trace-locations/customElement.js +397 -0
- package/dist/components/{arcgis-utility-network-trace-location-list-next → arcgis-utility-network-trace-locations}/index.js +2 -0
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +1 -1
- 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/index.d.ts +7 -11
- package/dist/loader.js +2 -3
- package/dist/types/lumina.d.ts +6 -11
- package/dist/types/preact.d.ts +7 -13
- package/dist/types/react.d.ts +8 -15
- package/dist/types/stencil.d.ts +6 -11
- package/package.json +5 -5
- package/dist/cdn/5LGT6I7Y.js +0 -2
- package/dist/cdn/GH2RPE3P.js +0 -2
- package/dist/cdn/JHWTX3YJ.js +0 -2
- package/dist/cdn/NRT2ZCWC.js +0 -2
- package/dist/cdn/R5GMCIAH.js +0 -2
- package/dist/cdn/VZXCU47M.js +0 -2
- package/dist/cdn/YELCBIGX.js +0 -2
- package/dist/cdn/assets/utility-network-trace-location-list-next/t9n/messages.en.json +0 -1
- package/dist/cdn/assets/utility-network-trace-location-next/t9n/messages.en.json +0 -1
- package/dist/components/arcgis-utility-network-trace-location-list-next/customElement.d.ts +0 -43
- package/dist/components/arcgis-utility-network-trace-location-list-next/customElement.js +0 -70
- package/dist/components/arcgis-utility-network-trace-location-next/customElement.js +0 -292
- package/dist/components/arcgis-utility-network-trace-location-next/index.d.ts +0 -1
- package/dist/components/arcgis-utility-network-trace-location-next/index.js +0 -4
- /package/dist/components/{arcgis-utility-network-trace-location-list-next → arcgis-utility-network-trace-locations}/index.d.ts +0 -0
|
@@ -1,55 +1,52 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { ref as
|
|
2
|
+
import { c as u } from "../../chunks/runtime.js";
|
|
3
|
+
import { ref as h } 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
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const P = T`: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)}`, h = `utility-network-trace-inputs-sketch-${Date.now()}`;
|
|
18
|
-
class F extends k {
|
|
5
|
+
import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
|
+
import { substitute as g } from "@arcgis/core/intl.js";
|
|
7
|
+
import m from "@arcgis/core/rest/networks/support/TraceLocation.js";
|
|
8
|
+
import { LitElement as f, createEvent as n } from "@arcgis/lumina";
|
|
9
|
+
import { usePropertyChange as y } from "@arcgis/lumina/controllers";
|
|
10
|
+
import { css as w, html as s } from "lit";
|
|
11
|
+
import { u as k } from "../../chunks/useT9n.js";
|
|
12
|
+
import { l as b } from "../../chunks/async-utils.js";
|
|
13
|
+
import { q as T, b as L } from "../../chunks/layer-utils.js";
|
|
14
|
+
import { ArcgisUtilityNetworkTraceLocations as d } from "../arcgis-utility-network-trace-locations/customElement.js";
|
|
15
|
+
const C = w`: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)}`;
|
|
16
|
+
class $ extends f {
|
|
19
17
|
constructor() {
|
|
20
|
-
super(...arguments), this._messages =
|
|
18
|
+
super(...arguments), this._messages = k({ blocking: !0 }), this.#c = !0, this.#l = /* @__PURE__ */ new Map(), this.#t = new c(), this.#i = new c(), this.#a = new c(), this.#e = null, this.#s = 20, this._candidateFeatures = [], this._compatibleSubnetworkNames = [], this._namedTraceConfigurations = [], this._subnetworkNamesState = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = y()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = n(), this.arcgisTraceInputsChange = n(), this.arcgisTraceLocationSelectEnd = n(), this.arcgisTraceLocationSelectStart = n(), this.arcgisUtilityNetworkChange = n();
|
|
21
19
|
}
|
|
22
20
|
static {
|
|
23
|
-
this.properties = { _selectedFeature: 16, _candidateFeatures: 16, _compatibleSubnetworkNames: 16, _subnetworksTable: 16, _namedTraceConfigurations: 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,
|
|
21
|
+
this.properties = { _selectedFeature: 16, _candidateFeatures: 16, _compatibleSubnetworkNames: 16, _subnetworksTable: 16, _namedTraceConfigurations: 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, traceLocationDetails: 32, traceLocations: 32 };
|
|
24
22
|
}
|
|
25
23
|
static {
|
|
26
|
-
this.styles =
|
|
24
|
+
this.styles = C;
|
|
27
25
|
}
|
|
28
|
-
#
|
|
29
|
-
get #
|
|
26
|
+
#c;
|
|
27
|
+
get #b() {
|
|
30
28
|
const { view: e } = this;
|
|
31
29
|
return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
|
|
32
30
|
}
|
|
33
|
-
#
|
|
31
|
+
#n;
|
|
32
|
+
#l;
|
|
33
|
+
#t;
|
|
34
34
|
#i;
|
|
35
|
-
#d;
|
|
36
35
|
#a;
|
|
36
|
+
#e;
|
|
37
37
|
#r;
|
|
38
|
+
#u;
|
|
39
|
+
#p;
|
|
40
|
+
#g;
|
|
38
41
|
#s;
|
|
39
|
-
#
|
|
40
|
-
#o;
|
|
41
|
-
#m;
|
|
42
|
-
#f;
|
|
43
|
-
#y;
|
|
44
|
-
#c;
|
|
45
|
-
get #w() {
|
|
42
|
+
get #m() {
|
|
46
43
|
return !this.isSubnetworkNameTraceSelected;
|
|
47
44
|
}
|
|
48
|
-
get #
|
|
45
|
+
get #f() {
|
|
49
46
|
const e = this.selectedNamedTraceConfiguration?.traceType;
|
|
50
47
|
return e === "path" || e === "circuit";
|
|
51
48
|
}
|
|
52
|
-
get #
|
|
49
|
+
get #T() {
|
|
53
50
|
const e = this.selectedUtilityNetwork?.dataElement?.domainNetworks;
|
|
54
51
|
return e ? e.map((t) => t.subnetworkLayerId).filter((t) => t != null && t > -1) : [];
|
|
55
52
|
}
|
|
@@ -60,53 +57,51 @@ class F extends k {
|
|
|
60
57
|
const { selectedNamedTraceConfiguration: e } = this;
|
|
61
58
|
return !!e?.traceConfiguration?.subnetworkName && e?.traceType === "subnetwork";
|
|
62
59
|
}
|
|
63
|
-
get
|
|
64
|
-
return new c([...this.#
|
|
60
|
+
get traceLocationDetails() {
|
|
61
|
+
return new c([...this.#t, ...this.#i, ...this.#a]);
|
|
65
62
|
}
|
|
66
63
|
get traceLocations() {
|
|
67
64
|
const e = [];
|
|
68
|
-
return this.#
|
|
65
|
+
return this.#m && this.#t.forEach((t) => e.push(...this.#d(t))), this.#f && this.#a.forEach((t) => e.push(...this.#d(t))), this.#i.forEach((t) => e.push(...this.#d(t))), e;
|
|
69
66
|
}
|
|
70
67
|
async destroy() {
|
|
71
|
-
this.#
|
|
68
|
+
this.#w(), d.getSketchViewModel(this.view)?.cancel(), d.removeSketchGraphicsLayer(this.view), this.#r?.destroy(), this.#u?.destroy(), this.#p?.destroy(), this.#g?.destroy(), await this.manager.destroy();
|
|
72
69
|
}
|
|
73
70
|
load() {
|
|
74
|
-
this.#
|
|
75
|
-
|
|
71
|
+
this.#y(), this.manager.onLifecycle(() => [
|
|
72
|
+
p(() => this.view?.map, () => this.#y())
|
|
76
73
|
]);
|
|
77
74
|
}
|
|
78
75
|
willUpdate(e) {
|
|
79
|
-
e.has("selectedUtilityNetwork") && (this.arcgisUtilityNetworkChange.emit(), this.#
|
|
76
|
+
e.has("selectedUtilityNetwork") && (this.arcgisUtilityNetworkChange.emit(), this.#N()), e.has("selectedNamedTraceConfiguration") && (this.arcgisTraceInputsChange.emit(), this.arcgisSelectedNamedTraceConfigurationChange.emit());
|
|
80
77
|
}
|
|
81
78
|
disconnectedCallback() {
|
|
82
|
-
super.disconnectedCallback(), this.#
|
|
79
|
+
super.disconnectedCallback(), this.#l.clear();
|
|
83
80
|
}
|
|
84
|
-
#
|
|
81
|
+
#L({ detail: e, target: t }) {
|
|
85
82
|
(e.name === "selectedDrillInFeature" || e.name === "selectedFeature") && (this._selectedFeature = t.selectedDrillInFeature ?? t.selectedFeature ?? void 0);
|
|
86
83
|
}
|
|
87
|
-
#
|
|
84
|
+
#y() {
|
|
88
85
|
if (this._error = void 0, !this.view?.map) {
|
|
89
86
|
this._error = this._messages.errors.noView;
|
|
90
87
|
return;
|
|
91
88
|
}
|
|
92
|
-
const e = this.view.map;
|
|
93
|
-
this.#x(e);
|
|
94
89
|
}
|
|
95
|
-
#
|
|
96
|
-
e && (this.#
|
|
90
|
+
#C(e) {
|
|
91
|
+
e && (this.#u = e);
|
|
97
92
|
}
|
|
98
|
-
|
|
99
|
-
e && (this.#
|
|
93
|
+
#$(e) {
|
|
94
|
+
e && (this.#p = e);
|
|
100
95
|
}
|
|
101
|
-
#
|
|
102
|
-
e && (this.#
|
|
96
|
+
#S(e) {
|
|
97
|
+
e && (this.#g = e);
|
|
103
98
|
}
|
|
104
|
-
#
|
|
105
|
-
e && (this.#
|
|
99
|
+
#v(e) {
|
|
100
|
+
e && (this.#r = e);
|
|
106
101
|
}
|
|
107
|
-
#
|
|
102
|
+
#d(e) {
|
|
108
103
|
const t = e.flagProperties.selectedTerminals;
|
|
109
|
-
return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new
|
|
104
|
+
return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new m({
|
|
110
105
|
type: e.traceLocation.type,
|
|
111
106
|
isFilterBarrier: e.traceLocation.isFilterBarrier,
|
|
112
107
|
globalId: e.traceLocation.globalId,
|
|
@@ -114,92 +109,43 @@ class F extends k {
|
|
|
114
109
|
terminalId: i
|
|
115
110
|
})) : [e.traceLocation];
|
|
116
111
|
}
|
|
117
|
-
#
|
|
112
|
+
#w() {
|
|
118
113
|
const { view: e } = this;
|
|
119
|
-
this.#
|
|
114
|
+
this.#t.forEach((t) => {
|
|
120
115
|
t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
|
|
121
|
-
}), this.#
|
|
116
|
+
}), this.#t.removeAll(), this.#i.forEach((t) => {
|
|
122
117
|
t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
|
|
123
|
-
}), this.#
|
|
118
|
+
}), this.#i.removeAll(), this.#a.forEach((t) => {
|
|
124
119
|
t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
|
|
125
|
-
}), this.#
|
|
126
|
-
}
|
|
127
|
-
#I(e, t) {
|
|
128
|
-
if (!e.findLayerById(t)) {
|
|
129
|
-
const a = new y({
|
|
130
|
-
id: t,
|
|
131
|
-
listMode: "hide",
|
|
132
|
-
title: t
|
|
133
|
-
});
|
|
134
|
-
C(this.view, a);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
#E(e, t) {
|
|
138
|
-
const i = e.findLayerById(t);
|
|
139
|
-
return p(i) ? (e.reorder(i, e.layers.length - 1), i) : null;
|
|
120
|
+
}), this.#a.removeAll();
|
|
140
121
|
}
|
|
141
|
-
#
|
|
142
|
-
if (!this.view?.map)
|
|
143
|
-
return;
|
|
144
|
-
const { map: t } = this.view, i = t?.findLayerById(e);
|
|
145
|
-
i && p(i) && t?.remove(i);
|
|
146
|
-
}
|
|
147
|
-
#T() {
|
|
148
|
-
if (!this.#e)
|
|
149
|
-
return;
|
|
150
|
-
const e = new c();
|
|
151
|
-
this.#i?.forEach((t) => {
|
|
152
|
-
v(t) ? t.sublayers.forEach((i) => {
|
|
153
|
-
e.add(new u({
|
|
154
|
-
layer: i,
|
|
155
|
-
enabled: !0
|
|
156
|
-
}));
|
|
157
|
-
}) : e.add(new u({
|
|
158
|
-
layer: t,
|
|
159
|
-
enabled: !0
|
|
160
|
-
}));
|
|
161
|
-
}), this.#e.snappingOptions = {
|
|
162
|
-
enabled: !1,
|
|
163
|
-
featureSources: e
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
#U(e) {
|
|
167
|
-
const { view: t } = this, i = this.#E(e, h);
|
|
168
|
-
return new b({
|
|
169
|
-
layer: i,
|
|
170
|
-
view: t
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
#x(e) {
|
|
174
|
-
this.#I(e, h), this.#e = this.#U(e), this.#T();
|
|
175
|
-
}
|
|
176
|
-
async #A() {
|
|
122
|
+
async #N() {
|
|
177
123
|
const { selectedUtilityNetwork: e } = this;
|
|
178
124
|
try {
|
|
179
125
|
e && !e.loaded && await e.load();
|
|
180
126
|
} catch (t) {
|
|
181
|
-
|
|
127
|
+
b(t, this, "Error while loading the selected utility network");
|
|
182
128
|
}
|
|
183
|
-
this.#
|
|
129
|
+
this.#_(), this.#P(), this.#w();
|
|
184
130
|
}
|
|
185
|
-
#
|
|
131
|
+
#_() {
|
|
186
132
|
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)) || [];
|
|
187
133
|
}
|
|
188
|
-
#
|
|
134
|
+
#P() {
|
|
189
135
|
const { selectedUtilityNetwork: e } = this;
|
|
190
|
-
this.#
|
|
136
|
+
this.#n = new c(this.#b.filter((t) => e?.isUtilityLayer(t) && !this.#T.includes(t.layerId)));
|
|
191
137
|
}
|
|
192
|
-
#
|
|
138
|
+
#F(e) {
|
|
193
139
|
if (e.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented) {
|
|
194
140
|
e.preventDefault();
|
|
195
141
|
return;
|
|
196
142
|
}
|
|
197
143
|
this._activeTraceLocationType = e?.target?.traceLocationType, this.mode = "add-spatial-instructions";
|
|
198
144
|
}
|
|
199
|
-
#
|
|
145
|
+
#E(e) {
|
|
200
146
|
if (e == null)
|
|
201
147
|
return;
|
|
202
|
-
const t = this.#
|
|
148
|
+
const t = this.#l, i = this.#n, a = t.get(e);
|
|
203
149
|
if (a)
|
|
204
150
|
return a;
|
|
205
151
|
if (!i)
|
|
@@ -207,109 +153,103 @@ class F extends k {
|
|
|
207
153
|
const r = i.find((o) => "layerId" in o && o.layerId === e);
|
|
208
154
|
return r && t.set(e, r), r;
|
|
209
155
|
}
|
|
210
|
-
async #
|
|
156
|
+
async #U(e, t) {
|
|
211
157
|
const i = e.createQuery();
|
|
212
158
|
i.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, i.objectIds = t.map((r) => r.getObjectId()), i.outFields = ["*"];
|
|
213
|
-
const { features: a } = await
|
|
159
|
+
const { features: a } = await T(e, i);
|
|
214
160
|
return a.forEach((r) => {
|
|
215
|
-
if (!r.getEffectivePopupTemplate(this.#
|
|
161
|
+
if (!r.getEffectivePopupTemplate(this.#c)) {
|
|
216
162
|
const o = r.layer;
|
|
217
163
|
r.popupTemplate = o.createPopupTemplate();
|
|
218
164
|
}
|
|
219
165
|
}), a;
|
|
220
166
|
}
|
|
221
|
-
async #
|
|
167
|
+
async #A(e) {
|
|
222
168
|
const t = /* @__PURE__ */ new Map(), i = [];
|
|
223
169
|
return e.forEach((a) => {
|
|
224
|
-
const r =
|
|
170
|
+
const r = L(a.layer) ? a.layer.parent : a.layer;
|
|
225
171
|
if (r) {
|
|
226
|
-
const o = this.#
|
|
172
|
+
const o = this.#E(r.layerId);
|
|
227
173
|
if (o) {
|
|
228
174
|
const l = t.get(o) || [];
|
|
229
175
|
l.push(a), t.set(o, l);
|
|
230
176
|
}
|
|
231
177
|
}
|
|
232
178
|
}), await Promise.all(Array.from(t.keys()).map(async (a) => {
|
|
233
|
-
const r = t.get(a) ?? [], o = await this.#
|
|
179
|
+
const r = t.get(a) ?? [], o = await this.#U(a, r);
|
|
234
180
|
i.push(...o);
|
|
235
181
|
})), i;
|
|
236
182
|
}
|
|
237
|
-
async #
|
|
238
|
-
return this._exceedDisplayLimit = e.length > this.#
|
|
183
|
+
async #D(e) {
|
|
184
|
+
return this._exceedDisplayLimit = e.length > this.#s, this._candidateFeatures = await this.#A(e.slice(0, this.#s)), this._candidateFeatures.length === 0 ? (this.#o(), await Promise.reject(Error("No features found"))) : (this._candidateFeatures.length === 1 && (this._selectedFeature = this._candidateFeatures.at(0)), this.mode = "add-spatial-feature", this.#e?.reject(), this.#e = Promise.withResolvers(), await this.#e.promise);
|
|
239
185
|
}
|
|
240
|
-
#
|
|
241
|
-
e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit(), this._activeTraceLocationType = void 0, this.mode = "default", this.#
|
|
186
|
+
#I(e) {
|
|
187
|
+
e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit(), this._activeTraceLocationType = void 0, this.mode = "default", this.#o();
|
|
242
188
|
}
|
|
243
|
-
#
|
|
244
|
-
e?.stopPropagation(), this.#
|
|
189
|
+
#o(e) {
|
|
190
|
+
e?.stopPropagation(), this.#r?.clear(), this.#k(), (this.view ? d.getSketchViewModel(this.view) : null)?.cancel();
|
|
245
191
|
}
|
|
246
|
-
|
|
247
|
-
this.mode = "default", this._candidateFeatures = [], this._selectedFeature = void 0, this.#
|
|
192
|
+
#k() {
|
|
193
|
+
this.mode = "default", this._candidateFeatures = [], this._selectedFeature = void 0, this.#e?.reject(), this.#e = null;
|
|
248
194
|
}
|
|
249
|
-
#
|
|
250
|
-
const e = this.#
|
|
195
|
+
#x() {
|
|
196
|
+
const e = this.#e, t = this.#r, { _selectedFeature: i } = this;
|
|
251
197
|
if (e && t) {
|
|
252
198
|
if (!i)
|
|
253
199
|
return;
|
|
254
|
-
e.resolve(i), this.#
|
|
200
|
+
e.resolve(i), this.#e = null;
|
|
255
201
|
}
|
|
256
202
|
}
|
|
257
|
-
#
|
|
203
|
+
#M(e, t = !1, i) {
|
|
258
204
|
return s`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`;
|
|
259
205
|
}
|
|
260
|
-
#
|
|
206
|
+
#B() {
|
|
261
207
|
const { _namedTraceConfigurations: e, selectedUtilityNetwork: t } = this;
|
|
262
208
|
return s`<arcgis-utility-network-trace-configuration-picker .traceConfigurations=${e} .utilityNetwork=${t} @arcgisPropertyChange=${(i) => {
|
|
263
209
|
i.stopPropagation(), i.detail.name === "selectedNamedTraceConfiguration" && (this.selectedNamedTraceConfiguration = i.target.selectedNamedTraceConfiguration), i.detail.name === "traceConfiguration" && (this._traceConfiguration = i.target.traceConfiguration);
|
|
264
210
|
}}></arcgis-utility-network-trace-configuration-picker>`;
|
|
265
211
|
}
|
|
266
|
-
#
|
|
212
|
+
#V() {
|
|
267
213
|
const { selectedUtilityNetwork: e, view: t } = this;
|
|
268
214
|
return s`<arcgis-utility-network-picker .selectedUtilityNetwork=${e} .view=${t} @arcgisPropertyChange=${(i) => {
|
|
269
215
|
i.detail.name === "selectedUtilityNetwork" && (this.selectedUtilityNetwork = i.target.selectedUtilityNetwork);
|
|
270
216
|
}}></arcgis-utility-network-picker>`;
|
|
271
217
|
}
|
|
272
|
-
#
|
|
218
|
+
#G() {
|
|
273
219
|
const { _error: e } = this, { noView: t } = this._messages.errors;
|
|
274
220
|
let i;
|
|
275
|
-
return e === t ? i = this.#
|
|
221
|
+
return e === t ? i = this.#M(e, !1, "exclamation-mark-triangle") : i = this.#z(), s`<calcite-flow-item .selected=${this.mode === "default"}>${i}</calcite-flow-item>`;
|
|
276
222
|
}
|
|
277
|
-
#
|
|
223
|
+
#q() {
|
|
278
224
|
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;
|
|
279
|
-
return s`<calcite-flow-item .selected=${t === "add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${(a) => this.#
|
|
225
|
+
return s`<calcite-flow-item .selected=${t === "add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${(a) => this.#o(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>`;
|
|
280
226
|
}
|
|
281
|
-
#
|
|
227
|
+
#j() {
|
|
282
228
|
const { _activeTraceLocationType: e, _candidateFeatures: t, _messages: i } = this;
|
|
283
229
|
if (!t.length)
|
|
284
230
|
return this.mode = "default", null;
|
|
285
231
|
const a = e === "starting-point" ? i.labels.addSpatial.startingPoint : e === "barrier" ? i.labels.addSpatial.barrier : i.labels.addSpatial.stoppingPoint, r = t.length === 1 ? "feature" : "list";
|
|
286
|
-
return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#
|
|
232
|
+
return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#c} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${() => this.#k()} @arcgisPropertyChange=${this.#L} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#v)}></arcgis-features-next>`;
|
|
287
233
|
}
|
|
288
|
-
#
|
|
289
|
-
const { mode: e, _messages: t, _selectedFeature: i, selectedUtilityNetwork: a } = this, r = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o =
|
|
290
|
-
limit: this.#
|
|
234
|
+
#R() {
|
|
235
|
+
const { mode: e, _messages: t, _selectedFeature: i, selectedUtilityNetwork: a } = this, r = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o = g(t.warnings.exceededDisplayLimit, {
|
|
236
|
+
limit: this.#s.toString()
|
|
291
237
|
}), l = i ? !(a?.isUtilityLayer(i.layer) ?? !0) : !0;
|
|
292
|
-
return s`${r && s`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>` || ""}<calcite-button appearance=outline width=full @click=${() => this.#
|
|
238
|
+
return s`${r && s`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>` || ""}<calcite-button appearance=outline width=full @click=${() => this.#o()} slot=footer>${t.buttons.cancel}</calcite-button>${e === "add-spatial-feature" && s`<calcite-button width=full slot=footer appearance=solid @click=${() => this.#x()} .disabled=${l}>${t.buttons.add}</calcite-button>` || ""}`;
|
|
293
239
|
}
|
|
294
|
-
#
|
|
295
|
-
return s`<arcgis-utility-network-trace-
|
|
240
|
+
#h(e, t, i) {
|
|
241
|
+
return s`<arcgis-utility-network-trace-locations .view=${this.view} .traceLocationType=${e} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#F} @arcgisTraceLocationSelectEnd=${this.#I} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#n} .traceLocations=${t} .afterMapInteraction=${this.#D.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`;
|
|
296
242
|
}
|
|
297
|
-
#
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
#Y() {
|
|
301
|
-
return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#u} @arcgisTraceLocationSelectEnd=${this.#g} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#i} .traceLocations=${this.#r} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#_)}></arcgis-utility-network-trace-location-next>`;
|
|
302
|
-
}
|
|
303
|
-
#Z() {
|
|
304
|
-
const { _messages: e } = this, t = this.#H(), i = this.#z(), a = this._namedTraceConfigurations.length && this.traceConfiguration ? s`${this.#w ? this.#K() : null}${this.#b ? this.#X() : null}${this.#Y()}` : null, r = this.selectedUtilityNetwork?.loaded ? s`${i}${a}` : null;
|
|
243
|
+
#z() {
|
|
244
|
+
const { _messages: e } = this, t = this.#V(), i = this.#B(), a = this._namedTraceConfigurations.length && this.traceConfiguration ? s`${this.#m ? this.#h("starting-point", this.#t, this.#C) : null}${this.#f ? this.#h("stopping-point", this.#a, this.#S) : null}${this.#h("barrier", this.#i, this.#$)}` : null, r = this.selectedUtilityNetwork?.loaded ? s`${i}${a}` : null;
|
|
305
245
|
return s`<calcite-block-group .label=${e.labels.traceInputs}>${t}${r}</calcite-block-group>`;
|
|
306
246
|
}
|
|
307
247
|
render() {
|
|
308
248
|
const { mode: e } = this;
|
|
309
|
-
return s`<calcite-panel>${e === "add-spatial-feature" ? this.#
|
|
249
|
+
return s`<calcite-panel>${e === "add-spatial-feature" ? this.#j() : null}<calcite-flow .hidden=${e === "add-spatial-feature"}>${this.#G()}${this.#q()}</calcite-flow>${e !== "default" ? this.#R() : null}</calcite-panel>`;
|
|
310
250
|
}
|
|
311
251
|
}
|
|
312
|
-
|
|
252
|
+
u("arcgis-utility-network-trace-inputs-next", $);
|
|
313
253
|
export {
|
|
314
|
-
|
|
254
|
+
$ as ArcgisUtilityNetworkTraceInputsNext
|
|
315
255
|
};
|
|
@@ -5,7 +5,7 @@ import "@esri/calcite-components/components/calcite-flow-item";
|
|
|
5
5
|
import "../arcgis-features-next/index.js";
|
|
6
6
|
import "@esri/calcite-components/components/calcite-input-message";
|
|
7
7
|
import "@esri/calcite-components/components/calcite-button";
|
|
8
|
-
import "../arcgis-utility-network-trace-
|
|
8
|
+
import "../arcgis-utility-network-trace-locations/index.js";
|
|
9
9
|
import "@esri/calcite-components/components/calcite-block-group";
|
|
10
10
|
import "@esri/calcite-components/components/calcite-panel";
|
|
11
11
|
import "@esri/calcite-components/components/calcite-flow";
|
|
@@ -15,16 +15,28 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
|
15
15
|
* This is a sub-component used by the **ArcgisUtilityNetworkTraceAnalysis** component.
|
|
16
16
|
* It allows users to select locations on the map to use as trace inputs.
|
|
17
17
|
*
|
|
18
|
-
* @since
|
|
18
|
+
* @since 5.2
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
export abstract class
|
|
21
|
+
export abstract class ArcgisUtilityNetworkTraceLocations extends LitElement {
|
|
22
22
|
/** @internal */
|
|
23
23
|
protected _messages: {
|
|
24
24
|
buttons: { clear: string; };
|
|
25
25
|
componentLabel: string;
|
|
26
|
-
errors: {
|
|
27
|
-
|
|
26
|
+
errors: {
|
|
27
|
+
noTerminalSelected: string;
|
|
28
|
+
noHitResult: string;
|
|
29
|
+
missingAttributes: string;
|
|
30
|
+
duplicateTraceLocationDetails: string;
|
|
31
|
+
duplicateTraceLocationDetailsWithinTolerance: string;
|
|
32
|
+
errorAdding: string;
|
|
33
|
+
errorGeneratingTraceLocationDetails: string;
|
|
34
|
+
};
|
|
35
|
+
labels: {
|
|
36
|
+
close: string;
|
|
37
|
+
filterBarrier: string;
|
|
38
|
+
list: string;
|
|
39
|
+
};
|
|
28
40
|
unknown: string;
|
|
29
41
|
types: {
|
|
30
42
|
barrier: {
|
|
@@ -49,8 +61,20 @@ export abstract class ArcgisUtilityNetworkTraceLocationNext extends LitElement {
|
|
|
49
61
|
} & T9nMeta<{
|
|
50
62
|
buttons: { clear: string; };
|
|
51
63
|
componentLabel: string;
|
|
52
|
-
errors: {
|
|
53
|
-
|
|
64
|
+
errors: {
|
|
65
|
+
noTerminalSelected: string;
|
|
66
|
+
noHitResult: string;
|
|
67
|
+
missingAttributes: string;
|
|
68
|
+
duplicateTraceLocationDetails: string;
|
|
69
|
+
duplicateTraceLocationDetailsWithinTolerance: string;
|
|
70
|
+
errorAdding: string;
|
|
71
|
+
errorGeneratingTraceLocationDetails: string;
|
|
72
|
+
};
|
|
73
|
+
labels: {
|
|
74
|
+
close: string;
|
|
75
|
+
filterBarrier: string;
|
|
76
|
+
list: string;
|
|
77
|
+
};
|
|
54
78
|
unknown: string;
|
|
55
79
|
types: {
|
|
56
80
|
barrier: {
|
|
@@ -80,22 +104,22 @@ export abstract class ArcgisUtilityNetworkTraceLocationNext extends LitElement {
|
|
|
80
104
|
*
|
|
81
105
|
* @internal
|
|
82
106
|
*/
|
|
83
|
-
accessor
|
|
107
|
+
accessor afterMapInteraction: ((graphics: Graphic[]) => Promise<Graphic>) | undefined;
|
|
84
108
|
/**
|
|
85
109
|
* If true, the component will not be destroyed automatically when it is
|
|
86
110
|
* disconnected from the document. This is useful when you want to move the
|
|
87
111
|
* 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-
|
|
112
|
+
* is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-locations/#destroy) method when you are done to
|
|
89
113
|
* prevent memory leaks.
|
|
90
114
|
*
|
|
91
115
|
* @default false
|
|
92
116
|
* @example
|
|
93
117
|
* ```html
|
|
94
|
-
* <arcgis-utility-network-trace-
|
|
118
|
+
* <arcgis-utility-network-trace-locations auto-destroy-disabled></arcgis-utility-network-trace-locations>
|
|
95
119
|
* ```
|
|
96
120
|
*
|
|
97
121
|
* ```js
|
|
98
|
-
*
|
|
122
|
+
* utilityNetworkTraceLocationsElement.autoDestroyDisabled = true;
|
|
99
123
|
* ```
|
|
100
124
|
*
|
|
101
125
|
*/
|
|
@@ -106,45 +130,42 @@ export abstract class ArcgisUtilityNetworkTraceLocationNext extends LitElement {
|
|
|
106
130
|
* @internal
|
|
107
131
|
*/
|
|
108
132
|
accessor beforeTraceLocationSelectStart: (() => Promise<void>) | undefined;
|
|
109
|
-
accessor
|
|
110
|
-
accessor
|
|
133
|
+
accessor error: string | undefined;
|
|
134
|
+
accessor filterLayers: Collection<Layer>;
|
|
135
|
+
accessor heading: string | undefined;
|
|
136
|
+
/** @internal */
|
|
137
|
+
get sketchViewModel(): SketchViewModel | null;
|
|
111
138
|
/** @default 0.05 */
|
|
112
139
|
accessor spatialTolerance: number;
|
|
113
|
-
accessor traceLocations: Collection<
|
|
140
|
+
accessor traceLocations: Collection<TraceLocationDetails>;
|
|
114
141
|
/** @default "starting-point" */
|
|
115
142
|
accessor traceLocationType: TraceLocationType;
|
|
116
143
|
/** @required */
|
|
117
144
|
accessor utilityNetwork: UtilityNetwork | undefined;
|
|
118
145
|
/**
|
|
119
146
|
* The view associated with the component.
|
|
120
|
-
* > **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-
|
|
147
|
+
* > **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-locations component will be associated with a map or scene component rather than using the `view` property.
|
|
121
148
|
*/
|
|
122
149
|
accessor view: MapView | undefined;
|
|
123
150
|
/** Permanently destroy the component. */
|
|
124
151
|
destroy(): Promise<void>;
|
|
125
|
-
readonly
|
|
126
|
-
/**
|
|
127
|
-
* Fires when the user completes the selection of a trace location.
|
|
128
|
-
*
|
|
129
|
-
* @internal
|
|
130
|
-
*/
|
|
152
|
+
readonly arcgisError: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
153
|
+
/** Fires when the user completes the selection of a trace location. */
|
|
131
154
|
readonly arcgisTraceLocationSelectEnd: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
132
155
|
/**
|
|
133
156
|
* Fires when the user begins selection of a trace location.
|
|
134
157
|
* Can be prevented to stop the selection.
|
|
135
|
-
*
|
|
136
|
-
* @internal
|
|
137
158
|
*/
|
|
138
159
|
readonly arcgisTraceLocationSelectStart: import("@arcgis/lumina").TargetedEvent<this, SelectStartPayload>;
|
|
139
160
|
readonly "@eventTypes": {
|
|
140
|
-
|
|
141
|
-
arcgisTraceLocationSelectEnd:
|
|
142
|
-
arcgisTraceLocationSelectStart:
|
|
161
|
+
arcgisError: ArcgisUtilityNetworkTraceLocations["arcgisError"]["detail"];
|
|
162
|
+
arcgisTraceLocationSelectEnd: ArcgisUtilityNetworkTraceLocations["arcgisTraceLocationSelectEnd"]["detail"];
|
|
163
|
+
arcgisTraceLocationSelectStart: ArcgisUtilityNetworkTraceLocations["arcgisTraceLocationSelectStart"]["detail"];
|
|
143
164
|
};
|
|
144
165
|
}
|
|
145
166
|
|
|
146
167
|
/** @internal */
|
|
147
|
-
export interface
|
|
168
|
+
export interface TraceLocationDetails {
|
|
148
169
|
traceLocation: TraceLocation;
|
|
149
170
|
flagProperties: {
|
|
150
171
|
title: string;
|