@arcgis/map-components 5.1.0-next.45 → 5.1.0-next.46
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/6ZLSCYL5.js +2 -0
- package/dist/cdn/{YGC6EPZT.js → EJ3K6UKQ.js} +1 -1
- package/dist/cdn/{SSMJJQ7K.js → HRPEPALP.js} +1 -1
- package/dist/cdn/LYUX5DD5.js +2 -0
- package/dist/cdn/{UNDBLG66.js → OCGWSO54.js} +1 -1
- package/dist/cdn/UKU22VTN.js +2 -0
- package/dist/cdn/{6OLWNBTA.js → UMPYIYP6.js} +1 -1
- package/dist/cdn/{3SNOI43K.js → YSJ2M36J.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +6 -6
- package/dist/components/arcgis-editor/customElement.d.ts +36 -2
- package/dist/components/arcgis-editor/customElement.js +22 -13
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +37 -28
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +3 -3
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/package.json +4 -4
- package/dist/cdn/2EXP26TA.js +0 -2
- package/dist/cdn/AHCYJUL7.js +0 -2
- package/dist/cdn/R4FIN5ZR.js +0 -2
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as y } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as f, html as
|
|
3
|
+
import { css as f, html as s } from "lit";
|
|
4
4
|
import { ref as o } from "lit/directives/ref.js";
|
|
5
5
|
import { keyed as h } from "lit/directives/keyed.js";
|
|
6
6
|
import g from "@arcgis/core/Color.js";
|
|
7
7
|
import "@arcgis/core/core/Error.js";
|
|
8
|
-
import b from "@arcgis/core/
|
|
9
|
-
import
|
|
8
|
+
import { when as b } from "@arcgis/core/core/reactiveUtils.js";
|
|
9
|
+
import v from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
|
|
10
|
+
import { LitElement as w, createEvent as n } from "@arcgis/lumina";
|
|
10
11
|
import { log as u } from "@arcgis/toolkit/log";
|
|
11
|
-
import { u as
|
|
12
|
-
import { m as
|
|
13
|
-
const
|
|
14
|
-
class
|
|
12
|
+
import { u as _ } from "../../chunks/useT9n.js";
|
|
13
|
+
import { m as T } from "../../chunks/useViewModel.js";
|
|
14
|
+
const R = f`: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)}`, $ = T(v);
|
|
15
|
+
class C extends w {
|
|
15
16
|
constructor() {
|
|
16
|
-
super(...arguments), this._messages =
|
|
17
|
+
super(...arguments), this._messages = _({ blocking: !0 }), this._viewModel = $(this), this._highlightHandles = [], this._handleRunTraceButtonClick = () => {
|
|
17
18
|
const t = this._traceInputsElement?.traceLocations?.some((a) => a.type === "starting-point");
|
|
18
19
|
if (this.traceError = void 0, !this._isSubnetworkNameTraceSelected && !t) {
|
|
19
20
|
this.showNoStartingPointsWarning = !0;
|
|
@@ -24,13 +25,13 @@ class $ extends v {
|
|
|
24
25
|
e && (this._traceInputsElement = e);
|
|
25
26
|
}, this._handleTraceResultsRefChange = (e) => {
|
|
26
27
|
e && (this._traceResultsElement = e);
|
|
27
|
-
}, this.activeTab = "input", this.showNoStartingPointsWarning = !1, this.mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryGraphicsColor = new g([255, 255, 0, 0.6]), this.disableHighlightFeatureResults = !1, this.hideActionBar = !1, this.hideFeatureResults = !1, this.state = this._viewModel.state, this.view = this._viewModel.view, this.arcgisHideGraphicsChange =
|
|
28
|
+
}, this.activeTab = "input", this.showNoStartingPointsWarning = !1, this.mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryGraphicsColor = new g([255, 255, 0, 0.6]), this.disableHighlightFeatureResults = !1, this.hideActionBar = !1, this.hideFeatureResults = !1, this.state = this._viewModel.state, this.view = this._viewModel.view, this.arcgisHideGraphicsChange = n(), this.arcgisReady = n(), this.arcgisTraceLocationSelectEnd = n(), this.arcgisTraceLocationSelectStart = n(), this.arcgisTraceResultClear = n(), this.arcgisTraceResultFeaturesReady = n();
|
|
28
29
|
}
|
|
29
30
|
static {
|
|
30
31
|
this.properties = { activeTab: 16, traceError: 16, traceResult: 16, showNoStartingPointsWarning: 16, mode: 16, autoDestroyDisabled: 5, beforeTraceLocationSelectStart: 0, aggregatedGeometryGraphicsColor: 0, disableHighlightFeatureResults: 5, hideActionBar: 5, hideFeatureResults: 5, label: 3, messageOverrides: 0, traceResultFeatures: 32, referenceElement: 1, state: 32, view: 0 };
|
|
31
32
|
}
|
|
32
33
|
static {
|
|
33
|
-
this.styles =
|
|
34
|
+
this.styles = R;
|
|
34
35
|
}
|
|
35
36
|
get _allLayers() {
|
|
36
37
|
const { view: e } = this;
|
|
@@ -46,6 +47,11 @@ class $ extends v {
|
|
|
46
47
|
async destroy() {
|
|
47
48
|
this._clearHighlights(), this._traceResultsElement?.destroy(), this._traceInputsElement?.destroy(), await this.manager.destroy();
|
|
48
49
|
}
|
|
50
|
+
load() {
|
|
51
|
+
this.manager.onLifecycle(() => [
|
|
52
|
+
b(() => !this._viewModel.utilityNetwork, () => this._switchTab("input"))
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
49
55
|
_clearTraceResult() {
|
|
50
56
|
this.traceResult = void 0, this._clearHighlights(), this._clearAggregatedGeometryGraphics();
|
|
51
57
|
}
|
|
@@ -78,7 +84,7 @@ class $ extends v {
|
|
|
78
84
|
if (!a || !e?.elements || !t)
|
|
79
85
|
return;
|
|
80
86
|
a.getObjectIdsFromElements(e.elements).forEach((i) => {
|
|
81
|
-
const
|
|
87
|
+
const r = t.allLayerViews.find((p) => {
|
|
82
88
|
const c = p.layer;
|
|
83
89
|
if (a.isUtilityLayer(c)) {
|
|
84
90
|
const m = Number(i.layerUrl.split("/").pop());
|
|
@@ -86,9 +92,9 @@ class $ extends v {
|
|
|
86
92
|
}
|
|
87
93
|
return !1;
|
|
88
94
|
});
|
|
89
|
-
if (!
|
|
95
|
+
if (!r)
|
|
90
96
|
return;
|
|
91
|
-
const d =
|
|
97
|
+
const d = r.highlight(i.objectIds);
|
|
92
98
|
this._highlightHandles.push(d);
|
|
93
99
|
});
|
|
94
100
|
}
|
|
@@ -107,9 +113,9 @@ class $ extends v {
|
|
|
107
113
|
resultTypes: e.resultTypes,
|
|
108
114
|
outSpatialReference: this.view?.spatialReference
|
|
109
115
|
}), this.disableHighlightFeatureResults || this._highlightResults();
|
|
110
|
-
} catch (
|
|
111
|
-
const i =
|
|
112
|
-
u("error", this, `Error while running trace: ${String(i)}`,
|
|
116
|
+
} catch (l) {
|
|
117
|
+
const i = l, r = i.details ? { detail: i.details } : void 0;
|
|
118
|
+
u("error", this, `Error while running trace: ${String(i)}`, r), this.traceError = i, this.traceResult = void 0;
|
|
113
119
|
}
|
|
114
120
|
}
|
|
115
121
|
_handleHideGraphicsChange(e) {
|
|
@@ -137,35 +143,38 @@ class $ extends v {
|
|
|
137
143
|
this._viewModel.utilityNetwork = this._traceInputsElement?.selectedUtilityNetwork;
|
|
138
144
|
}
|
|
139
145
|
renderNoStartingPointsWarning() {
|
|
140
|
-
return
|
|
146
|
+
return s`<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>`;
|
|
141
147
|
}
|
|
142
148
|
renderResultsTab() {
|
|
143
|
-
return h(`${this.el.id}__results-tab-item`,
|
|
149
|
+
return h(`${this.el.id}__results-tab-item`, s`<calcite-tab .selected=${this.activeTab === "results"}>${this._viewModel.state === "executing" ? s`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>` : s`<arcgis-utility-network-trace-results .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideFeatureResults=${this.hideFeatureResults} .referenceElement=${this.referenceElement} .hideActionBar=${this.hideActionBar} .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>`);
|
|
144
150
|
}
|
|
145
151
|
renderResultsFooter() {
|
|
146
152
|
const { mode: e, state: t } = this;
|
|
147
153
|
if (e !== "default")
|
|
148
154
|
return null;
|
|
149
|
-
const { traceResult: a } = this, i = !!(a?.elements.length || a?.globalFunctionResults.length || a?.aggregatedGeometry) && this._traceResultsElement?.state === "ready",
|
|
150
|
-
return
|
|
155
|
+
const { traceResult: a } = this, i = !!(a?.elements.length || a?.globalFunctionResults.length || a?.aggregatedGeometry) && this._traceResultsElement?.state === "ready", r = this._traceResultsElement?.numResults ?? 0;
|
|
156
|
+
return s`<calcite-button appearance=outline width=full @click=${() => {
|
|
151
157
|
this._switchTab("input"), this._clearTraceResult(), this.arcgisTraceResultClear.emit();
|
|
152
|
-
}} .disabled=${!i} slot=footer>${
|
|
158
|
+
}} .disabled=${!i} slot=footer>${r > 0 && !this.hideFeatureResults && t !== "executing" ? this._messages.buttons.clearResultsCustom.replace("{number}", r.toString()) : this._messages.buttons.clearResultsGeneric}</calcite-button>`;
|
|
153
159
|
}
|
|
154
160
|
renderInputTab() {
|
|
155
|
-
return h(`${this.el.id}__inputs-tab-item`,
|
|
161
|
+
return h(`${this.el.id}__inputs-tab-item`, s`<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} .hideActionBar=${this.hideActionBar} @arcgisTraceInputsChange=${this._handleTraceInputsChange} @arcgisSelectedNamedTraceConfigurationChange=${this._handleSelectedNamedTraceConfigurationChange} @arcgisUtilityNetworkChange=${this._handleUtilityNetworkChange} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisPropertyChange=${(e) => {
|
|
156
162
|
e.stopPropagation(), e.detail.name === "mode" && (this.mode = e.target.mode);
|
|
157
163
|
}} .autoDestroyDisabled=${this.autoDestroyDisabled} ${o(this._handleTraceInputsRefChange)}></arcgis-utility-network-trace-inputs></div></calcite-tab>`);
|
|
158
164
|
}
|
|
159
165
|
renderInputFooter() {
|
|
160
|
-
const { mode: e,
|
|
161
|
-
|
|
166
|
+
const { mode: e, state: t } = this;
|
|
167
|
+
if (e !== "default")
|
|
168
|
+
return null;
|
|
169
|
+
const a = t === "disabled" || !this._traceInputsElement?.selectedNamedTraceConfiguration;
|
|
170
|
+
return s`<calcite-button appearance=solid width=full @click=${this._handleRunTraceButtonClick} slot=footer .disabled=${a}>${this._messages.buttons.getResults}</calcite-button>`;
|
|
162
171
|
}
|
|
163
172
|
render() {
|
|
164
|
-
const { _messages: e, _viewModel: {
|
|
165
|
-
return
|
|
173
|
+
const { _messages: e, _viewModel: { utilityNetwork: t, loadError: a, state: l } } = this, i = l === "disabled" && a != null, r = i && a !== "no-utility-network" ? s`<calcite-notice kind=warning open scale=s slot=content-top width=full><div slot=message>${this._getLoadError(a)}</div></calcite-notice>` : void 0;
|
|
174
|
+
return s`<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=${i || !t}>${e.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.view ? this.renderInputTab() : null}${this.view && t ? this.renderResultsTab() : null}</calcite-tabs>${r}${this.activeTab === "input" ? this.renderInputFooter() : null}${this.activeTab === "results" ? this.renderResultsFooter() : null}</calcite-panel>`;
|
|
166
175
|
}
|
|
167
176
|
}
|
|
168
|
-
y("arcgis-utility-network-trace-analysis",
|
|
177
|
+
y("arcgis-utility-network-trace-analysis", C);
|
|
169
178
|
export {
|
|
170
|
-
|
|
179
|
+
C as ArcgisUtilityNetworkTraceAnalysis
|
|
171
180
|
};
|
|
@@ -212,7 +212,7 @@ class B extends v {
|
|
|
212
212
|
await this.selectedUtilityNetwork?.load(), this._clearSubnetworks(), this._setupTraceConfigurations(), this._filterUnLayers(), this._clearTraceLocations();
|
|
213
213
|
}
|
|
214
214
|
_setupTraceConfigurations() {
|
|
215
|
-
this._unTraceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this.traceConfigurations = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter((e) => e.traceType !== "path" && e.traceType !== "circuit").sort((e, t) => e.title.localeCompare(t.title)) || [], this.selectedNamedTraceConfiguration = this.traceConfigurations.at(0);
|
|
215
|
+
this._unTraceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this.traceConfigurations = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter((e) => e.traceType !== "path" && e.traceType !== "circuit").sort((e, t) => e.title.localeCompare(t.title)) || [], this.selectedNamedTraceConfiguration = this.traceConfigurations.at(0);
|
|
216
216
|
}
|
|
217
217
|
_filterUnLayers() {
|
|
218
218
|
const { selectedUtilityNetwork: e } = this;
|
|
@@ -221,7 +221,7 @@ class B extends v {
|
|
|
221
221
|
_handleUtilityNetworksChange() {
|
|
222
222
|
const { utilityNetworks: e } = this;
|
|
223
223
|
if (!e || e.length === 0) {
|
|
224
|
-
this._state = "error", u("error", this, I("utilityNetworks"));
|
|
224
|
+
this.selectedUtilityNetwork = void 0, this._state = "error", u("error", this, I("utilityNetworks"));
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
227
|
(!this.selectedUtilityNetwork || !e.includes(this.selectedUtilityNetwork)) && (this.selectedUtilityNetwork = e.at(0));
|
|
@@ -328,7 +328,7 @@ class B extends v {
|
|
|
328
328
|
renderTraceSelection() {
|
|
329
329
|
const { _messages: e, traceConfigurations: t } = this, i = e.labels.traceConfiguration;
|
|
330
330
|
if (t.length === 0)
|
|
331
|
-
return this.renderError(e.errors.noTraceConfigurationError
|
|
331
|
+
return this.renderError(e.errors.noTraceConfigurationError);
|
|
332
332
|
const a = k(t, (r) => r.globalId, (r) => s`<calcite-option .value=${r.globalId}>${r.title}</calcite-option>`);
|
|
333
333
|
return s`<calcite-block .heading=${i} .label=${i} expanded><calcite-select .label=${i} .value=${this.selectedNamedTraceConfiguration?.globalId || void 0} @calciteSelectChange=${(r) => {
|
|
334
334
|
this._selectTraceConfigurationByGuid(r.target.value);
|