@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.
Files changed (94) hide show
  1. package/dist/cdn/3MDNGD5N.js +2 -0
  2. package/dist/cdn/4RYR4YDD.js +2 -0
  3. package/dist/cdn/{Y52XLS45.js → 4ULHWCEQ.js} +1 -1
  4. package/dist/cdn/{4IYAEXT6.js → 5AQ2DLHA.js} +1 -1
  5. package/dist/cdn/5GD232OU.js +2 -0
  6. package/dist/cdn/6C542P4V.js +2 -0
  7. package/dist/cdn/6XJLNNXF.js +2 -0
  8. package/dist/cdn/AYJ4XEW3.js +2 -0
  9. package/dist/cdn/BZZONX7U.js +2 -0
  10. package/dist/cdn/CO4UDHQO.js +5 -0
  11. package/dist/cdn/DXRIB5HU.js +2 -0
  12. package/dist/cdn/{AXEUVRDP.js → GYD6SJRD.js} +1 -1
  13. package/dist/cdn/HSRSC5A3.js +2 -0
  14. package/dist/cdn/KKN5ZNLH.js +2 -0
  15. package/dist/cdn/LCWKOR7D.js +2 -0
  16. package/dist/cdn/LFEMVA6D.js +2 -0
  17. package/dist/cdn/LWGNINKF.js +2 -0
  18. package/dist/cdn/{6T4SNDWL.js → N7YPGWHZ.js} +1 -1
  19. package/dist/cdn/NAW2XY64.js +2 -0
  20. package/dist/cdn/{RNUWRSX7.js → NESU6NXH.js} +1 -1
  21. package/dist/cdn/NVYQR4DS.js +2 -0
  22. package/dist/cdn/QO6WDURE.js +2 -0
  23. package/dist/cdn/RIZHD5EC.js +2 -0
  24. package/dist/cdn/UYF6TF6U.js +2 -0
  25. package/dist/cdn/WD25DNJL.js +2 -0
  26. package/dist/cdn/assets/utility-network-aggregated-geometry-result-item/t9n/messages.en.json +1 -0
  27. package/dist/cdn/assets/utility-network-trace-results-next/t9n/messages.en.json +1 -1
  28. package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.en.json +1 -1
  29. package/dist/cdn/index.js +1 -1
  30. package/dist/cdn/main.css +1 -1
  31. package/dist/chunks/titleUtils.js +40 -0
  32. package/dist/chunks/utils2.js +36 -71
  33. package/dist/components/arcgis-feature-table/customElement.js +1 -1
  34. package/dist/components/arcgis-layer-list/customElement.js +1 -1
  35. package/dist/components/arcgis-legend/customElement.js +1 -1
  36. package/dist/components/arcgis-legend-card-element/customElement.js +34 -33
  37. package/dist/components/arcgis-legend-card-univariate-above-and-below-ramp/customElement.js +11 -11
  38. package/dist/components/arcgis-legend-card-univariate-color-size-ramp/customElement.js +9 -9
  39. package/dist/components/arcgis-legend-card-view/customElement.js +1 -1
  40. package/dist/components/arcgis-legend-classic-color-ramp/customElement.js +15 -15
  41. package/dist/components/arcgis-legend-classic-element/customElement.js +39 -35
  42. package/dist/components/arcgis-legend-classic-size-ramp/customElement.js +5 -4
  43. package/dist/components/arcgis-legend-classic-univariate-above-and-below-ramp/customElement.js +6 -6
  44. package/dist/components/arcgis-legend-classic-univariate-color-size-ramp/customElement.js +3 -3
  45. package/dist/components/arcgis-legend-classic-view/customElement.js +41 -18
  46. package/dist/components/arcgis-legend-relationship-ramp/customElement.js +8 -8
  47. package/dist/components/arcgis-legend-spike-ramp/customElement.js +13 -13
  48. package/dist/components/arcgis-scene/customElement.d.ts +1 -0
  49. package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.d.ts +105 -0
  50. package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.js +125 -0
  51. package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/index.js +5 -0
  52. package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.d.ts +6 -0
  53. package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +9 -9
  54. package/dist/components/arcgis-utility-network-trace-analysis-next/types.d.ts +5 -4
  55. package/dist/components/arcgis-utility-network-trace-results-next/customElement.d.ts +4 -25
  56. package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +86 -86
  57. package/dist/components/arcgis-utility-network-trace-results-next/index.js +1 -4
  58. package/dist/components/arcgis-utility-network-validate-network-topology/customElement.d.ts +19 -0
  59. package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +129 -86
  60. package/dist/docs/api.json +1 -1
  61. package/dist/docs/docs.json +1 -1
  62. package/dist/docs/vscode.html-custom-data.json +1 -1
  63. package/dist/docs/web-types.json +1 -1
  64. package/dist/index.d.ts +7 -7
  65. package/dist/loader.js +3 -3
  66. package/dist/types/lumina.d.ts +6 -5
  67. package/dist/types/preact.d.ts +7 -6
  68. package/dist/types/react.d.ts +8 -7
  69. package/dist/types/stencil.d.ts +6 -5
  70. package/package.json +5 -5
  71. package/dist/cdn/2O6GHHUY.js +0 -2
  72. package/dist/cdn/7THMBHKF.js +0 -2
  73. package/dist/cdn/A6CH2UFJ.js +0 -2
  74. package/dist/cdn/AZSWPMSD.js +0 -2
  75. package/dist/cdn/CQV2TQUQ.js +0 -2
  76. package/dist/cdn/D75QAAQT.js +0 -5
  77. package/dist/cdn/GG4ZP72A.js +0 -2
  78. package/dist/cdn/GOIKNGEI.js +0 -2
  79. package/dist/cdn/HZR3HENL.js +0 -2
  80. package/dist/cdn/IIYUVBKU.js +0 -2
  81. package/dist/cdn/KUR5PBEN.js +0 -2
  82. package/dist/cdn/LIEZSWE4.js +0 -2
  83. package/dist/cdn/MOOIQJP4.js +0 -2
  84. package/dist/cdn/NJ4CBOJN.js +0 -2
  85. package/dist/cdn/SWDOEOEG.js +0 -2
  86. package/dist/cdn/TZTJY3L5.js +0 -2
  87. package/dist/cdn/X3TEGOBL.js +0 -2
  88. package/dist/cdn/XLAW24IV.js +0 -2
  89. package/dist/cdn/ZMLP2ZB4.js +0 -2
  90. package/dist/cdn/assets/utility-network-aggregated-geometry-next/t9n/messages.en.json +0 -1
  91. package/dist/components/arcgis-utility-network-aggregated-geometry-next/customElement.d.ts +0 -63
  92. package/dist/components/arcgis-utility-network-aggregated-geometry-next/customElement.js +0 -109
  93. package/dist/components/arcgis-utility-network-aggregated-geometry-next/index.js +0 -2
  94. /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 k } from "../../chunks/runtime.js";
3
- import { css as _, html as s } from "lit";
4
- import { getOwningPortalUrl as N, hasUserTypeExtension as V } from "@arcgis/core/applications/Components/featureUtils.js";
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 $ } from "@arcgis/core/core/reactiveUtils.js";
7
- import T from "@arcgis/core/portal/Portal.js";
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 { LitElement as A, createEvent as u, nothing as l } from "@arcgis/lumina";
10
- import { log as d, composeMissingPropertyMessage as y } from "@arcgis/toolkit/log";
11
- import { generateGuid as E } from "@arcgis/toolkit/string";
12
- import { u as U } from "../../chunks/useT9n.js";
13
- import { u as L } from "../../chunks/useView.js";
14
- import { c as S, i as C, l as I, t as n } from "../../chunks/async-utils.js";
15
- import { d as O } from "../../chunks/layer-utils.js";
16
- const D = _`: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}`, p = {
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 q extends A {
23
+ class z extends U {
23
24
  constructor() {
24
- super(...arguments), this._messages = U({ blocking: !0 }), this._unVntGuid = `unvnt_${E()}`, this.disabled = !1, this.extentToValidate = "current", this.hideUtilityNetworkSelect = !1, this.state = { type: "disabled" }, this.view = L(this), this.arcgisReady = u(), this.arcgisValidateNetworkTopologyEnd = u(), this.arcgisValidateNetworkTopologyStart = u();
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 = D;
31
+ this.styles = P;
31
32
  }
32
- async loaded() {
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._getDirtyAreasLayer(t) && this._runSetup();
64
+ this.#c(t) && this.#t();
37
65
  }),
38
66
  b(() => this.view?.map?.utilityNetworks, "change", () => {
39
- this._runSetup();
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
- $(() => this.view, () => {
42
- this._runSetup();
74
+ w(() => this.view, () => {
75
+ this.#t();
43
76
  }, { initial: !0 })
44
77
  ]);
45
78
  }
46
- _getDirtyAreasLayer(e) {
79
+ #c(e) {
47
80
  const t = this.utilityNetwork?.networkSystemLayers.dirtyAreasLayerUrl;
48
81
  if (t)
49
- return e.find((i) => O(i) && `${i.url}/${i.layerId}` === t);
82
+ return e.find((i) => q(i) && `${i.url}/${i.layerId}` === t);
50
83
  }
51
- async _handleValidateNetworkTopologyAction() {
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 }, d("warn", this, y("utilityNetwork"));
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
- d("info", this, this._messages.info.validateCanceled);
105
+ c("info", this, this._messages.info.validateCanceled);
73
106
  return;
74
107
  }
75
108
  this.state = { type: "executing" };
76
- const r = {
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(r), this.state = { type: "success", message: this._messages.status.success };
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: r } } } = this;
115
+ const { _messages: { errors: { cannotAcquireVersionLock: t, noDirtyAreasInExtent: i, operationOnlyAllowedByOwner: a } } } = this;
83
116
  this.result = void 0;
84
- const o = e, a = o.details?.raw?.extendedCode;
85
- let c = o.message || this._messages.info.validateCanceled;
86
- switch (a) {
87
- case p.noDirtyAreasInExtent:
88
- c = i;
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 p.cannotAcquireVersionLockV10:
91
- case p.cannotAcquireVersionLockV11:
92
- c = t;
123
+ case d.cannotAcquireVersionLockV10:
124
+ case d.cannotAcquireVersionLockV11:
125
+ l = t;
93
126
  break;
94
- case p.operationOnlyAllowedByOwner:
95
- c = r;
127
+ case d.operationOnlyAllowedByOwner:
128
+ l = a;
96
129
  break;
97
130
  }
98
- this.state = { type: "error-info", message: c };
131
+ this.state = { type: "error-info", message: l };
99
132
  } finally {
100
133
  this.arcgisValidateNetworkTopologyEnd.emit();
101
134
  }
102
135
  }
103
- async _runSetup() {
104
- this._setupTask?.abort();
105
- const e = S(async (t) => {
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 }, d("warn", this, y("view"));
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 r = i.map;
117
- await r.load({ signal: t }), n(t);
118
- const o = r.utilityNetworks ?? null;
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 a = this.utilityNetwork;
124
- if ((!a || !o.find((f) => f.id === a?.id)) && (a = o.getItemAt(0)), !a) {
125
- this.state = { type: "error-disable-component", message: this._messages.errors.noUtilityNetworks }, d("warn", this, y("utilityNetwork"));
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 a.load({ signal: t }), n(t);
129
- const g = (Number(a.sourceJSON.currentVersion) || 0) <= 11.1 ? "utilityNetwork" : "advediting", w = await N(a.layerUrl, { signal: t }) ?? void 0;
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 T({ url: w });
132
- await h.load({ signal: t }), n(t);
133
- const x = h.user?.username ?? "", v = await V(h, x, g);
134
- if (n(t), this._utilityNetworks = o, this.utilityNetwork = a, !v) {
135
- this.state = g === "advediting" ? { type: "error-disable-execute", message: this._messages.errors.noAdvancedEditingUserTypeExtension } : {
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._getDirtyAreasLayer(r.allLayers.toArray());
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.state = { type: "ready" };
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._setupTask = e;
192
+ this.#s = e;
149
193
  try {
150
194
  await e.promise;
151
195
  } catch (t) {
152
- if (C(t))
196
+ if (O(t))
153
197
  return;
154
- this.state = { type: "error-disable-execute", message: this._messages.errors.utilityNetworkLoadFailed }, I(t, this, this.state.message);
198
+ this.state = { type: "error-disable-execute", message: this._messages.errors.utilityNetworkLoadFailed }, D(t, this, this.state.message);
155
199
  } finally {
156
- this._setupTask === e && (this._setupTask = void 0);
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 s`<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) => {
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 s`<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>`;
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._unVntGuid}_status-icon`;
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 s`<calcite-icon icon=exclamation-mark-triangle id=${e ?? l} scale=s slot=actions-end></calcite-icon>`;
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 s`<calcite-action loading disabled slot=actions-end .text=${this._messages.status.executing}></calcite-action>`;
221
+ return r`<calcite-action loading disabled slot=actions-end .text=${this._messages.status.executing}></calcite-action>`;
178
222
  case "success":
179
- return s`<calcite-icon icon=check-circle id=${e ?? l} scale=s slot=actions-end></calcite-icon>`;
223
+ return r`<calcite-icon icon=check-circle id=${e ?? u} scale=s slot=actions-end></calcite-icon>`;
180
224
  default:
181
- return s`<calcite-icon icon=blank scale=m slot=actions-end></calcite-icon>`;
225
+ return r`<calcite-icon icon=blank scale=m slot=actions-end></calcite-icon>`;
182
226
  }
183
227
  }
184
228
  _renderUtilityNetworkCombobox() {
185
- if (!(!this._utilityNetworks || this._utilityNetworks?.length === 1 || this.state.type === "error-disable-component" || this.hideUtilityNetworkSelect))
186
- return s`<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) => {
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._utilityNetworks?.find((i) => i.id === t), this._runSetup();
189
- }}>${this._utilityNetworks.map((e) => s`<calcite-combobox-item .heading=${e.title} .selected=${e === this.utilityNetwork} .value=${e.id}></calcite-combobox-item>`)}</calcite-combobox>`;
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 === "error-disable-component")
193
- return;
194
- const e = `${this._unVntGuid}_execute-action`;
195
- return [
196
- s`<calcite-action .disabled=${this.disabled || this.state.type === "disabled" || this.state.type === "error-disable-execute" || this.state.type === "executing"} icon=play-f id=${e ?? l} @click=${this._handleValidateNetworkTopologyAction} slot=actions-end .text=${this._messages.actions.validateTopology}></calcite-action>`,
197
- s`<calcite-tooltip reference-element=${e ?? l}><span>${this._messages.actions.validateTopology}</span></calcite-tooltip>`
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(), r = this._renderExtentToValidateCombobox(), o = this._renderInfoNotice();
202
- return s`<calcite-panel .loading=${this.state.type === "loading"}><calcite-block collapsible expanded .heading=${this.label}>${e}${t}${i}${r}${o}</calcite-block></calcite-panel>`;
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
- k("arcgis-utility-network-validate-network-topology", q);
248
+ N("arcgis-utility-network-validate-network-topology", z);
206
249
  export {
207
- q as ArcgisUtilityNetworkValidateNetworkTopology
250
+ z as ArcgisUtilityNetworkValidateNetworkTopology
208
251
  };