@arcgis/map-components 6.0.0-next.30 → 6.0.0-next.32

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 (35) hide show
  1. package/dist/cdn/37GYWGAF.js +2 -0
  2. package/dist/cdn/{M7GAVFT6.js → 446MXZCR.js} +1 -1
  3. package/dist/cdn/4KWDLXSO.js +2 -0
  4. package/dist/cdn/{KWF72M5Z.js → 6ARTIZQQ.js} +1 -1
  5. package/dist/cdn/{5IPRYM2C.js → BVJRB5FA.js} +1 -1
  6. package/dist/cdn/{PSPUWCU5.js → M7F66X42.js} +1 -1
  7. package/dist/cdn/PMRTCWGK.js +2 -0
  8. package/dist/cdn/QBVHLHRR.js +2 -0
  9. package/dist/cdn/T4B5XW65.js +2 -0
  10. package/dist/cdn/{UXMKSIYL.js → TY4XRXLB.js} +1 -1
  11. package/dist/cdn/{AKIHNM7C.js → W4BA3ECA.js} +1 -1
  12. package/dist/cdn/{WZWVZD7I.js → WP52KJNL.js} +1 -1
  13. package/dist/cdn/{APCXGAD5.js → YV35TNL4.js} +1 -1
  14. package/dist/cdn/{ORKCIBIY.js → YWOY3GID.js} +1 -1
  15. package/dist/cdn/index.js +1 -1
  16. package/dist/chunks/esri-main.js +1 -1
  17. package/dist/components/arcgis-editor/customElement.js +1 -1
  18. package/dist/components/arcgis-feature-form/customElement.js +1 -1
  19. package/dist/components/arcgis-feature-table/customElement.js +1 -1
  20. package/dist/components/arcgis-multi-feature-form/customElement.js +1 -1
  21. package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.js +1 -1
  22. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +148 -118
  23. package/dist/docs/api.json +1 -1
  24. package/dist/docs/docs.json +1 -1
  25. package/dist/docs/web-types.json +1 -1
  26. package/dist/types/lumina.d.ts +1 -0
  27. package/dist/types/preact.d.ts +1 -0
  28. package/dist/types/react.d.ts +1 -0
  29. package/dist/types/stencil.d.ts +1 -0
  30. package/package.json +6 -6
  31. package/dist/cdn/DGE5KKLM.js +0 -2
  32. package/dist/cdn/J6ZEZ4NE.js +0 -2
  33. package/dist/cdn/M37TWKYP.js +0 -2
  34. package/dist/cdn/O7OKLWBW.js +0 -2
  35. package/dist/cdn/V4JCZIP5.js +0 -2
@@ -1,41 +1,43 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as I } from "../../chunks/runtime.js";
3
- import w from "@arcgis/core/core/Collection.js";
4
- import { cutExecute as C } from "@arcgis/core/geometry/operators/cutOperator.js";
5
- import { lengthExecute as L } from "@arcgis/core/geometry/operators/lengthOperator.js";
6
- import { projectIsLoaded as M, projectLoad as E, projectExecute as P } from "@arcgis/core/geometry/operators/projectOperator.js";
7
- import { proximityGetNearestCoordinate as _ } from "@arcgis/core/geometry/operators/proximityOperator.js";
8
- import A from "@arcgis/core/geometry/Polyline.js";
9
- import F from "@arcgis/core/Graphic.js";
10
- import R from "@arcgis/core/layers/GraphicsLayer.js";
11
- import T from "@arcgis/core/rest/networks/support/TraceLocation.js";
12
- import k from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
13
- import B from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
14
- import { LitElement as q, createEvent as x } from "@arcgis/lumina";
15
- import { log as p, composeMissingPropertyMessage as b } from "@arcgis/toolkit/log";
16
- import { u as D } from "../../chunks/useT9n.js";
17
- import { a as N, d as j, e as G, i as O } from "../../chunks/layer-utils.js";
18
- import { css as H, html as d } from "lit";
19
- import v from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
20
- import { substitute as U } from "@arcgis/core/intl.js";
21
- const W = H`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{display:flex;justify-content:center}calcite-list{margin:0 var(--calcite-space-sm) var(--calcite-space-sm);background-color:var(--calcite-color-surface-2);border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);overflow:hidden}calcite-list-item[selected] [slot=content-bottom]{display:block}.warning{color:var(--calcite-color-status-danger)}.terminals{padding:var(--calcite-space-sm) var(--calcite-space-md);display:flex;flex-direction:column}.filter-barrier{display:flex;justify-content:space-between;align-items:center;width:100%}`, $ = `utility-network-trace-locations-sketch-${Date.now()}`;
22
- class S extends q {
2
+ import { c as A } from "../../chunks/runtime.js";
3
+ import x from "@arcgis/core/core/Collection.js";
4
+ import { cutExecute as F } from "@arcgis/core/geometry/operators/cutOperator.js";
5
+ import { lengthExecute as w } from "@arcgis/core/geometry/operators/lengthOperator.js";
6
+ import { distanceExecute as C } from "@arcgis/core/geometry/operators/distanceOperator.js";
7
+ import { projectIsLoaded as B, projectLoad as D, projectExecute as q } from "@arcgis/core/geometry/operators/projectOperator.js";
8
+ import { proximityGetNearestCoordinate as N } from "@arcgis/core/geometry/operators/proximityOperator.js";
9
+ import M from "@arcgis/core/geometry/Point.js";
10
+ import S from "@arcgis/core/geometry/Polyline.js";
11
+ import j from "@arcgis/core/Graphic.js";
12
+ import O from "@arcgis/core/layers/GraphicsLayer.js";
13
+ import G from "@arcgis/core/rest/networks/support/TraceLocation.js";
14
+ import v from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
15
+ import H from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
16
+ import { LitElement as U, createEvent as $ } from "@arcgis/lumina";
17
+ import { log as p, composeMissingPropertyMessage as k } from "@arcgis/toolkit/log";
18
+ import { u as V } from "../../chunks/useT9n.js";
19
+ import { a as W, d as z, e as R, i as Z } from "../../chunks/layer-utils.js";
20
+ import { css as Q, html as u } from "lit";
21
+ import E from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
22
+ import { substitute as J } from "@arcgis/core/intl.js";
23
+ const K = Q`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{display:flex;justify-content:center}calcite-list{margin:0 var(--calcite-space-sm) var(--calcite-space-sm);background-color:var(--calcite-color-surface-2);border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);overflow:hidden}calcite-list-item[selected] [slot=content-bottom]{display:block}.warning{color:var(--calcite-color-status-danger)}.terminals{padding:var(--calcite-space-sm) var(--calcite-space-md);display:flex;flex-direction:column}.filter-barrier{display:flex;justify-content:space-between;align-items:center;width:100%}`, P = `utility-network-trace-locations-sketch-${Date.now()}`;
24
+ class I extends U {
23
25
  constructor() {
24
- super(...arguments), this._messages = D({ blocking: !0 }), this._isSelectWaiting = !1, this.traceLocationType = "starting-point", this.traceLocations = new w(), this.filterLayers = new w(), this.spatialTolerance = 0.05, this.autoDestroyDisabled = !1, this.arcgisTraceLocationSelectEnd = x(), this.arcgisTraceLocationSelectStart = x(), this.arcgisError = x();
26
+ super(...arguments), this._messages = V({ blocking: !0 }), this._isSelectWaiting = !1, this.traceLocationType = "starting-point", this.traceLocations = new x(), this.filterLayers = new x(), this.spatialTolerance = 0.05, this.autoDestroyDisabled = !1, this.arcgisTraceLocationSelectEnd = $(), this.arcgisTraceLocationSelectStart = $(), this.arcgisError = $();
25
27
  }
26
28
  static {
27
29
  this.properties = { _isSelectWaiting: 16, beforeMapInteraction: 0, afterMapInteraction: 0, messageOverrides: 0, view: 0, traceLocationType: 1, traceLocations: 0, filterLayers: 0, spatialTolerance: 9, error: 1, autoDestroyDisabled: 5, utilityNetwork: 0, heading: 1, sketchViewModel: 32 };
28
30
  }
29
31
  static {
30
- this.styles = W;
32
+ this.styles = K;
31
33
  }
32
34
  static {
33
35
  this.sketchViewModelMap = /* @__PURE__ */ new Map();
34
36
  }
35
37
  static getSketchViewModel(e) {
36
38
  if (!this.sketchViewModelMap.has(e)) {
37
- const t = this.#s(e, $);
38
- t && this.sketchViewModelMap.set(e, new B({ view: e, layer: t }));
39
+ const t = this.#s(e, P);
40
+ t && this.sketchViewModelMap.set(e, new H({ view: e, layer: t }));
39
41
  }
40
42
  return this.sketchViewModelMap.get(e) ?? null;
41
43
  }
@@ -44,37 +46,37 @@ class S extends q {
44
46
  return null;
45
47
  const r = e.map.findLayerById(t);
46
48
  if (!r) {
47
- const i = new R({
49
+ const i = new O({
48
50
  id: t,
49
51
  listMode: "hide",
50
52
  title: t
51
53
  });
52
- return N(e, i), i;
54
+ return W(e, i), i;
53
55
  }
54
56
  return r;
55
57
  }
56
58
  static removeSketchGraphicsLayer(e) {
57
59
  if (e?.map) {
58
- const t = e.map.findLayerById($);
60
+ const t = e.map.findLayerById(P);
59
61
  t && e.map.remove(t), this.sketchViewModelMap.delete(e);
60
62
  }
61
63
  }
62
- #r;
64
+ #t;
63
65
  get sketchViewModel() {
64
- return this.view ? S.getSketchViewModel(this.view) : null;
66
+ return this.view ? I.getSketchViewModel(this.view) : null;
65
67
  }
66
68
  async destroy() {
67
69
  try {
68
- this.#i();
70
+ this.#t && this.sketchViewModel?.cancel(), this.#i();
69
71
  } finally {
70
72
  await this.manager.destroy();
71
73
  }
72
74
  }
73
75
  async load() {
74
- M() || await E();
76
+ B() || await D();
75
77
  }
76
78
  willUpdate(e) {
77
- e.has("filterLayers") && this.#o();
79
+ e.has("filterLayers") && this.#n();
78
80
  }
79
81
  #e(e, t) {
80
82
  this.error = t, p(e, this, t), this.arcgisError.emit();
@@ -83,17 +85,17 @@ class S extends q {
83
85
  const { traceLocations: t, view: r } = this;
84
86
  e.spatialProperties.flagGraphic && r && r.graphics.remove(e.spatialProperties.flagGraphic), t?.remove(e);
85
87
  }
86
- #o() {
88
+ #n() {
87
89
  if (!this.sketchViewModel)
88
90
  return;
89
- const e = new w();
91
+ const e = new x();
90
92
  this.filterLayers?.forEach((t) => {
91
- j(t) ? t.sublayers.forEach((r) => {
92
- e.add(new v({
93
+ z(t) ? t.sublayers.forEach((r) => {
94
+ e.add(new E({
93
95
  layer: r,
94
96
  enabled: !0
95
97
  }));
96
- }) : e.add(new v({
98
+ }) : e.add(new E({
97
99
  layer: t,
98
100
  enabled: !0
99
101
  }));
@@ -102,35 +104,63 @@ class S extends q {
102
104
  featureSources: e
103
105
  };
104
106
  }
105
- #n(e, t) {
107
+ #o(e, t) {
106
108
  const r = e.clone(), i = r.spatialReference, a = t.spatialReference;
107
109
  if (!i || !a)
108
110
  return p("warn", this, "Unable to calculate percent along because geometry is missing a spatial reference."), -1;
109
111
  let s = t;
110
112
  if (!i.equals(a)) {
111
- const f = P(t, i);
112
- if (!f)
113
+ const y = q(t, i);
114
+ if (!y)
113
115
  return p("warn", this, "Unable to project flag point to source geometry spatial reference."), -1;
114
- s = f;
116
+ s = y;
115
117
  }
116
- const c = _(r, s);
118
+ const c = N(r, s);
117
119
  if (c.isEmpty)
118
120
  return p("warn", this, "Unable to compute nearest coordinate for polyline flag."), -1;
119
- const o = c.coordinate, l = o.x - 0.5, n = o.y - 0.5, u = o.x + 0.5, m = o.y + 0.5, g = new A({
121
+ const n = c.coordinate, l = n.x - 0.5, o = n.y - 0.5, h = n.x + 0.5, b = n.y + 0.5, L = new S({
120
122
  hasZ: !1,
121
123
  hasM: !0,
122
124
  paths: [
123
125
  [
124
- [l, n],
125
- [u, m]
126
+ [l, o],
127
+ [h, b]
126
128
  ]
127
129
  ],
128
130
  spatialReference: r.spatialReference
129
- }), h = C(r, g);
130
- if (h.length > 0) {
131
- const f = L(r, { unit: "feet" });
132
- let y;
133
- return h[0].paths[0][0][0] === r.paths[0][0][0] ? y = L(h[0], { unit: "feet" }) : h.length > 1 ? y = L(h[1], { unit: "feet" }) : y = 0, y / f;
131
+ }), d = F(r, L);
132
+ if (d.length > 0) {
133
+ const y = w(r, { unit: "feet" });
134
+ let m;
135
+ if (d.length === 1 && d[0].paths.length > 1) {
136
+ const f = d[0], g = r.paths[0][0], T = f.paths[0][0];
137
+ T[0] === g[0] && T[1] === g[1] ? m = w(new S({
138
+ hasZ: !1,
139
+ hasM: !0,
140
+ paths: [f.paths[0]],
141
+ spatialReference: r.spatialReference
142
+ }), { unit: "feet" }) : m = w(new S({
143
+ hasZ: !1,
144
+ hasM: !0,
145
+ paths: [f.paths[1]],
146
+ spatialReference: r.spatialReference
147
+ }), { unit: "feet" });
148
+ } else if (d.length === 1) {
149
+ const f = new M({
150
+ x: r.paths[0][0][0],
151
+ y: r.paths[0][0][1],
152
+ spatialReference: r.spatialReference
153
+ }), g = new M({
154
+ x: r.paths[0][r.paths[0].length - 1][0],
155
+ y: r.paths[0][r.paths[0].length - 1][1],
156
+ spatialReference: r.spatialReference
157
+ }), T = C(f, s), _ = C(g, s);
158
+ T < _ ? m = 0 : m = y;
159
+ } else {
160
+ const f = r.paths[0][0], g = d[0].paths[0][0];
161
+ g[0] === f[0] && g[1] === f[1] ? m = w(d[0], { unit: "feet" }) : m = w(d[1], { unit: "feet" });
162
+ }
163
+ return m / y;
134
164
  }
135
165
  return p("warn", this, "Unable to cut the source geometry with the flag geometry."), -1;
136
166
  }
@@ -141,7 +171,7 @@ class S extends q {
141
171
  async #l() {
142
172
  const { view: e, sketchViewModel: t } = this;
143
173
  if (!(e && t)) {
144
- p("error", this, "Cannot add trace location."), t || p("error", this, b("sketchViewModel")), e || p("error", this, b("view"));
174
+ p("error", this, "Cannot add trace location."), t || p("error", this, k("sketchViewModel")), e || p("error", this, k("view"));
145
175
  return;
146
176
  }
147
177
  if (this.beforeMapInteraction) {
@@ -152,64 +182,64 @@ class S extends q {
152
182
  this._isSelectWaiting = !1;
153
183
  }
154
184
  }
155
- await this.#t(e, t);
185
+ await this.#r(e, t);
156
186
  }
157
- async #t(e, t) {
158
- this.arcgisTraceLocationSelectStart.emit({ cancelSelect: () => t.cancel() }).defaultPrevented || (this.#r?.remove(), this.#r = t.on("create", (i) => this.#p(i, e, t)), "acquireCursor" in e && e.acquireCursor("crosshair"), t.snappingOptions.enabled = !0, t.create("point"));
187
+ async #r(e, t) {
188
+ this.arcgisTraceLocationSelectStart.emit({ cancelSelect: () => t.cancel() }).defaultPrevented || (this.#t?.remove(), this.#t = t.on("create", (i) => this.#p(i, e, t)), "acquireCursor" in e && e.acquireCursor("crosshair"), t.snappingOptions.enabled = !0, t.create("point"));
159
189
  }
160
190
  #p(e, t, r) {
161
191
  if (e.state === "complete" && e.graphic) {
162
- r.layer.remove(e.graphic), this.#d(e, t, r);
192
+ r.layer.remove(e.graphic), this.#u(e, t, r);
163
193
  return;
164
194
  }
165
195
  e.state === "cancel" && (this.#i(), this.arcgisTraceLocationSelectEnd.emit());
166
196
  }
167
- async #d(e, t, r) {
197
+ async #u(e, t, r) {
168
198
  const { utilityNetwork: i } = this, { graphic: a } = e;
169
199
  if (!i) {
170
- p("error", this, b("utilityNetwork")), this.#i(), this.arcgisTraceLocationSelectEnd.emit();
200
+ p("error", this, k("utilityNetwork")), this.#i(), this.arcgisTraceLocationSelectEnd.emit();
171
201
  return;
172
202
  }
173
203
  if (a?.geometry?.type !== "point") {
174
- this.#e("warn", this._messages.errors.noHitResult), this.#t(t, r);
204
+ this.#e("warn", this._messages.errors.noHitResult), this.#r(t, r);
175
205
  return;
176
206
  }
177
207
  const s = a.geometry, c = t.toScreen(s);
178
208
  if (!c) {
179
- this.#e("warn", this._messages.errors.noHitResult), this.#t(t, r);
209
+ this.#e("warn", this._messages.errors.noHitResult), this.#r(t, r);
180
210
  return;
181
211
  }
182
212
  const l = (await t.hitTest(c, {
183
213
  include: this.filterLayers
184
- })).results.filter((n) => n.type === "graphic" && n?.layer && n.graphic);
214
+ })).results.filter((o) => o.type === "graphic" && o?.layer && o.graphic);
185
215
  if (!l.length) {
186
- this.#e("info", this._messages.errors.noHitResult), this.#t(t, r);
216
+ this.#e("info", this._messages.errors.noHitResult), this.#r(t, r);
187
217
  return;
188
218
  }
189
219
  this.#i();
190
220
  try {
191
- await this.#u(l, s, t) ? this.arcgisTraceLocationSelectEnd.emit() : this.#t(t, r);
192
- } catch (n) {
193
- const u = n instanceof Error ? n.message : String(n);
194
- this.#e("error", u), this.arcgisTraceLocationSelectEnd.emit();
221
+ await this.#h(l, s, t) ? this.arcgisTraceLocationSelectEnd.emit() : this.#r(t, r);
222
+ } catch (o) {
223
+ const h = o instanceof Error ? o.message : String(o);
224
+ this.#e("error", h), this.arcgisTraceLocationSelectEnd.emit();
195
225
  }
196
226
  }
197
227
  #i() {
198
228
  const { view: e, sketchViewModel: t } = this;
199
229
  if (!e) {
200
- p("error", this, b("view"));
230
+ p("error", this, k("view"));
201
231
  return;
202
232
  }
203
- t && (t.snappingOptions.enabled = !1), this.#r?.remove(), this.#r = void 0, "acquireCursor" in e && e.acquireCursor("default");
233
+ t && (t.snappingOptions.enabled = !1), this.#t?.remove(), this.#t = void 0, "acquireCursor" in e && e.acquireCursor("default");
204
234
  }
205
- async #u(e, t, r) {
235
+ async #h(e, t, r) {
206
236
  if (!e.length)
207
237
  return this.#e("error", this._messages.errors.noHitResult), !1;
208
238
  let a = e[0].graphic;
209
239
  if (this.afterMapInteraction) {
210
- const c = e.map((o) => {
211
- const l = o, n = l.graphic;
212
- return n.origin = l.layer, n.sourceLayer = l.layer, n;
240
+ const c = e.map((n) => {
241
+ const l = n, o = l.graphic;
242
+ return o.origin = l.layer, o.sourceLayer = l.layer, o;
213
243
  });
214
244
  try {
215
245
  a = await this.afterMapInteraction(c);
@@ -219,38 +249,38 @@ class S extends q {
219
249
  }
220
250
  if (!a)
221
251
  return !0;
222
- const s = await this.#h(a);
252
+ const s = await this.#d(a);
223
253
  if (!s)
224
254
  throw new Error(this._messages.errors.missingAttributes);
225
- return await this.#m(s, t, r);
255
+ return await this.#f(s, t, r);
226
256
  }
227
- async #h(e) {
228
- const t = (G(e.layer), e.layer), r = t.geometryType === null, i = t.fieldsIndex?.get("assetgroup") ?? !1, a = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", s = t.fieldsIndex?.get("assettype") ?? !1, c = t.fieldsIndex?.get("assettype")?.name ?? "assettype", o = e.getGlobalId(), l = e.getObjectId(), n = i ? !!e.getAttribute(a) : !0, u = s ? !!e.getAttribute(c) : !0, m = !!e.geometry;
229
- if (o && l && n && u && (m || r))
257
+ async #d(e) {
258
+ const t = (R(e.layer), e.layer), r = t.geometryType === null, i = t.fieldsIndex?.get("assetgroup") ?? !1, a = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", s = t.fieldsIndex?.get("assettype") ?? !1, c = t.fieldsIndex?.get("assettype")?.name ?? "assettype", n = e.getGlobalId(), l = e.getObjectId(), o = i ? !!e.getAttribute(a) : !0, h = s ? !!e.getAttribute(c) : !0, b = !!e.geometry;
259
+ if (n && l && o && h && (b || r))
230
260
  return e;
231
- const g = t.createQuery();
232
- return g.objectIds = [l], (await t.queryFeatures(g)).features[0] || null;
261
+ const L = t.createQuery();
262
+ return L.objectIds = [l], (await t.queryFeatures(L)).features[0] || null;
233
263
  }
234
- async #m(e, t, r) {
235
- const { traceLocations: i } = this, a = e.getGlobalId() ?? "", s = e.geometry?.type, c = await this.#f(e, t);
264
+ async #f(e, t, r) {
265
+ const { traceLocations: i } = this, a = e.getGlobalId() ?? "", s = e.geometry?.type, c = await this.#m(e, t);
236
266
  if (!c)
237
267
  return this.#e("error", this._messages.errors.errorGeneratingTraceLocationDetails), !1;
238
- const o = i?.filter((n) => n.spatialProperties.mapGraphic?.getGlobalId() === a) ?? [];
239
- if (o.length > 0) {
268
+ const n = i?.filter((o) => o.spatialProperties.mapGraphic?.getGlobalId() === a) ?? [];
269
+ if (n.length > 0) {
240
270
  if (s !== "polyline")
241
271
  return this.#e("warn", this._messages.errors.duplicateTraceLocationDetails), !1;
242
- if (o.some((n) => Math.abs(n.traceLocation.percentAlong - c.traceLocation.percentAlong) <= this.spatialTolerance))
272
+ if (n.some((o) => Math.abs(o.traceLocation.percentAlong - c.traceLocation.percentAlong) <= this.spatialTolerance))
243
273
  return this.#e("warn", this._messages.errors.duplicateTraceLocationDetailsWithinTolerance), !1;
244
274
  }
245
275
  const l = this.#y(e, t, r);
246
276
  return l ? (c.spatialProperties.flagGraphic = l, i?.add(c), !0) : (this.#e("warn", this._messages.errors.errorAdding), !1);
247
277
  }
248
- async #f(e, t) {
278
+ async #m(e, t) {
249
279
  const { traceLocationType: r, utilityNetwork: i } = this, a = e.getGlobalId() ?? "", s = e.geometry?.type, c = await this.#g(e);
250
280
  if (s === "point" || s === "polygon") {
251
- const o = i?.getTerminalConfiguration(e), l = o ? o.terminals[0].id : 1;
281
+ const n = i?.getTerminalConfiguration(e), l = n ? n.terminals[0].id : 1;
252
282
  return {
253
- traceLocation: new T({
283
+ traceLocation: new G({
254
284
  type: r,
255
285
  isFilterBarrier: !1,
256
286
  globalId: a,
@@ -259,8 +289,8 @@ class S extends q {
259
289
  flagProperties: {
260
290
  title: c,
261
291
  expanded: !1,
262
- terminalConfiguration: o ?? void 0,
263
- selectedTerminals: o ? /* @__PURE__ */ new Set([l]) : void 0
292
+ terminalConfiguration: n ?? void 0,
293
+ selectedTerminals: n ? /* @__PURE__ */ new Set([l]) : void 0
264
294
  },
265
295
  spatialProperties: {
266
296
  mapPoint: t,
@@ -268,13 +298,13 @@ class S extends q {
268
298
  }
269
299
  };
270
300
  } else if (s === "polyline") {
271
- const o = this.#n(e.geometry, t);
272
- return o < 0 ? (p("warn", this, "Unable to calculate percent along for polyline flag."), null) : {
273
- traceLocation: new T({
301
+ const n = this.#o(e.geometry, t);
302
+ return n < 0 ? (p("warn", this, "Unable to calculate percent along for polyline flag."), null) : {
303
+ traceLocation: new G({
274
304
  type: r,
275
305
  isFilterBarrier: !1,
276
306
  globalId: a,
277
- percentAlong: o
307
+ percentAlong: n
278
308
  }),
279
309
  flagProperties: {
280
310
  title: c,
@@ -288,20 +318,20 @@ class S extends q {
288
318
  }
289
319
  };
290
320
  } else if (!s) {
291
- const o = O(e.layer) ? e.layer.parent : e.layer, l = o && this.#c.includes(o.layerId), n = i?.getTerminalConfiguration(e), u = n ? n.terminals[0].id : l ? -1 : 1, m = l ? 0.5 : -1;
321
+ const n = Z(e.layer) ? e.layer.parent : e.layer, l = n && this.#c.includes(n.layerId), o = i?.getTerminalConfiguration(e), h = o ? o.terminals[0].id : l ? -1 : 1, b = l ? 0.5 : -1;
292
322
  return {
293
- traceLocation: new T({
323
+ traceLocation: new G({
294
324
  type: r,
295
325
  isFilterBarrier: !1,
296
326
  globalId: a,
297
- terminalId: u,
298
- percentAlong: m
327
+ terminalId: h,
328
+ percentAlong: b
299
329
  }),
300
330
  flagProperties: {
301
331
  title: c,
302
332
  expanded: !1,
303
- terminalConfiguration: n ?? void 0,
304
- selectedTerminals: n ? /* @__PURE__ */ new Set([u]) : void 0
333
+ terminalConfiguration: o ?? void 0,
334
+ selectedTerminals: o ? /* @__PURE__ */ new Set([h]) : void 0
305
335
  },
306
336
  spatialProperties: {
307
337
  mapPoint: t,
@@ -312,11 +342,11 @@ class S extends q {
312
342
  return null;
313
343
  }
314
344
  async #g(e) {
315
- const t = (G(e.layer), e.layer);
345
+ const t = (R(e.layer), e.layer);
316
346
  return ("getFeatureTitle" in t ? await t.getFeatureTitle(e) : null) || e.getObjectId()?.toString() || this._messages.unknown;
317
347
  }
318
348
  #y(e, t, r) {
319
- const i = e.geometry ? e.geometry.type === "point" ? e.geometry : t : null, a = this.#b(), s = new F({
349
+ const i = e.geometry ? e.geometry.type === "point" ? e.geometry : t : null, a = this.#b(), s = new j({
320
350
  geometry: i,
321
351
  symbol: a,
322
352
  attributes: e.attributes
@@ -325,7 +355,7 @@ class S extends q {
325
355
  }
326
356
  #b() {
327
357
  const { traceLocationType: e } = this, t = [244, 21, 21, 0.6], r = [21, 244, 21, 0.6];
328
- return e === "stopping-point" ? new k({
358
+ return e === "stopping-point" ? new v({
329
359
  color: t,
330
360
  style: "x",
331
361
  size: 12,
@@ -333,7 +363,7 @@ class S extends q {
333
363
  color: t,
334
364
  width: 2
335
365
  }
336
- }) : e === "barrier" ? new k({
366
+ }) : e === "barrier" ? new v({
337
367
  color: t,
338
368
  style: "square",
339
369
  size: 12,
@@ -341,7 +371,7 @@ class S extends q {
341
371
  color: t,
342
372
  width: 0
343
373
  }
344
- }) : new k({
374
+ }) : new v({
345
375
  color: r,
346
376
  style: "circle",
347
377
  size: 12,
@@ -359,24 +389,24 @@ class S extends q {
359
389
  }
360
390
  #L(e, t) {
361
391
  const { flagProperties: r } = e, { selectedTerminals: i } = r, { name: a, id: s } = t, c = i?.has(s) ?? !1;
362
- return d`<calcite-label layout=inline><calcite-checkbox .value=${s} .checked=${c} @calciteCheckboxChange=${(o) => {
363
- o.target.checked ? i?.add(s) : i?.delete(s), this.requestUpdate();
392
+ return u`<calcite-label layout=inline><calcite-checkbox .value=${s} .checked=${c} @calciteCheckboxChange=${(n) => {
393
+ n.target.checked ? i?.add(s) : i?.delete(s), this.requestUpdate();
364
394
  }}></calcite-checkbox>${a}</calcite-label>`;
365
395
  }
366
396
  #T() {
367
- return d`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`;
397
+ return u`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`;
368
398
  }
369
399
  #k(e) {
370
400
  const { traceLocation: t } = e;
371
- return d`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${t.isFilterBarrier} @calciteSwitchChange=${(r) => {
401
+ return u`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${t.isFilterBarrier} @calciteSwitchChange=${(r) => {
372
402
  t.isFilterBarrier = r.target.checked;
373
403
  }}></calcite-switch></div></calcite-label>`;
374
404
  }
375
405
  #x(e) {
376
406
  const { flagProperties: t } = e, { terminalConfiguration: r, selectedTerminals: i } = t, a = e.traceLocation.type === "barrier", s = r && r.terminals.length > 0 && i?.size === 0;
377
- return d`<calcite-action .icon=${t.expanded ? "chevron-up" : "chevron-down"} slot=actions-end scale=s text @click=${() => {
407
+ return u`<calcite-action .icon=${t.expanded ? "chevron-up" : "chevron-down"} slot=actions-end scale=s text @click=${() => {
378
408
  t.expanded = !t.expanded, this.requestUpdate();
379
- }}></calcite-action>${s && d`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>` || ""}${t.expanded && d`<div class="terminals" slot=content-bottom>${a && this.#k(e) || ""}${r && this.#S(e) || ""}${s && this.#T() || ""}</div>` || ""}`;
409
+ }}></calcite-action>${s && u`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>` || ""}${t.expanded && u`<div class="terminals" slot=content-bottom>${a && this.#k(e) || ""}${r && this.#S(e) || ""}${s && this.#T() || ""}</div>` || ""}`;
380
410
  }
381
411
  #S(e) {
382
412
  const { flagProperties: t } = e, { terminalConfiguration: r } = t;
@@ -386,24 +416,24 @@ class S extends q {
386
416
  return i.length ? i.length === 1 ? [] : i.map((s) => this.#L(e, s)) : (p("warn", this, "`terminalConfiguration.terminals` is required but either missing or empty.`"), []);
387
417
  }
388
418
  #G(e) {
389
- const { flagProperties: t } = e, { terminalConfiguration: r, expanded: i, title: a } = t, s = r && r.id !== 0, c = e.traceLocation.type === "barrier", o = s || c, l = r?.name ?? void 0;
390
- return d`<calcite-list-item .label=${a} .description=${l} .value=${a} .expanded=${i}>${o ? this.#x(e) : d`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${() => this.#a(e)}></calcite-action></calcite-list-item>`;
419
+ const { flagProperties: t } = e, { terminalConfiguration: r, expanded: i, title: a } = t, s = r && r.id !== 0, c = e.traceLocation.type === "barrier", n = s || c, l = r?.name ?? void 0;
420
+ return u`<calcite-list-item .label=${a} .description=${l} .value=${a} .expanded=${i}>${n ? this.#x(e) : u`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${() => this.#a(e)}></calcite-action></calcite-list-item>`;
391
421
  }
392
422
  #v(e) {
393
423
  if (!e.length)
394
424
  return null;
395
- const { traceLocationType: t } = this, r = e.map((a) => this.#G(a)).toArray(), i = U(this._messages.labels.list, { type: t });
396
- return d`<div><calcite-list interaction-mode=static selection-mode=none .label=${i}>${r}</calcite-list></div>`;
425
+ const { traceLocationType: t } = this, r = e.map((a) => this.#G(a)).toArray(), i = J(this._messages.labels.list, { type: t });
426
+ return u`<div><calcite-list interaction-mode=static selection-mode=none .label=${i}>${r}</calcite-list></div>`;
397
427
  }
398
428
  #$() {
399
- const { traceLocationType: e, _messages: t, traceLocations: r, heading: i } = this, a = e === "starting-point" ? t.types.startingPoint : e === "barrier" ? t.types.barrier : t.types.stoppingPoint, s = i ?? a.heading, c = a.description, o = a.buttonText;
400
- return d`<calcite-block .heading=${s} .label=${s} expanded .description=${c}>${r?.length ? d`<calcite-button slot=actions-end appearance=transparent .label=${t.buttons.clear} @click=${() => this.#w()}>${t.buttons.clear}</calcite-button>${this.#v(r)}` : null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${o} @click=${() => this.#l()}>${o}</calcite-button></div></calcite-block>`;
429
+ const { traceLocationType: e, _messages: t, traceLocations: r, heading: i } = this, a = e === "starting-point" ? t.types.startingPoint : e === "barrier" ? t.types.barrier : t.types.stoppingPoint, s = i ?? a.heading, c = a.description, n = a.buttonText;
430
+ return u`<calcite-block .heading=${s} .label=${s} expanded .description=${c}>${r?.length ? u`<calcite-button slot=actions-end appearance=transparent .label=${t.buttons.clear} @click=${() => this.#w()}>${t.buttons.clear}</calcite-button>${this.#v(r)}` : null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${n} @click=${() => this.#l()}>${n}</calcite-button></div></calcite-block>`;
401
431
  }
402
432
  render() {
403
433
  return this.#$();
404
434
  }
405
435
  }
406
- I("arcgis-utility-network-trace-locations", S);
436
+ A("arcgis-utility-network-trace-locations", I);
407
437
  export {
408
- S as ArcgisUtilityNetworkTraceLocations
438
+ I as ArcgisUtilityNetworkTraceLocations
409
439
  };