@arcgis/map-components 5.2.0-next.162 → 5.2.0-next.164
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/{4KEMJ2WV.js → 4TFO5B3N.js} +1 -1
- package/dist/cdn/67UW6MJM.js +2 -0
- package/dist/cdn/{G3DWZLJP.js → 7XO4NAD5.js} +1 -1
- package/dist/cdn/{VF23MMWZ.js → AALEZAW5.js} +1 -1
- package/dist/cdn/RV2FLHPM.js +2 -0
- package/dist/cdn/WEY7JGX2.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-daylight/customElement.js +2 -1
- package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
- package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +14 -15
- package/dist/components/arcgis-search/customElement.d.ts +12 -0
- package/dist/components/arcgis-search/customElement.js +3 -0
- package/dist/components/arcgis-sketch/customElement.d.ts +308 -30
- package/dist/components/arcgis-sketch/customElement.js +48 -21
- package/dist/components/arcgis-time-bar/customElement.d.ts +484 -409
- package/dist/components/arcgis-time-bar/types.d.ts +36 -15
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
- package/dist/components/arcgis-time-slider/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +42 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +20 -17
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -70
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -2
- 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/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/package.json +6 -6
- package/dist/cdn/7PMSUAOO.js +0 -2
- package/dist/cdn/K664I5PA.js +0 -2
- package/dist/cdn/S3LQLHD6.js +0 -2
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
|
@@ -152,6 +152,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
152
152
|
*
|
|
153
153
|
* The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/). The [@arcgisTriggerAction](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/#event-arcgisTriggerAction) event fires each time an action is clicked.
|
|
154
154
|
*
|
|
155
|
+
* @since 5.2
|
|
155
156
|
* @see [@arcgisTriggerAction](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/#event-arcgisTriggerAction)
|
|
156
157
|
* @see [Popup actions sample](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
|
|
157
158
|
*/
|
|
@@ -178,6 +179,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
178
179
|
* </arcgis-utility-network-trace-analysis>
|
|
179
180
|
* </arcgis-map>
|
|
180
181
|
* ```
|
|
182
|
+
* @since 5.2
|
|
181
183
|
* @see [Color constructor](https://developers.arcgis.com/javascript/latest/references/core/Color/#constructors-summary)
|
|
182
184
|
*/
|
|
183
185
|
accessor aggregatedGeometryResultsGraphicsColor: Color;
|
|
@@ -257,6 +259,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
257
259
|
* and viewing trace result features.
|
|
258
260
|
*
|
|
259
261
|
* @default false
|
|
262
|
+
* @since 5.2
|
|
260
263
|
*/
|
|
261
264
|
accessor hideActionBar: boolean;
|
|
262
265
|
/**
|
|
@@ -264,6 +267,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
264
267
|
* which include [elements](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceResult/#elements).
|
|
265
268
|
*
|
|
266
269
|
* @default false
|
|
270
|
+
* @since 5.2
|
|
267
271
|
*/
|
|
268
272
|
accessor hideClearResultsCount: boolean;
|
|
269
273
|
/**
|
|
@@ -271,7 +275,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
271
275
|
*
|
|
272
276
|
* If true, when features are returned by a trace, they will not be visible in the results tab.
|
|
273
277
|
* A message will be displayed in its place indicating that features were returned by the trace, but are not visible in the results pane.
|
|
274
|
-
* This string can be overridden with the
|
|
278
|
+
* This string can be overridden with the [messageOverrides](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/#messageOverrides) property.
|
|
275
279
|
*
|
|
276
280
|
* @default false
|
|
277
281
|
* @example
|
|
@@ -295,6 +299,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
295
299
|
* from the map when the trace result contains aggregated geometry results.
|
|
296
300
|
*
|
|
297
301
|
* @default false
|
|
302
|
+
* @since 5.2
|
|
298
303
|
*/
|
|
299
304
|
accessor hideGraphics: boolean;
|
|
300
305
|
/**
|
|
@@ -316,6 +321,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
316
321
|
* ></arcgis-utility-network-trace-analysis>
|
|
317
322
|
* </arcgis-map>
|
|
318
323
|
* ```
|
|
324
|
+
* @since 5.2
|
|
319
325
|
*/
|
|
320
326
|
accessor hidePlaceholder: boolean;
|
|
321
327
|
/**
|
|
@@ -324,6 +330,7 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
324
330
|
* This property must be set to `true` to disable default actions.
|
|
325
331
|
*
|
|
326
332
|
* @default false
|
|
333
|
+
* @since 5.2
|
|
327
334
|
*/
|
|
328
335
|
accessor includeDefaultActionsDisabled: boolean;
|
|
329
336
|
/**
|
|
@@ -370,7 +377,20 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
370
377
|
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
371
378
|
/** The current state of the component. */
|
|
372
379
|
get state(): UtilityNetworkTraceAnalysisState;
|
|
380
|
+
/**
|
|
381
|
+
* The error from the most recent failed trace attempt. Read this property when
|
|
382
|
+
* [@arcgisError](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/#event-arcgisError) fires.
|
|
383
|
+
* This property is reset to `undefined` before a new trace runs.
|
|
384
|
+
*
|
|
385
|
+
* @since 5.2
|
|
386
|
+
*/
|
|
373
387
|
get traceError(): EsriError | undefined;
|
|
388
|
+
/**
|
|
389
|
+
* The [TraceResult](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceResult/)
|
|
390
|
+
* returned by the most recent successful trace. This property is reset to `undefined` before a new trace runs.
|
|
391
|
+
*
|
|
392
|
+
* @since 5.2
|
|
393
|
+
*/
|
|
374
394
|
accessor traceResult: TraceResult | undefined;
|
|
375
395
|
/**
|
|
376
396
|
* An array of features returned by the trace result.
|
|
@@ -388,6 +408,21 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
388
408
|
accessor view: MapView | null | undefined;
|
|
389
409
|
/** Permanently destroy the component. */
|
|
390
410
|
destroy(): Promise<void>;
|
|
411
|
+
/**
|
|
412
|
+
* Fires when the selected named trace configuration's trace type or trace configuration is unavailable,
|
|
413
|
+
* or when an error occurs while executing a trace.
|
|
414
|
+
* The error is available through [traceError](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/#traceError)
|
|
415
|
+
* before this event fires. This event does not include an error in its payload.
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```js
|
|
419
|
+
* const traceElement = document.querySelector("arcgis-utility-network-trace-analysis");
|
|
420
|
+
* traceElement.addEventListener("arcgisError", () => {
|
|
421
|
+
* console.error("Trace failed:", traceElement.traceError);
|
|
422
|
+
* });
|
|
423
|
+
* ```
|
|
424
|
+
* @since 5.2
|
|
425
|
+
*/
|
|
391
426
|
readonly arcgisError: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
392
427
|
/**
|
|
393
428
|
* Fires when the user toggles displaying aggregated geometry results in the result pane.
|
|
@@ -485,9 +520,14 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
485
520
|
* console.log("Trace result is ready.");
|
|
486
521
|
* });
|
|
487
522
|
* ```
|
|
523
|
+
* @since 5.2
|
|
488
524
|
*/
|
|
489
525
|
readonly arcgisTraceResultReady: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
490
|
-
/**
|
|
526
|
+
/**
|
|
527
|
+
* Emitted when an action is triggered on the component.
|
|
528
|
+
*
|
|
529
|
+
* @since 5.2
|
|
530
|
+
*/
|
|
491
531
|
readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this, ActionEvent>;
|
|
492
532
|
readonly "@eventTypes": {
|
|
493
533
|
arcgisError: ArcgisUtilityNetworkTraceAnalysis["arcgisError"]["detail"];
|
|
@@ -3,18 +3,19 @@ import { c as v } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { ref as c } from "lit/directives/ref.js";
|
|
4
4
|
import h from "@arcgis/core/Color.js";
|
|
5
5
|
import R from "@arcgis/core/core/Collection.js";
|
|
6
|
-
import
|
|
7
|
-
import T from "@arcgis/core/
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
6
|
+
import w from "@arcgis/core/core/Error.js";
|
|
7
|
+
import { when as T } from "@arcgis/core/core/reactiveUtils.js";
|
|
8
|
+
import $ from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
|
|
9
|
+
import { LitElement as C, createEvent as r } from "@arcgis/lumina";
|
|
10
|
+
import { usePropertyChange as E, bypassReadOnly as g } from "@arcgis/lumina/controllers";
|
|
10
11
|
import { slotChangeGetAssignedElements as d } from "@arcgis/toolkit/dom/slots";
|
|
11
12
|
import { log as u } from "@arcgis/toolkit/log";
|
|
12
|
-
import { css as
|
|
13
|
-
import { u as
|
|
14
|
-
import { m as
|
|
13
|
+
import { css as G, html as a } from "lit";
|
|
14
|
+
import { u as S } from "../../chunks/useT9n.js";
|
|
15
|
+
import { m as k } from "../../chunks/useViewModel.js";
|
|
15
16
|
import { l as p } from "../../chunks/async-utils.js";
|
|
16
17
|
import { a as m } from "../../chunks/types.js";
|
|
17
|
-
const
|
|
18
|
+
const x = G`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-view-corner-radius: 0px;--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;--calcite-panel-background-color: var(--calcite-color-background);min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}slot[name=results]::slotted(:not(arcgis-utility-network-trace-results)){display:none}slot[name=results]::slotted([arcgis-hidden-results-slot-item]){display:none}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`, P = k($), f = "arcgis-utility-network-trace-results", y = "arcgis-hidden-results-slot-item", _ = [
|
|
18
19
|
"actions",
|
|
19
20
|
"autoDestroyDisabled",
|
|
20
21
|
"aggregatedGeometryResultsGraphicsColor",
|
|
@@ -31,9 +32,9 @@ const k = E`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 3
|
|
|
31
32
|
"traceResult",
|
|
32
33
|
"view"
|
|
33
34
|
];
|
|
34
|
-
class
|
|
35
|
+
class A extends C {
|
|
35
36
|
constructor() {
|
|
36
|
-
super(...arguments), this._messages =
|
|
37
|
+
super(...arguments), this._messages = S({ blocking: !0 }), this.#s = P(this), this.#r = (e) => {
|
|
37
38
|
const { detail: t, target: s } = e;
|
|
38
39
|
t.name === "hideGraphics" ? (e.stopPropagation(), this.hideGraphics = s[t.name], this.arcgisHideGraphicsChange.emit(this.hideGraphics)) : t.name === "aggregatedGeometryResultsGraphicsColor" ? (e.stopPropagation(), this.aggregatedGeometryResultsGraphicsColor = s[t.name]) : t.name === "aggregatedGeometryResultsSize" ? (e.stopPropagation(), this.aggregatedGeometryResultsSize = s[t.name]) : (t.name === "state" || t.name === "traceError" || t.name === "traceResult") && e.stopPropagation();
|
|
39
40
|
}, this.#n = (e) => {
|
|
@@ -42,7 +43,7 @@ class _ extends $ {
|
|
|
42
43
|
e.stopPropagation(), this.arcgisTraceResultFeaturesReady.emit(), this.arcgisTraceResultReady.emit();
|
|
43
44
|
}, this.#a = (e) => {
|
|
44
45
|
e.stopPropagation(), this.arcgisTriggerAction.emit(e.detail);
|
|
45
|
-
}, this._activeTab = "input", this._showMissingTerminalWarning = !1, this._showNoStartingPointsWarning = !1, this._slottedElements = [], this._mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryResultsGraphicsColor = new h(m), this.aggregatedGeometryResultsSize = 12, this.disableHighlightFeatureResults = !1, this.flowItems = new R(), this.hideActionBar = !1, this.hideClearResultsCount = !1, this.hideGraphics = !1, this.hidePlaceholder = !1, this.hideFeatureResults = !1, this.includeDefaultActionsDisabled = !1, this.state = this.#s.state, this.view = this.#s.view, this.arcgisError = r(), this.arcgisHideGraphicsChange = r(), this.arcgisPropertyChange =
|
|
46
|
+
}, this._activeTab = "input", this._showMissingTerminalWarning = !1, this._showNoStartingPointsWarning = !1, this._slottedElements = [], this._mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryResultsGraphicsColor = new h(m), this.aggregatedGeometryResultsSize = 12, this.disableHighlightFeatureResults = !1, this.flowItems = new R(), this.hideActionBar = !1, this.hideClearResultsCount = !1, this.hideGraphics = !1, this.hidePlaceholder = !1, this.hideFeatureResults = !1, this.includeDefaultActionsDisabled = !1, this.state = this.#s.state, this.view = this.#s.view, this.arcgisError = r(), this.arcgisHideGraphicsChange = r(), this.arcgisPropertyChange = E()("aggregatedGeometryResultsGraphicsColor", "hideGraphics", "state", "traceError", "traceResult"), this.arcgisReady = r(), this.arcgisTraceLocationSelectEnd = r(), this.arcgisTraceLocationSelectStart = r(), this.arcgisTraceResultClear = r(), this.arcgisTraceResultFeaturesReady = r(), this.arcgisTraceResultReady = r(), this.arcgisTriggerAction = r();
|
|
46
47
|
}
|
|
47
48
|
static {
|
|
48
49
|
this.properties = { _activeTab: 16, _showMissingTerminalWarning: 16, _showNoStartingPointsWarning: 16, _slottedElements: 16, _mode: 16, actions: 0, autoDestroyDisabled: 5, beforeMapInteraction: 0, aggregatedGeometryResultsGraphicsColor: [1, { converter: {
|
|
@@ -50,7 +51,7 @@ class _ extends $ {
|
|
|
50
51
|
} }], aggregatedGeometryResultsSize: 9, disableHighlightFeatureResults: 5, flowItems: 32, hideActionBar: 5, hideClearResultsCount: 5, hideGraphics: 5, hidePlaceholder: 5, hideFeatureResults: 5, includeDefaultActionsDisabled: 5, label: 3, messageOverrides: 0, traceResultFeatures: 32, traceResult: 0, traceError: 32, referenceElement: 1, state: 32, view: 0 };
|
|
51
52
|
}
|
|
52
53
|
static {
|
|
53
|
-
this.styles =
|
|
54
|
+
this.styles = x;
|
|
54
55
|
}
|
|
55
56
|
get #c() {
|
|
56
57
|
return this.view?.map?.allLayers.toArray().concat(this.view.map.allTables.toArray()) ?? [];
|
|
@@ -81,11 +82,11 @@ class _ extends $ {
|
|
|
81
82
|
}
|
|
82
83
|
load() {
|
|
83
84
|
this.manager.onLifecycle(() => [
|
|
84
|
-
|
|
85
|
+
T(() => !this.#s.utilityNetwork, () => this.#i("input"))
|
|
85
86
|
]);
|
|
86
87
|
}
|
|
87
88
|
willUpdate(e) {
|
|
88
|
-
|
|
89
|
+
_.some((t) => e.has(t)) && this.#l(this.#e);
|
|
89
90
|
}
|
|
90
91
|
#g() {
|
|
91
92
|
this.traceResult = void 0, g(() => this.traceError = void 0), this.#e?.clearResults(), this.#h?.flowItems.removeAll();
|
|
@@ -148,7 +149,9 @@ class _ extends $ {
|
|
|
148
149
|
async #b() {
|
|
149
150
|
const e = this.#t?.selectedNamedTraceConfiguration, t = this.#t?.traceConfiguration;
|
|
150
151
|
if (!(e?.traceType && t)) {
|
|
151
|
-
u("error", this, "Trace configuration not found")
|
|
152
|
+
u("error", this, "Trace configuration not found");
|
|
153
|
+
const i = new w("trace-configuration-not-found", "Trace configuration not found");
|
|
154
|
+
g(() => this.traceError = i), this.arcgisError.emit();
|
|
152
155
|
return;
|
|
153
156
|
}
|
|
154
157
|
const s = this.#t?.traceLocations;
|
|
@@ -229,7 +232,7 @@ class _ extends $ {
|
|
|
229
232
|
return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @calciteTabsActivate=${() => this.#i("input")} .selected=${e === "input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @calciteTabsActivate=${() => this.#i("results")} .selected=${e === "results"} .disabled=${t === "disabled" || t === "loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#P()}${this.#k()}</calcite-tabs>${e === "input" ? this.#_() : null}${e === "results" ? this.#x() : null}</calcite-panel>`;
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
|
-
v("arcgis-utility-network-trace-analysis",
|
|
235
|
+
v("arcgis-utility-network-trace-analysis", A);
|
|
233
236
|
export {
|
|
234
|
-
|
|
237
|
+
A as ArcgisUtilityNetworkTraceAnalysis
|
|
235
238
|
};
|
|
@@ -52,18 +52,8 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
|
52
52
|
*
|
|
53
53
|
* ## Use in a custom app outside the trace analysis component
|
|
54
54
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* that display multiple trace results at once or configure each results component independently. Add one trace results
|
|
58
|
-
* component for each trace result and set its properties directly. The pane provides the results container; it does
|
|
59
|
-
* not run traces or synchronize the results components' properties. Your application supplies each component's
|
|
60
|
-
* `traceResult`, `traceError`, `utilityNetwork`, and `view` and manages clearing them.
|
|
61
|
-
*
|
|
62
|
-
* The [view](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#view) property is required for elements and aggregated
|
|
63
|
-
* geometry results. The [utilityNetwork](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#utilityNetwork) property is required
|
|
64
|
-
* to query features for elements results.
|
|
65
|
-
*
|
|
66
|
-
* See the [multiple trace results example](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#multiple-trace-results-example).
|
|
55
|
+
* See [arcgis-utility-network-trace-results-pane](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results-pane/) for guidance and examples
|
|
56
|
+
* of displaying multiple trace results outside the trace analysis component.
|
|
67
57
|
*
|
|
68
58
|
* @slot
|
|
69
59
|
* - Default slot for adding trace result items or custom content.
|
|
@@ -110,64 +100,6 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
|
110
100
|
* console.log("Result items ready:", results.traceResultFeatures);
|
|
111
101
|
* });
|
|
112
102
|
* ```
|
|
113
|
-
* @example
|
|
114
|
-
* <span id="multiple-trace-results-example"></span>
|
|
115
|
-
*
|
|
116
|
-
* Display two trace results in the default slot of a results pane, without a trace analysis component.
|
|
117
|
-
* Each results component has its own heading and display settings. Unlike the first example, neither component
|
|
118
|
-
* uses `slot="results"` because both are assigned to the pane's default slot.
|
|
119
|
-
* ```html
|
|
120
|
-
* <arcgis-utility-network-trace-results-pane id="trace-results-pane">
|
|
121
|
-
* <arcgis-utility-network-trace-results
|
|
122
|
-
* id="upstream-results"
|
|
123
|
-
* heading="Upstream trace"
|
|
124
|
-
* expandable
|
|
125
|
-
* expanded
|
|
126
|
-
* hide-action-bar
|
|
127
|
-
* ></arcgis-utility-network-trace-results>
|
|
128
|
-
* <arcgis-utility-network-trace-results
|
|
129
|
-
* id="downstream-results"
|
|
130
|
-
* heading="Downstream trace"
|
|
131
|
-
* expandable
|
|
132
|
-
* expanded
|
|
133
|
-
* disable-highlight-feature-results
|
|
134
|
-
* ></arcgis-utility-network-trace-results>
|
|
135
|
-
* </arcgis-utility-network-trace-results-pane>
|
|
136
|
-
* <calcite-button id="clear-trace-results">Clear results</calcite-button>
|
|
137
|
-
* ```
|
|
138
|
-
*
|
|
139
|
-
* In the following JavaScript, `view` is the application's ready MapView, `utilityNetwork` is its loaded utility
|
|
140
|
-
* network, and `upstreamTraceResult` and `downstreamTraceResult` are `TraceResult` objects returned by the application's
|
|
141
|
-
* trace workflow. Set the view and utility network before assigning each trace result.
|
|
142
|
-
* ```js
|
|
143
|
-
* const pane = document.getElementById("trace-results-pane");
|
|
144
|
-
* const upstreamResults = document.getElementById("upstream-results");
|
|
145
|
-
* const downstreamResults = document.getElementById("downstream-results");
|
|
146
|
-
* const resultsComponents = [upstreamResults, downstreamResults];
|
|
147
|
-
*
|
|
148
|
-
* await Promise.all([pane.componentOnReady(), ...resultsComponents.map((results) => results.componentOnReady())]);
|
|
149
|
-
*
|
|
150
|
-
* for (const results of resultsComponents) {
|
|
151
|
-
* results.view = view;
|
|
152
|
-
* results.utilityNetwork = utilityNetwork;
|
|
153
|
-
* }
|
|
154
|
-
*
|
|
155
|
-
* upstreamResults.traceResult = upstreamTraceResult;
|
|
156
|
-
* downstreamResults.traceResult = downstreamTraceResult;
|
|
157
|
-
*
|
|
158
|
-
* document.getElementById("clear-trace-results").addEventListener("click", () => {
|
|
159
|
-
* for (const results of resultsComponents) {
|
|
160
|
-
* results.clearResults();
|
|
161
|
-
* results.traceResult = undefined;
|
|
162
|
-
* results.traceError = undefined;
|
|
163
|
-
* }
|
|
164
|
-
* pane.flowItems.removeAll();
|
|
165
|
-
* });
|
|
166
|
-
* ```
|
|
167
|
-
*
|
|
168
|
-
* If a trace fails, clear the corresponding component's `traceResult` and assign the error to its `traceError`
|
|
169
|
-
* property. The other results component can continue displaying its result. Before displaying a subsequent
|
|
170
|
-
* successful result, reset that component's `traceError` to `undefined`.
|
|
171
103
|
* @see [arcgis-utility-network-trace-analysis](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/)
|
|
172
104
|
* @see [arcgis-utility-network-trace-results-pane](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results-pane/)
|
|
173
105
|
* @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/)
|
|
@@ -4,12 +4,171 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
4
4
|
import type { FlowItem } from "@esri/calcite-components/components/calcite-flow-item";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* A container for one or more [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/) components and custom content.
|
|
8
|
+
* Use this component for custom trace workflows that need functionality beyond
|
|
9
|
+
* [arcgis-utility-network-trace-analysis](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/), such as displaying the results of multiple
|
|
10
|
+
* traces at once.
|
|
8
11
|
*
|
|
9
|
-
*
|
|
12
|
+
* ## Use in a custom app outside the trace analysis component
|
|
13
|
+
*
|
|
14
|
+
* To use [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/) outside of the trace analysis component,
|
|
15
|
+
* slot it into this pane's [default slot](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results-pane/#slot-).
|
|
16
|
+
* This is useful in custom trace workflow applications that display multiple trace results at once or
|
|
17
|
+
* configure each results component independently. Add one trace results component for each trace result
|
|
18
|
+
* and set its properties directly. The pane provides the results container; it does not run traces or
|
|
19
|
+
* set the results components' properties. Your application supplies each component's
|
|
20
|
+
* [arcgis-utility-network-trace-results.traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#traceResult),
|
|
21
|
+
* [arcgis-utility-network-trace-results.traceError](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#traceError),
|
|
22
|
+
* [arcgis-utility-network-trace-results.utilityNetwork](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#utilityNetwork), and
|
|
23
|
+
* [arcgis-utility-network-trace-results.view](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#view), and
|
|
24
|
+
* manages setting properties on any trace result items.
|
|
25
|
+
*
|
|
26
|
+
* The [arcgis-utility-network-trace-results.view](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#view) property is required for elements and aggregated
|
|
27
|
+
* geometry results. The [arcgis-utility-network-trace-results.utilityNetwork](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#utilityNetwork) property is required
|
|
28
|
+
* to query features for elements results.
|
|
29
|
+
*
|
|
30
|
+
* Each trace results component instance renders in its own
|
|
31
|
+
* [Calcite Block](https://developers.arcgis.com/calcite-design-system/components/block/).
|
|
32
|
+
* Set [arcgis-utility-network-trace-results.expandable](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#expandable) and
|
|
33
|
+
* [arcgis-utility-network-trace-results.expanded](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/#expanded) on each results component instance
|
|
34
|
+
* to control whether its content is expandable and initially expanded.
|
|
35
|
+
* Both properties default to `false` (collapsed and non-expandable), matching the Calcite Block defaults.
|
|
36
|
+
*
|
|
37
|
+
* See the [multiple trace results example](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results-pane/#multiple-trace-results-example).
|
|
38
|
+
*
|
|
39
|
+
* ### Adding custom flow items
|
|
40
|
+
*
|
|
41
|
+
* The pane renders its content inside a
|
|
42
|
+
* [Calcite Flow](https://developers.arcgis.com/calcite-design-system/components/flow/).
|
|
43
|
+
* The default slot is rendered in the root flow item. To control the custom content displayed in
|
|
44
|
+
* the pane, add [Calcite Flow Item](https://developers.arcgis.com/calcite-design-system/components/flow-item/)
|
|
45
|
+
* elements to its [flowItems](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results-pane/#flowItems) collection.
|
|
46
|
+
*
|
|
47
|
+
* The trace analysis component's results tab works the same way: add flow items to its
|
|
48
|
+
* [arcgis-utility-network-trace-analysis.flowItems](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/#flowItems) collection
|
|
49
|
+
* to display custom content in that tab.
|
|
50
|
+
*
|
|
51
|
+
* @slot - Default slot for one or more [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/) components.
|
|
10
52
|
* @since 5.2
|
|
53
|
+
* @example
|
|
54
|
+
* <span id="multiple-trace-results-example"></span>
|
|
55
|
+
*
|
|
56
|
+
* Display two trace results in the default slot of a results pane, without a trace analysis component.
|
|
57
|
+
* Each results component has its own heading and display settings. Neither component uses `slot="results"`
|
|
58
|
+
* because both are assigned to the pane's default slot.
|
|
59
|
+
* The upstream component uses the default result items. The downstream component uses slotted
|
|
60
|
+
* elements and functions result items, so aggregated geometry results are not displayed.
|
|
61
|
+
* Set display properties directly on the slotted result items.
|
|
62
|
+
* ```html
|
|
63
|
+
* <arcgis-utility-network-trace-results-pane id="trace-results-pane">
|
|
64
|
+
* <arcgis-utility-network-trace-results
|
|
65
|
+
* id="upstream-results"
|
|
66
|
+
* heading="Upstream trace"
|
|
67
|
+
* expandable
|
|
68
|
+
* expanded
|
|
69
|
+
* hide-action-bar
|
|
70
|
+
* ></arcgis-utility-network-trace-results>
|
|
71
|
+
* <arcgis-utility-network-trace-results
|
|
72
|
+
* id="downstream-results"
|
|
73
|
+
* heading="Downstream trace"
|
|
74
|
+
* expandable
|
|
75
|
+
* expanded
|
|
76
|
+
* >
|
|
77
|
+
* <arcgis-utility-network-trace-elements-result-item
|
|
78
|
+
* disable-highlight
|
|
79
|
+
* ></arcgis-utility-network-trace-elements-result-item>
|
|
80
|
+
* <arcgis-utility-network-trace-functions-result-item></arcgis-utility-network-trace-functions-result-item>
|
|
81
|
+
* </arcgis-utility-network-trace-results>
|
|
82
|
+
* </arcgis-utility-network-trace-results-pane>
|
|
83
|
+
* <calcite-button id="clear-trace-results">Clear results</calcite-button>
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* In the following JavaScript, `view` is the application's MapView, `utilityNetwork` is its loaded utility
|
|
87
|
+
* network, and `upstreamTraceResult` and `downstreamTraceResult` are `TraceResult` objects returned by the application's
|
|
88
|
+
* trace workflow. Set the view and utility network before assigning each trace result.
|
|
89
|
+
* ```js
|
|
90
|
+
* const pane = document.getElementById("trace-results-pane");
|
|
91
|
+
* const upstreamResults = document.getElementById("upstream-results");
|
|
92
|
+
* const downstreamResults = document.getElementById("downstream-results");
|
|
93
|
+
* const resultsComponents = [upstreamResults, downstreamResults];
|
|
94
|
+
*
|
|
95
|
+
* await Promise.all([pane.componentOnReady(), ...resultsComponents.map((results) => results.componentOnReady())]);
|
|
96
|
+
*
|
|
97
|
+
* for (const results of resultsComponents) {
|
|
98
|
+
* results.view = view;
|
|
99
|
+
* results.utilityNetwork = utilityNetwork;
|
|
100
|
+
* }
|
|
101
|
+
*
|
|
102
|
+
* upstreamResults.traceResult = upstreamTraceResult;
|
|
103
|
+
* downstreamResults.traceResult = downstreamTraceResult;
|
|
104
|
+
*
|
|
105
|
+
* document.getElementById("clear-trace-results").addEventListener("click", () => {
|
|
106
|
+
* for (const results of resultsComponents) {
|
|
107
|
+
* results.clearResults();
|
|
108
|
+
* results.traceResult = undefined;
|
|
109
|
+
* results.traceError = undefined;
|
|
110
|
+
* }
|
|
111
|
+
* });
|
|
112
|
+
* ```
|
|
113
|
+
* @example
|
|
114
|
+
* <span id="custom-flow-item-example"></span>
|
|
115
|
+
*
|
|
116
|
+
* Using the results pane from the previous example, add a button to display custom content in a flow item.
|
|
117
|
+
* The flow item replaces the visible results until the user navigates back, which removes it from the
|
|
118
|
+
* `flowItems` collection and shows the results again.
|
|
119
|
+
* ```html
|
|
120
|
+
* <calcite-button id="show-trace-comparison">Compare traces</calcite-button>
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* ```js
|
|
124
|
+
* const pane = document.getElementById("trace-results-pane");
|
|
125
|
+
* await pane.componentOnReady();
|
|
126
|
+
*
|
|
127
|
+
* const flowItem = document.createElement("calcite-flow-item");
|
|
128
|
+
* flowItem.heading = "Trace comparison";
|
|
129
|
+
*
|
|
130
|
+
* const content = document.createElement("p");
|
|
131
|
+
* content.textContent = "Compare the results of your upstream and downstream traces here.";
|
|
132
|
+
* flowItem.append(content);
|
|
133
|
+
*
|
|
134
|
+
* document.getElementById("show-trace-comparison").addEventListener("click", () => {
|
|
135
|
+
* pane.flowItems.add(flowItem);
|
|
136
|
+
* });
|
|
137
|
+
*
|
|
138
|
+
* flowItem.addEventListener("calciteFlowItemBack", () => {
|
|
139
|
+
* pane.flowItems.remove(flowItem);
|
|
140
|
+
* });
|
|
141
|
+
* ```
|
|
142
|
+
* @see [arcgis-utility-network-trace-analysis](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/)
|
|
143
|
+
* @see [arcgis-utility-network-trace-results](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results/)
|
|
144
|
+
* @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/)
|
|
145
|
+
* @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/)
|
|
146
|
+
* @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/)
|
|
147
|
+
* @see [Calcite Flow](https://developers.arcgis.com/calcite-design-system/components/flow/)
|
|
148
|
+
* @see [Calcite Block](https://developers.arcgis.com/calcite-design-system/components/block/)
|
|
11
149
|
*/
|
|
12
150
|
export abstract class ArcgisUtilityNetworkTraceResultsPane extends LitElement {
|
|
151
|
+
/**
|
|
152
|
+
* Additional [Calcite Flow Item](https://developers.arcgis.com/calcite-design-system/components/flow-item/)
|
|
153
|
+
* elements displayed after the root flow item for drilldown navigation.
|
|
154
|
+
* The root flow item contains the pane's default slot and is not included in this collection.
|
|
155
|
+
*
|
|
156
|
+
* This property is read-only, but the returned
|
|
157
|
+
* [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) is mutable.
|
|
158
|
+
* Add or remove `calcite-flow-item` elements through the collection rather than replacing it.
|
|
159
|
+
* Adding items deselects the root flow item if it is selected. Call
|
|
160
|
+
* [removeAll()](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/#removeAll) on
|
|
161
|
+
* [flowItems](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results-pane/#flowItems) to remove all custom flow items
|
|
162
|
+
* without removing the slotted results components.
|
|
163
|
+
*
|
|
164
|
+
* This collection is for custom flow items in an independently used results pane.
|
|
165
|
+
* To add flow items to the results tab of [arcgis-utility-network-trace-analysis](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/),
|
|
166
|
+
* use that component's [arcgis-utility-network-trace-analysis.flowItems](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/#flowItems) property instead.
|
|
167
|
+
*
|
|
168
|
+
* See the [custom flow item example](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-results-pane/#custom-flow-item-example).
|
|
169
|
+
*
|
|
170
|
+
* @since 5.2
|
|
171
|
+
*/
|
|
13
172
|
get flowItems(): Collection<FlowItem>;
|
|
14
173
|
/**
|
|
15
174
|
* Whether to log console errors about unexpected child elements.
|