@arcgis/map-components 5.2.0-next.160 → 5.2.0-next.161

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.
@@ -0,0 +1,72 @@
1
+ import type Geometry from "@arcgis/core/geometry/Geometry.js";
2
+ import type FloorFilterViewModel from "@arcgis/core/widgets/FloorFilter/FloorFilterViewModel.js";
3
+ import type WebMap from "@arcgis/core/WebMap.js";
4
+ import type WebScene from "@arcgis/core/WebScene.js";
5
+
6
+ export interface IFloorFilterViewModel extends FloorFilterViewModel {
7
+ filterFacilities: (facilities: Facility[]) => Facility[];
8
+ filterFeatures: FilterFeatures;
9
+ filterMenuOpen: boolean;
10
+ filterMenuType: FilterMenuType;
11
+ filterMode: FilterMode;
12
+ filterSites: (sites: Site[]) => Site[];
13
+ getBaseLevel?: (facility: Facility | null | undefined) => Level | null;
14
+ getFacility?: (facilityId: null | undefined | string) => Facility | null;
15
+ getFacilityLevels: (facilityId: null | undefined | string) => Level[];
16
+ getLevel?: (levelId: null | undefined | string) => Level | null;
17
+ getSite: (siteId: null | undefined | string) => null | undefined | Site;
18
+ goTo: (feature: Facility | null | undefined | Site) => void;
19
+ hasMultipleSites: boolean;
20
+ isNormalMode: boolean;
21
+ levelsExpanded: boolean;
22
+ searchTerm: null | undefined | string;
23
+ setFloors: (level: Level | null | undefined) => void;
24
+ state: FloorFilterState;
25
+ updateWebDocument: (document: WebMap | WebScene) => void;
26
+ }
27
+
28
+ export type FilterMenuType = "facility" | "site";
29
+
30
+ export type FilterMode = "base-floors" | "single-floor";
31
+
32
+ export type FloorFilterState = "disabled" | "loading" | "ready";
33
+
34
+ export interface FilterFeatures {
35
+ sites: Sites;
36
+ facilities: Facilities;
37
+ levels: Levels;
38
+ }
39
+
40
+ export interface Sites {
41
+ sitesInfo: Site[];
42
+ }
43
+
44
+ export interface Facilities {
45
+ facilitiesInfo: Facility[];
46
+ }
47
+
48
+ export interface Levels {
49
+ levelsInfo: Level[];
50
+ }
51
+
52
+ export interface Site {
53
+ id: string;
54
+ name: string;
55
+ geometry: Geometry;
56
+ }
57
+
58
+ export interface Facility {
59
+ id: string;
60
+ siteId: null | undefined | string;
61
+ name: string;
62
+ geometry: Geometry;
63
+ }
64
+
65
+ export interface Level {
66
+ id: string;
67
+ facilityId: string;
68
+ longName: null | undefined | string;
69
+ shortName: null | undefined | string;
70
+ levelNumber: null | undefined | number;
71
+ verticalOrder: null | undefined | number;
72
+ }
@@ -358,7 +358,6 @@ export abstract class ArcgisSearch extends LitElement {
358
358
  * **Note:** Feature layers created from client-side graphics are not supported.
359
359
  *
360
360
  * @example
361
- * // Default sources[] when sources is not specified
362
361
  * const search = document.querySelector("arcgis-search");
363
362
  * await search.componentOnReady();
364
363
  * // set the search sources once the component is ready
@@ -369,7 +368,7 @@ export abstract class ArcgisSearch extends LitElement {
369
368
  * apiKey: "YOUR_ACCESS_TOKEN",
370
369
  * outFields: ["Addr_type"],
371
370
  * name: "ArcGIS World Geocoding Service",
372
- * placeholder: "Adresse",
371
+ * placeholder: "Address",
373
372
  * resultSymbol: {
374
373
  * type: "picture-marker", // autocasts as new PictureMarkerSymbol()
375
374
  * url: this.basePath + "/images/search/search-symbol-32.png",
@@ -235,7 +235,7 @@ class k extends x {
235
235
  this.itemWithOpenMenu = e;
236
236
  }}>${o("action", a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu ?? ""}></calcite-action>`)}${// Only render menu-items for open menu(s) to reduce
237
237
  // the total number of list item elements in the DOM at any time.
238
- s ? o("dropdown-group", a`<calcite-dropdown-group selection-mode=none>${this.hideZoomToButton ? void 0 : o("zoom-to", a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${() => this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`)}${o("select-single", a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${() => this.selectItem(e)}>${i ? t.onlySelectFeature : t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection", a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${() => this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map((d) => {
238
+ s ? o("dropdown-group", a`<calcite-dropdown-group selection-mode=none>${!this.hideZoomToButton && !e.isTable ? o("zoom-to", a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${() => this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`) : void 0}${o("select-single", a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${() => this.selectItem(e)}>${i ? t.onlySelectFeature : t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection", a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${() => this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map((d) => {
239
239
  const { disabled: n, label: m } = d;
240
240
  if (this._isDropdownItemVisible(e, d))
241
241
  return o(`custom-action-${m}`, a`<calcite-dropdown-item .disabled=${typeof n == "function" ? n({ item: e }) : !!n} .iconStart=${d.icon ?? void 0} @calciteDropdownItemSelect=${() => d.callback({ item: e })}>${m}</calcite-dropdown-item>`);
@@ -9,9 +9,62 @@ import type { UtilityNetworkTraceResultItemState } from "../arcgis-utility-netwo
9
9
  import type { T9nMeta } from "@arcgis/lumina/controllers";
10
10
 
11
11
  /**
12
- * Trace result item for displaying [aggregated geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceResult/#aggregatedGeometry) results from a trace.
12
+ * The Utility Network Trace Aggregated Geometry Result Item component displays the
13
+ * [aggregated geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceResult/#aggregatedGeometry)
14
+ * returned by a utility network trace. It creates graphics for the result's line, multipoint, and polygon geometries
15
+ * and displays them in the view. Provides options to show or hide the graphics, change their color and size.
16
+ *
17
+ * Add this component directly to the default slot of [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/).
18
+ * The parent supplies the required read-only properties for the
19
+ * [trace result](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#traceResult) and
20
+ * [MapView](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#view).
21
+ *
22
+ * By default, the [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/) component displays the
23
+ * [aggregated geometry](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/),
24
+ * [elements](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/), and
25
+ * [functions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-functions-result-item/) result items for the result types
26
+ * returned by the trace. Adding content to its default slot replaces all default result items. Add each result item
27
+ * that the custom configuration should display.
28
+ *
29
+ * By default, the component creates and manages a graphics layer. Set
30
+ * [graphicsLayer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#graphicsLayer) to render the
31
+ * aggregated geometry graphics in an existing layer instead.
13
32
  *
14
33
  * @since 5.2
34
+ * @example
35
+ * The following example displays aggregated geometry in a custom set of trace result items.
36
+ * Providing result items in the default slot replaces the parent's default result items.
37
+ * This example displays only aggregated geometry results.
38
+ * ```html
39
+ * <arcgis-map item-id="471eb0bf37074b1fbb972b1da70fb310">
40
+ * <arcgis-utility-network-trace-analysis slot="bottom-left">
41
+ * <arcgis-utility-network-trace-results slot="results">
42
+ * <arcgis-utility-network-trace-aggregated-geometry-result-item>
43
+ * </arcgis-utility-network-trace-aggregated-geometry-result-item>
44
+ * </arcgis-utility-network-trace-results>
45
+ * </arcgis-utility-network-trace-analysis>
46
+ * </arcgis-map>
47
+ * ```
48
+ * @example
49
+ * Customize the color and size of the aggregated geometry graphics. Setting `hide-graphics` initially hides the
50
+ * graphics from the map. Users can show them with the component's toggle.
51
+ * ```html
52
+ * <arcgis-map item-id="471eb0bf37074b1fbb972b1da70fb310">
53
+ * <arcgis-utility-network-trace-analysis slot="bottom-left">
54
+ * <arcgis-utility-network-trace-results slot="results">
55
+ * <arcgis-utility-network-trace-aggregated-geometry-result-item
56
+ * graphics-color="rgba(0, 122, 194, 0.6)"
57
+ * selection-size="8"
58
+ * hide-graphics
59
+ * ></arcgis-utility-network-trace-aggregated-geometry-result-item>
60
+ * </arcgis-utility-network-trace-results>
61
+ * </arcgis-utility-network-trace-analysis>
62
+ * </arcgis-map>
63
+ * ```
64
+ * @see [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/)
65
+ * @see [arcgis-utility-network-trace-analysis](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/)
66
+ * @see [arcgis-utility-network-trace-elements-result-item](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/)
67
+ * @see [arcgis-utility-network-trace-functions-result-item](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-functions-result-item/)
15
68
  * @see [Result types](https://doc.esri.com/en/arcgis-pro/latest/help/data/utility-network/configure-a-trace.html#DA5)
16
69
  */
17
70
  export abstract class ArcgisUtilityNetworkTraceAggregatedGeometryResultItem extends LitElement {
@@ -57,23 +110,39 @@ export abstract class ArcgisUtilityNetworkTraceAggregatedGeometryResultItem exte
57
110
  * @default false
58
111
  */
59
112
  get emitsArcgisResultReady(): true;
60
- /** The graphics which represent the aggregated geometry results from the trace. */
113
+ /**
114
+ * The graphics created from the line, multipoint, and polygon geometries in the aggregated geometry result.
115
+ *
116
+ * Read this property after
117
+ * [@arcgisResultReady](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#event-arcgisResultReady) fires.
118
+ */
61
119
  get geometryGraphics(): Graphic[];
62
120
  /**
63
- * The color used for the aggregated geometry graphics.
64
- * Default value is #FFFF00.
121
+ * The color of the aggregated geometry graphics.
122
+ * The default is yellow with 0.6 opacity.
123
+ *
124
+ * @see [Color constructor](https://developers.arcgis.com/javascript/latest/references/core/Color/#constructors-summary)
65
125
  */
66
126
  accessor graphicsColor: Color;
67
127
  /**
68
- * The layer used to render the graphics which represent the aggregated geometry result.
69
- * If this property is not specified, a new layer will be created on the map.
128
+ * The layer used to render the aggregated geometry graphics.
129
+ *
130
+ * When the result is cleared or the component is destroyed:
131
+ *
132
+ * - If the layer is provided by the application, the component removes only the aggregated geometry graphics it
133
+ * created. The layer and any other graphics remain unchanged.
134
+ * - If no layer is provided, the component creates and manages a layer. It removes the aggregated geometry graphics
135
+ * and the component-owned layer from the map.
70
136
  */
71
137
  accessor graphicsLayer: GraphicsLayer | undefined;
72
- /** The heading of the result item. */
138
+ /** The heading displayed above the aggregated geometry controls. */
73
139
  accessor heading: string | undefined;
74
140
  /**
75
- * Whether to hide the aggregated geometry [graphics](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#geometryGraphics)
76
- * from the map when the trace result contains aggregated geometry results.
141
+ * Whether to hide the aggregated geometry graphics from the map.
142
+ *
143
+ * When true, the graphics remain available through
144
+ * [geometryGraphics](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#geometryGraphics) but are removed
145
+ * from the [graphicsLayer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#graphicsLayer).
77
146
  *
78
147
  * @default false
79
148
  */
@@ -92,28 +161,36 @@ export abstract class ArcgisUtilityNetworkTraceAggregatedGeometryResultItem exte
92
161
  showGraphics?: string | undefined;
93
162
  };
94
163
  /**
95
- * The size of the aggregated geometry graphics to render, in points.
164
+ * The marker size and line or polygon-outline width of the aggregated geometry graphics, in points.
165
+ * The default is 12.
96
166
  *
97
167
  * @default 12
98
168
  */
99
169
  accessor selectionSize: number;
100
170
  /**
101
- * Whether the component has finished adding aggregated geometry graphics to the map.
171
+ * The processing state of the aggregated geometry result item: `"loading"` while processing a trace result and
172
+ * `"ready"` when no processing is in progress.
102
173
  *
103
174
  * @default "ready"
104
175
  */
105
176
  get state(): UtilityNetworkTraceResultItemState;
106
- /** The trace result containing the aggregated geometry result to render graphics for. */
177
+ /** The trace result containing the aggregated geometry to display. */
107
178
  get traceResult(): TraceResult | undefined;
108
179
  /**
109
- * The view associated with the component.
110
- * > **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-aggregated-geometry-result-item component will be associated with a map or scene component rather than using the `view` property.
180
+ * The MapView supplied by the parent [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/) component.
181
+ * Used to display the aggregated geometry graphics.
111
182
  */
112
183
  get view(): MapView | undefined;
113
184
  /**
114
185
  * Removes the aggregated geometry graphics from the
115
186
  * [graphicsLayer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#graphicsLayer).
116
- * If the layer was created by the component, it is also removed from the map.
187
+ * If the layer was created by the component, it is also removed from the map. The method clears
188
+ * [geometryGraphics](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#geometryGraphics) and resets
189
+ * [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#state) to `"ready"`.
190
+ *
191
+ * This method does not clear the parent-provided
192
+ * [traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#traceResult) or emit
193
+ * [@arcgisResultReady](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#event-arcgisResultReady).
117
194
  */
118
195
  clearResult(): void;
119
196
  /** Permanently destroy the component. */
@@ -121,13 +198,16 @@ export abstract class ArcgisUtilityNetworkTraceAggregatedGeometryResultItem exte
121
198
  /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
122
199
  readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "hideGraphics" | "geometryGraphics" | "graphicsColor" | "selectionSize" | "state"; }>;
123
200
  /**
124
- * Fires when the component finishes processing the aggregated geometry results.
201
+ * Fires when the component finishes processing the current trace result.
125
202
  *
126
- * If the component has a valid trace result with aggregated geometry results, this fires
127
- * when the aggregated geometry graphics have been added to the map.
203
+ * For a result with aggregated geometry, the event fires after the graphics are created and, unless
204
+ * [hideGraphics](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#hideGraphics) is `true`, added to
205
+ * the map. The event also fires when processing completes without graphics because the result, aggregated geometry,
206
+ * or map view is unavailable.
128
207
  *
129
- * If the component does not have a valid map or trace result, this fires when the
130
- * component has finished loading.
208
+ * Clearing a result with
209
+ * [clearResult()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#clearResult) does not emit this
210
+ * event.
131
211
  */
132
212
  readonly arcgisResultReady: import("@arcgis/lumina").TargetedEvent<this, void>;
133
213
  readonly "@eventTypes": {
@@ -93,7 +93,6 @@ import type { UtilityNetworkTraceAnalysisState } from "@arcgis/core/networks/Uti
93
93
  * @slot
94
94
  * [results] - Slot for instances of [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/),
95
95
  * for displaying the results of one or more traces.
96
- * @internal
97
96
  * @since 5.0
98
97
  */
99
98
  export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
@@ -12,10 +12,69 @@ import type { UtilityNetworkTraceResultItemState } from "../arcgis-utility-netwo
12
12
  import type { T9nMeta } from "@arcgis/lumina/controllers";
13
13
 
14
14
  /**
15
- * Trace result item for displaying [element](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceResult/#elements) results from a trace.
15
+ * The Utility Network Trace Elements Result Item component displays features corresponding to the
16
+ * [elements](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceResult/#elements)
17
+ * returned by a utility network trace. It queries utility network layers for features, highlights trace elements
18
+ * in the view, and uses [arcgis-features-next](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) to display the queried features in a list.
19
+ *
20
+ * For traces containing only element results, the features list opens automatically. For traces containing multiple
21
+ * result types, users open the features list by selecting the elements result item in the trace results component.
22
+ * See [isFeaturesListShown](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#isFeaturesListShown) for details.
23
+ *
24
+ * Add this component directly to the default slot of [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/).
25
+ * The parent supplies the required read-only properties for the
26
+ * [trace result](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#traceResult),
27
+ * [utility network](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#utilityNetwork), and
28
+ * [MapView](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#view).
29
+ * Configure other settings, such as [layers](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#layers),
30
+ * [disableHighlight](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#disableHighlight), and
31
+ * [hideFeatureResults](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#hideFeatureResults), on this component.
32
+ *
33
+ * By default, the [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/) component displays the
34
+ * [aggregated geometry](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/),
35
+ * [elements](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/), and
36
+ * [functions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-functions-result-item/) result items for the result types
37
+ * returned by the trace. Adding content to its default slot replaces all default result items. Add each result item
38
+ * that the custom configuration should display.
39
+ *
40
+ * Use [layers](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#layers) to restrict feature queries to
41
+ * specific utility network layers.
16
42
  *
17
43
  * @since 5.2
44
+ * @example
45
+ * The following example displays element results in a custom set of trace result items.
46
+ * Providing result items in the default slot replaces the parent's default result items.
47
+ * This example displays only element results.
48
+ * ```html
49
+ * <arcgis-map item-id="471eb0bf37074b1fbb972b1da70fb310">
50
+ * <arcgis-utility-network-trace-analysis slot="bottom-left">
51
+ * <arcgis-utility-network-trace-results slot="results">
52
+ * <arcgis-utility-network-trace-elements-result-item></arcgis-utility-network-trace-elements-result-item>
53
+ * </arcgis-utility-network-trace-results>
54
+ * </arcgis-utility-network-trace-analysis>
55
+ * </arcgis-map>
56
+ * ```
57
+ * @example
58
+ * Using the markup above, register these listeners before running a trace to access the queried features
59
+ * when the elements result item is ready and respond when the selected result feature changes.
60
+ * ```js
61
+ * const resultItem = document.querySelector("arcgis-utility-network-trace-elements-result-item");
62
+ *
63
+ * resultItem.addEventListener("arcgisResultReady", () => {
64
+ * console.log("Trace result features:", resultItem.features);
65
+ * });
66
+ *
67
+ * resultItem.addEventListener("arcgisPropertyChange", (event) => {
68
+ * if (event.detail.name === "selectedResultFeature") {
69
+ * console.log("Selected feature:", resultItem.selectedResultFeature);
70
+ * }
71
+ * });
72
+ * ```
18
73
  * @see [Result types](https://doc.esri.com/en/arcgis-pro/latest/help/data/utility-network/configure-a-trace.html#DA5)
74
+ * @see [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/)
75
+ * @see [arcgis-utility-network-trace-analysis](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/)
76
+ * @see [arcgis-utility-network-trace-aggregated-geometry-result-item](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/)
77
+ * @see [arcgis-utility-network-trace-functions-result-item](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-functions-result-item/)
19
78
  */
20
79
  export abstract class ArcgisUtilityNetworkTraceElementsResultItem extends LitElement {
21
80
  /** @internal */
@@ -71,28 +130,36 @@ export abstract class ArcgisUtilityNetworkTraceElementsResultItem extends LitEle
71
130
  * @default false
72
131
  */
73
132
  get emitsArcgisResultReady(): true;
74
- /** The features corresponding to the trace result elements. */
133
+ /**
134
+ * The features successfully queried for the current trace result elements.
135
+ * Elements without a matching query layer are not included.
136
+ */
75
137
  get features(): Graphic[];
76
- /** The heading of the result item. */
138
+ /**
139
+ * The label of the elements result item that opens the features list.
140
+ * If not specified or empty, the component uses its localized default label.
141
+ */
77
142
  accessor heading: string | undefined;
78
143
  /**
79
- * Indicates whether to hide the action bar that holds the feature's
80
- * [actions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#actions)
81
- * when selecting trace locations and viewing trace result features.
144
+ * Whether to hide the action bar when viewing trace result features.
145
+ * The action bar contains the feature's [actions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#actions).
82
146
  *
83
147
  * @default false
84
148
  */
85
149
  accessor hideActionBar: boolean;
86
150
  /**
87
- * Whether to hide feature results.
88
- * If true, the component renders a placeholder string instead of a button to view features.
151
+ * Whether to hide the elements result item and the features list.
152
+ * If true, the component renders a placeholder string instead of the elements result item.
89
153
  * When true, features are still queried and are available through [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#features).
90
154
  *
155
+ * This property does not disable highlighting. Use
156
+ * [disableHighlight](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#disableHighlight) to hide trace-element highlights.
157
+ *
91
158
  * @default false
92
159
  */
93
160
  accessor hideFeatureResults: boolean;
94
161
  /**
95
- * Whether to hide the placeholder string when feature results are hidden.
162
+ * Whether to hide the placeholder string when the elements result item and the features list are hidden.
96
163
  *
97
164
  * When this property and [hideFeatureResults](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#hideFeatureResults) are both set to `true`,
98
165
  * nothing is rendered for trace result elements. However, features are still queried and are available through
@@ -102,30 +169,34 @@ export abstract class ArcgisUtilityNetworkTraceElementsResultItem extends LitEle
102
169
  */
103
170
  accessor hidePlaceholder: boolean;
104
171
  /**
105
- * Indicates whether default actions are disabled (hidden) when viewing trace result features.
106
- * This property must be set to `true` to disable default actions.
172
+ * Whether to hide the default actions when viewing trace result features.
107
173
  *
108
174
  * @default false
109
175
  */
110
176
  accessor includeDefaultActionsDisabled: boolean;
111
177
  /**
112
- * Whether the list of feature results is being viewed.
113
- * When true, the component renders the trace result features as a list in the [arcgis-features-next](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) component.
178
+ * Whether the features list is currently displayed.
179
+ * Returns `true` when the component is displaying the features list using the [arcgis-features-next](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) component.
114
180
  *
115
- * This property is always false when [hideFeatureResults](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#hideFeatureResults) is true.
181
+ * Always returns `false` when [hideFeatureResults](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#hideFeatureResults) is set to `true`.
116
182
  *
117
- * If [hideFeatureResults](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#hideFeatureResults) is not set, the list opens automatically when
183
+ * If [hideFeatureResults](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#hideFeatureResults) is not set, the features list opens automatically when
118
184
  * a trace result containing only [elements](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceResult/#elements) loads,
119
- * or when the user chooses to view Feature results. Closing the list sets this property to false.
185
+ * or when the user selects the [elements result item](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/). Closing the features list causes this property to return `false`.
120
186
  *
121
187
  * @default false
122
188
  */
123
189
  get isFeaturesListShown(): boolean;
124
190
  /**
125
- * The utility network layers used to query trace result features.
191
+ * The utility network layers and tables used to query trace result features.
192
+ *
193
+ * When the array is empty, the component uses the map's layers and tables that belong to
194
+ * the selected [utilityNetwork](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#utilityNetwork).
195
+ * Entries that do not belong to that utility network are ignored.
126
196
  *
127
- * If none are provided, the component uses all layers in the map belonging to
128
- * the specified [utilityNetwork](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#utilityNetwork).
197
+ * Set this property before the trace result is processed. Changing it does not requery the current result.
198
+ *
199
+ * This property restricts which layers are queried for features. It does not restrict highlighting of trace result features.
129
200
  */
130
201
  accessor layers: Layer[];
131
202
  /**
@@ -139,14 +210,19 @@ export abstract class ArcgisUtilityNetworkTraceElementsResultItem extends LitEle
139
210
  resultFeaturesAreHidden?: string | undefined;
140
211
  };
141
212
  /**
142
- * The number of unique network element results,
143
- * including elements that did not match any layer in the map.
213
+ * The number of successfully queried features plus unique trace elements without a matching query layer.
214
+ *
215
+ * This value can be lower than the number of elements returned by the trace. For example:
216
+ * - Trace result elements that only differ by a terminal ID are treated as one feature.
217
+ * - Feature queries may fail or return no matching features.
144
218
  */
145
219
  get numResults(): number;
146
220
  /**
147
- * 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.
221
+ * The reference element, or its ID, forwarded to the embedded
222
+ * [Features component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#referenceElement).
148
223
  *
149
- * @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)
224
+ * Setting this property does not remove the requirement to use this component as a child of
225
+ * [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/).
150
226
  */
151
227
  accessor referenceElement: ArcgisReferenceElement | string | undefined;
152
228
  /**
@@ -158,7 +234,8 @@ export abstract class ArcgisUtilityNetworkTraceElementsResultItem extends LitEle
158
234
  */
159
235
  get selectedResultFeature(): Graphic | undefined;
160
236
  /**
161
- * Whether the component has finished querying trace result features.
237
+ * The processing state of the elements result item: `"loading"` while processing a trace result and `"ready"` when no
238
+ * processing is in progress. A `"ready"` state does not necessarily mean that every feature query succeeded.
162
239
  *
163
240
  * @default "ready"
164
241
  */
@@ -168,20 +245,31 @@ export abstract class ArcgisUtilityNetworkTraceElementsResultItem extends LitEle
168
245
  /** The utility network used to query the trace result features. */
169
246
  get utilityNetwork(): UtilityNetwork | undefined;
170
247
  /**
171
- * The view associated with the component.
172
- * > **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-elements-result-item component will be associated with a map or scene component rather than using the `view` property.
248
+ * The MapView supplied by the parent [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/) component.
249
+ * Used to query utility network layers and highlight trace elements.
173
250
  */
174
251
  get view(): MapView | undefined;
175
252
  /**
176
- * Cancels any feature queries in progress, removes feature highlights from the map,
177
- * and clears [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#features).
253
+ * Cancels feature queries in progress, removes trace-element highlights from the map,
254
+ * clears [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#features), closes the features list,
255
+ * and resets [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#state) to `"ready"`.
256
+ *
257
+ * Does not clear the parent-provided [traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#traceResult)
258
+ * or emit [@arcgisResultReady](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#event-arcgisResultReady).
178
259
  */
179
260
  clearResult(): void;
180
261
  /** Permanently destroy the component. */
181
262
  destroy(): Promise<void>;
182
263
  /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
183
264
  readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "features" | "isFeaturesListShown" | "selectedResultFeature" | "state"; }>;
184
- /** Fires when the component finishes querying all features for the trace result elements. */
265
+ /**
266
+ * Fires when processing the current trace result finishes, including when a query fails.
267
+ * The [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#features) property contains the features
268
+ * successfully queried.
269
+ *
270
+ * Clearing an in-progress result with
271
+ * [clearResult()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-elements-result-item/#clearResult) does not emit this event.
272
+ */
185
273
  readonly arcgisResultReady: import("@arcgis/lumina").TargetedEvent<this, void>;
186
274
  /** Emitted when an action is triggered on the component. */
187
275
  readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this, ActionEvent>;
@@ -2,10 +2,10 @@
2
2
  import { c as F } from "../../chunks/runtime.js";
3
3
  import { ref as E } from "lit/directives/ref.js";
4
4
  import { getOrCreateMapValue as v } from "@arcgis/core/applications/Components/featureUtils.js";
5
- import { LitElement as L, createEvent as f } from "@arcgis/lumina";
5
+ import { LitElement as L, createEvent as y } from "@arcgis/lumina";
6
6
  import { usePropertyChange as T, bypassReadOnly as o } from "@arcgis/lumina/controllers";
7
7
  import { log as d, composeMissingPropertyMessage as m } from "@arcgis/toolkit/log";
8
- import { css as k, html as y } from "lit";
8
+ import { css as k, html as f } from "lit";
9
9
  import { u as I } from "../../chunks/useT9n.js";
10
10
  import { i as g, l as p, t as c, c as A } from "../../chunks/async-utils.js";
11
11
  import { c as S, q as P, d as w, e as $ } from "../../chunks/layer-utils.js";
@@ -13,7 +13,7 @@ import { i as R } from "../../chunks/utils5.js";
13
13
  const C = k`arcgis-features-next{height:100%}.elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm)}.features-hidden{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size);overflow-wrap:anywhere}`;
14
14
  class D extends L {
15
15
  constructor() {
16
- super(...arguments), this._messages = I({ blocking: !0 }), this.#n = !0, this.#i = [], this.#t = [], this.#r = /* @__PURE__ */ new Map(), this.#a = /* @__PURE__ */ new Map(), this.#h = !1, this.#l = /* @__PURE__ */ new Map(), this.#o = /* @__PURE__ */ new Map(), this.#e = [], this._isFeaturesSelected = !1, this.autoDestroyDisabled = !1, this.disableHighlight = !1, this.emitsArcgisResultReady = !0, this.features = [], this.hideActionBar = !1, this.hideFeatureResults = !1, this.hidePlaceholder = !1, this.includeDefaultActionsDisabled = !1, this.layers = [], this.state = "ready", this.arcgisPropertyChange = T()("features", "isFeaturesListShown", "selectedResultFeature", "state"), this.arcgisResultReady = f(), this.arcgisTriggerAction = f();
16
+ super(...arguments), this._messages = I({ blocking: !0 }), this.#n = !0, this.#i = [], this.#t = [], this.#r = /* @__PURE__ */ new Map(), this.#a = /* @__PURE__ */ new Map(), this.#h = !1, this.#l = /* @__PURE__ */ new Map(), this.#o = /* @__PURE__ */ new Map(), this.#e = [], this._isFeaturesSelected = !1, this.autoDestroyDisabled = !1, this.disableHighlight = !1, this.emitsArcgisResultReady = !0, this.features = [], this.hideActionBar = !1, this.hideFeatureResults = !1, this.hidePlaceholder = !1, this.includeDefaultActionsDisabled = !1, this.layers = [], this.state = "ready", this.arcgisPropertyChange = T()("features", "isFeaturesListShown", "selectedResultFeature", "state"), this.arcgisResultReady = y(), this.arcgisTriggerAction = y();
17
17
  }
18
18
  static {
19
19
  this.properties = { _featuresComponentElement: 16, _isFeaturesSelected: 16, actions: 0, autoDestroyDisabled: 5, disableHighlight: 5, emitsArcgisResultReady: 32, features: 32, heading: 1, hideActionBar: 5, hideFeatureResults: 5, hidePlaceholder: 5, includeDefaultActionsDisabled: 5, isFeaturesListShown: 32, layers: 0, messageOverrides: 0, numResults: 32, referenceElement: 1, selectedResultFeature: 32, state: 32, traceResult: 32, utilityNetwork: 32, view: 32 };
@@ -23,7 +23,7 @@ class D extends L {
23
23
  }
24
24
  #n;
25
25
  #i;
26
- get #y() {
26
+ get #f() {
27
27
  if (!this.traceResult)
28
28
  return !1;
29
29
  const { elements: e, globalFunctionResults: t, aggregatedGeometry: s } = this.traceResult;
@@ -67,7 +67,7 @@ class D extends L {
67
67
  d("warn", this, "This component must be used as a child of `arcgis-utility-network-trace-results`.");
68
68
  return;
69
69
  }
70
- const t = (s) => this.#f(s);
70
+ const t = (s) => this.#y(s);
71
71
  return e.addEventListener("arcgisPropertyChange", t), o(() => {
72
72
  this.traceResult = e.traceResult, this.utilityNetwork = e.utilityNetwork, this.view = e.view;
73
73
  }), () => {
@@ -83,7 +83,7 @@ class D extends L {
83
83
  loaded() {
84
84
  this.traceResult && (this.traceResult.elements || d("error", this, m("traceResult.elements")), this.utilityNetwork || d("error", this, m("utilityNetwork")));
85
85
  }
86
- #f(e) {
86
+ #y(e) {
87
87
  if (e.target !== this.#c)
88
88
  return;
89
89
  const { target: t } = e;
@@ -153,7 +153,7 @@ class D extends L {
153
153
  }
154
154
  }
155
155
  async #d() {
156
- this.clearResult(), this._isFeaturesSelected = this.#y;
156
+ this.clearResult(), this._isFeaturesSelected = this.#f;
157
157
  const e = () => {
158
158
  o(() => this.state = "ready"), this.arcgisResultReady.emit();
159
159
  }, t = A(async (s) => {
@@ -215,14 +215,14 @@ class D extends L {
215
215
  e.stopPropagation(), this.arcgisTriggerAction.emit(e.detail);
216
216
  }
217
217
  #k() {
218
- return y`<div class="features-hidden">${this._messages.resultFeaturesAreHidden}</div>`;
218
+ return f`<div class="features-hidden">${this._messages.resultFeaturesAreHidden}</div>`;
219
219
  }
220
220
  #I() {
221
221
  const { heading: e, _messages: t } = this;
222
- return y`<calcite-list .label=${t.headings.features}><calcite-list-item class="elements-list-item" .label=${e || t.headings.features} @calciteListItemSelect=${() => this._isFeaturesSelected = !0}><calcite-chip .label=${t.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`;
222
+ return f`<calcite-list .label=${t.headings.features}><calcite-list-item class="elements-list-item" .label=${e || t.headings.features} @calciteListItemSelect=${() => this._isFeaturesSelected = !0}><calcite-chip .label=${t.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon flip-rtl icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`;
223
223
  }
224
224
  render() {
225
- return !this.traceResult?.elements.length || this.manager.destroyed ? null : this.hideFeatureResults ? this.hidePlaceholder ? null : this.#k() : this.isFeaturesListShown ? y`<arcgis-features-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#n} .features=${this.features} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} initial-display-mode=list .messageOverrides=${this.messageOverrides} open .referenceElement=${this.referenceElement} .view=${this.view} @arcgisClose=${() => this._isFeaturesSelected = !1} @arcgisPropertyChange=${this.#L} @arcgisTriggerAction=${this.#T} ${E(this.#g)}></arcgis-features-next>` : this.#I();
225
+ return !this.traceResult?.elements.length || this.manager.destroyed ? null : this.hideFeatureResults ? this.hidePlaceholder ? null : this.#k() : this.isFeaturesListShown ? f`<arcgis-features-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#n} .features=${this.features} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} initial-display-mode=list .messageOverrides=${this.messageOverrides} open .referenceElement=${this.referenceElement} .view=${this.view} @arcgisClose=${() => this._isFeaturesSelected = !1} @arcgisPropertyChange=${this.#L} @arcgisTriggerAction=${this.#T} ${E(this.#g)}></arcgis-features-next>` : this.#I();
226
226
  }
227
227
  }
228
228
  F("arcgis-utility-network-trace-elements-result-item", D);