@arcgis/map-components 5.2.0-next.70 → 5.2.0-next.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +4 -2
- package/dist/cdn/2O6GHHUY.js +2 -0
- package/dist/cdn/3RKTUDSL.js +2 -0
- package/dist/cdn/AXEUVRDP.js +2 -0
- package/dist/cdn/CQV2TQUQ.js +2 -0
- package/dist/cdn/{3MGDX726.js → KTCKSRJG.js} +1 -1
- package/dist/cdn/MGL4QBFB.js +2 -0
- package/dist/cdn/NTODRT2V.js +2 -0
- package/dist/cdn/{U257QRYB.js → PPZFYY4R.js} +1 -1
- package/dist/cdn/{MCKFNVHF.js → QM3KT7SZ.js} +1 -1
- package/dist/cdn/T6ONYBEY.js +2 -0
- package/dist/cdn/WXNDZFDX.js +2 -0
- package/dist/cdn/{LI7PGPU4.js → YPDSLXD2.js} +1 -1
- package/dist/cdn/{M7P6P7TR.js → ZS7I5TA6.js} +1 -1
- package/dist/cdn/assets/basemap-layer-list-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/catalog-layer-list-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/layer-list-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-aggregated-geometry-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-subnetwork-info-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-analysis-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-inputs-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-location-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-location-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-results-next/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/slots.js +1 -1
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/customElement.d.ts +63 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/customElement.js +109 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/index.js +2 -0
- package/dist/components/arcgis-utility-network-subnetwork-info-next/customElement.d.ts +29 -0
- package/dist/components/arcgis-utility-network-subnetwork-info-next/customElement.js +35 -0
- package/dist/components/arcgis-utility-network-subnetwork-info-next/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-subnetwork-info-next/index.js +1 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.d.ts +383 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +186 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/index.js +11 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/types.d.ts +26 -0
- package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.d.ts +197 -0
- package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.js +401 -0
- package/dist/components/arcgis-utility-network-trace-inputs-next/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-trace-inputs-next/index.js +16 -0
- package/dist/components/arcgis-utility-network-trace-location-list-next/customElement.d.ts +43 -0
- package/dist/components/arcgis-utility-network-trace-location-list-next/customElement.js +70 -0
- package/dist/components/arcgis-utility-network-trace-location-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-trace-location-list-next/index.js +9 -0
- package/dist/components/arcgis-utility-network-trace-location-next/customElement.d.ts +159 -0
- package/dist/components/arcgis-utility-network-trace-location-next/customElement.js +292 -0
- package/dist/components/arcgis-utility-network-trace-location-next/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-trace-location-next/index.js +4 -0
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.d.ts +191 -0
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +210 -0
- package/dist/components/arcgis-utility-network-trace-results-next/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-trace-results-next/index.js +15 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +58 -0
- package/dist/loader.js +7 -0
- package/dist/types/lumina.d.ts +55 -0
- package/dist/types/preact.d.ts +62 -0
- package/dist/types/react.d.ts +69 -0
- package/dist/types/stencil.d.ts +55 -0
- package/package.json +4 -4
- package/dist/cdn/2MNCEI34.js +0 -2
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Collection from "@arcgis/core/core/Collection.js";
|
|
3
|
+
import type NamedTraceConfiguration from "@arcgis/core/networks/support/NamedTraceConfiguration.js";
|
|
4
|
+
import type UNTraceConfiguration from "@arcgis/core/networks/support/UNTraceConfiguration.js";
|
|
5
|
+
import type UtilityNetwork from "@arcgis/core/networks/UtilityNetwork.js";
|
|
6
|
+
import type TraceLocation from "@arcgis/core/rest/networks/support/TraceLocation.js";
|
|
7
|
+
import type MapView from "@arcgis/core/views/MapView.js";
|
|
8
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
9
|
+
import type { ArcgisReferenceElement } from "../types.js";
|
|
10
|
+
import type { UtilityNetworkTraceAnalysisDisplayMode } from "../arcgis-utility-network-trace-analysis-next/types.js";
|
|
11
|
+
import type { FlagInfo, SelectStartPayload } from "../arcgis-utility-network-trace-location-next/customElement.js";
|
|
12
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* This is a sub-component used by the **ArcgisUtilityNetworkTraceAnalysis** component.
|
|
16
|
+
* It allows users to select utility networks, trace configurations, and input features for tracing.
|
|
17
|
+
*
|
|
18
|
+
* @since 4.34
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export abstract class ArcgisUtilityNetworkTraceInputsNext extends LitElement {
|
|
22
|
+
/** @internal */
|
|
23
|
+
protected _messages: {
|
|
24
|
+
buttons: {
|
|
25
|
+
add: string;
|
|
26
|
+
cancel: string;
|
|
27
|
+
};
|
|
28
|
+
componentLabel: string;
|
|
29
|
+
errors: {
|
|
30
|
+
noCompatibleSubnetworks: string;
|
|
31
|
+
noNamedTraceConfigurations: string;
|
|
32
|
+
noTraceConfiguration: string;
|
|
33
|
+
noUtilityNetwork: string;
|
|
34
|
+
noView: string;
|
|
35
|
+
utilityNetworkLoadFailed: string;
|
|
36
|
+
};
|
|
37
|
+
instructions: {
|
|
38
|
+
addSpatial: {
|
|
39
|
+
selectAssociatedFeature: {
|
|
40
|
+
heading: string;
|
|
41
|
+
subheading: string;
|
|
42
|
+
};
|
|
43
|
+
selectFeature: {
|
|
44
|
+
heading: string;
|
|
45
|
+
subheading: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
enterSubnetworkName: string;
|
|
49
|
+
};
|
|
50
|
+
labels: {
|
|
51
|
+
addSpatial: {
|
|
52
|
+
barrier: string;
|
|
53
|
+
startingPoint: string;
|
|
54
|
+
stoppingPoint: string;
|
|
55
|
+
};
|
|
56
|
+
featureList: string;
|
|
57
|
+
subnetworkInfo: string;
|
|
58
|
+
subnetworkName: string;
|
|
59
|
+
tooManySubnetworks: string;
|
|
60
|
+
traceConfiguration: string;
|
|
61
|
+
traceInputs: string;
|
|
62
|
+
utilityNetwork: string;
|
|
63
|
+
};
|
|
64
|
+
unknown: string;
|
|
65
|
+
warnings: { exceededDisplayLimit: string; };
|
|
66
|
+
} & T9nMeta<{
|
|
67
|
+
buttons: {
|
|
68
|
+
add: string;
|
|
69
|
+
cancel: string;
|
|
70
|
+
};
|
|
71
|
+
componentLabel: string;
|
|
72
|
+
errors: {
|
|
73
|
+
noCompatibleSubnetworks: string;
|
|
74
|
+
noNamedTraceConfigurations: string;
|
|
75
|
+
noTraceConfiguration: string;
|
|
76
|
+
noUtilityNetwork: string;
|
|
77
|
+
noView: string;
|
|
78
|
+
utilityNetworkLoadFailed: string;
|
|
79
|
+
};
|
|
80
|
+
instructions: {
|
|
81
|
+
addSpatial: {
|
|
82
|
+
selectAssociatedFeature: {
|
|
83
|
+
heading: string;
|
|
84
|
+
subheading: string;
|
|
85
|
+
};
|
|
86
|
+
selectFeature: {
|
|
87
|
+
heading: string;
|
|
88
|
+
subheading: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
enterSubnetworkName: string;
|
|
92
|
+
};
|
|
93
|
+
labels: {
|
|
94
|
+
addSpatial: {
|
|
95
|
+
barrier: string;
|
|
96
|
+
startingPoint: string;
|
|
97
|
+
stoppingPoint: string;
|
|
98
|
+
};
|
|
99
|
+
featureList: string;
|
|
100
|
+
subnetworkInfo: string;
|
|
101
|
+
subnetworkName: string;
|
|
102
|
+
tooManySubnetworks: string;
|
|
103
|
+
traceConfiguration: string;
|
|
104
|
+
traceInputs: string;
|
|
105
|
+
utilityNetwork: string;
|
|
106
|
+
};
|
|
107
|
+
unknown: string;
|
|
108
|
+
warnings: { exceededDisplayLimit: string; };
|
|
109
|
+
}>;
|
|
110
|
+
/**
|
|
111
|
+
* If true, the component will not be destroyed automatically when it is
|
|
112
|
+
* disconnected from the document. This is useful when you want to move the
|
|
113
|
+
* component to a different place on the page, or temporarily hide it. If this
|
|
114
|
+
* is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-inputs-next/#destroy) method when you are done to
|
|
115
|
+
* prevent memory leaks.
|
|
116
|
+
*
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
accessor autoDestroyDisabled: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* A function to run before trace location selection starts.
|
|
122
|
+
*
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
accessor beforeTraceLocationSelectStart: (() => Promise<void>) | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* @default false
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
accessor hideActionBar: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Whether a the user has selected a named trace configuration that executes a
|
|
133
|
+
* subnetwork trace with a specified subnetwork name.
|
|
134
|
+
*
|
|
135
|
+
* @default false
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
get isSubnetworkNameTraceSelected(): boolean;
|
|
139
|
+
/** @default "default" */
|
|
140
|
+
accessor mode: UtilityNetworkTraceAnalysisDisplayMode;
|
|
141
|
+
/**
|
|
142
|
+
* By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
|
|
143
|
+
*
|
|
144
|
+
* @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component)
|
|
145
|
+
*/
|
|
146
|
+
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
147
|
+
accessor selectedNamedTraceConfiguration: NamedTraceConfiguration | undefined;
|
|
148
|
+
accessor selectedUtilityNetwork: UtilityNetwork | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* A clone of the utility network trace configuration associated with
|
|
151
|
+
* the selected named trace configuration. Updates on this object are
|
|
152
|
+
* used to reflect the user's changes to the named trace configuration.
|
|
153
|
+
*/
|
|
154
|
+
get traceConfiguration(): UNTraceConfiguration | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Supplementary information about the points selected on the map to run the trace.
|
|
157
|
+
* I.e., feature title, terminal configuration, selected terminals, and spatial properties.
|
|
158
|
+
*
|
|
159
|
+
* @internal
|
|
160
|
+
*/
|
|
161
|
+
get traceLocationFlagInfos(): Collection<FlagInfo>;
|
|
162
|
+
get traceLocations(): TraceLocation[];
|
|
163
|
+
/**
|
|
164
|
+
* The view associated with the component.
|
|
165
|
+
* > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-utility-network-trace-inputs-next component will be associated with a map or scene component rather than using the `view` property.
|
|
166
|
+
*/
|
|
167
|
+
accessor view: MapView | undefined;
|
|
168
|
+
/** Permanently destroy the component. */
|
|
169
|
+
destroy(): Promise<void>;
|
|
170
|
+
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "mode"; }>;
|
|
171
|
+
/** Fires when the user changes the selected named trace configuration. */
|
|
172
|
+
readonly arcgisSelectedNamedTraceConfigurationChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
173
|
+
readonly arcgisTraceInputsChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
174
|
+
/**
|
|
175
|
+
* Fires when the user completes the selection of a trace location.
|
|
176
|
+
*
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
readonly arcgisTraceLocationSelectEnd: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
180
|
+
/**
|
|
181
|
+
* Fires when the user begins selection of a trace location.
|
|
182
|
+
* Can be prevented to stop the selection.
|
|
183
|
+
*
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
readonly arcgisTraceLocationSelectStart: import("@arcgis/lumina").TargetedEvent<this, SelectStartPayload>;
|
|
187
|
+
/** Fires when the user changes the selected utility network. */
|
|
188
|
+
readonly arcgisUtilityNetworkChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
189
|
+
readonly "@eventTypes": {
|
|
190
|
+
arcgisPropertyChange: ArcgisUtilityNetworkTraceInputsNext["arcgisPropertyChange"]["detail"];
|
|
191
|
+
arcgisSelectedNamedTraceConfigurationChange: ArcgisUtilityNetworkTraceInputsNext["arcgisSelectedNamedTraceConfigurationChange"]["detail"];
|
|
192
|
+
arcgisTraceInputsChange: ArcgisUtilityNetworkTraceInputsNext["arcgisTraceInputsChange"]["detail"];
|
|
193
|
+
arcgisTraceLocationSelectEnd: ArcgisUtilityNetworkTraceInputsNext["arcgisTraceLocationSelectEnd"]["detail"];
|
|
194
|
+
arcgisTraceLocationSelectStart: ArcgisUtilityNetworkTraceInputsNext["arcgisTraceLocationSelectStart"]["detail"];
|
|
195
|
+
arcgisUtilityNetworkChange: ArcgisUtilityNetworkTraceInputsNext["arcgisUtilityNetworkChange"]["detail"];
|
|
196
|
+
};
|
|
197
|
+
}
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as y } from "../../chunks/runtime.js";
|
|
3
|
+
import { ref as d } from "lit/directives/ref.js";
|
|
4
|
+
import c from "@arcgis/core/core/Collection.js";
|
|
5
|
+
import { watch as w } 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 N from "@arcgis/core/rest/networks/support/TraceLocation.js";
|
|
10
|
+
import g from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
|
|
11
|
+
import $ from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
|
|
12
|
+
import { LitElement as C, createEvent as l } from "@arcgis/lumina";
|
|
13
|
+
import { usePropertyChange as L } from "@arcgis/lumina/controllers";
|
|
14
|
+
import { log as h, composeMissingPropertyMessage as _, composeEmptyPropertyMessage as v } from "@arcgis/toolkit/log";
|
|
15
|
+
import { css as x, html as s } from "lit";
|
|
16
|
+
import { u as I } from "../../chunks/useT9n.js";
|
|
17
|
+
import { l as p } from "../../chunks/async-utils.js";
|
|
18
|
+
import { a as F, i as f, c as E, q as b, b as U } from "../../chunks/layer-utils.js";
|
|
19
|
+
const P = x`: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}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#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);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`, m = `utility-network-trace-inputs-sketch-${Date.now()}`, D = 20;
|
|
20
|
+
class A extends C {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments), this._messages = I({ blocking: !0 }), this.#h = !0, this.#u = /* @__PURE__ */ new Map(), this.#r = new c(), this.#s = new c(), this.#o = new c(), this.#b = /* @__PURE__ */ new Set(["subnetwork", "subnetwork-controller", "upstream", "downstream", "isolation"]), this.#i = null, this.#l = 20, this._candidateFeatures = [], this._compatibleSubnetworkNames = [], this._namedTraceConfigurations = [], this._subnetworkNamesState = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = L()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = l(), this.arcgisTraceInputsChange = l(), this.arcgisTraceLocationSelectEnd = l(), this.arcgisTraceLocationSelectStart = l(), this.arcgisUtilityNetworkChange = l();
|
|
23
|
+
}
|
|
24
|
+
static {
|
|
25
|
+
this.properties = { _selectedFeature: 16, _candidateFeatures: 16, _compatibleSubnetworkNames: 16, _subnetworksTable: 16, _namedTraceConfigurations: 16, _utilityNetworks: 16, _traceConfiguration: 16, _error: 16, _subnetworkNamesState: 16, _activeTraceLocationType: 16, _exceedDisplayLimit: 16, beforeTraceLocationSelectStart: 0, view: 0, selectedUtilityNetwork: 0, selectedNamedTraceConfiguration: 0, autoDestroyDisabled: 5, hideActionBar: 5, traceConfiguration: 32, isSubnetworkNameTraceSelected: 32, referenceElement: 1, mode: 3, traceLocationFlagInfos: 32, traceLocations: 32 };
|
|
26
|
+
}
|
|
27
|
+
static {
|
|
28
|
+
this.styles = P;
|
|
29
|
+
}
|
|
30
|
+
get #e() {
|
|
31
|
+
return this._traceConfiguration?.subnetworkName ?? void 0;
|
|
32
|
+
}
|
|
33
|
+
set #e(e) {
|
|
34
|
+
this._traceConfiguration && (this._traceConfiguration.subnetworkName = e);
|
|
35
|
+
}
|
|
36
|
+
#h;
|
|
37
|
+
get #_() {
|
|
38
|
+
const { view: e } = this;
|
|
39
|
+
return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
|
|
40
|
+
}
|
|
41
|
+
#t;
|
|
42
|
+
#a;
|
|
43
|
+
#u;
|
|
44
|
+
#r;
|
|
45
|
+
#s;
|
|
46
|
+
#o;
|
|
47
|
+
#b;
|
|
48
|
+
#i;
|
|
49
|
+
#c;
|
|
50
|
+
#y;
|
|
51
|
+
#w;
|
|
52
|
+
#k;
|
|
53
|
+
#l;
|
|
54
|
+
get #S() {
|
|
55
|
+
return !this.isSubnetworkNameTraceSelected;
|
|
56
|
+
}
|
|
57
|
+
get #T() {
|
|
58
|
+
const e = this.selectedNamedTraceConfiguration?.traceType;
|
|
59
|
+
return e === "path" || e === "circuit";
|
|
60
|
+
}
|
|
61
|
+
get #v() {
|
|
62
|
+
const e = this.selectedUtilityNetwork?.dataElement?.domainNetworks;
|
|
63
|
+
return e ? e.map((t) => t.subnetworkLayerId).filter((t) => t != null && t > -1) : [];
|
|
64
|
+
}
|
|
65
|
+
#x({ detail: e, target: t }) {
|
|
66
|
+
(e.name === "selectedDrillInFeature" || e.name === "selectedFeature") && (this._selectedFeature = t.selectedDrillInFeature ?? t.selectedFeature ?? void 0);
|
|
67
|
+
}
|
|
68
|
+
get traceConfiguration() {
|
|
69
|
+
return this._traceConfiguration;
|
|
70
|
+
}
|
|
71
|
+
get isSubnetworkNameTraceSelected() {
|
|
72
|
+
const { selectedNamedTraceConfiguration: e } = this;
|
|
73
|
+
return !!e?.traceConfiguration?.subnetworkName && e?.traceType === "subnetwork";
|
|
74
|
+
}
|
|
75
|
+
get traceLocationFlagInfos() {
|
|
76
|
+
return new c([...this.#r, ...this.#s, ...this.#o]);
|
|
77
|
+
}
|
|
78
|
+
get traceLocations() {
|
|
79
|
+
const e = [];
|
|
80
|
+
return this.#S && this.#r.forEach((t) => e.push(...this.#m(t))), this.#T && this.#o.forEach((t) => e.push(...this.#m(t))), this.#s.forEach((t) => e.push(...this.#m(t))), e;
|
|
81
|
+
}
|
|
82
|
+
async destroy() {
|
|
83
|
+
this.#A(m), this.#$(), this.#t?.cancel(), this.#c?.destroy(), this.#y?.destroy(), this.#w?.destroy(), this.#k?.destroy(), await this.manager.destroy();
|
|
84
|
+
}
|
|
85
|
+
load() {
|
|
86
|
+
this.#N(), this.manager.onLifecycle(() => [
|
|
87
|
+
w(() => this.view?.map, () => this.#N())
|
|
88
|
+
]);
|
|
89
|
+
}
|
|
90
|
+
willUpdate(e) {
|
|
91
|
+
e.has("_utilityNetworks") && this.#K(), e.has("selectedUtilityNetwork") && (this.arcgisUtilityNetworkChange.emit(), this.#H()), e.has("selectedNamedTraceConfiguration") && (this.arcgisTraceInputsChange.emit(), this.arcgisSelectedNamedTraceConfigurationChange.emit(), this.#z());
|
|
92
|
+
}
|
|
93
|
+
disconnectedCallback() {
|
|
94
|
+
super.disconnectedCallback(), this.#u.clear();
|
|
95
|
+
}
|
|
96
|
+
#N() {
|
|
97
|
+
if (this._error = void 0, !this.view?.map) {
|
|
98
|
+
this._error = this._messages.errors.noView, this._utilityNetworks = void 0;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const e = this.view.map;
|
|
102
|
+
this.#J(e), this.#B(e);
|
|
103
|
+
}
|
|
104
|
+
#I(e) {
|
|
105
|
+
e && (this.#y = e);
|
|
106
|
+
}
|
|
107
|
+
#F(e) {
|
|
108
|
+
e && (this.#w = e);
|
|
109
|
+
}
|
|
110
|
+
#E(e) {
|
|
111
|
+
e && (this.#k = e);
|
|
112
|
+
}
|
|
113
|
+
#U(e) {
|
|
114
|
+
e && (this.#c = e);
|
|
115
|
+
}
|
|
116
|
+
#m(e) {
|
|
117
|
+
const t = e.flagProperties.selectedTerminals;
|
|
118
|
+
return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new N({
|
|
119
|
+
type: e.traceLocation.type,
|
|
120
|
+
isFilterBarrier: e.traceLocation.isFilterBarrier,
|
|
121
|
+
globalId: e.traceLocation.globalId,
|
|
122
|
+
percentAlong: e.traceLocation.percentAlong,
|
|
123
|
+
terminalId: i
|
|
124
|
+
})) : [e.traceLocation];
|
|
125
|
+
}
|
|
126
|
+
#$() {
|
|
127
|
+
const { view: e } = this;
|
|
128
|
+
this.#r.forEach((t) => {
|
|
129
|
+
t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
|
|
130
|
+
}), this.#r.removeAll(), this.#s.forEach((t) => {
|
|
131
|
+
t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
|
|
132
|
+
}), this.#s.removeAll(), this.#o.forEach((t) => {
|
|
133
|
+
t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
|
|
134
|
+
}), this.#o.removeAll();
|
|
135
|
+
}
|
|
136
|
+
#P(e, t) {
|
|
137
|
+
if (!e.findLayerById(t)) {
|
|
138
|
+
const a = new S({
|
|
139
|
+
id: t,
|
|
140
|
+
listMode: "hide",
|
|
141
|
+
title: t
|
|
142
|
+
});
|
|
143
|
+
F(this.view, a);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
#D(e, t) {
|
|
147
|
+
const i = e.findLayerById(t);
|
|
148
|
+
return f(i) ? (e.reorder(i, e.layers.length - 1), i) : null;
|
|
149
|
+
}
|
|
150
|
+
#A(e) {
|
|
151
|
+
if (!this.view?.map)
|
|
152
|
+
return;
|
|
153
|
+
const { map: t } = this.view, i = t?.findLayerById(e);
|
|
154
|
+
i && f(i) && t?.remove(i);
|
|
155
|
+
}
|
|
156
|
+
#C() {
|
|
157
|
+
if (!this.#t)
|
|
158
|
+
return;
|
|
159
|
+
const e = new c();
|
|
160
|
+
this.#a?.forEach((t) => {
|
|
161
|
+
E(t) ? t.sublayers.forEach((i) => {
|
|
162
|
+
e.add(new g({
|
|
163
|
+
layer: i,
|
|
164
|
+
enabled: !0
|
|
165
|
+
}));
|
|
166
|
+
}) : e.add(new g({
|
|
167
|
+
layer: t,
|
|
168
|
+
enabled: !0
|
|
169
|
+
}));
|
|
170
|
+
}), this.#t.snappingOptions = {
|
|
171
|
+
enabled: !1,
|
|
172
|
+
featureSources: e
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
#M(e) {
|
|
176
|
+
const { view: t } = this, i = this.#D(e, m);
|
|
177
|
+
return new $({
|
|
178
|
+
layer: i,
|
|
179
|
+
view: t
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
#B(e) {
|
|
183
|
+
this.#P(e, m), this.#t = this.#M(e), this.#C();
|
|
184
|
+
}
|
|
185
|
+
#G() {
|
|
186
|
+
this.#e = void 0, this._subnetworksTable = void 0, this._compatibleSubnetworkNames = [];
|
|
187
|
+
}
|
|
188
|
+
async #V() {
|
|
189
|
+
this._subnetworksTable || (this._subnetworksTable = await this.selectedUtilityNetwork?.loadSubnetworksTable());
|
|
190
|
+
}
|
|
191
|
+
async #q() {
|
|
192
|
+
const { _subnetworksTable: e } = this;
|
|
193
|
+
if (!e)
|
|
194
|
+
return;
|
|
195
|
+
const t = e.fieldsIndex.get("SUBNETWORKNAME"), i = (o, n, u) => n === 0 || o.getAttribute(t.name) !== u[n - 1].getAttribute(t.name), a = e.createQuery();
|
|
196
|
+
a.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, a.where = this.#O(), a.outFields = [t.name], a.orderByFields = [t.name];
|
|
197
|
+
const { features: r } = await b(e, a, void 0, !1);
|
|
198
|
+
this._compatibleSubnetworkNames = r.filter(i).map((o) => o.getAttribute(t.name));
|
|
199
|
+
}
|
|
200
|
+
#O() {
|
|
201
|
+
const e = this._traceConfiguration, t = `DOMAINNETWORKNAME = '${e.domainNetworkName}'`, i = `TIERNAME = '${e.tierName}'`;
|
|
202
|
+
return [t, i].join(" AND ");
|
|
203
|
+
}
|
|
204
|
+
async #R(e) {
|
|
205
|
+
await this.#V(), await this.#q(), e.subnetworkName && !this._compatibleSubnetworkNames.some((t) => t === e.subnetworkName) && (this.#e = this._compatibleSubnetworkNames.at(0));
|
|
206
|
+
}
|
|
207
|
+
#j(e) {
|
|
208
|
+
const t = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find((i) => i.globalId === e);
|
|
209
|
+
if (!t) {
|
|
210
|
+
h("error", this, "`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
this.selectedNamedTraceConfiguration = t;
|
|
214
|
+
}
|
|
215
|
+
async #z() {
|
|
216
|
+
const { selectedNamedTraceConfiguration: e } = this;
|
|
217
|
+
if (!(e?.traceConfiguration instanceof T)) {
|
|
218
|
+
h("error", this, _("selectedNamedTraceConfiguration.traceConfiguration")), this._traceConfiguration = void 0;
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
this._traceConfiguration = e.traceConfiguration.clone(), this.isSubnetworkNameTraceSelected && (this._subnetworkNamesState = "loading", await this.#R(this._traceConfiguration), this._subnetworkNamesState = "ready");
|
|
222
|
+
}
|
|
223
|
+
async #H() {
|
|
224
|
+
const { selectedUtilityNetwork: e } = this;
|
|
225
|
+
try {
|
|
226
|
+
e && !e.loaded && await e.load();
|
|
227
|
+
} catch (t) {
|
|
228
|
+
p(t, this, "Error while loading the selected utility network");
|
|
229
|
+
}
|
|
230
|
+
this.#G(), this.#W(), this.#Q(), this.#$();
|
|
231
|
+
}
|
|
232
|
+
#W() {
|
|
233
|
+
this._traceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this._namedTraceConfigurations = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter((e) => e.traceType !== "circuit").sort((e, t) => e.title.localeCompare(t.title)) || [], this._namedTraceConfigurations.length ? this.selectedNamedTraceConfiguration = this._namedTraceConfigurations.at(0) : h("error", this, "The selected utility network has no compatible named trace configurations.");
|
|
234
|
+
}
|
|
235
|
+
#Q() {
|
|
236
|
+
const { selectedUtilityNetwork: e } = this;
|
|
237
|
+
this.#a = new c(this.#_.filter((t) => e?.isUtilityLayer(t) && !this.#v.includes(t.layerId))), this.#C();
|
|
238
|
+
}
|
|
239
|
+
#K() {
|
|
240
|
+
const { _utilityNetworks: e, selectedUtilityNetwork: t } = this;
|
|
241
|
+
e?.length ? (!t || !e.includes(t)) && (this.selectedUtilityNetwork = e.at(0)) : (h("error", this, v("_utilityNetworks")), this.selectedUtilityNetwork = void 0, this._error = this._messages.errors.noUtilityNetwork);
|
|
242
|
+
}
|
|
243
|
+
async #J(e) {
|
|
244
|
+
try {
|
|
245
|
+
e.loaded || await e.load();
|
|
246
|
+
} catch (t) {
|
|
247
|
+
p(t, this, "Error while loading `view.map`");
|
|
248
|
+
} finally {
|
|
249
|
+
this._utilityNetworks = e.utilityNetworks || new c();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
#g(e) {
|
|
253
|
+
if (e.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented) {
|
|
254
|
+
e.preventDefault();
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
this._activeTraceLocationType = e?.target?.traceLocationType, this.mode = "add-spatial-instructions";
|
|
258
|
+
}
|
|
259
|
+
#X(e) {
|
|
260
|
+
if (e == null)
|
|
261
|
+
return;
|
|
262
|
+
const t = this.#u, i = this.#a, a = t.get(e);
|
|
263
|
+
if (a)
|
|
264
|
+
return a;
|
|
265
|
+
if (!i)
|
|
266
|
+
return;
|
|
267
|
+
const r = i.find((o) => "layerId" in o && o.layerId === e);
|
|
268
|
+
return r && t.set(e, r), r;
|
|
269
|
+
}
|
|
270
|
+
async #Y(e, t) {
|
|
271
|
+
const i = e.createQuery();
|
|
272
|
+
i.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, i.objectIds = t.map((r) => r.getObjectId()), i.outFields = ["*"];
|
|
273
|
+
const { features: a } = await b(e, i);
|
|
274
|
+
return a.forEach((r) => {
|
|
275
|
+
if (!r.getEffectivePopupTemplate(this.#h)) {
|
|
276
|
+
const o = r.layer;
|
|
277
|
+
r.popupTemplate = o.createPopupTemplate();
|
|
278
|
+
}
|
|
279
|
+
}), a;
|
|
280
|
+
}
|
|
281
|
+
async #Z(e) {
|
|
282
|
+
const t = /* @__PURE__ */ new Map(), i = [];
|
|
283
|
+
return e.forEach((a) => {
|
|
284
|
+
const r = U(a.layer) ? a.layer.parent : a.layer;
|
|
285
|
+
if (r) {
|
|
286
|
+
const o = this.#X(r.layerId);
|
|
287
|
+
if (o) {
|
|
288
|
+
const n = t.get(o) || [];
|
|
289
|
+
n.push(a), t.set(o, n);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}), await Promise.all(Array.from(t.keys()).map(async (a) => {
|
|
293
|
+
const r = t.get(a) ?? [], o = await this.#Y(a, r);
|
|
294
|
+
i.push(...o);
|
|
295
|
+
})), i;
|
|
296
|
+
}
|
|
297
|
+
async #p(e) {
|
|
298
|
+
return this._exceedDisplayLimit = e.length > this.#l, this._candidateFeatures = await this.#Z(e.slice(0, this.#l)), this._candidateFeatures.length === 0 ? (this.#d(), await Promise.reject(Error("No features found"))) : (this._candidateFeatures.length === 1 && (this._selectedFeature = this._candidateFeatures.at(0)), this.mode = "add-spatial-feature", this.#i?.reject(), this.#i = Promise.withResolvers(), await this.#i.promise);
|
|
299
|
+
}
|
|
300
|
+
#f(e) {
|
|
301
|
+
e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit(), this._activeTraceLocationType = void 0, this.mode = "default", this.#d();
|
|
302
|
+
}
|
|
303
|
+
#d(e) {
|
|
304
|
+
e?.stopPropagation(), this.#c?.clear(), this.#L(), this.#t?.cancel();
|
|
305
|
+
}
|
|
306
|
+
#L() {
|
|
307
|
+
this.mode = "default", this._candidateFeatures = [], this._selectedFeature = void 0, this.#i?.reject(), this.#i = null;
|
|
308
|
+
}
|
|
309
|
+
#ee() {
|
|
310
|
+
const e = this.#i, t = this.#c, { _selectedFeature: i } = this;
|
|
311
|
+
if (e && t) {
|
|
312
|
+
if (!i)
|
|
313
|
+
return;
|
|
314
|
+
e.resolve(i), this.#i = null;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
#n(e, t = !1, i) {
|
|
318
|
+
return s`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`;
|
|
319
|
+
}
|
|
320
|
+
#te() {
|
|
321
|
+
return s`<calcite-loader label=loading></calcite-loader>`;
|
|
322
|
+
}
|
|
323
|
+
#ie() {
|
|
324
|
+
const e = this._namedTraceConfigurations.map((i) => s`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId === this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`), t = this._messages.labels.traceConfiguration;
|
|
325
|
+
return s`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
|
|
326
|
+
const a = i.selectedItems[0]?.value;
|
|
327
|
+
this.#j(a);
|
|
328
|
+
}}>${e}</calcite-combobox></calcite-block>`;
|
|
329
|
+
}
|
|
330
|
+
#ae() {
|
|
331
|
+
const e = this._messages.labels.utilityNetwork, t = this._utilityNetworks?.map((i) => s`<calcite-combobox-item .value=${i.id} .heading=${i.title || i.id} .selected=${i.id === this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);
|
|
332
|
+
return s`<calcite-block .heading=${e} .label=${e} expanded><calcite-combobox .label=${e} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
|
|
333
|
+
const a = i.selectedItems[0]?.value;
|
|
334
|
+
this.selectedUtilityNetwork?.id !== a && (this.selectedUtilityNetwork = this._utilityNetworks?.find((r) => r.id === a));
|
|
335
|
+
}}>${t}</calcite-combobox></calcite-block>`;
|
|
336
|
+
}
|
|
337
|
+
#re() {
|
|
338
|
+
const { _error: e, selectedUtilityNetwork: t } = this, { noView: i, noUtilityNetwork: a } = this._messages.errors;
|
|
339
|
+
let r;
|
|
340
|
+
return e === i || e === a ? r = this.#n(e, !1, "exclamation-mark-triangle") : !t?.loaded && !t?.loadError ? r = this.#te() : r = this.#pe(), s`<calcite-flow-item .selected=${this.mode === "default"}>${r}</calcite-flow-item>`;
|
|
341
|
+
}
|
|
342
|
+
#se() {
|
|
343
|
+
const { _messages: e, mode: t } = this, i = this._activeTraceLocationType === "starting-point" ? e.labels.addSpatial.startingPoint : this._activeTraceLocationType === "barrier" ? e.labels.addSpatial.barrier : e.labels.addSpatial.stoppingPoint;
|
|
344
|
+
return s`<calcite-flow-item .selected=${t === "add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${(a) => this.#d(a)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`;
|
|
345
|
+
}
|
|
346
|
+
#oe() {
|
|
347
|
+
const { _activeTraceLocationType: e, _candidateFeatures: t, _messages: i } = this;
|
|
348
|
+
if (!t.length)
|
|
349
|
+
return this.mode = "default", null;
|
|
350
|
+
const a = e === "starting-point" ? i.labels.addSpatial.startingPoint : e === "barrier" ? i.labels.addSpatial.barrier : i.labels.addSpatial.stoppingPoint, r = t.length === 1 ? "feature" : "list";
|
|
351
|
+
return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#h} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${() => this.#L()} @arcgisPropertyChange=${this.#x} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#U)}></arcgis-features-next>`;
|
|
352
|
+
}
|
|
353
|
+
#ne() {
|
|
354
|
+
const { mode: e, _messages: t, _selectedFeature: i, selectedUtilityNetwork: a } = this, r = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o = k(t.warnings.exceededDisplayLimit, {
|
|
355
|
+
limit: this.#l.toString()
|
|
356
|
+
}), n = i ? !(a?.isUtilityLayer(i.layer) ?? !0) : !0;
|
|
357
|
+
return s`${r && s`<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.#d()} slot=footer>${t.buttons.cancel}</calcite-button>${e === "add-spatial-feature" && s`<calcite-button width=full slot=footer appearance=solid @click=${() => this.#ee()} .disabled=${n}>${t.buttons.add}</calcite-button>` || ""}`;
|
|
358
|
+
}
|
|
359
|
+
#ce() {
|
|
360
|
+
return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#I)}></arcgis-utility-network-trace-location-next>`;
|
|
361
|
+
}
|
|
362
|
+
#le() {
|
|
363
|
+
return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#E)}></arcgis-utility-network-trace-location-next>`;
|
|
364
|
+
}
|
|
365
|
+
#de() {
|
|
366
|
+
return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#F)}></arcgis-utility-network-trace-location-next>`;
|
|
367
|
+
}
|
|
368
|
+
#he() {
|
|
369
|
+
const { _messages: e } = this;
|
|
370
|
+
return s`<calcite-input clearable type=text .placeholder=${e.instructions.enterSubnetworkName} max-length=64 .status=${this.#e ? "valid" : "invalid"} .value=${this.#e} @calciteInputInput=${(t) => this.#e = t.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${e.labels.tooManySubnetworks}</calcite-input-message>`;
|
|
371
|
+
}
|
|
372
|
+
#ue() {
|
|
373
|
+
return s`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: e }) => {
|
|
374
|
+
const t = e.selectedItems[0]?.value;
|
|
375
|
+
this.#e = t;
|
|
376
|
+
}}>${this._compatibleSubnetworkNames.map((e) => s`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e === this.#e}></calcite-combobox-item>`)}</calcite-combobox>`;
|
|
377
|
+
}
|
|
378
|
+
#me() {
|
|
379
|
+
const { _messages: e } = this, t = e.labels.subnetworkName;
|
|
380
|
+
return this.isSubnetworkNameTraceSelected ? this._subnetworkNamesState === "loading" ? s`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>` : this._compatibleSubnetworkNames.length ? s`<calcite-block .heading=${t} .label=${t} expanded>${this._compatibleSubnetworkNames.length > D ? this.#he() : this.#ue()}</calcite-block>` : this.#n(e.errors.noCompatibleSubnetworks, !1, "exclamation-mark-triangle") : null;
|
|
381
|
+
}
|
|
382
|
+
#ge() {
|
|
383
|
+
const { selectedNamedTraceConfiguration: e } = this;
|
|
384
|
+
return this._traceConfiguration && e?.traceType && this.#b.has(e.traceType) ? s`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info-next .namedTraceConfiguration=${e}></arcgis-utility-network-subnetwork-info-next></calcite-block>` : null;
|
|
385
|
+
}
|
|
386
|
+
#pe() {
|
|
387
|
+
const { _messages: e } = this, { noTraceConfiguration: t, noNamedTraceConfigurations: i, utilityNetworkLoadFailed: a } = e.errors, r = this._utilityNetworks && this._utilityNetworks.length > 1 ? this.#ae() : null;
|
|
388
|
+
let o;
|
|
389
|
+
this.selectedUtilityNetwork?.loadError ? o = this.#n(a, !1, "exclamation-mark-triangle") : this._namedTraceConfigurations.length || (o = this.#n(i, !1, "exclamation-mark-triangle"));
|
|
390
|
+
const n = s`${this.#ie()}${this.#ge()}${this.#me()}`, u = this.traceConfiguration ? s`${this.#S ? this.#ce() : null}${this.#T ? this.#le() : null}${this.#de()}` : this.#n(t, !1, "exclamation-mark-triangle");
|
|
391
|
+
return s`<calcite-block-group .label=${e.labels.traceInputs}>${r}${o ?? s`${n}${u}`}</calcite-block-group>`;
|
|
392
|
+
}
|
|
393
|
+
render() {
|
|
394
|
+
const { mode: e } = this;
|
|
395
|
+
return s`<calcite-panel>${e === "add-spatial-feature" ? this.#oe() : null}<calcite-flow .hidden=${e === "add-spatial-feature"}>${this.#re()}${this.#se()}</calcite-flow>${e !== "default" ? this.#ne() : null}</calcite-panel>`;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
y("arcgis-utility-network-trace-inputs-next", A);
|
|
399
|
+
export {
|
|
400
|
+
A as ArcgisUtilityNetworkTraceInputsNext
|
|
401
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-notice";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-loader";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-combobox-item";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-block";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-combobox";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-flow-item";
|
|
7
|
+
import "../arcgis-features-next/index.js";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-input-message";
|
|
9
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
10
|
+
import "../arcgis-utility-network-trace-location-next/index.js";
|
|
11
|
+
import "@esri/calcite-components/components/calcite-input";
|
|
12
|
+
import "../arcgis-utility-network-subnetwork-info-next/index.js";
|
|
13
|
+
import "@esri/calcite-components/components/calcite-block-group";
|
|
14
|
+
import "@esri/calcite-components/components/calcite-panel";
|
|
15
|
+
import "@esri/calcite-components/components/calcite-flow";
|
|
16
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Collection from "@arcgis/core/core/Collection.js";
|
|
3
|
+
import type MapView from "@arcgis/core/views/MapView.js";
|
|
4
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
5
|
+
import type { FlagInfo, TraceLocationType } from "../arcgis-utility-network-trace-location-next/customElement.js";
|
|
6
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This is a sub-component used by the **ArcgisUtilityNetworkTraceAnalysis** component.
|
|
10
|
+
* This sub-component renders a collection of trace locations as a list.
|
|
11
|
+
*
|
|
12
|
+
* @since 4.34
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export abstract class ArcgisUtilityNetworkTraceLocationListNext extends LitElement {
|
|
16
|
+
/** @internal */
|
|
17
|
+
protected _messages: {
|
|
18
|
+
componentLabel: string;
|
|
19
|
+
errors: { noTerminalSelected: string; };
|
|
20
|
+
labels: {
|
|
21
|
+
filterBarrier: string;
|
|
22
|
+
list: string;
|
|
23
|
+
};
|
|
24
|
+
unknown: string;
|
|
25
|
+
} & T9nMeta<{
|
|
26
|
+
componentLabel: string;
|
|
27
|
+
errors: { noTerminalSelected: string; };
|
|
28
|
+
labels: {
|
|
29
|
+
filterBarrier: string;
|
|
30
|
+
list: string;
|
|
31
|
+
};
|
|
32
|
+
unknown: string;
|
|
33
|
+
}>;
|
|
34
|
+
/** @required */
|
|
35
|
+
accessor traceLocations: Collection<FlagInfo>;
|
|
36
|
+
/** @default "starting-point" */
|
|
37
|
+
accessor traceLocationType: TraceLocationType;
|
|
38
|
+
/**
|
|
39
|
+
* The view associated with the component.
|
|
40
|
+
* > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-utility-network-trace-location-list-next component will be associated with a map or scene component rather than using the `view` property.
|
|
41
|
+
*/
|
|
42
|
+
accessor view: MapView | undefined;
|
|
43
|
+
}
|