@arcgis/common-components 6.0.0-next.37 → 6.0.0-next.39
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/{IZD4AM2W.js → 24FE5GMT.js} +1 -1
- package/dist/cdn/2XTXXTEZ.js +2 -0
- package/dist/cdn/3QTMLOOM.js +2 -0
- package/dist/cdn/4X2SOHYB.js +2 -0
- package/dist/cdn/{3ZTHRAIZ.js → 4ZVHN3V7.js} +1 -1
- package/dist/cdn/{TWPYXZ2O.js → 55VDXBLV.js} +1 -1
- package/dist/cdn/{ANK7TFWV.js → 5YQK5TCH.js} +1 -1
- package/dist/cdn/{TE77L77R.js → 7S4ZZPSA.js} +1 -1
- package/dist/cdn/{HX2AL2HN.js → 7VGSZDT7.js} +1 -1
- package/dist/cdn/{5TNOGXJJ.js → ABDFJWQO.js} +1 -1
- package/dist/cdn/{BUPRL52I.js → BAMK6STW.js} +1 -1
- package/dist/cdn/CC74AHNF.js +2 -0
- package/dist/cdn/CCJ7MF3B.js +2 -0
- package/dist/cdn/{LLLQXE2U.js → EYOJNGUG.js} +1 -1
- package/dist/cdn/{J4AV4EAC.js → F5IBLVYU.js} +1 -1
- package/dist/cdn/{D4JWM5PW.js → HMGFS4YI.js} +1 -1
- package/dist/cdn/HYR5WUUX.js +2 -0
- package/dist/cdn/JAMYEW7N.js +2 -0
- package/dist/cdn/{SRO2CZ77.js → JCWKK6FB.js} +1 -1
- package/dist/cdn/{74TVQE6W.js → LIFJOO55.js} +1 -1
- package/dist/cdn/{BDIGRQ2U.js → LPKRIISW.js} +1 -1
- package/dist/cdn/{V5FMQXMU.js → LRP7XW5X.js} +1 -1
- package/dist/cdn/{M7F7EBFY.js → LZPZYGFW.js} +1 -1
- package/dist/cdn/{PIXY2HTI.js → MWQVR7SB.js} +1 -1
- package/dist/cdn/{6LZNNXUL.js → N5YNSPMD.js} +1 -1
- package/dist/cdn/{4L362IQJ.js → NEJQBOXB.js} +1 -1
- package/dist/cdn/{2K4XK5CC.js → NSTQTWS5.js} +1 -1
- package/dist/cdn/{32JRESCI.js → ONYZMGVN.js} +1 -1
- package/dist/cdn/{NZDJ3HVF.js → OQRMI3K5.js} +1 -1
- package/dist/cdn/{ZMYTELNC.js → OVW45JGX.js} +1 -1
- package/dist/cdn/{4IMLX5B4.js → Q73UFMJY.js} +1 -1
- package/dist/cdn/{PJGWH4LW.js → RBTFN5SR.js} +1 -1
- package/dist/cdn/{T57JKNGO.js → RU4PILTH.js} +1 -1
- package/dist/cdn/RU722XDV.js +2 -0
- package/dist/cdn/{ZLVMV6TP.js → S2EORL4N.js} +1 -1
- package/dist/cdn/{HWVDNUPX.js → S3GK6UB7.js} +1 -1
- package/dist/cdn/{JYWWX277.js → T7LZIFNY.js} +1 -1
- package/dist/cdn/TZBDDGN3.js +2 -0
- package/dist/cdn/VLVINHT3.js +2 -0
- package/dist/cdn/{WIOMW22N.js → WDQV5Y4K.js} +1 -1
- package/dist/cdn/{FESNPMRM.js → X44CHGA6.js} +1 -1
- package/dist/cdn/{EOGA62GK.js → Y72KV72H.js} +1 -1
- package/dist/cdn/{IOAVVVNO.js → YOPZGJMF.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/utils.js +75 -37
- package/dist/chunks/utils2.js +9 -14
- package/dist/chunks/{intrinsic-sizing.js → well-known-sizes-controller.js} +38 -14
- package/dist/components/arcgis-toolbar/customElement.js +34 -29
- package/dist/components/arcgis-toolbar/types.d.ts +20 -1
- package/dist/components/arcgis-toolbar-action/customElement.js +17 -18
- package/dist/components/arcgis-toolbar-group/customElement.js +20 -17
- package/dist/components/arcgis-toolbar-item/customElement.d.ts +2 -2
- package/dist/components/arcgis-toolbar-item/customElement.js +14 -14
- package/dist/components/arcgis-toolbar-more-button/customElement.js +28 -26
- package/dist/components/arcgis-toolbar-split-button/customElement.js +34 -34
- package/dist/components/arcgis-toolbar-stack/customElement.js +48 -43
- 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 +5 -5
- package/dist/cdn/32MHBJSZ.js +0 -2
- package/dist/cdn/4D35RDOE.js +0 -2
- package/dist/cdn/BAALW3SQ.js +0 -2
- package/dist/cdn/DPJGC3YQ.js +0 -2
- package/dist/cdn/E5VIZW6M.js +0 -2
- package/dist/cdn/FVFYAK24.js +0 -2
- package/dist/cdn/RYVWIAKZ.js +0 -2
- package/dist/cdn/UFSM3GRY.js +0 -2
- package/dist/cdn/W2W34T5K.js +0 -2
- package/dist/cdn/XQ65BGER.js +0 -2
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { useDirection as
|
|
6
|
-
import { s as
|
|
7
|
-
import { S as
|
|
8
|
-
const
|
|
9
|
-
class
|
|
2
|
+
import { c as f } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as y, html as m } from "lit";
|
|
4
|
+
import { LitElement as k, nothing as z } from "@arcgis/lumina";
|
|
5
|
+
import { useDirection as _ } from "@arcgis/lumina/controllers";
|
|
6
|
+
import { W as L, s as C, a as x, b as S, c as $, r as A } from "../../chunks/well-known-sizes-controller.js";
|
|
7
|
+
import { S as T, s as P } from "../../chunks/sharedCacheDirective.js";
|
|
8
|
+
const R = y`:host{--calcite-internal-animation-timing-slow: 0}.stack{block-size:100%}.toolbar-stack{display:flex;gap:8px}:host([toolbar-kind="docked"]) .toolbar-stack{gap:0}.line{display:flex;gap:8px}:host([layout="vertical"]) .line{block-size:100%;flex-direction:column}:host([layout="vertical"]) .line[data-alignment=bottom]{align-self:end}.line[data-alignment=left]{justify-content:left}.line[data-alignment=right]{justify-content:right}:host([layout="vertical"]) .toolbar-stack{block-size:100%}:host([layout="horizontal"]) .toolbar-stack{flex-direction:column}:host([toolbar-kind="docked"][layout="horizontal"]) .toolbar-stack{min-inline-size:100%}:host([toolbar-kind="docked"][layout="vertical"]) .toolbar-stack{min-block-size:100%}:host(:not([allocated-length])){.toolbar-stack{grid-area:1 / 1;min-inline-size:0;min-block-size:0}.toolbar-grid-wrapper{flex:1 1 auto}}`, g = 8;
|
|
9
|
+
class w extends k {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(), this.#i = new ResizeObserver((t) => this._updateMeasurement(t)), this.#o = new MutationObserver(() => this._syncToolbars()), this.#a =
|
|
11
|
+
super(), this.#i = new ResizeObserver((t) => this._updateMeasurement(t)), this.#o = new MutationObserver(() => this._syncToolbars()), this.#a = _(), this.#n = new L(this), this.#t = new T(), this._layout = "horizontal", this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.listen("arcgisInternalLayoutUpdate", () => this.requestUpdate());
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
14
|
this.properties = { _observedSize: 16, _availableLength: 16, _toolbars: 16, effectiveRelativeDirection: 16, layout: 3, scale: 3, tooltipAppearance: 1, relativePosition: 1, toolbarKind: 3, allocatedLength: 11 };
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
|
-
this.styles = [
|
|
17
|
+
this.styles = [R, C, x, S, $];
|
|
18
18
|
}
|
|
19
19
|
#i;
|
|
20
20
|
#o;
|
|
21
21
|
#s;
|
|
22
22
|
#a;
|
|
23
|
+
#n;
|
|
23
24
|
#t;
|
|
24
25
|
get _availableLength() {
|
|
25
26
|
return this.allocatedLength ?? (this.layout === "horizontal" ? this._observedSize?.width : this._observedSize?.height) ?? 0;
|
|
26
27
|
}
|
|
27
28
|
get effectiveRelativeDirection() {
|
|
28
|
-
const [t,
|
|
29
|
-
switch (
|
|
29
|
+
const [t, i] = this.relativePosition.split("-"), e = this.#a;
|
|
30
|
+
switch (i) {
|
|
30
31
|
case "left":
|
|
31
32
|
case "right":
|
|
32
|
-
return `${t}-${
|
|
33
|
+
return `${t}-${i}`;
|
|
33
34
|
case "end":
|
|
34
|
-
return `${t}-${
|
|
35
|
+
return `${t}-${e === "ltr" ? "right" : "left"}`;
|
|
35
36
|
case "start":
|
|
36
|
-
return `${t}-${
|
|
37
|
+
return `${t}-${e === "ltr" ? "left" : "right"}`;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
get layout() {
|
|
@@ -53,29 +54,29 @@ class P extends y {
|
|
|
53
54
|
}
|
|
54
55
|
_syncToolbars() {
|
|
55
56
|
this.#s?.abort();
|
|
56
|
-
const t = Array.from(this.el.children).filter(
|
|
57
|
-
this.#s =
|
|
58
|
-
!this.isConnected ||
|
|
57
|
+
const t = Array.from(this.el.children).filter(K), i = new AbortController();
|
|
58
|
+
this.#s = i, Promise.all(t.map((e) => e.componentOnReady())).then(() => {
|
|
59
|
+
!this.isConnected || i.signal.aborted || (this._toolbars = t);
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
|
-
_arrangeToolbarLines(t,
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
return { toolbar: n, budget:
|
|
65
|
-
}),
|
|
66
|
-
let
|
|
67
|
-
for (const n of
|
|
68
|
-
const
|
|
69
|
-
|
|
62
|
+
_arrangeToolbarLines(t, i) {
|
|
63
|
+
const e = t.map((n) => {
|
|
64
|
+
const u = n.allocate(i, this._availableLength);
|
|
65
|
+
return { toolbar: n, budget: u.reduce((p, v) => p + v.budget, 0) };
|
|
66
|
+
}), o = [];
|
|
67
|
+
let s = [], a = 0;
|
|
68
|
+
for (const n of e) {
|
|
69
|
+
const u = a + (s.length === 0 ? 0 : g) + n.budget;
|
|
70
|
+
s.length > 0 && (this.toolbarKind === "docked" || u > this._availableLength) ? (o.push(s), s = [n], a = n.budget) : (s.push(n), a = u);
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
-
const [
|
|
73
|
-
return (
|
|
72
|
+
s.length > 0 && o.push(s);
|
|
73
|
+
const [l, d] = i.relativePosition.split("-"), c = i.layout === "vertical";
|
|
74
|
+
return (c ? d === "right" : l === "bottom") && o.reverse(), (c ? l === "bottom" : d === "right") && o.forEach((n) => n.reverse()), o;
|
|
74
75
|
}
|
|
75
76
|
#e;
|
|
76
|
-
_renderIntrinsicSizeContribution(t,
|
|
77
|
-
const
|
|
78
|
-
return
|
|
77
|
+
_renderIntrinsicSizeContribution(t, i) {
|
|
78
|
+
const e = t.map((a) => a.measureIntrinsicSize(i)), o = this.toolbarKind === "docked" ? Math.max(...e.map(({ maximum: a }) => a)) : e.reduce((a, { maximum: l }) => a + l, 0) + g * (t.length - 1), s = Math.max(...e.map(({ minimum: a }) => a));
|
|
79
|
+
return A(s, o, this.layout);
|
|
79
80
|
}
|
|
80
81
|
render() {
|
|
81
82
|
const t = this._toolbars;
|
|
@@ -83,25 +84,29 @@ class P extends y {
|
|
|
83
84
|
this.#e?.length && (this.#t.moveAllToCache(), this.#e = []);
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
87
|
+
const i = this.#n.exports;
|
|
88
|
+
if (!i)
|
|
89
|
+
return;
|
|
86
90
|
const e = {
|
|
91
|
+
sizes: i,
|
|
87
92
|
layout: this.layout,
|
|
88
93
|
relativePosition: this.effectiveRelativeDirection,
|
|
89
94
|
scale: this.scale,
|
|
90
95
|
tooltipAppearance: this.tooltipAppearance,
|
|
91
96
|
toolbarKind: this.toolbarKind
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
const [
|
|
95
|
-
return
|
|
97
|
+
}, o = this._arrangeToolbarLines(t, e);
|
|
98
|
+
I(this.#e, o) || (this.#t.moveAllToCache(), this.#e = o.map((c) => c.map(({ toolbar: h }) => h)));
|
|
99
|
+
const [s, a] = e.relativePosition.split("-"), l = this.layout === "vertical" ? s : a, d = this.#t;
|
|
100
|
+
return m`<div class="stack intrinsic-sizing-container">${this.allocatedLength === void 0 && this._renderIntrinsicSizeContribution(t, e) || ""}<div class="toolbar-stack">${o.map((c) => m`<div class="line" data-alignment=${l ?? z}>${c.map(({ toolbar: h, budget: b }) => P(d, h, h.proxiedRender(e, b, this.toolbarKind, this._availableLength)))}</div>`)}</div></div>`;
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
|
-
function
|
|
99
|
-
return
|
|
103
|
+
function K(r) {
|
|
104
|
+
return r.localName === "arcgis-toolbar";
|
|
100
105
|
}
|
|
101
|
-
function
|
|
102
|
-
return
|
|
106
|
+
function I(r, t) {
|
|
107
|
+
return r?.length === t.length && t.every((i, e) => i.length === r[e].length && i.every(({ toolbar: o }, s) => o === r[e][s]));
|
|
103
108
|
}
|
|
104
|
-
|
|
109
|
+
f("arcgis-toolbar-stack", w);
|
|
105
110
|
export {
|
|
106
|
-
|
|
111
|
+
w as ArcgisToolbarStack
|
|
107
112
|
};
|