@arcgis/map-components 5.2.0-next.76 → 5.2.0-next.78
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/4FN75DFQ.js +2 -0
- package/dist/cdn/{VJIYYZW3.js → D4HG2OIN.js} +1 -1
- package/dist/cdn/FOZXZGEZ.js +2 -0
- package/dist/cdn/HTL73ZTA.js +2 -0
- package/dist/cdn/HZVC4F3N.js +2 -0
- package/dist/cdn/OBHCFXFW.js +2 -0
- package/dist/cdn/S55YL3HD.js +2 -0
- package/dist/cdn/{VQG7S23K.js → SLPJAJDI.js} +1 -1
- package/dist/cdn/UFUUA7WI.js +2 -0
- package/dist/cdn/VGMTHIUW.js +2 -0
- package/dist/cdn/{YJYUG3DP.js → YUJMRIVW.js} +1 -1
- package/dist/cdn/assets/features-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-trace-functions-result-item/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-list-item.js +35 -24
- package/dist/chunks/layer-list-next.js +1 -1
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +18 -21
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +12 -12
- package/dist/components/arcgis-basemap-layer-list-next/index.js +2 -2
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +19 -14
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +26 -26
- package/dist/components/arcgis-catalog-layer-list-next/index.js +1 -1
- package/dist/components/arcgis-feature-attachments/customElement.js +13 -13
- package/dist/components/arcgis-features-next/customElement.d.ts +9 -0
- package/dist/components/arcgis-features-next/customElement.js +126 -108
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +5 -5
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +12 -12
- package/dist/components/arcgis-layer-list-next/types.d.ts +4 -4
- package/dist/components/arcgis-table-list-next/customElement.d.ts +17 -13
- package/dist/components/arcgis-table-list-next/customElement.js +11 -11
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +30 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +34 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/index.js +4 -0
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +51 -58
- package/dist/components/arcgis-utility-network-trace-results-next/index.js +1 -3
- 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 +4 -0
- package/dist/loader.js +2 -1
- package/dist/types/lumina.d.ts +6 -1
- package/dist/types/preact.d.ts +7 -1
- package/dist/types/react.d.ts +8 -1
- package/dist/types/stencil.d.ts +6 -1
- package/dist/utils/layer-list-utils.d.ts +6 -6
- package/package.json +4 -4
- package/dist/cdn/D6Z3MYCF.js +0 -2
- package/dist/cdn/GVCVI2FM.js +0 -2
- package/dist/cdn/H5BVJ264.js +0 -2
- package/dist/cdn/R5ZY52DF.js +0 -2
- package/dist/cdn/RIZHD5EC.js +0 -2
- package/dist/cdn/TKTHZ2GE.js +0 -2
- package/dist/cdn/ZWAOPC3F.js +0 -2
|
@@ -10,14 +10,14 @@ import { css as b, html as l } from "lit";
|
|
|
10
10
|
import { u as w } from "../../chunks/useT9n.js";
|
|
11
11
|
import { l as $ } from "../../chunks/async-utils.js";
|
|
12
12
|
import { q as R, c as C } from "../../chunks/layer-utils.js";
|
|
13
|
-
const E = b`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features-next{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{margin:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.
|
|
13
|
+
const E = b`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features-next{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{margin:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`, u = {
|
|
14
14
|
dirtyAreasDiscovered: -2147208511,
|
|
15
15
|
noValidControllers: -2147208935,
|
|
16
16
|
pathNotFound: -2147208444
|
|
17
17
|
};
|
|
18
18
|
class F extends f {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this._messages = w({ blocking: !0 }), this.#l = !0, this.#t = [], this.#s = /* @__PURE__ */ new Map(), this.#c = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map(), this.#
|
|
20
|
+
super(...arguments), this._messages = w({ blocking: !0 }), this.#l = !0, this.#t = [], this.#s = /* @__PURE__ */ new Map(), this.#c = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map(), this.#a = [], this._aggregatedGeometryDisabled = !1, this.aggregatedGeometryGraphicsColor = new y([255, 255, 0, 0.6]), this.hideActionBar = !1, this.hideFeatureResults = !1, this.isElementsSelected = !1, this.layers = [], this.state = "ready", this.traceResultFeatures = [], this.autoDestroyDisabled = !1, this.arcgisAggregatedGeometryGraphicsColorChange = d(), this.arcgisHideGraphicsChange = d(), this.arcgisSelectedResultTypeChange = d(), this.arcgisTraceResultFeaturesReady = d();
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
23
|
this.properties = { _aggregatedGeometryDisabled: 16, _featuresComponentElement: 16, aggregatedGeometryGraphicsColor: 0, hideActionBar: 5, hideFeatureResults: 5, isElementsSelected: 5, layers: 0, messageOverrides: 0, numResults: 32, referenceElement: 1, state: 1, traceConfigTitle: 1, traceError: 0, traceResult: 0, traceResultFeatures: 0, utilityNetwork: 0, view: 0, autoDestroyDisabled: 5 };
|
|
@@ -31,8 +31,8 @@ class F extends f {
|
|
|
31
31
|
#s;
|
|
32
32
|
#c;
|
|
33
33
|
#i;
|
|
34
|
-
#a;
|
|
35
34
|
#r;
|
|
35
|
+
#a;
|
|
36
36
|
get numResults() {
|
|
37
37
|
return this.traceResultFeatures.length + this.#t.length;
|
|
38
38
|
}
|
|
@@ -40,7 +40,7 @@ class F extends f {
|
|
|
40
40
|
this.#n?.destroy();
|
|
41
41
|
}
|
|
42
42
|
async destroy() {
|
|
43
|
-
this.#s.clear(), this.#i.clear(), this.#
|
|
43
|
+
this.#s.clear(), this.#i.clear(), this.#r.clear(), this.#n?.destroy(), this._featuresComponentElement?.destroy(), await this.manager.destroy();
|
|
44
44
|
}
|
|
45
45
|
load() {
|
|
46
46
|
this.traceResult && (this.#b(), this.#f().then(() => this.#v()).finally(() => {
|
|
@@ -63,48 +63,48 @@ class F extends f {
|
|
|
63
63
|
e && (this._featuresComponentElement = e);
|
|
64
64
|
}
|
|
65
65
|
async #g([e, t]) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
this.#t.push(...
|
|
66
|
+
const i = this.utilityNetwork?.getLayerIdBySourceId(e), s = this.#m(i), r = this.#p(t);
|
|
67
|
+
if (i == null || !s) {
|
|
68
|
+
this.#t.push(...r);
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
const { features: c } = await R(
|
|
71
|
+
const a = s.createQuery();
|
|
72
|
+
a.gdbVersion = this.utilityNetwork?.gdbVersion, a.objectIds = r.map((n) => n.objectId), a.outFields = ["*"];
|
|
73
|
+
const { features: c } = await R(s, a);
|
|
74
74
|
c.forEach((n) => {
|
|
75
75
|
const m = n.layer;
|
|
76
76
|
n.getEffectivePopupTemplate(this.#l) || (n.popupTemplate = m.createPopupTemplate());
|
|
77
|
-
}), C(
|
|
77
|
+
}), C(s) ? c.forEach((n) => this.#o(this.#i, n.layer.subtypeCode, n)) : this.#s.set(i, c);
|
|
78
78
|
}
|
|
79
|
-
#o(e, t,
|
|
80
|
-
const
|
|
81
|
-
|
|
79
|
+
#o(e, t, i) {
|
|
80
|
+
const s = e.get(t);
|
|
81
|
+
s == null ? e.set(t, [i]) : s.push(i);
|
|
82
82
|
}
|
|
83
83
|
#m(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return;
|
|
86
|
-
const t = this.#c,
|
|
87
|
-
if (
|
|
88
|
-
return
|
|
89
|
-
if (!
|
|
86
|
+
const t = this.#c, i = this.#a, s = t.get(e);
|
|
87
|
+
if (s)
|
|
88
|
+
return s;
|
|
89
|
+
if (!i)
|
|
90
90
|
return;
|
|
91
|
-
const
|
|
92
|
-
return
|
|
91
|
+
const r = i.find((a) => "layerId" in a && a.layerId === e);
|
|
92
|
+
return r && t.set(e, r), r;
|
|
93
93
|
}
|
|
94
94
|
#p(e) {
|
|
95
95
|
return Array.from(new Map(e.map((t) => [t.globalId, t])).values());
|
|
96
96
|
}
|
|
97
97
|
#y(e) {
|
|
98
|
-
const { detail: t, target:
|
|
98
|
+
const { detail: t, target: i } = e;
|
|
99
99
|
if (t.name === "hideGraphics") {
|
|
100
100
|
e.stopPropagation();
|
|
101
|
-
const
|
|
102
|
-
this.arcgisHideGraphicsChange.emit(
|
|
101
|
+
const s = i[t.name];
|
|
102
|
+
this.arcgisHideGraphicsChange.emit(s);
|
|
103
103
|
}
|
|
104
104
|
if (t.name === "graphicsColor") {
|
|
105
105
|
e.stopPropagation();
|
|
106
|
-
const
|
|
107
|
-
this.aggregatedGeometryGraphicsColor =
|
|
106
|
+
const s = i[t.name];
|
|
107
|
+
this.aggregatedGeometryGraphicsColor = s, this.arcgisAggregatedGeometryGraphicsColorChange.emit(s);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
async #f() {
|
|
@@ -113,48 +113,48 @@ class F extends f {
|
|
|
113
113
|
return;
|
|
114
114
|
try {
|
|
115
115
|
t.loaded || (this.state = "loading", await t.load());
|
|
116
|
-
} catch (
|
|
117
|
-
$(
|
|
116
|
+
} catch (r) {
|
|
117
|
+
$(r, this, "Error while loading the selected utility network");
|
|
118
118
|
}
|
|
119
|
-
this.#
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
this.#a = e.filter((r) => t.isUtilityLayer(r));
|
|
120
|
+
const s = this.#a.filter((r) => !r.loaded).map((r) => r.load());
|
|
121
|
+
s.length > 0 && (this.state = "loading", (await Promise.allSettled(s)).forEach((a) => {
|
|
122
|
+
a.status === "rejected" && o("error", this, `Failed to load layer. Reason: ${a.reason}`);
|
|
123
123
|
}));
|
|
124
124
|
}
|
|
125
125
|
async #v() {
|
|
126
|
-
const e = Array.from(this.#
|
|
126
|
+
const e = Array.from(this.#r.entries());
|
|
127
127
|
if (!e.length)
|
|
128
128
|
return;
|
|
129
129
|
this.state = "loading";
|
|
130
|
-
const t = e.map((
|
|
131
|
-
(await Promise.allSettled(t)).forEach((
|
|
132
|
-
if (
|
|
130
|
+
const t = e.map((a) => this.#g(a));
|
|
131
|
+
(await Promise.allSettled(t)).forEach((a, c) => {
|
|
132
|
+
if (a.status === "rejected") {
|
|
133
133
|
const [n] = e[c];
|
|
134
|
-
o("error", this, `Failed to query features for source ${n}. Reason: ${
|
|
134
|
+
o("error", this, `Failed to query features for source ${n}. Reason: ${a.reason}`);
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
const
|
|
138
|
-
this.traceResultFeatures =
|
|
137
|
+
const s = Array.from(this.#s.values()), r = Array.from(this.#i.values());
|
|
138
|
+
this.traceResultFeatures = s.concat(r).flat();
|
|
139
139
|
}
|
|
140
140
|
#b() {
|
|
141
|
-
this.traceResult.elements?.forEach((e) => this.#o(this.#
|
|
141
|
+
this.traceResult.elements?.forEach((e) => this.#o(this.#r, e.networkSourceId, e));
|
|
142
142
|
}
|
|
143
143
|
render() {
|
|
144
144
|
const { traceError: e, traceResult: t } = this;
|
|
145
145
|
if (e)
|
|
146
|
-
return this.#
|
|
146
|
+
return this.#F(e);
|
|
147
147
|
if (!t)
|
|
148
148
|
return this.#G();
|
|
149
|
-
const { elements:
|
|
150
|
-
return
|
|
149
|
+
const { elements: i, globalFunctionResults: s, aggregatedGeometry: r } = t, a = !i.length && !s.length && !r, c = i.length > 0 && !s.length && !r;
|
|
150
|
+
return a ? this.#k() : this.state === "loading" ? this.#w() : this.hideFeatureResults && c ? this.#R() : this.isElementsSelected || c ? l`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#l} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${c} hide-select-feature initial-display-mode=list .messageOverrides=${this.messageOverrides} @arcgisClose=${() => this.isElementsSelected = !1} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#h)}></arcgis-features-next>` : this.#$(t);
|
|
151
151
|
}
|
|
152
152
|
#w() {
|
|
153
153
|
return l`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`;
|
|
154
154
|
}
|
|
155
155
|
#$(e) {
|
|
156
|
-
const { elements: t, globalFunctionResults:
|
|
157
|
-
return l`<calcite-panel class="white-panel-background">${this.#e()}${
|
|
156
|
+
const { elements: t, globalFunctionResults: i, aggregatedGeometry: s } = e;
|
|
157
|
+
return l`<calcite-panel class="white-panel-background">${this.#e()}${s != null ? l`<arcgis-utility-network-aggregated-geometry-result-item auto-destroy-disabled .graphicsColor=${this.aggregatedGeometryGraphicsColor} .traceResult=${e} .view=${this.view} @arcgisPropertyChange=${this.#y} ${h(this.#u)}></arcgis-utility-network-aggregated-geometry-result-item>` : null}${s != null && !t.length ? this.#C() : null}${t.length > 0 ? this.hideFeatureResults ? this.#d() : this.#E() : null}${i.length > 0 ? l`<arcgis-utility-network-trace-functions-result-item .heading=${this._messages.headings.functions} .traceResult=${e}></arcgis-utility-network-trace-functions-result-item>` : null}</calcite-panel>`;
|
|
158
158
|
}
|
|
159
159
|
#R() {
|
|
160
160
|
return l`<calcite-panel class="white-panel-background">${this.#e()}${this.#d()}</calcite-panel>`;
|
|
@@ -169,33 +169,26 @@ class F extends f {
|
|
|
169
169
|
const { _messages: e } = this;
|
|
170
170
|
return l`<calcite-list .label=${e.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${e.headings.features} @calciteListItemSelect=${() => this.isElementsSelected = !0}><calcite-chip .label=${e.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`;
|
|
171
171
|
}
|
|
172
|
-
#F(e) {
|
|
173
|
-
const { _messages: t } = this;
|
|
174
|
-
return l`<div class="functions-heading">${t.headings.functions}</div><calcite-table .caption=${t.labels.functionResults}>${e.filter((s) => s.networkAttributeName != null && s.result != null && s.functionType != null).map((s) => {
|
|
175
|
-
const { functionName: i, networkAttributeName: a, functionType: r, result: c } = s, n = i || `${a} ${r}`;
|
|
176
|
-
return l`<calcite-table-row><calcite-table-cell>${n}</calcite-table-cell><calcite-table-cell>${c}</calcite-table-cell></calcite-table-row>`;
|
|
177
|
-
})}</calcite-table>`;
|
|
178
|
-
}
|
|
179
172
|
#e() {
|
|
180
173
|
return l`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle ? l`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>` : null}</div>`;
|
|
181
174
|
}
|
|
182
|
-
#
|
|
175
|
+
#F(e) {
|
|
183
176
|
const { _messages: t } = this;
|
|
184
|
-
let
|
|
177
|
+
let i = e.message;
|
|
185
178
|
switch (e.details?.raw?.extendedCode) {
|
|
186
179
|
case u.dirtyAreasDiscovered:
|
|
187
|
-
|
|
180
|
+
i = t.traceErrors.dirtyAreasDiscovered;
|
|
188
181
|
break;
|
|
189
182
|
case u.noValidControllers:
|
|
190
|
-
|
|
183
|
+
i = t.traceErrors.noValidControllers;
|
|
191
184
|
break;
|
|
192
185
|
case u.pathNotFound:
|
|
193
|
-
|
|
186
|
+
i = t.traceErrors.pathNotFound;
|
|
194
187
|
break;
|
|
195
188
|
}
|
|
196
|
-
return l`<calcite-panel class="white-panel-background">${this.#e()}<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">${
|
|
189
|
+
return l`<calcite-panel class="white-panel-background">${this.#e()}<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">${i}</div></div></calcite-panel>`;
|
|
197
190
|
}
|
|
198
|
-
#
|
|
191
|
+
#k() {
|
|
199
192
|
const { _messages: e } = this;
|
|
200
193
|
return l`<calcite-panel class="white-panel-background">${this.#e()}<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></calcite-panel>`;
|
|
201
194
|
}
|
|
@@ -2,11 +2,9 @@ import "../arcgis-features-next/index.js";
|
|
|
2
2
|
import "@esri/calcite-components/components/calcite-panel";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-loader";
|
|
4
4
|
import "../arcgis-utility-network-aggregated-geometry-result-item/index.js";
|
|
5
|
+
import "../arcgis-utility-network-trace-functions-result-item/index.js";
|
|
5
6
|
import "@esri/calcite-components/components/calcite-list";
|
|
6
7
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
7
8
|
import "@esri/calcite-components/components/calcite-chip";
|
|
8
9
|
import "@esri/calcite-components/components/calcite-icon";
|
|
9
|
-
import "@esri/calcite-components/components/calcite-table";
|
|
10
|
-
import "@esri/calcite-components/components/calcite-table-row";
|
|
11
|
-
import "@esri/calcite-components/components/calcite-table-cell";
|
|
12
10
|
export * from "./customElement.js";
|