@arcgis/map-components 6.0.0-next.26 → 6.0.0-next.27
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/27VBOPFN.js +2 -0
- package/dist/cdn/{6K4IASNK.js → 2JXK3AW7.js} +1 -1
- package/dist/cdn/{EZHYSI6R.js → 4HCQOJIM.js} +1 -1
- package/dist/cdn/{FZGMIIBX.js → CPWIRCCP.js} +1 -1
- package/dist/cdn/IJ7EV66N.js +2 -0
- package/dist/cdn/JNNI75UW.js +2 -0
- package/dist/cdn/KJISACOI.js +2 -0
- package/dist/cdn/{TTERKXN5.js → LP4ETJF7.js} +1 -1
- package/dist/cdn/{55VX76T5.js → PD4ELTMF.js} +1 -1
- package/dist/cdn/R5PT7JNG.js +2 -0
- package/dist/cdn/RSKBANQ5.js +2 -0
- package/dist/cdn/{PRUHLC54.js → TDQYO6FQ.js} +1 -1
- package/dist/cdn/{6DRXFSTW.js → UI5E3MX7.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/print-exports-panel-item-popover.js +1 -1
- package/dist/components/arcgis-directional-pad/customElement.js +53 -58
- package/dist/components/arcgis-expand/customElement.d.ts +47 -1
- package/dist/components/arcgis-expand/customElement.js +47 -47
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +8 -0
- package/dist/components/arcgis-selection-toolbar/customElement.js +23 -17
- package/dist/components/arcgis-utility-network-picker/customElement.d.ts +170 -6
- package/dist/components/arcgis-utility-network-picker/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +5 -4
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +19 -15
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +0 -6
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +5 -4
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +50 -46
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +9 -8
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -4
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +12 -12
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +0 -2
- 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 +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/package.json +7 -7
- package/dist/cdn/CVLOQWUD.js +0 -2
- package/dist/cdn/HADZXZIE.js +0 -2
- package/dist/cdn/HTCPPGCR.js +0 -2
- package/dist/cdn/LHYI2QBZ.js +0 -2
- package/dist/cdn/PPGKQRNY.js +0 -2
- package/dist/cdn/PW3QCZXY.js +0 -2
- /package/dist/cdn/{ROHGHCK6.js → WFTJ4E4F.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as F } from "../../chunks/runtime.js";
|
|
3
3
|
import { ref as E } from "lit/directives/ref.js";
|
|
4
4
|
import { getOrCreateMapValue as v } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
5
5
|
import { LitElement as L, createEvent as y } from "@arcgis/lumina";
|
|
6
|
-
import { usePropertyChange as C, bypassReadOnly as
|
|
6
|
+
import { usePropertyChange as C, bypassReadOnly as l } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { log as d, composeMissingPropertyMessage as m } from "@arcgis/toolkit/log";
|
|
8
8
|
import { css as T, html as f } from "lit";
|
|
9
9
|
import { u as k } from "../../chunks/useT9n.js";
|
|
@@ -22,7 +22,7 @@ class D extends L {
|
|
|
22
22
|
this.styles = $;
|
|
23
23
|
}
|
|
24
24
|
#o;
|
|
25
|
-
get #
|
|
25
|
+
get #y() {
|
|
26
26
|
if (!this.traceResult)
|
|
27
27
|
return !1;
|
|
28
28
|
const { elements: e, globalFunctionResults: t, aggregatedGeometry: s } = this.traceResult;
|
|
@@ -58,7 +58,7 @@ class D extends L {
|
|
|
58
58
|
return this._featuresComponentElement?.selectedDrillInFeature ?? this._featuresComponentElement?.selectedFeature ?? void 0;
|
|
59
59
|
}
|
|
60
60
|
clearResult() {
|
|
61
|
-
|
|
61
|
+
l(() => this.traceResult = void 0), this.#d();
|
|
62
62
|
}
|
|
63
63
|
async destroy() {
|
|
64
64
|
this.clearResult(), await this.manager.destroy(), await this._featuresComponentElement?.destroy();
|
|
@@ -70,16 +70,16 @@ class D extends L {
|
|
|
70
70
|
d("warn", this, "This component must be used as a child of `arcgis-utility-network-trace-results`.");
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const t = (s) => this.#
|
|
74
|
-
return e.addEventListener("arcgisPropertyChange", t),
|
|
73
|
+
const t = (s) => this.#m(s);
|
|
74
|
+
return e.addEventListener("arcgisPropertyChange", t), l(() => {
|
|
75
75
|
this.traceResult = e.traceResult, this.utilityNetwork = e.utilityNetwork, this.view = e.view;
|
|
76
76
|
}), () => {
|
|
77
77
|
e.removeEventListener("arcgisPropertyChange", t);
|
|
78
78
|
};
|
|
79
|
-
}), this.traceResult && this.#
|
|
79
|
+
}), this.traceResult && this.#f();
|
|
80
80
|
}
|
|
81
81
|
willUpdate(e) {
|
|
82
|
-
e.has("traceResult") && this.#
|
|
82
|
+
e.has("traceResult") && this.#f(), e.has("disableHighlight") && this.#c();
|
|
83
83
|
const t = this.hasContent;
|
|
84
84
|
t !== this.#n && this.el.isConnected && this.arcgisPropertyChange.emit({ name: "hasContent" }), this.#n = t;
|
|
85
85
|
const s = this.isFeaturesListShown;
|
|
@@ -88,23 +88,23 @@ class D extends L {
|
|
|
88
88
|
loaded() {
|
|
89
89
|
this.traceResult && (this.traceResult.elements || d("error", this, m("traceResult.elements")), this.utilityNetwork || d("error", this, m("utilityNetwork")));
|
|
90
90
|
}
|
|
91
|
-
#
|
|
91
|
+
#m(e) {
|
|
92
92
|
if (e.target !== this.#u)
|
|
93
93
|
return;
|
|
94
94
|
const { target: t } = e;
|
|
95
95
|
switch (e.detail.name) {
|
|
96
96
|
case "traceResult":
|
|
97
|
-
|
|
97
|
+
l(() => this.traceResult = t.traceResult);
|
|
98
98
|
break;
|
|
99
99
|
case "utilityNetwork":
|
|
100
|
-
|
|
100
|
+
l(() => this.utilityNetwork = t.utilityNetwork);
|
|
101
101
|
break;
|
|
102
102
|
case "view":
|
|
103
|
-
|
|
103
|
+
l(() => this.view = t.view);
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
#
|
|
107
|
+
#g() {
|
|
108
108
|
this.#t.forEach(({ handle: e }) => e?.remove()), this.#t = [];
|
|
109
109
|
}
|
|
110
110
|
#c() {
|
|
@@ -112,13 +112,13 @@ class D extends L {
|
|
|
112
112
|
this.disableHighlight ? (e.handle?.remove(), e.handle = void 0) : e.handle = e.layerView.highlight(e.objectIds);
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
#
|
|
115
|
+
#p(e) {
|
|
116
116
|
e && (this._featuresComponentElement = e);
|
|
117
117
|
}
|
|
118
|
-
#
|
|
118
|
+
#w(e) {
|
|
119
119
|
return Array.from(new Map(e.map((t) => [t.globalId, t])).values());
|
|
120
120
|
}
|
|
121
|
-
#
|
|
121
|
+
#R(e) {
|
|
122
122
|
if (e == null || !this.#e.length)
|
|
123
123
|
return;
|
|
124
124
|
const t = this.#r.get(e);
|
|
@@ -127,14 +127,14 @@ class D extends L {
|
|
|
127
127
|
const s = this.#e.find((r) => "layerId" in r && r.layerId === e);
|
|
128
128
|
return s && this.#r.set(e, s), s;
|
|
129
129
|
}
|
|
130
|
-
#
|
|
130
|
+
#b() {
|
|
131
131
|
const { traceResult: e, utilityNetwork: t, view: s } = this;
|
|
132
132
|
if (!t || !e?.elements?.length || !s)
|
|
133
133
|
return;
|
|
134
134
|
const r = (i) => (S(i.layer) || w(i.layer)) && t.isUtilityLayer(i.layer), n = t.getObjectIdsFromElements(e.elements), h = s.allLayerViews.filter(r);
|
|
135
|
-
n.forEach(({ layerUrl: i, objectIds:
|
|
136
|
-
const a = Number(i.split("/").pop()), c = h.find(({ layer:
|
|
137
|
-
c && this.#t.push({ layerView: c, objectIds:
|
|
135
|
+
n.forEach(({ layerUrl: i, objectIds: o }) => {
|
|
136
|
+
const a = Number(i.split("/").pop()), c = h.find(({ layer: b }) => b.layerId === a);
|
|
137
|
+
c && this.#t.push({ layerView: c, objectIds: o });
|
|
138
138
|
}), this.#c();
|
|
139
139
|
}
|
|
140
140
|
async #F(e) {
|
|
@@ -152,22 +152,26 @@ class D extends L {
|
|
|
152
152
|
const h = this.#e.filter((i) => !i.loaded).map((i) => i.load({ signal: e }));
|
|
153
153
|
if (h.length > 0) {
|
|
154
154
|
const i = await Promise.allSettled(h);
|
|
155
|
-
u(e), i.forEach((
|
|
156
|
-
|
|
155
|
+
u(e), i.forEach((o) => {
|
|
156
|
+
o.status === "rejected" && d("error", this, `Failed to load layer. Reason: ${o.reason}`);
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
|
|
161
|
-
this.
|
|
160
|
+
#d() {
|
|
161
|
+
this._isFeaturesSelected = this.#y, this.#s?.abort(), this.#g(), l(() => this.features = []), this.#e = [], this.#i.clear(), this.#r.clear(), this.#l.clear(), this.#a.clear(), l(() => this.state = "ready");
|
|
162
|
+
}
|
|
163
|
+
async #f() {
|
|
164
|
+
if (this.#d(), !this.traceResult)
|
|
165
|
+
return;
|
|
162
166
|
const e = () => {
|
|
163
|
-
|
|
167
|
+
l(() => this.state = "ready"), this.arcgisResultReady.emit();
|
|
164
168
|
}, t = I(async (s) => {
|
|
165
169
|
const r = this.traceResult?.elements;
|
|
166
170
|
if (!r?.length) {
|
|
167
171
|
e();
|
|
168
172
|
return;
|
|
169
173
|
}
|
|
170
|
-
|
|
174
|
+
l(() => this.state = "loading"), this.#L(r), await this.#F(s), await this.#v(s), u(s), this.#b(), e();
|
|
171
175
|
});
|
|
172
176
|
this.#s = t;
|
|
173
177
|
try {
|
|
@@ -175,60 +179,60 @@ class D extends L {
|
|
|
175
179
|
} catch (s) {
|
|
176
180
|
g(s) || (p(s, this, "Error while loading trace result"), this.#s === t && e());
|
|
177
181
|
} finally {
|
|
178
|
-
this.#s === t && (this.#s = void 0,
|
|
182
|
+
this.#s === t && (this.#s = void 0, l(() => this.state = "ready"));
|
|
179
183
|
}
|
|
180
184
|
}
|
|
181
|
-
async #
|
|
185
|
+
async #E([e, t], s) {
|
|
182
186
|
u(s);
|
|
183
|
-
const r = this.utilityNetwork?.getLayerIdBySourceId(e), n = this.#
|
|
187
|
+
const r = this.utilityNetwork?.getLayerIdBySourceId(e), n = this.#R(r);
|
|
184
188
|
if (r == null || !n)
|
|
185
189
|
return;
|
|
186
|
-
const h = this.#
|
|
190
|
+
const h = this.#w(t), i = n.createQuery();
|
|
187
191
|
i.gdbVersion = this.utilityNetwork?.gdbVersion, i.objectIds = h.map((a) => a.objectId), i.outFields = ["*"];
|
|
188
|
-
const { features:
|
|
189
|
-
u(s),
|
|
192
|
+
const { features: o } = await P(n, i, { signal: s });
|
|
193
|
+
u(s), o.forEach((a) => {
|
|
190
194
|
const c = a.layer;
|
|
191
195
|
a.getEffectivePopupTemplate(this.#o) || (a.popupTemplate = c.createPopupTemplate());
|
|
192
|
-
}), w(n) ?
|
|
196
|
+
}), w(n) ? o.forEach((a) => {
|
|
193
197
|
v(this.#l, a.layer.subtypeCode, () => []).push(a);
|
|
194
|
-
}) : this.#i.set(r,
|
|
198
|
+
}) : this.#i.set(r, o);
|
|
195
199
|
}
|
|
196
|
-
async #
|
|
200
|
+
async #v(e) {
|
|
197
201
|
const t = Array.from(this.#a.entries());
|
|
198
202
|
if (!t.length)
|
|
199
203
|
return;
|
|
200
|
-
const s = t.map((i) => this.#
|
|
201
|
-
u(e), r.forEach((i,
|
|
204
|
+
const s = t.map((i) => this.#E(i, e)), r = await Promise.allSettled(s);
|
|
205
|
+
u(e), r.forEach((i, o) => {
|
|
202
206
|
if (i.status === "rejected") {
|
|
203
|
-
const [a] = t[
|
|
207
|
+
const [a] = t[o];
|
|
204
208
|
d("error", this, `Failed to query features for source ${a}. Reason: ${i.reason}`);
|
|
205
209
|
}
|
|
206
210
|
});
|
|
207
211
|
const n = Array.from(this.#i.values()), h = Array.from(this.#l.values());
|
|
208
|
-
|
|
212
|
+
l(() => this.features = n.concat(h).flat());
|
|
209
213
|
}
|
|
210
|
-
#
|
|
214
|
+
#L(e) {
|
|
211
215
|
this.#a = Map.groupBy(e, ({ networkSourceId: t }) => t);
|
|
212
216
|
}
|
|
213
|
-
#
|
|
217
|
+
#C(e) {
|
|
214
218
|
const { detail: t } = e;
|
|
215
219
|
(t.name === "selectedDrillInFeature" || t.name === "selectedFeature") && (e.stopPropagation(), this.arcgisPropertyChange.emit({ name: "selectedResultFeature" }));
|
|
216
220
|
}
|
|
217
|
-
#
|
|
221
|
+
#T(e) {
|
|
218
222
|
e.stopPropagation(), this.arcgisTriggerAction.emit(e.detail);
|
|
219
223
|
}
|
|
220
|
-
#
|
|
224
|
+
#k() {
|
|
221
225
|
return f`<div class="features-hidden">${this._messages.resultFeaturesAreHidden}</div>`;
|
|
222
226
|
}
|
|
223
|
-
#
|
|
227
|
+
#I() {
|
|
224
228
|
const { heading: e, _messages: t } = this;
|
|
225
229
|
return f`<calcite-list .label=${t.headings.features}><calcite-list-item class="elements-list-item" .label=${e || t.headings.features} @calciteListItemSelect=${() => this._isFeaturesSelected = !0}><calcite-chip .label=${t.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon flip-rtl icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`;
|
|
226
230
|
}
|
|
227
231
|
render() {
|
|
228
|
-
return this.hasContent ? this.hideFeatureResults ? this.#
|
|
232
|
+
return this.hasContent ? this.hideFeatureResults ? this.#k() : this.isFeaturesListShown ? f`<arcgis-features-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#o} .features=${this.features} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} initial-display-mode=list .messageOverrides=${this.messageOverrides} open .referenceElement=${this.referenceElement} .view=${this.view} @arcgisClose=${() => this._isFeaturesSelected = !1} @arcgisPropertyChange=${this.#C} @arcgisTriggerAction=${this.#T} ${E(this.#p)}></arcgis-features-next>` : this.#I() : null;
|
|
229
233
|
}
|
|
230
234
|
}
|
|
231
|
-
|
|
235
|
+
F("arcgis-utility-network-trace-elements-result-item", D);
|
|
232
236
|
export {
|
|
233
237
|
D as ArcgisUtilityNetworkTraceElementsResultItem
|
|
234
238
|
};
|
package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts
CHANGED
|
@@ -120,7 +120,7 @@ export abstract class ArcgisUtilityNetworkTraceFunctionsResultItem extends LitEl
|
|
|
120
120
|
*/
|
|
121
121
|
get traceResult(): TraceResult | undefined;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* Clears [traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-functions-result-item/#traceResult).
|
|
124
124
|
* Does not emit [@arcgisResultReady](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-functions-result-item/#event-arcgisResultReady).
|
|
125
125
|
*/
|
|
126
126
|
clearResult(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as g } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as d, createEvent as R } from "@arcgis/lumina";
|
|
4
|
-
import { usePropertyChange as f, bypassReadOnly as
|
|
4
|
+
import { usePropertyChange as f, bypassReadOnly as a } from "@arcgis/lumina/controllers";
|
|
5
5
|
import { log as i, composeEmptyPropertyMessage as p } from "@arcgis/toolkit/log";
|
|
6
6
|
import { css as b, html as l } from "lit";
|
|
7
7
|
import { u as y } from "../../chunks/useT9n.js";
|
|
@@ -29,6 +29,7 @@ class v extends d {
|
|
|
29
29
|
return !!this.traceResult?.globalFunctionResults.length;
|
|
30
30
|
}
|
|
31
31
|
clearResult() {
|
|
32
|
+
a(() => this.traceResult = void 0);
|
|
32
33
|
}
|
|
33
34
|
async destroy() {
|
|
34
35
|
await this.manager.destroy();
|
|
@@ -40,8 +41,8 @@ class v extends d {
|
|
|
40
41
|
i("warn", this, "This component must be used as a child of `arcgis-utility-network-trace-results`.");
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
|
-
const e = (
|
|
44
|
-
return t.addEventListener("arcgisPropertyChange", e),
|
|
44
|
+
const e = (r) => this.#s(r);
|
|
45
|
+
return t.addEventListener("arcgisPropertyChange", e), a(() => {
|
|
45
46
|
this.traceResult = t.traceResult;
|
|
46
47
|
}), () => {
|
|
47
48
|
t.removeEventListener("arcgisPropertyChange", e);
|
|
@@ -49,7 +50,7 @@ class v extends d {
|
|
|
49
50
|
}), this.traceResult && this.#e();
|
|
50
51
|
}
|
|
51
52
|
willUpdate(t) {
|
|
52
|
-
t.has("traceResult") && this.#e();
|
|
53
|
+
t.has("traceResult") && this.traceResult && this.#e();
|
|
53
54
|
}
|
|
54
55
|
loaded() {
|
|
55
56
|
this.traceResult && !this.traceResult.globalFunctionResults.length && i("warn", this, p("traceResult.globalFunctionResults"));
|
|
@@ -58,16 +59,16 @@ class v extends d {
|
|
|
58
59
|
if (t.target !== this.#t)
|
|
59
60
|
return;
|
|
60
61
|
const { target: e } = t;
|
|
61
|
-
t.detail.name === "traceResult" &&
|
|
62
|
+
t.detail.name === "traceResult" && a(() => this.traceResult = e.traceResult);
|
|
62
63
|
}
|
|
63
64
|
#e() {
|
|
64
|
-
|
|
65
|
+
a(() => this.state = "ready"), this.arcgisResultReady.emit();
|
|
65
66
|
}
|
|
66
67
|
render() {
|
|
67
68
|
if (!this.hasContent)
|
|
68
69
|
return null;
|
|
69
|
-
const { heading: t, _messages: e } = this, { globalFunctionResults:
|
|
70
|
-
return l`<div class="functions-heading">${t || e.functions}</div><calcite-table .caption=${e.labels.functionResults}>${
|
|
70
|
+
const { heading: t, _messages: e } = this, { globalFunctionResults: r } = this.traceResult;
|
|
71
|
+
return l`<div class="functions-heading">${t || e.functions}</div><calcite-table .caption=${e.labels.functionResults}>${r.filter((s) => s.networkAttributeName != null && s.result != null && s.functionType != null).map((s) => {
|
|
71
72
|
const { functionName: o, networkAttributeName: n, functionType: u, result: h } = s, m = o || `${n} ${u}`;
|
|
72
73
|
return l`<calcite-table-row><calcite-table-cell>${m}</calcite-table-cell><calcite-table-cell>${h}</calcite-table-cell></calcite-table-row>`;
|
|
73
74
|
})}</calcite-table>`;
|
|
@@ -354,11 +354,9 @@ export abstract class ArcgisUtilityNetworkTraceResults extends LitElement {
|
|
|
354
354
|
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#state) to `"ready"`, and emits
|
|
355
355
|
* [@arcgisTraceResultClear](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#event-arcgisTraceResultClear).
|
|
356
356
|
*
|
|
357
|
-
*
|
|
358
|
-
* component's clear results action also clears its synchronized
|
|
357
|
+
* Clears
|
|
359
358
|
* [traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#traceResult) and
|
|
360
|
-
* [traceError](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#traceError) values.
|
|
361
|
-
* change those properties; set them to `undefined` when using this component independently.
|
|
359
|
+
* [traceError](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#traceError) values.
|
|
362
360
|
*/
|
|
363
361
|
clearResults(): void;
|
|
364
362
|
/** Permanently destroy the component. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as E } from "../../chunks/runtime.js";
|
|
3
3
|
import { ref as d } from "lit/directives/ref.js";
|
|
4
4
|
import u from "@arcgis/core/Color.js";
|
|
5
|
-
import { LitElement as
|
|
5
|
+
import { LitElement as $, createEvent as c, safeClassMap as b } from "@arcgis/lumina";
|
|
6
6
|
import { usePropertyChange as C, bypassReadOnly as g } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { slotChangeGetAssignedElements as w } from "@arcgis/toolkit/dom/slots";
|
|
8
8
|
import { log as G, composeMissingPropertyMessage as _ } from "@arcgis/toolkit/log";
|
|
@@ -16,7 +16,7 @@ const L = D`:host{height:100%}slot:not([hidden]),.default-result-items:not([hidd
|
|
|
16
16
|
noValidControllers: -2147208935,
|
|
17
17
|
pathNotFound: -2147208444
|
|
18
18
|
};
|
|
19
|
-
class P extends
|
|
19
|
+
class P extends $ {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments), this._messages = F({ blocking: !0 }), this.#s = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Set(), this.#i = /* @__PURE__ */ new Map(), this.#a = [], this.#r = /* @__PURE__ */ new Map(), this.#o = /* @__PURE__ */ new Set(), this.#g = (e) => {
|
|
22
22
|
const { detail: t, target: s } = e;
|
|
@@ -56,7 +56,7 @@ class P extends b {
|
|
|
56
56
|
get #l() {
|
|
57
57
|
return a(this.el).length > 0;
|
|
58
58
|
}
|
|
59
|
-
get #
|
|
59
|
+
get #b() {
|
|
60
60
|
return this.traceResult ? this.#l ? a(this.el).filter(p) : this.#D(this.traceResult) : [];
|
|
61
61
|
}
|
|
62
62
|
get #C() {
|
|
@@ -83,7 +83,7 @@ class P extends b {
|
|
|
83
83
|
return this._defaultElementsResultItem ? this._defaultElementsResultItem.features : this.#a[0]?.features ?? [];
|
|
84
84
|
}
|
|
85
85
|
clearResults() {
|
|
86
|
-
this.#y(), this.arcgisTraceResultClear.emit();
|
|
86
|
+
this.traceResult = void 0, this.traceError = void 0, this.#y(), this.arcgisTraceResultClear.emit();
|
|
87
87
|
}
|
|
88
88
|
async destroy() {
|
|
89
89
|
const e = a(this.el).filter(k), t = await Promise.allSettled([
|
|
@@ -99,7 +99,7 @@ class P extends b {
|
|
|
99
99
|
load() {
|
|
100
100
|
this.manager.onLifecycle(() => {
|
|
101
101
|
const e = a(this.el);
|
|
102
|
-
return this
|
|
102
|
+
return this.#E(e), this.#I(e), () => {
|
|
103
103
|
for (const t of this.#i.keys())
|
|
104
104
|
this.#v(t);
|
|
105
105
|
for (const t of this.#r.keys())
|
|
@@ -163,7 +163,7 @@ class P extends b {
|
|
|
163
163
|
}
|
|
164
164
|
#L(e) {
|
|
165
165
|
const t = w(e);
|
|
166
|
-
this
|
|
166
|
+
this.#E(t), this.#I(t);
|
|
167
167
|
}
|
|
168
168
|
#f(e) {
|
|
169
169
|
e.forEach((t) => {
|
|
@@ -171,7 +171,7 @@ class P extends b {
|
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
#P() {
|
|
174
|
-
this.#t = new Set(this.#
|
|
174
|
+
this.#t = new Set(this.#b), this.#t.size === 0 ? this.#u() : g(() => this.state = "loading");
|
|
175
175
|
}
|
|
176
176
|
#T(e) {
|
|
177
177
|
if (this.#r.has(e))
|
|
@@ -204,7 +204,7 @@ class P extends b {
|
|
|
204
204
|
const s = this.#e;
|
|
205
205
|
s && (!s.isFeaturesListShown || s !== this._defaultElementsResultItem && !t.includes(s)) && (this.#e = void 0, this.#d()), this.#e ??= t.find((i) => i.isFeaturesListShown), this.#e && this.#f(e), this.#a = t, this.requestUpdate();
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
#E(e) {
|
|
208
208
|
const t = new Set(e.filter(p));
|
|
209
209
|
for (const s of this.#o)
|
|
210
210
|
t.has(s) || (this.#v(s), this.#t.delete(s));
|
|
@@ -218,7 +218,7 @@ class P extends b {
|
|
|
218
218
|
render() {
|
|
219
219
|
const { traceError: e, traceResult: t } = this, s = !e && t && this.#n && !this.#l ? this.#H(t) : void 0, i = !!t && !e && this.#m && (this.#h || this.#R), h = r`<slot .hidden=${!i} @slotchange=${this.#L}></slot>`;
|
|
220
220
|
let l;
|
|
221
|
-
return e ? l = this.#O(e) : t ? !this.#n && !this.#h ? l = this
|
|
221
|
+
return e ? l = this.#O(e) : t ? !this.#n && !this.#h ? l = this.#$() : this.state === "ready" && !this.#m && (l = this.#l && this._slottedDefaultResultItems.length && !this.#R ? this.#N() : this.#$()) : l = this.#B(), r`<calcite-block class=${b({
|
|
222
222
|
"results-block": !0,
|
|
223
223
|
"features-list-active": !!this.#e
|
|
224
224
|
})} .description=${this.heading} .expandable=${this.expandable} .expanded=${this.expanded} .heading=${this._messages.headings.traceResultsGeneric} .label=${this._messages.headings.traceResultsGeneric} .loading=${this.state === "loading"}>${h}${s}${l}</calcite-block>`;
|
|
@@ -249,7 +249,7 @@ class P extends b {
|
|
|
249
249
|
}
|
|
250
250
|
return r`<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${t.traceFailedHeading}</div><div class="no-results-description">${t.traceFailedDescription}</div><div class="no-results-description">${s}</div></div>`;
|
|
251
251
|
}
|
|
252
|
-
|
|
252
|
+
#$() {
|
|
253
253
|
const { _messages: e } = this;
|
|
254
254
|
return r`<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${e.noResultsHeading}</div><div class="no-results-description">${e.noResultsDescription}</div></div>`;
|
|
255
255
|
}
|
|
@@ -258,7 +258,7 @@ class P extends b {
|
|
|
258
258
|
return r`<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${e.noTraceConfigHeading}</div><div class="no-results-description">${e.noTraceConfigDescription}</div></div>`;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
E("arcgis-utility-network-trace-results", P);
|
|
262
262
|
export {
|
|
263
263
|
P as ArcgisUtilityNetworkTraceResults
|
|
264
264
|
};
|
|
@@ -105,8 +105,6 @@ import type { FlowItem } from "@esri/calcite-components/components/calcite-flow-
|
|
|
105
105
|
* document.getElementById("clear-trace-results").addEventListener("click", () => {
|
|
106
106
|
* for (const results of resultsComponents) {
|
|
107
107
|
* results.clearResults();
|
|
108
|
-
* results.traceResult = undefined;
|
|
109
|
-
* results.traceError = undefined;
|
|
110
108
|
* }
|
|
111
109
|
* });
|
|
112
110
|
* ```
|