@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.
Files changed (148) hide show
  1. package/dist/cdn/{H3W4AVNX.js → 23KLANNA.js} +1 -1
  2. package/dist/cdn/{LF3ACEGB.js → 23REZ2B2.js} +1 -1
  3. package/dist/cdn/{47EM5634.js → 2W3VBU7J.js} +1 -1
  4. package/dist/cdn/{XFLYIMEH.js → 323UBCSA.js} +1 -1
  5. package/dist/cdn/{EJ3K6UKQ.js → 3F72VWYL.js} +1 -1
  6. package/dist/cdn/{BVV442IW.js → 3FQKWB7C.js} +1 -1
  7. package/dist/cdn/{N6P3CYCE.js → 3NIIEYZ3.js} +1 -1
  8. package/dist/cdn/{H35H7V4U.js → 3RBPQIY2.js} +1 -1
  9. package/dist/cdn/{64K3ZLWU.js → 3TSFQO2E.js} +1 -1
  10. package/dist/cdn/{64RBSCIU.js → 43AAIXLC.js} +1 -1
  11. package/dist/cdn/{WRKFEF2E.js → 4C65FPRR.js} +1 -1
  12. package/dist/cdn/{5DCBCU6G.js → 4QDDVY23.js} +1 -1
  13. package/dist/cdn/{UFMWUZE3.js → 4TP652AL.js} +1 -1
  14. package/dist/cdn/{7P2RN5VN.js → 4YBNCIDF.js} +1 -1
  15. package/dist/cdn/{T3IOQA35.js → 4YOGEANW.js} +1 -1
  16. package/dist/cdn/{SVVJHTPA.js → 6BSFBUM6.js} +1 -1
  17. package/dist/cdn/{JSTCLI7D.js → 6G6M4M5S.js} +1 -1
  18. package/dist/cdn/{JS63ZT7D.js → 6MNOO7S3.js} +1 -1
  19. package/dist/cdn/{2SQ2T6UO.js → 6NTYMNLN.js} +1 -1
  20. package/dist/cdn/{SI3YNLBT.js → 6QUGJX3I.js} +1 -1
  21. package/dist/cdn/{LCWJCL4W.js → 7E7AM2OJ.js} +1 -1
  22. package/dist/cdn/{RERHZ7N6.js → 7J2JZ2SZ.js} +1 -1
  23. package/dist/cdn/{NDK2KLBE.js → 7KAQ36QW.js} +1 -1
  24. package/dist/cdn/{VLRZCW6D.js → 7OM5OVLK.js} +1 -1
  25. package/dist/cdn/{HJDWKPKG.js → A2Y4QEYJ.js} +1 -1
  26. package/dist/cdn/{MN6VPZBF.js → A3PNX3GL.js} +1 -1
  27. package/dist/cdn/{VCLHE53D.js → AEX2GVOA.js} +1 -1
  28. package/dist/cdn/{EDKX67YT.js → AHYVOMEG.js} +1 -1
  29. package/dist/cdn/{5CJ44XUV.js → AIUHMRPO.js} +1 -1
  30. package/dist/cdn/{S32MGHWV.js → AK3LR5KN.js} +1 -1
  31. package/dist/cdn/{PJ6ASBCK.js → ATCF2HG3.js} +1 -1
  32. package/dist/cdn/{NRDGJWVQ.js → AZ6KIV47.js} +1 -1
  33. package/dist/cdn/{KQE4KBPO.js → BDL7JHSJ.js} +1 -1
  34. package/dist/cdn/{4EJULFOT.js → BDQN2SGF.js} +1 -1
  35. package/dist/cdn/{LZSSMLAK.js → BLFJJQQ3.js} +1 -1
  36. package/dist/cdn/{IXP3RVNX.js → BLKKPXDO.js} +1 -1
  37. package/dist/cdn/{ANBLWVAY.js → BLXKBUSY.js} +1 -1
  38. package/dist/cdn/{DQJMLG55.js → CTFHP4WA.js} +1 -1
  39. package/dist/cdn/{WH7FEIAX.js → CWQLKJFC.js} +1 -1
  40. package/dist/cdn/{AK5ROHZH.js → CXQ47WC4.js} +1 -1
  41. package/dist/cdn/{D4VBRIIX.js → DJGZ4YG5.js} +1 -1
  42. package/dist/cdn/{3L2UM4VM.js → DJP36K3Y.js} +1 -1
  43. package/dist/cdn/{HIHI4JJ3.js → DLDEDYSE.js} +1 -1
  44. package/dist/cdn/{Z2WO7B65.js → DRVFBFOW.js} +1 -1
  45. package/dist/cdn/{3MQK2MOH.js → E23LKC2A.js} +1 -1
  46. package/dist/cdn/{LYUX5DD5.js → EAKRGXQC.js} +1 -1
  47. package/dist/cdn/{7JGUTIGF.js → EWOBALV7.js} +1 -1
  48. package/dist/cdn/{LREZ5SKG.js → EYBE3ZBK.js} +1 -1
  49. package/dist/cdn/{3KOWS73L.js → EYQYDFFT.js} +1 -1
  50. package/dist/cdn/{6K7HT6IF.js → EYT725LZ.js} +1 -1
  51. package/dist/cdn/{BBCKCE5B.js → F76SAKGH.js} +1 -1
  52. package/dist/cdn/{ZYCOEJDE.js → FBHD2ZEY.js} +1 -1
  53. package/dist/cdn/{VG6AAARR.js → FMAT4CW4.js} +1 -1
  54. package/dist/cdn/{FII7IMJT.js → GGHVYX5B.js} +1 -1
  55. package/dist/cdn/{YIIQACF6.js → GIBM773H.js} +1 -1
  56. package/dist/cdn/{CM2DTEKZ.js → GL2CGH7O.js} +1 -1
  57. package/dist/cdn/{AHYA2UI7.js → HH5RW37I.js} +1 -1
  58. package/dist/cdn/{DL5FSQTT.js → HJ3OTVSP.js} +1 -1
  59. package/dist/cdn/{7DOI3267.js → HKAKOHQC.js} +1 -1
  60. package/dist/cdn/{EU2LDM45.js → HNQPE3FT.js} +1 -1
  61. package/dist/cdn/{OSYS3QIX.js → HOO4XLPB.js} +1 -1
  62. package/dist/cdn/{JO2YQJCG.js → HSAVWAGS.js} +1 -1
  63. package/dist/cdn/{OKKVTQV5.js → IFWIELXX.js} +1 -1
  64. package/dist/cdn/{ZD4Y4HRX.js → IJICMS5G.js} +1 -1
  65. package/dist/cdn/{442445AM.js → IS2PGNSH.js} +1 -1
  66. package/dist/cdn/{7RAC6JLJ.js → IUI2SSE7.js} +1 -1
  67. package/dist/cdn/{3JMJAUSY.js → IUZTQ4PQ.js} +1 -1
  68. package/dist/cdn/{NSWFEQPG.js → J5IZSPU4.js} +1 -1
  69. package/dist/cdn/{4Q6KP7JZ.js → JCLR7GTA.js} +1 -1
  70. package/dist/cdn/{URMIFMUJ.js → JDAMFTUY.js} +1 -1
  71. package/dist/cdn/{6DE54WXK.js → JTOVZZIK.js} +1 -1
  72. package/dist/cdn/{3SDSU2FD.js → KB5J5TKR.js} +1 -1
  73. package/dist/cdn/{CMMCCDZM.js → L26JLESC.js} +1 -1
  74. package/dist/cdn/{PESOHUKZ.js → LNY6JB4T.js} +1 -1
  75. package/dist/cdn/{MFITF23R.js → LPD2FPBE.js} +1 -1
  76. package/dist/cdn/{2G3HODZY.js → M2MXC4LH.js} +1 -1
  77. package/dist/cdn/{6ZLSCYL5.js → MDUFAELV.js} +1 -1
  78. package/dist/cdn/MGOKVOUR.js +2 -0
  79. package/dist/cdn/{BHOFCE2A.js → MZENIHK3.js} +1 -1
  80. package/dist/cdn/{5HJXFPDL.js → N2AXFVQB.js} +1 -1
  81. package/dist/cdn/{BIXYC4AJ.js → NJX4DH3C.js} +1 -1
  82. package/dist/cdn/{OWIJFPEZ.js → NMZDLL4M.js} +1 -1
  83. package/dist/cdn/{DE5AA22M.js → NWE4GWG6.js} +1 -1
  84. package/dist/cdn/{SHA36V36.js → O3CBEPSE.js} +1 -1
  85. package/dist/cdn/{RT7W2L3G.js → O4KTJ2LP.js} +1 -1
  86. package/dist/cdn/{RO4TU5R3.js → OHDHHNIY.js} +1 -1
  87. package/dist/cdn/{VDXT7AXJ.js → ON57EB3S.js} +1 -1
  88. package/dist/cdn/{Z5NISON6.js → OXM4YQGO.js} +1 -1
  89. package/dist/cdn/{DYI5GSBP.js → PCBKRI33.js} +1 -1
  90. package/dist/cdn/{GLFXKTJG.js → PDSZXTW2.js} +1 -1
  91. package/dist/cdn/{FZUR5QCD.js → PUKUYV7Z.js} +1 -1
  92. package/dist/cdn/{QUXKTXGS.js → PV4EVFZL.js} +1 -1
  93. package/dist/cdn/QIHCQOKX.js +2 -0
  94. package/dist/cdn/{7OCT6QER.js → QOL55WND.js} +1 -1
  95. package/dist/cdn/{6OUYTR22.js → QSNY7PKS.js} +1 -1
  96. package/dist/cdn/{ZW3F22OF.js → QUZN3WEI.js} +1 -1
  97. package/dist/cdn/{WDAYQZKY.js → R2SRU7YZ.js} +1 -1
  98. package/dist/cdn/R3NYK6BO.js +2 -0
  99. package/dist/cdn/{55IJQTCC.js → RFJ2A4C5.js} +1 -1
  100. package/dist/cdn/{6CMVUTDU.js → RISMNCOT.js} +1 -1
  101. package/dist/cdn/{PDRWEM43.js → RPNWPXQM.js} +1 -1
  102. package/dist/cdn/{KOLU46FC.js → RRZZQHHA.js} +1 -1
  103. package/dist/cdn/{F2MDJ3QQ.js → RSBGBKYW.js} +1 -1
  104. package/dist/cdn/{IUL5Z7VB.js → RTB2XKDJ.js} +1 -1
  105. package/dist/cdn/{QFXQQ57I.js → RTWUAZET.js} +1 -1
  106. package/dist/cdn/{YSJ2M36J.js → SMEJ4YAT.js} +1 -1
  107. package/dist/cdn/{JNUEXFDM.js → SNQ2FGIZ.js} +1 -1
  108. package/dist/cdn/{DRJGVD7E.js → SVFZT7GR.js} +1 -1
  109. package/dist/cdn/{PZRX6DU7.js → T5A2YHUT.js} +1 -1
  110. package/dist/cdn/{RZCSCSZX.js → TG7WC3X6.js} +1 -1
  111. package/dist/cdn/{V46EJSBT.js → TTXSJRX5.js} +1 -1
  112. package/dist/cdn/{CK5FRYUH.js → TY7DGFDV.js} +1 -1
  113. package/dist/cdn/{PIRNCGNB.js → UMBRQNGS.js} +1 -1
  114. package/dist/cdn/{RRK4SIGU.js → VVTVZ23C.js} +1 -1
  115. package/dist/cdn/{DXG3NX4D.js → WGW42I4K.js} +1 -1
  116. package/dist/cdn/{I7NY2VAH.js → WPHAAGQP.js} +1 -1
  117. package/dist/cdn/{HRPEPALP.js → X4JK3J5H.js} +1 -1
  118. package/dist/cdn/{4J5MWUWB.js → X6YUOAIF.js} +1 -1
  119. package/dist/cdn/{X4YAWY7C.js → XCGJZDIU.js} +1 -1
  120. package/dist/cdn/{5E64VGZ5.js → XJ7YGYPW.js} +1 -1
  121. package/dist/cdn/{TCFMT5ET.js → XRXXGGKZ.js} +1 -1
  122. package/dist/cdn/{OCGWSO54.js → YOBLHGZK.js} +1 -1
  123. package/dist/cdn/{I3ZAURHF.js → YT45OEI2.js} +1 -1
  124. package/dist/cdn/{LAIMIE36.js → YZLPEORC.js} +1 -1
  125. package/dist/cdn/{J5DZU2LD.js → ZBIHLQ6H.js} +1 -1
  126. package/dist/cdn/ZCCTN4B7.js +2 -0
  127. package/dist/cdn/{AJVS7BWH.js → ZEKJESMA.js} +1 -1
  128. package/dist/cdn/index.js +1 -1
  129. package/dist/chunks/action-utils.js +2 -2
  130. package/dist/chunks/layer-utils.js +26 -31
  131. package/dist/components/arcgis-feature-templates-legacy/customElement.d.ts +98 -0
  132. package/dist/components/arcgis-features/customElement.js +90 -106
  133. package/dist/components/arcgis-layer-list-item/customElement.js +1 -1
  134. package/dist/components/arcgis-paste/customElement.js +33 -20
  135. package/dist/components/arcgis-utility-network-trace-location/customElement.js +120 -120
  136. package/dist/docs/api.json +1 -1
  137. package/dist/docs/docs.json +1 -1
  138. package/dist/docs/vscode.html-custom-data.json +1 -1
  139. package/dist/docs/web-types.json +1 -1
  140. package/dist/types/lumina.d.ts +1 -1
  141. package/dist/types/preact.d.ts +1 -1
  142. package/dist/types/react.d.ts +1 -1
  143. package/dist/types/stencil.d.ts +1 -1
  144. package/package.json +4 -4
  145. package/dist/cdn/AE3QS3U2.js +0 -2
  146. package/dist/cdn/CX4BONNF.js +0 -2
  147. package/dist/cdn/NKR3PQHN.js +0 -2
  148. 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 = Oe(m, t);
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 Oe(e, t) {
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 = Ge(
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 Ge(e, t) {
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, O = (e, t, i, a) => {
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
- O([
536
+ G([
537
537
  r()
538
538
  ], F.prototype, "id", 1);
539
- O([
539
+ G([
540
540
  r()
541
541
  ], F.prototype, "icon", 1);
542
- O([
542
+ G([
543
543
  r()
544
544
  ], F.prototype, "immediate", 1);
545
- O([
545
+ G([
546
546
  r()
547
547
  ], F.prototype, "mustShowOnCommandPage", 1);
548
- O([
548
+ G([
549
549
  r()
550
550
  ], F.prototype, "commandEnabled", 1);
551
- F = O([
551
+ F = G([
552
552
  C("components.paste.commands.PasteAppendCommand")
553
553
  ], F);
554
- var We = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, G = (e, t, i, a) => {
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
- G([
672
+ O([
673
673
  r()
674
674
  ], _.prototype, "id", 1);
675
- G([
675
+ O([
676
676
  r()
677
677
  ], _.prototype, "icon", 1);
678
- G([
678
+ O([
679
679
  r()
680
680
  ], _.prototype, "immediate", 1);
681
- G([
681
+ O([
682
682
  r()
683
683
  ], _.prototype, "mustShowOnCommandPage", 1);
684
- G([
684
+ O([
685
685
  r()
686
686
  ], _.prototype, "commandEnabled", 1);
687
- _ = G([
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 k } from "../../chunks/runtime.js";
3
- import { css as _, html as f } from "lit";
4
- import * as x from "@arcgis/core/geometry/operators/cutOperator.js";
5
- import * as y from "@arcgis/core/geometry/operators/lengthOperator.js";
6
- import * as m from "@arcgis/core/geometry/operators/projectOperator.js";
7
- import C from "@arcgis/core/geometry/Polyline.js";
8
- import I from "@arcgis/core/geometry/SpatialReference.js";
9
- import F from "@arcgis/core/Graphic.js";
10
- import b from "@arcgis/core/rest/networks/support/TraceLocation.js";
11
- import w from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
12
- import { LitElement as A, createEvent as T } from "@arcgis/lumina";
13
- import { log as u, composeMissingPropertyMessage as g } from "@arcgis/toolkit/log";
14
- import { u as G } from "../../chunks/useT9n.js";
15
- import { d as S, i as v } from "../../chunks/layer-utils.js";
16
- const P = _`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 N extends A {
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 = G({ blocking: !0 }), this.isSelectWaiting = !1, this.traceLocationType = "starting-point", this.spatialTolerance = 0.05, this.autoDestroyDisabled = !1, this.arcgisTraceLocationChange = T(), this.arcgisTraceLocationSelectEnd = T(), this.arcgisTraceLocationSelectStart = T();
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 = P;
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
- m.isLoaded() || await m.load();
31
+ b.isLoaded() || await b.load();
32
32
  }
33
- _createPolyline(t, e) {
34
- return new C({
33
+ _createPolyline(e, t) {
34
+ return new I({
35
35
  hasZ: !1,
36
36
  hasM: !0,
37
- paths: t,
38
- spatialReference: new I({ wkid: e })
37
+ paths: e,
38
+ spatialReference: new F({ wkid: t })
39
39
  });
40
40
  }
41
- _calculatePercentAlong(t, e) {
42
- const r = t.spatialReference, s = this._createPolyline(t.paths, r.wkid), o = e.x - 0.5, i = e.x + 0.5, c = e.y - 0.5, a = e.y + 0.5, n = [
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
- [o, c],
44
+ [n, c],
45
45
  [i, a]
46
46
  ]
47
- ], l = this._createPolyline(n, e.spatialReference.wkid), p = m.execute(l, r);
48
- if (!p)
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 d = x.execute(s, p);
51
- if (d.length > 0) {
52
- const L = y.execute(s, { unit: "feet" });
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 d[0].paths[0][0][0] === s.paths[0][0][0] ? h = y.execute(d[0], { unit: "feet" }) : d.length > 1 ? h = y.execute(d[1], { unit: "feet" }) : h = 0, h / L;
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 t = this.utilityNetwork?.dataElement?.domainNetworks;
60
- return t ? t.flatMap((e) => e.edgeSources).map((e) => e.layerId).filter(Boolean) : [];
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: t, sketchViewModel: e } = this;
64
- if (!(t && e)) {
65
- u("error", this, "Cannot add trace location."), e || u("error", this, g("sketchViewModel")), t || u("error", this, g("view"));
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: () => e.cancel() }).defaultPrevented || await this._startSketch(t, e);
76
+ this.arcgisTraceLocationSelectStart.emit({ cancelSelect: () => t.cancel() }).defaultPrevented || await this._startSketch(e, t);
77
77
  }
78
- async _startSketch(t, e) {
79
- this._clickHandler?.remove(), this._clickHandler = e.on("create", (r) => this._handleSketchComplete(r, t, e)), "acquireCursor" in t && t.acquireCursor("crosshair"), this.sketchViewModel?.create("point");
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(t, e, r) {
82
- if (t.state === "complete" && t.graphic) {
83
- r.layer.remove(t.graphic), this._performHitTest(t, e, r);
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
- t.state === "cancel" && (this._resetCursor(), this.arcgisTraceLocationSelectEnd.emit());
86
+ e.state === "cancel" && (this._resetCursor(), this.arcgisTraceLocationSelectEnd.emit());
87
87
  }
88
- async _performHitTest(t, e, r) {
88
+ async _performHitTest(e, t, r) {
89
89
  const { utilityNetwork: s } = this;
90
90
  if (!s) {
91
- u("error", this, g("utilityNetwork")), this._resetCursor(), this.arcgisTraceLocationSelectEnd.emit();
91
+ u("error", this, y("utilityNetwork")), this._resetCursor(), this.arcgisTraceLocationSelectEnd.emit();
92
92
  return;
93
93
  }
94
- const o = t.graphic?.geometry, i = e.toScreen(o);
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(e, r);
96
+ u("warn", this, "No screen point available for hit test."), this._startSketch(t, r);
97
97
  return;
98
98
  }
99
- const a = (await e.hitTest(i, {
99
+ const a = (await t.hitTest(i, {
100
100
  include: this.filterLayers
101
- })).results.filter((n) => n.type === "graphic" && n?.layer && n.graphic);
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(e, r);
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, o, e), this.arcgisTraceLocationSelectEnd.emit();
106
+ this._resetCursor(), await this._processHitTestResults(a, n, t), this.arcgisTraceLocationSelectEnd.emit();
107
107
  }
108
108
  _resetCursor() {
109
- const { view: t } = this;
110
- if (!t) {
111
- u("error", this, g("view"));
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 t && t.acquireCursor("default");
114
+ this._clickHandler?.remove(), this._clickHandler = void 0, "acquireCursor" in e && e.acquireCursor("default");
115
115
  }
116
- async _processHitTestResults(t, e, r) {
117
- if (t.length === 0) {
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 = t[0], o = t.map((a) => {
122
- const n = a, l = n.graphic;
123
- return l.origin = n.layer, l.sourceLayer = n.layer, l;
124
- }), i = this.afterHitTest ? await this.afterHitTest(o).catch(() => (
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, e, r);
137
+ await this._generateTraceLocation(c, t, r);
138
138
  }
139
- async _ensureNecessaryAttributes(t) {
140
- const e = (S(t.layer), t.layer), r = e.fieldsIndex?.get("assetgroup") ?? !1, s = e.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", o = e.fieldsIndex?.get("assettype") ?? !1, i = e.fieldsIndex?.get("assettype")?.name ?? "assettype", c = t.getGlobalId(), a = t.getObjectId(), n = r ? !!t.getAttribute(s) : !0, l = o ? !!t.getAttribute(i) : !0;
141
- if (c && a && n && l)
142
- return t;
143
- const p = e.createQuery();
144
- return p.objectIds = [a], (await e.queryFeatures(p))?.features[0] || null;
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(t, e, r) {
147
- const { traceLocations: s } = this, o = t.getGlobalId() ?? "", i = t.geometry?.type, c = await this._generateFlagInfo(t, e);
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() === o) ?? [];
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 n = this._addFlagGraphic(t, e, r);
163
- if (!n) {
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 = n, s?.add(c);
167
+ c.spatialProperties.flagGraphic = o, s?.add(c);
168
168
  }
169
- async _generateFlagInfo(t, e) {
170
- const { traceLocationType: r, utilityNetwork: s } = this, o = t.getGlobalId() ?? "", i = t.geometry?.type, c = await this._generateItemTitle(t);
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(t), n = a ? a.terminals[0].id : 1;
172
+ const a = s?.getTerminalConfiguration(e), o = a ? a.terminals[0].id : 1;
173
173
  return {
174
- traceLocation: new b({
174
+ traceLocation: new w({
175
175
  type: r,
176
176
  isFilterBarrier: !1,
177
- globalId: o,
178
- terminalId: n
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([n]) : void 0
184
+ selectedTerminals: a ? /* @__PURE__ */ new Set([o]) : void 0
185
185
  },
186
186
  spatialProperties: {
187
- mapPoint: e,
188
- mapGraphic: t
187
+ mapPoint: t,
188
+ mapGraphic: e
189
189
  }
190
190
  };
191
191
  } else if (i === "polyline") {
192
- const a = this._calculatePercentAlong(t.geometry, e);
192
+ const a = this._calculatePercentAlong(e.geometry, t);
193
193
  return {
194
- traceLocation: new b({
194
+ traceLocation: new w({
195
195
  type: r,
196
196
  isFilterBarrier: !1,
197
- globalId: o,
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: e,
206
- mapGraphic: t
205
+ mapPoint: t,
206
+ mapGraphic: e
207
207
  }
208
208
  };
209
209
  } else if (!i) {
210
- const a = v(t.layer) ? t.layer.parent : t.layer, n = a && this._edgeSourceLayerIds.includes(a.layerId), l = s?.getTerminalConfiguration(t), p = l ? l.terminals[0].id : n ? -1 : 1, d = n ? 0.5 : -1;
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 b({
212
+ traceLocation: new w({
213
213
  type: r,
214
214
  isFilterBarrier: !1,
215
- globalId: o,
216
- terminalId: p,
217
- percentAlong: d
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([p]) : void 0
223
+ selectedTerminals: l ? /* @__PURE__ */ new Set([d]) : void 0
224
224
  },
225
225
  spatialProperties: {
226
- mapPoint: e,
227
- mapGraphic: t
226
+ mapPoint: t,
227
+ mapGraphic: e
228
228
  }
229
229
  };
230
230
  }
231
231
  return null;
232
232
  }
233
- async _generateItemTitle(t) {
234
- const { messages: e } = this, r = (S(t.layer), t.layer);
235
- return ("getFeatureTitle" in r ? await r.getFeatureTitle(t) : null) || t?.getObjectId()?.toString() || e.labels.unknown;
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(t, e, r) {
238
- const s = t.geometry?.type === "point" ? t.geometry : e, o = this._createFlagSymbol(), i = new F({
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: o,
241
- attributes: t.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: t } = this, e = [244, 21, 21, 0.6], r = [21, 244, 21, 0.6];
247
- return t === "stopping-point" ? new w({
248
- color: e,
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: e,
252
+ color: t,
253
253
  width: 2
254
254
  }
255
- }) : t === "barrier" ? new w({
256
- color: e,
255
+ }) : e === "barrier" ? new T({
256
+ color: t,
257
257
  style: "square",
258
258
  size: 12,
259
259
  outline: {
260
- color: e,
260
+ color: t,
261
261
  width: 0
262
262
  }
263
- }) : new w({
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: t, traceLocations: e } = this;
275
- e?.forEach((r) => {
276
- r.spatialProperties.flagGraphic && t && t.graphics.remove(r.spatialProperties.flagGraphic);
277
- }), e?.removeAll();
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: t, messages: e, traceLocations: r, view: s } = this, o = t === "starting-point" ? e.types.startingPoint : t === "barrier" ? e.types.barrier : e.types.stoppingPoint, i = o.heading, c = o.description, a = o.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=${e.buttons.clear} @click=${() => this._handleClearButtonClick()}>${e.buttons.clear}</calcite-button>` : null}<arcgis-utility-network-trace-location-list .traceLocations=${r} .traceLocationType=${t} .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>`;
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
- k("arcgis-utility-network-trace-location", N);
287
+ _("arcgis-utility-network-trace-location", R);
288
288
  export {
289
- N as ArcgisUtilityNetworkTraceLocation
289
+ R as ArcgisUtilityNetworkTraceLocation
290
290
  };