@arcgis/map-components 5.1.0-next.128 → 5.1.0-next.129
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/{GSSYRVP6.js → 23QRQ72P.js} +1 -1
- package/dist/cdn/2HF62GLH.js +2 -0
- package/dist/cdn/{B7DNJSCN.js → 5HO3VI5Q.js} +1 -1
- package/dist/cdn/AUDWBCSP.js +2 -0
- package/dist/cdn/CGD5GENR.js +2 -0
- package/dist/cdn/E4GRYYZA.js +2 -0
- package/dist/cdn/{WYDUTSDC.js → IL5K5FGZ.js} +1 -1
- package/dist/cdn/{7CENB7GZ.js → IXFUVPOA.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-bookmarks/customElement.js +38 -38
- package/dist/components/arcgis-daylight/customElement.js +59 -52
- package/dist/components/arcgis-expand/customElement.js +5 -5
- package/dist/components/arcgis-layer-list-next/customElement.js +2 -2
- package/dist/components/arcgis-print/customElement.d.ts +1 -1
- package/dist/components/arcgis-search/customElement.d.ts +2 -2
- package/dist/components/arcgis-sketch-tooltip-controls/customElement.js +1 -1
- package/dist/components/arcgis-unit-radio-button-group/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +1 -2
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +16 -16
- 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/package.json +4 -4
- package/dist/cdn/4C4DRKA5.js +0 -2
- package/dist/cdn/A5MKHCZ4.js +0 -2
- package/dist/cdn/SNOTVPX5.js +0 -2
- package/dist/cdn/YY7OOTKK.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as k } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as x, html as y } from "lit";
|
|
4
4
|
import * as C from "@arcgis/core/geometry/operators/cutOperator.js";
|
|
5
5
|
import * as m from "@arcgis/core/geometry/operators/lengthOperator.js";
|
|
@@ -44,14 +44,14 @@ class R extends G {
|
|
|
44
44
|
[n, c],
|
|
45
45
|
[a, i]
|
|
46
46
|
]
|
|
47
|
-
], l = this._createPolyline(o, t.spatialReference.wkid),
|
|
48
|
-
if (!
|
|
47
|
+
], l = this._createPolyline(o, t.spatialReference.wkid), p = b.execute(l, r);
|
|
48
|
+
if (!p)
|
|
49
49
|
return u("error", this, "Unable to project flag geometry to source geometry spatial reference."), 0.5;
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
50
|
+
const d = C.execute(s, p);
|
|
51
|
+
if (d.length > 0) {
|
|
52
52
|
const g = m.execute(s, { unit: "feet" });
|
|
53
53
|
let h;
|
|
54
|
-
return
|
|
54
|
+
return d[0].paths[0][0][0] === s.paths[0][0][0] ? h = m.execute(d[0], { unit: "feet" }) : d.length > 1 ? h = m.execute(d[1], { unit: "feet" }) : h = 0, h / g;
|
|
55
55
|
}
|
|
56
56
|
return u("warn", this, "Unable to cut the source geometry with the flag geometry."), 0.5;
|
|
57
57
|
}
|
|
@@ -76,7 +76,7 @@ class R extends G {
|
|
|
76
76
|
this.arcgisTraceLocationSelectStart.emit({ cancelSelect: () => t.cancel() }).defaultPrevented || await this._startSketch(e, t);
|
|
77
77
|
}
|
|
78
78
|
async _startSketch(e, t) {
|
|
79
|
-
this._clickHandler?.remove(), this._clickHandler = t.on("create", (r) => this._handleSketchComplete(r, e, t)), "acquireCursor" in e && e.acquireCursor("crosshair"),
|
|
79
|
+
this._clickHandler?.remove(), this._clickHandler = t.on("create", (r) => this._handleSketchComplete(r, e, t)), "acquireCursor" in e && e.acquireCursor("crosshair"), t.snappingOptions.enabled = !0, t.create("point");
|
|
80
80
|
}
|
|
81
81
|
_handleSketchComplete(e, t, r) {
|
|
82
82
|
if (e.state === "complete" && e.graphic) {
|
|
@@ -106,12 +106,12 @@ class R extends G {
|
|
|
106
106
|
this._resetCursor(), await this._processHitTestResults(i, n, t), this.arcgisTraceLocationSelectEnd.emit();
|
|
107
107
|
}
|
|
108
108
|
_resetCursor() {
|
|
109
|
-
const { view: e } = this;
|
|
109
|
+
const { view: e, sketchViewModel: t } = this;
|
|
110
110
|
if (!e) {
|
|
111
111
|
u("error", this, f("view"));
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
this._clickHandler?.remove(), this._clickHandler = void 0, "acquireCursor" in e && e.acquireCursor("default");
|
|
114
|
+
t && (t.snappingOptions.enabled = !1), this._clickHandler?.remove(), this._clickHandler = void 0, "acquireCursor" in e && e.acquireCursor("default");
|
|
115
115
|
}
|
|
116
116
|
async _processHitTestResults(e, t, r) {
|
|
117
117
|
if (e.length === 0) {
|
|
@@ -141,8 +141,8 @@ class R extends G {
|
|
|
141
141
|
await this._generateTraceLocation(c, t, r);
|
|
142
142
|
}
|
|
143
143
|
async _ensureNecessaryAttributes(e) {
|
|
144
|
-
const t = (S(e.layer), e.layer), r = t.geometryType === null, s = t.fieldsIndex?.get("assetgroup") ?? !1, n = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", a = t.fieldsIndex?.get("assettype") ?? !1, c = t.fieldsIndex?.get("assettype")?.name ?? "assettype", i = e.getGlobalId(), o = e.getObjectId(), l = s ? !!e.getAttribute(n) : !0,
|
|
145
|
-
if (i && o && l &&
|
|
144
|
+
const t = (S(e.layer), e.layer), r = t.geometryType === null, s = t.fieldsIndex?.get("assetgroup") ?? !1, n = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", a = t.fieldsIndex?.get("assettype") ?? !1, c = t.fieldsIndex?.get("assettype")?.name ?? "assettype", i = e.getGlobalId(), o = e.getObjectId(), l = s ? !!e.getAttribute(n) : !0, p = a ? !!e.getAttribute(c) : !0, d = !!e.geometry;
|
|
145
|
+
if (i && o && l && p && (d || r))
|
|
146
146
|
return e;
|
|
147
147
|
const g = t.createQuery();
|
|
148
148
|
return g.objectIds = [o], (await t.queryFeatures(g))?.features[0] || null;
|
|
@@ -213,20 +213,20 @@ class R extends G {
|
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
215
|
} else if (!a) {
|
|
216
|
-
const i = P(e.layer) ? e.layer.parent : e.layer, o = i && this._edgeSourceLayerIds.includes(i.layerId), l = s?.getTerminalConfiguration(e),
|
|
216
|
+
const i = P(e.layer) ? e.layer.parent : e.layer, o = i && this._edgeSourceLayerIds.includes(i.layerId), l = s?.getTerminalConfiguration(e), p = l ? l.terminals[0].id : o ? -1 : 1, d = o ? 0.5 : -1;
|
|
217
217
|
return {
|
|
218
218
|
traceLocation: new T({
|
|
219
219
|
type: r,
|
|
220
220
|
isFilterBarrier: !1,
|
|
221
221
|
globalId: n,
|
|
222
|
-
terminalId:
|
|
223
|
-
percentAlong:
|
|
222
|
+
terminalId: p,
|
|
223
|
+
percentAlong: d
|
|
224
224
|
}),
|
|
225
225
|
flagProperties: {
|
|
226
226
|
title: c,
|
|
227
227
|
expanded: !1,
|
|
228
228
|
terminalConfiguration: l ?? void 0,
|
|
229
|
-
selectedTerminals: l ? /* @__PURE__ */ new Set([
|
|
229
|
+
selectedTerminals: l ? /* @__PURE__ */ new Set([p]) : void 0
|
|
230
230
|
},
|
|
231
231
|
spatialProperties: {
|
|
232
232
|
mapPoint: t,
|
|
@@ -290,7 +290,7 @@ class R extends G {
|
|
|
290
290
|
return y`<div class="root">${this.renderAddLocationBlock()}</div>`;
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
|
|
293
|
+
k("arcgis-utility-network-trace-location", R);
|
|
294
294
|
export {
|
|
295
295
|
R as ArcgisUtilityNetworkTraceLocation
|
|
296
296
|
};
|