@arcgis/map-components 5.1.0-next.70 → 5.1.0-next.72
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/3E5YVI67.js +2 -0
- package/dist/cdn/DSWEKHYV.js +2 -0
- package/dist/cdn/EQVGDKPR.js +2 -0
- package/dist/cdn/ISTXVEU6.js +2 -0
- package/dist/cdn/MEHQNI5S.js +2 -0
- package/dist/cdn/Z4OSJFVK.js +2 -0
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/slider-scale-range/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-trace-location-list/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-popup/customElement.d.ts +0 -1
- package/dist/components/arcgis-presentation/PresentationViewModel.d.ts +1 -3
- package/dist/components/arcgis-presentation/customElement.d.ts +0 -48
- package/dist/components/arcgis-presentation/customElement.js +87 -242
- package/dist/components/arcgis-slider-scale-range/customElement.d.ts +2 -0
- package/dist/components/arcgis-slider-scale-range/customElement.js +52 -51
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +6 -0
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +22 -25
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +9 -1
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +22 -19
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +24 -22
- package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +18 -18
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -3
- package/dist/types/preact.d.ts +1 -3
- package/dist/types/react.d.ts +1 -3
- package/dist/types/stencil.d.ts +1 -3
- package/package.json +4 -4
- package/dist/cdn/66MVIWL6.js +0 -2
- package/dist/cdn/A5EKENWD.js +0 -2
- package/dist/cdn/CCU5PXRH.js +0 -2
- package/dist/cdn/LE4EZMBM.js +0 -2
- package/dist/cdn/PF6CET5C.js +0 -2
- package/dist/cdn/WYTALJLT.js +0 -2
- /package/dist/cdn/assets/slider-scale-range/t9n/{ScaleRangeSlider.json → messages.ScaleRangeSlider.json} +0 -0
|
@@ -84,7 +84,7 @@ const h = /* @__PURE__ */ new Set([
|
|
|
84
84
|
"th-th",
|
|
85
85
|
"zh-cn",
|
|
86
86
|
"zh-tw"
|
|
87
|
-
]), R = y`:host{display:block;width:310px;max-width:100%}.slider{height:50px}.scale-indicator-container{position:relative;width:100%;margin-top:5px}.scale-indicator-icon{transform:scale(.8,1.7);margin-left:-6px;width:1px}.scale-menu-list{max-height:220px;overflow-y:auto}.scale-menu-input{max-width:120px}.scale-menu-button-container{display:flex;direction:ltr;justify-content:space-between}.scale-menu-button{min-width:0}:dir(rtl) .scale-menu-button-container>*{direction:rtl}.preview-container{padding:6px;background-color:var(--calcite-color-foreground-1);box-shadow:0 1px 2px #0000004d}`,
|
|
87
|
+
]), R = y`:host{display:block;width:310px;max-width:100%}.slider{height:50px}.scale-indicator-container{position:relative;width:100%;margin-top:5px}.scale-indicator-icon{transform:scale(.8,1.7);margin-left:-6px;width:1px}.scale-menu-list{max-height:220px;overflow-y:auto}.scale-menu-input{max-width:120px}.scale-menu-button-container{display:flex;direction:ltr;justify-content:space-between}.scale-menu-button{min-width:0}:dir(rtl) .scale-menu-button-container>*{direction:rtl}.preview-container{padding:6px;background-color:var(--calcite-color-foreground-1);box-shadow:0 1px 2px #0000004d}`, l = [
|
|
88
88
|
{ id: "world", scale: 147914382, minScale: 147914382, maxScale: 1e8 },
|
|
89
89
|
{ id: "continent", scale: 5e7, minScale: 99999999, maxScale: 35e6 },
|
|
90
90
|
{ id: "countriesBig", scale: 25e6, minScale: 34999999, maxScale: 15e6 },
|
|
@@ -108,7 +108,7 @@ const h = /* @__PURE__ */ new Set([
|
|
|
108
108
|
];
|
|
109
109
|
class I extends g {
|
|
110
110
|
constructor() {
|
|
111
|
-
super(...arguments), this.messages = L(), this._sliderRef = $(), this._activeMenu = null, this._customScaleSelected = null, this._portalRegion = null, this._layerMaxScaleLimit =
|
|
111
|
+
super(...arguments), this.messages = L(), this._sliderRef = $(), this._activeMenu = null, this._customScaleSelected = null, this._portalRegion = null, this._layerMaxScaleLimit = l[l.length - 1].maxScale, this._layerMinScaleLimit = l[0].minScale, this.autoDestroyDisabled = !1, this.disabled = !1, this.hidePreview = !1, this.hideMaxScaleMenu = !1, this.hideMinScaleMenu = !1, this.icon = "actual-size", this.maxScale = 0, this.maxScaleLimit = l[l.length - 1].maxScale, this.minScale = 0, this.minScaleLimit = l[0].minScale, this.mode = "range", this.showWorldValue = !1, this.view = v(this), this.arcgisChange = d(), this.arcgisInput = d(), this.arcgisPropertyChange = b()("state", "minScale", "maxScale"), this.arcgisReady = d();
|
|
112
112
|
}
|
|
113
113
|
static {
|
|
114
114
|
this.properties = { _activeMenu: 16, _customScaleSelected: 16, _portalRegion: 16, _layerMaxScaleLimit: 16, _layerMinScaleLimit: 16, autoDestroyDisabled: 5, disabled: 7, hidePreview: 5, hideMaxScaleMenu: 5, hideMinScaleMenu: 5, icon: 1, label: 1, layer: 0, maxScale: 9, maxScaleLimit: 9, minScale: 9, minScaleLimit: 9, mode: 1, referenceElement: 1, region: 1, showWorldValue: 5, state: 32, view: 0 };
|
|
@@ -139,8 +139,8 @@ class I extends g {
|
|
|
139
139
|
}
|
|
140
140
|
loaded() {
|
|
141
141
|
T.getDefault().load().then((i) => {
|
|
142
|
-
const
|
|
143
|
-
|
|
142
|
+
const a = i.user?.culture ?? i.culture;
|
|
143
|
+
a && (this._portalRegion = a.split("-")[1]?.toLowerCase() ?? null);
|
|
144
144
|
}).catch(() => {
|
|
145
145
|
}), this.manager.onLifecycle(() => [
|
|
146
146
|
x(() => this.view?.scale, () => this.requestUpdate(), { initial: !0 }),
|
|
@@ -148,12 +148,12 @@ class I extends g {
|
|
|
148
148
|
// Layer type has loaded property, but Sublayer and SubtypeSublayer use loadStatus instead
|
|
149
149
|
loaded: this.layer?.loadStatus === "loaded",
|
|
150
150
|
ready: this.view?.ready
|
|
151
|
-
}), ({ loaded: i, ready:
|
|
152
|
-
if (!i || !
|
|
151
|
+
}), ({ loaded: i, ready: a }) => {
|
|
152
|
+
if (!i || !a || !this.layer)
|
|
153
153
|
return;
|
|
154
154
|
const s = this.layer.type === "wcs" || this.layer.type === "imagery-tile" && this.layer.raster?.tileType === "Raster" ? null : "tileInfo" in this.layer ? this.layer.tileInfo?.lods : null;
|
|
155
155
|
if (s)
|
|
156
|
-
this._layerMinScaleLimit = s[0].scale === 0 ?
|
|
156
|
+
this._layerMinScaleLimit = s[0].scale === 0 ? l[0].minScale : Math.min(l[0].minScale, s[0].scale), !("resampling" in this.layer) || this.layer.resampling || (this._layerMaxScaleLimit = s[s.length - 1].scale);
|
|
157
157
|
else {
|
|
158
158
|
const m = this.layer && "maxScaleRange" in this.layer ? this.layer.maxScaleRange : null;
|
|
159
159
|
let n = 0, o = 0;
|
|
@@ -175,33 +175,34 @@ class I extends g {
|
|
|
175
175
|
return e === "min" ? Math.min(Math.max(i, this._effectiveMaxScale + 1), this.minScaleLimit) : Math.max(Math.min(i, this._effectiveMinScale - 1), this.maxScaleLimit);
|
|
176
176
|
}
|
|
177
177
|
_getDropdownLabel(e) {
|
|
178
|
-
const i = e === "min" ? this._effectiveMinScale : this._effectiveMaxScale,
|
|
179
|
-
return
|
|
178
|
+
const i = e === "min" ? this._effectiveMinScale : this._effectiveMaxScale, a = Math.floor(this._mapScaleToSlider(i)), t = this.messages.scaleRangeLabels;
|
|
179
|
+
return t ? t[l[a].id] : "";
|
|
180
180
|
}
|
|
181
181
|
_getSpriteSheetFile() {
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
const e = this.messages._lang.toLowerCase();
|
|
183
|
+
if (h.has(e))
|
|
184
|
+
return e;
|
|
184
185
|
if (this.region) {
|
|
185
|
-
const
|
|
186
|
-
if (h.has(
|
|
187
|
-
return
|
|
186
|
+
const a = `${this.messages._t9nLocale}-${this.region.toLowerCase()}`;
|
|
187
|
+
if (h.has(a))
|
|
188
|
+
return a;
|
|
188
189
|
}
|
|
189
190
|
if (this._portalRegion) {
|
|
190
|
-
const
|
|
191
|
-
if (h.has(
|
|
192
|
-
return
|
|
191
|
+
const a = `${this.messages._t9nLocale}-${this._portalRegion}`;
|
|
192
|
+
if (h.has(a))
|
|
193
|
+
return a;
|
|
193
194
|
}
|
|
194
|
-
const
|
|
195
|
-
if (h.has(
|
|
196
|
-
return
|
|
197
|
-
for (const
|
|
198
|
-
if (
|
|
199
|
-
return
|
|
195
|
+
const i = `${this.messages._t9nLocale}-${this.messages._t9nLocale}`;
|
|
196
|
+
if (h.has(i))
|
|
197
|
+
return i;
|
|
198
|
+
for (const a of h)
|
|
199
|
+
if (a.startsWith(`${this.messages._t9nLocale}-`))
|
|
200
|
+
return a;
|
|
200
201
|
return "en-wo";
|
|
201
202
|
}
|
|
202
203
|
_handleCustomScaleInput(e, i) {
|
|
203
|
-
const
|
|
204
|
-
this._setScale(e,
|
|
204
|
+
const a = Number.parseFloat(i);
|
|
205
|
+
this._setScale(e, a);
|
|
205
206
|
}
|
|
206
207
|
_handleSliderThumbDrag() {
|
|
207
208
|
const e = this._sliderRef.value;
|
|
@@ -213,19 +214,19 @@ class I extends g {
|
|
|
213
214
|
const i = Math.min(this._mapSliderToScale(e.values[0]), this.minScaleLimit);
|
|
214
215
|
this.minScale = i === this.minScaleLimit ? 0 : i;
|
|
215
216
|
} else {
|
|
216
|
-
const i = Math.min(this._mapSliderToScale(e.values[0]), this.minScaleLimit),
|
|
217
|
-
this.minScale = i === this.minScaleLimit ? 0 : i, this.maxScale =
|
|
217
|
+
const i = Math.min(this._mapSliderToScale(e.values[0]), this.minScaleLimit), a = Math.max(this._mapSliderToScale(e.values[1]), this.maxScaleLimit);
|
|
218
|
+
this.minScale = i === this.minScaleLimit ? 0 : i, this.maxScale = a === this.maxScaleLimit ? 0 : a;
|
|
218
219
|
}
|
|
219
220
|
this._syncLayerScale();
|
|
220
221
|
}
|
|
221
222
|
}
|
|
222
223
|
_mapScaleToSlider(e) {
|
|
223
|
-
const i = Math.min(
|
|
224
|
-
return
|
|
224
|
+
const i = Math.min(l[0].minScale, Math.max(l[l.length - 1].maxScale, e)), a = l.findIndex((n) => i >= n.maxScale && i <= n.minScale), t = l[a], s = a, c = a + 0.9999;
|
|
225
|
+
return t ? s + (i - t.minScale) * (c - s) / (t.maxScale - t.minScale) : 0;
|
|
225
226
|
}
|
|
226
227
|
_mapSliderToScale(e) {
|
|
227
|
-
const i = Math.min(
|
|
228
|
-
return
|
|
228
|
+
const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), { maxScale: a, minScale: t } = l[i], s = i, c = s + 0.9999;
|
|
229
|
+
return t + (e - s) * (a - t) / (c - s);
|
|
229
230
|
}
|
|
230
231
|
_setScale(e, i) {
|
|
231
232
|
e === "min" ? this.minScale = i === 0 ? 0 : this._clampScale("min", i) : this.maxScale = i === 0 ? 0 : this._clampScale("max", i), this._syncLayerScale(), this._activeMenu = null;
|
|
@@ -238,25 +239,25 @@ class I extends g {
|
|
|
238
239
|
return this.hidePreview || !e ? null : r`<div slot=popover>${e}</div>`;
|
|
239
240
|
}
|
|
240
241
|
render() {
|
|
241
|
-
return r`<div><arcgis-slider class="slider" .disabled=${this.disabled} layout=horizontal .fillPlacement=${this.mode === "max-scale-only" ? "start" : this.mode === "min-scale-only" ? "end" : void 0} .fullRangeMin=${this._mapScaleToSlider(
|
|
242
|
-
const i = Math.round(this._mapSliderToScale(e)),
|
|
243
|
-
return
|
|
242
|
+
return r`<div><arcgis-slider class="slider" .disabled=${this.disabled} layout=horizontal .fillPlacement=${this.mode === "max-scale-only" ? "start" : this.mode === "min-scale-only" ? "end" : void 0} .fullRangeMin=${this._mapScaleToSlider(l[0].minScale)} .fullRangeMax=${this._mapScaleToSlider(l[l.length - 1].maxScale)} .max=${this._mapScaleToSlider(this.maxScaleLimit)} .min=${this._mapScaleToSlider(this.minScaleLimit)} .labelFormatter=${(e) => {
|
|
243
|
+
const i = Math.round(this._mapSliderToScale(e)), a = Math.min(l.length - 1, Math.max(0, Math.floor(e))), t = this.messages.scaleRangeLabels?.[l[a].id];
|
|
244
|
+
return t ? `${t}, ${i.toString()}` : i.toString();
|
|
244
245
|
}} title="Scale Slider" .values=${this.mode === "max-scale-only" ? [this._mapScaleToSlider(this._effectiveMaxScale)] : this.mode === "min-scale-only" ? [this._mapScaleToSlider(this._effectiveMinScale)] : [this._mapScaleToSlider(this._effectiveMinScale), this._mapScaleToSlider(this._effectiveMaxScale)]} @arcgisInput=${this._handleSliderThumbDrag} ${w(this._sliderRef)}>${this._renderScalePreviewPopover()}${this.view?.scale != null && this._renderCurrentScaleIndicator(this.view.scale) || ""}</arcgis-slider><div class="scale-menu-button-container" slot=content-end>${this.mode !== "max-scale-only" && !this.hideMinScaleMenu ? [this._renderScaleMenuButtons("min"), this._renderScaleMenuPopover("min")] : r`<div></div>`}${this.mode !== "min-scale-only" && !this.hideMaxScaleMenu && [this._renderScaleMenuButtons("max"), this._renderScaleMenuPopover("max")] || ""}</div></div>`;
|
|
245
246
|
}
|
|
246
247
|
_renderCurrentScaleIndicator(e) {
|
|
247
|
-
const i = this._sliderRef.value,
|
|
248
|
+
const i = this._sliderRef.value, a = i?.fullRangeMax ?? this._mapScaleToSlider(l[l.length - 1].maxScale), t = i?.fullRangeMin ?? this._mapScaleToSlider(l[0].minScale), s = a - t, c = Math.min(100, Math.max(0, (this._mapScaleToSlider(e) - t) / s * 100));
|
|
248
249
|
return _("scale-indicator", r`<div class="scale-indicator-container" slot=content-end><div class="scale-indicator-icon" style=${u({
|
|
249
250
|
position: "absolute",
|
|
250
251
|
left: `${c}%`
|
|
251
|
-
})} .title=${
|
|
252
|
+
})} .title=${`${this.messages.currentScale} 1:${Math.round(e).toLocaleString(this.messages._t9nLocale)}`}><calcite-icon icon=caret-up scale=s></calcite-icon></div></div>`);
|
|
252
253
|
}
|
|
253
254
|
_renderCustomScaleValue(e, i) {
|
|
254
|
-
const
|
|
255
|
-
return r`<calcite-list-item .label=${this.messages?.featuredScaleLabels?.custom} .selected=${this._customScaleSelected === e} @calciteListItemSelect=${(
|
|
256
|
-
const s =
|
|
255
|
+
const a = Math.round(i).toString();
|
|
256
|
+
return r`<calcite-list-item .label=${this.messages?.featuredScaleLabels?.custom} .selected=${this._customScaleSelected === e} @calciteListItemSelect=${(t) => {
|
|
257
|
+
const s = t.target.querySelector("calcite-input-number");
|
|
257
258
|
this._handleCustomScaleInput(e, s?.value ?? ""), this._customScaleSelected = e;
|
|
258
|
-
}}><calcite-input-number dir=ltr class="scale-menu-input" slot=content-end group-separator inputmode=numeric .max=${
|
|
259
|
-
|
|
259
|
+
}}><calcite-input-number dir=ltr class="scale-menu-input" slot=content-end group-separator inputmode=numeric .max=${l[0].minScale} .min=${l[l.length - 1].maxScale} number-button-type=none .placeholder=${this.messages?.customScaleInputTooltip} prefix-text=1: scale=s step=1 .value=${a} @click=${(t) => t.stopPropagation()} @keydown=${(t) => {
|
|
260
|
+
t.key === "Enter" && (this._handleCustomScaleInput(e, t.target.value), this._customScaleSelected = e, t.stopPropagation());
|
|
260
261
|
}}></calcite-input-number></calcite-list-item>`;
|
|
261
262
|
}
|
|
262
263
|
_renderScaleMenuButtons(e) {
|
|
@@ -268,27 +269,27 @@ class I extends g {
|
|
|
268
269
|
}}>${this._renderScaleMenu(e)}</calcite-popover>`;
|
|
269
270
|
}
|
|
270
271
|
_renderScaleMenu(e) {
|
|
271
|
-
const i = Math.floor(this._mapScaleToSlider(this._effectiveMaxScale)),
|
|
272
|
+
const i = Math.floor(this._mapScaleToSlider(this._effectiveMaxScale)), a = Math.floor(this._mapScaleToSlider(this._effectiveMinScale)), t = e === "min" ? this._effectiveMinScale : this._effectiveMaxScale, s = this.messages.featuredScaleLabels;
|
|
272
273
|
if (!s)
|
|
273
274
|
return;
|
|
274
|
-
const c = Math.floor(this._mapScaleToSlider(this.maxScaleLimit)), m = Math.floor(this._mapScaleToSlider(this.minScaleLimit)), n =
|
|
275
|
+
const c = Math.floor(this._mapScaleToSlider(this.maxScaleLimit)), m = Math.floor(this._mapScaleToSlider(this.minScaleLimit)), n = l.filter((o, S) => e === "min" ? S < i && S >= m : S > a && S <= c).map((o) => this._renderScaleMenuItem({
|
|
275
276
|
scaleLabel: s[o.id],
|
|
276
277
|
scaleValue: o.scale,
|
|
277
|
-
isSelected:
|
|
278
|
+
isSelected: t === o.scale,
|
|
278
279
|
valueVisible: o.id !== "world" || this.showWorldValue,
|
|
279
280
|
type: e
|
|
280
281
|
}));
|
|
281
|
-
return r`<calcite-list label="Scale Menu List" scale=s class="scale-menu-list" selection-appearance=icon selection-mode=single-persist>${this.view?.scale != null && this._renderCustomScaleValue(e,
|
|
282
|
+
return r`<calcite-list label="Scale Menu List" scale=s class="scale-menu-list" selection-appearance=icon selection-mode=single-persist>${this.view?.scale != null && this._renderCustomScaleValue(e, t) || ""}${this.view?.scale != null ? this._renderScaleMenuItem({
|
|
282
283
|
scaleValue: this.view.scale,
|
|
283
284
|
scaleLabel: s.current,
|
|
284
|
-
isSelected:
|
|
285
|
+
isSelected: t === this.view.scale,
|
|
285
286
|
valueVisible: !0,
|
|
286
287
|
type: e
|
|
287
288
|
}) : null}${n}</calcite-list>`;
|
|
288
289
|
}
|
|
289
290
|
_renderScaleMenuItem(e) {
|
|
290
|
-
const { scaleValue: i, scaleLabel:
|
|
291
|
-
return r`<calcite-list-item .label=${
|
|
291
|
+
const { scaleValue: i, scaleLabel: a, isSelected: t, valueVisible: s } = e, c = i === l[0].scale ? ` ${this.messages.aboveSuffix}` : i === l[l.length - 1].scale ? ` ${this.messages.belowSuffix}` : "";
|
|
292
|
+
return r`<calcite-list-item .label=${a} .selected=${t && this._customScaleSelected !== e.type} .description=${s ? `1:${Math.round(i).toLocaleString(this.messages._t9nLocale)}${c}` : void 0} @calciteListItemSelect=${() => {
|
|
292
293
|
this._setScale(e.type, i), this._customScaleSelected = null;
|
|
293
294
|
}}></calcite-list-item>`;
|
|
294
295
|
}
|
|
@@ -296,11 +297,11 @@ class I extends g {
|
|
|
296
297
|
const e = this._sliderRef.value?.activeValue;
|
|
297
298
|
if (typeof e != "number")
|
|
298
299
|
return null;
|
|
299
|
-
const i = Math.min(
|
|
300
|
+
const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), a = 5, t = 128, s = t * (i % a), c = t * Math.floor(i / a), m = `-${s}px -${c}px`, n = this._getSpriteSheetFile();
|
|
300
301
|
return r`<div class="preview-container"><img src=${f(`./assets/slider-scale-range/images/${n}.avif`) ?? M} style=${u({
|
|
301
302
|
display: "block",
|
|
302
|
-
height: `${
|
|
303
|
-
width: `${
|
|
303
|
+
height: `${t}px`,
|
|
304
|
+
width: `${t}px`,
|
|
304
305
|
objectPosition: m,
|
|
305
306
|
objectFit: "none"
|
|
306
307
|
})}></div>`;
|
|
@@ -85,6 +85,8 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
85
85
|
noView: string;
|
|
86
86
|
sceneViewNotSupported: string;
|
|
87
87
|
};
|
|
88
|
+
missingTerminalBody: string;
|
|
89
|
+
missingTerminalTitle: string;
|
|
88
90
|
noStartingPointsBody: string;
|
|
89
91
|
noStartingPointsTitle: string;
|
|
90
92
|
};
|
|
@@ -112,6 +114,8 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
112
114
|
noView: string;
|
|
113
115
|
sceneViewNotSupported: string;
|
|
114
116
|
};
|
|
117
|
+
missingTerminalBody: string;
|
|
118
|
+
missingTerminalTitle: string;
|
|
115
119
|
noStartingPointsBody: string;
|
|
116
120
|
noStartingPointsTitle: string;
|
|
117
121
|
};
|
|
@@ -226,6 +230,8 @@ export abstract class ArcgisUtilityNetworkTraceAnalysis extends LitElement {
|
|
|
226
230
|
noView?: string | undefined;
|
|
227
231
|
sceneViewNotSupported?: string | undefined;
|
|
228
232
|
} | undefined;
|
|
233
|
+
missingTerminalBody?: string | undefined;
|
|
234
|
+
missingTerminalTitle?: string | undefined;
|
|
229
235
|
noStartingPointsBody?: string | undefined;
|
|
230
236
|
noStartingPointsTitle?: string | undefined;
|
|
231
237
|
} | undefined;
|
|
@@ -5,30 +5,26 @@ 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 { when as
|
|
9
|
-
import
|
|
10
|
-
import { LitElement as
|
|
8
|
+
import { when as w } from "@arcgis/core/core/reactiveUtils.js";
|
|
9
|
+
import b from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
|
|
10
|
+
import { LitElement as T, createEvent as l } from "@arcgis/lumina";
|
|
11
11
|
import { log as u } from "@arcgis/toolkit/log";
|
|
12
|
-
import { u as
|
|
13
|
-
import { m as
|
|
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%}
|
|
15
|
-
class C extends
|
|
12
|
+
import { u as v } from "../../chunks/useT9n.js";
|
|
13
|
+
import { m as _ } 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%}.trace-inputs-warning{flex:none;height:fit-content;--calcite-panel-background-color: var(--calcite-color-foreground-1);calcite-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)}`, $ = _(b);
|
|
15
|
+
class C extends T {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(...arguments), this._messages =
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
this.showNoStartingPointsWarning = !0;
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
this.showNoStartingPointsWarning = !1, this._clearTraceResult(), this._switchTab("results"), this._runTrace();
|
|
17
|
+
super(...arguments), this._messages = v({ blocking: !0 }), this._viewModel = $(this), this._highlightHandles = [], this._handleRunTraceButtonClick = () => {
|
|
18
|
+
const e = this._traceInputsElement?.traceLocations, t = this._traceInputsElement?.traceLocationFlagInfos, a = e?.some((i) => i.type === "starting-point"), n = t?.some((i) => !!i.flagProperties.terminalConfiguration && !i.flagProperties.selectedTerminals?.size) ?? !1;
|
|
19
|
+
this.traceError = void 0, this.showNoStartingPointsWarning = !this._isSubnetworkNameTraceSelected && !a, this.showMissingTerminalWarning = n, !(this.showNoStartingPointsWarning || this.showMissingTerminalWarning) && (this.showNoStartingPointsWarning = !1, this.showMissingTerminalWarning = !1, this._clearTraceResult(), this._switchTab("results"), this._runTrace());
|
|
24
20
|
}, this._handleTraceInputsRefChange = (e) => {
|
|
25
21
|
e && (this._traceInputsElement = e);
|
|
26
22
|
}, this._handleTraceResultsRefChange = (e) => {
|
|
27
23
|
e && (this._traceResultsElement = e);
|
|
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 =
|
|
24
|
+
}, this.activeTab = "input", this.showMissingTerminalWarning = !1, 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 = l(), this.arcgisReady = l(), this.arcgisTraceLocationSelectEnd = l(), this.arcgisTraceLocationSelectStart = l(), this.arcgisTraceResultClear = l(), this.arcgisTraceResultFeaturesReady = l();
|
|
29
25
|
}
|
|
30
26
|
static {
|
|
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 };
|
|
27
|
+
this.properties = { activeTab: 16, traceError: 16, traceResult: 16, showMissingTerminalWarning: 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 };
|
|
32
28
|
}
|
|
33
29
|
static {
|
|
34
30
|
this.styles = R;
|
|
@@ -49,7 +45,7 @@ class C extends w {
|
|
|
49
45
|
}
|
|
50
46
|
load() {
|
|
51
47
|
this.manager.onLifecycle(() => [
|
|
52
|
-
|
|
48
|
+
w(() => !this._viewModel.utilityNetwork, () => this._switchTab("input"))
|
|
53
49
|
]);
|
|
54
50
|
}
|
|
55
51
|
_clearTraceResult() {
|
|
@@ -113,8 +109,8 @@ class C extends w {
|
|
|
113
109
|
resultTypes: e.resultTypes,
|
|
114
110
|
outSpatialReference: this.view?.spatialReference
|
|
115
111
|
}), this.disableHighlightFeatureResults || this._highlightResults();
|
|
116
|
-
} catch (
|
|
117
|
-
const i =
|
|
112
|
+
} catch (n) {
|
|
113
|
+
const i = n, r = i.details ? { detail: i.details } : void 0;
|
|
118
114
|
u("error", this, `Error while running trace: ${String(i)}`, r), this.traceError = i, this.traceResult = void 0;
|
|
119
115
|
}
|
|
120
116
|
}
|
|
@@ -134,16 +130,17 @@ class C extends w {
|
|
|
134
130
|
const t = e.detail;
|
|
135
131
|
this.aggregatedGeometryGraphicsColor = new g(t);
|
|
136
132
|
}
|
|
137
|
-
_handleTraceInputsChange() {
|
|
138
|
-
}
|
|
139
133
|
_handleSelectedNamedTraceConfigurationChange() {
|
|
140
|
-
this.showNoStartingPointsWarning = !1;
|
|
134
|
+
this.showNoStartingPointsWarning = !1, this.showMissingTerminalWarning = !1;
|
|
141
135
|
}
|
|
142
136
|
_handleUtilityNetworkChange() {
|
|
143
137
|
this._viewModel.utilityNetwork = this._traceInputsElement?.selectedUtilityNetwork;
|
|
144
138
|
}
|
|
139
|
+
renderMissingTerminalWarning() {
|
|
140
|
+
return s`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${() => this.showMissingTerminalWarning = !1}><div slot=title>${this._messages.errors.missingTerminalTitle}</div><div slot=message>${this._messages.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`;
|
|
141
|
+
}
|
|
145
142
|
renderNoStartingPointsWarning() {
|
|
146
|
-
return s`<calcite-panel
|
|
143
|
+
return s`<calcite-panel class="trace-inputs-warning"><calcite-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>`;
|
|
147
144
|
}
|
|
148
145
|
renderResultsTab() {
|
|
149
146
|
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>`);
|
|
@@ -158,7 +155,7 @@ class C extends w {
|
|
|
158
155
|
}} .disabled=${!i} slot=footer>${r > 0 && !this.hideFeatureResults && t !== "executing" ? this._messages.buttons.clearResultsCustom.replace("{number}", r.toString()) : this._messages.buttons.clearResultsGeneric}</calcite-button>`;
|
|
159
156
|
}
|
|
160
157
|
renderInputTab() {
|
|
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"
|
|
158
|
+
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() || ""}${this.showMissingTerminalWarning && this.mode === "default" && this.renderMissingTerminalWarning() || ""}<arcgis-utility-network-trace-inputs .view=${this.view || void 0} .referenceElement=${this.referenceElement} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} .hideActionBar=${this.hideActionBar} @arcgisSelectedNamedTraceConfigurationChange=${this._handleSelectedNamedTraceConfigurationChange} @arcgisUtilityNetworkChange=${this._handleUtilityNetworkChange} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisPropertyChange=${(e) => {
|
|
162
159
|
e.stopPropagation(), e.detail.name === "mode" && (this.mode = e.target.mode);
|
|
163
160
|
}} .autoDestroyDisabled=${this.autoDestroyDisabled} ${o(this._handleTraceInputsRefChange)}></arcgis-utility-network-trace-inputs></div></calcite-tab>`);
|
|
164
161
|
}
|
|
@@ -170,7 +167,7 @@ class C extends w {
|
|
|
170
167
|
return s`<calcite-button appearance=solid width=full @click=${this._handleRunTraceButtonClick} slot=footer .disabled=${a}>${this._messages.buttons.getResults}</calcite-button>`;
|
|
171
168
|
}
|
|
172
169
|
render() {
|
|
173
|
-
const { _messages: e, _viewModel: { utilityNetwork: t, loadError: a, state:
|
|
170
|
+
const { _messages: e, _viewModel: { utilityNetwork: t, loadError: a, state: n } } = this, i = n === "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
171
|
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>`;
|
|
175
172
|
}
|
|
176
173
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Collection from "@arcgis/core/core/Collection.js";
|
|
2
3
|
import type NamedTraceConfiguration from "@arcgis/core/networks/support/NamedTraceConfiguration.js";
|
|
3
4
|
import type UNTraceConfiguration from "@arcgis/core/networks/support/UNTraceConfiguration.js";
|
|
4
5
|
import type UtilityNetwork from "@arcgis/core/networks/UtilityNetwork.js";
|
|
@@ -7,7 +8,7 @@ import type MapView from "@arcgis/core/views/MapView.js";
|
|
|
7
8
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
8
9
|
import type { ArcgisReferenceElement } from "../types.js";
|
|
9
10
|
import type { UtilityNetworkTraceAnalysisDisplayMode } from "../arcgis-utility-network-trace-analysis/types.js";
|
|
10
|
-
import type { SelectStartPayload } from "../arcgis-utility-network-trace-location/customElement.js";
|
|
11
|
+
import type { FlagInfo, SelectStartPayload } from "../arcgis-utility-network-trace-location/customElement.js";
|
|
11
12
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -130,6 +131,13 @@ export abstract class ArcgisUtilityNetworkTraceInputs extends LitElement {
|
|
|
130
131
|
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
131
132
|
accessor selectedNamedTraceConfiguration: NamedTraceConfiguration | undefined;
|
|
132
133
|
accessor selectedUtilityNetwork: UtilityNetwork | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Supplementary information about the points selected on the map to run the trace.
|
|
136
|
+
* I.e., feature title, terminal configuration, selected terminals, and spatial properties.
|
|
137
|
+
*
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
get traceLocationFlagInfos(): Collection<FlagInfo>;
|
|
133
141
|
get traceLocations(): TraceLocation[];
|
|
134
142
|
/**
|
|
135
143
|
* A clone of the utility network trace configuration associated with
|
|
@@ -5,8 +5,8 @@ import n from "@arcgis/core/core/Collection.js";
|
|
|
5
5
|
import { watch as b } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
6
|
import { substitute as y } from "@arcgis/core/intl.js";
|
|
7
7
|
import w from "@arcgis/core/layers/GraphicsLayer.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import _ from "@arcgis/core/networks/support/UNTraceConfiguration.js";
|
|
9
|
+
import k from "@arcgis/core/rest/networks/support/TraceLocation.js";
|
|
10
10
|
import p from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
|
|
11
11
|
import S from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
|
|
12
12
|
import { LitElement as T, createEvent as c } from "@arcgis/lumina";
|
|
@@ -16,7 +16,7 @@ import { css as $, html as s } from "lit";
|
|
|
16
16
|
import { u as v } from "../../chunks/useT9n.js";
|
|
17
17
|
import { b as E, a as g, c as P, q as m, i as I } from "../../chunks/layer-utils.js";
|
|
18
18
|
const U = $`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md) 0;font-size:var(--calcite-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium)}`, u = `utility-network-trace-inputs-sketch-${Date.now()}`, F = 20;
|
|
19
|
-
class
|
|
19
|
+
class A extends T {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages = v({ blocking: !0 }), this._layerIdToLayer = /* @__PURE__ */ new Map(), this._startingPoints = new n(), this._barriers = new n(), this._stoppingPoints = new n(), this._subnetworkTraceTypes = /* @__PURE__ */ new Set([
|
|
22
22
|
"subnetwork",
|
|
@@ -37,7 +37,7 @@ class x extends T {
|
|
|
37
37
|
}, this.candidateFeatures = [], this.compatibleSubnetworkNames = [], this.traceConfigurations = [], this._state = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = C()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = c(), this.arcgisTraceInputsChange = c(), this.arcgisTraceLocationSelectEnd = c(), this.arcgisTraceLocationSelectStart = c(), this.arcgisUtilityNetworkChange = c();
|
|
38
38
|
}
|
|
39
39
|
static {
|
|
40
|
-
this.properties = { selectedFeature: 16, candidateFeatures: 16, compatibleSubnetworkNames: 16, subnetworksTable: 16, traceConfigurations: 16, utilityNetworks: 16, _unTraceConfiguration: 16, _state: 16, _activeTraceLocationType: 16, _exceedDisplayLimit: 16, beforeTraceLocationSelectStart: 0, view: 0, selectedUtilityNetwork: 0, selectedNamedTraceConfiguration: 0, autoDestroyDisabled: 5, hideActionBar: 5, unTraceConfiguration: 32, referenceElement: 1, mode: 3, traceLocations: 32 };
|
|
40
|
+
this.properties = { selectedFeature: 16, candidateFeatures: 16, compatibleSubnetworkNames: 16, subnetworksTable: 16, traceConfigurations: 16, utilityNetworks: 16, _unTraceConfiguration: 16, _state: 16, _activeTraceLocationType: 16, _exceedDisplayLimit: 16, beforeTraceLocationSelectStart: 0, view: 0, selectedUtilityNetwork: 0, selectedNamedTraceConfiguration: 0, autoDestroyDisabled: 5, hideActionBar: 5, unTraceConfiguration: 32, referenceElement: 1, mode: 3, traceLocationFlagInfos: 32, traceLocations: 32 };
|
|
41
41
|
}
|
|
42
42
|
static {
|
|
43
43
|
this.styles = U;
|
|
@@ -70,19 +70,12 @@ class x extends T {
|
|
|
70
70
|
get unTraceConfiguration() {
|
|
71
71
|
return this._unTraceConfiguration;
|
|
72
72
|
}
|
|
73
|
+
get traceLocationFlagInfos() {
|
|
74
|
+
return new n([...this._startingPoints, ...this._barriers, ...this._stoppingPoints]);
|
|
75
|
+
}
|
|
73
76
|
get traceLocations() {
|
|
74
|
-
const e = []
|
|
75
|
-
|
|
76
|
-
e.push(new _({
|
|
77
|
-
type: i.traceLocation.type,
|
|
78
|
-
isFilterBarrier: i.traceLocation.isFilterBarrier,
|
|
79
|
-
globalId: i.traceLocation.globalId,
|
|
80
|
-
percentAlong: i.traceLocation.percentAlong,
|
|
81
|
-
terminalId: r
|
|
82
|
-
}));
|
|
83
|
-
}) : e.push(i.traceLocation);
|
|
84
|
-
};
|
|
85
|
-
return this.showStartingPoints && this._startingPoints.forEach((i) => t(i)), this._barriers.forEach((i) => t(i)), this.showStoppingPoints && this._stoppingPoints.forEach((i) => t(i)), e;
|
|
77
|
+
const e = [];
|
|
78
|
+
return this.showStartingPoints && this._startingPoints.forEach((t) => e.push(...this._createTraceLocations(t))), this.showStoppingPoints && this._stoppingPoints.forEach((t) => e.push(...this._createTraceLocations(t))), this._barriers.forEach((t) => e.push(...this._createTraceLocations(t))), e;
|
|
86
79
|
}
|
|
87
80
|
async destroy() {
|
|
88
81
|
this._removeGraphicLayer(u), this._clearTraceLocations(), this._sketchViewModel?.cancel(), this._featuresComponentElement?.destroy(), this._traceLocationStartingElement?.destroy(), this._traceLocationBarrierElement?.destroy(), this._traceLocationStoppingElement?.destroy(), await this.manager.destroy();
|
|
@@ -101,6 +94,16 @@ class x extends T {
|
|
|
101
94
|
disconnectedCallback() {
|
|
102
95
|
super.disconnectedCallback(), this._layerIdToLayer.clear();
|
|
103
96
|
}
|
|
97
|
+
_createTraceLocations(e) {
|
|
98
|
+
const t = e.flagProperties.selectedTerminals;
|
|
99
|
+
return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new k({
|
|
100
|
+
type: e.traceLocation.type,
|
|
101
|
+
isFilterBarrier: e.traceLocation.isFilterBarrier,
|
|
102
|
+
globalId: e.traceLocation.globalId,
|
|
103
|
+
percentAlong: e.traceLocation.percentAlong,
|
|
104
|
+
terminalId: i
|
|
105
|
+
})) : [e.traceLocation];
|
|
106
|
+
}
|
|
104
107
|
_clearTraceLocations() {
|
|
105
108
|
this._startingPoints.forEach((e) => {
|
|
106
109
|
e.spatialProperties.flagGraphic && this.view?.graphics.remove(e.spatialProperties.flagGraphic);
|
|
@@ -199,7 +202,7 @@ class x extends T {
|
|
|
199
202
|
}
|
|
200
203
|
_handleTraceConfigChange() {
|
|
201
204
|
const { selectedNamedTraceConfiguration: e } = this;
|
|
202
|
-
if (!(e?.traceConfiguration instanceof
|
|
205
|
+
if (!(e?.traceConfiguration instanceof _)) {
|
|
203
206
|
h("error", this, L("selectedNamedTraceConfiguration.traceConfiguration")), this._unTraceConfiguration = void 0;
|
|
204
207
|
return;
|
|
205
208
|
}
|
|
@@ -375,7 +378,7 @@ class x extends T {
|
|
|
375
378
|
return s`<calcite-panel>${e === "add-spatial-feature" ? this.renderCandidateFeatures() : s`<calcite-flow>${this.renderDefaultMode()}${this.renderSpatialSelectInstructions()}</calcite-flow>`}${e !== "default" ? this.renderAddSpatialFooter() : null}</calcite-panel>`;
|
|
376
379
|
}
|
|
377
380
|
}
|
|
378
|
-
f("arcgis-utility-network-trace-inputs",
|
|
381
|
+
f("arcgis-utility-network-trace-inputs", A);
|
|
379
382
|
export {
|
|
380
|
-
|
|
383
|
+
A as ArcgisUtilityNetworkTraceInputs
|
|
381
384
|
};
|