@arcgis/map-components 5.1.0-next.55 → 5.1.0-next.57
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/{H3W4AVNX.js → 23KLANNA.js} +1 -1
- package/dist/cdn/{LF3ACEGB.js → 23REZ2B2.js} +1 -1
- package/dist/cdn/{47EM5634.js → 2W3VBU7J.js} +1 -1
- package/dist/cdn/{XFLYIMEH.js → 323UBCSA.js} +1 -1
- package/dist/cdn/{EJ3K6UKQ.js → 3F72VWYL.js} +1 -1
- package/dist/cdn/{BVV442IW.js → 3FQKWB7C.js} +1 -1
- package/dist/cdn/{N6P3CYCE.js → 3NIIEYZ3.js} +1 -1
- package/dist/cdn/{H35H7V4U.js → 3RBPQIY2.js} +1 -1
- package/dist/cdn/{64K3ZLWU.js → 3TSFQO2E.js} +1 -1
- package/dist/cdn/{64RBSCIU.js → 43AAIXLC.js} +1 -1
- package/dist/cdn/{WRKFEF2E.js → 4C65FPRR.js} +1 -1
- package/dist/cdn/{5DCBCU6G.js → 4QDDVY23.js} +1 -1
- package/dist/cdn/{UFMWUZE3.js → 4TP652AL.js} +1 -1
- package/dist/cdn/{7P2RN5VN.js → 4YBNCIDF.js} +1 -1
- package/dist/cdn/{T3IOQA35.js → 4YOGEANW.js} +1 -1
- package/dist/cdn/{SVVJHTPA.js → 6BSFBUM6.js} +1 -1
- package/dist/cdn/{JSTCLI7D.js → 6G6M4M5S.js} +1 -1
- package/dist/cdn/{JS63ZT7D.js → 6MNOO7S3.js} +1 -1
- package/dist/cdn/{2SQ2T6UO.js → 6NTYMNLN.js} +1 -1
- package/dist/cdn/{SI3YNLBT.js → 6QUGJX3I.js} +1 -1
- package/dist/cdn/{LCWJCL4W.js → 7E7AM2OJ.js} +1 -1
- package/dist/cdn/{RERHZ7N6.js → 7J2JZ2SZ.js} +1 -1
- package/dist/cdn/{NDK2KLBE.js → 7KAQ36QW.js} +1 -1
- package/dist/cdn/{VLRZCW6D.js → 7OM5OVLK.js} +1 -1
- package/dist/cdn/{HJDWKPKG.js → A2Y4QEYJ.js} +1 -1
- package/dist/cdn/{MN6VPZBF.js → A3PNX3GL.js} +1 -1
- package/dist/cdn/{VCLHE53D.js → AEX2GVOA.js} +1 -1
- package/dist/cdn/{EDKX67YT.js → AHYVOMEG.js} +1 -1
- package/dist/cdn/{5CJ44XUV.js → AIUHMRPO.js} +1 -1
- package/dist/cdn/{S32MGHWV.js → AK3LR5KN.js} +1 -1
- package/dist/cdn/{PJ6ASBCK.js → ATCF2HG3.js} +1 -1
- package/dist/cdn/{NRDGJWVQ.js → AZ6KIV47.js} +1 -1
- package/dist/cdn/{KQE4KBPO.js → BDL7JHSJ.js} +1 -1
- package/dist/cdn/{4EJULFOT.js → BDQN2SGF.js} +1 -1
- package/dist/cdn/{LZSSMLAK.js → BLFJJQQ3.js} +1 -1
- package/dist/cdn/{IXP3RVNX.js → BLKKPXDO.js} +1 -1
- package/dist/cdn/{ANBLWVAY.js → BLXKBUSY.js} +1 -1
- package/dist/cdn/{DQJMLG55.js → CTFHP4WA.js} +1 -1
- package/dist/cdn/{WH7FEIAX.js → CWQLKJFC.js} +1 -1
- package/dist/cdn/{AK5ROHZH.js → CXQ47WC4.js} +1 -1
- package/dist/cdn/{D4VBRIIX.js → DJGZ4YG5.js} +1 -1
- package/dist/cdn/{3L2UM4VM.js → DJP36K3Y.js} +1 -1
- package/dist/cdn/{HIHI4JJ3.js → DLDEDYSE.js} +1 -1
- package/dist/cdn/{Z2WO7B65.js → DRVFBFOW.js} +1 -1
- package/dist/cdn/{3MQK2MOH.js → E23LKC2A.js} +1 -1
- package/dist/cdn/{LYUX5DD5.js → EAKRGXQC.js} +1 -1
- package/dist/cdn/{7JGUTIGF.js → EWOBALV7.js} +1 -1
- package/dist/cdn/{LREZ5SKG.js → EYBE3ZBK.js} +1 -1
- package/dist/cdn/{3KOWS73L.js → EYQYDFFT.js} +1 -1
- package/dist/cdn/{6K7HT6IF.js → EYT725LZ.js} +1 -1
- package/dist/cdn/{BBCKCE5B.js → F76SAKGH.js} +1 -1
- package/dist/cdn/{ZYCOEJDE.js → FBHD2ZEY.js} +1 -1
- package/dist/cdn/{VG6AAARR.js → FMAT4CW4.js} +1 -1
- package/dist/cdn/{FII7IMJT.js → GGHVYX5B.js} +1 -1
- package/dist/cdn/{YIIQACF6.js → GIBM773H.js} +1 -1
- package/dist/cdn/{CM2DTEKZ.js → GL2CGH7O.js} +1 -1
- package/dist/cdn/{AHYA2UI7.js → HH5RW37I.js} +1 -1
- package/dist/cdn/{DL5FSQTT.js → HJ3OTVSP.js} +1 -1
- package/dist/cdn/{7DOI3267.js → HKAKOHQC.js} +1 -1
- package/dist/cdn/{EU2LDM45.js → HNQPE3FT.js} +1 -1
- package/dist/cdn/{OSYS3QIX.js → HOO4XLPB.js} +1 -1
- package/dist/cdn/{JO2YQJCG.js → HSAVWAGS.js} +1 -1
- package/dist/cdn/{OKKVTQV5.js → IFWIELXX.js} +1 -1
- package/dist/cdn/{ZD4Y4HRX.js → IJICMS5G.js} +1 -1
- package/dist/cdn/{442445AM.js → IS2PGNSH.js} +1 -1
- package/dist/cdn/{7RAC6JLJ.js → IUI2SSE7.js} +1 -1
- package/dist/cdn/{3JMJAUSY.js → IUZTQ4PQ.js} +1 -1
- package/dist/cdn/{NSWFEQPG.js → J5IZSPU4.js} +1 -1
- package/dist/cdn/{4Q6KP7JZ.js → JCLR7GTA.js} +1 -1
- package/dist/cdn/{URMIFMUJ.js → JDAMFTUY.js} +1 -1
- package/dist/cdn/{6DE54WXK.js → JTOVZZIK.js} +1 -1
- package/dist/cdn/{3SDSU2FD.js → KB5J5TKR.js} +1 -1
- package/dist/cdn/{CMMCCDZM.js → L26JLESC.js} +1 -1
- package/dist/cdn/{PESOHUKZ.js → LNY6JB4T.js} +1 -1
- package/dist/cdn/{MFITF23R.js → LPD2FPBE.js} +1 -1
- package/dist/cdn/{2G3HODZY.js → M2MXC4LH.js} +1 -1
- package/dist/cdn/{6ZLSCYL5.js → MDUFAELV.js} +1 -1
- package/dist/cdn/MGOKVOUR.js +2 -0
- package/dist/cdn/{BHOFCE2A.js → MZENIHK3.js} +1 -1
- package/dist/cdn/{5HJXFPDL.js → N2AXFVQB.js} +1 -1
- package/dist/cdn/{BIXYC4AJ.js → NJX4DH3C.js} +1 -1
- package/dist/cdn/{OWIJFPEZ.js → NMZDLL4M.js} +1 -1
- package/dist/cdn/{DE5AA22M.js → NWE4GWG6.js} +1 -1
- package/dist/cdn/{SHA36V36.js → O3CBEPSE.js} +1 -1
- package/dist/cdn/{RT7W2L3G.js → O4KTJ2LP.js} +1 -1
- package/dist/cdn/{RO4TU5R3.js → OHDHHNIY.js} +1 -1
- package/dist/cdn/{VDXT7AXJ.js → ON57EB3S.js} +1 -1
- package/dist/cdn/{Z5NISON6.js → OXM4YQGO.js} +1 -1
- package/dist/cdn/{DYI5GSBP.js → PCBKRI33.js} +1 -1
- package/dist/cdn/{GLFXKTJG.js → PDSZXTW2.js} +1 -1
- package/dist/cdn/{FZUR5QCD.js → PUKUYV7Z.js} +1 -1
- package/dist/cdn/{QUXKTXGS.js → PV4EVFZL.js} +1 -1
- package/dist/cdn/QIHCQOKX.js +2 -0
- package/dist/cdn/{7OCT6QER.js → QOL55WND.js} +1 -1
- package/dist/cdn/{6OUYTR22.js → QSNY7PKS.js} +1 -1
- package/dist/cdn/{ZW3F22OF.js → QUZN3WEI.js} +1 -1
- package/dist/cdn/{WDAYQZKY.js → R2SRU7YZ.js} +1 -1
- package/dist/cdn/R3NYK6BO.js +2 -0
- package/dist/cdn/{55IJQTCC.js → RFJ2A4C5.js} +1 -1
- package/dist/cdn/{6CMVUTDU.js → RISMNCOT.js} +1 -1
- package/dist/cdn/{PDRWEM43.js → RPNWPXQM.js} +1 -1
- package/dist/cdn/{KOLU46FC.js → RRZZQHHA.js} +1 -1
- package/dist/cdn/{F2MDJ3QQ.js → RSBGBKYW.js} +1 -1
- package/dist/cdn/{IUL5Z7VB.js → RTB2XKDJ.js} +1 -1
- package/dist/cdn/{QFXQQ57I.js → RTWUAZET.js} +1 -1
- package/dist/cdn/{YSJ2M36J.js → SMEJ4YAT.js} +1 -1
- package/dist/cdn/{JNUEXFDM.js → SNQ2FGIZ.js} +1 -1
- package/dist/cdn/{DRJGVD7E.js → SVFZT7GR.js} +1 -1
- package/dist/cdn/{PZRX6DU7.js → T5A2YHUT.js} +1 -1
- package/dist/cdn/{RZCSCSZX.js → TG7WC3X6.js} +1 -1
- package/dist/cdn/{V46EJSBT.js → TTXSJRX5.js} +1 -1
- package/dist/cdn/{CK5FRYUH.js → TY7DGFDV.js} +1 -1
- package/dist/cdn/{PIRNCGNB.js → UMBRQNGS.js} +1 -1
- package/dist/cdn/{RRK4SIGU.js → VVTVZ23C.js} +1 -1
- package/dist/cdn/{DXG3NX4D.js → WGW42I4K.js} +1 -1
- package/dist/cdn/{I7NY2VAH.js → WPHAAGQP.js} +1 -1
- package/dist/cdn/{HRPEPALP.js → X4JK3J5H.js} +1 -1
- package/dist/cdn/{4J5MWUWB.js → X6YUOAIF.js} +1 -1
- package/dist/cdn/{X4YAWY7C.js → XCGJZDIU.js} +1 -1
- package/dist/cdn/{5E64VGZ5.js → XJ7YGYPW.js} +1 -1
- package/dist/cdn/{TCFMT5ET.js → XRXXGGKZ.js} +1 -1
- package/dist/cdn/{OCGWSO54.js → YOBLHGZK.js} +1 -1
- package/dist/cdn/{I3ZAURHF.js → YT45OEI2.js} +1 -1
- package/dist/cdn/{LAIMIE36.js → YZLPEORC.js} +1 -1
- package/dist/cdn/{J5DZU2LD.js → ZBIHLQ6H.js} +1 -1
- package/dist/cdn/ZCCTN4B7.js +2 -0
- package/dist/cdn/{AJVS7BWH.js → ZEKJESMA.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/action-utils.js +2 -2
- package/dist/chunks/layer-utils.js +26 -31
- package/dist/components/arcgis-feature-templates-legacy/customElement.d.ts +98 -0
- package/dist/components/arcgis-features/customElement.js +90 -106
- package/dist/components/arcgis-layer-list-item/customElement.js +1 -1
- package/dist/components/arcgis-paste/customElement.js +33 -20
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +120 -120
- 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/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cdn/AE3QS3U2.js +0 -2
- package/dist/cdn/CX4BONNF.js +0 -2
- package/dist/cdn/NKR3PQHN.js +0 -2
- package/dist/cdn/WRXZSYE7.js +0 -2
|
@@ -43,7 +43,7 @@ function Ee(e, t, i, a, s, o) {
|
|
|
43
43
|
const g = o.objectIdField ?? "";
|
|
44
44
|
return e.forEach((m) => {
|
|
45
45
|
if (m.name !== g && !h.includes(m.name) && !p.includes(m.name) && !s.includes(m.name) && m.type !== "global-id" && (u === "" || u !== m.name)) {
|
|
46
|
-
const f =
|
|
46
|
+
const f = Ge(m, t);
|
|
47
47
|
f.match && f.targetField && (l[f.targetField?.name] = i[m.name]);
|
|
48
48
|
}
|
|
49
49
|
}), l;
|
|
@@ -68,7 +68,7 @@ function Te(e, t) {
|
|
|
68
68
|
return !1;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Ge(e, t) {
|
|
72
72
|
const i = { match: !1, sourceField: null, targetField: null };
|
|
73
73
|
for (const a of t)
|
|
74
74
|
if (Te(e, a)) {
|
|
@@ -82,7 +82,7 @@ async function se(e, t, i, a) {
|
|
|
82
82
|
let s = !0;
|
|
83
83
|
const o = { hasAsyncArcadeExpressions: !1 }, l = e.items.filter((h) => h.type === "add");
|
|
84
84
|
for (const h of l) {
|
|
85
|
-
const p = h.graphic.clone(), u =
|
|
85
|
+
const p = h.graphic.clone(), u = Oe(
|
|
86
86
|
h.graphic,
|
|
87
87
|
h.layer
|
|
88
88
|
);
|
|
@@ -109,7 +109,7 @@ async function se(e, t, i, a) {
|
|
|
109
109
|
}
|
|
110
110
|
return s;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Oe(e, t) {
|
|
113
113
|
if (t.type === "feature" || t.type === "subtype-sublayer")
|
|
114
114
|
return t;
|
|
115
115
|
const i = t.findSublayerForFeature(e);
|
|
@@ -416,7 +416,7 @@ A([
|
|
|
416
416
|
v = A([
|
|
417
417
|
C("components.paste.commands.PasteCommand")
|
|
418
418
|
], v);
|
|
419
|
-
var Be = Object.defineProperty, je = Object.getOwnPropertyDescriptor,
|
|
419
|
+
var Be = Object.defineProperty, je = Object.getOwnPropertyDescriptor, G = (e, t, i, a) => {
|
|
420
420
|
for (var s = a > 1 ? void 0 : a ? je(t, i) : t, o = e.length - 1, l; o >= 0; o--)
|
|
421
421
|
(l = e[o]) && (s = (a ? l(t, i, s) : l(s)) || s);
|
|
422
422
|
return a && s && Be(t, i, s), s;
|
|
@@ -533,25 +533,25 @@ let F = class extends v {
|
|
|
533
533
|
return e.pasteAppendTitle;
|
|
534
534
|
}
|
|
535
535
|
};
|
|
536
|
-
|
|
536
|
+
G([
|
|
537
537
|
r()
|
|
538
538
|
], F.prototype, "id", 1);
|
|
539
|
-
|
|
539
|
+
G([
|
|
540
540
|
r()
|
|
541
541
|
], F.prototype, "icon", 1);
|
|
542
|
-
|
|
542
|
+
G([
|
|
543
543
|
r()
|
|
544
544
|
], F.prototype, "immediate", 1);
|
|
545
|
-
|
|
545
|
+
G([
|
|
546
546
|
r()
|
|
547
547
|
], F.prototype, "mustShowOnCommandPage", 1);
|
|
548
|
-
|
|
548
|
+
G([
|
|
549
549
|
r()
|
|
550
550
|
], F.prototype, "commandEnabled", 1);
|
|
551
|
-
F =
|
|
551
|
+
F = G([
|
|
552
552
|
C("components.paste.commands.PasteAppendCommand")
|
|
553
553
|
], F);
|
|
554
|
-
var We = Object.defineProperty, Re = Object.getOwnPropertyDescriptor,
|
|
554
|
+
var We = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, O = (e, t, i, a) => {
|
|
555
555
|
for (var s = a > 1 ? void 0 : a ? Re(t, i) : t, o = e.length - 1, l; o >= 0; o--)
|
|
556
556
|
(l = e[o]) && (s = (a ? l(t, i, s) : l(s)) || s);
|
|
557
557
|
return a && s && We(t, i, s), s;
|
|
@@ -669,22 +669,22 @@ let _ = class extends v {
|
|
|
669
669
|
return e.pasteSubtractTitle;
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
|
-
|
|
672
|
+
O([
|
|
673
673
|
r()
|
|
674
674
|
], _.prototype, "id", 1);
|
|
675
|
-
|
|
675
|
+
O([
|
|
676
676
|
r()
|
|
677
677
|
], _.prototype, "icon", 1);
|
|
678
|
-
|
|
678
|
+
O([
|
|
679
679
|
r()
|
|
680
680
|
], _.prototype, "immediate", 1);
|
|
681
|
-
|
|
681
|
+
O([
|
|
682
682
|
r()
|
|
683
683
|
], _.prototype, "mustShowOnCommandPage", 1);
|
|
684
|
-
|
|
684
|
+
O([
|
|
685
685
|
r()
|
|
686
686
|
], _.prototype, "commandEnabled", 1);
|
|
687
|
-
_ =
|
|
687
|
+
_ = O([
|
|
688
688
|
C("components.paste.commands.PasteSubtractCommand")
|
|
689
689
|
], _);
|
|
690
690
|
var Ne = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, k = (e, t, i, a) => {
|
|
@@ -1636,6 +1636,19 @@ class st extends he {
|
|
|
1636
1636
|
_updateBauViewModelFields(t) {
|
|
1637
1637
|
this.viewModel.bauActiveFeatureIndex = t.activeFeatureIndex, this.viewModel.bauInvalidFeatures = t.invalidFeatures, this.viewModel.bauFormValid = t.valid, this.viewModel.bauFormUpdating = t.updating, this.viewModel.bauHasTooManyComplexFeatures = t.hasTooManyComplexFeatures, this.viewModel.bauHasTooManyFeatures = t.hasTooManyFeatures;
|
|
1638
1638
|
}
|
|
1639
|
+
_copyAcrossValidMultiFormFieldValues() {
|
|
1640
|
+
try {
|
|
1641
|
+
if (this._bauForm.value?.status !== "loaded")
|
|
1642
|
+
return;
|
|
1643
|
+
const t = this._bauForm.value;
|
|
1644
|
+
let i = 0;
|
|
1645
|
+
for (const a of this.viewModel.bauFeatures?.toArray() ?? []) {
|
|
1646
|
+
const s = this.viewModel.bauOriginalGraphics[i];
|
|
1647
|
+
this.viewModel.formFeatureValuesChanged(s, t.getValues(a)), i++;
|
|
1648
|
+
}
|
|
1649
|
+
} catch {
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1639
1652
|
_handleClickAway(t) {
|
|
1640
1653
|
if (!this._showFloatingChoice || !this._floatingChoiceContainer.value)
|
|
1641
1654
|
return;
|
|
@@ -1807,7 +1820,7 @@ class st extends he {
|
|
|
1807
1820
|
this._bauForm.value?.goToFirstError();
|
|
1808
1821
|
return;
|
|
1809
1822
|
}
|
|
1810
|
-
this.viewModel.lastPasteError = void 0, this.viewModel.runPasteFormCommand({
|
|
1823
|
+
this._copyAcrossValidMultiFormFieldValues(), this.viewModel.lastPasteError = void 0, this.viewModel.runPasteFormCommand({
|
|
1811
1824
|
closeAfterApply: () => {
|
|
1812
1825
|
this._handleCloseAfterApply();
|
|
1813
1826
|
},
|
|
@@ -1837,7 +1850,7 @@ class st extends he {
|
|
|
1837
1850
|
}}></calcite-action><calcite-action slot=actions-end icon=chevron-right icon-flip-rtl scale=s .text=${this._messages.next ?? ""} .disabled=${!o || a || !i} @click=${() => {
|
|
1838
1851
|
this.viewModel.nextActiveFeature();
|
|
1839
1852
|
}}></calcite-action></calcite-action-bar>${this._renderFloatingUIChoice(i)}` : ""}<div class=${me(this.viewModel.bauHasTooManyComplexFeatures || this.viewModel.bauHasTooManyFeatures ? "hidden" : void 0)}>${this._renderPasteFormBreadcrumb()}<arcgis-multi-feature-form edit-type=INSERT submit-has-been-attempted .view=${this.view} .referenceElement=${this.referenceElement} .hidden=${this.viewModel.bauHasTooManyComplexFeatures || this.viewModel.bauHasTooManyFeatures} .disabled=${this.viewModel.updating} .maximumFeatureCount=${this.maximumFeatureCount} .maximumFeatureCountWithComplexForms=${this.maximumFeatureCountWithComplexForms} .features=${this.viewModel.bauFeatures} .activeFeatureIndex=${this.viewModel.bauActiveFeatureIndex} @arcgisPropertyChange=${(p) => {
|
|
1840
|
-
this._updateBauViewModelFields(p.target);
|
|
1853
|
+
this._updateBauViewModelFields(p.target), p.detail.name === "status" && p.target.status === "loaded" && this._copyAcrossValidMultiFormFieldValues();
|
|
1841
1854
|
}} @arcgisValueChange=${(p) => {
|
|
1842
1855
|
let u = 0;
|
|
1843
1856
|
for (const g of this.viewModel.bauFeatures?.toArray() ?? []) {
|
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { LitElement as A, createEvent as
|
|
13
|
-
import { log as u, composeMissingPropertyMessage as
|
|
14
|
-
import { u as
|
|
15
|
-
import { d as S, i as
|
|
16
|
-
const
|
|
17
|
-
class
|
|
2
|
+
import { c as _ } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as x, html as f } from "lit";
|
|
4
|
+
import * as C from "@arcgis/core/geometry/operators/cutOperator.js";
|
|
5
|
+
import * as m from "@arcgis/core/geometry/operators/lengthOperator.js";
|
|
6
|
+
import * as b from "@arcgis/core/geometry/operators/projectOperator.js";
|
|
7
|
+
import I from "@arcgis/core/geometry/Polyline.js";
|
|
8
|
+
import F from "@arcgis/core/geometry/SpatialReference.js";
|
|
9
|
+
import G from "@arcgis/core/Graphic.js";
|
|
10
|
+
import w from "@arcgis/core/rest/networks/support/TraceLocation.js";
|
|
11
|
+
import T from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
|
|
12
|
+
import { LitElement as A, createEvent as L } from "@arcgis/lumina";
|
|
13
|
+
import { log as u, composeMissingPropertyMessage as y } from "@arcgis/toolkit/log";
|
|
14
|
+
import { u as v } from "../../chunks/useT9n.js";
|
|
15
|
+
import { d as S, i as P } from "../../chunks/layer-utils.js";
|
|
16
|
+
const N = x`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{justify-content:center;display:grid}.clear-button{--calcite-button-border-color: transparent}`;
|
|
17
|
+
class R extends A {
|
|
18
18
|
constructor() {
|
|
19
|
-
super(...arguments), this.messages =
|
|
19
|
+
super(...arguments), this.messages = v({ blocking: !0 }), this.isSelectWaiting = !1, this.traceLocationType = "starting-point", this.spatialTolerance = 0.05, this.autoDestroyDisabled = !1, this.arcgisTraceLocationChange = L(), this.arcgisTraceLocationSelectEnd = L(), this.arcgisTraceLocationSelectStart = L();
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
22
|
this.properties = { isSelectWaiting: 16, beforeTraceLocationSelectStart: 0, afterHitTest: 0, view: 0, traceLocationType: 1, traceLocations: 0, filterLayers: 0, sketchViewModel: 0, spatialTolerance: 9, autoDestroyDisabled: 5, utilityNetwork: 0 };
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
|
-
this.styles =
|
|
25
|
+
this.styles = N;
|
|
26
26
|
}
|
|
27
27
|
async destroy() {
|
|
28
28
|
this._resetCursor(), await this.manager.destroy();
|
|
29
29
|
}
|
|
30
30
|
async load() {
|
|
31
|
-
|
|
31
|
+
b.isLoaded() || await b.load();
|
|
32
32
|
}
|
|
33
|
-
_createPolyline(
|
|
34
|
-
return new
|
|
33
|
+
_createPolyline(e, t) {
|
|
34
|
+
return new I({
|
|
35
35
|
hasZ: !1,
|
|
36
36
|
hasM: !0,
|
|
37
|
-
paths:
|
|
38
|
-
spatialReference: new
|
|
37
|
+
paths: e,
|
|
38
|
+
spatialReference: new F({ wkid: t })
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
_calculatePercentAlong(
|
|
42
|
-
const r =
|
|
41
|
+
_calculatePercentAlong(e, t) {
|
|
42
|
+
const r = e.spatialReference, s = this._createPolyline(e.paths, r.wkid), n = t.x - 0.5, i = t.x + 0.5, c = t.y - 0.5, a = t.y + 0.5, o = [
|
|
43
43
|
[
|
|
44
|
-
[
|
|
44
|
+
[n, c],
|
|
45
45
|
[i, a]
|
|
46
46
|
]
|
|
47
|
-
], l = this._createPolyline(
|
|
48
|
-
if (!
|
|
47
|
+
], l = this._createPolyline(o, t.spatialReference.wkid), d = b.execute(l, r);
|
|
48
|
+
if (!d)
|
|
49
49
|
return u("error", this, "Unable to project flag geometry to source geometry spatial reference."), 0.5;
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
50
|
+
const p = C.execute(s, d);
|
|
51
|
+
if (p.length > 0) {
|
|
52
|
+
const g = m.execute(s, { unit: "feet" });
|
|
53
53
|
let h;
|
|
54
|
-
return
|
|
54
|
+
return p[0].paths[0][0][0] === s.paths[0][0][0] ? h = m.execute(p[0], { unit: "feet" }) : p.length > 1 ? h = m.execute(p[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
|
}
|
|
58
58
|
get _edgeSourceLayerIds() {
|
|
59
|
-
const
|
|
60
|
-
return
|
|
59
|
+
const e = this.utilityNetwork?.dataElement?.domainNetworks;
|
|
60
|
+
return e ? e.flatMap((t) => t.edgeSources).map((t) => t.layerId).filter(Boolean) : [];
|
|
61
61
|
}
|
|
62
62
|
async _handleAddButtonClick() {
|
|
63
|
-
const { view:
|
|
64
|
-
if (!(
|
|
65
|
-
u("error", this, "Cannot add trace location."),
|
|
63
|
+
const { view: e, sketchViewModel: t } = this;
|
|
64
|
+
if (!(e && t)) {
|
|
65
|
+
u("error", this, "Cannot add trace location."), t || u("error", this, y("sketchViewModel")), e || u("error", this, y("view"));
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
if (this.beforeTraceLocationSelectStart) {
|
|
@@ -73,55 +73,55 @@ class N extends A {
|
|
|
73
73
|
this.isSelectWaiting = !1;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
this.arcgisTraceLocationSelectStart.emit({ cancelSelect: () =>
|
|
76
|
+
this.arcgisTraceLocationSelectStart.emit({ cancelSelect: () => t.cancel() }).defaultPrevented || await this._startSketch(e, t);
|
|
77
77
|
}
|
|
78
|
-
async _startSketch(
|
|
79
|
-
this._clickHandler?.remove(), this._clickHandler =
|
|
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"), this.sketchViewModel?.create("point");
|
|
80
80
|
}
|
|
81
|
-
_handleSketchComplete(
|
|
82
|
-
if (
|
|
83
|
-
r.layer.remove(
|
|
81
|
+
_handleSketchComplete(e, t, r) {
|
|
82
|
+
if (e.state === "complete" && e.graphic) {
|
|
83
|
+
r.layer.remove(e.graphic), this._performHitTest(e, t, r);
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
e.state === "cancel" && (this._resetCursor(), this.arcgisTraceLocationSelectEnd.emit());
|
|
87
87
|
}
|
|
88
|
-
async _performHitTest(
|
|
88
|
+
async _performHitTest(e, t, r) {
|
|
89
89
|
const { utilityNetwork: s } = this;
|
|
90
90
|
if (!s) {
|
|
91
|
-
u("error", this,
|
|
91
|
+
u("error", this, y("utilityNetwork")), this._resetCursor(), this.arcgisTraceLocationSelectEnd.emit();
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const n = e.graphic?.geometry, i = t.toScreen(n);
|
|
95
95
|
if (!i) {
|
|
96
|
-
u("warn", this, "No screen point available for hit test."), this._startSketch(
|
|
96
|
+
u("warn", this, "No screen point available for hit test."), this._startSketch(t, r);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
const a = (await
|
|
99
|
+
const a = (await t.hitTest(i, {
|
|
100
100
|
include: this.filterLayers
|
|
101
|
-
})).results.filter((
|
|
101
|
+
})).results.filter((o) => o.type === "graphic" && o?.layer && o.graphic);
|
|
102
102
|
if (a.length === 0) {
|
|
103
|
-
u("info", this, "No usable hit test results found."), this._startSketch(
|
|
103
|
+
u("info", this, "No usable hit test results found."), this._startSketch(t, r);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
this._resetCursor(), await this._processHitTestResults(a,
|
|
106
|
+
this._resetCursor(), await this._processHitTestResults(a, n, t), this.arcgisTraceLocationSelectEnd.emit();
|
|
107
107
|
}
|
|
108
108
|
_resetCursor() {
|
|
109
|
-
const { view:
|
|
110
|
-
if (!
|
|
111
|
-
u("error", this,
|
|
109
|
+
const { view: e } = this;
|
|
110
|
+
if (!e) {
|
|
111
|
+
u("error", this, y("view"));
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
this._clickHandler?.remove(), this._clickHandler = void 0, "acquireCursor" in
|
|
114
|
+
this._clickHandler?.remove(), this._clickHandler = void 0, "acquireCursor" in e && e.acquireCursor("default");
|
|
115
115
|
}
|
|
116
|
-
async _processHitTestResults(
|
|
117
|
-
if (
|
|
116
|
+
async _processHitTestResults(e, t, r) {
|
|
117
|
+
if (e.length === 0) {
|
|
118
118
|
u("error", this, "There are no hit test results to process.");
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
const s =
|
|
122
|
-
const
|
|
123
|
-
return l.origin =
|
|
124
|
-
}), i = this.afterHitTest ? await this.afterHitTest(
|
|
121
|
+
const s = e[0], n = e.map((a) => {
|
|
122
|
+
const o = a, l = o.graphic;
|
|
123
|
+
return l.origin = o.layer, l.sourceLayer = o.layer, l;
|
|
124
|
+
}), i = this.afterHitTest ? await this.afterHitTest(n).catch(() => (
|
|
125
125
|
// if the callback is rejected treat it as a cancellation of the selection process, and do not add a trace location
|
|
126
126
|
null
|
|
127
127
|
)) : s.graphic;
|
|
@@ -134,22 +134,22 @@ class N extends A {
|
|
|
134
134
|
u("error", this, "Unable to ensure necessary attributes on the selected graphic."), this.arcgisTraceLocationSelectEnd.emit();
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
await this._generateTraceLocation(c,
|
|
137
|
+
await this._generateTraceLocation(c, t, r);
|
|
138
138
|
}
|
|
139
|
-
async _ensureNecessaryAttributes(
|
|
140
|
-
const
|
|
141
|
-
if (
|
|
142
|
-
return
|
|
143
|
-
const
|
|
144
|
-
return
|
|
139
|
+
async _ensureNecessaryAttributes(e) {
|
|
140
|
+
const t = (S(e.layer), e.layer), r = t.geometryType === null, s = t.fieldsIndex?.get("assetgroup") ?? !1, n = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", i = t.fieldsIndex?.get("assettype") ?? !1, c = t.fieldsIndex?.get("assettype")?.name ?? "assettype", a = e.getGlobalId(), o = e.getObjectId(), l = s ? !!e.getAttribute(n) : !0, d = i ? !!e.getAttribute(c) : !0, p = !!e.geometry;
|
|
141
|
+
if (a && o && l && d && (p || r))
|
|
142
|
+
return e;
|
|
143
|
+
const g = t.createQuery();
|
|
144
|
+
return g.objectIds = [o], (await t.queryFeatures(g))?.features[0] || null;
|
|
145
145
|
}
|
|
146
|
-
async _generateTraceLocation(
|
|
147
|
-
const { traceLocations: s } = this,
|
|
146
|
+
async _generateTraceLocation(e, t, r) {
|
|
147
|
+
const { traceLocations: s } = this, n = e.getGlobalId() ?? "", i = e.geometry?.type, c = await this._generateFlagInfo(e, t);
|
|
148
148
|
if (!c) {
|
|
149
149
|
u("error", this, "Unable to generate flag info for trace location.");
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
const a = s?.filter((l) => l.spatialProperties.mapGraphic?.getGlobalId() ===
|
|
152
|
+
const a = s?.filter((l) => l.spatialProperties.mapGraphic?.getGlobalId() === n) ?? [];
|
|
153
153
|
if (a.length > 0) {
|
|
154
154
|
if (i !== "polyline") {
|
|
155
155
|
u("warn", this, "A flag with the same globalId already exists.");
|
|
@@ -159,42 +159,42 @@ class N extends A {
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
if (!
|
|
162
|
+
const o = this._addFlagGraphic(e, t, r);
|
|
163
|
+
if (!o) {
|
|
164
164
|
u("warn", this, "Unable to add flag graphic.");
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
c.spatialProperties.flagGraphic =
|
|
167
|
+
c.spatialProperties.flagGraphic = o, s?.add(c);
|
|
168
168
|
}
|
|
169
|
-
async _generateFlagInfo(
|
|
170
|
-
const { traceLocationType: r, utilityNetwork: s } = this,
|
|
169
|
+
async _generateFlagInfo(e, t) {
|
|
170
|
+
const { traceLocationType: r, utilityNetwork: s } = this, n = e.getGlobalId() ?? "", i = e.geometry?.type, c = await this._generateItemTitle(e);
|
|
171
171
|
if (i === "point" || i === "polygon") {
|
|
172
|
-
const a = s?.getTerminalConfiguration(
|
|
172
|
+
const a = s?.getTerminalConfiguration(e), o = a ? a.terminals[0].id : 1;
|
|
173
173
|
return {
|
|
174
|
-
traceLocation: new
|
|
174
|
+
traceLocation: new w({
|
|
175
175
|
type: r,
|
|
176
176
|
isFilterBarrier: !1,
|
|
177
|
-
globalId:
|
|
178
|
-
terminalId:
|
|
177
|
+
globalId: n,
|
|
178
|
+
terminalId: o
|
|
179
179
|
}),
|
|
180
180
|
flagProperties: {
|
|
181
181
|
title: c,
|
|
182
182
|
expanded: !1,
|
|
183
183
|
terminalConfiguration: a ?? void 0,
|
|
184
|
-
selectedTerminals: a ? /* @__PURE__ */ new Set([
|
|
184
|
+
selectedTerminals: a ? /* @__PURE__ */ new Set([o]) : void 0
|
|
185
185
|
},
|
|
186
186
|
spatialProperties: {
|
|
187
|
-
mapPoint:
|
|
188
|
-
mapGraphic:
|
|
187
|
+
mapPoint: t,
|
|
188
|
+
mapGraphic: e
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
} else if (i === "polyline") {
|
|
192
|
-
const a = this._calculatePercentAlong(
|
|
192
|
+
const a = this._calculatePercentAlong(e.geometry, t);
|
|
193
193
|
return {
|
|
194
|
-
traceLocation: new
|
|
194
|
+
traceLocation: new w({
|
|
195
195
|
type: r,
|
|
196
196
|
isFilterBarrier: !1,
|
|
197
|
-
globalId:
|
|
197
|
+
globalId: n,
|
|
198
198
|
percentAlong: a
|
|
199
199
|
}),
|
|
200
200
|
flagProperties: {
|
|
@@ -202,65 +202,65 @@ class N extends A {
|
|
|
202
202
|
expanded: !1
|
|
203
203
|
},
|
|
204
204
|
spatialProperties: {
|
|
205
|
-
mapPoint:
|
|
206
|
-
mapGraphic:
|
|
205
|
+
mapPoint: t,
|
|
206
|
+
mapGraphic: e
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
} else if (!i) {
|
|
210
|
-
const a =
|
|
210
|
+
const a = P(e.layer) ? e.layer.parent : e.layer, o = a && this._edgeSourceLayerIds.includes(a.layerId), l = s?.getTerminalConfiguration(e), d = l ? l.terminals[0].id : o ? -1 : 1, p = o ? 0.5 : -1;
|
|
211
211
|
return {
|
|
212
|
-
traceLocation: new
|
|
212
|
+
traceLocation: new w({
|
|
213
213
|
type: r,
|
|
214
214
|
isFilterBarrier: !1,
|
|
215
|
-
globalId:
|
|
216
|
-
terminalId:
|
|
217
|
-
percentAlong:
|
|
215
|
+
globalId: n,
|
|
216
|
+
terminalId: d,
|
|
217
|
+
percentAlong: p
|
|
218
218
|
}),
|
|
219
219
|
flagProperties: {
|
|
220
220
|
title: c,
|
|
221
221
|
expanded: !1,
|
|
222
222
|
terminalConfiguration: l ?? void 0,
|
|
223
|
-
selectedTerminals: l ? /* @__PURE__ */ new Set([
|
|
223
|
+
selectedTerminals: l ? /* @__PURE__ */ new Set([d]) : void 0
|
|
224
224
|
},
|
|
225
225
|
spatialProperties: {
|
|
226
|
-
mapPoint:
|
|
227
|
-
mapGraphic:
|
|
226
|
+
mapPoint: t,
|
|
227
|
+
mapGraphic: e
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
return null;
|
|
232
232
|
}
|
|
233
|
-
async _generateItemTitle(
|
|
234
|
-
const { messages:
|
|
235
|
-
return ("getFeatureTitle" in r ? await r.getFeatureTitle(
|
|
233
|
+
async _generateItemTitle(e) {
|
|
234
|
+
const { messages: t } = this, r = (S(e.layer), e.layer);
|
|
235
|
+
return ("getFeatureTitle" in r ? await r.getFeatureTitle(e) : null) || e?.getObjectId()?.toString() || t.labels.unknown;
|
|
236
236
|
}
|
|
237
|
-
_addFlagGraphic(
|
|
238
|
-
const s =
|
|
237
|
+
_addFlagGraphic(e, t, r) {
|
|
238
|
+
const s = e.geometry ? e.geometry.type === "point" ? e.geometry : t : null, n = this._createFlagSymbol(), i = new G({
|
|
239
239
|
geometry: s,
|
|
240
|
-
symbol:
|
|
241
|
-
attributes:
|
|
240
|
+
symbol: n,
|
|
241
|
+
attributes: e.attributes
|
|
242
242
|
});
|
|
243
243
|
return r.graphics.add(i), i;
|
|
244
244
|
}
|
|
245
245
|
_createFlagSymbol() {
|
|
246
|
-
const { traceLocationType:
|
|
247
|
-
return
|
|
248
|
-
color:
|
|
246
|
+
const { traceLocationType: e } = this, t = [244, 21, 21, 0.6], r = [21, 244, 21, 0.6];
|
|
247
|
+
return e === "stopping-point" ? new T({
|
|
248
|
+
color: t,
|
|
249
249
|
style: "x",
|
|
250
250
|
size: 12,
|
|
251
251
|
outline: {
|
|
252
|
-
color:
|
|
252
|
+
color: t,
|
|
253
253
|
width: 2
|
|
254
254
|
}
|
|
255
|
-
}) :
|
|
256
|
-
color:
|
|
255
|
+
}) : e === "barrier" ? new T({
|
|
256
|
+
color: t,
|
|
257
257
|
style: "square",
|
|
258
258
|
size: 12,
|
|
259
259
|
outline: {
|
|
260
|
-
color:
|
|
260
|
+
color: t,
|
|
261
261
|
width: 0
|
|
262
262
|
}
|
|
263
|
-
}) : new
|
|
263
|
+
}) : new T({
|
|
264
264
|
color: r,
|
|
265
265
|
style: "circle",
|
|
266
266
|
size: 12,
|
|
@@ -271,20 +271,20 @@ class N extends A {
|
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
_handleClearButtonClick() {
|
|
274
|
-
const { view:
|
|
275
|
-
|
|
276
|
-
r.spatialProperties.flagGraphic &&
|
|
277
|
-
}),
|
|
274
|
+
const { view: e, traceLocations: t } = this;
|
|
275
|
+
t?.forEach((r) => {
|
|
276
|
+
r.spatialProperties.flagGraphic && e && e.graphics.remove(r.spatialProperties.flagGraphic);
|
|
277
|
+
}), t?.removeAll();
|
|
278
278
|
}
|
|
279
279
|
renderAddLocationBlock() {
|
|
280
|
-
const { traceLocationType:
|
|
281
|
-
return f`<calcite-block .heading=${i} .label=${i} expanded .description=${c}>${r?.length ? f`<calcite-button class="clear-button" slot=actions-end appearance=transparent .label=${
|
|
280
|
+
const { traceLocationType: e, messages: t, traceLocations: r, view: s } = this, n = e === "starting-point" ? t.types.startingPoint : e === "barrier" ? t.types.barrier : t.types.stoppingPoint, i = n.heading, c = n.description, a = n.buttonText;
|
|
281
|
+
return f`<calcite-block .heading=${i} .label=${i} expanded .description=${c}>${r?.length ? f`<calcite-button class="clear-button" slot=actions-end appearance=transparent .label=${t.buttons.clear} @click=${() => this._handleClearButtonClick()}>${t.buttons.clear}</calcite-button>` : null}<arcgis-utility-network-trace-location-list .traceLocations=${r} .traceLocationType=${e} .view=${s}></arcgis-utility-network-trace-location-list><div class="button-container"><calcite-button .loading=${this.isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${a} @click=${() => this._handleAddButtonClick()}>${a}</calcite-button></div></calcite-block>`;
|
|
282
282
|
}
|
|
283
283
|
render() {
|
|
284
284
|
return f`<div class="root">${this.renderAddLocationBlock()}</div>`;
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
|
|
287
|
+
_("arcgis-utility-network-trace-location", R);
|
|
288
288
|
export {
|
|
289
|
-
|
|
289
|
+
R as ArcgisUtilityNetworkTraceLocation
|
|
290
290
|
};
|