@arcgis/map-components 5.0.0-next.163 → 5.0.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/{G4FP7GXM.js → 3UILDMTJ.js} +1 -1
- package/dist/cdn/3V6ZTS7B.js +2 -0
- package/dist/cdn/{ANP7PYGJ.js → 3XJU4K4Z.js} +1 -1
- package/dist/cdn/5KET4V4O.js +2 -0
- package/dist/cdn/7EW22PZD.js +2 -0
- package/dist/cdn/AAGYR4XM.js +2 -0
- package/dist/cdn/AZN2TGWK.js +2 -0
- package/dist/cdn/{NWXN5M4S.js → DPW55W6W.js} +1 -1
- package/dist/cdn/{SK6O74LF.js → DUHFQ4AI.js} +1 -1
- package/dist/cdn/{UNLAUFXF.js → F5I4VDXM.js} +1 -1
- package/dist/cdn/{R2FIOZIL.js → FUHAGBXL.js} +1 -1
- package/dist/cdn/{ESNK6MCY.js → IWXXD73F.js} +1 -1
- package/dist/cdn/{FD4A66OJ.js → KDJV5F4T.js} +1 -1
- package/dist/cdn/{SQFVC4KA.js → MJBV536L.js} +1 -1
- package/dist/cdn/MU6C77DZ.js +2 -0
- package/dist/cdn/NPEMOLA3.js +2 -0
- package/dist/cdn/{2AHY7O7C.js → POP5NTRI.js} +1 -1
- package/dist/cdn/SI3PITPE.js +2 -0
- package/dist/cdn/SU6ZGF4G.js +2 -0
- package/dist/cdn/W3AN7XLR.js +2 -0
- package/dist/cdn/{7NOD6U2Y.js → WUISNRWL.js} +1 -1
- package/dist/cdn/X25QBU47.js +2 -0
- package/dist/cdn/Z22BBNTK.js +2 -0
- package/dist/cdn/{YXYCWJFF.js → Z6LBCKKH.js} +1 -1
- package/dist/cdn/{AJ64UYFM.js → ZFATBY4D.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/esri-main.js +1 -1
- package/dist/components/arcgis-directions/customElement.js +5 -5
- package/dist/components/arcgis-feature/customElement.js +6 -6
- package/dist/components/arcgis-feature-table/customElement.d.ts +57 -2
- package/dist/components/arcgis-feature-table/customElement.js +28 -13
- package/dist/components/arcgis-feature-templates/customElement.d.ts +3 -0
- package/dist/components/arcgis-feature-templates/customElement.js +2 -2
- package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +16 -16
- package/dist/components/arcgis-feature-utility-network-associations/customElement.js +55 -55
- package/dist/components/arcgis-features/customElement.js +46 -52
- package/dist/components/arcgis-link-chart/customElement.js +10 -15
- package/dist/components/arcgis-map/customElement.js +1 -6
- package/dist/components/arcgis-paste/customElement.js +44 -44
- package/dist/components/arcgis-popup/customElement.js +4 -4
- package/dist/components/arcgis-print/customElement.d.ts +10 -0
- package/dist/components/arcgis-print/customElement.js +7 -7
- package/dist/components/arcgis-print-layout-advanced-options/customElement.js +12 -12
- package/dist/components/arcgis-print-layout-panel/customElement.js +6 -6
- package/dist/components/arcgis-print-main-panel/customElement.js +7 -7
- package/dist/components/arcgis-scene/customElement.js +8 -13
- package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.d.ts +12 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +7 -7
- package/dist/components/arcgis-utility-network-trace/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +47 -40
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +12 -0
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +80 -65
- package/dist/components/arcgis-utility-network-trace-location/customElement.d.ts +4 -0
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +17 -14
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +13 -0
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +39 -26
- 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 +12 -12
- package/dist/types/lumina.d.ts +6 -6
- package/dist/types/preact.d.ts +6 -6
- package/dist/types/react.d.ts +6 -6
- package/dist/types/stencil.d.ts +6 -6
- package/package.json +4 -4
- package/dist/cdn/55TRWAT7.js +0 -2
- package/dist/cdn/BHPXKX47.js +0 -2
- package/dist/cdn/D4LTASH2.js +0 -2
- package/dist/cdn/H7O5I4IF.js +0 -2
- package/dist/cdn/I5M2Z7WS.js +0 -2
- package/dist/cdn/L6YZXUBB.js +0 -2
- package/dist/cdn/P7PWOUNZ.js +0 -2
- package/dist/cdn/Q4B4MXH4.js +0 -2
- package/dist/cdn/RN57AN5P.js +0 -2
- package/dist/cdn/URUFNID2.js +0 -2
- package/dist/cdn/WREEAAEV.js +0 -2
- package/dist/cdn/WTTBFFC2.js +0 -2
|
@@ -4,16 +4,16 @@ import { html as a } from "lit";
|
|
|
4
4
|
import l from "@arcgis/core/Camera.js";
|
|
5
5
|
import { watch as s } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
6
|
import v from "@arcgis/core/geometry/Point.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import u from "@arcgis/core/views/SceneView.js";
|
|
8
|
+
import g from "@arcgis/core/WebScene.js";
|
|
9
9
|
import { LitElement as d, createEvent as r, safeClassMap as n } from "@arcgis/lumina";
|
|
10
|
-
import { makeAccessorController as
|
|
10
|
+
import { makeAccessorController as w, reEmitEvent as t, reCreateAccessor as y } from "@arcgis/lumina/controllers/accessor";
|
|
11
11
|
import { createRef as o, ref as h } from "lit/directives/ref.js";
|
|
12
12
|
import { U as f, u as b, a as V } from "../../chunks/useArcgisViewReadyError.js";
|
|
13
13
|
import { s as C } from "../../chunks/esri-main.js";
|
|
14
|
-
import { s as E, C as
|
|
14
|
+
import { s as E, C as c } from "../../chunks/slots.js";
|
|
15
15
|
import { b as _, c as A, p as P, i as D } from "../../chunks/component-utils.js";
|
|
16
|
-
const I =
|
|
16
|
+
const I = w(g, {}), R = w(u, {});
|
|
17
17
|
class k extends d {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(), this._containerRef = o(), this._mapRef = o(), this._uiController = new f(this), this._cameraProperties = {}, this.arcgisLoadError = b(this), this.arcgisViewReadyError = V(this), this._map = I(this), this.view = R(this), this.allLayerViews = this.view.allLayerViews, this.alphaCompositingEnabled = this.view.alphaCompositingEnabled, this.analyses = this.view.analyses, this.animationsDisabled = this.view.animationsEnabled, this.attributionMode = this.view.attributionMode, this.autoDestroyDisabled = !1, this.basemap = this._map.basemap, this.basemapView = this.view.basemapView, this.canZoomIn = this.view.canZoomIn, this.canZoomOut = this.view.canZoomOut, this.clippingArea = this.view.clippingArea, this.constraints = this.view.constraints, this.displayFilterDisabled = this.view.displayFilterEnabled, this.environment = this.view.environment, this.fatalError = this.view.fatalError, this.floors = this.view.floors, this.graphics = this.view.graphics, this.ground = this._map.ground, this.groundView = this.view.groundView, this.highlights = this.view.highlights, this.layerViews = this.view.layerViews, this.magnifier = this.view.magnifier, this.map = this.view.map, this.navigation = this.view.navigation, this.padding = this.view.padding, this.popup = this.view.popup, this.popupDisabled = this.view.popupEnabled, this.popupComponentEnabled = !1, this.qualityProfile = this.view.qualityProfile, this.ready = this.view.ready, this.spatialReference = this.view.spatialReference, this.suspended = this.view.suspended, this.theme = this.view.theme, this.timeExtent = this.view.timeExtent, this.updating = this.view.updating, this.viewingMode = this.view.viewingMode, this.visibleArea = this.view.visibleArea, this.arcgisViewAnalysisViewCreate = t(() => this.view, "analysis-view-create"), this.arcgisViewAnalysisViewCreateError = t(() => this.view, "analysis-view-create-error"), this.arcgisViewAnalysisViewDestroy = t(() => this.view, "analysis-view-destroy"), this.arcgisViewChange = r(), this.arcgisViewClick = t(() => this.view, "click"), this.arcgisViewDoubleClick = t(() => this.view, "double-click"), this.arcgisViewDoubleTapDrag = t(() => this.view, "double-tap-drag"), this.arcgisViewDrag = t(() => this.view, "drag"), this.arcgisViewHold = t(() => this.view, "hold"), this.arcgisViewImmediateClick = t(() => this.view, "immediate-click"), this.arcgisViewImmediateDoubleClick = t(() => this.view, "immediate-double-click"), this.arcgisViewKeyDown = t(() => this.view, "key-down"), this.arcgisViewKeyUp = t(() => this.view, "key-up"), this.arcgisViewLayerviewCreate = t(() => this.view, "layerview-create"), this.arcgisViewLayerviewCreateError = t(() => this.view, "layerview-create-error"), this.arcgisViewLayerviewDestroy = t(() => this.view, "layerview-destroy"), this.arcgisViewMouseWheel = t(() => this.view, "mouse-wheel"), this.arcgisViewPointerDown = t(() => this.view, "pointer-down"), this.arcgisViewPointerEnter = t(() => this.view, "pointer-enter"), this.arcgisViewPointerLeave = t(() => this.view, "pointer-leave"), this.arcgisViewPointerMove = t(() => this.view, "pointer-move"), this.arcgisViewPointerUp = t(() => this.view, "pointer-up"), this.arcgisViewReadyChange = r(), this.arcgisViewVerticalTwoFingerDrag = t(() => this.view, "vertical-two-finger-drag"), this.view.ui = {
|
|
@@ -208,12 +208,7 @@ class k extends d {
|
|
|
208
208
|
}, { initial: this.view.ready }),
|
|
209
209
|
s(() => this.view.attributionHeight, (e) => {
|
|
210
210
|
this._uiController.handleAttributionHeightChange(e);
|
|
211
|
-
}, { initial: !0 })
|
|
212
|
-
// Temporary workaround for https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/12012
|
|
213
|
-
// Until https://devtopia.esri.com/WebGIS/arcgis-js-api/pull/78321 is picked up by components
|
|
214
|
-
s(() => this.view.ready, () => {
|
|
215
|
-
this.view.notifyChange("attributionHeight");
|
|
216
|
-
})
|
|
211
|
+
}, { initial: !0 })
|
|
217
212
|
]);
|
|
218
213
|
}
|
|
219
214
|
_mutateCamera(i) {
|
|
@@ -225,10 +220,10 @@ class k extends d {
|
|
|
225
220
|
i(e), this.camera = e;
|
|
226
221
|
}
|
|
227
222
|
renderMain() {
|
|
228
|
-
return a`<div class=${n(
|
|
223
|
+
return a`<div class=${n(c.base)} ${h(this._mapRef)}></div>`;
|
|
229
224
|
}
|
|
230
225
|
render() {
|
|
231
|
-
return a`${this.renderMain()}<section class=${n(
|
|
226
|
+
return a`${this.renderMain()}<section class=${n(c.containerUI)} ${h(this._containerRef)}>${this._uiController.render()}</section>`;
|
|
232
227
|
}
|
|
233
228
|
}
|
|
234
229
|
p("arcgis-scene", k);
|
|
@@ -35,6 +35,16 @@ export abstract class ArcgisUtilityNetworkAggregatedGeometry extends LitElement
|
|
|
35
35
|
};
|
|
36
36
|
showGraphics: string;
|
|
37
37
|
}>;
|
|
38
|
+
/**
|
|
39
|
+
* If true, the component will not be destroyed automatically when it is
|
|
40
|
+
* disconnected from the document. This is useful when you want to move the
|
|
41
|
+
* component to a different place on the page, or temporarily hide it. If this
|
|
42
|
+
* is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-aggregated-geometry/#destroy) method when you are done to
|
|
43
|
+
* prevent memory leaks.
|
|
44
|
+
*
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
accessor autoDestroyDisabled: boolean;
|
|
38
48
|
/** @required */
|
|
39
49
|
accessor geometry: AggregatedGeometry | undefined;
|
|
40
50
|
/**
|
|
@@ -48,6 +58,8 @@ export abstract class ArcgisUtilityNetworkAggregatedGeometry extends LitElement
|
|
|
48
58
|
accessor state: State;
|
|
49
59
|
/** @required */
|
|
50
60
|
accessor view: MapView | undefined;
|
|
61
|
+
/** Permanently destroy the component. */
|
|
62
|
+
destroy(): Promise<void>;
|
|
51
63
|
readonly arcgisHideGraphicsChange: import("@arcgis/lumina").TargetedEvent<this, boolean>;
|
|
52
64
|
readonly "@eventTypes": {
|
|
53
65
|
arcgisHideGraphicsChange: ArcgisUtilityNetworkAggregatedGeometry["arcgisHideGraphicsChange"]["detail"];
|
|
@@ -29,31 +29,31 @@ class k extends G {
|
|
|
29
29
|
listMode: "hide",
|
|
30
30
|
title: e
|
|
31
31
|
}), p(this.view, this._graphicsLayer);
|
|
32
|
-
}, this.hideGraphics = !1, this.graphicsColor = new n([255, 255, 0, 0.6]), this.state = "ready", this.arcgisHideGraphicsChange = f();
|
|
32
|
+
}, this.hideGraphics = !1, this.graphicsColor = new n([255, 255, 0, 0.6]), this.state = "ready", this.autoDestroyDisabled = !1, this.arcgisHideGraphicsChange = f();
|
|
33
33
|
}
|
|
34
34
|
static {
|
|
35
|
-
this.properties = { geometry: 0, hideGraphics: 5, graphicsColor: 0, state: 1, view: 0 };
|
|
35
|
+
this.properties = { geometry: 0, hideGraphics: 5, graphicsColor: 0, state: 1, view: 0, autoDestroyDisabled: 5 };
|
|
36
36
|
}
|
|
37
37
|
static {
|
|
38
38
|
this.styles = S;
|
|
39
39
|
}
|
|
40
|
+
async destroy() {
|
|
41
|
+
this.view?.map && this._graphicsLayer && this.view.map.remove(this._graphicsLayer), await this.manager.destroy();
|
|
42
|
+
}
|
|
40
43
|
connectedCallback() {
|
|
41
44
|
super.connectedCallback(), this.view && this._graphicsLayer && p(this.view, this._graphicsLayer);
|
|
42
45
|
}
|
|
43
46
|
load() {
|
|
44
47
|
!this.geometry || !this.view?.map || this._loadProjectOperator().then(() => this._createGraphicsLayer());
|
|
45
48
|
}
|
|
46
|
-
loaded() {
|
|
47
|
-
this.geometry || a("error", this, o("geometry")), this.view ? this.view.map || a("error", this, o("The property `view` was provided, but `view.map` is null. Cannot draw aggregated geometry.")) : a("error", this, o("view"));
|
|
48
|
-
}
|
|
49
49
|
willUpdate(i) {
|
|
50
50
|
if (i.has("graphicsColor") && this._updateGraphicSymbols(), i.has("geometry") && (this._graphicsLayer?.removeAll(), this._addAggregatedGeometryToView()), i.has("view")) {
|
|
51
51
|
const e = i.get("view");
|
|
52
52
|
e?.map && this._graphicsLayer && (e.map.remove(this._graphicsLayer), this._createGraphicsLayer(), this._addAggregatedGeometryToView());
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
loaded() {
|
|
56
|
+
this.geometry || a("error", this, o("geometry")), this.view ? this.view.map || a("error", this, o("The property `view` was provided, but `view.map` is null. Cannot draw aggregated geometry.")) : a("error", this, o("view"));
|
|
57
57
|
}
|
|
58
58
|
_handleShowGraphicsChange() {
|
|
59
59
|
this.hideGraphics = !this.hideGraphics, this.hideGraphics ? this._graphicsLayer?.removeAll() : this._graphicsLayer?.addMany(this._projectedGraphics), this.arcgisHideGraphicsChange.emit(this.hideGraphics);
|
|
@@ -216,7 +216,7 @@ export abstract class ArcgisUtilityNetworkTrace extends LitElement {
|
|
|
216
216
|
readonly arcgisAddFlagError: import("@arcgis/lumina").TargetedEvent<this, UtilityNetworkTraceViewModelAddFlagErrorEvent>;
|
|
217
217
|
readonly arcgisAddResultArea: import("@arcgis/lumina").TargetedEvent<this, UtilityNetworkTraceViewModelAddResultAreaEvent>;
|
|
218
218
|
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
|
|
219
|
-
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "state"; }>;
|
|
219
|
+
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "state" | "traceResults"; }>;
|
|
220
220
|
/** Emitted when the component associated with a map or scene view is ready to be interacted with. */
|
|
221
221
|
readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
222
222
|
readonly arcgisRemoveResultArea: import("@arcgis/lumina").TargetedEvent<this, UtilityNetworkTraceViewModelRemoveResultAreaEvent>;
|
|
@@ -9,7 +9,7 @@ import { css as n } from "lit";
|
|
|
9
9
|
const l = n`@keyframes esri-basemap-slide{0%{opacity:0;margin-top:0;margin-left:0}75%{opacity:0;margin-top:0;margin-left:0}to{opacity:1;margin-top:5px;margin-left:5px}}@keyframes esri-docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes popup-intro-animation-up{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted #000}}@keyframes esri-spinner--start-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes esri-spinner--finish-animation{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}@keyframes esri-spinner--rotate-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion){.esri-utility-network-trace__reset-prompt{animation:none!important}}@media(prefers-reduced-motion){.esri-popup--aligned-top-center,.esri-popup--aligned-top-left,.esri-popup--aligned-top-right,.esri-popup--aligned-bottom-center,.esri-popup--aligned-bottom-left,.esri-popup--aligned-bottom-right,.esri-popup--is-docked{animation:none!important}}@media(prefers-reduced-motion:reduce){.esri-fov-overlay{animation:none!important}}@keyframes esri-fade-in-down{0%{opacity:0;transform:translateY(-5px)}25%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in-up{0%{opacity:0;transform:translateY(5px)}25%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes esri-fade-in-scale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes looping-progresss-bar-ani{0%{width:0;left:0}20%{width:20%;left:0}80%{width:20%;left:80%}to{width:0;left:100%}}@keyframes esri-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes panel-advance{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-advance--rtl{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat--rtl{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{min-width:300px}.esri-utility-network-trace{flex:auto;width:300px}.esri-utility-network-trace calcite-icon{box-sizing:initial}.esri-utility-network-trace calcite-tab{background-color:var(--calcite-color-foreground-2);padding-top:0;padding-bottom:0}.esri-utility-network-trace calcite-tab:not([selected]){flex:0}.esri-utility-network-trace.esri-component.esri-widget--panel{min-height:120px;width:300px}.esri-utility-network-trace__add-button-container{justify-content:center;margin:18px 0 var(--calcite-spacing-md);display:grid}.esri-utility-network-trace__block-container{margin-top:0;height:95%}.esri-utility-network-trace__block-content{border-bottom:none;margin:0}.esri-utility-network-trace__clear-results-block{position:absolute;bottom:0;left:0;margin:0;border-top:3px solid #6e6e6e26;background-color:#f3f3f3}.esri-utility-network-trace__divider{color:inherit;border-color:var(--calcite-color-border-input);border-bottom-style:solid;border-bottom-width:1px;flex:none;margin:0 0 var(--calcite-spacing-md)}.esri-utility-network-trace__double-pad-top{padding-top:10px}.esri-utility-network-trace__feature-content{height:300px}.esri-utility-network-trace__flow{height:100%}.esri-utility-network-trace__list-container{background-color:var(--calcite-color-foreground-1);padding:3px}.esri-utility-network-trace__notice-container{padding:var(--calcite-spacing-xs)}.esri-utility-network-trace__number-input{width:150px}.esri-utility-network-trace__pad-bottom{padding-bottom:5px}.esri-utility-network-trace__pad-top{padding-top:5px}.esri-utility-network-trace__reset-prompt{background-color:var(--calcite-color-background);color:var(--calcite-color-text-2);border-top:3px solid var(--calcite-color-border-input);flex-flow:column;max-height:85%;padding:var(--calcite-spacing-md) 15px;animation:.1s ease-in-out esri-fade-in-up;display:flex;position:absolute;bottom:0;left:0;right:0;box-shadow:0 1px 2px #0000004d}.esri-utility-network-trace__results-container{height:100%}.esri-utility-network-trace__tabs{min-height:250px;position:relative}`, c = s(r);
|
|
10
10
|
class d extends o {
|
|
11
11
|
constructor() {
|
|
12
|
-
super(...arguments), this.widget = c(this), this.viewModel = this.widget.viewModel, this.view = this.widget.view, this.autoDestroyDisabled = !1, this.defaultGraphicColor = this.widget.defaultGraphicColor, this.disabled = this.widget.disabled, this.enableResultArea = this.widget.enableResultArea, this.flags = this.widget.flags, this.icon = this.widget.icon, this.inputSettings = this.widget.inputSettings, this.label = this.widget.label, this.resultAreaProperties = this.widget.resultAreaProperties, this.selectOnCompleteDisabled = this.widget.selectOnComplete, this.selectedTraces = this.widget.selectedTraces, this.showGraphicsOnCompleteDisabled = this.widget.showGraphicsOnComplete, this.showSelectionAttributesDisabled = this.widget.showSelectionAttributes, this.state = this.viewModel.state, this.traceResults = this.widget.traceResults, this.arcgisAddFlag = e(() => this.widget, "add-flag"), this.arcgisAddFlagComplete = e(() => this.widget, "add-flag-complete"), this.arcgisAddFlagError = e(() => this.widget, "add-flag-error"), this.arcgisAddResultArea = e(() => this.widget, "add-result-area"), this.arcgisPropertyChange = i()("state"), this.arcgisReady = a(), this.arcgisRemoveResultArea = e(() => this.widget, "remove-result-area");
|
|
12
|
+
super(...arguments), this.widget = c(this), this.viewModel = this.widget.viewModel, this.view = this.widget.view, this.autoDestroyDisabled = !1, this.defaultGraphicColor = this.widget.defaultGraphicColor, this.disabled = this.widget.disabled, this.enableResultArea = this.widget.enableResultArea, this.flags = this.widget.flags, this.icon = this.widget.icon, this.inputSettings = this.widget.inputSettings, this.label = this.widget.label, this.resultAreaProperties = this.widget.resultAreaProperties, this.selectOnCompleteDisabled = this.widget.selectOnComplete, this.selectedTraces = this.widget.selectedTraces, this.showGraphicsOnCompleteDisabled = this.widget.showGraphicsOnComplete, this.showSelectionAttributesDisabled = this.widget.showSelectionAttributes, this.state = this.viewModel.state, this.traceResults = this.widget.traceResults, this.arcgisAddFlag = e(() => this.widget, "add-flag"), this.arcgisAddFlagComplete = e(() => this.widget, "add-flag-complete"), this.arcgisAddFlagError = e(() => this.widget, "add-flag-error"), this.arcgisAddResultArea = e(() => this.widget, "add-result-area"), this.arcgisPropertyChange = i()("state", "traceResults"), this.arcgisReady = a(), this.arcgisRemoveResultArea = e(() => this.widget, "remove-result-area");
|
|
13
13
|
}
|
|
14
14
|
static {
|
|
15
15
|
this.properties = { view: 0, autoDestroyDisabled: 5, defaultGraphicColor: 0, disabled: 7, enableResultArea: 5, flags: 0, icon: 1, inputSettings: 0, label: 1, referenceElement: 1, resultAreaProperties: 0, selectOnCompleteDisabled: 5, selectedTraces: 0, showGraphicsOnCompleteDisabled: 5, showSelectionAttributesDisabled: 5, state: 32, traceResults: 32 };
|
|
@@ -1,49 +1,53 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
2
|
import { c as y } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
4
|
-
import {
|
|
5
|
-
import h from "
|
|
3
|
+
import { css as b, html as r } from "lit";
|
|
4
|
+
import { ref as o } from "lit/directives/ref.js";
|
|
5
|
+
import { keyed as h } from "lit/directives/keyed.js";
|
|
6
|
+
import g from "@arcgis/core/Color.js";
|
|
6
7
|
import "@arcgis/core/core/Error.js";
|
|
7
|
-
import
|
|
8
|
-
import { LitElement as
|
|
9
|
-
import { log as
|
|
10
|
-
import {
|
|
11
|
-
import { u as T } from "../../chunks/useT9n.js";
|
|
8
|
+
import f from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
|
|
9
|
+
import { LitElement as v, createEvent as n } from "@arcgis/lumina";
|
|
10
|
+
import { log as u } from "@arcgis/toolkit/log";
|
|
11
|
+
import { u as w } from "../../chunks/useT9n.js";
|
|
12
12
|
import { m as _ } from "../../chunks/useViewModel.js";
|
|
13
|
-
const
|
|
14
|
-
class
|
|
13
|
+
const T = b`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}#no-starting-points-panel{flex:none;height:fit-content;--calcite-panel-background-color: var(--calcite-color-foreground-1)}#no-starting-points-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}`, R = _(f);
|
|
14
|
+
class $ extends v {
|
|
15
15
|
constructor() {
|
|
16
|
-
super(...arguments), this._messages =
|
|
17
|
-
const t = this.
|
|
16
|
+
super(...arguments), this._messages = w({ blocking: !0 }), this._viewModel = R(this), this._highlightHandles = [], this._handleRunTraceButtonClick = () => {
|
|
17
|
+
const t = this._traceInputsElement?.traceLocations?.some((a) => a.type === "starting-point");
|
|
18
18
|
if (this.traceError = void 0, !this._isSubnetworkNameTraceSelected && !t) {
|
|
19
19
|
this.showNoStartingPointsWarning = !0;
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
this.showNoStartingPointsWarning = !1, this.
|
|
23
|
-
}, this.
|
|
22
|
+
this.showNoStartingPointsWarning = !1, this._clearTraceResult(), this._switchTab("results"), this._runTrace();
|
|
23
|
+
}, this._handleTraceInputsRefChange = (e) => {
|
|
24
|
+
e && (this._traceInputsElement = e);
|
|
25
|
+
}, this._handleTraceResultsRefChange = (e) => {
|
|
26
|
+
e && (this._traceResultsElement = e);
|
|
27
|
+
}, this.activeTab = "input", this.showNoStartingPointsWarning = !1, this.mode = "default", this.allowEditingDisabled = !1, this.autoDestroyDisabled = !1, this.aggregatedGeometryGraphicsColor = new g([255, 255, 0, 0.6]), this.disableHighlightFeatureResults = !1, this.hideFeatureResults = !1, this.closable = !1, this.state = this._viewModel.state, this.view = this._viewModel.view, this.arcgisHideGraphicsChange = n(), this.arcgisTraceLocationSelectStart = n(), this.arcgisTraceLocationSelectEnd = n(), this.arcgisTraceResultFeaturesReady = n(), this.arcgisTraceResultClear = n(), this.arcgisReady = n();
|
|
24
28
|
}
|
|
25
29
|
static {
|
|
26
30
|
this.properties = { activeTab: 16, traceError: 16, traceResult: 16, showNoStartingPointsWarning: 16, mode: 16, allowEditingDisabled: 5, autoDestroyDisabled: 5, beforeTraceLocationSelectStart: 0, aggregatedGeometryGraphicsColor: 0, disableHighlightFeatureResults: 5, hideFeatureResults: 5, closable: 7, icon: 1, label: 3, messageOverrides: 0, traceResultFeatures: 32, referenceElement: 1, state: 32, view: 0 };
|
|
27
31
|
}
|
|
28
32
|
static {
|
|
29
|
-
this.styles =
|
|
33
|
+
this.styles = T;
|
|
30
34
|
}
|
|
31
35
|
get _allLayers() {
|
|
32
36
|
const { view: e } = this;
|
|
33
37
|
return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
|
|
34
38
|
}
|
|
35
39
|
get _isSubnetworkNameTraceSelected() {
|
|
36
|
-
const e = this.
|
|
37
|
-
return !!this.
|
|
40
|
+
const e = this._traceInputsElement?.selectedNamedTraceConfiguration?.traceType;
|
|
41
|
+
return !!this._traceInputsElement?.selectedNamedTraceConfiguration?.traceConfiguration?.subnetworkName && e === "subnetwork";
|
|
38
42
|
}
|
|
39
43
|
get traceResultFeatures() {
|
|
40
|
-
return this.
|
|
44
|
+
return this._traceResultsElement?.traceResultFeatures ?? [];
|
|
41
45
|
}
|
|
42
46
|
async destroy() {
|
|
43
|
-
|
|
47
|
+
this._clearHighlights(), this._traceResultsElement?.destroy(), this._traceInputsElement?.destroy(), await this.manager.destroy();
|
|
44
48
|
}
|
|
45
49
|
_clearTraceResult() {
|
|
46
|
-
this.traceResult = void 0, this._clearHighlights();
|
|
50
|
+
this.traceResult = void 0, this._clearHighlights(), this._clearAggregatedGeometryGraphics();
|
|
47
51
|
}
|
|
48
52
|
_switchTab(e) {
|
|
49
53
|
this.activeTab = e;
|
|
@@ -66,32 +70,35 @@ class C extends w {
|
|
|
66
70
|
_clearHighlights() {
|
|
67
71
|
this._highlightHandles.forEach((e) => e.remove()), this._highlightHandles = [];
|
|
68
72
|
}
|
|
73
|
+
_clearAggregatedGeometryGraphics() {
|
|
74
|
+
this._traceResultsElement?.clearAggregatedGeometryGraphics();
|
|
75
|
+
}
|
|
69
76
|
_highlightResults() {
|
|
70
77
|
const { traceResult: e, view: t } = this, a = this._viewModel.utilityNetwork;
|
|
71
78
|
if (!a || !e?.elements || !t)
|
|
72
79
|
return;
|
|
73
80
|
a.getObjectIdsFromElements(e.elements).forEach((i) => {
|
|
74
|
-
const
|
|
75
|
-
const c =
|
|
81
|
+
const l = t.allLayerViews.find((p) => {
|
|
82
|
+
const c = p.layer;
|
|
76
83
|
if (a.isUtilityLayer(c)) {
|
|
77
|
-
const
|
|
78
|
-
return c.layerId ===
|
|
84
|
+
const m = Number(i.layerUrl.split("/").pop());
|
|
85
|
+
return c.layerId === m;
|
|
79
86
|
}
|
|
80
87
|
return !1;
|
|
81
88
|
});
|
|
82
|
-
if (!
|
|
89
|
+
if (!l)
|
|
83
90
|
return;
|
|
84
|
-
const
|
|
85
|
-
this._highlightHandles.push(
|
|
91
|
+
const d = l.highlight(i.objectIds);
|
|
92
|
+
this._highlightHandles.push(d);
|
|
86
93
|
});
|
|
87
94
|
}
|
|
88
95
|
async _runTrace() {
|
|
89
|
-
const e = this.
|
|
96
|
+
const e = this._traceInputsElement?.selectedNamedTraceConfiguration, t = this._traceInputsElement?.unTraceConfiguration;
|
|
90
97
|
if (!(e?.traceType && t)) {
|
|
91
|
-
|
|
98
|
+
u("error", this, "Trace configuration not found");
|
|
92
99
|
return;
|
|
93
100
|
}
|
|
94
|
-
const a = this.
|
|
101
|
+
const a = this._traceInputsElement?.traceLocations;
|
|
95
102
|
try {
|
|
96
103
|
this.traceResult = await this._viewModel.executeTraceConfiguration({
|
|
97
104
|
traceType: e.traceType,
|
|
@@ -100,8 +107,8 @@ class C extends w {
|
|
|
100
107
|
resultTypes: e.resultTypes
|
|
101
108
|
}), this.disableHighlightFeatureResults || this._highlightResults();
|
|
102
109
|
} catch (s) {
|
|
103
|
-
const i = s,
|
|
104
|
-
|
|
110
|
+
const i = s, l = i.details ? { detail: i.details } : void 0;
|
|
111
|
+
u("error", this, `Error while running trace: ${String(i)}`, l), this.traceError = i, this.traceResult = void 0;
|
|
105
112
|
}
|
|
106
113
|
}
|
|
107
114
|
_handleHideGraphicsChange(e) {
|
|
@@ -118,7 +125,7 @@ class C extends w {
|
|
|
118
125
|
}
|
|
119
126
|
_handleAggregatedGeometryGraphicsColorChange(e) {
|
|
120
127
|
const t = e.detail;
|
|
121
|
-
this.aggregatedGeometryGraphicsColor = new
|
|
128
|
+
this.aggregatedGeometryGraphicsColor = new g(t);
|
|
122
129
|
}
|
|
123
130
|
_handleTraceInputsChange() {
|
|
124
131
|
}
|
|
@@ -126,27 +133,27 @@ class C extends w {
|
|
|
126
133
|
this.showNoStartingPointsWarning = !1;
|
|
127
134
|
}
|
|
128
135
|
_handleUtilityNetworkChange() {
|
|
129
|
-
this._viewModel.utilityNetwork = this.
|
|
136
|
+
this._viewModel.utilityNetwork = this._traceInputsElement?.selectedUtilityNetwork;
|
|
130
137
|
}
|
|
131
138
|
renderNoStartingPointsWarning() {
|
|
132
139
|
return r`<calcite-panel id=no-starting-points-panel><calcite-notice id=no-starting-points-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${() => this.showNoStartingPointsWarning = !1}><div slot=title>${this._messages.errors.noStartingPointsTitle}</div><div slot=message>${this._messages.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`;
|
|
133
140
|
}
|
|
134
141
|
renderResultsTab() {
|
|
135
|
-
return
|
|
142
|
+
return h(`${this.el.id}__results-tab-item`, r`<calcite-tab .selected=${this.activeTab === "results"}>${this._viewModel.state === "executing" ? r`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>` : r`<arcgis-utility-network-trace-results .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideFeatureResults=${this.hideFeatureResults} .referenceElement=${this.referenceElement} .layers=${this._allLayers} .traceConfigTitle=${this._selectedTraceConfig?.title} .traceError=${this.traceError} .traceResult=${this.traceResult} .utilityNetwork=${this._viewModel.utilityNetwork ?? void 0} .view=${this.view ?? void 0} .messageOverrides=${{ resultFeaturesAreHidden: this.messageOverrides?.resultFeaturesAreHidden }} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} @arcgisTraceResultFeaturesReady=${this._handleTraceResultFeaturesReady} @arcgisAggregatedGeometryGraphicsColorChange=${this._handleAggregatedGeometryGraphicsColorChange} .autoDestroyDisabled=${this.autoDestroyDisabled} ${o(this._handleTraceResultsRefChange)}></arcgis-utility-network-trace-results>`}</calcite-tab>`);
|
|
136
143
|
}
|
|
137
144
|
renderResultsFooter() {
|
|
138
145
|
const { mode: e } = this;
|
|
139
146
|
if (e !== "default")
|
|
140
147
|
return null;
|
|
141
|
-
const { traceResult: t } = this, s = !!(t?.elements.length || t?.globalFunctionResults.length || t?.aggregatedGeometry) && this.
|
|
148
|
+
const { traceResult: t } = this, s = !!(t?.elements.length || t?.globalFunctionResults.length || t?.aggregatedGeometry) && this._traceResultsElement?.state === "ready";
|
|
142
149
|
return r`<calcite-button appearance=outline width=full @click=${() => {
|
|
143
150
|
this._switchTab("input"), this._clearTraceResult(), this.arcgisTraceResultClear.emit();
|
|
144
151
|
}} .disabled=${!s} slot=footer>${this.traceResultFeatures.length > 0 && !this.hideFeatureResults ? this._messages.buttons.clearResultsCustom.replace("{number}", this.traceResultFeatures.length.toString()) : this._messages.buttons.clearResultsGeneric}</calcite-button>`;
|
|
145
152
|
}
|
|
146
153
|
renderInputTab() {
|
|
147
|
-
return
|
|
154
|
+
return h(`${this.el.id}__inputs-tab-item`, r`<calcite-tab .selected=${this.activeTab === "input"}><div class="inputs-tab-container">${this.showNoStartingPointsWarning && this.mode === "default" ? this.renderNoStartingPointsWarning() : null}<arcgis-utility-network-trace-inputs .view=${this.view || void 0} .referenceElement=${this.referenceElement} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceInputsChange=${this._handleTraceInputsChange} @arcgisSelectedNamedTraceConfigurationChange=${this._handleSelectedNamedTraceConfigurationChange} @arcgisUtilityNetworkChange=${this._handleUtilityNetworkChange} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisPropertyChange=${(e) => {
|
|
148
155
|
e.stopPropagation(), e.detail.name === "mode" && (this.mode = e.target.mode);
|
|
149
|
-
}} ${
|
|
156
|
+
}} .autoDestroyDisabled=${this.autoDestroyDisabled} ${o(this._handleTraceInputsRefChange)}></arcgis-utility-network-trace-inputs></div></calcite-tab>`);
|
|
150
157
|
}
|
|
151
158
|
renderInputFooter() {
|
|
152
159
|
const { mode: e, _viewModel: { state: t } } = this;
|
|
@@ -157,7 +164,7 @@ class C extends w {
|
|
|
157
164
|
return r`<calcite-panel .loading=${this.view === void 0}><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${() => this._switchTab("input")} .selected=${this.activeTab === "input"}>${e.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${() => this._switchTab("results")} .selected=${this.activeTab === "results"} .disabled=${s}>${e.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.view ? this.renderInputTab() : null}${this.view && this._viewModel.utilityNetwork ? this.renderResultsTab() : null}</calcite-tabs>${i}${this.activeTab === "input" ? this.renderInputFooter() : null}${this.activeTab === "results" ? this.renderResultsFooter() : null}</calcite-panel>`;
|
|
158
165
|
}
|
|
159
166
|
}
|
|
160
|
-
y("arcgis-utility-network-trace-analysis",
|
|
167
|
+
y("arcgis-utility-network-trace-analysis", $);
|
|
161
168
|
export {
|
|
162
|
-
|
|
169
|
+
$ as ArcgisUtilityNetworkTraceAnalysis
|
|
163
170
|
};
|
|
@@ -104,6 +104,16 @@ export abstract class ArcgisUtilityNetworkTraceInputs extends LitElement {
|
|
|
104
104
|
unknown: string;
|
|
105
105
|
warnings: { exceededDisplayLimit: string; };
|
|
106
106
|
}>;
|
|
107
|
+
/**
|
|
108
|
+
* If true, the component will not be destroyed automatically when it is
|
|
109
|
+
* disconnected from the document. This is useful when you want to move the
|
|
110
|
+
* component to a different place on the page, or temporarily hide it. If this
|
|
111
|
+
* is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-inputs/#destroy) method when you are done to
|
|
112
|
+
* prevent memory leaks.
|
|
113
|
+
*
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
accessor autoDestroyDisabled: boolean;
|
|
107
117
|
/**
|
|
108
118
|
* A function to run before trace location selection starts.
|
|
109
119
|
*
|
|
@@ -124,6 +134,8 @@ export abstract class ArcgisUtilityNetworkTraceInputs extends LitElement {
|
|
|
124
134
|
get unTraceConfiguration(): UNTraceConfiguration | undefined;
|
|
125
135
|
/** @required */
|
|
126
136
|
accessor view: MapView | undefined;
|
|
137
|
+
/** Permanently destroy the component. */
|
|
138
|
+
destroy(): Promise<void>;
|
|
127
139
|
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "mode"; }>;
|
|
128
140
|
/** Fires when the user changes the selected named trace configuration. */
|
|
129
141
|
readonly arcgisSelectedNamedTraceConfigurationChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|