@arcgis/map-components 5.2.0-next.154 → 5.2.0-next.156
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/347XA2AR.js +2 -0
- package/dist/cdn/4JCUCTND.js +2 -0
- package/dist/cdn/5QPPN5GG.js +2 -0
- package/dist/cdn/6JYHS4C3.js +2 -0
- package/dist/cdn/74SNPIFY.js +2 -0
- package/dist/cdn/AHR2EGDU.js +2 -0
- package/dist/cdn/{ZPWEX7I6.js → CPIWLONX.js} +1 -1
- package/dist/cdn/DV5RJXB4.js +2 -0
- package/dist/cdn/F6BKCG5R.js +2 -0
- package/dist/cdn/GUY54PVD.js +2 -0
- package/dist/cdn/{BOJOJ5VV.js → HGMLU4M2.js} +1 -1
- package/dist/cdn/{KVN3M4C6.js → N2BLQYTT.js} +1 -1
- package/dist/cdn/OFGB5CLF.js +2 -0
- package/dist/cdn/{5K2YXXCE.js → PPKJKXSQ.js} +1 -1
- package/dist/cdn/PT7IKQT5.js +2 -0
- package/dist/cdn/QTTIUOSW.js +2 -0
- package/dist/cdn/RGBIJQV3.js +2 -0
- package/dist/cdn/{RKTSSP3O.js → TD5NCGK6.js} +1 -1
- package/dist/cdn/TNRY4WWO.js +2 -0
- package/dist/cdn/U6VZT3HC.js +2 -0
- package/dist/cdn/UVSORYXI.js +2 -0
- package/dist/cdn/V6RSLRWE.js +2 -0
- package/dist/cdn/{2SNOYPTJ.js → Y5LZUAMK.js} +1 -1
- package/dist/cdn/YYBNA7EL.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/loader-utils.js +41 -0
- package/dist/chunks/slots.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +53 -50
- package/dist/components/arcgis-editor/customElement.d.ts +1 -1
- package/dist/components/arcgis-editor/customElement.js +18 -16
- package/dist/components/arcgis-feature-next/customElement.js +21 -14
- package/dist/components/arcgis-feature-table/customElement.d.ts +58 -39
- package/dist/components/arcgis-features-next/customElement.js +137 -116
- package/dist/components/arcgis-legend/customElement.d.ts +2 -0
- package/dist/components/arcgis-line-of-sight/customElement.js +1 -1
- package/dist/components/arcgis-link-chart/customElement.d.ts +0 -8
- package/dist/components/arcgis-map/customElement.d.ts +0 -8
- package/dist/components/arcgis-measurement-content/customElement.js +6 -6
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +5 -5
- package/dist/components/arcgis-scene/customElement.d.ts +0 -8
- package/dist/components/arcgis-sketch/customElement.d.ts +1 -3
- package/dist/components/arcgis-sketch/customElement.js +146 -178
- package/dist/components/arcgis-slice/customElement.js +15 -15
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +2 -4
- package/dist/components/arcgis-time-bar/customElement.js +108 -105
- package/dist/components/arcgis-time-bar-date/customElement.js +10 -10
- package/dist/components/arcgis-time-bar-extent/customElement.js +9 -9
- package/dist/components/arcgis-time-bar-slider/customElement.js +27 -33
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +4 -3
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +60 -67
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +26 -3
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +53 -50
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +1 -2
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +1 -1
- package/dist/components/arcgis-version-management/customElement.js +33 -33
- package/dist/components/arcgis-volume-measurement/customElement.js +62 -62
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.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 +2 -1
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/react.d.ts +2 -1
- package/dist/types/stencil.d.ts +2 -1
- package/package.json +6 -6
- package/dist/cdn/2AQYGR7K.js +0 -2
- package/dist/cdn/4GRP4KX3.js +0 -2
- package/dist/cdn/ENZAFG6F.js +0 -2
- package/dist/cdn/GP3PLD2F.js +0 -2
- package/dist/cdn/I3KUEZ7I.js +0 -2
- package/dist/cdn/J7YDON4X.js +0 -2
- package/dist/cdn/LE373OSG.js +0 -2
- package/dist/cdn/LGW5AS6R.js +0 -2
- package/dist/cdn/LOIUI4KA.js +0 -2
- package/dist/cdn/M7LDGJG6.js +0 -2
- package/dist/cdn/P5HSMYWG.js +0 -2
- package/dist/cdn/RZNCVTKT.js +0 -2
- package/dist/cdn/TZ6WQV6O.js +0 -2
- package/dist/cdn/VRYMDTDG.js +0 -2
- package/dist/cdn/ZEKQYUW3.js +0 -2
- package/dist/cdn/ZFHHY72B.js +0 -2
- package/dist/cdn/ZOHGLZNV.js +0 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as F } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as H, noChange as x, html as
|
|
3
|
+
import { css as H, noChange as x, html as m } from "lit";
|
|
4
4
|
import { substitute as q } from "@arcgis/core/intl.js";
|
|
5
5
|
import { usePropertyChange as z, useWatchAttributes as N } from "@arcgis/lumina/controllers";
|
|
6
6
|
import { reEmitEvent as f } from "@arcgis/lumina-toolkit/reEmitEvent";
|
|
7
7
|
import j from "@arcgis/core/layers/GraphicsLayer.js";
|
|
8
8
|
import J from "@arcgis/core/symbols/TextSymbol.js";
|
|
9
9
|
import { LitElement as Q, createEvent as X, nothing as I } from "@arcgis/lumina";
|
|
10
|
-
import { watch as
|
|
10
|
+
import { watch as v, on as Y, whenOnce as Z } from "@arcgis/core/core/reactiveUtils.js";
|
|
11
11
|
import { u as ee } from "../../chunks/useT9n.js";
|
|
12
12
|
import { m as te } from "../../chunks/useViewModel.js";
|
|
13
13
|
import { V as T } from "../../chunks/visible-element.js";
|
|
@@ -17,11 +17,11 @@ import { S as oe } from "../../chunks/resources.js";
|
|
|
17
17
|
import { getOrCreateMapValue as W, createReactiveMap as se } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
18
18
|
import { LayoutPriorities as y } from "@arcgis/common-components";
|
|
19
19
|
import ne from "@arcgis/core/core/Accessor.js";
|
|
20
|
-
import { property as
|
|
20
|
+
import { property as a, subclass as le } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
21
21
|
import { ignoreAbortErrors as C } from "@arcgis/core/core/promiseUtils.js";
|
|
22
22
|
import ae from "@arcgis/core/widgets/Sketch/VisibleElements.js";
|
|
23
23
|
import re from "@arcgis/core/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js";
|
|
24
|
-
import {
|
|
24
|
+
import { c as ce } from "../../chunks/loader-utils.js";
|
|
25
25
|
import { AsyncDirective as de } from "lit/async-directive.js";
|
|
26
26
|
import { directive as he, PartType as pe } from "lit/directive.js";
|
|
27
27
|
import { r as ue } from "../../chunks/async-utils.js";
|
|
@@ -84,45 +84,13 @@ const ve = H`.editing-controls-panel{min-inline-size:100px;max-inline-size:400px
|
|
|
84
84
|
defaultPriority: y.Default,
|
|
85
85
|
groupKind: "actions"
|
|
86
86
|
}
|
|
87
|
-
}, Ce = 500, be = 1e3;
|
|
88
|
-
function Te({
|
|
89
|
-
getLoading: i,
|
|
90
|
-
setEffectiveLoading: e
|
|
91
|
-
}) {
|
|
92
|
-
let t, o;
|
|
93
|
-
function s() {
|
|
94
|
-
clearTimeout(o), o = void 0;
|
|
95
|
-
}
|
|
96
|
-
function r(n) {
|
|
97
|
-
t = n ? Date.now() : void 0, e(n);
|
|
98
|
-
}
|
|
99
|
-
function h(n, p) {
|
|
100
|
-
if (n <= 0) {
|
|
101
|
-
r(p);
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
o = setTimeout(() => {
|
|
105
|
-
s(), r(p);
|
|
106
|
-
}, n);
|
|
107
|
-
}
|
|
108
|
-
r(i());
|
|
109
|
-
const u = m(
|
|
110
|
-
i,
|
|
111
|
-
(n) => {
|
|
112
|
-
s(), n ? h(Ce, !0) : h(t == null ? 0 : be - (Date.now() - t), !1);
|
|
113
|
-
},
|
|
114
|
-
{ sync: !0 }
|
|
115
|
-
);
|
|
116
|
-
return ce(() => {
|
|
117
|
-
u.remove(), s();
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
var we = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, a = (i, e, t, o) => {
|
|
121
|
-
for (var s = o > 1 ? void 0 : o ? Se(e, t) : e, r = i.length - 1, h; r >= 0; r--)
|
|
122
|
-
(h = i[r]) && (s = (o ? h(e, t, s) : h(s)) || s);
|
|
123
|
-
return o && s && we(e, t, s), s;
|
|
124
87
|
};
|
|
125
|
-
|
|
88
|
+
var Ce = Object.defineProperty, be = Object.getOwnPropertyDescriptor, l = (i, e, t, o) => {
|
|
89
|
+
for (var s = o > 1 ? void 0 : o ? be(e, t) : e, d = i.length - 1, h; d >= 0; d--)
|
|
90
|
+
(h = i[d]) && (s = (o ? h(e, t, s) : h(s)) || s);
|
|
91
|
+
return o && s && Ce(e, t, s), s;
|
|
92
|
+
};
|
|
93
|
+
let n = class extends ne {
|
|
126
94
|
//#region Lifecycle
|
|
127
95
|
constructor(i) {
|
|
128
96
|
super(i), this._effectiveRenderStateCache = /* @__PURE__ */ new Map(), this._effectiveGeometrySimplificationInProgress = !1, this.visibleElements = new ae(), this.settingsPopoverOpen = !1, this.availableCreateTools = [
|
|
@@ -137,20 +105,20 @@ let l = class extends ne {
|
|
|
137
105
|
}
|
|
138
106
|
initialize() {
|
|
139
107
|
this.selectionViewModel ??= new re({ persistSelection: !1 }), this.addHandles([
|
|
140
|
-
|
|
108
|
+
v(
|
|
141
109
|
() => this.sketchViewModel,
|
|
142
110
|
(i, e) => {
|
|
143
111
|
i !== e && this._effectiveRenderStateCache.clear();
|
|
144
112
|
},
|
|
145
113
|
{ sync: !0 }
|
|
146
114
|
),
|
|
147
|
-
|
|
115
|
+
ce({
|
|
148
116
|
getLoading: () => this.sketchViewModel?.geometrySimplificationInProgress ?? !1,
|
|
149
117
|
setEffectiveLoading: (i) => {
|
|
150
118
|
this._effectiveGeometrySimplificationInProgress = i;
|
|
151
119
|
}
|
|
152
120
|
}),
|
|
153
|
-
|
|
121
|
+
v(
|
|
154
122
|
() => this.view,
|
|
155
123
|
(i) => {
|
|
156
124
|
this.selectionViewModel.view = i;
|
|
@@ -158,7 +126,7 @@ let l = class extends ne {
|
|
|
158
126
|
{ initial: !0, sync: !0 }
|
|
159
127
|
),
|
|
160
128
|
// Ensure the SelectionViewModel always has the latest layer
|
|
161
|
-
|
|
129
|
+
v(
|
|
162
130
|
() => this.sketchViewModel?.layer,
|
|
163
131
|
(i) => this.selectionViewModel.sources = i ? [i] : [],
|
|
164
132
|
{ initial: !0, sync: !0 }
|
|
@@ -167,7 +135,7 @@ let l = class extends ne {
|
|
|
167
135
|
i.length && this.update(i);
|
|
168
136
|
}),
|
|
169
137
|
// Cancel active tool when selection activates
|
|
170
|
-
|
|
138
|
+
v(
|
|
171
139
|
() => this.selectionViewModel.activeOperation,
|
|
172
140
|
(i) => {
|
|
173
141
|
i && (this.sketchViewModel?.cancel(), this._activeCustomToolOptions = void 0);
|
|
@@ -181,7 +149,7 @@ let l = class extends ne {
|
|
|
181
149
|
i.state === "complete" && this.sketchViewModel?.creationMode !== "continuous" && (this._activeCustomToolOptions = void 0);
|
|
182
150
|
}
|
|
183
151
|
),
|
|
184
|
-
|
|
152
|
+
v(
|
|
185
153
|
() => this.visibleElements.settingsMenu,
|
|
186
154
|
(i) => {
|
|
187
155
|
i || (this.settingsPopoverOpen = !1);
|
|
@@ -237,27 +205,27 @@ let l = class extends ne {
|
|
|
237
205
|
const { sketchViewModel: i } = this;
|
|
238
206
|
if (!i)
|
|
239
207
|
return [];
|
|
240
|
-
const e = i.effectiveAvailablePlugins, t = this.state === "disabled", o = this.visibleElements.createTools, s = this.activeTool,
|
|
241
|
-
active:
|
|
208
|
+
const e = i.effectiveAvailablePlugins, t = this.state === "disabled", o = this.visibleElements.createTools, s = this.activeTool, d = this._activeCustomToolOptions, h = d || !i.firstPluginWithSwappableLeaf ? this._customToolOptions : [], u = i.rootPlugins, r = h?.map((c) => ({
|
|
209
|
+
active: c === d,
|
|
242
210
|
disabled: t,
|
|
243
|
-
icon:
|
|
244
|
-
labelKey:
|
|
245
|
-
onClick:
|
|
211
|
+
icon: c.icon,
|
|
212
|
+
labelKey: c.label,
|
|
213
|
+
onClick: c === d ? () => this._cancelActiveOperation() : () => this._activateLegacyDrawTool(c.toolName, c.createOptions, c)
|
|
246
214
|
})) ?? [];
|
|
247
|
-
if (
|
|
248
|
-
return [...this._pluginsToActions(u), ...
|
|
215
|
+
if (d && u)
|
|
216
|
+
return [...this._pluginsToActions(u), ...r];
|
|
249
217
|
if (e?.length && this.view?.type !== "3d")
|
|
250
|
-
return [...this._pluginsToActions(e), ...
|
|
251
|
-
const
|
|
218
|
+
return [...this._pluginsToActions(e), ...r];
|
|
219
|
+
const g = this.view?.type === "3d";
|
|
252
220
|
return [
|
|
253
|
-
...this.availableCreateTools?.filter((
|
|
254
|
-
active:
|
|
221
|
+
...this.availableCreateTools?.filter((c) => g && c === "multipoint" ? !1 : c === "mesh" ? !0 : o[c])?.map((c) => ({
|
|
222
|
+
active: c === s,
|
|
255
223
|
disabled: t,
|
|
256
|
-
icon: fe[
|
|
257
|
-
labelKey: `draw.${
|
|
258
|
-
onClick:
|
|
224
|
+
icon: fe[c],
|
|
225
|
+
labelKey: `draw.${c}`,
|
|
226
|
+
onClick: c === s ? () => this._cancelActiveOperation() : () => this._activateLegacyDrawTool(c)
|
|
259
227
|
})) ?? [],
|
|
260
|
-
...
|
|
228
|
+
...r
|
|
261
229
|
];
|
|
262
230
|
}
|
|
263
231
|
get _shouldShowBackButton() {
|
|
@@ -305,8 +273,8 @@ let l = class extends ne {
|
|
|
305
273
|
return t === "polygon" && o === "freehand" && e?.includes("freehandPolygon") ? "freehandPolygon" : t === "polyline" && o === "freehand" && e?.includes("freehandPolyline") ? "freehandPolyline" : t ?? void 0;
|
|
306
274
|
}
|
|
307
275
|
get _selectionCommands() {
|
|
308
|
-
const { state: i, visibleElements: e, _activeSelectionTool: t, _customActions: o } = this, s = this.state === "disabled",
|
|
309
|
-
this.sketchViewModel?.updateOnGraphicClick !== !1 &&
|
|
276
|
+
const { state: i, visibleElements: e, _activeSelectionTool: t, _customActions: o } = this, s = this.state === "disabled", d = [];
|
|
277
|
+
this.sketchViewModel?.updateOnGraphicClick !== !1 && d.push({
|
|
310
278
|
active: i === "ready" && this._activeSelectionTool == null,
|
|
311
279
|
disabled: s,
|
|
312
280
|
icon: "cursor",
|
|
@@ -314,13 +282,13 @@ let l = class extends ne {
|
|
|
314
282
|
onClick: () => this._activateDefaultSelectionTool()
|
|
315
283
|
});
|
|
316
284
|
const h = e.selectionTools;
|
|
317
|
-
h["rectangle-selection"] &&
|
|
285
|
+
h["rectangle-selection"] && d.push({
|
|
318
286
|
active: t === "rectangle-selection",
|
|
319
287
|
disabled: s,
|
|
320
288
|
icon: "cursor-marquee",
|
|
321
289
|
labelKey: "rectangleSelection",
|
|
322
290
|
onClick: () => this._activateSelectionTool("rectangle-selection")
|
|
323
|
-
}), h["lasso-selection"] &&
|
|
291
|
+
}), h["lasso-selection"] && d.push({
|
|
324
292
|
active: t === "lasso-selection",
|
|
325
293
|
disabled: s,
|
|
326
294
|
icon: "lasso-select",
|
|
@@ -328,7 +296,7 @@ let l = class extends ne {
|
|
|
328
296
|
onClick: () => this._activateSelectionTool("lasso-selection")
|
|
329
297
|
});
|
|
330
298
|
const u = o?.get("selection-toolbar");
|
|
331
|
-
return u &&
|
|
299
|
+
return u && d.push(...this._customActionsToSketchActions(u)), d;
|
|
332
300
|
}
|
|
333
301
|
get _selectionSetActions() {
|
|
334
302
|
const i = this.sketchViewModel?.updateGraphics.length ?? 0;
|
|
@@ -601,88 +569,88 @@ let l = class extends ne {
|
|
|
601
569
|
}
|
|
602
570
|
// #endregion
|
|
603
571
|
};
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
],
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
],
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
],
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
],
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
],
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
],
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
],
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
],
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
],
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
],
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
],
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
],
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
],
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
],
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
],
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
],
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
],
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
],
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
],
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
],
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
],
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
],
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
],
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
],
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
],
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
],
|
|
682
|
-
|
|
572
|
+
l([
|
|
573
|
+
a()
|
|
574
|
+
], n.prototype, "_isEffectiveRenderStateFrozen", 1);
|
|
575
|
+
l([
|
|
576
|
+
a()
|
|
577
|
+
], n.prototype, "_effectiveGeometrySimplificationInProgress", 2);
|
|
578
|
+
l([
|
|
579
|
+
a()
|
|
580
|
+
], n.prototype, "_state", 1);
|
|
581
|
+
l([
|
|
582
|
+
a()
|
|
583
|
+
], n.prototype, "_customToolOptions", 2);
|
|
584
|
+
l([
|
|
585
|
+
a()
|
|
586
|
+
], n.prototype, "_activeCustomToolOptions", 2);
|
|
587
|
+
l([
|
|
588
|
+
a()
|
|
589
|
+
], n.prototype, "_customActions", 2);
|
|
590
|
+
l([
|
|
591
|
+
a()
|
|
592
|
+
], n.prototype, "selectionViewModel", 2);
|
|
593
|
+
l([
|
|
594
|
+
a()
|
|
595
|
+
], n.prototype, "_activeSelectionTool", 1);
|
|
596
|
+
l([
|
|
597
|
+
a()
|
|
598
|
+
], n.prototype, "_activePluginUniqueIds", 1);
|
|
599
|
+
l([
|
|
600
|
+
a()
|
|
601
|
+
], n.prototype, "_createToolActions", 1);
|
|
602
|
+
l([
|
|
603
|
+
a()
|
|
604
|
+
], n.prototype, "_shouldShowBackButton", 1);
|
|
605
|
+
l([
|
|
606
|
+
a()
|
|
607
|
+
], n.prototype, "_selectionToolActions", 1);
|
|
608
|
+
l([
|
|
609
|
+
a()
|
|
610
|
+
], n.prototype, "_settingsActions", 1);
|
|
611
|
+
l([
|
|
612
|
+
a()
|
|
613
|
+
], n.prototype, "_activeTool", 1);
|
|
614
|
+
l([
|
|
615
|
+
a()
|
|
616
|
+
], n.prototype, "_selectionCommands", 1);
|
|
617
|
+
l([
|
|
618
|
+
a()
|
|
619
|
+
], n.prototype, "_selectionSetActions", 1);
|
|
620
|
+
l([
|
|
621
|
+
a()
|
|
622
|
+
], n.prototype, "_undoRedoActions", 1);
|
|
623
|
+
l([
|
|
624
|
+
a()
|
|
625
|
+
], n.prototype, "sketchViewModel", 2);
|
|
626
|
+
l([
|
|
627
|
+
a()
|
|
628
|
+
], n.prototype, "visibleElements", 2);
|
|
629
|
+
l([
|
|
630
|
+
a()
|
|
631
|
+
], n.prototype, "view", 2);
|
|
632
|
+
l([
|
|
633
|
+
a()
|
|
634
|
+
], n.prototype, "settingsPopoverOpen", 2);
|
|
635
|
+
l([
|
|
636
|
+
a()
|
|
637
|
+
], n.prototype, "availableCreateTools", 2);
|
|
638
|
+
l([
|
|
639
|
+
a()
|
|
640
|
+
], n.prototype, "state", 1);
|
|
641
|
+
l([
|
|
642
|
+
a()
|
|
643
|
+
], n.prototype, "activeTool", 1);
|
|
644
|
+
l([
|
|
645
|
+
a()
|
|
646
|
+
], n.prototype, "activePluginIds", 1);
|
|
647
|
+
l([
|
|
648
|
+
a()
|
|
649
|
+
], n.prototype, "groupedActions", 1);
|
|
650
|
+
n = l([
|
|
683
651
|
le("components.sketch.SketchComponentViewModel")
|
|
684
|
-
],
|
|
685
|
-
class
|
|
652
|
+
], n);
|
|
653
|
+
class Te extends de {
|
|
686
654
|
#t;
|
|
687
655
|
#e = !1;
|
|
688
656
|
#i;
|
|
@@ -709,34 +677,34 @@ class _e extends de {
|
|
|
709
677
|
});
|
|
710
678
|
}
|
|
711
679
|
}
|
|
712
|
-
const B = he(
|
|
680
|
+
const B = he(Te), we = te((i) => new ie({
|
|
713
681
|
...i,
|
|
714
682
|
cancelUpdateOnClickAway: !0,
|
|
715
683
|
creationMode: "continuous",
|
|
716
684
|
textSymbol: new J({ text: "hello world" }),
|
|
717
685
|
useLegacyCreateTools: !1
|
|
718
686
|
}));
|
|
719
|
-
class
|
|
687
|
+
class Se extends Q {
|
|
720
688
|
constructor() {
|
|
721
|
-
super(), this.#t = new
|
|
689
|
+
super(), this.#t = new n(), this.#o = E(), this.#s = E(), this._defaultGraphicsLayer = null, this._messages = ee(), this.test = {
|
|
722
690
|
componentViewModel: this.#t
|
|
723
|
-
}, this._groupLayoutPriorityOverrides = /* @__PURE__ */ new Map(), this._contextualToolLocation = "separate", this._refMap = se(), this.viewModel =
|
|
691
|
+
}, this._groupLayoutPriorityOverrides = /* @__PURE__ */ new Map(), this._contextualToolLocation = "separate", this._refMap = se(), this.viewModel = we(this), this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.createGraphic = this.viewModel.createGraphic, this.creationMode = this.viewModel.creationMode, this.defaultCreateOptions = this.viewModel.defaultCreateOptions, this.defaultGraphicsLayerDisabled = !1, this.defaultUpdateOptions = this.viewModel.defaultUpdateOptions, this.geometrySimplificationInProgress = this.viewModel.geometrySimplificationInProgress, this.icon = "pencil", this.label = this._messages?.componentLabel, this.labelOptions = this.viewModel.labelOptions, this.layer = this.viewModel.layer, this.layout = "horizontal", this.pointSymbol = this.viewModel.pointSymbol, this.polygonSymbol = this.viewModel.polygonSymbol, this.polylineSymbol = this.viewModel.polylineSymbol, this.visualScale = "m", this.snappingOptions = this.viewModel.snappingOptions, this.textSymbol = this.viewModel.textSymbol, this.toolbarKind = "floating", this.tooltipOptions = this.viewModel.tooltipOptions, this.useViewOptions = this.viewModel.useViewOptions, this.valueOptions = this.viewModel.valueOptions, this.useLegacyCreateTools = this.viewModel.useLegacyCreateTools, this.updateOnGraphicClickDisabled = this.viewModel.updateOnGraphicClick, this.updateGraphics = this.viewModel.updateGraphics, this.arcgisCreate = f(() => this.viewModel, "create"), this.arcgisDelete = f(() => this.viewModel, "delete"), this.arcgisDuplicate = f(() => this.viewModel, "duplicate"), this.arcgisPropertyChange = z()("activeTool", "geometrySimplificationInProgress", "state"), this.arcgisReady = X(), this.arcgisRedo = f(() => this.viewModel, "redo"), this.arcgisUndo = f(() => this.viewModel, "undo"), this.arcgisUpdate = f(() => this.viewModel, "update"), N(["slot"], () => {
|
|
724
692
|
this.requestUpdate();
|
|
725
693
|
}), this.manager.onLifecycle(() => [
|
|
726
|
-
|
|
694
|
+
v(() => this.el.view?.map, (e, t) => {
|
|
727
695
|
const o = this._defaultGraphicsLayer;
|
|
728
696
|
o && (t?.allLayers.includes(o) && t.remove(o), o && !e?.allLayers.includes(o) && e?.add(o));
|
|
729
697
|
}),
|
|
730
|
-
|
|
698
|
+
v(() => this.el.view, (e) => {
|
|
731
699
|
this.viewModel.view = e, this.#t.view = e ?? void 0;
|
|
732
700
|
}, { initial: !0 }),
|
|
733
|
-
|
|
701
|
+
v(() => this.viewModel, (e) => {
|
|
734
702
|
this.#t.sketchViewModel = e, this.viewModel.pluginManager.sketch = this;
|
|
735
703
|
}, { initial: !0 }),
|
|
736
|
-
|
|
704
|
+
v(() => this.#t.state, (e, t) => {
|
|
737
705
|
this.requestUpdate("state", t);
|
|
738
706
|
}, { initial: !0 }),
|
|
739
|
-
|
|
707
|
+
v(() => this.#t.activeTool, () => this.arcgisPropertyChange.emit({ name: "activeTool" }), { sync: !0 })
|
|
740
708
|
]), this.manager.onDestroy(() => {
|
|
741
709
|
this._defaultGraphicsLayer && this.el.view?.map?.allLayers.includes(this._defaultGraphicsLayer) && this.el.view?.map?.remove(this._defaultGraphicsLayer), this._defaultGraphicsLayer?.destroy(), this._defaultGraphicsLayer = null, this.#t.destroy();
|
|
742
710
|
});
|
|
@@ -1047,46 +1015,46 @@ class Me extends Q {
|
|
|
1047
1015
|
this._defaultGraphicsLayer && this.view?.map?.allLayers.includes(this._defaultGraphicsLayer) && this.view?.map?.remove(this._defaultGraphicsLayer), super.disconnectedCallback();
|
|
1048
1016
|
}
|
|
1049
1017
|
render() {
|
|
1050
|
-
const e = this._refMap.get("settings")?.value?.actionElement, t = this.#t.groupedActions, { visualScale: o, layout: s, toolbarKind:
|
|
1051
|
-
return
|
|
1018
|
+
const e = this._refMap.get("settings")?.value?.actionElement, t = this.#t.groupedActions, { visualScale: o, layout: s, toolbarKind: d, relativePosition: h, _contextualToolLocation: u } = this, r = t.find(({ name: p }) => p === "selectionSet"), g = t.filter(({ name: p }) => p !== "selectionSet");
|
|
1019
|
+
return m`<div class="toolbar-container"><arcgis-toolbar-stack .layout=${s} .toolbarKind=${d} .relativePosition=${h} .scale=${o} tooltip-appearance=calcite><arcgis-toolbar ${M(this.#o)}>${T({ hidden: !r?.visible || u !== "inline", children: this._renderActionGroup(r) })}${g.map((p) => this._renderActionGroup(p))}${T({ hidden: !r?.visible || u !== "inline-end", children: this._renderActionGroup(r) })}</arcgis-toolbar>${T({ hidden: !r?.visible || u !== "separate", children: m`<arcgis-toolbar>${this._renderActionGroup(r)}</arcgis-toolbar>` })}</arcgis-toolbar-stack></div>${T({ hidden: this.hideSettingsMenu, children: m`<arcgis-view-popover .open=${this.#t.settingsPopoverOpen} closable .heading=${this._messages.settings?.heading} .label=${this._messages.settings?.heading} .anchorElement=${e} .visualScale=${o} .actionBarElement=${this.#o.value?.barElement} @arcgisPropertyChange=${(p) => this.#t.settingsPopoverOpen = p.target.open ?? !1} .view=${this.view ?? void 0}>${this._renderSettings()}</arcgis-view-popover>` })}`;
|
|
1052
1020
|
}
|
|
1053
1021
|
_renderSettings() {
|
|
1054
|
-
const { autoDestroyDisabled: e, hideLabelsToggle: t, hideSnappingControls: o, hideTooltipsToggle: s, showSnappingControlsElementsHeader:
|
|
1055
|
-
return
|
|
1056
|
-
|
|
1057
|
-
const { labelsEnabled:
|
|
1058
|
-
switch (
|
|
1022
|
+
const { autoDestroyDisabled: e, hideLabelsToggle: t, hideSnappingControls: o, hideTooltipsToggle: s, showSnappingControlsElementsHeader: d, useViewOptions: h, view: u, viewModel: r } = this;
|
|
1023
|
+
return m`<div class="editing-controls-panel"><arcgis-sketch-tooltip-controls .hideLabelsToggle=${t} .hideTooltipsToggle=${h || s} .directionMode=${r.valueOptions.directionMode} .labelsEnabled=${r.labelOptions.enabled} .tooltipsEnabled=${r.tooltipOptions.enabled} @arcgisPropertyChange=${(g) => {
|
|
1024
|
+
g.stopPropagation();
|
|
1025
|
+
const { labelsEnabled: p, tooltipsEnabled: c, directionMode: w } = g.currentTarget, b = this.viewModel;
|
|
1026
|
+
switch (g.detail.name) {
|
|
1059
1027
|
case "labelsEnabled":
|
|
1060
|
-
b.labelOptions.enabled =
|
|
1028
|
+
b.labelOptions.enabled = p;
|
|
1061
1029
|
break;
|
|
1062
1030
|
case "directionMode":
|
|
1063
1031
|
b.valueOptions.directionMode = w;
|
|
1064
1032
|
break;
|
|
1065
1033
|
case "tooltipsEnabled":
|
|
1066
|
-
b.tooltipOptions.enabled =
|
|
1034
|
+
b.tooltipOptions.enabled = c;
|
|
1067
1035
|
break;
|
|
1068
1036
|
}
|
|
1069
|
-
}}></arcgis-sketch-tooltip-controls>${!h && !o ?
|
|
1037
|
+
}}></arcgis-sketch-tooltip-controls>${!h && !o ? m`<arcgis-snapping-controls .autoDestroyDisabled=${e} .view=${u} .visibleElements=${this.#e.snappingControlsElements} .snappingOptions=${r.snappingOptions} .showHeader=${d} @arcgisPropertyChange=${(g) => g.stopPropagation()}></arcgis-snapping-controls>` : void 0}</div>`;
|
|
1070
1038
|
}
|
|
1071
1039
|
_renderActionGroup({ visible: e, commands: t, name: o }) {
|
|
1072
1040
|
if (!e || !t.length)
|
|
1073
1041
|
return;
|
|
1074
|
-
const { defaultPriority: s, groupKind:
|
|
1075
|
-
switch (
|
|
1042
|
+
const { defaultPriority: s, groupKind: d, overflowLabel: h } = ye[o], r = (o === "geometrySimplification" ? void 0 : this._groupLayoutPriorityOverrides.get(o)) ?? s, g = t.map((c) => this._renderCommand(c)), p = D(`more.${h}`, this._messages);
|
|
1043
|
+
switch (d) {
|
|
1076
1044
|
case "more-button":
|
|
1077
|
-
return
|
|
1045
|
+
return m`<arcgis-toolbar-group .priority=${r}><arcgis-toolbar-more-button .overflowActionLabel=${p} .priority=${r}>${g}</arcgis-toolbar-more-button></arcgis-toolbar-group>`;
|
|
1078
1046
|
case "split-button":
|
|
1079
|
-
return
|
|
1047
|
+
return m`<arcgis-toolbar-group .priority=${r}><arcgis-toolbar-split-button .overflowActionLabel=${p} .priority=${r}>${g}</arcgis-toolbar-split-button></arcgis-toolbar-group>`;
|
|
1080
1048
|
case "actions":
|
|
1081
|
-
return
|
|
1049
|
+
return m`<arcgis-toolbar-group .priority=${r}>${g}</arcgis-toolbar-group>`;
|
|
1082
1050
|
}
|
|
1083
1051
|
}
|
|
1084
|
-
_renderCommand({ active: e, afterCreate: t, afterRemoved: o, afterUpdate: s, appearance:
|
|
1085
|
-
const { _messages: L, _refMap: U, layout: G } = this, S = D(
|
|
1086
|
-
return K ?
|
|
1052
|
+
_renderCommand({ active: e, afterCreate: t, afterRemoved: o, afterUpdate: s, appearance: d, icon: h, disabled: u, id: r, kind: g, labelKey: p, labelParameters: c, loading: w, tooltipKey: b, iconFlipRTL: P, onClick: k, refKey: A, textEnabled: O, renderAsAction: K }) {
|
|
1053
|
+
const { _messages: L, _refMap: U, layout: G } = this, S = D(p, L), _ = S === void 0 ? p : c ? q(S, c) : S, V = L?.[b] ?? _, $ = A ? W(U, A, E) : this.#s, R = { afterCreate: t, afterRemoved: o, afterUpdate: s };
|
|
1054
|
+
return K ? m`<arcgis-toolbar-action .active=${e} .appearance=${d} .disabled=${u} .icon=${h} .iconFlipRtl=${P} id=${r ?? I} .kind=${g} .loading=${w} .labelText=${G === "horizontal" ? _ : ""} .textEnabled=${O} .tooltipText=${G === "horizontal" && O ? "" : V} @arcgisToolbarItemSelected=${k} ${B(R)} ${M($)}></arcgis-toolbar-action>` : m`<arcgis-toolbar-item .active=${e} .disabled=${u} .icon=${h} id=${r ?? I} .iconFlipRtl=${P} .labelText=${_} .tooltipText=${V} @arcgisItemSelected=${k} ${B(R)} ${M($)}></arcgis-toolbar-item>`;
|
|
1087
1055
|
}
|
|
1088
1056
|
}
|
|
1089
|
-
F("arcgis-sketch",
|
|
1057
|
+
F("arcgis-sketch", Se);
|
|
1090
1058
|
export {
|
|
1091
|
-
|
|
1059
|
+
Se as ArcgisSketch
|
|
1092
1060
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as w } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as y, html as r } from "lit";
|
|
4
|
-
import { ignoreAbortErrors as
|
|
4
|
+
import { ignoreAbortErrors as v } from "@arcgis/core/core/promiseUtils.js";
|
|
5
5
|
import { watch as b } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
6
|
import { LitElement as _, createEvent as L, safeClassMap as k, nothing as z } from "@arcgis/lumina";
|
|
7
7
|
import { usePropertyChange as $ } from "@arcgis/lumina/controllers";
|
|
@@ -12,11 +12,11 @@ import { g as h } from "../../chunks/globalCss.js";
|
|
|
12
12
|
import V from "@arcgis/core/analysis/SliceAnalysis.js";
|
|
13
13
|
import { property as d, subclass as C } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
14
14
|
import { A as D } from "../../chunks/AnalysisViewModel.js";
|
|
15
|
-
const G = y`: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-view-corner-radius: var(--arcgis-view-corner-radius, 0px);--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}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{width:var(--arcgis-internal-panel-width, 300px);max-width:100%}.root{min-width:var(--arcgis-internal-panel-min-width);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}.container{display:flex;--layer-item-background: var(--calcite-color-foreground-2);flex-direction:column;flex-shrink:0;flex-basis:auto;justify-content:space-between;gap:var(--arcgis-internal-panel-gap)}.error{color:var(--calcite-color-status-danger)}.container,.hint{display:flex;flex-direction:column;gap:var(--arcgis-internal-panel-gap)}.error,.hint{overflow:hidden;animation:arcgis-slice-fade-in .25s ease-in-out}.error p,.hint p{margin:0;padding:0}.hint:not(:has(*)){display:none}.layer-item{--calcite-color-foreground-2: var(--layer-item-background);--calcite-color-foreground-1: var(--layer-item-background)}.actions{display:flex;flex-flow:column;gap:var(--arcgis-internal-panel-actions-gap);justify-content:center}.actions:not(:has(*)){display:none}@keyframes arcgis-slice-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}`;
|
|
16
|
-
var A = Object.defineProperty, j = Object.getOwnPropertyDescriptor, n = (e, i, t,
|
|
17
|
-
for (var a =
|
|
18
|
-
(c = e[
|
|
19
|
-
return
|
|
15
|
+
const G = y`: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-view-corner-radius: 0px;--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}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{width:var(--arcgis-internal-panel-width, 300px);max-width:100%}.root{min-width:var(--arcgis-internal-panel-min-width);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}.container{display:flex;--layer-item-background: var(--calcite-color-foreground-2);flex-direction:column;flex-shrink:0;flex-basis:auto;justify-content:space-between;gap:var(--arcgis-internal-panel-gap)}.error{color:var(--calcite-color-status-danger)}.container,.hint{display:flex;flex-direction:column;gap:var(--arcgis-internal-panel-gap)}.error,.hint{overflow:hidden;animation:arcgis-slice-fade-in .25s ease-in-out}.error p,.hint p{margin:0;padding:0}.hint:not(:has(*)){display:none}.layer-item{--calcite-color-foreground-2: var(--layer-item-background);--calcite-color-foreground-1: var(--layer-item-background)}.actions{display:flex;flex-flow:column;gap:var(--arcgis-internal-panel-actions-gap);justify-content:center}.actions:not(:has(*)){display:none}@keyframes arcgis-slice-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}`;
|
|
16
|
+
var A = Object.defineProperty, j = Object.getOwnPropertyDescriptor, n = (e, i, t, l) => {
|
|
17
|
+
for (var a = l > 1 ? void 0 : l ? j(i, t) : i, s = e.length - 1, c; s >= 0; s--)
|
|
18
|
+
(c = e[s]) && (a = (l ? c(i, t, a) : c(a)) || a);
|
|
19
|
+
return l && a && A(i, t, a), a;
|
|
20
20
|
};
|
|
21
21
|
const u = /* @__PURE__ */ new Set();
|
|
22
22
|
let o = class extends D {
|
|
@@ -34,7 +34,7 @@ let o = class extends D {
|
|
|
34
34
|
});
|
|
35
35
|
this._excludingLayers = i;
|
|
36
36
|
try {
|
|
37
|
-
await
|
|
37
|
+
await v(i);
|
|
38
38
|
} finally {
|
|
39
39
|
this._excludingLayers === i && (this._excludingLayers = void 0);
|
|
40
40
|
}
|
|
@@ -137,7 +137,7 @@ class P extends _ {
|
|
|
137
137
|
await this.manager.destroy();
|
|
138
138
|
}
|
|
139
139
|
async start() {
|
|
140
|
-
|
|
140
|
+
v(this.viewModel.start());
|
|
141
141
|
}
|
|
142
142
|
load() {
|
|
143
143
|
this.manager.onLifecycle(() => [
|
|
@@ -152,24 +152,24 @@ class P extends _ {
|
|
|
152
152
|
})} role=presentation>${this._renderContainerNode()}</div>`;
|
|
153
153
|
}
|
|
154
154
|
_renderContainerNode() {
|
|
155
|
-
const i = this._messages, { state: t, hideVisualization:
|
|
156
|
-
if (
|
|
155
|
+
const i = this._messages, { state: t, hideVisualization: l, supported: a } = this.viewModel, s = t === "slicing" || t === "excludingLayer";
|
|
156
|
+
if (l || !a)
|
|
157
157
|
return null;
|
|
158
158
|
a || r`<div class="container"><div class="error"><p>${this._messages.unsupported}</p></div></div>`;
|
|
159
159
|
const { excludedLayers: c } = this.viewModel, p = this.excludeGroundSurface, x = c.length > 0 || p, g = t === "disabled";
|
|
160
|
-
return r`<div class="container"><div class="hint">${t === "excludingLayer" ? r`<p class="hint-text">${i.excludeHint}</p>` : null}${t === "slicing" ? r`<p class="hint-text">${this._hasVoxelLayers ? i.voxelHint : i.hint}</p><p class="hint-text">${i.verticalHint}</p>` : null}</div>${!
|
|
160
|
+
return r`<div class="container"><div class="hint">${t === "excludingLayer" ? r`<p class="hint-text">${i.excludeHint}</p>` : null}${t === "slicing" ? r`<p class="hint-text">${this._hasVoxelLayers ? i.voxelHint : i.hint}</p><p class="hint-text">${i.verticalHint}</p>` : null}</div>${!s && x ? r`<div class="layer-list">${E({ class: "layer-list-title", level: this.headingLevel, children: i.excludedLayers })}${H({ layers: c.toArray(), excludeGroundSurface: p, onLayerClick: (m) => {
|
|
161
161
|
this.excludedLayers.remove(m);
|
|
162
162
|
}, onGroundClick: () => {
|
|
163
163
|
this.excludeGroundSurface = !1;
|
|
164
|
-
}, listLabel: i.excludedLayers, layerActionLabel: i.includeLayer, groundItemTitle: i.ground })}</div>` : null}<div class="actions">${!
|
|
164
|
+
}, listLabel: i.excludedLayers, layerActionLabel: i.includeLayer, groundItemTitle: i.ground })}</div>` : null}<div class="actions">${!s && !this.hideStartButton ? r`<calcite-button class="new-slice-button" .disabled=${g || this.interactionDisabled} @click=${this.start}>${i.newSlice}</calcite-button>` : null}${t === "sliced" ? r`<calcite-button appearance=outline-fill class="exclude-button" .disabled=${g || this.interactionDisabled} @click=${() => this.viewModel.pickLayerToExclude()}>${i.excludeLayer}</calcite-button>` : null}${t === "excludingLayer" ? r`<calcite-button appearance=outline-fill class="cancel-button" .disabled=${g} @click=${() => this.viewModel.stop()}>${i.cancel}</calcite-button>` : null}</div></div>`;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function f(e) {
|
|
168
168
|
return r`<calcite-list-item class="layer-item" data-testid=${`list-item-${e.uid}`} .label=${e.title ?? ""}><calcite-action icon=x @click=${e.onClick} slot=actions-end .text=${e.actionLabel} title=${e.actionLabel ?? z}></calcite-action></calcite-list-item>`;
|
|
169
169
|
}
|
|
170
170
|
function H(e) {
|
|
171
|
-
const i = e.layers.map((t) =>
|
|
172
|
-
return e.excludeGroundSurface && i.push(
|
|
171
|
+
const i = e.layers.map((t) => f({ uid: t.uid, title: t.title ?? "", onClick: () => e.onLayerClick(t), actionLabel: e.layerActionLabel }));
|
|
172
|
+
return e.excludeGroundSurface && i.push(f({ uid: "ground", title: e.groundItemTitle, onClick: e.onGroundClick, actionLabel: e.layerActionLabel })), r`<calcite-list .label=${e.listLabel} selection-mode=none>${i}</calcite-list>`;
|
|
173
173
|
}
|
|
174
174
|
w("arcgis-slice", P);
|
|
175
175
|
export {
|