@arcgis/map-components 5.2.0-next.166 → 5.2.0-next.168
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/263OOI6Z.js +2 -0
- package/dist/cdn/6S5TVS52.js +2 -0
- package/dist/cdn/{OEL57WQN.js → CGKFSTIT.js} +1 -1
- package/dist/cdn/GBTMUEG6.js +2 -0
- package/dist/cdn/K3SCI35Q.js +2 -0
- package/dist/cdn/OIKOOFSR.js +2 -0
- package/dist/cdn/PJ2XGEYO.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-directional-pad/customElement.js +53 -58
- package/dist/components/arcgis-presentation-captions/customElement.js +1 -1
- package/dist/components/arcgis-scene/customElement.d.ts +24 -0
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +11 -14
- package/dist/components/arcgis-utility-network-picker/customElement.d.ts +170 -6
- package/dist/components/arcgis-utility-network-picker/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +5 -4
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +19 -15
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +0 -6
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +5 -4
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +50 -46
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +9 -8
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -4
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +12 -12
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +0 -2
- 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/package.json +6 -6
- package/dist/cdn/73NABILZ.js +0 -2
- package/dist/cdn/BJ55UYFS.js +0 -2
- package/dist/cdn/BPTZ6LBO.js +0 -2
- package/dist/cdn/F3JX74XA.js +0 -2
- package/dist/cdn/FGQJD346.js +0 -2
- package/dist/cdn/OBFJ4JUW.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as _ } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as g, html as
|
|
3
|
+
import { css as g, html as l } from "lit";
|
|
4
4
|
import { ref as b } from "lit/directives/ref.js";
|
|
5
5
|
import { keyed as m } from "lit/directives/keyed.js";
|
|
6
6
|
import { usePropertyChange as f } from "@arcgis/lumina/controllers";
|
|
@@ -9,27 +9,27 @@ import { watch as y } from "@arcgis/core/core/reactiveUtils.js";
|
|
|
9
9
|
import { LitElement as M, createEvent as C, safeClassMap as $, nothing as h, safeStyleMap as x } from "@arcgis/lumina";
|
|
10
10
|
import { u as R } from "../../chunks/useT9n.js";
|
|
11
11
|
import { m as P } from "../../chunks/useViewModel.js";
|
|
12
|
-
import { g as
|
|
13
|
-
import { g as
|
|
14
|
-
import { d as
|
|
15
|
-
import
|
|
12
|
+
import { g as A } from "../../chunks/component-utils.js";
|
|
13
|
+
import { g as p } from "../../chunks/globalCss.js";
|
|
14
|
+
import { d as E, a as u, t as D, v as S, f as V, b as v, e as T, c as B } from "../../chunks/utils6.js";
|
|
15
|
+
import O from "@arcgis/core/core/Accessor.js";
|
|
16
16
|
import { property as r, subclass as L } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
17
17
|
import { c as I } from "../../chunks/goTo.js";
|
|
18
|
-
var k = Object.defineProperty, N = Object.getOwnPropertyDescriptor, a = (n, t,
|
|
19
|
-
for (var o =
|
|
20
|
-
(
|
|
21
|
-
return
|
|
18
|
+
var k = Object.defineProperty, N = Object.getOwnPropertyDescriptor, a = (n, t, i, e) => {
|
|
19
|
+
for (var o = e > 1 ? void 0 : e ? N(t, i) : t, d = n.length - 1, c; d >= 0; d--)
|
|
20
|
+
(c = n[d]) && (o = (e ? c(t, i, o) : c(o)) || o);
|
|
21
|
+
return e && o && k(t, i, o), o;
|
|
22
22
|
};
|
|
23
23
|
let s = class extends O {
|
|
24
24
|
constructor(n) {
|
|
25
|
-
super(n), this._anyAngleMovementEnabled = !1, this._disabled = !1, this._moveOnceDuration =
|
|
25
|
+
super(n), this._anyAngleMovementEnabled = !1, this._disabled = !1, this._moveOnceDuration = E, this.speed = 1, this.beginFollowingPointer = (t, i) => {
|
|
26
26
|
if (this.disabled)
|
|
27
27
|
return;
|
|
28
|
-
this._widgetCenter =
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
28
|
+
this._widgetCenter = i;
|
|
29
|
+
const e = this._pointerLocationToVector(t);
|
|
30
|
+
if (e === void 0)
|
|
31
31
|
return;
|
|
32
|
-
const o = this._resolveClosestAngle(t,
|
|
32
|
+
const o = this._resolveClosestAngle(t, e);
|
|
33
33
|
o !== void 0 && (this._emitMove(u(o)), this.angle = o, this._initialAngle = o, this._setMovementTimeout(() => {
|
|
34
34
|
this._widgetCenter === void 0 && this._stopMovement();
|
|
35
35
|
}), document.addEventListener("pointermove", this._onPointerMove, { passive: !0 }), document.addEventListener("pointerup", this._onPointerUp, { passive: !0, once: !0 }));
|
|
@@ -38,43 +38,37 @@ let s = class extends O {
|
|
|
38
38
|
}, this._pointerLocationToVector = (t) => {
|
|
39
39
|
if (this._widgetCenter === void 0)
|
|
40
40
|
return;
|
|
41
|
-
const { x:
|
|
42
|
-
return { x:
|
|
43
|
-
}, this._resolveClosestAngle = (t,
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
41
|
+
const { x: i, y: e } = D(this._widgetCenter, t);
|
|
42
|
+
return { x: i, y: -e };
|
|
43
|
+
}, this._resolveClosestAngle = (t, i) => {
|
|
44
|
+
const e = t.target;
|
|
45
|
+
if (e?.classList?.contains("compass"))
|
|
46
46
|
return;
|
|
47
|
-
const o = Number.parseInt(
|
|
48
|
-
return Number.isNaN(o) ?
|
|
47
|
+
const o = Number.parseInt(e?.getAttribute?.("data-angle") ?? "", 10);
|
|
48
|
+
return Number.isNaN(o) ? S(i) : o;
|
|
49
49
|
}, this._onPointerMove = (t) => {
|
|
50
50
|
if (t.buttons === 0) {
|
|
51
51
|
this._stopMovement();
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
54
|
+
const i = this._pointerLocationToVector(t);
|
|
55
|
+
if (i === void 0)
|
|
56
56
|
return;
|
|
57
57
|
this._setMovementTimeout(void 0);
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
58
|
+
const e = this._resolveClosestAngle(t, i);
|
|
59
|
+
if (e === void 0) {
|
|
60
60
|
this._emitStop();
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
const o = u(
|
|
63
|
+
const o = u(e), d = this._initialAngle != null && this._initialAngle !== e;
|
|
64
64
|
this._anyAngleMovementEnabled ||= d;
|
|
65
|
-
const
|
|
66
|
-
(
|
|
65
|
+
const c = this._anyAngleMovementEnabled ? i : o;
|
|
66
|
+
(c.x !== this._movementVector?.x || c.y !== this._movementVector?.y) && (this.angle = e, this._emitMove(c));
|
|
67
67
|
}, this._onPointerUp = () => {
|
|
68
68
|
this._movementTimeout === void 0 ? this._stopMovement() : this._widgetCenter = void 0;
|
|
69
69
|
}, this._stopMovement = () => {
|
|
70
70
|
this._emitStop(), this._widgetCenter = void 0, this._initialAngle = void 0, this._anyAngleMovementEnabled = !1, document.removeEventListener("pointermove", this._onPointerMove), document.removeEventListener("pointerup", this._onPointerUp), this._setMovementTimeout(void 0);
|
|
71
|
-
}
|
|
72
|
-
"move-direction-change",
|
|
73
|
-
({ vector: { x: t, y: e } }) => this._navigation?.continuousPanVector({
|
|
74
|
-
x: t * this.speed,
|
|
75
|
-
y: e * this.speed
|
|
76
|
-
})
|
|
77
|
-
), this.on("move-stop", () => this._navigation?.stop());
|
|
71
|
+
};
|
|
78
72
|
}
|
|
79
73
|
destroy() {
|
|
80
74
|
this._stopMovement();
|
|
@@ -113,12 +107,13 @@ let s = class extends O {
|
|
|
113
107
|
}, this._moveOnceDuration);
|
|
114
108
|
}
|
|
115
109
|
_emitMove(n) {
|
|
116
|
-
this._movementVector == null && this.
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
this._movementVector == null && this._navigation?.begin(), this._movementVector = n, this._navigation?.continuousPanVector({
|
|
111
|
+
x: n.x * this.speed,
|
|
112
|
+
y: n.y * this.speed
|
|
113
|
+
});
|
|
119
114
|
}
|
|
120
115
|
_emitStop() {
|
|
121
|
-
this.angle = void 0, this._movementVector !== void 0 && (this.
|
|
116
|
+
this.angle = void 0, this._movementVector !== void 0 && (this._navigation?.stop(), this._movementVector = void 0);
|
|
122
117
|
}
|
|
123
118
|
};
|
|
124
119
|
a([
|
|
@@ -166,7 +161,7 @@ a([
|
|
|
166
161
|
s = a([
|
|
167
162
|
L("components.directional-pad.DirectionalPadViewModel")
|
|
168
163
|
], s);
|
|
169
|
-
const U = g`:host{outline:none;box-shadow:none!important;background-color:transparent!important;user-select:none;calcite-action-group{touch-action:none}
|
|
164
|
+
const U = g`:host{outline:none;box-shadow:none!important;background-color:transparent!important;user-select:none;calcite-action-group{touch-action:none}}.root{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.buttons-container{--calcite-color-background: transparent;--calcite-action-group-gap: 0;calcite-action{--calcite-color-focus: var(--calcite-color-foreground-3)}calcite-action:not([active]){--calcite-action-background-color-press: var(--calcite-color-foreground-1)}calcite-action[active]{--calcite-action-background-color: var(--calcite-color-foreground-3)}calcite-icon{transform:var(--rotation, unset)}@media(hover:none){calcite-action{--calcite-action-background-color-hover: var(--calcite-color-foreground-1);--calcite-action-text-color-press: var(--calcite-color-text-3)}}}.rotation-container{display:block;width:100%;calcite-action{flex:.3}}.rotation-slider-container{display:flex;flex:1;align-items:center;calcite-slider{flex:1;padding-inline:var(--calcite-spacing-xxs)}}`, F = P(s);
|
|
170
165
|
class j extends M {
|
|
171
166
|
constructor() {
|
|
172
167
|
super(...arguments), this.messages = R({}), this._onContextMenu = (t) => t.preventDefault(), this._buttons = {}, this.viewModel = F(this), this.angle = this.viewModel.angle, this.rotation = this.viewModel.rotation, this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.disabled = this.viewModel.disabled, this.hideDirectionalButtons = !1, this.icon = "move", this.showRotationResetButton = !1, this.showRotationSlider = !1, this.state = this.viewModel.state, this.visualScale = "s", this.arcgisPropertyChange = f()("state"), this.arcgisReady = C();
|
|
@@ -187,7 +182,7 @@ class j extends M {
|
|
|
187
182
|
this.manager.onLifecycle(() => [
|
|
188
183
|
// Move focus when movement angle changed by touch/mouse (not keyboard!)
|
|
189
184
|
y(() => this.viewModel.angle, () => {
|
|
190
|
-
this._buttonsContainer?.contains(document.activeElement) && (this.viewModel.angle == null ?
|
|
185
|
+
this._buttonsContainer?.contains(document.activeElement) && (this.viewModel.angle == null ? A(this)?.focus() : w(this._buttons[this.viewModel.angle]));
|
|
191
186
|
})
|
|
192
187
|
]);
|
|
193
188
|
}
|
|
@@ -198,9 +193,9 @@ class j extends M {
|
|
|
198
193
|
}
|
|
199
194
|
_setButtonContainerRef(t) {
|
|
200
195
|
t !== void 0 ? (this._buttonsContainer = t, queueMicrotask(() => {
|
|
201
|
-
this._buttons = Object.fromEntries(Array.from(t.children, (
|
|
202
|
-
Number.parseInt(
|
|
203
|
-
|
|
196
|
+
this._buttons = Object.fromEntries(Array.from(t.children, (i) => [
|
|
197
|
+
Number.parseInt(i.getAttribute("data-angle") ?? ""),
|
|
198
|
+
i
|
|
204
199
|
]));
|
|
205
200
|
})) : (this._buttonsContainer = void 0, this._buttons = {});
|
|
206
201
|
}
|
|
@@ -208,8 +203,8 @@ class j extends M {
|
|
|
208
203
|
if (this._buttonsContainer === void 0)
|
|
209
204
|
return;
|
|
210
205
|
t.composedPath().find((o) => o.hasPointerCapture?.(t.pointerId))?.releasePointerCapture(t.pointerId);
|
|
211
|
-
const
|
|
212
|
-
this.viewModel.beginFollowingPointer(t,
|
|
206
|
+
const e = V(this._buttonsContainer);
|
|
207
|
+
this.viewModel.beginFollowingPointer(t, e);
|
|
213
208
|
}
|
|
214
209
|
_onSliderInput({ currentTarget: t }) {
|
|
215
210
|
typeof t.value == "number" && (this.viewModel.rotation = t.value);
|
|
@@ -221,11 +216,11 @@ class j extends M {
|
|
|
221
216
|
this.viewModel.moveOnce(t);
|
|
222
217
|
}
|
|
223
218
|
render() {
|
|
224
|
-
const { label: t, disabled:
|
|
225
|
-
return
|
|
219
|
+
const { label: t, disabled: i } = this, e = this.view == null || this.view.type === "2d";
|
|
220
|
+
return l`<div .ariaLabel=${t ?? void 0} class=${$({ root: !0, [p.widget]: !0, [p.disabled]: i })} tabindex=-1>${e ? this._renderContent() : this._renderUnsupportedMessage()}</div>`;
|
|
226
221
|
}
|
|
227
222
|
_renderUnsupportedMessage() {
|
|
228
|
-
return
|
|
223
|
+
return l`<section class="error"><p>${this.messages.unsupported}</p></section>`;
|
|
229
224
|
}
|
|
230
225
|
_renderContent() {
|
|
231
226
|
return [
|
|
@@ -234,28 +229,28 @@ class j extends M {
|
|
|
234
229
|
];
|
|
235
230
|
}
|
|
236
231
|
_renderDirectionalButtons() {
|
|
237
|
-
return m("directional-buttons-container",
|
|
232
|
+
return m("directional-buttons-container", l`<calcite-action-bar expand-toggle-disabled floating layout=grid .scale=${this.visualScale} overflow-mode=none><calcite-action-group class="buttons-container" dir=ltr @contextmenu=${{
|
|
238
233
|
handleEvent: this._onContextMenu,
|
|
239
234
|
capture: !0
|
|
240
|
-
}} ${b(this._setButtonContainerRef)}>${
|
|
235
|
+
}} ${b(this._setButtonContainerRef)}>${v.slice(0, 4).map(this._renderButton, this)}${this._renderCompass()}${v.slice(4).map(this._renderButton, this)}</calcite-action-group></calcite-action-bar>`);
|
|
241
236
|
}
|
|
242
237
|
_renderButton(t) {
|
|
243
|
-
const { label:
|
|
244
|
-
return
|
|
238
|
+
const { label: i, iconName: e } = T[t], o = this.messages[i];
|
|
239
|
+
return l`<calcite-action .active=${this.angle === t} alignment=center class="button" data-angle=${t ?? h} .disabled=${this.disabled} @click=${this._onClick.bind(this, t)} @pointerdown=${this._onButtonPointerDown} .text=${o ?? ""} title=${o ?? h}><calcite-icon .icon=${e} .scale=${this.visualScale}></calcite-icon></calcite-action>`;
|
|
245
240
|
}
|
|
246
241
|
_renderCompass() {
|
|
247
|
-
const t = this.disabled || B(this.view) ? "compass-needle" : "arrow-up",
|
|
248
|
-
return
|
|
242
|
+
const t = this.disabled || B(this.view) ? "compass-needle" : "arrow-up", i = this.rotation === 0, e = this.messages.resetHeading;
|
|
243
|
+
return l`<calcite-action alignment=center class="compass" .disabled=${this.disabled || !this._rotationEnabled || i} @click=${this._onRotationReset} style=${x(this._rotateIcon(this.rotation))} .text=${e ?? ""} title=${e ?? h}>${!i && l`<calcite-icon .icon=${t} .scale=${this.visualScale}></calcite-icon>` || ""}</calcite-action>`;
|
|
249
244
|
}
|
|
250
245
|
_renderRotation() {
|
|
251
|
-
return m("slider-container",
|
|
246
|
+
return m("slider-container", l`<calcite-action-bar expand-toggle-disabled floating layout=horizontal .scale=${this.visualScale}><calcite-action-group class="rotation-container">${this.showRotationResetButton ? this._renderRotationResetButton() : null}${this._renderRotationSlider()}</calcite-action-group></calcite-action-bar>`);
|
|
252
247
|
}
|
|
253
248
|
_renderRotationResetButton() {
|
|
254
249
|
const t = this.messages.resetHeading;
|
|
255
|
-
return
|
|
250
|
+
return l`<calcite-action alignment=center class="rotation-reset-button" .disabled=${this.disabled || !this._rotationEnabled} @click=${this._onRotationReset} .text=${t ?? ""} title=${t ?? h}><calcite-icon flip-rtl icon=rotate .scale=${this.visualScale}></calcite-icon></calcite-action>`;
|
|
256
251
|
}
|
|
257
252
|
_renderRotationSlider() {
|
|
258
|
-
return
|
|
253
|
+
return l`<div class="rotation-slider-container"><calcite-slider .ariaLabel=${this.messages.heading} .disabled=${this.disabled || !this._rotationEnabled} label-handles max=360 min=0 required .scale=${this.visualScale} .value=${Math.round(this.rotation)} @calciteSliderInput=${this._onSliderInput}></calcite-slider></div>`;
|
|
259
254
|
}
|
|
260
255
|
}
|
|
261
256
|
_("arcgis-directional-pad", j);
|
|
@@ -4,7 +4,7 @@ import { css as l, html as c } from "lit";
|
|
|
4
4
|
import { LitElement as s, createEvent as b } from "@arcgis/lumina";
|
|
5
5
|
import "@arcgis/core/core/accessorSupport/decorators.js";
|
|
6
6
|
import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
|
|
7
|
-
const d = l`:host{--arcgis-internal-presentation-background-opacity: .6}.captions-container{width:100%;height:100%;padding-inline-start:var(--arcgis-internal-presentation-padding-start);padding-inline-end:var(--arcgis-internal-presentation-padding-end)}.captions{height:auto;position:relative;box-sizing:border-box;transition:padding .05s ease-in 0s;min-height:48px;max-width:max(400px,40%);padding:12px 16px;&:before{content:"";position:absolute;inset-block:-16px -144px;inset-inline:calc(-64px - var(--arcgis-internal-presentation-padding-start)) calc(0px - max(360px,32vw));background:var(--caption-gradient);mask:var(--caption-gradient-mask-before);opacity:var(--arcgis-internal-presentation-background-opacity);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--caption-gradient-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}:dir(rtl) .captions{&:before{mask:var(--caption-gradient-mask-before-RTL)}}.title{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;text-shadow:var(--title-text-shadow);font-size:var(--caption-title-font-size);font-family:Avenir Next World,sans-serif;font-style:normal;font-weight:var(--calcite-font-weight-bold);line-height:var(--calcite-font-line-height-relative-snug);margin-bottom:2px;color:var(--calcite-color-text-1)}.captions-description{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;text-shadow:var(--description-text-shadow);font-size:var(--caption-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-1)}.cover-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;padding-block-start:calc(var(--arcgis-internal-presentation-cover-padding-top) + var(--calcite-space-lg));padding-block-end:calc(var(--arcgis-internal-presentation-cover-padding-bottom) + var(--calcite-space-lg))}.cover{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-inline:8px;min-height:88px;min-width:200px;position:relative;padding-inline-start:16px;padding-inline-end:16px;opacity:1;transition:opacity .25s,color .25s;&:before{content:"";position:absolute;inset:calc(0vw - max(320px,12vw,18vh)) calc(0vw - max(320px,24vw));border-radius:120px;background:var(--cover-gradient-before);mask:var(--cover-mask-before);opacity:var(--arcgis-internal-presentation-background-opacity);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--cover-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}.cover-description{text-wrap:pretty;text-align:center;text-shadow:var(--description-text-shadow);font-size:var(--cover-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);display:-webkit-box;max-width:75ch;overflow-wrap:break-word;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;color:var(--calcite-color-text-1)}:host{width:100%;height:100%;position:absolute;top:0;left:0;display:flex;align-items:flex-start;box-sizing:border-box;--caption-gradient: linear-gradient( 180deg, rgb(255 255 255 / 100%) 0%, rgb(255 255 255 / 98.3%) 8.1%, rgb(255 255 255 / 95%) 15.5%, rgb(255 255 255 / 90%) 22.5%, rgb(255 255 255 / 83.3%) 29%, rgb(255 255 255 / 73.3%) 35%, rgb(255 255 255 / 65%) 41%, rgb(255 255 255 / 55%) 47%, rgb(255 255 255 / 45%) 53%, rgb(255 255 255 / 35%) 59%, rgb(255 255 255 / 26.7%) 65%, rgb(255 255 255 / 18.3%) 71%, rgb(255 255 255 / 10%) 77%, rgb(255 255 255 / 4%) 84.5%, rgb(255 255 255 / 1%) 91%, rgb(255 255 255 / 0%) 100% );--title-text-shadow: 0 1px 1px #fff3, 0 0 3px #fff2, 0 0 6px #fff2;--caption-gradient-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-before-RTL: linear-gradient( 270deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--description-text-shadow: 0 .5px .5px #fff2, 0 1px 1px #fff2, 0 0 8px #fff2;--caption-title-font-size: max(var(--calcite-font-size-2xl), calc(18px + .64vw) );--caption-description-font-size: max(var(--calcite-font-size), calc(10px + .4vw) );--cover-description-font-size: max(var(--calcite-font-size-md), calc(10px + .5vw) );--cover-gradient-before: linear-gradient( 0deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 4%, rgb(255 255 255 / 4%) 7.7%, rgb(255 255 255 / 10%) 11.2%, rgb(255 255 255 / 18.3%) 14.5%, rgb(255 255 255 / 26.7%) 17.5%, rgb(255 255 255 / 35%) 20.5%, rgb(255 255 255 / 45%) 23.5%, rgb(255 255 255 / 55%) 26.5%, rgb(255 255 255 / 65%) 29.5%, rgb(255 255 255 / 73.3%) 32.5%, rgb(255 255 255 / 83.3%) 35.5%, rgb(255 255 255 / 90%) 38.5%, rgb(255 255 255 / 95%) 42.2%, rgb(255 255 255 / 98.3%) 46%, rgb(255 255 255 / 100%) 50%, rgb(255 255 255 / 98.3%) 54%, rgb(255 255 255 / 95%) 57.8%, rgb(255 255 255 / 90%) 61.5%, rgb(255 255 255 / 83.3%) 64.5%, rgb(255 255 255 / 73.3%) 67.5%, rgb(255 255 255 / 65%) 70.5%, rgb(255 255 255 / 55%) 73.5%, rgb(255 255 255 / 45%) 76.5%, rgb(255 255 255 / 35%) 79.5%, rgb(255 255 255 / 26.7%) 82.5%, rgb(255 255 255 / 18.3%) 85.5%, rgb(255 255 255 / 10%) 88.8%, rgb(255 255 255 / 4%) 92.3%, rgb(255 255 255 / 1%) 96%, rgb(255 255 255 / 0%) 100% );--cover-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 3.2%, rgb(255 255 255 / 4%) 6.2%, rgb(255 255 255 / 10%) 9%, rgb(255 255 255 / 18.3%) 11.6%, rgb(255 255 255 / 26.7%) 14%, rgb(255 255 255 / 35%) 16.4%, rgb(255 255 255 / 45%) 18.8%, rgb(255 255 255 / 55%) 21.2%, rgb(255 255 255 / 65%) 23.6%, rgb(255 255 255 / 73.3%) 26%, rgb(255 255 255 / 83.3%) 28.4%, rgb(255 255 255 / 90%) 30.8%, rgb(255 255 255 / 95%) 33.8%, rgb(255 255 255 / 98.3%) 36.8%, rgb(255 255 255 / 100%) 40%, rgb(255 255 255 / 100%) 60%, rgb(255 255 255 / 98.3%) 63.2%, rgb(255 255 255 / 95%) 66.2%, rgb(255 255 255 / 90%) 69.2%, rgb(255 255 255 / 83.3%) 71.6%, rgb(255 255 255 / 73.3%) 74%, rgb(255 255 255 / 65%) 76.4%, rgb(255 255 255 / 55%) 78.8%, rgb(255 255 255 / 45%) 81.2%, rgb(255 255 255 / 35%) 83.6%, rgb(255 255 255 / 26.7%) 86%, rgb(255 255 255 / 18.3%) 88.4%, rgb(255 255 255 / 10%) 91%, rgb(255 255 255 / 4%) 93.9%, rgb(255 255 255 / 1%) 96.8%, rgb(255 255 255 / 0%) 100% );--cover-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--cover-gradient-phone: linear-gradient( 0deg, rgb(255 255 255 / 0%) .59%, rgb(255 255 255 / 4%) 4.94%, rgb(255 255 255 / 50%) 25.87%, rgb(255 255 255 / 70%) 37.02%, rgb(255 255 255 / 80%) 48.43%, rgb(255 255 255 / 70%) 60.34%, rgb(255 255 255 / 30%) 80.55%, rgb(255 255 255 / 4%) 93.22%, rgb(255 255 255 / 0%) 99.74% );.fadeOut{opacity:1!important}}`, n = 50, o = 256;
|
|
7
|
+
const d = l`:host{--arcgis-internal-presentation-background-opacity: .6}.captions-container{width:100%;height:100%;padding-inline-start:var(--arcgis-internal-presentation-padding-start);padding-inline-end:var(--arcgis-internal-presentation-padding-end)}.captions{width:fit-content;height:auto;position:relative;box-sizing:border-box;transition:padding .05s ease-in 0s;min-height:48px;max-width:max(400px,40%);padding:12px 16px;&:before{content:"";position:absolute;inset-block:-16px -144px;inset-inline:calc(-64px - var(--arcgis-internal-presentation-padding-start)) calc(0px - max(360px,32vw));background:var(--caption-gradient);mask:var(--caption-gradient-mask-before);opacity:var(--arcgis-internal-presentation-background-opacity);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--caption-gradient-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}:dir(rtl) .captions{&:before{mask:var(--caption-gradient-mask-before-RTL)}}.title{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;text-shadow:var(--title-text-shadow);font-size:var(--caption-title-font-size);font-family:Avenir Next World,sans-serif;font-style:normal;font-weight:var(--calcite-font-weight-bold);line-height:var(--calcite-font-line-height-relative-snug);margin-bottom:2px;color:var(--calcite-color-text-1)}.captions-description{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;text-shadow:var(--description-text-shadow);font-size:var(--caption-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-1)}.cover-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;padding-block-start:calc(var(--arcgis-internal-presentation-cover-padding-top) + var(--calcite-space-lg));padding-block-end:calc(var(--arcgis-internal-presentation-cover-padding-bottom) + var(--calcite-space-lg))}.cover{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-inline:8px;min-height:88px;min-width:200px;position:relative;padding-inline-start:16px;padding-inline-end:16px;opacity:1;transition:opacity .25s,color .25s;&:before{content:"";position:absolute;inset:calc(0vw - max(320px,12vw,18vh)) calc(0vw - max(320px,24vw));border-radius:120px;background:var(--cover-gradient-before);mask:var(--cover-mask-before);opacity:var(--arcgis-internal-presentation-background-opacity);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--cover-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}.cover-description{text-wrap:pretty;text-align:center;text-shadow:var(--description-text-shadow);font-size:var(--cover-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);display:-webkit-box;max-width:75ch;overflow-wrap:break-word;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;color:var(--calcite-color-text-1)}:host{width:100%;height:100%;position:absolute;top:0;left:0;display:flex;align-items:flex-start;box-sizing:border-box;--caption-gradient: linear-gradient( 180deg, rgb(255 255 255 / 100%) 0%, rgb(255 255 255 / 98.3%) 8.1%, rgb(255 255 255 / 95%) 15.5%, rgb(255 255 255 / 90%) 22.5%, rgb(255 255 255 / 83.3%) 29%, rgb(255 255 255 / 73.3%) 35%, rgb(255 255 255 / 65%) 41%, rgb(255 255 255 / 55%) 47%, rgb(255 255 255 / 45%) 53%, rgb(255 255 255 / 35%) 59%, rgb(255 255 255 / 26.7%) 65%, rgb(255 255 255 / 18.3%) 71%, rgb(255 255 255 / 10%) 77%, rgb(255 255 255 / 4%) 84.5%, rgb(255 255 255 / 1%) 91%, rgb(255 255 255 / 0%) 100% );--title-text-shadow: 0 1px 1px #fff3, 0 0 3px #fff2, 0 0 6px #fff2;--caption-gradient-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-before-RTL: linear-gradient( 270deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--description-text-shadow: 0 .5px .5px #fff2, 0 1px 1px #fff2, 0 0 8px #fff2;--caption-title-font-size: max(var(--calcite-font-size-2xl), calc(18px + .64vw) );--caption-description-font-size: max(var(--calcite-font-size), calc(10px + .4vw) );--cover-description-font-size: max(var(--calcite-font-size-md), calc(10px + .5vw) );--cover-gradient-before: linear-gradient( 0deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 4%, rgb(255 255 255 / 4%) 7.7%, rgb(255 255 255 / 10%) 11.2%, rgb(255 255 255 / 18.3%) 14.5%, rgb(255 255 255 / 26.7%) 17.5%, rgb(255 255 255 / 35%) 20.5%, rgb(255 255 255 / 45%) 23.5%, rgb(255 255 255 / 55%) 26.5%, rgb(255 255 255 / 65%) 29.5%, rgb(255 255 255 / 73.3%) 32.5%, rgb(255 255 255 / 83.3%) 35.5%, rgb(255 255 255 / 90%) 38.5%, rgb(255 255 255 / 95%) 42.2%, rgb(255 255 255 / 98.3%) 46%, rgb(255 255 255 / 100%) 50%, rgb(255 255 255 / 98.3%) 54%, rgb(255 255 255 / 95%) 57.8%, rgb(255 255 255 / 90%) 61.5%, rgb(255 255 255 / 83.3%) 64.5%, rgb(255 255 255 / 73.3%) 67.5%, rgb(255 255 255 / 65%) 70.5%, rgb(255 255 255 / 55%) 73.5%, rgb(255 255 255 / 45%) 76.5%, rgb(255 255 255 / 35%) 79.5%, rgb(255 255 255 / 26.7%) 82.5%, rgb(255 255 255 / 18.3%) 85.5%, rgb(255 255 255 / 10%) 88.8%, rgb(255 255 255 / 4%) 92.3%, rgb(255 255 255 / 1%) 96%, rgb(255 255 255 / 0%) 100% );--cover-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 3.2%, rgb(255 255 255 / 4%) 6.2%, rgb(255 255 255 / 10%) 9%, rgb(255 255 255 / 18.3%) 11.6%, rgb(255 255 255 / 26.7%) 14%, rgb(255 255 255 / 35%) 16.4%, rgb(255 255 255 / 45%) 18.8%, rgb(255 255 255 / 55%) 21.2%, rgb(255 255 255 / 65%) 23.6%, rgb(255 255 255 / 73.3%) 26%, rgb(255 255 255 / 83.3%) 28.4%, rgb(255 255 255 / 90%) 30.8%, rgb(255 255 255 / 95%) 33.8%, rgb(255 255 255 / 98.3%) 36.8%, rgb(255 255 255 / 100%) 40%, rgb(255 255 255 / 100%) 60%, rgb(255 255 255 / 98.3%) 63.2%, rgb(255 255 255 / 95%) 66.2%, rgb(255 255 255 / 90%) 69.2%, rgb(255 255 255 / 83.3%) 71.6%, rgb(255 255 255 / 73.3%) 74%, rgb(255 255 255 / 65%) 76.4%, rgb(255 255 255 / 55%) 78.8%, rgb(255 255 255 / 45%) 81.2%, rgb(255 255 255 / 35%) 83.6%, rgb(255 255 255 / 26.7%) 86%, rgb(255 255 255 / 18.3%) 88.4%, rgb(255 255 255 / 10%) 91%, rgb(255 255 255 / 4%) 93.9%, rgb(255 255 255 / 1%) 96.8%, rgb(255 255 255 / 0%) 100% );--cover-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--cover-gradient-phone: linear-gradient( 0deg, rgb(255 255 255 / 0%) .59%, rgb(255 255 255 / 4%) 4.94%, rgb(255 255 255 / 50%) 25.87%, rgb(255 255 255 / 70%) 37.02%, rgb(255 255 255 / 80%) 48.43%, rgb(255 255 255 / 70%) 60.34%, rgb(255 255 255 / 30%) 80.55%, rgb(255 255 255 / 4%) 93.22%, rgb(255 255 255 / 0%) 99.74% );.fadeOut{opacity:1!important}}`, n = 50, o = 256;
|
|
8
8
|
class x extends s {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments), this.transitionActive = !1, this.autoDestroyDisabled = !1, this.arcgisReady = b();
|
|
@@ -982,6 +982,30 @@ export abstract class ArcgisScene extends LitElement {
|
|
|
982
982
|
* the view, see this component's [goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#goTo) method.
|
|
983
983
|
*
|
|
984
984
|
* [Read more](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#viewpoint)
|
|
985
|
+
*
|
|
986
|
+
* @example
|
|
987
|
+
* ```js
|
|
988
|
+
* // Set the initial viewpoint toward the Empire State Building in New York City
|
|
989
|
+
* const viewElement = document.querySelector("arcgis-scene");
|
|
990
|
+
* viewElement.viewpoint = new Viewpoint({
|
|
991
|
+
* camera: new Camera({
|
|
992
|
+
* position: {
|
|
993
|
+
* longitude: -73.9857,
|
|
994
|
+
* latitude: 40.7444,
|
|
995
|
+
* z: 500,
|
|
996
|
+
* },
|
|
997
|
+
* heading: 0,
|
|
998
|
+
* tilt: 60,
|
|
999
|
+
* }),
|
|
1000
|
+
* });
|
|
1001
|
+
* ```
|
|
1002
|
+
* @example
|
|
1003
|
+
* ```js
|
|
1004
|
+
* // Get the initial viewpoint of the view once the view is ready
|
|
1005
|
+
* const viewElement = document.querySelector("arcgis-scene");
|
|
1006
|
+
* await viewElement.viewOnReady();
|
|
1007
|
+
* const initialViewpoint = viewElement.viewpoint.clone();
|
|
1008
|
+
* ```
|
|
985
1009
|
*/
|
|
986
1010
|
accessor viewpoint: Viewpoint;
|
|
987
1011
|
/**
|
|
@@ -170,6 +170,8 @@ export abstract class ArcgisTimeBarSlider extends LitElement {
|
|
|
170
170
|
* * Dragging a thumb: Displays the day of the week for that specific thumb's position.
|
|
171
171
|
* * Dragging the track: Displays the days of the week for the start and end of the active time range.
|
|
172
172
|
*
|
|
173
|
+
* The following code listens for changes to `activeValue` and updates the popover content.
|
|
174
|
+
*
|
|
173
175
|
* ```html
|
|
174
176
|
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
175
177
|
* <arcgis-time-bar show-play show-next show-previous show-time-extent slot="top-right">
|
|
@@ -196,29 +198,24 @@ export abstract class ArcgisTimeBarSlider extends LitElement {
|
|
|
196
198
|
* }),
|
|
197
199
|
* };
|
|
198
200
|
*
|
|
199
|
-
*
|
|
200
|
-
* (
|
|
201
|
-
*
|
|
201
|
+
* timeBarSlider.addEventListener("arcgisPropertyChange", (event) => {
|
|
202
|
+
* if (event.detail.name === "activeValue") {
|
|
203
|
+
* const activeValue = timeBarSlider.activeValue;
|
|
204
|
+
*
|
|
202
205
|
* if (!activeValue) {
|
|
203
206
|
* popoverSlot.innerHTML = "";
|
|
204
|
-
* }
|
|
205
|
-
*
|
|
206
|
-
* // A date is returned when the user is interacting with the slider's thumb.
|
|
207
|
-
* if (activeValue instanceof Date) {
|
|
207
|
+
* } else if (activeValue instanceof Date) {
|
|
208
208
|
* popoverSlot.innerHTML = activeValue.toLocaleDateString(undefined, { weekday: "long" });
|
|
209
209
|
* popoverSlot.style.width = "100px";
|
|
210
|
-
* }
|
|
211
|
-
*
|
|
212
|
-
* // A time extent is returned when the user is interacting with the slider's track.
|
|
213
|
-
* if (activeValue instanceof TimeExtent) {
|
|
210
|
+
* } else if (activeValue instanceof TimeExtent) {
|
|
214
211
|
* const start = activeValue.start?.toLocaleDateString(undefined, { weekday: "long" });
|
|
215
212
|
* const end = activeValue.end?.toLocaleDateString(undefined, { weekday: "long" });
|
|
216
213
|
* popoverSlot.innerHTML = `${start} - ${end}`;
|
|
217
214
|
* popoverSlot.style.width = "150px";
|
|
218
215
|
* }
|
|
219
|
-
* }
|
|
220
|
-
*
|
|
221
|
-
*
|
|
216
|
+
* }
|
|
217
|
+
* });
|
|
218
|
+
*
|
|
222
219
|
* ```
|
|
223
220
|
*/
|
|
224
221
|
get activeValue(): Date | TimeExtent | null | undefined;
|
|
@@ -5,9 +5,81 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
5
5
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* It
|
|
8
|
+
* The Utility Network Picker component selects a utility network from a web map.
|
|
9
|
+
* It is used by the [arcgis-utility-network-trace-analysis](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-analysis/) component
|
|
10
|
+
* and can also be used independently.
|
|
10
11
|
*
|
|
12
|
+
* Set [view](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#view) to a
|
|
13
|
+
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/)
|
|
14
|
+
* whose web map contains utility networks. The component loads the map and the selected network.
|
|
15
|
+
* The component displays the network's [title](https://developers.arcgis.com/javascript/latest/references/core/networks/Network/#title)
|
|
16
|
+
* when the map contains one utility network, or a [Combobox](https://developers.arcgis.com/calcite-design-system/components/combobox/)
|
|
17
|
+
* for multiple utility networks.
|
|
18
|
+
*
|
|
19
|
+
* When the map's networks are loaded, the first network is selected if the current selection
|
|
20
|
+
* is missing or does not belong to the map. Selecting a network does not execute a trace.
|
|
21
|
+
* Access the selected utility network with the [selectedUtilityNetwork](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#selectedUtilityNetwork) property.
|
|
22
|
+
*
|
|
23
|
+
* Changing the selected utility network loads the new selected utility network
|
|
24
|
+
* if it is not already [loaded](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/#loaded).
|
|
25
|
+
* Before using the new selected `UtilityNetwork`, await its
|
|
26
|
+
* [load()](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/#load)
|
|
27
|
+
* method, which resolves with the loaded instance, including when it is already loaded.
|
|
28
|
+
* `componentOnReady()` waits for component initialization, not for the selected network to load.
|
|
29
|
+
*
|
|
30
|
+
* Customize what this component displays with
|
|
31
|
+
* [heading](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#heading),
|
|
32
|
+
* [hideErrors](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#hideErrors), and
|
|
33
|
+
* [hideLoader](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#hideLoader).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* Place a standalone picker in a pane next to a web map containing utility networks.
|
|
37
|
+
* Configure [authentication](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/)
|
|
38
|
+
* for secured resources before loading the map.
|
|
39
|
+
* ```html
|
|
40
|
+
* <calcite-shell>
|
|
41
|
+
* <calcite-shell-panel slot="panel-start">
|
|
42
|
+
* <calcite-panel heading="Utility networks">
|
|
43
|
+
* <arcgis-utility-network-picker></arcgis-utility-network-picker>
|
|
44
|
+
* </calcite-panel>
|
|
45
|
+
* </calcite-shell-panel>
|
|
46
|
+
* <arcgis-map item-id="471eb0bf37074b1fbb972b1da70fb310"></arcgis-map>
|
|
47
|
+
* </calcite-shell>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* ```js
|
|
51
|
+
* import "@arcgis/map-components/components/arcgis-map";
|
|
52
|
+
* import "@arcgis/map-components/components/arcgis-utility-network-picker";
|
|
53
|
+
*
|
|
54
|
+
* const mapElement = document.querySelector("arcgis-map");
|
|
55
|
+
* await mapElement.viewOnReady();
|
|
56
|
+
*
|
|
57
|
+
* const picker = document.querySelector("arcgis-utility-network-picker");
|
|
58
|
+
* picker.view = mapElement.view;
|
|
59
|
+
* picker.addEventListener("arcgisError", (event) => {
|
|
60
|
+
* console.error(event.type, picker.error);
|
|
61
|
+
* });
|
|
62
|
+
*
|
|
63
|
+
* picker.addEventListener("arcgisPropertyChange", async (event) => {
|
|
64
|
+
* if (event.detail.name !== "selectedUtilityNetwork") {
|
|
65
|
+
* return;
|
|
66
|
+
* }
|
|
67
|
+
*
|
|
68
|
+
* const network = picker.selectedUtilityNetwork;
|
|
69
|
+
* if (!network) {
|
|
70
|
+
* return;
|
|
71
|
+
* }
|
|
72
|
+
*
|
|
73
|
+
* try {
|
|
74
|
+
* const loadedNetwork = await network.load();
|
|
75
|
+
* if (picker.selectedUtilityNetwork === loadedNetwork) {
|
|
76
|
+
* console.log(loadedNetwork.dataElement);
|
|
77
|
+
* }
|
|
78
|
+
* } catch (error) {
|
|
79
|
+
* console.error(error);
|
|
80
|
+
* }
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
11
83
|
* @since 5.2
|
|
12
84
|
*/
|
|
13
85
|
export abstract class ArcgisUtilityNetworkPicker extends LitElement {
|
|
@@ -31,11 +103,47 @@ export abstract class ArcgisUtilityNetworkPicker extends LitElement {
|
|
|
31
103
|
};
|
|
32
104
|
labels: { utilityNetwork: string; };
|
|
33
105
|
}>;
|
|
106
|
+
/**
|
|
107
|
+
* The current error message, or `undefined` when cleared. Errors can occur when
|
|
108
|
+
* the view has no map, the map cannot be loaded, the map has no utility networks,
|
|
109
|
+
* or the selected network cannot be loaded. The component displays this message
|
|
110
|
+
* unless [hideErrors](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#hideErrors) is `true`.
|
|
111
|
+
*
|
|
112
|
+
* The error message is cleared when map setup starts or a selected network becomes ready.
|
|
113
|
+
* Selecting another network that loads successfully recovers from a network-load error.
|
|
114
|
+
* While a new network is loading, the previous error can remain; check
|
|
115
|
+
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#state) to distinguish loading from an active error.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* Read the error message when the component emits `arcgisError`.
|
|
119
|
+
* ```js
|
|
120
|
+
* const picker = document.querySelector("arcgis-utility-network-picker");
|
|
121
|
+
* picker.addEventListener("arcgisError", () => {
|
|
122
|
+
* console.error(picker.error);
|
|
123
|
+
* });
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
34
126
|
accessor error: string | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* The heading above the utility network title or selector.
|
|
129
|
+
* When not set or empty, the component uses the localized utility network label.
|
|
130
|
+
*/
|
|
35
131
|
accessor heading: string | undefined;
|
|
36
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Whether to hide error notices. Errors still update
|
|
134
|
+
* [error](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#error) and
|
|
135
|
+
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#state) and emit
|
|
136
|
+
* [@arcgisError](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#event-arcgisError).
|
|
137
|
+
*
|
|
138
|
+
* @default false
|
|
139
|
+
*/
|
|
37
140
|
accessor hideErrors: boolean;
|
|
38
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Whether to hide the loading indicator. This does not prevent the
|
|
143
|
+
* component from loading the map or the selected utility network.
|
|
144
|
+
*
|
|
145
|
+
* @default false
|
|
146
|
+
*/
|
|
39
147
|
accessor hideLoader: boolean;
|
|
40
148
|
/**
|
|
41
149
|
* Replace localized message strings with your own strings.
|
|
@@ -52,16 +160,72 @@ export abstract class ArcgisUtilityNetworkPicker extends LitElement {
|
|
|
52
160
|
} | undefined;
|
|
53
161
|
labels?: { utilityNetwork?: string | undefined; } | undefined;
|
|
54
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* The selected
|
|
165
|
+
* [UtilityNetwork](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/).
|
|
166
|
+
* Set this property to a network from the view's web map to select it programmatically.
|
|
167
|
+
* The component loads the selected network if needed.
|
|
168
|
+
*
|
|
169
|
+
* When the map's networks are loaded, the component selects the first network if
|
|
170
|
+
* this property is unset or refers to a network outside the map's collection.
|
|
171
|
+
* The same selection rule applies when the view or its map is replaced.
|
|
172
|
+
* The selection is cleared when the map has no utility networks.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* Select a network before adding the picker to the page. Here, `mapView`
|
|
176
|
+
* is a MapView backed by a WebMap containing utility networks.
|
|
177
|
+
* Replace `"your-network-id"` with the ID of a network in that map.
|
|
178
|
+
* ```js
|
|
179
|
+
* const map = mapView.map;
|
|
180
|
+
* await map.load();
|
|
181
|
+
* const network = map.utilityNetworks.find((network) => network.id === "your-network-id");
|
|
182
|
+
* if (!network) {
|
|
183
|
+
* throw new Error("The requested utility network is not in this web map.");
|
|
184
|
+
* }
|
|
185
|
+
*
|
|
186
|
+
* const picker = document.createElement("arcgis-utility-network-picker");
|
|
187
|
+
* picker.view = mapView;
|
|
188
|
+
* picker.selectedUtilityNetwork = network;
|
|
189
|
+
* document.body.append(picker);
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
55
192
|
accessor selectedUtilityNetwork: UtilityNetwork | undefined;
|
|
56
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* The current component state.
|
|
195
|
+
*
|
|
196
|
+
* - `error`: The component could not set up the map, find a utility network, or load the selected network.
|
|
197
|
+
* See [error](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#error) for details.
|
|
198
|
+
* - `loading`: The component is setting up the map or loading the selected utility network.
|
|
199
|
+
* - `ready`: Setup is complete and no loading error occurred.
|
|
200
|
+
*
|
|
201
|
+
* Selecting an unloaded network returns the component to `loading` until that
|
|
202
|
+
* network loads successfully (`ready`) or fails to load (`error`).
|
|
203
|
+
*
|
|
204
|
+
* @default "loading"
|
|
205
|
+
*/
|
|
57
206
|
accessor state: "error" | "loading" | "ready";
|
|
58
207
|
/**
|
|
59
208
|
* The view associated with the component.
|
|
60
209
|
* > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-utility-network-picker component will be associated with a map or scene component rather than using the `view` property.
|
|
61
210
|
*/
|
|
62
211
|
accessor view: MapView | undefined;
|
|
63
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* Fires when an error occurs while setting up the map or loading a utility network.
|
|
214
|
+
* Read [error](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#error) for the message and
|
|
215
|
+
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#state) for the current state.
|
|
216
|
+
* This event has no detail payload and fires even when
|
|
217
|
+
* [hideErrors](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-picker/#hideErrors) is `true`.
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```js
|
|
221
|
+
* const picker = document.querySelector("arcgis-utility-network-picker");
|
|
222
|
+
* picker.addEventListener("arcgisError", () => {
|
|
223
|
+
* console.error(picker.error);
|
|
224
|
+
* });
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
64
227
|
readonly arcgisError: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
228
|
+
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
|
|
65
229
|
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "selectedUtilityNetwork" | "state"; }>;
|
|
66
230
|
readonly "@eventTypes": {
|
|
67
231
|
arcgisError: ArcgisUtilityNetworkPicker["arcgisError"]["detail"];
|
|
@@ -57,7 +57,7 @@ class u extends n {
|
|
|
57
57
|
async #o() {
|
|
58
58
|
const { selectedUtilityNetwork: t } = this;
|
|
59
59
|
try {
|
|
60
|
-
t && !t.loaded && await t.load(), this.#i();
|
|
60
|
+
t && !t.loaded && (this.state = "loading", await t.load()), this.#i();
|
|
61
61
|
} catch (e) {
|
|
62
62
|
l(e, this, this._messages.errors.utilityNetworkLoadFailed), this.#t(this._messages.errors.utilityNetworkLoadFailed);
|
|
63
63
|
}
|
|
@@ -191,13 +191,14 @@ export abstract class ArcgisUtilityNetworkTraceAggregatedGeometryResultItem exte
|
|
|
191
191
|
/**
|
|
192
192
|
* Removes the aggregated geometry graphics from the
|
|
193
193
|
* [graphicsLayer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#graphicsLayer).
|
|
194
|
-
* If the layer was created by the component, it is also removed from the map.
|
|
194
|
+
* If the layer was created by the component, it is also removed from the map.
|
|
195
|
+
*
|
|
196
|
+
* The method also clears
|
|
197
|
+
* [traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#traceResult) and
|
|
195
198
|
* [geometryGraphics](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#geometryGraphics) and resets
|
|
196
199
|
* [state](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#state) to `"ready"`.
|
|
197
200
|
*
|
|
198
|
-
*
|
|
199
|
-
* [traceResult](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#traceResult) or emit
|
|
200
|
-
* [@arcgisResultReady](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#event-arcgisResultReady).
|
|
201
|
+
* Does not emit [@arcgisResultReady](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-trace-aggregated-geometry-result-item/#event-arcgisResultReady).
|
|
201
202
|
*/
|
|
202
203
|
clearResult(): void;
|
|
203
204
|
/** Permanently destroy the component. */
|