@arcgis/map-components 5.2.0-next.167 → 5.2.0-next.169
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/263OOI6Z.js +2 -0
- package/dist/cdn/{OP3MZHXU.js → 3YACO47M.js} +1 -1
- package/dist/cdn/42V6ISWG.js +2 -0
- package/dist/cdn/5VOAPFZ5.js +2 -0
- package/dist/cdn/6S5TVS52.js +2 -0
- package/dist/cdn/6ZMVEWJQ.js +2 -0
- package/dist/cdn/{OQPX2UPC.js → AFY6JQ77.js} +1 -1
- package/dist/cdn/{VHM26W3Y.js → AW5FFER6.js} +1 -1
- package/dist/cdn/{OEL57WQN.js → CGKFSTIT.js} +1 -1
- package/dist/cdn/GBTMUEG6.js +2 -0
- package/dist/cdn/K3SCI35Q.js +2 -0
- package/dist/cdn/{NY6QZ4MA.js → ODY56P7R.js} +1 -1
- package/dist/cdn/OIKOOFSR.js +2 -0
- package/dist/cdn/OOCIGOT6.js +2 -0
- package/dist/cdn/PJ2XGEYO.js +2 -0
- package/dist/cdn/{MZ47CPKO.js → RDBCKSUZ.js} +1 -1
- package/dist/cdn/{7XO4NAD5.js → WC5ZQ5SQ.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/screenLocation.js +10 -10
- package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +2 -1
- package/dist/components/arcgis-basemap-layer-list/customElement.d.ts +7 -7
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +4 -4
- package/dist/components/arcgis-bookmarks/customElement.d.ts +1 -0
- package/dist/components/arcgis-bookmarks/types.d.ts +2 -2
- package/dist/components/arcgis-building-explorer/customElement.d.ts +5 -5
- package/dist/components/arcgis-catalog-layer-list/customElement.d.ts +4 -4
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-daylight/customElement.d.ts +4 -4
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.d.ts +4 -4
- package/dist/components/arcgis-directional-pad/customElement.js +53 -58
- package/dist/components/arcgis-directions/customElement.d.ts +4 -4
- package/dist/components/arcgis-editor/customElement.d.ts +19 -2
- package/dist/components/arcgis-expand/customElement.d.ts +2 -1
- package/dist/components/arcgis-feature-form/customElement.d.ts +7 -7
- package/dist/components/arcgis-feature-table/customElement.d.ts +25 -25
- package/dist/components/arcgis-features/customElement.d.ts +5 -5
- package/dist/components/arcgis-features-next/customElement.d.ts +4 -4
- package/dist/components/arcgis-features-next/customElement.js +27 -26
- package/dist/components/arcgis-grid-controls/customElement.d.ts +1 -1
- package/dist/components/arcgis-layer-list/customElement.d.ts +2 -2
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +6 -6
- package/dist/components/arcgis-legend/customElement.d.ts +1 -1
- package/dist/components/arcgis-line-of-sight/customElement.d.ts +2 -2
- package/dist/components/arcgis-link-chart/customElement.d.ts +6 -6
- package/dist/components/arcgis-map/customElement.d.ts +13 -17
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.d.ts +0 -1
- package/dist/components/arcgis-oriented-imagery-viewer-non-panoramic-viewer/customElement.js +6 -5
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +19 -18
- package/dist/components/arcgis-popup/customElement.d.ts +8 -7
- package/dist/components/arcgis-presentation/customElement.d.ts +5 -5
- package/dist/components/arcgis-presentation/customElement.js +74 -75
- package/dist/components/arcgis-presentation-captions/customElement.js +1 -1
- package/dist/components/arcgis-print/customElement.d.ts +1 -1
- package/dist/components/arcgis-scale-range-slider/customElement.d.ts +4 -4
- package/dist/components/arcgis-scene/customElement.d.ts +34 -13
- package/dist/components/arcgis-search/customElement.d.ts +4 -4
- package/dist/components/arcgis-selection-list/customElement.d.ts +2 -2
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +6 -6
- package/dist/components/arcgis-sketch/SketchComponentViewModel.d.ts +1 -1
- package/dist/components/arcgis-sketch/customElement.d.ts +20 -2
- package/dist/components/arcgis-sketch/customElement.js +18 -11
- package/dist/components/arcgis-slice/customElement.d.ts +2 -2
- package/dist/components/arcgis-slider-binary-color-size-legacy/customElement.d.ts +4 -3
- package/dist/components/arcgis-slider-classed-color-legacy/customElement.d.ts +2 -2
- package/dist/components/arcgis-slider-classed-size-legacy/customElement.d.ts +3 -3
- package/dist/components/arcgis-slider-color-legacy/customElement.d.ts +3 -3
- package/dist/components/arcgis-slider-color-size-legacy/customElement.d.ts +5 -4
- package/dist/components/arcgis-slider-heatmap-legacy/customElement.d.ts +2 -2
- package/dist/components/arcgis-slider-opacity-legacy/customElement.d.ts +2 -2
- package/dist/components/arcgis-slider-scale-range/customElement.d.ts +4 -4
- package/dist/components/arcgis-slider-size-legacy/customElement.d.ts +3 -3
- package/dist/components/arcgis-table-list-next/customElement.js +5 -5
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +11 -14
- package/dist/components/arcgis-time-slider/customElement.d.ts +6 -5
- package/dist/components/arcgis-track/customElement.d.ts +4 -4
- package/dist/components/arcgis-utility-network-associations/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-picker/customElement.d.ts +170 -6
- package/dist/components/arcgis-utility-network-picker/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +5 -4
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +19 -15
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +1 -7
- package/dist/components/arcgis-utility-network-trace-analysis/types.d.ts +272 -9
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.js +25 -33
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +5 -4
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +50 -46
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +9 -8
- package/dist/components/arcgis-utility-network-trace-locations/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -4
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +12 -12
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +0 -2
- package/dist/components/arcgis-value-picker-legacy/customElement.d.ts +14 -16
- package/dist/components/arcgis-video/customElement.d.ts +1 -1
- package/dist/components/arcgis-volume-measurement/customElement.d.ts +2 -2
- package/dist/components/arcgis-weather/customElement.d.ts +1 -1
- package/dist/components/slider-legacy/types.d.ts +2 -3
- 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/package.json +6 -6
- package/dist/cdn/2IAD3DI5.js +0 -2
- package/dist/cdn/67UW6MJM.js +0 -2
- package/dist/cdn/73NABILZ.js +0 -2
- package/dist/cdn/BJ55UYFS.js +0 -2
- package/dist/cdn/BPTZ6LBO.js +0 -2
- package/dist/cdn/C6T7AQOJ.js +0 -2
- package/dist/cdn/CL5JQN4B.js +0 -2
- package/dist/cdn/F3JX74XA.js +0 -2
- package/dist/cdn/FGQJD346.js +0 -2
- package/dist/cdn/OBFJ4JUW.js +0 -2
|
@@ -61,7 +61,8 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
61
61
|
* // check what action user clicked on and respond accordingly.
|
|
62
62
|
* timeSlider.on("trigger-action", (event) => {
|
|
63
63
|
* const quake = new Date(Date.UTC(2011, 3, 11, 8, 16, 12));
|
|
64
|
-
* const oneMonthLater = new Date(quake.getTime())
|
|
64
|
+
* const oneMonthLater = new Date(quake.getTime());
|
|
65
|
+
* oneMonthLater.setMonth(oneMonthLater.getMonth() + 1);
|
|
65
66
|
* switch(event.action.id) {
|
|
66
67
|
* case "quake":
|
|
67
68
|
* timeSlider.timeExtent = {
|
|
@@ -168,7 +169,7 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
168
169
|
* Possible values are listed below:
|
|
169
170
|
* | Value | Description |
|
|
170
171
|
* | --- | --- |
|
|
171
|
-
* | auto | Automatically uses the "compact" layout when the component width is less than 858 pixels. Otherwise the "wide" layout
|
|
172
|
+
* | auto | Automatically uses the "compact" layout when the component width is less than 858 pixels. Otherwise the "wide" layout is used. |
|
|
172
173
|
* | compact | Component elements are oriented vertically. This layout is better suited to narrower widths. |
|
|
173
174
|
* | wide | Component elements are oriented laterally. This thinner design is better suited to wide applications. |
|
|
174
175
|
*
|
|
@@ -256,7 +257,7 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
256
257
|
* // Display the current state of the view model.
|
|
257
258
|
* switch (timeSlider.viewModel.state) {
|
|
258
259
|
* case "disabled":
|
|
259
|
-
* console.log("The view is not ready or some
|
|
260
|
+
* console.log("The view is not ready or some properties are not set.");
|
|
260
261
|
* break;
|
|
261
262
|
* case "ready":
|
|
262
263
|
* console.log("The time slider is ready for use.");
|
|
@@ -276,7 +277,7 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
276
277
|
* timeSlider.stops = null;
|
|
277
278
|
* ```
|
|
278
279
|
*
|
|
279
|
-
* To define regularly spaced stops,
|
|
280
|
+
* To define regularly spaced stops, pass an object with `interval` and `timeExtent` properties
|
|
280
281
|
* with types [TimeInterval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval/) and [TimeExtent](https://developers.arcgis.com/javascript/latest/references/core/time/TimeExtent/) respectively.
|
|
281
282
|
* The [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property is optional and used to confine stops to a certain date range.
|
|
282
283
|
* This property is useful to commence stops on a specific day of the week or month.
|
|
@@ -370,7 +371,7 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
370
371
|
* labelElement.classList.add("custom-labels");
|
|
371
372
|
* }
|
|
372
373
|
* }]
|
|
373
|
-
* };
|
|
374
|
+
* });
|
|
374
375
|
* @example
|
|
375
376
|
* // this CSS goes with the snippet above.
|
|
376
377
|
* #timeSlider .custom-ticks {
|
|
@@ -87,7 +87,7 @@ export abstract class ArcgisTrack extends LitElement {
|
|
|
87
87
|
*/
|
|
88
88
|
accessor geolocationOptions: PositionOptions | undefined;
|
|
89
89
|
/**
|
|
90
|
-
* Indicates whether
|
|
90
|
+
* Indicates whether navigation to the position and scale of the geolocated result is disabled.
|
|
91
91
|
*
|
|
92
92
|
* @default false
|
|
93
93
|
*/
|
|
@@ -176,7 +176,7 @@ export abstract class ArcgisTrack extends LitElement {
|
|
|
176
176
|
*
|
|
177
177
|
* @since 4.27
|
|
178
178
|
* @example
|
|
179
|
-
* // Exclude locations that
|
|
179
|
+
* // Exclude locations that fall outside an extent.
|
|
180
180
|
* trackComponent.positionFilterFunction = (value) => {
|
|
181
181
|
* const { longitude, latitude } = value.position.coords;
|
|
182
182
|
* const myLocation = new Point({ longitude, latitude });
|
|
@@ -194,8 +194,8 @@ export abstract class ArcgisTrack extends LitElement {
|
|
|
194
194
|
*/
|
|
195
195
|
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
196
196
|
/**
|
|
197
|
-
* Indicates whether
|
|
198
|
-
* the Geolocation
|
|
197
|
+
* Indicates whether automatic rotation to the device heading is disabled. Rotation is based on
|
|
198
|
+
* the Geolocation API's [`GeolocationCoordinates.heading`](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/heading)
|
|
199
199
|
* property. The map will not rotate if the speed is `0`,
|
|
200
200
|
* or if the device is unable to provide heading information.
|
|
201
201
|
*
|
|
@@ -195,7 +195,7 @@ export abstract class ArcgisUtilityNetworkAssociations extends LitElement {
|
|
|
195
195
|
*/
|
|
196
196
|
accessor showConnectivityAssociationsSettingsCapSelect: boolean;
|
|
197
197
|
/**
|
|
198
|
-
* If true,
|
|
198
|
+
* If true, shows the max allowable associations slider.
|
|
199
199
|
*
|
|
200
200
|
* @default false
|
|
201
201
|
* @since 5.0
|
|
@@ -5,9 +5,81 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
5
5
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* It
|
|
8
|
+
* The Utility Network Picker component selects a utility network from a web map.
|
|
9
|
+
* It is used by the [arcgis-utility-network-trace-analysis](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/) component
|
|
10
|
+
* and can also be used independently.
|
|
10
11
|
*
|
|
12
|
+
* Set [view](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#view) to a
|
|
13
|
+
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/)
|
|
14
|
+
* whose web map contains utility networks. The component loads the map and the selected network.
|
|
15
|
+
* The component displays the network's [title](https://developers.arcgis.com/javascript/latest/references/core/networks/Network/#title)
|
|
16
|
+
* when the map contains one utility network, or a [Combobox](https://developers.arcgis.com/calcite-design-system/components/combobox/)
|
|
17
|
+
* for multiple utility networks.
|
|
18
|
+
*
|
|
19
|
+
* When the map's networks are loaded, the first network is selected if the current selection
|
|
20
|
+
* is missing or does not belong to the map. Selecting a network does not execute a trace.
|
|
21
|
+
* Access the selected utility network with the [selectedUtilityNetwork](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#selectedUtilityNetwork) property.
|
|
22
|
+
*
|
|
23
|
+
* Changing the selected utility network loads the new selected utility network
|
|
24
|
+
* if it is not already [loaded](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/#loaded).
|
|
25
|
+
* Before using the new selected `UtilityNetwork`, await its
|
|
26
|
+
* [load()](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/#load)
|
|
27
|
+
* method, which resolves with the loaded instance, including when it is already loaded.
|
|
28
|
+
* `componentOnReady()` waits for component initialization, not for the selected network to load.
|
|
29
|
+
*
|
|
30
|
+
* Customize what this component displays with
|
|
31
|
+
* [heading](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#heading),
|
|
32
|
+
* [hideErrors](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#hideErrors), and
|
|
33
|
+
* [hideLoader](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#hideLoader).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* Place a standalone picker in a pane next to a web map containing utility networks.
|
|
37
|
+
* Configure [authentication](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/)
|
|
38
|
+
* for secured resources before loading the map.
|
|
39
|
+
* ```html
|
|
40
|
+
* <calcite-shell>
|
|
41
|
+
* <calcite-shell-panel slot="panel-start">
|
|
42
|
+
* <calcite-panel heading="Utility networks">
|
|
43
|
+
* <arcgis-utility-network-picker></arcgis-utility-network-picker>
|
|
44
|
+
* </calcite-panel>
|
|
45
|
+
* </calcite-shell-panel>
|
|
46
|
+
* <arcgis-map item-id="471eb0bf37074b1fbb972b1da70fb310"></arcgis-map>
|
|
47
|
+
* </calcite-shell>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* ```js
|
|
51
|
+
* import "@arcgis/map-components/components/arcgis-map";
|
|
52
|
+
* import "@arcgis/map-components/components/arcgis-utility-network-picker";
|
|
53
|
+
*
|
|
54
|
+
* const mapElement = document.querySelector("arcgis-map");
|
|
55
|
+
* await mapElement.viewOnReady();
|
|
56
|
+
*
|
|
57
|
+
* const picker = document.querySelector("arcgis-utility-network-picker");
|
|
58
|
+
* picker.view = mapElement.view;
|
|
59
|
+
* picker.addEventListener("arcgisError", (event) => {
|
|
60
|
+
* console.error(event.type, picker.error);
|
|
61
|
+
* });
|
|
62
|
+
*
|
|
63
|
+
* picker.addEventListener("arcgisPropertyChange", async (event) => {
|
|
64
|
+
* if (event.detail.name !== "selectedUtilityNetwork") {
|
|
65
|
+
* return;
|
|
66
|
+
* }
|
|
67
|
+
*
|
|
68
|
+
* const network = picker.selectedUtilityNetwork;
|
|
69
|
+
* if (!network) {
|
|
70
|
+
* return;
|
|
71
|
+
* }
|
|
72
|
+
*
|
|
73
|
+
* try {
|
|
74
|
+
* const loadedNetwork = await network.load();
|
|
75
|
+
* if (picker.selectedUtilityNetwork === loadedNetwork) {
|
|
76
|
+
* console.log(loadedNetwork.dataElement);
|
|
77
|
+
* }
|
|
78
|
+
* } catch (error) {
|
|
79
|
+
* console.error(error);
|
|
80
|
+
* }
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
11
83
|
* @since 5.2
|
|
12
84
|
*/
|
|
13
85
|
export abstract class ArcgisUtilityNetworkPicker extends LitElement {
|
|
@@ -31,11 +103,47 @@ export abstract class ArcgisUtilityNetworkPicker extends LitElement {
|
|
|
31
103
|
};
|
|
32
104
|
labels: { utilityNetwork: string; };
|
|
33
105
|
}>;
|
|
106
|
+
/**
|
|
107
|
+
* The current error message, or `undefined` when cleared. Errors can occur when
|
|
108
|
+
* the view has no map, the map cannot be loaded, the map has no utility networks,
|
|
109
|
+
* or the selected network cannot be loaded. The component displays this message
|
|
110
|
+
* unless [hideErrors](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#hideErrors) is `true`.
|
|
111
|
+
*
|
|
112
|
+
* The error message is cleared when map setup starts or a selected network becomes ready.
|
|
113
|
+
* Selecting another network that loads successfully recovers from a network-load error.
|
|
114
|
+
* While a new network is loading, the previous error can remain; check
|
|
115
|
+
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#state) to distinguish loading from an active error.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* Read the error message when the component emits `arcgisError`.
|
|
119
|
+
* ```js
|
|
120
|
+
* const picker = document.querySelector("arcgis-utility-network-picker");
|
|
121
|
+
* picker.addEventListener("arcgisError", () => {
|
|
122
|
+
* console.error(picker.error);
|
|
123
|
+
* });
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
34
126
|
accessor error: string | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* The heading above the utility network title or selector.
|
|
129
|
+
* When not set or empty, the component uses the localized utility network label.
|
|
130
|
+
*/
|
|
35
131
|
accessor heading: string | undefined;
|
|
36
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Whether to hide error notices. Errors still update
|
|
134
|
+
* [error](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#error) and
|
|
135
|
+
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#state) and emit
|
|
136
|
+
* [@arcgisError](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#event-arcgisError).
|
|
137
|
+
*
|
|
138
|
+
* @default false
|
|
139
|
+
*/
|
|
37
140
|
accessor hideErrors: boolean;
|
|
38
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Whether to hide the loading indicator. This does not prevent the
|
|
143
|
+
* component from loading the map or the selected utility network.
|
|
144
|
+
*
|
|
145
|
+
* @default false
|
|
146
|
+
*/
|
|
39
147
|
accessor hideLoader: boolean;
|
|
40
148
|
/**
|
|
41
149
|
* Replace localized message strings with your own strings.
|
|
@@ -52,16 +160,72 @@ export abstract class ArcgisUtilityNetworkPicker extends LitElement {
|
|
|
52
160
|
} | undefined;
|
|
53
161
|
labels?: { utilityNetwork?: string | undefined; } | undefined;
|
|
54
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* The selected
|
|
165
|
+
* [UtilityNetwork](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/).
|
|
166
|
+
* Set this property to a network from the view's web map to select it programmatically.
|
|
167
|
+
* The component loads the selected network if needed.
|
|
168
|
+
*
|
|
169
|
+
* When the map's networks are loaded, the component selects the first network if
|
|
170
|
+
* this property is unset or refers to a network outside the map's collection.
|
|
171
|
+
* The same selection rule applies when the view or its map is replaced.
|
|
172
|
+
* The selection is cleared when the map has no utility networks.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* Select a network before adding the picker to the page. Here, `mapView`
|
|
176
|
+
* is a MapView backed by a WebMap containing utility networks.
|
|
177
|
+
* Replace `"your-network-id"` with the ID of a network in that map.
|
|
178
|
+
* ```js
|
|
179
|
+
* const map = mapView.map;
|
|
180
|
+
* await map.load();
|
|
181
|
+
* const network = map.utilityNetworks.find((network) => network.id === "your-network-id");
|
|
182
|
+
* if (!network) {
|
|
183
|
+
* throw new Error("The requested utility network is not in this web map.");
|
|
184
|
+
* }
|
|
185
|
+
*
|
|
186
|
+
* const picker = document.createElement("arcgis-utility-network-picker");
|
|
187
|
+
* picker.view = mapView;
|
|
188
|
+
* picker.selectedUtilityNetwork = network;
|
|
189
|
+
* document.body.append(picker);
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
55
192
|
accessor selectedUtilityNetwork: UtilityNetwork | undefined;
|
|
56
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* The current component state.
|
|
195
|
+
*
|
|
196
|
+
* - `error`: The component could not set up the map, find a utility network, or load the selected network.
|
|
197
|
+
* See [error](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#error) for details.
|
|
198
|
+
* - `loading`: The component is setting up the map or loading the selected utility network.
|
|
199
|
+
* - `ready`: Setup is complete and no loading error occurred.
|
|
200
|
+
*
|
|
201
|
+
* Selecting an unloaded network returns the component to `loading` until that
|
|
202
|
+
* network loads successfully (`ready`) or fails to load (`error`).
|
|
203
|
+
*
|
|
204
|
+
* @default "loading"
|
|
205
|
+
*/
|
|
57
206
|
accessor state: "error" | "loading" | "ready";
|
|
58
207
|
/**
|
|
59
208
|
* The view associated with the component.
|
|
60
209
|
* > **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-picker component will be associated with a map or scene component rather than using the `view` property.
|
|
61
210
|
*/
|
|
62
211
|
accessor view: MapView | undefined;
|
|
63
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* Fires when an error occurs while setting up the map or loading a utility network.
|
|
214
|
+
* Read [error](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#error) for the message and
|
|
215
|
+
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#state) for the current state.
|
|
216
|
+
* This event has no detail payload and fires even when
|
|
217
|
+
* [hideErrors](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#hideErrors) is `true`.
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```js
|
|
221
|
+
* const picker = document.querySelector("arcgis-utility-network-picker");
|
|
222
|
+
* picker.addEventListener("arcgisError", () => {
|
|
223
|
+
* console.error(picker.error);
|
|
224
|
+
* });
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
64
227
|
readonly arcgisError: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
228
|
+
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
|
|
65
229
|
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "selectedUtilityNetwork" | "state"; }>;
|
|
66
230
|
readonly "@eventTypes": {
|
|
67
231
|
arcgisError: ArcgisUtilityNetworkPicker["arcgisError"]["detail"];
|
|
@@ -57,7 +57,7 @@ class u extends n {
|
|
|
57
57
|
async #o() {
|
|
58
58
|
const { selectedUtilityNetwork: t } = this;
|
|
59
59
|
try {
|
|
60
|
-
t && !t.loaded && await t.load(), this.#i();
|
|
60
|
+
t && !t.loaded && (this.state = "loading", await t.load()), this.#i();
|
|
61
61
|
} catch (e) {
|
|
62
62
|
l(e, this, this._messages.errors.utilityNetworkLoadFailed), this.#t(this._messages.errors.utilityNetworkLoadFailed);
|
|
63
63
|
}
|
|
@@ -191,13 +191,14 @@ export abstract class ArcgisUtilityNetworkTraceAggregatedGeometryResultItem exte
|
|
|
191
191
|
/**
|
|
192
192
|
* Removes the aggregated geometry graphics from the
|
|
193
193
|
* [graphicsLayer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#graphicsLayer).
|
|
194
|
-
* If the layer was created by the component, it is also removed from the map.
|
|
194
|
+
* If the layer was created by the component, it is also removed from the map.
|
|
195
|
+
*
|
|
196
|
+
* The method also clears
|
|
197
|
+
* [traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#traceResult) and
|
|
195
198
|
* [geometryGraphics](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#geometryGraphics) and resets
|
|
196
199
|
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#state) to `"ready"`.
|
|
197
200
|
*
|
|
198
|
-
*
|
|
199
|
-
* [traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#traceResult) or emit
|
|
200
|
-
* [@arcgisResultReady](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#event-arcgisResultReady).
|
|
201
|
+
* Does not emit [@arcgisResultReady](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#event-arcgisResultReady).
|
|
201
202
|
*/
|
|
202
203
|
clearResult(): void;
|
|
203
204
|
/** Permanently destroy the component. */
|
|
@@ -44,9 +44,7 @@ class M extends G {
|
|
|
44
44
|
return !!this.traceResult?.aggregatedGeometry;
|
|
45
45
|
}
|
|
46
46
|
clearResult() {
|
|
47
|
-
|
|
48
|
-
const { graphicsLayer: e } = this;
|
|
49
|
-
e && (e.removeMany(this.geometryGraphics), e === this.#t && (this.view?.map?.remove(e), this.graphicsLayer = void 0, this.#t = void 0)), r(() => this.geometryGraphics = []), r(() => this.state = "ready");
|
|
47
|
+
r(() => this.traceResult = void 0), this.#h();
|
|
50
48
|
}
|
|
51
49
|
async destroy() {
|
|
52
50
|
try {
|
|
@@ -65,7 +63,7 @@ class M extends G {
|
|
|
65
63
|
h("warn", this, "This component must be used as a child of `arcgis-utility-network-trace-results`.");
|
|
66
64
|
return;
|
|
67
65
|
}
|
|
68
|
-
const t = (i) => this.#
|
|
66
|
+
const t = (i) => this.#c(i);
|
|
69
67
|
return e.addEventListener("arcgisPropertyChange", t), r(() => {
|
|
70
68
|
this.traceResult = e.traceResult, this.view = e.view;
|
|
71
69
|
}), () => {
|
|
@@ -78,7 +76,7 @@ class M extends G {
|
|
|
78
76
|
const t = e.get("view");
|
|
79
77
|
t?.map && this.graphicsLayer && t.map.remove(this.graphicsLayer), this.#r();
|
|
80
78
|
}
|
|
81
|
-
e.has("graphicsLayer") && this.#
|
|
79
|
+
e.has("graphicsLayer") && this.#m(e.get("graphicsLayer")), e.has("hideGraphics") && this.#p(), (e.has("graphicsColor") || e.has("selectionSize")) && this.#d();
|
|
82
80
|
}
|
|
83
81
|
loaded() {
|
|
84
82
|
this.traceResult && (this.traceResult.aggregatedGeometry || h("warn", this, c("traceResult.aggregatedGeometry")), this.view ? this.view.map || h("error", this, c("The property `view` was provided, but `view.map` is null. Cannot draw aggregated geometry.")) : h("error", this, c("view")));
|
|
@@ -89,7 +87,7 @@ class M extends G {
|
|
|
89
87
|
const e = this.geometryGraphics.filter((t) => !this.graphicsLayer.graphics.includes(t));
|
|
90
88
|
this.graphicsLayer.addMany(e);
|
|
91
89
|
}
|
|
92
|
-
#
|
|
90
|
+
#c(e) {
|
|
93
91
|
if (e.target !== this.#a)
|
|
94
92
|
return;
|
|
95
93
|
const { target: t } = e;
|
|
@@ -102,13 +100,13 @@ class M extends G {
|
|
|
102
100
|
break;
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
|
-
#
|
|
103
|
+
#l(e) {
|
|
106
104
|
const { line: t, multipoint: i, polygon: s } = e;
|
|
107
105
|
r(() => {
|
|
108
|
-
this.geometryGraphics = [t, i, s].filter((a) => a != null).map((a) => this.#
|
|
106
|
+
this.geometryGraphics = [t, i, s].filter((a) => a != null).map((a) => this.#g(a));
|
|
109
107
|
});
|
|
110
108
|
}
|
|
111
|
-
#
|
|
109
|
+
#n(e) {
|
|
112
110
|
const t = this.#s, i = e.map?.findLayerById(t);
|
|
113
111
|
return i && x(i) ? i : new u({
|
|
114
112
|
id: t,
|
|
@@ -116,7 +114,7 @@ class M extends G {
|
|
|
116
114
|
title: t
|
|
117
115
|
});
|
|
118
116
|
}
|
|
119
|
-
#
|
|
117
|
+
#g(e) {
|
|
120
118
|
return new y({
|
|
121
119
|
geometry: e,
|
|
122
120
|
symbol: this.#o(e)
|
|
@@ -149,14 +147,20 @@ class M extends G {
|
|
|
149
147
|
});
|
|
150
148
|
}
|
|
151
149
|
}
|
|
152
|
-
#
|
|
150
|
+
#p() {
|
|
153
151
|
this.hideGraphics ? (this.graphicsLayer?.removeMany(this.geometryGraphics), this.#e.value?.open && (this.#e.value.open = !1)) : this.#i();
|
|
154
152
|
}
|
|
155
|
-
#
|
|
153
|
+
#m(e) {
|
|
156
154
|
e?.removeMany(this.geometryGraphics), this.hideGraphics || this.#i();
|
|
157
155
|
}
|
|
156
|
+
#h() {
|
|
157
|
+
this.#e.value && (this.#e.value.open = !1);
|
|
158
|
+
const { graphicsLayer: e } = this;
|
|
159
|
+
e && (e.removeMany(this.geometryGraphics), e === this.#t && (this.view?.map?.remove(e), this.graphicsLayer = void 0, this.#t = void 0)), r(() => this.geometryGraphics = []), r(() => this.state = "ready");
|
|
160
|
+
}
|
|
158
161
|
#r() {
|
|
159
|
-
this
|
|
162
|
+
if (this.#h(), !this.traceResult)
|
|
163
|
+
return;
|
|
160
164
|
const e = () => {
|
|
161
165
|
r(() => this.state = "ready"), this.arcgisResultReady.emit();
|
|
162
166
|
};
|
|
@@ -164,9 +168,9 @@ class M extends G {
|
|
|
164
168
|
e();
|
|
165
169
|
return;
|
|
166
170
|
}
|
|
167
|
-
r(() => this.state = "loading"), this.#
|
|
171
|
+
r(() => this.state = "loading"), this.#l(this.traceResult.aggregatedGeometry), this.graphicsLayer || (this.graphicsLayer = this.#n(this.view), this.#t = this.graphicsLayer, g(this.view, this.graphicsLayer)), this.hideGraphics || this.#i(), e();
|
|
168
172
|
}
|
|
169
|
-
#
|
|
173
|
+
#d() {
|
|
170
174
|
this.geometryGraphics.forEach((e) => {
|
|
171
175
|
const t = e.geometry;
|
|
172
176
|
e.symbol = this.#o(t);
|
|
@@ -19,12 +19,6 @@ import type { UtilityNetworkTraceAnalysisState } from "@arcgis/core/networks/Uti
|
|
|
19
19
|
/**
|
|
20
20
|
* ## Overview
|
|
21
21
|
*
|
|
22
|
-
* > [!WARNING]
|
|
23
|
-
* > This component is the successor to the `utility-network-trace-analysis` component.
|
|
24
|
-
* > The `utility-network-trace-analysis` component is being substantially refactored to expose public trace sub-components in release 5.2 and 6.0.
|
|
25
|
-
* > To avoid destabilizing the public version of `utility-network-trace-analysis`, the refactoring work is being performed in this component.
|
|
26
|
-
* > At release, this "next" component will replace the original.
|
|
27
|
-
*
|
|
28
22
|
* The Utility Network Trace Analysis component allows users to run traces and view trace results in a utility network.
|
|
29
23
|
*
|
|
30
24
|
* - The component supports selecting a utility network and a named trace configuration in that utility network. Both the utility network and trace configuration must be [stored in the map](https://developers.arcgis.com/javascript/latest/references/core/WebMap/#utilityNetworks).
|
|
@@ -175,7 +169,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
175
169
|
* Set the default aggregated geometry graphics color to red in HTML.
|
|
176
170
|
* ```html
|
|
177
171
|
* <arcgis-map item-id="967a4180aa6c46b68996ea9406e8a606">
|
|
178
|
-
* <arcgis-utility-network-trace-analysis slot="bottom-left" aggregated-geometry-graphics-color="red">
|
|
172
|
+
* <arcgis-utility-network-trace-analysis slot="bottom-left" aggregated-geometry-results-graphics-color="red">
|
|
179
173
|
* </arcgis-utility-network-trace-analysis>
|
|
180
174
|
* </arcgis-map>
|
|
181
175
|
* ```
|