@arcgis/map-components 5.2.0-next.75 → 5.2.0-next.76
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/3MDNGD5N.js +2 -0
- package/dist/cdn/4RYR4YDD.js +2 -0
- package/dist/cdn/{Y52XLS45.js → 4ULHWCEQ.js} +1 -1
- package/dist/cdn/{4IYAEXT6.js → 5AQ2DLHA.js} +1 -1
- package/dist/cdn/5GD232OU.js +2 -0
- package/dist/cdn/6C542P4V.js +2 -0
- package/dist/cdn/6XJLNNXF.js +2 -0
- package/dist/cdn/AYJ4XEW3.js +2 -0
- package/dist/cdn/BZZONX7U.js +2 -0
- package/dist/cdn/CO4UDHQO.js +5 -0
- package/dist/cdn/DXRIB5HU.js +2 -0
- package/dist/cdn/{AXEUVRDP.js → GYD6SJRD.js} +1 -1
- package/dist/cdn/HSRSC5A3.js +2 -0
- package/dist/cdn/KKN5ZNLH.js +2 -0
- package/dist/cdn/LCWKOR7D.js +2 -0
- package/dist/cdn/LFEMVA6D.js +2 -0
- package/dist/cdn/LWGNINKF.js +2 -0
- package/dist/cdn/{6T4SNDWL.js → N7YPGWHZ.js} +1 -1
- package/dist/cdn/NAW2XY64.js +2 -0
- package/dist/cdn/{RNUWRSX7.js → NESU6NXH.js} +1 -1
- package/dist/cdn/NVYQR4DS.js +2 -0
- package/dist/cdn/QO6WDURE.js +2 -0
- package/dist/cdn/RIZHD5EC.js +2 -0
- package/dist/cdn/UYF6TF6U.js +2 -0
- package/dist/cdn/WD25DNJL.js +2 -0
- package/dist/cdn/assets/utility-network-aggregated-geometry-result-item/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-results-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/titleUtils.js +40 -0
- package/dist/chunks/utils2.js +36 -71
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-layer-list/customElement.js +1 -1
- package/dist/components/arcgis-legend/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-element/customElement.js +34 -33
- package/dist/components/arcgis-legend-card-univariate-above-and-below-ramp/customElement.js +11 -11
- package/dist/components/arcgis-legend-card-univariate-color-size-ramp/customElement.js +9 -9
- package/dist/components/arcgis-legend-card-view/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-color-ramp/customElement.js +15 -15
- package/dist/components/arcgis-legend-classic-element/customElement.js +39 -35
- package/dist/components/arcgis-legend-classic-size-ramp/customElement.js +5 -4
- package/dist/components/arcgis-legend-classic-univariate-above-and-below-ramp/customElement.js +6 -6
- package/dist/components/arcgis-legend-classic-univariate-color-size-ramp/customElement.js +3 -3
- package/dist/components/arcgis-legend-classic-view/customElement.js +41 -18
- package/dist/components/arcgis-legend-relationship-ramp/customElement.js +8 -8
- package/dist/components/arcgis-legend-spike-ramp/customElement.js +13 -13
- package/dist/components/arcgis-scene/customElement.d.ts +1 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.d.ts +105 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.js +125 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/index.js +5 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.d.ts +6 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +9 -9
- package/dist/components/arcgis-utility-network-trace-analysis-next/types.d.ts +5 -4
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.d.ts +4 -25
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +86 -86
- package/dist/components/arcgis-utility-network-trace-results-next/index.js +1 -4
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.d.ts +19 -0
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +129 -86
- 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/index.d.ts +7 -7
- package/dist/loader.js +3 -3
- package/dist/types/lumina.d.ts +6 -5
- package/dist/types/preact.d.ts +7 -6
- package/dist/types/react.d.ts +8 -7
- package/dist/types/stencil.d.ts +6 -5
- package/package.json +5 -5
- package/dist/cdn/2O6GHHUY.js +0 -2
- package/dist/cdn/7THMBHKF.js +0 -2
- package/dist/cdn/A6CH2UFJ.js +0 -2
- package/dist/cdn/AZSWPMSD.js +0 -2
- package/dist/cdn/CQV2TQUQ.js +0 -2
- package/dist/cdn/D75QAAQT.js +0 -5
- package/dist/cdn/GG4ZP72A.js +0 -2
- package/dist/cdn/GOIKNGEI.js +0 -2
- package/dist/cdn/HZR3HENL.js +0 -2
- package/dist/cdn/IIYUVBKU.js +0 -2
- package/dist/cdn/KUR5PBEN.js +0 -2
- package/dist/cdn/LIEZSWE4.js +0 -2
- package/dist/cdn/MOOIQJP4.js +0 -2
- package/dist/cdn/NJ4CBOJN.js +0 -2
- package/dist/cdn/SWDOEOEG.js +0 -2
- package/dist/cdn/TZTJY3L5.js +0 -2
- package/dist/cdn/X3TEGOBL.js +0 -2
- package/dist/cdn/XLAW24IV.js +0 -2
- package/dist/cdn/ZMLP2ZB4.js +0 -2
- package/dist/cdn/assets/utility-network-aggregated-geometry-next/t9n/messages.en.json +0 -1
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/customElement.d.ts +0 -63
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/customElement.js +0 -109
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/index.js +0 -2
- /package/dist/components/{arcgis-utility-network-aggregated-geometry-next → arcgis-utility-network-aggregated-geometry-result-item}/index.d.ts +0 -0
|
@@ -1,54 +1,87 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { getOwningPortalUrl as
|
|
2
|
+
import { c as N } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as V, html as r } from "lit";
|
|
4
|
+
import { getOwningPortalUrl as $, hasUserTypeExtension as _ } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
5
5
|
import "@arcgis/core/core/Error.js";
|
|
6
|
-
import { on as b, watch as
|
|
7
|
-
import
|
|
6
|
+
import { on as b, watch as w, whenOnce as T } from "@arcgis/core/core/reactiveUtils.js";
|
|
7
|
+
import A from "@arcgis/core/portal/Portal.js";
|
|
8
8
|
import "@arcgis/core/rest/networks/support/ValidateNetworkTopologyResult.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { u as L } from "../../chunks/
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
9
|
+
import { getVersioningStates as E } from "@arcgis/core/versionManagement/utils.js";
|
|
10
|
+
import { LitElement as U, createEvent as p, nothing as u } from "@arcgis/lumina";
|
|
11
|
+
import { log as c, composeMissingPropertyMessage as g } from "@arcgis/toolkit/log";
|
|
12
|
+
import { generateGuid as I } from "@arcgis/toolkit/string";
|
|
13
|
+
import { u as L } from "../../chunks/useT9n.js";
|
|
14
|
+
import { u as S } from "../../chunks/useView.js";
|
|
15
|
+
import { c as C, i as O, l as D, t as n } from "../../chunks/async-utils.js";
|
|
16
|
+
import { d as q } from "../../chunks/layer-utils.js";
|
|
17
|
+
const P = V`: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%)}calcite-block{margin:0;border-bottom:none}calcite-combobox{margin-bottom:var(--calcite-spacing-sm)}calcite-icon{width:32px}`, d = {
|
|
17
18
|
noDirtyAreasInExtent: -2147208940,
|
|
18
19
|
operationOnlyAllowedByOwner: -2147217144,
|
|
19
20
|
cannotAcquireVersionLockV10: -2147217146,
|
|
20
21
|
cannotAcquireVersionLockV11: -2147220947
|
|
21
22
|
};
|
|
22
|
-
class
|
|
23
|
+
class z extends U {
|
|
23
24
|
constructor() {
|
|
24
|
-
super(...arguments), this._messages =
|
|
25
|
+
super(...arguments), this._messages = L({ blocking: !0 }), this.#o = `unvnt_${I()}`, this.disabled = !1, this.disableExecuteOnDefaultVersion = !1, this.extentToValidate = "current", this.hideUtilityNetworkSelect = !1, this.state = { type: "disabled" }, this.view = S(this), this.arcgisReady = p(), this.arcgisValidateNetworkTopologyEnd = p(), this.arcgisValidateNetworkTopologyStart = p();
|
|
25
26
|
}
|
|
26
27
|
static {
|
|
27
|
-
this.properties = { beforeValidateNetworkTopologyStart: 0, disabled: 5, extentToValidate: 1, hideUtilityNetworkSelect: 5, label: 1, messageOverrides: 0, referenceElement: 1, result: 0, state: 0, utilityNetwork: 0, view: 0 };
|
|
28
|
+
this.properties = { beforeValidateNetworkTopologyStart: 0, disabled: 5, disableExecuteOnDefaultVersion: 5, extentToValidate: 1, hideUtilityNetworkSelect: 5, label: 1, messageOverrides: 0, referenceElement: 1, result: 0, state: 0, utilityNetwork: 0, view: 0 };
|
|
28
29
|
}
|
|
29
30
|
static {
|
|
30
|
-
this.styles =
|
|
31
|
+
this.styles = P;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
get #n() {
|
|
34
|
+
return `${this.#o}_execute-action`;
|
|
35
|
+
}
|
|
36
|
+
get #a() {
|
|
37
|
+
return this._messages.actions.validateTopology + (this.extentToValidate === "current" ? ` ${this._messages.input.selectExtent.options.currentExtent.toLowerCase()}` : ` ${this._messages.input.selectExtent.options.entireExtent.toLowerCase()}`);
|
|
38
|
+
}
|
|
39
|
+
get #d() {
|
|
40
|
+
return this.#r.isDefault;
|
|
41
|
+
}
|
|
42
|
+
get #h() {
|
|
43
|
+
return this.#r?.currentVersionInfo?.access === "protected";
|
|
44
|
+
}
|
|
45
|
+
get #p() {
|
|
46
|
+
return this.#i?.privileges?.includes("features:user:manageVersions") ?? !1;
|
|
47
|
+
}
|
|
48
|
+
get #u() {
|
|
49
|
+
const e = this.#r?.currentVersionInfo?.versionIdentifier.name;
|
|
50
|
+
return e?.substring(0, e.lastIndexOf("."))?.toUpperCase() === this.#i?.username?.toUpperCase();
|
|
51
|
+
}
|
|
52
|
+
#i;
|
|
53
|
+
#s;
|
|
54
|
+
#o;
|
|
55
|
+
#e;
|
|
56
|
+
get #r() {
|
|
57
|
+
return this.#l?.find((e) => e.featureServiceUrl === this.utilityNetwork?.featureServiceUrl);
|
|
58
|
+
}
|
|
59
|
+
#l;
|
|
60
|
+
async load() {
|
|
33
61
|
this.manager.onLifecycle(() => [
|
|
34
62
|
b(() => this.view?.map?.allLayers, "change", (e) => {
|
|
35
63
|
const t = e.added.concat(e.removed);
|
|
36
|
-
this
|
|
64
|
+
this.#c(t) && this.#t();
|
|
37
65
|
}),
|
|
38
66
|
b(() => this.view?.map?.utilityNetworks, "change", () => {
|
|
39
|
-
this
|
|
67
|
+
this.#t();
|
|
68
|
+
}),
|
|
69
|
+
w(() => this.utilityNetwork?.gdbVersion, () => {
|
|
70
|
+
T(() => this.utilityNetwork?.gdbVersion === this.#r?.currentVersionInfo?.versionIdentifier.name).then(() => {
|
|
71
|
+
this.#t();
|
|
72
|
+
});
|
|
40
73
|
}),
|
|
41
|
-
|
|
42
|
-
this
|
|
74
|
+
w(() => this.view, () => {
|
|
75
|
+
this.#t();
|
|
43
76
|
}, { initial: !0 })
|
|
44
77
|
]);
|
|
45
78
|
}
|
|
46
|
-
|
|
79
|
+
#c(e) {
|
|
47
80
|
const t = this.utilityNetwork?.networkSystemLayers.dirtyAreasLayerUrl;
|
|
48
81
|
if (t)
|
|
49
|
-
return e.find((i) =>
|
|
82
|
+
return e.find((i) => q(i) && `${i.url}/${i.layerId}` === t);
|
|
50
83
|
}
|
|
51
|
-
async
|
|
84
|
+
async #g() {
|
|
52
85
|
try {
|
|
53
86
|
if (this.result = void 0, !this.view) {
|
|
54
87
|
this.state = { type: "error-disable-component", message: this._messages.errors.noView };
|
|
@@ -65,144 +98,154 @@ class q extends A {
|
|
|
65
98
|
return;
|
|
66
99
|
}
|
|
67
100
|
if (!t) {
|
|
68
|
-
this.state = { type: "error-disable-component", message: this._messages.errors.noUtilityNetwork },
|
|
101
|
+
this.state = { type: "error-disable-component", message: this._messages.errors.noUtilityNetwork }, c("warn", this, g("utilityNetwork"));
|
|
69
102
|
return;
|
|
70
103
|
}
|
|
71
104
|
if (this.arcgisValidateNetworkTopologyStart.emit().defaultPrevented) {
|
|
72
|
-
|
|
105
|
+
c("info", this, this._messages.info.validateCanceled);
|
|
73
106
|
return;
|
|
74
107
|
}
|
|
75
108
|
this.state = { type: "executing" };
|
|
76
|
-
const
|
|
109
|
+
const a = {
|
|
77
110
|
outSpatialReference: e.spatialReference?.clone() || null,
|
|
78
111
|
validateArea: this.extentToValidate === "current" || !t.fullExtent ? e.extent.clone() : t.fullExtent.clone()
|
|
79
112
|
};
|
|
80
|
-
this.result = await t.validateTopology(
|
|
113
|
+
this.result = await t.validateTopology(a), this.state = { type: "success", message: this._messages.status.success };
|
|
81
114
|
} catch (e) {
|
|
82
|
-
const { _messages: { errors: { cannotAcquireVersionLock: t, noDirtyAreasInExtent: i, operationOnlyAllowedByOwner:
|
|
115
|
+
const { _messages: { errors: { cannotAcquireVersionLock: t, noDirtyAreasInExtent: i, operationOnlyAllowedByOwner: a } } } = this;
|
|
83
116
|
this.result = void 0;
|
|
84
|
-
const o = e,
|
|
85
|
-
let
|
|
86
|
-
switch (
|
|
87
|
-
case
|
|
88
|
-
|
|
117
|
+
const o = e, s = o.details?.raw?.extendedCode;
|
|
118
|
+
let l = o.message || this._messages.info.validateCanceled;
|
|
119
|
+
switch (s) {
|
|
120
|
+
case d.noDirtyAreasInExtent:
|
|
121
|
+
l = i;
|
|
89
122
|
break;
|
|
90
|
-
case
|
|
91
|
-
case
|
|
92
|
-
|
|
123
|
+
case d.cannotAcquireVersionLockV10:
|
|
124
|
+
case d.cannotAcquireVersionLockV11:
|
|
125
|
+
l = t;
|
|
93
126
|
break;
|
|
94
|
-
case
|
|
95
|
-
|
|
127
|
+
case d.operationOnlyAllowedByOwner:
|
|
128
|
+
l = a;
|
|
96
129
|
break;
|
|
97
130
|
}
|
|
98
|
-
this.state = { type: "error-info", message:
|
|
131
|
+
this.state = { type: "error-info", message: l };
|
|
99
132
|
} finally {
|
|
100
133
|
this.arcgisValidateNetworkTopologyEnd.emit();
|
|
101
134
|
}
|
|
102
135
|
}
|
|
103
|
-
async
|
|
104
|
-
this
|
|
105
|
-
const e =
|
|
136
|
+
async #t() {
|
|
137
|
+
this.#s?.abort();
|
|
138
|
+
const e = C(async (t) => {
|
|
106
139
|
this.state = { type: "loading" }, this.result = void 0;
|
|
107
140
|
const { view: i } = this;
|
|
108
141
|
if (!i) {
|
|
109
|
-
this.utilityNetwork = void 0, this.state = { type: "error-disable-component", message: this._messages.errors.noView },
|
|
142
|
+
this.utilityNetwork = void 0, this.state = { type: "error-disable-component", message: this._messages.errors.noView }, c("warn", this, g("view"));
|
|
110
143
|
return;
|
|
111
144
|
}
|
|
112
145
|
if (i.type !== "2d") {
|
|
113
146
|
this.utilityNetwork = void 0, this.state = { type: "error-disable-component", message: this._messages.errors.sceneViewNotSupported };
|
|
114
147
|
return;
|
|
115
148
|
}
|
|
116
|
-
const
|
|
117
|
-
await
|
|
118
|
-
const o =
|
|
149
|
+
const a = i.map;
|
|
150
|
+
await a.load({ signal: t }), n(t);
|
|
151
|
+
const o = a.utilityNetworks ?? null;
|
|
119
152
|
if (!o?.length) {
|
|
120
153
|
this.utilityNetwork = void 0, this.state = { type: "error-disable-component", message: this._messages.errors.noUtilityNetworks };
|
|
121
154
|
return;
|
|
122
155
|
}
|
|
123
|
-
let
|
|
124
|
-
if ((!
|
|
125
|
-
this.state = { type: "error-disable-component", message: this._messages.errors.noUtilityNetworks },
|
|
156
|
+
let s = this.utilityNetwork;
|
|
157
|
+
if ((!s || !o.find((k) => k.id === s?.id)) && (s = o.getItemAt(0)), !s) {
|
|
158
|
+
this.state = { type: "error-disable-component", message: this._messages.errors.noUtilityNetworks }, c("warn", this, g("utilityNetwork"));
|
|
126
159
|
return;
|
|
127
160
|
}
|
|
128
|
-
await
|
|
129
|
-
const
|
|
161
|
+
await s.load({ signal: t }), n(t);
|
|
162
|
+
const y = (Number(s.sourceJSON.currentVersion) || 0) <= 11.1 ? "utilityNetwork" : "advediting", x = await $(s.layerUrl, { signal: t }) ?? void 0;
|
|
130
163
|
n(t);
|
|
131
|
-
const h = new
|
|
132
|
-
await h.load({ signal: t }), n(t);
|
|
133
|
-
const
|
|
134
|
-
if (n(t), this
|
|
135
|
-
this.state =
|
|
164
|
+
const h = new A({ url: x });
|
|
165
|
+
await h.load({ signal: t }), n(t), this.#i = h.user;
|
|
166
|
+
const f = this.#i?.username ?? "", v = await _(h, f, y);
|
|
167
|
+
if (n(t), this.#e = o, this.utilityNetwork = s, !v) {
|
|
168
|
+
this.state = y === "advediting" ? { type: "error-disable-execute", message: this._messages.errors.noAdvancedEditingUserTypeExtension } : {
|
|
136
169
|
type: "error-disable-execute",
|
|
137
170
|
message: this._messages.errors.noUtilityNetworkServiceUserTypeExtension
|
|
138
171
|
};
|
|
139
172
|
return;
|
|
140
173
|
}
|
|
141
|
-
const m = this
|
|
174
|
+
const m = this.#c(a.allLayers.toArray());
|
|
142
175
|
if (!m) {
|
|
143
176
|
this.state = { type: "error-disable-execute", message: this._messages.errors.noDirtyAreasLayer };
|
|
144
177
|
return;
|
|
145
178
|
}
|
|
146
|
-
await m.load({ signal: t }), n(t), this
|
|
179
|
+
if (await m.load({ signal: t }), n(t), this.#l = await E(this.view, !1), this.#d && this.disableExecuteOnDefaultVersion) {
|
|
180
|
+
this.state = {
|
|
181
|
+
type: "error-disable-execute",
|
|
182
|
+
message: this._messages.errors.operationDisabledOnDefaultVersion
|
|
183
|
+
};
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (this.#h && !this.#u && !this.#p) {
|
|
187
|
+
this.state = { type: "error-disable-execute", message: this._messages.errors.operationOnlyAllowedByOwner };
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
this.state = { type: "ready" };
|
|
147
191
|
});
|
|
148
|
-
this
|
|
192
|
+
this.#s = e;
|
|
149
193
|
try {
|
|
150
194
|
await e.promise;
|
|
151
195
|
} catch (t) {
|
|
152
|
-
if (
|
|
196
|
+
if (O(t))
|
|
153
197
|
return;
|
|
154
|
-
this.state = { type: "error-disable-execute", message: this._messages.errors.utilityNetworkLoadFailed },
|
|
198
|
+
this.state = { type: "error-disable-execute", message: this._messages.errors.utilityNetworkLoadFailed }, D(t, this, this.state.message);
|
|
155
199
|
} finally {
|
|
156
|
-
this
|
|
200
|
+
this.#s === e && (this.#s = void 0);
|
|
157
201
|
}
|
|
158
202
|
}
|
|
159
203
|
_renderExtentToValidateCombobox() {
|
|
160
204
|
if (this.state.type !== "error-disable-component")
|
|
161
|
-
return
|
|
205
|
+
return r`<calcite-combobox .disabled=${this.disabled || this.state.type === "disabled" || this.state.type === "executing"} .label=${this._messages.input.selectExtent.label} .labelText=${this._messages.input.selectExtent.label} selection-mode=single-persist @calciteComboboxChange=${(e) => {
|
|
162
206
|
this.extentToValidate = e.target.value;
|
|
163
207
|
}}><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.currentExtent} .selected=${this.extentToValidate === "current"} value=current></calcite-combobox-item><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.entireExtent} .selected=${this.extentToValidate === "entire"} value=entire></calcite-combobox-item></calcite-combobox>`;
|
|
164
208
|
}
|
|
165
209
|
_renderInfoNotice() {
|
|
166
210
|
if (this.state.type === "error-disable-component" || this.state.type === "error-disable-execute" || this.state.type === "error-info" || this.state.type === "success")
|
|
167
|
-
return
|
|
211
|
+
return r`<calcite-notice .closable=${this.state.type === "error-info" || this.state.type === "success"} .kind=${this.state.type === "success" ? "success" : "warning"} open scale=s width=full @calciteNoticeClose=${() => this.state = { type: "ready" }}><div slot=message>${this.state.message}</div></calcite-notice>`;
|
|
168
212
|
}
|
|
169
213
|
_renderStatusIcon() {
|
|
170
|
-
const e = `${this
|
|
214
|
+
const e = `${this.#o}_status-icon`;
|
|
171
215
|
switch (this.state.type) {
|
|
172
216
|
case "error-disable-component":
|
|
173
217
|
case "error-disable-execute":
|
|
174
218
|
case "error-info":
|
|
175
|
-
return
|
|
219
|
+
return r`<calcite-icon icon=exclamation-mark-triangle id=${e ?? u} scale=s slot=actions-end></calcite-icon>`;
|
|
176
220
|
case "executing":
|
|
177
|
-
return
|
|
221
|
+
return r`<calcite-action loading disabled slot=actions-end .text=${this._messages.status.executing}></calcite-action>`;
|
|
178
222
|
case "success":
|
|
179
|
-
return
|
|
223
|
+
return r`<calcite-icon icon=check-circle id=${e ?? u} scale=s slot=actions-end></calcite-icon>`;
|
|
180
224
|
default:
|
|
181
|
-
return
|
|
225
|
+
return r`<calcite-icon icon=blank scale=m slot=actions-end></calcite-icon>`;
|
|
182
226
|
}
|
|
183
227
|
}
|
|
184
228
|
_renderUtilityNetworkCombobox() {
|
|
185
|
-
if (!(!this
|
|
186
|
-
return
|
|
229
|
+
if (!(!this.#e || this.#e?.length === 1 || this.state.type === "error-disable-component" || this.hideUtilityNetworkSelect))
|
|
230
|
+
return r`<calcite-combobox .disabled=${this.state.type === "executing"} .label=${this._messages.input.selectUtilityNetwork.label} .labelText=${this._messages.input.selectUtilityNetwork.label} selection-mode=single-persist @calciteComboboxChange=${(e) => {
|
|
187
231
|
const t = e.target.value;
|
|
188
|
-
this.utilityNetwork = this
|
|
189
|
-
}}>${this.
|
|
232
|
+
this.utilityNetwork = this.#e?.find((i) => i.id === t), this.#t();
|
|
233
|
+
}}>${this.#e.map((e) => r`<calcite-combobox-item .heading=${e.title} .selected=${e === this.utilityNetwork} .value=${e.id}></calcite-combobox-item>`)}</calcite-combobox>`;
|
|
190
234
|
}
|
|
191
235
|
_renderValidateNetworkTopologyAction() {
|
|
192
|
-
if (this.state.type
|
|
193
|
-
return
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
];
|
|
236
|
+
if (this.state.type !== "error-disable-component")
|
|
237
|
+
return r`<calcite-action .disabled=${this.disabled || this.state.type === "disabled" || this.state.type === "error-disable-execute" || this.state.type === "executing"} icon=play-f id=${this.#n ?? u} .label=${this.#a} slot=actions-end .text=${this.#a} @click=${this.#g}></calcite-action>`;
|
|
238
|
+
}
|
|
239
|
+
_renderValidateNetworkTopologyActionTooltip() {
|
|
240
|
+
if (this.state.type !== "error-disable-component")
|
|
241
|
+
return r`<calcite-tooltip .referenceElement=${this.#n}><span>${this.#a}</span></calcite-tooltip>`;
|
|
199
242
|
}
|
|
200
243
|
render() {
|
|
201
|
-
const e = this._renderStatusIcon(), t = this._renderValidateNetworkTopologyAction(), i = this._renderUtilityNetworkCombobox(),
|
|
202
|
-
return
|
|
244
|
+
const e = this._renderStatusIcon(), t = this._renderValidateNetworkTopologyAction(), i = this._renderValidateNetworkTopologyActionTooltip(), a = this._renderUtilityNetworkCombobox(), o = this._renderExtentToValidateCombobox(), s = this._renderInfoNotice();
|
|
245
|
+
return r`<calcite-panel .loading=${this.state.type === "loading"}><calcite-block collapsible expanded .heading=${this.label}>${e}${t}${a}${o}${s}</calcite-block>${i}</calcite-panel>`;
|
|
203
246
|
}
|
|
204
247
|
}
|
|
205
|
-
|
|
248
|
+
N("arcgis-utility-network-validate-network-topology", z);
|
|
206
249
|
export {
|
|
207
|
-
|
|
250
|
+
z as ArcgisUtilityNetworkValidateNetworkTopology
|
|
208
251
|
};
|