@arcgis/map-components 5.1.0-next.97 → 5.1.0-next.98

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 (51) hide show
  1. package/dist/cdn/{M2AGMETD.js → 5VV4YRMW.js} +1 -1
  2. package/dist/cdn/6S6N2CNY.js +2 -0
  3. package/dist/cdn/AU5Y2WFE.js +2 -0
  4. package/dist/cdn/B3GUVSOH.js +2 -0
  5. package/dist/cdn/{TOYDKBI3.js → FJYJ55I6.js} +1 -1
  6. package/dist/cdn/G2AWBB3W.js +2 -0
  7. package/dist/cdn/{76RELZX2.js → GZSSBAS6.js} +1 -1
  8. package/dist/cdn/KDVGMEXC.js +2 -0
  9. package/dist/cdn/{PAD4C5XS.js → MGLV5EEI.js} +1 -1
  10. package/dist/cdn/OSRU2RUW.js +2 -0
  11. package/dist/cdn/P27CM5PI.js +2 -0
  12. package/dist/cdn/QL46G5FB.js +2 -0
  13. package/dist/cdn/{4535AZQ2.js → VD5IUHXQ.js} +1 -1
  14. package/dist/cdn/{YFP5CWGB.js → XSZJFT45.js} +1 -1
  15. package/dist/cdn/assets/reverse-geocode-list/t9n/messages.en.json +1 -1
  16. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.en.json +1 -1
  17. package/dist/cdn/assets/version-management/t9n/messages.en.json +1 -1
  18. package/dist/cdn/index.js +1 -1
  19. package/dist/chunks/slots.js +1 -1
  20. package/dist/components/arcgis-features/customElement.d.ts +1 -1
  21. package/dist/components/arcgis-features/customElement.js +1 -1
  22. package/dist/components/arcgis-reverse-geocode-list/customElement.d.ts +22 -3
  23. package/dist/components/arcgis-reverse-geocode-list/customElement.js +56 -38
  24. package/dist/components/arcgis-reverse-geocode-list/index.js +2 -0
  25. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +6 -7
  26. package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +4 -2
  27. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +47 -48
  28. package/dist/components/arcgis-version-management/customElement.d.ts +3 -0
  29. package/dist/components/arcgis-version-management/customElement.js +85 -85
  30. package/dist/components/arcgis-version-management-service-item/customElement.js +17 -17
  31. package/dist/components/arcgis-version-management-version-list/customElement.js +9 -9
  32. package/dist/components/arcgis-version-management-version-properties/customElement.js +44 -40
  33. package/dist/components/arcgis-version-management-version-properties/index.js +1 -0
  34. package/dist/docs/api.json +1 -1
  35. package/dist/docs/docs.json +1 -1
  36. package/dist/docs/vscode.html-custom-data.json +1 -1
  37. package/dist/docs/web-types.json +1 -1
  38. package/dist/loader.js +1 -1
  39. package/dist/types/lumina.d.ts +2 -1
  40. package/dist/types/preact.d.ts +2 -1
  41. package/dist/types/react.d.ts +2 -1
  42. package/dist/types/stencil.d.ts +2 -1
  43. package/package.json +4 -4
  44. package/dist/cdn/4LIT2CPA.js +0 -2
  45. package/dist/cdn/F5GS7T5H.js +0 -2
  46. package/dist/cdn/GUATS4JC.js +0 -2
  47. package/dist/cdn/GZNXU67E.js +0 -2
  48. package/dist/cdn/M2LGHW4O.js +0 -2
  49. package/dist/cdn/M67KJTXP.js +0 -2
  50. package/dist/cdn/VTGHFASH.js +0 -2
  51. package/dist/cdn/WTUX37PY.js +0 -2
@@ -21,6 +21,8 @@ export abstract class ArcgisReverseGeocodeList extends LitElement {
21
21
  * @default 3
22
22
  */
23
23
  accessor headingLevel: HeadingLevel;
24
+ /** @default false */
25
+ accessor hideCoordinates: boolean;
24
26
  accessor location: Point | undefined;
25
27
  /**
26
28
  * Replace localized message strings with your own strings.
@@ -28,32 +30,49 @@ export abstract class ArcgisReverseGeocodeList extends LitElement {
28
30
  * _**Note**: Individual message keys may change between releases._
29
31
  */
30
32
  accessor messageOverrides: {
33
+ coordinates?: string | undefined;
34
+ copyAddress?: string | undefined;
35
+ copyCoordinates?: string | undefined;
31
36
  label?: string | undefined;
37
+ moreResults?: string | undefined;
32
38
  noResultsFound?: string | undefined;
39
+ noResultFound?: string | undefined;
40
+ noLocation?: string | undefined;
33
41
  showMoreResults?: string | undefined;
34
- moreResults?: string | undefined;
35
42
  untitledService?: string | undefined;
36
43
  };
37
44
  /** @internal */
38
45
  protected messages: Partial<{
46
+ coordinates: string;
47
+ copyAddress: string;
48
+ copyCoordinates: string;
39
49
  label: string;
50
+ moreResults: string;
40
51
  noResultsFound: string;
52
+ noResultFound: string;
53
+ noLocation: string;
41
54
  showMoreResults: string;
42
- moreResults: string;
43
55
  untitledService: string;
44
56
  }> & T9nMeta<{
57
+ coordinates: string;
58
+ copyAddress: string;
59
+ copyCoordinates: string;
45
60
  label: string;
61
+ moreResults: string;
46
62
  noResultsFound: string;
63
+ noResultFound: string;
64
+ noLocation: string;
47
65
  showMoreResults: string;
48
- moreResults: string;
49
66
  untitledService: string;
50
67
  }>;
51
68
  accessor portal: Portal;
52
69
  get reverseGeocodeResults(): null | undefined | ReverseGeocodeResult[];
53
70
  /** Permanently destroy the component. */
54
71
  destroy(): Promise<void>;
72
+ readonly arcgisReverseGeocodeCopy: import("@arcgis/lumina").TargetedEvent<this, { data: string; }>;
55
73
  readonly arcgisReverseGeocodeResultsChange: import("@arcgis/lumina").TargetedEvent<this, void>;
56
74
  readonly "@eventTypes": {
75
+ arcgisReverseGeocodeCopy: ArcgisReverseGeocodeList["arcgisReverseGeocodeCopy"]["detail"];
57
76
  arcgisReverseGeocodeResultsChange: ArcgisReverseGeocodeList["arcgisReverseGeocodeResultsChange"]["detail"];
58
77
  };
59
78
  }
@@ -1,26 +1,24 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as p } from "../../chunks/runtime.js";
3
- import { css as f, html as a } from "lit";
4
- import g from "@arcgis/core/portal/Portal.js";
5
- import _ from "@arcgis/core/geometry/SpatialReference.js";
6
- import { LitElement as b, createEvent as v, safeClassMap as $ } from "@arcgis/lumina";
7
- import * as u from "@arcgis/core/geometry/operators/projectOperator.js";
8
- import { locationToAddress as R } from "@arcgis/core/rest/locator.js";
9
- import { substitute as C } from "@arcgis/core/intl.js";
10
- import { u as y } from "../../chunks/useT9n.js";
11
- import { watch as h } from "@arcgis/core/core/reactiveUtils.js";
12
- const w = f`.coordinates{font-size:var(--calcite-font-size-sm);color:var(--calcite-color-text-3);padding-inline-start:var(--calcite-spacing-md);padding-block-end:var(--calcite-spacing-sm)}`, L = {
13
- coordinates: "coordinates"
14
- };
15
- class G extends b {
2
+ import { c as g } from "../../chunks/runtime.js";
3
+ import { css as _, html as r } from "lit";
4
+ import * as d from "@arcgis/core/geometry/operators/projectOperator.js";
5
+ import f from "@arcgis/core/portal/Portal.js";
6
+ import b from "@arcgis/core/geometry/SpatialReference.js";
7
+ import { LitElement as v, createEvent as m, nothing as C } from "@arcgis/lumina";
8
+ import { locationToAddress as y } from "@arcgis/core/rest/locator.js";
9
+ import { substitute as $ } from "@arcgis/core/intl.js";
10
+ import { u as R } from "../../chunks/useT9n.js";
11
+ import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
12
+ const x = _`calcite-notice{padding:var(--calcite-space-lg)}calcite-block{padding-inline-end:var(--calcite-spacing-xxs)}calcite-block[expanded]{margin:0}`;
13
+ class w extends v {
16
14
  constructor() {
17
- super(...arguments), this.messages = y(), this._abortController = null, this._location = null, this._results = null, this.headingLevel = 3, this.portal = g.getDefault(), this.autoDestroyDisabled = !1, this.arcgisReverseGeocodeResultsChange = v();
15
+ super(...arguments), this.messages = R(), this._abortController = null, this._location = null, this._results = null, this.headingLevel = 3, this.portal = f.getDefault(), this.autoDestroyDisabled = !1, this.hideCoordinates = !1, this.arcgisReverseGeocodeResultsChange = m(), this.arcgisReverseGeocodeCopy = m();
18
16
  }
19
17
  static {
20
- this.properties = { _abortController: 16, _location: 16, _results: 16, headingLevel: 9, portal: 0, location: 0, messageOverrides: 0, autoDestroyDisabled: 5, reverseGeocodeResults: 32 };
18
+ this.properties = { _abortController: 16, _location: 16, _results: 16, headingLevel: 9, portal: 0, location: 0, messageOverrides: 0, autoDestroyDisabled: 5, hideCoordinates: 5, reverseGeocodeResults: 32 };
21
19
  }
22
20
  static {
23
- this.styles = w;
21
+ this.styles = x;
24
22
  }
25
23
  get reverseGeocodeResults() {
26
24
  return this._results;
@@ -30,10 +28,10 @@ class G extends b {
30
28
  }
31
29
  loaded() {
32
30
  this.manager.onLifecycle(() => [
33
- h(() => [this.portal, this.location], () => {
31
+ p(() => [this.portal, this.location], () => {
34
32
  this._update();
35
33
  }, { initial: !0 }),
36
- h(() => this._results, () => {
34
+ p(() => this._results, () => {
37
35
  this.arcgisReverseGeocodeResultsChange.emit();
38
36
  })
39
37
  ]);
@@ -47,41 +45,61 @@ class G extends b {
47
45
  this._location = null, this._results = null;
48
46
  return;
49
47
  }
50
- const s = new AbortController(), l = s.signal;
48
+ const s = new AbortController(), i = s.signal;
51
49
  this._abortController = s;
52
- const o = () => l.aborted || this._abortController !== s;
53
- if (!u.isLoaded() && (await u.load(), o()))
50
+ const o = () => i.aborted || this._abortController !== s;
51
+ if (!d.isLoaded() && (await d.load(), o()))
54
52
  return;
55
- const n = u.execute(e, _.WGS84) ?? e;
56
- if (o() || (this._location = n, await this.portal?.load({ signal: l }), o()))
53
+ const c = d.execute(e, b.WGS84) ?? e;
54
+ if (o() || (this._location = c, await this.portal?.load({ signal: i }), o()))
57
55
  return;
58
- const i = this.portal?.helperServices?.geocode?.filter((r) => r.reverseGeocode ?? !0);
59
- if (!i) {
56
+ const l = this.portal?.helperServices?.geocode?.filter((a) => a.reverseGeocode ?? !0);
57
+ if (!l) {
60
58
  if (o())
61
59
  return;
62
60
  this._results = null;
63
61
  return;
64
62
  }
65
- const d = i.map(async (r) => await R(r.url, { location: e }, { signal: l })), c = await Promise.allSettled(d);
66
- o() || (this._abortController = null, this._results = i.map((r, m) => ({
67
- name: r.name ?? t?.untitledService ?? "",
68
- address: (c[m].status === "fulfilled" ? c[m].value.address : null) ?? t?.noResultsFound ?? "",
69
- url: r.url
63
+ const n = l.map(async (a) => await y(a.url, { location: e }, { signal: i })), u = await Promise.allSettled(n);
64
+ o() || (this._abortController = null, this._results = l.map((a, h) => ({
65
+ name: a.name ?? t?.untitledService ?? "",
66
+ address: (u[h].status === "fulfilled" ? u[h].value.address : null) ?? t?.noResultFound ?? "",
67
+ url: a.url
70
68
  })));
71
69
  }
70
+ _copyTextToClipboard(e) {
71
+ navigator.clipboard.writeText(e), this.arcgisReverseGeocodeCopy.emit({ data: e });
72
+ }
72
73
  _renderMoreResults(e) {
73
74
  const { messages: t } = this;
74
- return !this._abortController && e?.length ? a`<calcite-block collapsible .headingLevel=${this.headingLevel} .heading=${C(t?.showMoreResults ?? "", { count: e.length })}><calcite-list display-mode=flat interaction-mode=static selection-mode=none .label=${t?.moreResults ?? ""}>${e?.map((s) => a`<calcite-list-item .label=${s.name} .description=${s.address}></calcite-list-item>`)}</calcite-list></calcite-block>` : null;
75
+ return !this._abortController && e?.length ? r`<calcite-block collapsible scale=s .headingLevel=${this.headingLevel} .heading=${$(t?.showMoreResults ?? "", { count: e.length })}><calcite-list scale=s display-mode=flat interaction-mode=static selection-mode=none .label=${t?.moreResults ?? ""}>${e?.map((s) => this._renderItem(s))}</calcite-list></calcite-block>` : null;
76
+ }
77
+ _renderCopyAction({ text: e, value: t }) {
78
+ return r`<calcite-action .text=${e} title=${e ?? C} slot=actions-end icon=copy @click=${() => this._copyTextToClipboard(t)}></calcite-action>`;
79
+ }
80
+ _renderCoordinatesItem() {
81
+ const { _location: e, messages: t } = this;
82
+ if (!e || this.hideCoordinates)
83
+ return null;
84
+ const { latitude: s, longitude: i } = e, o = s != null && i != null ? `${i.toFixed(6)}, ${s.toFixed(6)}` : null;
85
+ return o ? r`<calcite-list-item .label=${o} .description=${t.coordinates ?? ""}>${this._renderCopyAction({
86
+ text: t.copyCoordinates ?? "",
87
+ value: o
88
+ })}</calcite-list-item>` : null;
89
+ }
90
+ _renderItem(e) {
91
+ const { messages: t } = this;
92
+ return r`<calcite-list-item .label=${e.address} .description=${e.name}>${this._renderCopyAction({ text: t.copyAddress ?? "", value: e.address ?? "" })}</calcite-list-item>`;
75
93
  }
76
94
  render() {
77
- const { _abortController: e, _location: t, _results: s, messages: l } = this;
95
+ const { _abortController: e, _location: t, _results: s, messages: i } = this;
78
96
  if (!t)
79
- return null;
80
- const o = s?.slice(), n = o?.shift(), { latitude: i, longitude: d } = t, c = i != null && d != null ? a`<div class=${$(L.coordinates)} slot=content-bottom>${`${i.toFixed(6)}, ${d.toFixed(6)}`}</div>` : null;
81
- return a`<calcite-list .loading=${!!e} display-mode=flat interaction-mode=static selection-mode=none .label=${l.label ?? ""}>${n ? a`<calcite-list-item .label=${n.name} .description=${n.address}>${c}</calcite-list-item>` : e ? null : a`<calcite-list-item .label=${l.noResultsFound ?? ""}>${c}</calcite-list-item>`}</calcite-list>${this._renderMoreResults(o)}`;
97
+ return r`<calcite-notice scale=s open kind=warning icon><div slot=message>${i?.noLocation ?? ""}</div></calcite-notice>`;
98
+ const o = s?.[0], c = s && s.length > 1 ? s.slice(1) : void 0, l = this._renderCoordinatesItem(), n = o ? this._renderItem(o) : null;
99
+ return !e && !n && !l ? r`<calcite-notice scale=s open kind=info><div slot=message>${i?.noResultFound ?? ""}</div></calcite-notice>` : r`<calcite-list .loading=${!!e} display-mode=flat interaction-mode=static selection-mode=none .label=${i.label ?? ""} scale=s>${l}${n}</calcite-list>${this._renderMoreResults(c)}`;
82
100
  }
83
101
  }
84
- p("arcgis-reverse-geocode-list", G);
102
+ g("arcgis-reverse-geocode-list", w);
85
103
  export {
86
- G as ArcgisReverseGeocodeList
104
+ w as ArcgisReverseGeocodeList
87
105
  };
@@ -1,4 +1,6 @@
1
1
  import "@esri/calcite-components/components/calcite-block";
2
2
  import "@esri/calcite-components/components/calcite-list";
3
+ import "@esri/calcite-components/components/calcite-action";
3
4
  import "@esri/calcite-components/components/calcite-list-item";
5
+ import "@esri/calcite-components/components/calcite-notice";
4
6
  export * from "./customElement.js";
@@ -7,13 +7,13 @@ import u from "@arcgis/core/Color.js";
7
7
  import "@arcgis/core/core/Error.js";
8
8
  import { when as f } from "@arcgis/core/core/reactiveUtils.js";
9
9
  import w from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
10
- import { LitElement as T, createEvent as l } from "@arcgis/lumina";
11
- import { log as b } from "@arcgis/toolkit/log";
10
+ import { LitElement as b, createEvent as l } from "@arcgis/lumina";
11
+ import { log as T } from "@arcgis/toolkit/log";
12
12
  import { u as _ } from "../../chunks/useT9n.js";
13
13
  import { m as v } from "../../chunks/useViewModel.js";
14
14
  import { l as R } from "../../chunks/async-utils.js";
15
15
  const $ = y`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;--calcite-panel-background-color: var(--calcite-color-foreground-1);calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}`, C = v(w);
16
- class k extends T {
16
+ class k extends b {
17
17
  constructor() {
18
18
  super(...arguments), this._messages = _({ blocking: !0 }), this._viewModel = C(this), this._highlightHandles = [], this._handleRunTraceButtonClick = () => {
19
19
  this._setTraceWarnings(), !(this.showNoStartingPointsWarning || this.showMissingTerminalWarning) && (this.showNoStartingPointsWarning = !1, this.showMissingTerminalWarning = !1, this._clearTraceResult(), this._switchTab("results"), this._runTrace());
@@ -34,8 +34,7 @@ class k extends T {
34
34
  return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
35
35
  }
36
36
  get _isSubnetworkNameTraceSelected() {
37
- const e = this._traceInputsElement?.selectedNamedTraceConfiguration?.traceType;
38
- return !!this._traceInputsElement?.selectedNamedTraceConfiguration?.traceConfiguration?.subnetworkName && e === "subnetwork";
37
+ return !!this._traceInputsElement?.unTraceConfiguration?.subnetworkName && this._traceInputsElement?.selectedNamedTraceConfiguration?.traceType === "subnetwork";
39
38
  }
40
39
  get traceResultFeatures() {
41
40
  return this._traceResultsElement?.traceResultFeatures ?? [];
@@ -101,7 +100,7 @@ class k extends T {
101
100
  async _runTrace() {
102
101
  const e = this._traceInputsElement?.selectedNamedTraceConfiguration, t = this._traceInputsElement?.unTraceConfiguration;
103
102
  if (!(e?.traceType && t)) {
104
- b("error", this, "Trace configuration not found");
103
+ T("error", this, "Trace configuration not found");
105
104
  return;
106
105
  }
107
106
  const a = this._traceInputsElement?.traceLocations;
@@ -164,7 +163,7 @@ class k extends T {
164
163
  const { mode: e, state: t } = this;
165
164
  if (e !== "default")
166
165
  return null;
167
- const a = t === "disabled" || !this._traceInputsElement?.selectedNamedTraceConfiguration;
166
+ const a = t === "disabled" || !this._traceInputsElement?.unTraceConfiguration;
168
167
  return s`<calcite-button appearance=solid width=full @click=${this._handleRunTraceButtonClick} slot=footer .disabled=${a}>${this._messages.buttons.getResults}</calcite-button>`;
169
168
  }
170
169
  render() {
@@ -31,7 +31,8 @@ export abstract class ArcgisUtilityNetworkTraceInputs extends LitElement {
31
31
  errors: {
32
32
  noCompatibleSubnetworks: string;
33
33
  noMapError: string;
34
- noTraceConfigurationError: string;
34
+ noNamedTraceConfigurations: string;
35
+ noTraceConfiguration: string;
35
36
  noUtilityNetworkError: string;
36
37
  utilityNetworkLoadFailed: string;
37
38
  };
@@ -73,7 +74,8 @@ export abstract class ArcgisUtilityNetworkTraceInputs extends LitElement {
73
74
  errors: {
74
75
  noCompatibleSubnetworks: string;
75
76
  noMapError: string;
76
- noTraceConfigurationError: string;
77
+ noNamedTraceConfigurations: string;
78
+ noTraceConfiguration: string;
77
79
  noUtilityNetworkError: string;
78
80
  utilityNetworkLoadFailed: string;
79
81
  };
@@ -1,25 +1,25 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as y } from "../../chunks/runtime.js";
2
+ import { c as w } from "../../chunks/runtime.js";
3
3
  import { ref as h } from "lit/directives/ref.js";
4
- import n from "@arcgis/core/core/Collection.js";
5
- import { watch as w } from "@arcgis/core/core/reactiveUtils.js";
6
- import { substitute as _ } from "@arcgis/core/intl.js";
7
- import k from "@arcgis/core/layers/GraphicsLayer.js";
8
- import S from "@arcgis/core/networks/support/UNTraceConfiguration.js";
9
- import T from "@arcgis/core/rest/networks/support/TraceLocation.js";
4
+ import c from "@arcgis/core/core/Collection.js";
5
+ import { watch as _ } from "@arcgis/core/core/reactiveUtils.js";
6
+ import { substitute as k } from "@arcgis/core/intl.js";
7
+ import S from "@arcgis/core/layers/GraphicsLayer.js";
8
+ import T from "@arcgis/core/networks/support/UNTraceConfiguration.js";
9
+ import C from "@arcgis/core/rest/networks/support/TraceLocation.js";
10
10
  import p from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
11
- import C from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
12
- import { LitElement as L, createEvent as l } from "@arcgis/lumina";
13
- import { usePropertyChange as N } from "@arcgis/lumina/controllers";
14
- import { log as d, composeMissingPropertyMessage as $, composeEmptyPropertyMessage as v } from "@arcgis/toolkit/log";
15
- import { css as E, html as r } from "lit";
16
- import { u as P } from "../../chunks/useT9n.js";
17
- import { b as I, a as g, c as U, q as m, i as F } from "../../chunks/layer-utils.js";
11
+ import L from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
12
+ import { LitElement as N, createEvent as l } from "@arcgis/lumina";
13
+ import { usePropertyChange as $ } from "@arcgis/lumina/controllers";
14
+ import { log as d, composeMissingPropertyMessage as v, composeEmptyPropertyMessage as E } from "@arcgis/toolkit/log";
15
+ import { css as P, html as r } from "lit";
16
+ import { u as I } from "../../chunks/useT9n.js";
17
+ import { b as U, a as g, c as F, q as m, i as x } from "../../chunks/layer-utils.js";
18
18
  import { l as f } from "../../chunks/async-utils.js";
19
- const x = E`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md) 0;font-size:var(--calcite-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium)}`, u = `utility-network-trace-inputs-sketch-${Date.now()}`, A = 20;
20
- class M extends L {
19
+ const A = P`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md) 0;font-size:var(--calcite-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium)}`, u = `utility-network-trace-inputs-sketch-${Date.now()}`, M = 20;
20
+ class D extends N {
21
21
  constructor() {
22
- super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages = P({ blocking: !0 }), this._layerIdToLayer = /* @__PURE__ */ new Map(), this._startingPoints = new n(), this._barriers = new n(), this._stoppingPoints = new n(), this._subnetworkTraceTypes = /* @__PURE__ */ new Set([
22
+ super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages = I({ blocking: !0 }), this._layerIdToLayer = /* @__PURE__ */ new Map(), this._startingPoints = new c(), this._barriers = new c(), this._stoppingPoints = new c(), this._subnetworkTraceTypes = /* @__PURE__ */ new Set([
23
23
  "subnetwork",
24
24
  "subnetwork-controller",
25
25
  "upstream",
@@ -42,17 +42,16 @@ class M extends L {
42
42
  e && (this._featuresComponentElement = e);
43
43
  }, this._handleFeaturesPropertyChange = ({ detail: e, target: t }) => {
44
44
  (e.name === "selectedDrillInFeature" || e.name === "selectedFeature") && (this.selectedFeature = t.selectedDrillInFeature ?? t.selectedFeature ?? void 0);
45
- }, this.candidateFeatures = [], this.compatibleSubnetworkNames = [], this.traceConfigurations = [], this._subnetworkNamesState = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = N()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = l(), this.arcgisTraceInputsChange = l(), this.arcgisTraceLocationSelectEnd = l(), this.arcgisTraceLocationSelectStart = l(), this.arcgisUtilityNetworkChange = l();
45
+ }, this.candidateFeatures = [], this.compatibleSubnetworkNames = [], this.traceConfigurations = [], this._subnetworkNamesState = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = $()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = l(), this.arcgisTraceInputsChange = l(), this.arcgisTraceLocationSelectEnd = l(), this.arcgisTraceLocationSelectStart = l(), this.arcgisUtilityNetworkChange = l();
46
46
  }
47
47
  static {
48
48
  this.properties = { selectedFeature: 16, candidateFeatures: 16, compatibleSubnetworkNames: 16, subnetworksTable: 16, traceConfigurations: 16, utilityNetworks: 16, _unTraceConfiguration: 16, _error: 16, _subnetworkNamesState: 16, _activeTraceLocationType: 16, _exceedDisplayLimit: 16, beforeTraceLocationSelectStart: 0, view: 0, selectedUtilityNetwork: 0, selectedNamedTraceConfiguration: 0, autoDestroyDisabled: 5, hideActionBar: 5, unTraceConfiguration: 32, referenceElement: 1, mode: 3, traceLocationFlagInfos: 32, traceLocations: 32 };
49
49
  }
50
50
  static {
51
- this.styles = x;
51
+ this.styles = A;
52
52
  }
53
53
  get isSubnetworkNameTraceSelected() {
54
- const e = this.selectedNamedTraceConfiguration?.traceType;
55
- return !!this.selectedNamedTraceConfiguration?.traceConfiguration?.subnetworkName && e === "subnetwork";
54
+ return !!this.selectedSubnetworkName && this.selectedNamedTraceConfiguration?.traceType === "subnetwork";
56
55
  }
57
56
  get selectedSubnetworkName() {
58
57
  return this._unTraceConfiguration?.subnetworkName ?? void 0;
@@ -79,7 +78,7 @@ class M extends L {
79
78
  return this._unTraceConfiguration;
80
79
  }
81
80
  get traceLocationFlagInfos() {
82
- return new n([...this._startingPoints, ...this._barriers, ...this._stoppingPoints]);
81
+ return new c([...this._startingPoints, ...this._barriers, ...this._stoppingPoints]);
83
82
  }
84
83
  get traceLocations() {
85
84
  const e = [];
@@ -90,7 +89,7 @@ class M extends L {
90
89
  }
91
90
  load() {
92
91
  this._setUpMap(), this.manager.onLifecycle(() => [
93
- w(() => this.view?.map, () => this._setUpMap())
92
+ _(() => this.view?.map, () => this._setUpMap())
94
93
  ]);
95
94
  }
96
95
  willUpdate(e) {
@@ -101,7 +100,7 @@ class M extends L {
101
100
  }
102
101
  _createTraceLocations(e) {
103
102
  const t = e.flagProperties.selectedTerminals;
104
- return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new T({
103
+ return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new C({
105
104
  type: e.traceLocation.type,
106
105
  isFilterBarrier: e.traceLocation.isFilterBarrier,
107
106
  globalId: e.traceLocation.globalId,
@@ -120,12 +119,12 @@ class M extends L {
120
119
  }
121
120
  _createGraphicLayer(e, t) {
122
121
  if (!e.findLayerById(t)) {
123
- const a = new k({
122
+ const a = new S({
124
123
  id: t,
125
124
  listMode: "hide",
126
125
  title: t
127
126
  });
128
- I(this.view, a);
127
+ U(this.view, a);
129
128
  }
130
129
  }
131
130
  _getGraphicLayer(e, t) {
@@ -141,9 +140,9 @@ class M extends L {
141
140
  _setSnappingOption() {
142
141
  const { _sketchViewModel: e, _unLayers: t } = this;
143
142
  if (e && t && t.length > 0) {
144
- const i = new n();
143
+ const i = new c();
145
144
  t.forEach((a) => {
146
- U(a) ? a.sublayers.forEach((s) => {
145
+ F(a) ? a.sublayers.forEach((s) => {
147
146
  i.add(new p({
148
147
  layer: s,
149
148
  enabled: !0
@@ -161,7 +160,7 @@ class M extends L {
161
160
  }
162
161
  _initializeSketchViewModel(e) {
163
162
  const { view: t } = this, i = this._getGraphicLayer(e, u);
164
- return new C({
163
+ return new L({
165
164
  layer: i,
166
165
  view: t
167
166
  });
@@ -203,8 +202,8 @@ class M extends L {
203
202
  }
204
203
  async _handleTraceConfigChange() {
205
204
  const { selectedNamedTraceConfiguration: e } = this;
206
- if (!(e?.traceConfiguration instanceof S)) {
207
- d("error", this, $("selectedNamedTraceConfiguration.traceConfiguration")), this._unTraceConfiguration = void 0;
205
+ if (!(e?.traceConfiguration instanceof T)) {
206
+ d("error", this, v("selectedNamedTraceConfiguration.traceConfiguration")), this._unTraceConfiguration = void 0;
208
207
  return;
209
208
  }
210
209
  this._unTraceConfiguration = e.traceConfiguration.clone(), e.traceType === "subnetwork" && (this._subnetworkNamesState = "loading", await this._handleSubnetworkTraceConfigChange(this._unTraceConfiguration), this._subnetworkNamesState = "ready");
@@ -223,11 +222,11 @@ class M extends L {
223
222
  }
224
223
  _filterUnLayers() {
225
224
  const { selectedUtilityNetwork: e } = this;
226
- this._unLayers = new n(this._allLayers.filter((t) => e?.isUtilityLayer(t) && !this._subnetworkLayerIds.includes(t.layerId))), this._setSnappingOption();
225
+ this._unLayers = new c(this._allLayers.filter((t) => e?.isUtilityLayer(t) && !this._subnetworkLayerIds.includes(t.layerId))), this._setSnappingOption();
227
226
  }
228
227
  _handleUtilityNetworksChange() {
229
228
  const { utilityNetworks: e, selectedUtilityNetwork: t } = this;
230
- e?.length ? (!t || !e.includes(t)) && (this.selectedUtilityNetwork = e.at(0)) : (d("error", this, v("utilityNetworks")), this.selectedUtilityNetwork = void 0, this._error = this._messages.errors.noUtilityNetworkError);
229
+ e?.length ? (!t || !e.includes(t)) && (this.selectedUtilityNetwork = e.at(0)) : (d("error", this, E("utilityNetworks")), this.selectedUtilityNetwork = void 0, this._error = this._messages.errors.noUtilityNetworkError);
231
230
  }
232
231
  async _setupUtilityNetworks(e) {
233
232
  try {
@@ -235,7 +234,7 @@ class M extends L {
235
234
  } catch (t) {
236
235
  f(t, this, "Error while loading `view.map`");
237
236
  } finally {
238
- this.utilityNetworks = e.utilityNetworks || new n();
237
+ this.utilityNetworks = e.utilityNetworks || new c();
239
238
  }
240
239
  }
241
240
  _handleTraceLocationSelectStart(e) {
@@ -270,12 +269,12 @@ class M extends L {
270
269
  async _queryFeatures(e) {
271
270
  const t = /* @__PURE__ */ new Map(), i = [];
272
271
  return e.forEach((a) => {
273
- const s = F(a.layer) ? a.layer.parent : a.layer;
272
+ const s = x(a.layer) ? a.layer.parent : a.layer;
274
273
  if (s) {
275
274
  const o = this._getLayerByLayerId(s.layerId);
276
275
  if (o) {
277
- const c = t.get(o) || [];
278
- c.push(a), t.set(o, c);
276
+ const n = t.get(o) || [];
277
+ n.push(a), t.set(o, n);
279
278
  }
280
279
  }
281
280
  }), await Promise.all(Array.from(t.keys()).map(async (a) => {
@@ -339,10 +338,10 @@ class M extends L {
339
338
  return r`<arcgis-features .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${e} .featureMenuTitle=${t} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${i} @arcgisClose=${() => this._handleFeaturesClose()} @arcgisPropertyChange=${this._handleFeaturesPropertyChange} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this._featuresComponentRefChange)}></arcgis-features>`;
340
339
  }
341
340
  renderAddSpatialFooter() {
342
- const { mode: e, _messages: t, selectedFeature: i, selectedUtilityNetwork: a } = this, s = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o = _(t.warnings.exceededDisplayLimit, {
341
+ const { mode: e, _messages: t, selectedFeature: i, selectedUtilityNetwork: a } = this, s = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o = k(t.warnings.exceededDisplayLimit, {
343
342
  limit: this._displayLimit.toString()
344
- }), c = i ? !(a?.isUtilityLayer(i.layer) ?? !0) : !0;
345
- return r`${s && r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>` || ""}<calcite-button appearance=outline width=full @click=${() => this._handleAddSpatialCancelClick()} slot=footer>${t.buttons.cancel}</calcite-button>${e === "add-spatial-feature" && r`<calcite-button width=full slot=footer appearance=solid @click=${() => this._handleAddSpatialAddClick()} .disabled=${c}>${t.buttons.add}</calcite-button>` || ""}`;
343
+ }), n = i ? !(a?.isUtilityLayer(i.layer) ?? !0) : !0;
344
+ return r`${s && r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>` || ""}<calcite-button appearance=outline width=full @click=${() => this._handleAddSpatialCancelClick()} slot=footer>${t.buttons.cancel}</calcite-button>${e === "add-spatial-feature" && r`<calcite-button width=full slot=footer appearance=solid @click=${() => this._handleAddSpatialAddClick()} .disabled=${n}>${t.buttons.add}</calcite-button>` || ""}`;
346
345
  }
347
346
  renderStartingPointSelection() {
348
347
  return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._startingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStartingRefChange)}></arcgis-utility-network-trace-location>`;
@@ -363,25 +362,25 @@ class M extends L {
363
362
  }
364
363
  renderSubnetworkSelection() {
365
364
  const { compatibleSubnetworkNames: e } = this, t = this._messages.labels.subnetworkName;
366
- return this.isSubnetworkNameTraceSelected ? this._subnetworkNamesState === "loading" ? r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>` : e.length ? r`<calcite-block .heading=${t} .label=${t} expanded>${e.length > A ? this.renderSubnetworkNameInput() : this.renderSubnetworkSelectList()}</calcite-block>` : this.renderError(this._messages.errors.noCompatibleSubnetworks, !1, "exclamation-mark-triangle") : null;
365
+ return this.isSubnetworkNameTraceSelected ? this._subnetworkNamesState === "loading" ? r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>` : e.length ? r`<calcite-block .heading=${t} .label=${t} expanded>${e.length > M ? this.renderSubnetworkNameInput() : this.renderSubnetworkSelectList()}</calcite-block>` : this.renderError(this._messages.errors.noCompatibleSubnetworks, !1, "exclamation-mark-triangle") : null;
367
366
  }
368
367
  renderSubnetworkInfo() {
369
368
  const { _messages: e, selectedNamedTraceConfiguration: t, _unTraceConfiguration: i } = this;
370
369
  return i && t?.traceType && this._subnetworkTraceTypes.has(t.traceType) ? r`<calcite-block id=subnetwork-info-block expanded .label=${e.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfig=${t}></arcgis-utility-network-subnetwork-info></calcite-block>` : null;
371
370
  }
372
371
  renderContent() {
373
- const { utilityNetworks: e } = this, { noTraceConfigurationError: t, utilityNetworkLoadFailed: i } = this._messages.errors, a = this.selectedNamedTraceConfiguration?.traceConfiguration, s = e && e.length > 1 ? this.renderUtilityNetworkSelection() : null;
374
- let o;
375
- this.selectedUtilityNetwork?.loadError ? o = this.renderError(i, !1, "exclamation-mark-triangle") : this.traceConfigurations.length || (o = this.renderError(t, !1, "exclamation-mark-triangle"));
376
- const c = r`${this.renderTraceSelection()}${this.renderSubnetworkInfo()}${this.renderSubnetworkSelection()}`, b = a ? r`${this.showStartingPoints ? this.renderStartingPointSelection() : null}${this.showStoppingPoints ? this.renderStoppingPointSelection() : null}${this.renderBarrierSelection()}` : null;
377
- return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${s}${o ?? r`${c}${b}`}</calcite-block-group>`;
372
+ const { utilityNetworks: e, unTraceConfiguration: t } = this, { noTraceConfiguration: i, noNamedTraceConfigurations: a, utilityNetworkLoadFailed: s } = this._messages.errors, o = e && e.length > 1 ? this.renderUtilityNetworkSelection() : null;
373
+ let n;
374
+ this.selectedUtilityNetwork?.loadError ? n = this.renderError(s, !1, "exclamation-mark-triangle") : this.traceConfigurations.length || (n = this.renderError(a, !1, "exclamation-mark-triangle"));
375
+ const b = r`${this.renderTraceSelection()}${this.renderSubnetworkInfo()}${this.renderSubnetworkSelection()}`, y = t ? r`${this.showStartingPoints ? this.renderStartingPointSelection() : null}${this.showStoppingPoints ? this.renderStoppingPointSelection() : null}${this.renderBarrierSelection()}` : this.renderError(i, !1, "exclamation-mark-triangle");
376
+ return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${o}${n ?? r`${b}${y}`}</calcite-block-group>`;
378
377
  }
379
378
  render() {
380
379
  const { mode: e } = this;
381
380
  return r`<calcite-panel>${e === "add-spatial-feature" ? this.renderCandidateFeatures() : null}<calcite-flow .hidden=${e === "add-spatial-feature"}>${this.renderDefaultMode()}${this.renderSpatialSelectInstructions()}</calcite-flow>${e !== "default" ? this.renderAddSpatialFooter() : null}</calcite-panel>`;
382
381
  }
383
382
  }
384
- y("arcgis-utility-network-trace-inputs", M);
383
+ w("arcgis-utility-network-trace-inputs", D);
385
384
  export {
386
- M as ArcgisUtilityNetworkTraceInputs
385
+ D as ArcgisUtilityNetworkTraceInputs
387
386
  };
@@ -96,6 +96,7 @@ export abstract class ArcgisVersionManagement extends LitElement {
96
96
  noFeatureServices?: string | undefined;
97
97
  noViewProperty?: string | undefined;
98
98
  } | undefined;
99
+ validationErrors?: { invalidCharacters?: string | undefined; } | undefined;
99
100
  };
100
101
  /** @internal */
101
102
  protected messages: {
@@ -142,6 +143,7 @@ export abstract class ArcgisVersionManagement extends LitElement {
142
143
  noFeatureServices: string;
143
144
  noViewProperty: string;
144
145
  };
146
+ validationErrors: { invalidCharacters: string; };
145
147
  } & T9nMeta<{
146
148
  label: string;
147
149
  actions: {
@@ -186,6 +188,7 @@ export abstract class ArcgisVersionManagement extends LitElement {
186
188
  noFeatureServices: string;
187
189
  noViewProperty: string;
188
190
  };
191
+ validationErrors: { invalidCharacters: string; };
189
192
  }>;
190
193
  accessor mode: string | undefined;
191
194
  /**