@arcgis/map-components 6.0.0-next.26 → 6.0.0-next.27
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/27VBOPFN.js +2 -0
- package/dist/cdn/{6K4IASNK.js → 2JXK3AW7.js} +1 -1
- package/dist/cdn/{EZHYSI6R.js → 4HCQOJIM.js} +1 -1
- package/dist/cdn/{FZGMIIBX.js → CPWIRCCP.js} +1 -1
- package/dist/cdn/IJ7EV66N.js +2 -0
- package/dist/cdn/JNNI75UW.js +2 -0
- package/dist/cdn/KJISACOI.js +2 -0
- package/dist/cdn/{TTERKXN5.js → LP4ETJF7.js} +1 -1
- package/dist/cdn/{55VX76T5.js → PD4ELTMF.js} +1 -1
- package/dist/cdn/R5PT7JNG.js +2 -0
- package/dist/cdn/RSKBANQ5.js +2 -0
- package/dist/cdn/{PRUHLC54.js → TDQYO6FQ.js} +1 -1
- package/dist/cdn/{6DRXFSTW.js → UI5E3MX7.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/print-exports-panel-item-popover.js +1 -1
- package/dist/components/arcgis-directional-pad/customElement.js +53 -58
- package/dist/components/arcgis-expand/customElement.d.ts +47 -1
- package/dist/components/arcgis-expand/customElement.js +47 -47
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +8 -0
- package/dist/components/arcgis-selection-toolbar/customElement.js +23 -17
- 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/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/package.json +7 -7
- package/dist/cdn/CVLOQWUD.js +0 -2
- package/dist/cdn/HADZXZIE.js +0 -2
- package/dist/cdn/HTCPPGCR.js +0 -2
- package/dist/cdn/LHYI2QBZ.js +0 -2
- package/dist/cdn/PPGKQRNY.js +0 -2
- package/dist/cdn/PW3QCZXY.js +0 -2
- /package/dist/cdn/{ROHGHCK6.js → WFTJ4E4F.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/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);
|
|
@@ -50,6 +50,16 @@ export abstract class ArcgisExpand extends LitElement {
|
|
|
50
50
|
*
|
|
51
51
|
*/
|
|
52
52
|
accessor autoDestroyDisabled: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The associated view container's width, in pixels, at or below which the component displays as a
|
|
55
|
+
* [Calcite Sheet](https://developers.arcgis.com/calcite-design-system/components/sheet/) in automatic mode.
|
|
56
|
+
* Above this width, it displays as a [Calcite Popover](https://developers.arcgis.com/calcite-design-system/components/popover/).
|
|
57
|
+
* This property has no effect when [mode](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-expand/#mode) is `drawer` or `floating`.
|
|
58
|
+
* Custom `view.breakpoints` values do not control the component's responsive behavior.
|
|
59
|
+
*
|
|
60
|
+
* @since 6.0
|
|
61
|
+
*/
|
|
62
|
+
accessor autoModeBreakpoint: number | undefined;
|
|
53
63
|
/**
|
|
54
64
|
* When `true`, the Expand component will not close itself if the Escape key is pressed while its content has keyboard focus.
|
|
55
65
|
* This property can also be set to a function that returns a boolean, allowing for more customization for when to allow the
|
|
@@ -119,6 +129,40 @@ export abstract class ArcgisExpand extends LitElement {
|
|
|
119
129
|
* @default false
|
|
120
130
|
*/
|
|
121
131
|
accessor focusTrapDisabled: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* When true, prevents the expanded panel from moving keyboard focus into its content when it opens,
|
|
134
|
+
* in both floating and drawer modes.
|
|
135
|
+
*
|
|
136
|
+
* Configure this property before the first opening. For example, when slotted content starts an analysis
|
|
137
|
+
* as Expand opens, this prevents the panel from moving focus away from the view. This does not focus the
|
|
138
|
+
* view itself, disable focus trapping, or change Escape handling when focus is inside Expand.
|
|
139
|
+
*
|
|
140
|
+
* Applications remain responsible for managing slotted content when Expand collapses.
|
|
141
|
+
* Configure [modalDisabled](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-expand/#modalDisabled) independently to allow interaction outside a drawer.
|
|
142
|
+
*
|
|
143
|
+
* @default false
|
|
144
|
+
* @since 6.0
|
|
145
|
+
* @example
|
|
146
|
+
* ```html
|
|
147
|
+
* <arcgis-expand focus-trap-initial-focus-disabled>
|
|
148
|
+
* <arcgis-line-of-sight></arcgis-line-of-sight>
|
|
149
|
+
* </arcgis-expand>
|
|
150
|
+
* ```
|
|
151
|
+
* @example
|
|
152
|
+
* ```js
|
|
153
|
+
* expandElement.focusTrapInitialFocusDisabled = true;
|
|
154
|
+
* expandElement.addEventListener("arcgisPropertyChange", (event) => {
|
|
155
|
+
* if (
|
|
156
|
+
* event.target === expandElement &&
|
|
157
|
+
* event.detail.name === "expanded" &&
|
|
158
|
+
* expandElement.expanded
|
|
159
|
+
* ) {
|
|
160
|
+
* void analysisElement.start();
|
|
161
|
+
* }
|
|
162
|
+
* });
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
accessor focusTrapInitialFocusDisabled: boolean;
|
|
122
166
|
/**
|
|
123
167
|
* This value associates two or more Expand components with each other, allowing one
|
|
124
168
|
* component to auto collapse when another in the same group is expanded. For auto collapsing
|
|
@@ -182,7 +226,9 @@ export abstract class ArcgisExpand extends LitElement {
|
|
|
182
226
|
/**
|
|
183
227
|
* The mode in which the component displays. These modes are listed below:
|
|
184
228
|
*
|
|
185
|
-
* - `auto`: This is the default mode. It
|
|
229
|
+
* - `auto`: This is the default mode. It responds to the associated view container's width, not the browser width.
|
|
230
|
+
* It displays as a Calcite Sheet at widths less than or equal to [autoModeBreakpoint](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-expand/#autoModeBreakpoint)
|
|
231
|
+
* (544 pixels by default), and as a Calcite Popover above that width. Custom `view.breakpoints` values no longer control this behavior.
|
|
186
232
|
* - `floating`: Use this mode if you wish to always display the component as floating in a [Calcite Popover component](https://developers.arcgis.com/calcite-design-system/components/popover/) regardless of browser size.
|
|
187
233
|
* - `drawer`: Use this mode if you wish to always display the component in a [Calcite Sheet component](https://developers.arcgis.com/calcite-design-system/components/sheet/) regardless of browser size.
|
|
188
234
|
*
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { on as
|
|
5
|
-
import { g as
|
|
6
|
-
import { u as
|
|
7
|
-
import { createRef as
|
|
8
|
-
import
|
|
9
|
-
import { property as d, subclass as
|
|
10
|
-
import { usePropertyChange as
|
|
11
|
-
import { m as
|
|
12
|
-
import { LitElement as
|
|
13
|
-
import { classes as
|
|
14
|
-
var
|
|
15
|
-
for (var
|
|
16
|
-
(
|
|
17
|
-
return a &&
|
|
2
|
+
import { c as _ } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as $, html as l } from "lit";
|
|
4
|
+
import { on as D, when as h, watch as y } from "@arcgis/core/core/reactiveUtils.js";
|
|
5
|
+
import { g as k } from "../../chunks/globalCss.js";
|
|
6
|
+
import { u as C } from "../../chunks/useT9n.js";
|
|
7
|
+
import { createRef as u, ref as m } from "lit/directives/ref.js";
|
|
8
|
+
import E from "@arcgis/core/core/Accessor.js";
|
|
9
|
+
import { property as d, subclass as T } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
10
|
+
import { usePropertyChange as I } from "@arcgis/lumina/controllers";
|
|
11
|
+
import { m as M } from "../../chunks/useViewModel.js";
|
|
12
|
+
import { LitElement as H, createEvent as O, safeClassMap as v, nothing as P } from "@arcgis/lumina";
|
|
13
|
+
import { classes as f } from "@arcgis/toolkit/dom";
|
|
14
|
+
var S = Object.defineProperty, L = Object.getOwnPropertyDescriptor, c = (i, e, t, a) => {
|
|
15
|
+
for (var s = a > 1 ? void 0 : a ? L(e, t) : e, o = i.length - 1, n; o >= 0; o--)
|
|
16
|
+
(n = i[o]) && (s = (a ? n(e, t, s) : n(s)) || s);
|
|
17
|
+
return a && s && S(e, t, s), s;
|
|
18
18
|
};
|
|
19
|
-
const
|
|
20
|
-
function
|
|
19
|
+
const x = new EventTarget();
|
|
20
|
+
function B(i, e, t) {
|
|
21
21
|
let a = !1;
|
|
22
|
-
const
|
|
22
|
+
const s = y(
|
|
23
23
|
i,
|
|
24
|
-
(
|
|
25
|
-
a || e(
|
|
24
|
+
(o, n) => {
|
|
25
|
+
a || e(o, n);
|
|
26
26
|
},
|
|
27
27
|
t
|
|
28
28
|
);
|
|
29
29
|
return {
|
|
30
30
|
remove() {
|
|
31
|
-
|
|
31
|
+
s.remove();
|
|
32
32
|
},
|
|
33
33
|
pause() {
|
|
34
34
|
a = !0;
|
|
@@ -38,12 +38,12 @@ function S(i, e, t) {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
let r = class extends
|
|
41
|
+
let r = class extends E {
|
|
42
42
|
//#region Lifecycle
|
|
43
43
|
constructor(i) {
|
|
44
44
|
super(i), this._viewpointHandle = null, this.addHandles(
|
|
45
|
-
|
|
46
|
-
() =>
|
|
45
|
+
D(
|
|
46
|
+
() => x,
|
|
47
47
|
"expand",
|
|
48
48
|
(e) => {
|
|
49
49
|
const { target: t } = e.detail;
|
|
@@ -59,13 +59,13 @@ let r = class extends C {
|
|
|
59
59
|
this._set("autoCollapse", i), this._watchViewpoint();
|
|
60
60
|
}
|
|
61
61
|
set expanded(i) {
|
|
62
|
-
this._set("expanded", i), this.group && i &&
|
|
62
|
+
this._set("expanded", i), this.group && i && x.dispatchEvent(new CustomEvent("expand", { detail: { target: this } })), this._viewpointHandleChange(i);
|
|
63
63
|
}
|
|
64
64
|
get state() {
|
|
65
65
|
return this.view?.ready ? "ready" : "disabled";
|
|
66
66
|
}
|
|
67
67
|
set view(i) {
|
|
68
|
-
this._get("view") !== i && (this._set("view", i), i &&
|
|
68
|
+
this._get("view") !== i && (this._set("view", i), i && h(
|
|
69
69
|
() => i.ready,
|
|
70
70
|
() => {
|
|
71
71
|
this.view === i && this._watchViewpoint();
|
|
@@ -76,7 +76,7 @@ let r = class extends C {
|
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region Private Methods
|
|
78
78
|
_viewpointHandleChange(i) {
|
|
79
|
-
this._viewpointHandle && (i ?
|
|
79
|
+
this._viewpointHandle && (i ? h(
|
|
80
80
|
() => this.view?.stationary,
|
|
81
81
|
() => this._viewpointHandle?.resume(),
|
|
82
82
|
{ once: !0, initial: !0 }
|
|
@@ -88,7 +88,7 @@ let r = class extends C {
|
|
|
88
88
|
const { autoCollapse: e, view: t } = this;
|
|
89
89
|
if (!t || !e)
|
|
90
90
|
return;
|
|
91
|
-
const a =
|
|
91
|
+
const a = B(
|
|
92
92
|
() => t.type === "3d" ? t.camera : t.viewpoint,
|
|
93
93
|
() => this._collapse()
|
|
94
94
|
);
|
|
@@ -115,29 +115,29 @@ c([
|
|
|
115
115
|
d({ value: null })
|
|
116
116
|
], r.prototype, "view", 1);
|
|
117
117
|
r = c([
|
|
118
|
-
|
|
118
|
+
T("map-components.expand.ExpandViewModel")
|
|
119
119
|
], r);
|
|
120
|
-
const
|
|
121
|
-
class
|
|
120
|
+
const V = $`:host{display:flex;pointer-events:auto;--arcgis-internal-expand-icon-number-spacing-left: none;--arcgis-internal-expand-icon-number-spacing-right: none;--arcgis-internal-expand-action-background-color: var( --calcite-action-background-color, var(--calcite-color-foreground-1) );--arcgis-internal-expand-action-background-color-hover: var( --calcite-action-background-color-hover, var(--calcite-color-foreground-2) );--arcgis-internal-expand-action-background-color-press: var( --calcite-action-background-color-press, var(--calcite-color-foreground-3) )}arcgis-expand>.content-expanded{background-color:var(--calcite-color-background)}.root{--esri-widget-panel-max-height: 95svh;--calcite-sheet-max-height: var(--esri-widget-panel-max-height);--calcite-sheet-height: auto;--calcite-action-corner-radius: 0}.action{--calcite-action-background-color: var(--arcgis-internal-expand-action-background-color);--calcite-action-background-color-hover: var(--arcgis-internal-expand-action-background-color-hover);--calcite-action-background-color-press: var(--arcgis-internal-expand-action-background-color-press);cursor:pointer;text-align:center;color:var(--calcite-color-text-2);justify-content:center;align-items:center;margin:0;padding:0;font-size:var(--calcite-font-size);transition:background-color .125s ease-in-out;display:flex;flex-direction:column;overflow:hidden}.toggle{position:relative}.popover-content{flex-direction:column;display:flex;max-height:var(--arcgis-internal-expand-max-height, 95svh);::slotted(*){max-height:var(--arcgis-internal-expand-max-height, 95svh);overflow-y:auto}::slotted(arcgis-sketch){--arcgis-internal-sketch-gap: var(--calcite-spacing-none)}::slotted(:is(arcgis-area-measurement-2d,arcgis-area-measurement-3d,arcgis-basemap-gallery,arcgis-basemap-layer-list,arcgis-basemap-layer-list-next,arcgis-bookmarks,arcgis-building-explorer,arcgis-catalog-layer-list,arcgis-catalog-layer-list-next,arcgis-directions,arcgis-direct-line-measurement-3d,arcgis-distance-measurement-2d,arcgis-editor,arcgis-feature-form,arcgis-features,arcgis-layer-list,arcgis-layer-list-next,arcgis-legend,arcgis-line-of-sight,arcgis-print,arcgis-shadow-cast,arcgis-slice,arcgis-table-list,arcgis-table-list-next,arcgis-utility-network-trace,arcgis-grid-controls)){width:var(--arcgis-internal-panel-width);min-width:var(--calcite-spacing-xxxl);min-height:var(--calcite-spacing-xxxl);transition:max-height .25s ease-in-out}::slotted(arcgis-exploratory-analysis){width:var(--arcgis-internal-exploratory-analysis-width, fit-content);min-height:var(--calcite-spacing-xxxl);transition:max-height .25s ease-in-out}}.popover-content .esri-widget--panel{width:300px}.panel{max-height:var(--esri-widget-panel-max-height)}.panel-content{::slotted(*){width:100%}::slotted(:is(arcgis-area-measurement-2d,arcgis-area-measurement-3d,arcgis-basemap-gallery,arcgis-basemap-layer-list,arcgis-basemap-layer-list-next,arcgis-bookmarks,arcgis-building-explorer,arcgis-catalog-layer-list,arcgis-catalog-layer-list-next,arcgis-directions,arcgis-direct-line-measurement-3d,arcgis-distance-measurement-2d,arcgis-editor,arcgis-feature-form,arcgis-features,arcgis-layer-list,arcgis-layer-list-next,arcgis-legend,arcgis-line-of-sight,arcgis-print,arcgis-shadow-cast,arcgis-slice,arcgis-table-list,arcgis-table-list-next,arcgis-utility-network-trace,arcgis-grid-controls)){overflow-y:auto}}.panel-content .esri-widget{width:auto}.panel-content .esri-widget--panel{flex:auto}.arcgis-map-container-ui__element .popover-content .esri-widget,.arcgis-map-container-ui__element .popover-content .esri-widget.esri-component,.arcgis-map-container-ui__element .panel-content .esri-widget,.arcgis-map-container-ui__element .panel-content .esri-widget.esri-component,.popover-content .esri-widget,.popover-content .esri-widget.esri-component,.panel-content .esri-widget,.panel-content .esri-widget.esri-component{box-sizing:border-box;box-shadow:none;margin-bottom:0}.panel-content,.content-container{background-color:var(--calcite-color-foreground-1);flex-direction:column;flex:auto;justify-content:stretch;display:flex}.sheet .panel-content,.sheet .content-container{overflow:hidden}.panel-icon-number{align-self:center}.icon{display:flex}calcite-button:not(:hover) .icon:not(calcite-icon){color:var(--calcite-color-text-3)}.icon-flip{transform:var(--arcgis-internal-collapse-icon-flip)}.icon-number{transform-origin:50%;color:var(--calcite-color-text-inverse);pointer-events:none;background-color:var(--calcite-color-text-3);border-radius:var(--calcite-spacing-xl);justify-content:center;align-items:center;height:var(--calcite-spacing-lg);padding:.125em .333em;font-size:var(--calcite-font-size-sm);line-height:1em;display:flex;position:absolute;top:-6px;left:var(--arcgis-internal-expand-icon-number-spacing-left);right:var(--arcgis-internal-expand-icon-number-spacing-right)}`, w = "chevrons-left", b = "chevrons-right", z = M(r);
|
|
121
|
+
class A extends H {
|
|
122
122
|
constructor() {
|
|
123
|
-
super(...arguments), this.popoverEl =
|
|
123
|
+
super(...arguments), this.popoverEl = u(), this.messages = C({}), this.viewModel = z(this), this.toggleActionEl = u(), this.view = this.viewModel.view, this.state = this.viewModel.state, this.autoDestroyDisabled = !1, this.autoCollapse = this.viewModel.autoCollapse, this.closeOnEscDisabled = !1, this.content = "", this.expanded = this.viewModel.expanded, this.expandTooltip = "", this.collapseTooltip = "", this.focusTrapDisabled = !1, this.focusTrapInitialFocusDisabled = !1, this.group = this.viewModel.group, this.iconNumber = 0, this.mode = "auto", this.topLayerDisabled = !1, this.modalDisabled = !1, this.visualScale = "m", this.arcgisPropertyChange = I()("expanded"), this.arcgisReady = O();
|
|
124
124
|
}
|
|
125
125
|
static {
|
|
126
|
-
this.properties = { _slottedIcon: 16, expandTitle: 16, _displaySheet: 16, view: 0, state: 32, icon: 1, label: 1, autoDestroyDisabled: 5, referenceElement: 1, autoCollapse: 5, closeOnEscDisabled: 5, content: 1, expanded: 7, expandIcon: 3, expandTooltip: 1, collapseIcon: 3, collapseTooltip: 1, focusTrapDisabled: 5, group: 1, iconNumber: 9, mode: 1, placement: 1, messageOverrides: 0, topLayerDisabled: 5, modalDisabled: 5, visualScale: 1 };
|
|
126
|
+
this.properties = { _slottedIcon: 16, expandTitle: 16, _displaySheet: 16, view: 0, state: 32, icon: 1, label: 1, autoDestroyDisabled: 5, referenceElement: 1, autoCollapse: 5, autoModeBreakpoint: 9, closeOnEscDisabled: 5, content: 1, expanded: 7, expandIcon: 3, expandTooltip: 1, collapseIcon: 3, collapseTooltip: 1, focusTrapDisabled: 5, focusTrapInitialFocusDisabled: 5, group: 1, iconNumber: 9, mode: 1, placement: 1, messageOverrides: 0, topLayerDisabled: 5, modalDisabled: 5, visualScale: 1 };
|
|
127
127
|
}
|
|
128
128
|
static {
|
|
129
|
-
this.styles =
|
|
129
|
+
this.styles = V;
|
|
130
130
|
}
|
|
131
131
|
get expandTitle() {
|
|
132
|
-
const { expanded: e, messages: t, collapseTooltip: a, expandTooltip:
|
|
133
|
-
return (e ? a || t.collapse :
|
|
132
|
+
const { expanded: e, messages: t, collapseTooltip: a, expandTooltip: s } = this;
|
|
133
|
+
return (e ? a || t.collapse : s || t.expand) ?? "";
|
|
134
134
|
}
|
|
135
135
|
get _displaySheet() {
|
|
136
136
|
switch (this.mode) {
|
|
137
137
|
case "drawer":
|
|
138
138
|
return !0;
|
|
139
139
|
case "auto":
|
|
140
|
-
return this.viewModel.view
|
|
140
|
+
return !!this.viewModel.view && this.viewModel.view.width <= (this.autoModeBreakpoint ?? 544);
|
|
141
141
|
default:
|
|
142
142
|
return !1;
|
|
143
143
|
}
|
|
@@ -148,13 +148,13 @@ class z extends I {
|
|
|
148
148
|
if (this._slottedIcon)
|
|
149
149
|
return this._slottedIcon;
|
|
150
150
|
let e = null;
|
|
151
|
-
return this.content instanceof HTMLElement && ("widget" in this.content && this.content.widget?.icon ? e = this.content.widget.icon : "icon" in this.content ? e = this.content.icon : e = this.content.getAttribute("icon")), e ??
|
|
151
|
+
return this.content instanceof HTMLElement && ("widget" in this.content && this.content.widget?.icon ? e = this.content.widget.icon : "icon" in this.content ? e = this.content.icon : e = this.content.getAttribute("icon")), e ?? w;
|
|
152
152
|
}
|
|
153
153
|
set expandIcon(e) {
|
|
154
154
|
this._expandIcon = e;
|
|
155
155
|
}
|
|
156
156
|
get collapseIcon() {
|
|
157
|
-
return this._collapseIcon ??
|
|
157
|
+
return this._collapseIcon ?? b;
|
|
158
158
|
}
|
|
159
159
|
set collapseIcon(e) {
|
|
160
160
|
this._collapseIcon = e;
|
|
@@ -170,7 +170,7 @@ class z extends I {
|
|
|
170
170
|
}
|
|
171
171
|
loaded() {
|
|
172
172
|
this.manager.onLifecycle(() => [
|
|
173
|
-
|
|
173
|
+
y(() => this.viewModel?.view?.size, () => {
|
|
174
174
|
this.popoverEl?.value?.reposition();
|
|
175
175
|
}, { initial: !0 })
|
|
176
176
|
]);
|
|
@@ -213,16 +213,16 @@ class z extends I {
|
|
|
213
213
|
this._slottedIcon = t?.icon;
|
|
214
214
|
}
|
|
215
215
|
render() {
|
|
216
|
-
const { _displaySheet: e, toggleActionEl: t, expanded: a, label:
|
|
217
|
-
return l`<div class=${
|
|
216
|
+
const { _displaySheet: e, toggleActionEl: t, expanded: a, focusTrapInitialFocusDisabled: s, label: o, modalDisabled: n, topLayerDisabled: p } = this, g = s ? { initialFocus: !1 } : void 0;
|
|
217
|
+
return l`<div class=${v(f("root", k.widget))}>${this._renderToggle()}${e ? l`<calcite-sheet class="sheet" .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${g} height=l .label=${o ?? ""} .modalDisabled=${n} .topLayerDisabled=${p} @keydown=${this._handleKeyDown} .open=${a} position=block-end @calciteSheetClose=${this.collapse}><calcite-panel class="panel" closable .closed=${!a} .heading=${o} @keydown=${this._handleKeyDown} @calcitePanelClose=${this.collapse}><div class="panel-content">${this._renderContent()}</div></calcite-panel></calcite-sheet>` : t.value ? l`<calcite-popover .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${g} .label=${o ?? ""} @keydown=${this._handleKeyDown} trigger-disabled .open=${a} overlay-positioning=fixed .placement=${this.getPopoverPlacement()} .referenceElement=${t.value} .topLayerDisabled=${p} @calcitePopoverClose=${this._handlePopoverClose} ${m(this.popoverEl)}><div class="popover-content">${this._renderContent()}</div></calcite-popover>` : null}</div>`;
|
|
218
218
|
}
|
|
219
219
|
_renderBadgeNumber() {
|
|
220
220
|
const { expanded: e, iconNumber: t } = this;
|
|
221
221
|
return t && !e ? l`<span class="icon-number">${t}</span>` : null;
|
|
222
222
|
}
|
|
223
223
|
_renderToggleButton() {
|
|
224
|
-
const { expanded: e, expandTitle: t, expandIcon: a, collapseIcon:
|
|
225
|
-
return l`<calcite-action class=${
|
|
224
|
+
const { expanded: e, expandTitle: t, expandIcon: a, collapseIcon: s } = this, o = e ? s : a;
|
|
225
|
+
return l`<calcite-action class=${v(f("action", "icon", { "icon-flip": o === w || o === b }))} @click=${this.toggle} .text=${t} title=${t ?? P} .icon=${o} .scale=${this.visualScale} ${m(this.toggleActionEl)}></calcite-action>`;
|
|
226
226
|
}
|
|
227
227
|
_renderToggle() {
|
|
228
228
|
return l`<div class="toggle">${this._renderToggleButton()}${this._renderBadgeNumber()}</div>`;
|
|
@@ -231,7 +231,7 @@ class z extends I {
|
|
|
231
231
|
return l`<div class="content-container"><slot @slotchange=${this._handleSlotChange}></slot></div>`;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
|
|
234
|
+
_("arcgis-expand", A);
|
|
235
235
|
export {
|
|
236
|
-
|
|
236
|
+
A as ArcgisExpand
|
|
237
237
|
};
|
|
@@ -189,6 +189,14 @@ export abstract class ArcgisSelectionToolbar extends LitElement {
|
|
|
189
189
|
* @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)
|
|
190
190
|
*/
|
|
191
191
|
accessor icon: IconName | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Indicates whether the selection toolbar will ignore layer visibility when determining selection results.
|
|
194
|
+
* Non-visible layers and layer views are typically excluded from selection results.
|
|
195
|
+
*
|
|
196
|
+
* @default false
|
|
197
|
+
* @since 5.2
|
|
198
|
+
*/
|
|
199
|
+
accessor ignoreLayerVisibility: boolean;
|
|
192
200
|
/** The component's default label. */
|
|
193
201
|
accessor label: string | undefined;
|
|
194
202
|
/**
|