@mt-gloss/ui 0.1.118 → 0.1.120
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/{COMMITS-BxJQwv4H.js → COMMITS-8eHelQHO.js} +283 -177
- package/composites-panels.js +596 -669
- package/index.d.ts +1 -1
- package/index.js +47 -46
- package/lib/composites/dashboard/BellPopover/BellPopover.d.ts +12 -0
- package/lib/composites/panels/PanelSlot.d.ts +3 -3
- package/lib/composites/panels/index.d.ts +1 -0
- package/lib/composites/panels/shells/CatalogAddShell.d.ts +5 -5
- package/lib/composites/panels/shells/CatalogReplaceShell.d.ts +5 -2
- package/lib/composites/panels/shells/NotificationCenterShell.d.ts +2 -0
- package/lib/composites/panels/shells/PageMgmtShell.d.ts +7 -2
- package/package.json +1 -1
- package/ui.css +1 -1
package/composites-panels.js
CHANGED
|
@@ -1,102 +1,36 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { C as Kt, c as Yt,
|
|
3
|
-
import { jsx as n, jsxs as
|
|
4
|
-
import
|
|
5
|
-
import { useSensors as
|
|
6
|
-
import { sortableKeyboardCoordinates as
|
|
7
|
-
import { CSS as
|
|
8
|
-
import { M as
|
|
9
|
-
function
|
|
10
|
-
const e =
|
|
1
|
+
import { u as O, h as fe, j as V, g as we, S as Ee, b as Pe, k as xe } from "./COMMITS-8eHelQHO.js";
|
|
2
|
+
import { C as Ut, N as zt, o as Ht, d as Vt, p as Bt, l as Kt, c as Yt, n as Wt, P as Gt, m as Qt, f as qt, i as jt, r as Zt, e as Xt } from "./COMMITS-8eHelQHO.js";
|
|
3
|
+
import { jsx as n, jsxs as f, Fragment as B } from "react/jsx-runtime";
|
|
4
|
+
import U, { useState as x, useRef as K, createContext as ge, useContext as be, useMemo as ie, useEffect as R, useCallback as L, useLayoutEffect as Ae } from "react";
|
|
5
|
+
import { useSensors as ke, useSensor as ce, PointerSensor as De, KeyboardSensor as Le, DndContext as Oe, closestCenter as Me } from "@dnd-kit/core";
|
|
6
|
+
import { sortableKeyboardCoordinates as Ie, SortableContext as $e, horizontalListSortingStrategy as Re, arrayMove as Fe, useSortable as Ue } from "@dnd-kit/sortable";
|
|
7
|
+
import { CSS as ze } from "@dnd-kit/utilities";
|
|
8
|
+
import { M as de } from "./MetricCard-Cyoxhb_S.js";
|
|
9
|
+
function wt() {
|
|
10
|
+
const e = O();
|
|
11
11
|
if (e?.state.activePanelId !== "settings") return null;
|
|
12
12
|
const t = e.state.activeTrigger;
|
|
13
13
|
return t?.kind === "card-overflow" ? t.cardId : null;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */ n("div", { className:
|
|
15
|
+
function He({ span: e, rotating: t = !0, children: r }) {
|
|
16
|
+
const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), a = r != null ? "full" : "fallback";
|
|
17
|
+
return /* @__PURE__ */ n("div", { className: l, "data-clone-fidelity": a, children: r });
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
e != null && /* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__title", children: e }),
|
|
22
|
-
/* @__PURE__ */ n(
|
|
23
|
-
"button",
|
|
24
|
-
{
|
|
25
|
-
id: "panel-close",
|
|
26
|
-
type: "button",
|
|
27
|
-
"aria-label": "Close panel",
|
|
28
|
-
className: "gloss-panel-chrome-v2__close",
|
|
29
|
-
onClick: t,
|
|
30
|
-
children: "×"
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
] });
|
|
34
|
-
}
|
|
35
|
-
function He({ children: e }) {
|
|
36
|
-
return /* @__PURE__ */ n(
|
|
37
|
-
"div",
|
|
38
|
-
{
|
|
39
|
-
"data-panel-stage": !0,
|
|
40
|
-
"aria-hidden": "true",
|
|
41
|
-
className: "gloss-panel-chrome-v2__stage",
|
|
42
|
-
children: e
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
function Ve({ children: e }) {
|
|
47
|
-
return /* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__navigation", children: e });
|
|
48
|
-
}
|
|
49
|
-
function Be({ children: e }) {
|
|
50
|
-
return /* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__body", children: e });
|
|
51
|
-
}
|
|
52
|
-
function Ke({ left: e, right: t }) {
|
|
53
|
-
return /* @__PURE__ */ p("div", { className: "gloss-panel-chrome-v2__footer", children: [
|
|
54
|
-
/* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__footer-left", children: e }),
|
|
55
|
-
/* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__footer-right", children: t })
|
|
56
|
-
] });
|
|
57
|
-
}
|
|
58
|
-
function Ye({
|
|
59
|
-
children: e,
|
|
60
|
-
onClose: t,
|
|
61
|
-
title: l,
|
|
62
|
-
variant: o = "no-stage",
|
|
63
|
-
stage: a,
|
|
64
|
-
navigation: i,
|
|
65
|
-
footer: u
|
|
66
|
-
}) {
|
|
67
|
-
return /* @__PURE__ */ p(
|
|
68
|
-
"div",
|
|
69
|
-
{
|
|
70
|
-
"data-chrome": "panel-v2",
|
|
71
|
-
"data-chrome-variant": o,
|
|
72
|
-
role: "dialog",
|
|
73
|
-
"aria-modal": "true",
|
|
74
|
-
className: `gloss-panel-chrome-v2 gloss-panel-chrome-v2--${o}`,
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ n(ze, { title: l, onClose: t }),
|
|
77
|
-
o === "with-stage" && /* @__PURE__ */ n(He, { children: a }),
|
|
78
|
-
i != null && /* @__PURE__ */ n(Ve, { children: i }),
|
|
79
|
-
/* @__PURE__ */ n(Be, { children: e }),
|
|
80
|
-
u != null && /* @__PURE__ */ n(Ke, { left: u.left, right: u.right })
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
function Ot({ primary: e, secondary: t }) {
|
|
86
|
-
return /* @__PURE__ */ p("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
|
|
19
|
+
function Et({ primary: e, secondary: t }) {
|
|
20
|
+
return /* @__PURE__ */ f("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
|
|
87
21
|
/* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__footer-msg-primary", children: e }),
|
|
88
22
|
t != null && /* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__footer-msg-secondary", children: t })
|
|
89
23
|
] });
|
|
90
24
|
}
|
|
91
|
-
function
|
|
25
|
+
function Ve({
|
|
92
26
|
value: e,
|
|
93
27
|
onChange: t,
|
|
94
|
-
enabled:
|
|
95
|
-
onToggleEnabled:
|
|
28
|
+
enabled: r = !1,
|
|
29
|
+
onToggleEnabled: l
|
|
96
30
|
}) {
|
|
97
31
|
const a = "settings-threshold-enabled";
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
|
|
33
|
+
/* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
|
|
100
34
|
/* @__PURE__ */ n("label", { htmlFor: a, className: "settings-shell__toggle-label", children: "Show threshold indicator" }),
|
|
101
35
|
/* @__PURE__ */ n(
|
|
102
36
|
"input",
|
|
@@ -105,16 +39,16 @@ function We({
|
|
|
105
39
|
type: "checkbox",
|
|
106
40
|
role: "switch",
|
|
107
41
|
"aria-label": "Enable threshold indicator",
|
|
108
|
-
"aria-checked":
|
|
109
|
-
checked:
|
|
110
|
-
onChange: (i) =>
|
|
42
|
+
"aria-checked": r,
|
|
43
|
+
checked: r,
|
|
44
|
+
onChange: (i) => l?.(i.target.checked),
|
|
111
45
|
className: "settings-shell__toggle"
|
|
112
46
|
}
|
|
113
47
|
)
|
|
114
48
|
] }),
|
|
115
|
-
|
|
49
|
+
r ? /* @__PURE__ */ f(B, { children: [
|
|
116
50
|
/* @__PURE__ */ n("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
|
|
117
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
|
|
118
52
|
/* @__PURE__ */ n(
|
|
119
53
|
"input",
|
|
120
54
|
{
|
|
@@ -131,7 +65,7 @@ function We({
|
|
|
131
65
|
className: "settings-shell__slider"
|
|
132
66
|
}
|
|
133
67
|
),
|
|
134
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
135
69
|
e,
|
|
136
70
|
"%"
|
|
137
71
|
] })
|
|
@@ -139,10 +73,10 @@ function We({
|
|
|
139
73
|
] }) : /* @__PURE__ */ n("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default styling. Turn on to tint values below the threshold." })
|
|
140
74
|
] });
|
|
141
75
|
}
|
|
142
|
-
function
|
|
143
|
-
return /* @__PURE__ */
|
|
76
|
+
function Be({ value: e, onChange: t }) {
|
|
77
|
+
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
|
|
144
78
|
/* @__PURE__ */ n("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
|
|
145
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
|
|
146
80
|
/* @__PURE__ */ n(
|
|
147
81
|
"input",
|
|
148
82
|
{
|
|
@@ -159,25 +93,25 @@ function Ge({ value: e, onChange: t }) {
|
|
|
159
93
|
className: "settings-shell__slider"
|
|
160
94
|
}
|
|
161
95
|
),
|
|
162
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
163
97
|
e,
|
|
164
98
|
" days"
|
|
165
99
|
] })
|
|
166
100
|
] })
|
|
167
101
|
] });
|
|
168
102
|
}
|
|
169
|
-
function
|
|
170
|
-
const { attributes:
|
|
171
|
-
transform:
|
|
103
|
+
function Ke({ id: e, onRemove: t }) {
|
|
104
|
+
const { attributes: r, listeners: l, setNodeRef: a, transform: i, transition: u, isDragging: o } = Ue({ id: e }), s = {
|
|
105
|
+
transform: ze.Transform.toString(i),
|
|
172
106
|
transition: u,
|
|
173
|
-
opacity:
|
|
107
|
+
opacity: o ? 0.6 : 1
|
|
174
108
|
};
|
|
175
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ f(
|
|
176
110
|
"li",
|
|
177
111
|
{
|
|
178
112
|
ref: a,
|
|
179
113
|
style: s,
|
|
180
|
-
className: `settings-shell__slot-pill${
|
|
114
|
+
className: `settings-shell__slot-pill${o ? " settings-shell__slot-pill--dragging" : ""}`,
|
|
181
115
|
children: [
|
|
182
116
|
/* @__PURE__ */ n(
|
|
183
117
|
"button",
|
|
@@ -185,8 +119,8 @@ function Qe({ id: e, onRemove: t }) {
|
|
|
185
119
|
type: "button",
|
|
186
120
|
className: "settings-shell__slot-pill__handle",
|
|
187
121
|
"aria-label": `Reorder ${e}`,
|
|
122
|
+
...r,
|
|
188
123
|
...l,
|
|
189
|
-
...o,
|
|
190
124
|
children: /* @__PURE__ */ n("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
|
|
191
125
|
}
|
|
192
126
|
),
|
|
@@ -205,35 +139,34 @@ function Qe({ id: e, onRemove: t }) {
|
|
|
205
139
|
}
|
|
206
140
|
);
|
|
207
141
|
}
|
|
208
|
-
function
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
),
|
|
142
|
+
function Ye({ value: e, onChange: t }) {
|
|
143
|
+
const r = ke(
|
|
144
|
+
ce(De, { activationConstraint: { distance: 4 } }),
|
|
145
|
+
ce(Le, { coordinateGetter: Ie })
|
|
146
|
+
), l = U.useRef(!1), [a, i] = U.useState(!1), u = (s) => {
|
|
213
147
|
const { active: c, over: d } = s;
|
|
214
148
|
if (!d || c.id === d.id) return;
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
},
|
|
218
|
-
|
|
149
|
+
const m = e.findIndex((b) => b === c.id), h = e.findIndex((b) => b === d.id);
|
|
150
|
+
m === -1 || h === -1 || t(Fe([...e], m, h));
|
|
151
|
+
}, o = (s) => {
|
|
152
|
+
l.current || (l.current = !0, i(!0)), t(e.filter((c) => c !== s));
|
|
219
153
|
};
|
|
220
|
-
return /* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */ n("
|
|
222
|
-
/* @__PURE__ */ n(De, { sensors: l, collisionDetection: Oe, onDragEnd: u, children: /* @__PURE__ */ n(Ie, { items: [...e], strategy: Me, children: /* @__PURE__ */ n("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ n(Qe, { id: s, onRemove: () => r(s) }, s)) }) }) }),
|
|
154
|
+
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
|
|
155
|
+
/* @__PURE__ */ n(Oe, { sensors: r, collisionDetection: Me, onDragEnd: u, children: /* @__PURE__ */ n($e, { items: [...e], strategy: Re, children: /* @__PURE__ */ n("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ n(Ke, { id: s, onRemove: () => o(s) }, s)) }) }) }),
|
|
223
156
|
e.length === 0 && a && /* @__PURE__ */ n("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
|
|
224
157
|
/* @__PURE__ */ n("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
|
|
225
158
|
] });
|
|
226
159
|
}
|
|
227
|
-
const
|
|
228
|
-
function
|
|
160
|
+
const We = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
|
|
161
|
+
function Ge({
|
|
229
162
|
value: e,
|
|
230
163
|
onSelect: t,
|
|
231
|
-
enabled:
|
|
232
|
-
onToggleEnabled:
|
|
164
|
+
enabled: r = !1,
|
|
165
|
+
onToggleEnabled: l
|
|
233
166
|
}) {
|
|
234
167
|
const a = "settings-accent-enabled";
|
|
235
|
-
return /* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
|
|
169
|
+
/* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
|
|
237
170
|
/* @__PURE__ */ n("label", { htmlFor: a, className: "settings-shell__toggle-label", children: "Override default accent" }),
|
|
238
171
|
/* @__PURE__ */ n(
|
|
239
172
|
"input",
|
|
@@ -242,16 +175,16 @@ function Ze({
|
|
|
242
175
|
type: "checkbox",
|
|
243
176
|
role: "switch",
|
|
244
177
|
"aria-label": "Enable accent override",
|
|
245
|
-
"aria-checked":
|
|
246
|
-
checked:
|
|
247
|
-
onChange: (i) =>
|
|
178
|
+
"aria-checked": r,
|
|
179
|
+
checked: r,
|
|
180
|
+
onChange: (i) => l?.(i.target.checked),
|
|
248
181
|
className: "settings-shell__toggle"
|
|
249
182
|
}
|
|
250
183
|
)
|
|
251
184
|
] }),
|
|
252
|
-
|
|
185
|
+
r ? /* @__PURE__ */ f(B, { children: [
|
|
253
186
|
/* @__PURE__ */ n("span", { className: "settings-shell__label", children: "Accent color" }),
|
|
254
|
-
/* @__PURE__ */ n("div", { className: "settings-shell__swatch-row", children:
|
|
187
|
+
/* @__PURE__ */ n("div", { className: "settings-shell__swatch-row", children: We.map((i) => {
|
|
255
188
|
const u = e === i;
|
|
256
189
|
return /* @__PURE__ */ n(
|
|
257
190
|
"button",
|
|
@@ -269,22 +202,22 @@ function Ze({
|
|
|
269
202
|
] }) : /* @__PURE__ */ n("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default accent. Turn on to override." })
|
|
270
203
|
] });
|
|
271
204
|
}
|
|
272
|
-
const
|
|
273
|
-
function
|
|
205
|
+
const Qe = ["Orders", "Quota", "Unassigned"], qe = ["threshold", "timeframe", "color"];
|
|
206
|
+
function Pt({
|
|
274
207
|
isOpen: e,
|
|
275
208
|
cardSpan: t,
|
|
276
|
-
cardLabel:
|
|
277
|
-
cardValue:
|
|
209
|
+
cardLabel: r = "Metric",
|
|
210
|
+
cardValue: l = "—",
|
|
278
211
|
previewSlot: a,
|
|
279
|
-
dimensions: i =
|
|
212
|
+
dimensions: i = qe,
|
|
280
213
|
initialTab: u,
|
|
281
|
-
initialValues:
|
|
214
|
+
initialValues: o
|
|
282
215
|
}) {
|
|
283
|
-
const s =
|
|
284
|
-
|
|
285
|
-
i.includes(
|
|
286
|
-
}, [i,
|
|
287
|
-
const
|
|
216
|
+
const s = O(), c = s?.state.activeTrigger, d = c?.kind === "card-overflow" ? c.cardId : null, m = fe(), h = c?.span, b = t ?? h ?? 1, p = i[0] ?? "threshold", [y, E] = U.useState(u ?? p);
|
|
217
|
+
U.useEffect(() => {
|
|
218
|
+
i.includes(y) || E(p);
|
|
219
|
+
}, [i, y, p]);
|
|
220
|
+
const v = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, N = typeof v.threshold == "number" ? v.threshold : typeof o?.threshold == "number" ? o.threshold : 80, I = typeof v.timeframe == "number" ? v.timeframe : typeof o?.timeframe == "number" ? o.timeframe : 30, $ = typeof v.accent == "string" ? v.accent : typeof o?.accent == "string" ? o.accent : null, w = Array.isArray(v.slots) ? v.slots : Array.isArray(o?.slots) ? o.slots : Qe, A = typeof v.thresholdEnabled == "boolean" ? v.thresholdEnabled : typeof o?.thresholdEnabled == "boolean" ? o.thresholdEnabled : !1, Y = typeof v.accentEnabled == "boolean" ? v.accentEnabled : typeof o?.accentEnabled == "boolean" ? o.accentEnabled : !1, W = (P) => {
|
|
288
221
|
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(P.target.value) });
|
|
289
222
|
}, G = (P) => {
|
|
290
223
|
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(P.target.value) });
|
|
@@ -292,28 +225,27 @@ function Lt({
|
|
|
292
225
|
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: P });
|
|
293
226
|
}, Q = (P) => {
|
|
294
227
|
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: P });
|
|
295
|
-
},
|
|
228
|
+
}, q = (P) => {
|
|
296
229
|
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "thresholdEnabled", value: P });
|
|
297
|
-
},
|
|
230
|
+
}, g = (P) => {
|
|
298
231
|
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accentEnabled", value: P });
|
|
299
|
-
},
|
|
232
|
+
}, C = s?.state.isDirty ?? !1, S = d;
|
|
300
233
|
return /* @__PURE__ */ n(
|
|
301
|
-
|
|
234
|
+
V,
|
|
302
235
|
{
|
|
303
236
|
variant: "with-stage",
|
|
304
|
-
title: "Configure metric",
|
|
305
237
|
onClose: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
306
|
-
stage: /* @__PURE__ */ n(
|
|
307
|
-
/* @__PURE__ */ n("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children:
|
|
308
|
-
/* @__PURE__ */ n("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children:
|
|
238
|
+
stage: /* @__PURE__ */ n(He, { span: b, rotating: !m, children: a ?? /* @__PURE__ */ f(B, { children: [
|
|
239
|
+
/* @__PURE__ */ n("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
|
|
240
|
+
/* @__PURE__ */ n("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: l })
|
|
309
241
|
] }) }),
|
|
310
242
|
navigation: /* @__PURE__ */ n(
|
|
311
|
-
|
|
243
|
+
we,
|
|
312
244
|
{
|
|
313
245
|
dimensions: i,
|
|
314
|
-
activeTab:
|
|
315
|
-
onSelect:
|
|
316
|
-
reduced:
|
|
246
|
+
activeTab: y,
|
|
247
|
+
onSelect: E,
|
|
248
|
+
reduced: m
|
|
317
249
|
}
|
|
318
250
|
),
|
|
319
251
|
footer: {
|
|
@@ -323,64 +255,52 @@ function Lt({
|
|
|
323
255
|
id: "btn-reset",
|
|
324
256
|
type: "button",
|
|
325
257
|
className: "gloss-panel-chrome-v2__footer-btn",
|
|
326
|
-
disabled: !
|
|
258
|
+
disabled: !C,
|
|
327
259
|
onClick: () => {
|
|
328
|
-
|
|
260
|
+
S != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: S });
|
|
329
261
|
},
|
|
330
262
|
children: "Reset"
|
|
331
263
|
}
|
|
332
264
|
),
|
|
333
|
-
right: /* @__PURE__ */
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
/* @__PURE__ */ n(
|
|
345
|
-
"button",
|
|
346
|
-
{
|
|
347
|
-
id: "settings-apply",
|
|
348
|
-
type: "button",
|
|
349
|
-
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
350
|
-
disabled: !T,
|
|
351
|
-
onClick: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
352
|
-
children: "Apply"
|
|
353
|
-
}
|
|
354
|
-
)
|
|
355
|
-
] })
|
|
265
|
+
right: /* @__PURE__ */ n(
|
|
266
|
+
"button",
|
|
267
|
+
{
|
|
268
|
+
id: "settings-apply",
|
|
269
|
+
type: "button",
|
|
270
|
+
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
271
|
+
disabled: !C,
|
|
272
|
+
onClick: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
273
|
+
children: "Apply"
|
|
274
|
+
}
|
|
275
|
+
)
|
|
356
276
|
},
|
|
357
|
-
children: /* @__PURE__ */ n("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ n("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ f(
|
|
358
278
|
"div",
|
|
359
279
|
{
|
|
360
280
|
role: "tabpanel",
|
|
361
|
-
id: `settings-tabpanel-${
|
|
281
|
+
id: `settings-tabpanel-${y}`,
|
|
362
282
|
"aria-label": "Settings dimension controls",
|
|
363
283
|
tabIndex: 0,
|
|
364
284
|
className: "settings-shell__tabpanel",
|
|
365
285
|
children: [
|
|
366
|
-
|
|
367
|
-
|
|
286
|
+
y === "threshold" && /* @__PURE__ */ n(
|
|
287
|
+
Ve,
|
|
368
288
|
{
|
|
369
|
-
value:
|
|
289
|
+
value: N,
|
|
370
290
|
onChange: W,
|
|
371
|
-
enabled:
|
|
372
|
-
onToggleEnabled:
|
|
291
|
+
enabled: A,
|
|
292
|
+
onToggleEnabled: q
|
|
373
293
|
}
|
|
374
294
|
),
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
295
|
+
y === "timeframe" && /* @__PURE__ */ n(Be, { value: I, onChange: G }),
|
|
296
|
+
y === "slots" && /* @__PURE__ */ n(Ye, { value: w, onChange: Q }),
|
|
297
|
+
y === "color" && /* @__PURE__ */ n(
|
|
298
|
+
Ge,
|
|
379
299
|
{
|
|
380
|
-
value:
|
|
300
|
+
value: $,
|
|
381
301
|
onSelect: le,
|
|
382
302
|
enabled: Y,
|
|
383
|
-
onToggleEnabled:
|
|
303
|
+
onToggleEnabled: g
|
|
384
304
|
}
|
|
385
305
|
)
|
|
386
306
|
]
|
|
@@ -389,7 +309,7 @@ function Lt({
|
|
|
389
309
|
}
|
|
390
310
|
);
|
|
391
311
|
}
|
|
392
|
-
const
|
|
312
|
+
const ve = [
|
|
393
313
|
"Overbought",
|
|
394
314
|
"What's selling",
|
|
395
315
|
"On track vs plan",
|
|
@@ -397,7 +317,7 @@ const be = [
|
|
|
397
317
|
"Vendor performance",
|
|
398
318
|
"Assortment mix",
|
|
399
319
|
"Customer retention"
|
|
400
|
-
],
|
|
320
|
+
], ye = "Overbought", ae = {
|
|
401
321
|
Overbought: {
|
|
402
322
|
headline: "Am I overbought?",
|
|
403
323
|
helper: "Find slow-moving inventory before discount cycles eat margin."
|
|
@@ -428,7 +348,7 @@ const be = [
|
|
|
428
348
|
}
|
|
429
349
|
};
|
|
430
350
|
ae["Customer retention"].beta = !0;
|
|
431
|
-
const
|
|
351
|
+
const _e = {
|
|
432
352
|
Overbought: {
|
|
433
353
|
primary: [
|
|
434
354
|
{
|
|
@@ -893,16 +813,16 @@ const ye = {
|
|
|
893
813
|
]
|
|
894
814
|
}
|
|
895
815
|
};
|
|
896
|
-
function
|
|
816
|
+
function Ce({
|
|
897
817
|
lenses: e,
|
|
898
818
|
activeLens: t,
|
|
899
|
-
onLensChange:
|
|
900
|
-
variant:
|
|
819
|
+
onLensChange: r,
|
|
820
|
+
variant: l = "pills",
|
|
901
821
|
lensMeta: a = ae
|
|
902
822
|
}) {
|
|
903
|
-
return
|
|
904
|
-
const u = i === t,
|
|
905
|
-
return u && s.push("active"), /* @__PURE__ */
|
|
823
|
+
return l === "pills" ? /* @__PURE__ */ n("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ n("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((i) => {
|
|
824
|
+
const u = i === t, o = a[i], s = ["cat-pill"];
|
|
825
|
+
return u && s.push("active"), /* @__PURE__ */ f(
|
|
906
826
|
"button",
|
|
907
827
|
{
|
|
908
828
|
type: "button",
|
|
@@ -911,28 +831,28 @@ function _e({
|
|
|
911
831
|
className: s.join(" "),
|
|
912
832
|
"data-lens": i,
|
|
913
833
|
onClick: () => {
|
|
914
|
-
u ||
|
|
834
|
+
u || r(i);
|
|
915
835
|
},
|
|
916
836
|
children: [
|
|
917
837
|
i,
|
|
918
|
-
|
|
838
|
+
o?.beta && /* @__PURE__ */ n("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
|
|
919
839
|
]
|
|
920
840
|
},
|
|
921
841
|
i
|
|
922
842
|
);
|
|
923
|
-
}) }) }) : /* @__PURE__ */ n(
|
|
843
|
+
}) }) }) : /* @__PURE__ */ n(je, { lenses: e, activeLens: t, onLensChange: r });
|
|
924
844
|
}
|
|
925
|
-
function
|
|
845
|
+
function je({
|
|
926
846
|
lenses: e,
|
|
927
847
|
activeLens: t,
|
|
928
|
-
onLensChange:
|
|
848
|
+
onLensChange: r
|
|
929
849
|
}) {
|
|
930
|
-
const [
|
|
850
|
+
const [l, a] = x(!1), i = K(null), u = () => {
|
|
931
851
|
i.current != null && (window.clearTimeout(i.current), i.current = null);
|
|
932
|
-
},
|
|
852
|
+
}, o = () => {
|
|
933
853
|
u(), i.current = window.setTimeout(() => a(!1), 100);
|
|
934
854
|
}, s = e.filter((c) => c !== t);
|
|
935
|
-
return /* @__PURE__ */ n("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */
|
|
855
|
+
return /* @__PURE__ */ n("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ f("div", { className: "cat-segmented", children: [
|
|
936
856
|
/* @__PURE__ */ n(
|
|
937
857
|
"button",
|
|
938
858
|
{
|
|
@@ -943,23 +863,23 @@ function et({
|
|
|
943
863
|
children: t
|
|
944
864
|
}
|
|
945
865
|
),
|
|
946
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ f(
|
|
947
867
|
"div",
|
|
948
868
|
{
|
|
949
869
|
className: "cat-seg-more",
|
|
950
870
|
onMouseEnter: () => {
|
|
951
871
|
u(), a(!0);
|
|
952
872
|
},
|
|
953
|
-
onMouseLeave:
|
|
873
|
+
onMouseLeave: o,
|
|
954
874
|
children: [
|
|
955
|
-
/* @__PURE__ */ n("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded":
|
|
956
|
-
|
|
875
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": l, children: "More ▾" }),
|
|
876
|
+
l && /* @__PURE__ */ n(
|
|
957
877
|
"div",
|
|
958
878
|
{
|
|
959
879
|
className: "cat-seg-overflow",
|
|
960
880
|
role: "menu",
|
|
961
881
|
onMouseEnter: u,
|
|
962
|
-
onMouseLeave:
|
|
882
|
+
onMouseLeave: o,
|
|
963
883
|
children: s.map((c) => /* @__PURE__ */ n(
|
|
964
884
|
"button",
|
|
965
885
|
{
|
|
@@ -967,7 +887,7 @@ function et({
|
|
|
967
887
|
"data-lens": c,
|
|
968
888
|
role: "menuitem",
|
|
969
889
|
onClick: () => {
|
|
970
|
-
|
|
890
|
+
r(c), a(!1);
|
|
971
891
|
},
|
|
972
892
|
children: c
|
|
973
893
|
},
|
|
@@ -980,23 +900,23 @@ function et({
|
|
|
980
900
|
)
|
|
981
901
|
] }) });
|
|
982
902
|
}
|
|
983
|
-
function te({ tiles: e, selectedTileId: t, onSelectTile:
|
|
903
|
+
function te({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
|
|
984
904
|
return /* @__PURE__ */ n("div", { className: "cat-tiles", children: e.map((a) => {
|
|
985
905
|
const i = a.id === t, u = a.subStats != null && a.subStats.length > 0;
|
|
986
|
-
let
|
|
987
|
-
u ? a.subStats.length === 5 ?
|
|
906
|
+
let o = null;
|
|
907
|
+
u ? a.subStats.length === 5 ? o = "span-5" : a.subStats.length === 3 ? o = "span-3" : o = "span-2" : a.stack === !0 && (o = "span-2");
|
|
988
908
|
const s = ["cat-tile"];
|
|
989
|
-
|
|
909
|
+
o && s.push(o), i && s.push("selected"), a.isNew && s.push("is-new"), a.startHere && s.push("start-here"), a.donut && s.push("has-donut");
|
|
990
910
|
const c = 1;
|
|
991
911
|
let d = 0.7;
|
|
992
912
|
if (a.donut) {
|
|
993
|
-
const
|
|
994
|
-
if (
|
|
995
|
-
const
|
|
996
|
-
Number.isFinite(
|
|
913
|
+
const m = /([\d.]+)\s*%/.exec(a.value);
|
|
914
|
+
if (m) {
|
|
915
|
+
const h = parseFloat(m[1]);
|
|
916
|
+
Number.isFinite(h) && (d = Math.max(0, Math.min(1, h / 100)));
|
|
997
917
|
}
|
|
998
918
|
}
|
|
999
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ f(
|
|
1000
920
|
"button",
|
|
1001
921
|
{
|
|
1002
922
|
type: "button",
|
|
@@ -1007,11 +927,11 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
|
|
|
1007
927
|
"data-donut": a.donut ? "true" : void 0,
|
|
1008
928
|
"data-accent": a.accent,
|
|
1009
929
|
"aria-pressed": i,
|
|
1010
|
-
onClick: () =>
|
|
930
|
+
onClick: () => r(a.id, a.desc),
|
|
1011
931
|
style: a.accent ? { "--cat-tile-accent": a.accent } : void 0,
|
|
1012
932
|
children: [
|
|
1013
933
|
a.startHere && /* @__PURE__ */ n("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
|
|
1014
|
-
|
|
934
|
+
l ? l(a) : /* @__PURE__ */ n(
|
|
1015
935
|
"div",
|
|
1016
936
|
{
|
|
1017
937
|
className: "cat-tile-primitive-wrapper gloss-metric-card",
|
|
@@ -1019,7 +939,7 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
|
|
|
1019
939
|
style: { pointerEvents: "none", width: "100%", height: "100%" },
|
|
1020
940
|
"aria-hidden": "true",
|
|
1021
941
|
children: a.donut ? /* @__PURE__ */ n(
|
|
1022
|
-
|
|
942
|
+
de,
|
|
1023
943
|
{
|
|
1024
944
|
variant: "donut",
|
|
1025
945
|
label: a.label,
|
|
@@ -1030,7 +950,7 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
|
|
|
1030
950
|
colSpan: c
|
|
1031
951
|
}
|
|
1032
952
|
) : /* @__PURE__ */ n(
|
|
1033
|
-
|
|
953
|
+
de,
|
|
1034
954
|
{
|
|
1035
955
|
variant: "standard",
|
|
1036
956
|
label: a.label,
|
|
@@ -1040,7 +960,7 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
|
|
|
1040
960
|
)
|
|
1041
961
|
}
|
|
1042
962
|
),
|
|
1043
|
-
a.variants && a.variants.length > 0 && /* @__PURE__ */ n("span", { className: "cat-tile-variants", "aria-hidden": "true", children: a.variants.map((
|
|
963
|
+
a.variants && a.variants.length > 0 && /* @__PURE__ */ n("span", { className: "cat-tile-variants", "aria-hidden": "true", children: a.variants.map((m) => /* @__PURE__ */ n("span", { children: m }, m)) }),
|
|
1044
964
|
a.isNew && /* @__PURE__ */ n("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
|
|
1045
965
|
]
|
|
1046
966
|
},
|
|
@@ -1048,17 +968,17 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
|
|
|
1048
968
|
);
|
|
1049
969
|
}) });
|
|
1050
970
|
}
|
|
1051
|
-
const se =
|
|
1052
|
-
function
|
|
1053
|
-
return
|
|
971
|
+
const se = ge(null);
|
|
972
|
+
function re() {
|
|
973
|
+
return be(se);
|
|
1054
974
|
}
|
|
1055
|
-
function
|
|
1056
|
-
const
|
|
1057
|
-
if (
|
|
1058
|
-
const
|
|
1059
|
-
return /* @__PURE__ */
|
|
975
|
+
function xt({ mode: e, dispatch: t }) {
|
|
976
|
+
const r = re();
|
|
977
|
+
if (r == null && e == null) return null;
|
|
978
|
+
const l = r?.mode ?? e ?? "add", a = r?.selectedTileId ?? null, i = r?.description ?? null, u = a == null;
|
|
979
|
+
return /* @__PURE__ */ f("div", { className: "panel-footer catalog", children: [
|
|
1060
980
|
/* @__PURE__ */ n("div", { className: "cat-description", id: "cat-desc", children: i ?? /* @__PURE__ */ n("em", { children: "Tap a metric to see its description" }) }),
|
|
1061
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ f("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
|
|
1062
982
|
/* @__PURE__ */ n("div", { className: "spacer", style: { flex: 1 } }),
|
|
1063
983
|
/* @__PURE__ */ n(
|
|
1064
984
|
"button",
|
|
@@ -1070,7 +990,7 @@ function nt({ mode: e, dispatch: t }) {
|
|
|
1070
990
|
children: "Cancel"
|
|
1071
991
|
}
|
|
1072
992
|
),
|
|
1073
|
-
|
|
993
|
+
l === "add" && /* @__PURE__ */ n(
|
|
1074
994
|
"button",
|
|
1075
995
|
{
|
|
1076
996
|
id: "btn-cat-add",
|
|
@@ -1081,7 +1001,7 @@ function nt({ mode: e, dispatch: t }) {
|
|
|
1081
1001
|
children: "Add metric"
|
|
1082
1002
|
}
|
|
1083
1003
|
),
|
|
1084
|
-
|
|
1004
|
+
l === "replace" && /* @__PURE__ */ n(
|
|
1085
1005
|
"button",
|
|
1086
1006
|
{
|
|
1087
1007
|
id: "btn-cat-replace",
|
|
@@ -1095,155 +1015,199 @@ function nt({ mode: e, dispatch: t }) {
|
|
|
1095
1015
|
] })
|
|
1096
1016
|
] });
|
|
1097
1017
|
}
|
|
1098
|
-
function
|
|
1018
|
+
function ue(e, t) {
|
|
1099
1019
|
if (t.length === 0) return !0;
|
|
1100
|
-
const
|
|
1101
|
-
if (e.label.toLowerCase().includes(
|
|
1020
|
+
const r = t.toLowerCase();
|
|
1021
|
+
if (e.label.toLowerCase().includes(r) || e.value.toLowerCase().includes(r)) return !0;
|
|
1102
1022
|
if (e.subStats) {
|
|
1103
|
-
for (const
|
|
1104
|
-
if (
|
|
1023
|
+
for (const l of e.subStats)
|
|
1024
|
+
if (l.label.toLowerCase().includes(r) || l.value.toLowerCase().includes(r)) return !0;
|
|
1105
1025
|
}
|
|
1106
1026
|
return !1;
|
|
1107
1027
|
}
|
|
1108
|
-
function
|
|
1028
|
+
function Ze() {
|
|
1029
|
+
const t = re()?.description ?? null;
|
|
1030
|
+
return t == null ? /* @__PURE__ */ n("span", { style: { fontStyle: "italic" }, children: "Tap a metric to see its description" }) : /* @__PURE__ */ n("span", { children: t });
|
|
1031
|
+
}
|
|
1032
|
+
function At({
|
|
1109
1033
|
isOpen: e,
|
|
1110
|
-
lenses: t =
|
|
1111
|
-
defaultLens:
|
|
1112
|
-
tilesByLens:
|
|
1034
|
+
lenses: t = ve,
|
|
1035
|
+
defaultLens: r = ye,
|
|
1036
|
+
tilesByLens: l = _e,
|
|
1113
1037
|
lensMeta: a = ae,
|
|
1114
|
-
|
|
1115
|
-
renderTile: u
|
|
1038
|
+
renderTile: i
|
|
1116
1039
|
}) {
|
|
1117
|
-
const [
|
|
1118
|
-
() =>
|
|
1119
|
-
[
|
|
1120
|
-
),
|
|
1121
|
-
() => (
|
|
1122
|
-
[
|
|
1123
|
-
);
|
|
1124
|
-
return /* @__PURE__ */
|
|
1040
|
+
const u = O(), [o, s] = x(r), [c, d] = x(null), [m, h] = x(null), [b, p] = x(""), y = l[o] ?? { primary: [] }, E = a[o], T = ie(
|
|
1041
|
+
() => y.primary.filter((w) => ue(w, b)),
|
|
1042
|
+
[y.primary, b]
|
|
1043
|
+
), v = ie(
|
|
1044
|
+
() => (y.secondary ?? []).filter((w) => ue(w, b)),
|
|
1045
|
+
[y.secondary, b]
|
|
1046
|
+
), N = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), I = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), $ = c == null;
|
|
1047
|
+
return /* @__PURE__ */ n(
|
|
1125
1048
|
se.Provider,
|
|
1126
1049
|
{
|
|
1127
|
-
value: { mode: "add", selectedTileId: c, description:
|
|
1128
|
-
children:
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
activeLens: r,
|
|
1146
|
-
lensMeta: a,
|
|
1147
|
-
variant: "pills",
|
|
1148
|
-
onLensChange: (y) => {
|
|
1149
|
-
s(y), d(null), f(null), m("");
|
|
1050
|
+
value: { mode: "add", selectedTileId: c, description: m },
|
|
1051
|
+
children: /* @__PURE__ */ n(
|
|
1052
|
+
V,
|
|
1053
|
+
{
|
|
1054
|
+
variant: "no-stage",
|
|
1055
|
+
title: "Add a metric",
|
|
1056
|
+
onClose: I,
|
|
1057
|
+
footer: {
|
|
1058
|
+
left: /* @__PURE__ */ n(Ze, {}),
|
|
1059
|
+
right: /* @__PURE__ */ n(
|
|
1060
|
+
"button",
|
|
1061
|
+
{
|
|
1062
|
+
id: "btn-cat-add",
|
|
1063
|
+
type: "button",
|
|
1064
|
+
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
1065
|
+
disabled: $,
|
|
1066
|
+
onClick: N,
|
|
1067
|
+
children: "Add metric"
|
|
1150
1068
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
/* @__PURE__ */ n("
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1069
|
+
)
|
|
1070
|
+
},
|
|
1071
|
+
children: /* @__PURE__ */ f("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
|
|
1072
|
+
/* @__PURE__ */ n("div", { className: "cat-search", children: /* @__PURE__ */ n(
|
|
1073
|
+
"input",
|
|
1074
|
+
{
|
|
1075
|
+
type: "search",
|
|
1076
|
+
className: "cat-search-input",
|
|
1077
|
+
placeholder: "Search metrics",
|
|
1078
|
+
"aria-label": "Search metrics",
|
|
1079
|
+
value: b,
|
|
1080
|
+
onChange: (w) => p(w.target.value)
|
|
1081
|
+
}
|
|
1082
|
+
) }),
|
|
1083
|
+
/* @__PURE__ */ n(
|
|
1084
|
+
Ce,
|
|
1085
|
+
{
|
|
1086
|
+
lenses: t,
|
|
1087
|
+
activeLens: o,
|
|
1088
|
+
lensMeta: a,
|
|
1089
|
+
variant: "pills",
|
|
1090
|
+
onLensChange: (w) => {
|
|
1091
|
+
s(w), d(null), h(null), p("");
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
),
|
|
1095
|
+
E && /* @__PURE__ */ f("div", { className: "cat-lens-meta", children: [
|
|
1096
|
+
/* @__PURE__ */ n("h3", { className: "cat-lens-headline", children: E.headline }),
|
|
1097
|
+
/* @__PURE__ */ n("p", { className: "cat-lens-helper", children: E.helper })
|
|
1098
|
+
] }),
|
|
1170
1099
|
/* @__PURE__ */ n(
|
|
1171
1100
|
te,
|
|
1172
1101
|
{
|
|
1173
|
-
tiles:
|
|
1102
|
+
tiles: T,
|
|
1174
1103
|
selectedTileId: c,
|
|
1175
|
-
onSelectTile: (
|
|
1176
|
-
d(
|
|
1104
|
+
onSelectTile: (w, A) => {
|
|
1105
|
+
d(w), h(A);
|
|
1177
1106
|
},
|
|
1178
|
-
renderTile:
|
|
1107
|
+
renderTile: i
|
|
1179
1108
|
}
|
|
1180
|
-
)
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1109
|
+
),
|
|
1110
|
+
v.length > 0 && /* @__PURE__ */ f("div", { className: "cat-more-in-lens", children: [
|
|
1111
|
+
/* @__PURE__ */ n("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
|
|
1112
|
+
/* @__PURE__ */ n(
|
|
1113
|
+
te,
|
|
1114
|
+
{
|
|
1115
|
+
tiles: v,
|
|
1116
|
+
selectedTileId: c,
|
|
1117
|
+
onSelectTile: (w, A) => {
|
|
1118
|
+
d(w), h(A);
|
|
1119
|
+
},
|
|
1120
|
+
renderTile: i
|
|
1121
|
+
}
|
|
1122
|
+
)
|
|
1123
|
+
] }),
|
|
1124
|
+
T.length === 0 && v.length === 0 && b.length > 0 && /* @__PURE__ */ f("div", { className: "cat-empty", children: [
|
|
1125
|
+
'No metrics match "',
|
|
1126
|
+
b,
|
|
1127
|
+
'".'
|
|
1128
|
+
] })
|
|
1186
1129
|
] })
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
]
|
|
1130
|
+
}
|
|
1131
|
+
)
|
|
1190
1132
|
}
|
|
1191
1133
|
);
|
|
1192
1134
|
}
|
|
1193
|
-
function
|
|
1135
|
+
function Xe() {
|
|
1136
|
+
const t = re()?.description ?? null;
|
|
1137
|
+
return t == null ? /* @__PURE__ */ n("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ n(B, { children: t });
|
|
1138
|
+
}
|
|
1139
|
+
function kt({
|
|
1194
1140
|
isOpen: e,
|
|
1195
1141
|
replacingLabel: t,
|
|
1196
|
-
lenses:
|
|
1197
|
-
defaultLens:
|
|
1198
|
-
tilesByLens: a =
|
|
1199
|
-
|
|
1200
|
-
renderTile: u
|
|
1142
|
+
lenses: r = ve,
|
|
1143
|
+
defaultLens: l = ye,
|
|
1144
|
+
tilesByLens: a = _e,
|
|
1145
|
+
renderTile: i
|
|
1201
1146
|
}) {
|
|
1202
|
-
const [
|
|
1203
|
-
return /* @__PURE__ */
|
|
1147
|
+
const u = O(), [o, s] = x(l), [c, d] = x(null), [m, h] = x(null), b = a[o] ?? { primary: [] }, p = [...b.primary, ...b.secondary ?? []], y = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), E = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), T = c == null;
|
|
1148
|
+
return /* @__PURE__ */ n(
|
|
1204
1149
|
se.Provider,
|
|
1205
1150
|
{
|
|
1206
|
-
value: { mode: "replace", selectedTileId: c, description:
|
|
1207
|
-
children:
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1151
|
+
value: { mode: "replace", selectedTileId: c, description: m },
|
|
1152
|
+
children: /* @__PURE__ */ n(
|
|
1153
|
+
V,
|
|
1154
|
+
{
|
|
1155
|
+
variant: "no-stage",
|
|
1156
|
+
title: "Replace metric",
|
|
1157
|
+
onClose: E,
|
|
1158
|
+
footer: {
|
|
1159
|
+
left: /* @__PURE__ */ n(Xe, {}),
|
|
1160
|
+
right: /* @__PURE__ */ n(
|
|
1161
|
+
"button",
|
|
1162
|
+
{
|
|
1163
|
+
id: "btn-cat-replace",
|
|
1164
|
+
type: "button",
|
|
1165
|
+
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
1166
|
+
disabled: T,
|
|
1167
|
+
onClick: y,
|
|
1168
|
+
children: "Replace metric"
|
|
1220
1169
|
}
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
/* @__PURE__ */
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1170
|
+
)
|
|
1171
|
+
},
|
|
1172
|
+
children: /* @__PURE__ */ f("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
|
|
1173
|
+
t && /* @__PURE__ */ f("p", { className: "cat-subtitle", children: [
|
|
1174
|
+
"replacing ",
|
|
1175
|
+
t
|
|
1176
|
+
] }),
|
|
1177
|
+
/* @__PURE__ */ n(
|
|
1178
|
+
Ce,
|
|
1179
|
+
{
|
|
1180
|
+
lenses: r,
|
|
1181
|
+
activeLens: o,
|
|
1182
|
+
onLensChange: (v) => {
|
|
1183
|
+
s(v), d(null), h(null);
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
),
|
|
1187
|
+
/* @__PURE__ */ n(
|
|
1188
|
+
te,
|
|
1189
|
+
{
|
|
1190
|
+
tiles: p,
|
|
1191
|
+
selectedTileId: c,
|
|
1192
|
+
onSelectTile: (v, N) => {
|
|
1193
|
+
d(v), h(N);
|
|
1194
|
+
},
|
|
1195
|
+
renderTile: i
|
|
1196
|
+
}
|
|
1197
|
+
)
|
|
1198
|
+
] })
|
|
1199
|
+
}
|
|
1200
|
+
)
|
|
1237
1201
|
}
|
|
1238
1202
|
);
|
|
1239
1203
|
}
|
|
1240
|
-
const
|
|
1241
|
-
function
|
|
1242
|
-
return
|
|
1204
|
+
const Ne = ge(null);
|
|
1205
|
+
function Te() {
|
|
1206
|
+
return be(Ne);
|
|
1243
1207
|
}
|
|
1244
|
-
function
|
|
1245
|
-
const t =
|
|
1246
|
-
return /* @__PURE__ */
|
|
1208
|
+
function Je(e = {}) {
|
|
1209
|
+
const t = Te(), r = t?.createPage, l = t?.setPages;
|
|
1210
|
+
return /* @__PURE__ */ f(
|
|
1247
1211
|
"div",
|
|
1248
1212
|
{
|
|
1249
1213
|
className: "panel-footer pm",
|
|
@@ -1257,11 +1221,11 @@ function at(e = {}) {
|
|
|
1257
1221
|
type: "button",
|
|
1258
1222
|
className: "btn btn-primary",
|
|
1259
1223
|
onClick: () => {
|
|
1260
|
-
if (
|
|
1261
|
-
|
|
1224
|
+
if (r) {
|
|
1225
|
+
r();
|
|
1262
1226
|
return;
|
|
1263
1227
|
}
|
|
1264
|
-
|
|
1228
|
+
l && l((a) => [
|
|
1265
1229
|
...a,
|
|
1266
1230
|
{ id: `new-${Date.now()}`, name: "Untitled", active: !1 }
|
|
1267
1231
|
]);
|
|
@@ -1273,34 +1237,34 @@ function at(e = {}) {
|
|
|
1273
1237
|
}
|
|
1274
1238
|
);
|
|
1275
1239
|
}
|
|
1276
|
-
function
|
|
1277
|
-
const i =
|
|
1278
|
-
|
|
1240
|
+
function pe({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: a }) {
|
|
1241
|
+
const i = Te(), [u, o] = x(!1), s = K(null);
|
|
1242
|
+
R(() => {
|
|
1279
1243
|
if (!u) return;
|
|
1280
|
-
const
|
|
1281
|
-
s.current && (s.current.contains(
|
|
1244
|
+
const p = (y) => {
|
|
1245
|
+
s.current && (s.current.contains(y.target) || o(!1));
|
|
1282
1246
|
};
|
|
1283
|
-
return document.addEventListener("mousedown",
|
|
1247
|
+
return document.addEventListener("mousedown", p, !0), () => document.removeEventListener("mousedown", p, !0);
|
|
1284
1248
|
}, [u]);
|
|
1285
1249
|
const c = () => {
|
|
1286
|
-
if (
|
|
1250
|
+
if (o(!1), t) return t(e.id);
|
|
1287
1251
|
if (!i?.renamePage) return;
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1252
|
+
const p = window.prompt("Rename page", e.name);
|
|
1253
|
+
p != null && p.trim().length > 0 && i.renamePage(e.id, p.trim());
|
|
1290
1254
|
}, d = () => {
|
|
1291
|
-
|
|
1292
|
-
},
|
|
1293
|
-
|
|
1294
|
-
},
|
|
1295
|
-
|
|
1255
|
+
o(!1), i?.duplicatePage?.(e.id);
|
|
1256
|
+
}, m = () => {
|
|
1257
|
+
o(!1), i?.deletePage?.(e.id);
|
|
1258
|
+
}, h = (p) => {
|
|
1259
|
+
p.stopPropagation(), a && !e.active && a(e.id);
|
|
1296
1260
|
}, b = ["pm-row"];
|
|
1297
|
-
return e.active && b.push("active"), /* @__PURE__ */
|
|
1261
|
+
return e.active && b.push("active"), /* @__PURE__ */ f("div", { ref: s, className: b.join(" "), "data-page-id": e.id, role: "listitem", children: [
|
|
1298
1262
|
/* @__PURE__ */ n(
|
|
1299
1263
|
"div",
|
|
1300
1264
|
{
|
|
1301
1265
|
className: "pm-handle",
|
|
1302
1266
|
"aria-hidden": "true",
|
|
1303
|
-
onMouseDown: () =>
|
|
1267
|
+
onMouseDown: () => l?.(e.id),
|
|
1304
1268
|
children: "⋮⋮"
|
|
1305
1269
|
}
|
|
1306
1270
|
),
|
|
@@ -1310,9 +1274,9 @@ function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a
|
|
|
1310
1274
|
className: "pm-name",
|
|
1311
1275
|
role: a && !e.active ? "button" : void 0,
|
|
1312
1276
|
tabIndex: a && !e.active ? 0 : void 0,
|
|
1313
|
-
onClick: a ?
|
|
1314
|
-
onKeyDown: (
|
|
1315
|
-
!a || e.active || (
|
|
1277
|
+
onClick: a ? h : void 0,
|
|
1278
|
+
onKeyDown: (p) => {
|
|
1279
|
+
!a || e.active || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), p.stopPropagation(), a(e.id));
|
|
1316
1280
|
},
|
|
1317
1281
|
"aria-label": a && !e.active ? `Switch to ${e.name}` : void 0,
|
|
1318
1282
|
children: e.name
|
|
@@ -1326,23 +1290,23 @@ function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a
|
|
|
1326
1290
|
"aria-label": "Page options",
|
|
1327
1291
|
"aria-haspopup": "menu",
|
|
1328
1292
|
"aria-expanded": u,
|
|
1329
|
-
onPointerDown: (
|
|
1330
|
-
onMouseDown: (
|
|
1331
|
-
onClick: (
|
|
1332
|
-
if (
|
|
1333
|
-
|
|
1293
|
+
onPointerDown: (p) => p.stopPropagation(),
|
|
1294
|
+
onMouseDown: (p) => p.stopPropagation(),
|
|
1295
|
+
onClick: (p) => {
|
|
1296
|
+
if (p.stopPropagation(), r) return r(e.id);
|
|
1297
|
+
o((y) => !y);
|
|
1334
1298
|
},
|
|
1335
1299
|
children: "⋯"
|
|
1336
1300
|
}
|
|
1337
1301
|
),
|
|
1338
|
-
u && /* @__PURE__ */
|
|
1302
|
+
u && /* @__PURE__ */ f(
|
|
1339
1303
|
"div",
|
|
1340
1304
|
{
|
|
1341
1305
|
className: "pm-kebab-menu",
|
|
1342
1306
|
role: "menu",
|
|
1343
1307
|
"data-page-id": e.id,
|
|
1344
|
-
onPointerDown: (
|
|
1345
|
-
onMouseDown: (
|
|
1308
|
+
onPointerDown: (p) => p.stopPropagation(),
|
|
1309
|
+
onMouseDown: (p) => p.stopPropagation(),
|
|
1346
1310
|
children: [
|
|
1347
1311
|
/* @__PURE__ */ n("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: c, children: "Rename" }),
|
|
1348
1312
|
/* @__PURE__ */ n("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
|
|
@@ -1352,7 +1316,7 @@ function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a
|
|
|
1352
1316
|
type: "button",
|
|
1353
1317
|
role: "menuitem",
|
|
1354
1318
|
className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
|
|
1355
|
-
onClick:
|
|
1319
|
+
onClick: m,
|
|
1356
1320
|
children: "Delete"
|
|
1357
1321
|
}
|
|
1358
1322
|
)
|
|
@@ -1361,116 +1325,121 @@ function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a
|
|
|
1361
1325
|
)
|
|
1362
1326
|
] });
|
|
1363
1327
|
}
|
|
1364
|
-
const
|
|
1328
|
+
const et = [
|
|
1365
1329
|
{ id: "p-pipeline", name: "My Pipeline", active: !0 },
|
|
1366
1330
|
{ id: "p-numbers", name: "My Numbers", active: !1 },
|
|
1367
1331
|
{ id: "p-morning", name: "My Morning", active: !1 },
|
|
1368
1332
|
{ id: "p-accounts", name: "My Accounts", active: !1 }
|
|
1369
1333
|
];
|
|
1370
|
-
function
|
|
1334
|
+
function Dt({
|
|
1371
1335
|
isOpen: e,
|
|
1372
|
-
pages: t =
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
onSwitchPage: d
|
|
1336
|
+
pages: t = et,
|
|
1337
|
+
externalPages: r,
|
|
1338
|
+
activePageId: l,
|
|
1339
|
+
onRename: a,
|
|
1340
|
+
onDuplicate: i,
|
|
1341
|
+
onDelete: u,
|
|
1342
|
+
onReorder: o,
|
|
1343
|
+
onCreatePage: s,
|
|
1344
|
+
onSwitchPage: c
|
|
1382
1345
|
}) {
|
|
1383
|
-
const [
|
|
1384
|
-
|
|
1385
|
-
}, []),
|
|
1386
|
-
|
|
1387
|
-
const
|
|
1388
|
-
if (!
|
|
1389
|
-
const
|
|
1390
|
-
id: `${
|
|
1391
|
-
name: `${
|
|
1346
|
+
const d = O(), [m, h] = x(() => [...t]), b = L((g, C) => {
|
|
1347
|
+
h((S) => S.map((k) => k.id === g ? { ...k, name: C } : k));
|
|
1348
|
+
}, []), p = L((g) => {
|
|
1349
|
+
h((C) => {
|
|
1350
|
+
const S = C.find((F) => F.id === g);
|
|
1351
|
+
if (!S) return C;
|
|
1352
|
+
const k = {
|
|
1353
|
+
id: `${S.id}-copy-${Date.now()}`,
|
|
1354
|
+
name: `${S.name} copy`,
|
|
1392
1355
|
active: !1
|
|
1393
|
-
},
|
|
1394
|
-
return [...
|
|
1356
|
+
}, D = C.findIndex((F) => F.id === g);
|
|
1357
|
+
return [...C.slice(0, D + 1), k, ...C.slice(D + 1)];
|
|
1395
1358
|
});
|
|
1396
|
-
}, []),
|
|
1397
|
-
|
|
1398
|
-
}, []),
|
|
1399
|
-
|
|
1400
|
-
const
|
|
1401
|
-
return
|
|
1359
|
+
}, []), y = L((g) => {
|
|
1360
|
+
h((C) => C.filter((S) => S.id !== g));
|
|
1361
|
+
}, []), E = L((g) => {
|
|
1362
|
+
h((C) => {
|
|
1363
|
+
const S = new Map(C.map((D) => [D.id, D])), k = g.map((D) => S.get(D)).filter(Boolean);
|
|
1364
|
+
return k.length === C.length ? k : C;
|
|
1402
1365
|
});
|
|
1403
|
-
}, []),
|
|
1366
|
+
}, []), T = r != null, v = T ? r : m, N = l != null ? v.map((g) => ({ ...g, active: g.id === l })) : [...v], I = a ?? (T ? void 0 : b), $ = i ?? (T ? void 0 : p), w = u ?? (T ? void 0 : y), A = o ?? (T ? void 0 : E), Y = L(
|
|
1404
1367
|
(g) => {
|
|
1405
|
-
|
|
1368
|
+
T || h(g);
|
|
1406
1369
|
},
|
|
1407
|
-
[
|
|
1408
|
-
), W =
|
|
1370
|
+
[T]
|
|
1371
|
+
), W = L(
|
|
1409
1372
|
(g) => {
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1373
|
+
const C = g[0]?.items.map((S) => S.id) ?? [];
|
|
1374
|
+
C.length > 0 && A && A(C);
|
|
1412
1375
|
},
|
|
1413
|
-
[
|
|
1414
|
-
), G =
|
|
1415
|
-
|
|
1376
|
+
[A]
|
|
1377
|
+
), G = N.map((g) => `${g.id}:${g.name}`).join("|"), Q = A != null && N.length > 1 ? /* @__PURE__ */ n(
|
|
1378
|
+
Ee,
|
|
1416
1379
|
{
|
|
1417
1380
|
zones: [
|
|
1418
1381
|
{
|
|
1419
1382
|
zoneKey: "pm-pages",
|
|
1420
|
-
items:
|
|
1383
|
+
items: N.map((g) => ({ ...g, id: g.id }))
|
|
1421
1384
|
}
|
|
1422
1385
|
],
|
|
1423
1386
|
onZoneChange: W,
|
|
1424
|
-
renderZone: (g,
|
|
1387
|
+
renderZone: (g, C, S) => /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children: S }),
|
|
1425
1388
|
renderItem: (g) => /* @__PURE__ */ n(
|
|
1426
|
-
|
|
1389
|
+
pe,
|
|
1427
1390
|
{
|
|
1428
1391
|
page: g,
|
|
1429
|
-
onSwitchPage:
|
|
1392
|
+
onSwitchPage: c
|
|
1430
1393
|
},
|
|
1431
1394
|
g.id
|
|
1432
1395
|
)
|
|
1433
1396
|
},
|
|
1434
1397
|
G
|
|
1435
|
-
) : /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children:
|
|
1436
|
-
|
|
1398
|
+
) : /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children: N.map((g) => /* @__PURE__ */ n(
|
|
1399
|
+
pe,
|
|
1437
1400
|
{
|
|
1438
1401
|
page: g,
|
|
1439
|
-
onSwitchPage:
|
|
1402
|
+
onSwitchPage: c
|
|
1440
1403
|
},
|
|
1441
1404
|
g.id
|
|
1442
|
-
)) });
|
|
1405
|
+
)) }), q = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
|
|
1443
1406
|
return /* @__PURE__ */ n(
|
|
1444
|
-
|
|
1407
|
+
Ne.Provider,
|
|
1445
1408
|
{
|
|
1446
1409
|
value: {
|
|
1447
|
-
pages:
|
|
1410
|
+
pages: N,
|
|
1448
1411
|
setPages: Y,
|
|
1449
|
-
renamePage:
|
|
1450
|
-
duplicatePage:
|
|
1451
|
-
deletePage:
|
|
1412
|
+
renamePage: I,
|
|
1413
|
+
duplicatePage: $,
|
|
1414
|
+
deletePage: w,
|
|
1452
1415
|
// Sprint 2026-05-20 — propagate live create binding for footer.
|
|
1453
|
-
createPage:
|
|
1416
|
+
createPage: s
|
|
1454
1417
|
},
|
|
1455
|
-
children: /* @__PURE__ */
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1418
|
+
children: /* @__PURE__ */ n(
|
|
1419
|
+
V,
|
|
1420
|
+
{
|
|
1421
|
+
variant: "no-stage",
|
|
1422
|
+
title: "Manage pages",
|
|
1423
|
+
onClose: q,
|
|
1424
|
+
footer: { right: /* @__PURE__ */ n(Je, {}) },
|
|
1425
|
+
children: /* @__PURE__ */ n("div", { "data-shell": "page-management", "aria-hidden": !e, children: Q })
|
|
1426
|
+
}
|
|
1427
|
+
)
|
|
1459
1428
|
}
|
|
1460
1429
|
);
|
|
1461
1430
|
}
|
|
1462
|
-
const
|
|
1431
|
+
const Lt = {
|
|
1463
1432
|
SETTINGS: "settings",
|
|
1464
1433
|
CATALOG_ADD: "catalog-add",
|
|
1465
1434
|
CATALOG_REPLACE: "catalog-replace",
|
|
1466
1435
|
PAGE_MGMT: "page-management",
|
|
1467
1436
|
NOTIFICATION_CENTER: "notification-center"
|
|
1468
|
-
},
|
|
1437
|
+
}, tt = {
|
|
1469
1438
|
position: "fixed",
|
|
1470
1439
|
inset: 0,
|
|
1471
1440
|
pointerEvents: "none",
|
|
1472
1441
|
zIndex: 55
|
|
1473
|
-
},
|
|
1442
|
+
}, nt = {
|
|
1474
1443
|
position: "absolute",
|
|
1475
1444
|
inset: 0,
|
|
1476
1445
|
zIndex: 1,
|
|
@@ -1479,235 +1448,192 @@ const Rt = {
|
|
|
1479
1448
|
pointerEvents: "none",
|
|
1480
1449
|
background: "rgba(0, 0, 0, 0.04)"
|
|
1481
1450
|
};
|
|
1482
|
-
function
|
|
1483
|
-
const { state: e, dispatch: t, getCloseLog:
|
|
1484
|
-
|
|
1451
|
+
function Ot() {
|
|
1452
|
+
const { state: e, dispatch: t, getCloseLog: r } = Pe();
|
|
1453
|
+
R(() => {
|
|
1485
1454
|
if (e.activePanelId == null) return;
|
|
1486
1455
|
function i(u) {
|
|
1487
1456
|
u.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
1488
1457
|
}
|
|
1489
1458
|
return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
|
|
1490
1459
|
}, [e.activePanelId, t]);
|
|
1491
|
-
const
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
}),
|
|
1460
|
+
const l = K(e);
|
|
1461
|
+
Ae(() => {
|
|
1462
|
+
l.current = e;
|
|
1463
|
+
}), R(() => {
|
|
1495
1464
|
if (process.env.NODE_ENV === "production") return;
|
|
1496
1465
|
const i = window;
|
|
1497
1466
|
return i.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), i.__panelsHostHandle = {
|
|
1498
1467
|
dispatch: t,
|
|
1499
|
-
getState: () =>
|
|
1500
|
-
getCloseLog:
|
|
1468
|
+
getState: () => l.current,
|
|
1469
|
+
getCloseLog: r
|
|
1501
1470
|
}, () => {
|
|
1502
1471
|
i.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
|
|
1503
1472
|
};
|
|
1504
|
-
}, [t,
|
|
1505
|
-
const a =
|
|
1473
|
+
}, [t, r]);
|
|
1474
|
+
const a = L(() => {
|
|
1506
1475
|
t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
1507
1476
|
}, [t]);
|
|
1508
|
-
return /* @__PURE__ */ n("div", { "data-panel-host": "true", style:
|
|
1477
|
+
return /* @__PURE__ */ n("div", { "data-panel-host": "true", style: tt, children: e.activePanelId != null && /* @__PURE__ */ n(
|
|
1509
1478
|
"div",
|
|
1510
1479
|
{
|
|
1511
1480
|
"data-panel-scrim": "true",
|
|
1512
|
-
style:
|
|
1481
|
+
style: nt,
|
|
1513
1482
|
onClick: a
|
|
1514
1483
|
}
|
|
1515
1484
|
) });
|
|
1516
1485
|
}
|
|
1517
|
-
const
|
|
1518
|
-
function
|
|
1519
|
-
const [t,
|
|
1520
|
-
return
|
|
1486
|
+
const at = 700;
|
|
1487
|
+
function st(e) {
|
|
1488
|
+
const [t, r] = x(null), l = K(null);
|
|
1489
|
+
return R(() => {
|
|
1521
1490
|
if (e != null) {
|
|
1522
|
-
|
|
1491
|
+
l.current != null && (clearTimeout(l.current), l.current = null), r(null);
|
|
1523
1492
|
return;
|
|
1524
1493
|
}
|
|
1525
|
-
return
|
|
1526
|
-
|
|
1527
|
-
},
|
|
1528
|
-
|
|
1494
|
+
return r((a) => a), l.current = setTimeout(() => {
|
|
1495
|
+
r(null), l.current = null;
|
|
1496
|
+
}, at), () => {
|
|
1497
|
+
l.current != null && (clearTimeout(l.current), l.current = null);
|
|
1529
1498
|
};
|
|
1530
|
-
}, [e]),
|
|
1531
|
-
e != null &&
|
|
1499
|
+
}, [e]), R(() => {
|
|
1500
|
+
e != null && r(e);
|
|
1532
1501
|
}, [e]), e != null ? { panelId: e, isOpen: !0 } : t != null ? { panelId: t, isOpen: !1 } : { panelId: null, isOpen: !1 };
|
|
1533
1502
|
}
|
|
1534
|
-
function
|
|
1535
|
-
const l =
|
|
1536
|
-
if (l == null) return null;
|
|
1537
|
-
const
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
"[panels] No panel component registered for activePanelId:",
|
|
1543
|
-
u
|
|
1544
|
-
), null;
|
|
1545
|
-
if (u === "settings")
|
|
1546
|
-
return /* @__PURE__ */ n($, { isOpen: r, children: s != null ? /* @__PURE__ */ n(s, { isOpen: r }) : t });
|
|
1547
|
-
if (u === "catalog-add" || u === "catalog-replace") {
|
|
1548
|
-
if (s == null) return null;
|
|
1549
|
-
const c = u === "catalog-replace" ? "replace" : "add";
|
|
1550
|
-
return /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
|
|
1551
|
-
q,
|
|
1552
|
-
{
|
|
1553
|
-
isOpen: r,
|
|
1554
|
-
onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1555
|
-
footer: null,
|
|
1556
|
-
title: c === "replace" ? "Replace metric" : "Add a metric",
|
|
1557
|
-
children: /* @__PURE__ */ n(
|
|
1558
|
-
s,
|
|
1559
|
-
{
|
|
1560
|
-
isOpen: r,
|
|
1561
|
-
footerSlot: /* @__PURE__ */ n(nt, { mode: c, dispatch: a })
|
|
1562
|
-
}
|
|
1563
|
-
)
|
|
1564
|
-
}
|
|
1565
|
-
) });
|
|
1566
|
-
}
|
|
1567
|
-
return u === "page-management" ? s == null ? null : /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
|
|
1568
|
-
q,
|
|
1569
|
-
{
|
|
1570
|
-
isOpen: r,
|
|
1571
|
-
onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1572
|
-
footer: null,
|
|
1573
|
-
title: "Manage pages",
|
|
1574
|
-
children: /* @__PURE__ */ n(s, { isOpen: r, footerSlot: /* @__PURE__ */ n(at, {}) })
|
|
1575
|
-
}
|
|
1576
|
-
) }) : /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
|
|
1577
|
-
q,
|
|
1578
|
-
{
|
|
1579
|
-
isOpen: !0,
|
|
1580
|
-
onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1581
|
-
footer: null,
|
|
1582
|
-
children: s != null ? /* @__PURE__ */ n(s, { isOpen: r }) : t
|
|
1583
|
-
}
|
|
1584
|
-
) });
|
|
1503
|
+
function Mt({ panelComponents: e, children: t }) {
|
|
1504
|
+
const r = O(), l = st(r?.state.activePanelId ?? null);
|
|
1505
|
+
if (r == null || l.panelId == null) return null;
|
|
1506
|
+
const a = l.panelId, i = l.isOpen, u = e?.[a];
|
|
1507
|
+
return u == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
|
|
1508
|
+
"[panels] No panel component registered for activePanelId:",
|
|
1509
|
+
a
|
|
1510
|
+
), null) : /* @__PURE__ */ n(xe, { isOpen: i, children: u != null ? /* @__PURE__ */ n(u, { isOpen: i }) : t });
|
|
1585
1511
|
}
|
|
1586
|
-
function
|
|
1512
|
+
function me(e) {
|
|
1587
1513
|
return e === null ? null : e.kind === "manage-pages-action" ? `global-${e.align ?? "left"}` : e.kind === "card-overflow" || e.kind === "empty-cell" ? `section-${e.sectionIndex}` : null;
|
|
1588
1514
|
}
|
|
1589
|
-
const
|
|
1590
|
-
function
|
|
1515
|
+
const rt = 685, he = 627, ot = "cubic-bezier(0.22, 1, 0.36, 1)", lt = 200;
|
|
1516
|
+
function Se(e, t) {
|
|
1591
1517
|
if (typeof window > "u") return t;
|
|
1592
|
-
const
|
|
1593
|
-
if (!
|
|
1594
|
-
const
|
|
1595
|
-
return Number.isNaN(
|
|
1518
|
+
const r = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
1519
|
+
if (!r) return t;
|
|
1520
|
+
const l = parseFloat(r);
|
|
1521
|
+
return Number.isNaN(l) ? t : r.endsWith("s") && !r.endsWith("ms") ? l * 1e3 : l;
|
|
1596
1522
|
}
|
|
1597
|
-
function
|
|
1523
|
+
function it(e, t) {
|
|
1598
1524
|
return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
1599
1525
|
}
|
|
1600
|
-
function
|
|
1526
|
+
function z(e) {
|
|
1601
1527
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1602
1528
|
}
|
|
1603
|
-
function
|
|
1604
|
-
const { mountEl: t, chromeEl:
|
|
1605
|
-
if (t == null ||
|
|
1606
|
-
|
|
1529
|
+
function ct(e) {
|
|
1530
|
+
const { mountEl: t, chromeEl: r, reducedMotion: l, onAssert: a } = e;
|
|
1531
|
+
if (t == null || r == null) {
|
|
1532
|
+
z(e), a?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
|
|
1607
1533
|
return;
|
|
1608
1534
|
}
|
|
1609
|
-
if (
|
|
1535
|
+
if (l) {
|
|
1610
1536
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), a?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
|
|
1611
1537
|
return;
|
|
1612
1538
|
}
|
|
1613
|
-
if (typeof
|
|
1614
|
-
|
|
1539
|
+
if (typeof r.animate != "function") {
|
|
1540
|
+
z(e), a?.({ branch: "slide-no-waapi", timestamp: Date.now() });
|
|
1615
1541
|
return;
|
|
1616
1542
|
}
|
|
1617
|
-
const i =
|
|
1618
|
-
i.id = "panel-chrome-frozen", i.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(i),
|
|
1619
|
-
const u =
|
|
1543
|
+
const i = r.cloneNode(!0);
|
|
1544
|
+
i.id = "panel-chrome-frozen", i.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(i), r.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1545
|
+
const u = Se("--panel-open-dur", rt), o = it("--panel-easing", ot), s = r.animate(
|
|
1620
1546
|
[{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
|
|
1621
|
-
{ duration: u, easing:
|
|
1547
|
+
{ duration: u, easing: o, fill: "forwards" }
|
|
1622
1548
|
);
|
|
1623
1549
|
s.addEventListener(
|
|
1624
1550
|
"finish",
|
|
1625
1551
|
() => {
|
|
1626
|
-
i.remove(),
|
|
1552
|
+
i.remove(), r.style.zIndex = "", s.cancel(), a?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
|
|
1627
1553
|
},
|
|
1628
1554
|
{ once: !0 }
|
|
1629
1555
|
);
|
|
1630
1556
|
}
|
|
1631
|
-
function
|
|
1632
|
-
const { mountEl: t, onAssert:
|
|
1557
|
+
function dt(e) {
|
|
1558
|
+
const { mountEl: t, onAssert: r } = e;
|
|
1633
1559
|
if (t == null) {
|
|
1634
|
-
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() =>
|
|
1560
|
+
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => z(e), he), r?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
|
|
1635
1561
|
return;
|
|
1636
1562
|
}
|
|
1637
|
-
const
|
|
1563
|
+
const l = Se("--panel-close-dur", he);
|
|
1638
1564
|
let a = !1, i = null;
|
|
1639
1565
|
const u = (s) => {
|
|
1640
|
-
s.target !== t || s.propertyName !== "max-height" || a || (a = !0, i != null && clearTimeout(i), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
1641
|
-
},
|
|
1642
|
-
a || (a = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
1566
|
+
s.target !== t || s.propertyName !== "max-height" || a || (a = !0, i != null && clearTimeout(i), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-complete", timestamp: Date.now() }));
|
|
1567
|
+
}, o = () => {
|
|
1568
|
+
a || (a = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-forced", timestamp: Date.now() }));
|
|
1643
1569
|
};
|
|
1644
|
-
t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(
|
|
1570
|
+
t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(o, l + lt);
|
|
1645
1571
|
}
|
|
1646
|
-
function
|
|
1647
|
-
const { state: t, onAssert:
|
|
1572
|
+
function ut(e) {
|
|
1573
|
+
const { state: t, onAssert: r } = e;
|
|
1648
1574
|
if (t.activePanelId && t.isDirty) {
|
|
1649
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
1575
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "blocked-dirty", timestamp: Date.now() });
|
|
1650
1576
|
return;
|
|
1651
1577
|
}
|
|
1652
|
-
const
|
|
1653
|
-
if (!!t.activePanelId &&
|
|
1654
|
-
|
|
1578
|
+
const l = me(t.activeTrigger), a = me(e.trigger);
|
|
1579
|
+
if (!!t.activePanelId && l != null && l === a) {
|
|
1580
|
+
ct(e);
|
|
1655
1581
|
return;
|
|
1656
1582
|
}
|
|
1657
1583
|
if (t.activePanelId) {
|
|
1658
|
-
|
|
1584
|
+
dt(e);
|
|
1659
1585
|
return;
|
|
1660
1586
|
}
|
|
1661
|
-
|
|
1587
|
+
z(e), r?.({ branch: "fresh-open", timestamp: Date.now() });
|
|
1662
1588
|
}
|
|
1663
|
-
function
|
|
1589
|
+
function pt() {
|
|
1664
1590
|
if (!(typeof window > "u"))
|
|
1665
1591
|
return window.__panelsAsserter;
|
|
1666
1592
|
}
|
|
1667
|
-
function
|
|
1668
|
-
const e =
|
|
1669
|
-
return
|
|
1670
|
-
(
|
|
1593
|
+
function It() {
|
|
1594
|
+
const e = O(), t = fe();
|
|
1595
|
+
return L(
|
|
1596
|
+
(r, l) => {
|
|
1671
1597
|
if (!e)
|
|
1672
1598
|
return;
|
|
1673
1599
|
const a = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, i = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
|
|
1674
|
-
panelId:
|
|
1675
|
-
trigger:
|
|
1600
|
+
panelId: r,
|
|
1601
|
+
trigger: l,
|
|
1676
1602
|
state: e.state,
|
|
1677
1603
|
dispatch: e.dispatch,
|
|
1678
1604
|
mountEl: a,
|
|
1679
1605
|
chromeEl: i,
|
|
1680
1606
|
reducedMotion: t,
|
|
1681
|
-
onAssert: (
|
|
1682
|
-
|
|
1607
|
+
onAssert: (o) => {
|
|
1608
|
+
pt()?.recordTransition?.(o);
|
|
1683
1609
|
}
|
|
1684
1610
|
};
|
|
1685
|
-
|
|
1611
|
+
ut(u);
|
|
1686
1612
|
},
|
|
1687
1613
|
[e, t]
|
|
1688
1614
|
);
|
|
1689
1615
|
}
|
|
1690
|
-
function
|
|
1616
|
+
function $t({ children: e }) {
|
|
1691
1617
|
return /* @__PURE__ */ n("div", { className: "clone-stage", children: e });
|
|
1692
1618
|
}
|
|
1693
|
-
let
|
|
1619
|
+
let H = !1, j = null;
|
|
1694
1620
|
function ne() {
|
|
1695
1621
|
const e = [];
|
|
1696
1622
|
let t = "cleaned";
|
|
1697
1623
|
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1700
|
-
const a =
|
|
1624
|
+
const l = document.querySelectorAll(".gloss-panel-mount");
|
|
1625
|
+
l.length > 1 && e.push(`mount-count=${l.length}`);
|
|
1626
|
+
const a = l[0] ?? null, i = a ? a.querySelectorAll(".gloss-panel-chrome") : [];
|
|
1701
1627
|
i.length > 1 && e.push(`chrome-count=${i.length}`);
|
|
1702
1628
|
const u = i[0] ?? null;
|
|
1703
1629
|
if (u) {
|
|
1704
1630
|
const d = u.style.zIndex;
|
|
1705
1631
|
d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
|
|
1706
1632
|
}
|
|
1707
|
-
const
|
|
1633
|
+
const o = a ? "present" : "absent", s = u ? "present" : "absent";
|
|
1708
1634
|
return {
|
|
1709
1635
|
valid: e.length === 0,
|
|
1710
|
-
mount:
|
|
1636
|
+
mount: o,
|
|
1711
1637
|
chrome: s,
|
|
1712
1638
|
frozen: t,
|
|
1713
1639
|
orphans: e,
|
|
@@ -1715,24 +1641,24 @@ function ne() {
|
|
|
1715
1641
|
};
|
|
1716
1642
|
}
|
|
1717
1643
|
const Z = "8px 8px 0px", X = "64px", J = "inset(0px 0px 60px 0px)", ee = "inset(0px -40px -40px -40px)";
|
|
1718
|
-
function _(e, t,
|
|
1719
|
-
return { id: e, constraint: t, expected:
|
|
1644
|
+
function _(e, t, r, l, a) {
|
|
1645
|
+
return { id: e, constraint: t, expected: r, actual: l, pass: a };
|
|
1720
1646
|
}
|
|
1721
|
-
function
|
|
1647
|
+
function M(e) {
|
|
1722
1648
|
const t = parseInt(e, 10);
|
|
1723
1649
|
return Number.isFinite(t) ? t : NaN;
|
|
1724
1650
|
}
|
|
1725
|
-
function
|
|
1726
|
-
const e = [], t = document.querySelector(".gloss-panel-mount"),
|
|
1651
|
+
function oe() {
|
|
1652
|
+
const e = [], t = document.querySelector(".gloss-panel-mount"), r = t?.querySelector(".gloss-panel-chrome") ?? null, l = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), a = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
|
|
1727
1653
|
if (!t)
|
|
1728
1654
|
e.push(_("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
|
|
1729
1655
|
else {
|
|
1730
|
-
const
|
|
1656
|
+
const o = getComputedStyle(t), s = o.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = o.clipPath || t.style.clipPath || "", d = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), m = d ? parseInt(d[1], 10) : NaN, h = M(s), b = Number.isFinite(m) && Number.isFinite(h) && m === h;
|
|
1731
1657
|
e.push(
|
|
1732
1658
|
_(
|
|
1733
1659
|
"C1",
|
|
1734
1660
|
"mount --reveal-y matches clip-path inset-bottom Npx",
|
|
1735
|
-
`inset(0 0 ${
|
|
1661
|
+
`inset(0 0 ${h}px 0) === --reveal-y(${h}px)`,
|
|
1736
1662
|
`--reveal-y=${s || "n/a"} clip-path=${c || "n/a"}`,
|
|
1737
1663
|
b
|
|
1738
1664
|
)
|
|
@@ -1741,7 +1667,7 @@ function re() {
|
|
|
1741
1667
|
if (!t)
|
|
1742
1668
|
e.push(_("C2", "mount padding constant", Z, "absent", !1));
|
|
1743
1669
|
else {
|
|
1744
|
-
const
|
|
1670
|
+
const o = t.style.padding, s = getComputedStyle(t), c = o || s.padding || "", d = c === Z || c === "8px 8px 0px 8px";
|
|
1745
1671
|
e.push(_("C2", "mount padding constant", Z, c || "n/a", d));
|
|
1746
1672
|
}
|
|
1747
1673
|
if (!t)
|
|
@@ -1750,48 +1676,48 @@ function re() {
|
|
|
1750
1676
|
const s = getComputedStyle(t).bottom || t.style.bottom || "", c = s === X;
|
|
1751
1677
|
e.push(_("C3", "mount.bottom resolves to var(--tb-h)=64px", X, s || "n/a", c));
|
|
1752
1678
|
}
|
|
1753
|
-
if (!
|
|
1679
|
+
if (!r)
|
|
1754
1680
|
e.push(_("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
|
|
1755
1681
|
else {
|
|
1756
|
-
const
|
|
1757
|
-
|
|
1758
|
-
), c =
|
|
1759
|
-
|
|
1760
|
-
), d = s * 3 + c * 3 - 8,
|
|
1682
|
+
const o = getComputedStyle(r), s = M(
|
|
1683
|
+
o.getPropertyValue("--row-h").trim() || r.style.getPropertyValue("--row-h").trim() || "0"
|
|
1684
|
+
), c = M(
|
|
1685
|
+
o.getPropertyValue("--row-gap").trim() || r.style.getPropertyValue("--row-gap").trim() || "0"
|
|
1686
|
+
), d = s * 3 + c * 3 - 8, m = M(o.height || r.style.height || ""), h = Number.isFinite(s) && Number.isFinite(c) && Number.isFinite(m) && Number.isFinite(d) && m === d;
|
|
1761
1687
|
e.push(
|
|
1762
1688
|
_(
|
|
1763
1689
|
"C4",
|
|
1764
1690
|
"panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
|
|
1765
1691
|
`${d}px (rh=${s} rg=${c})`,
|
|
1766
|
-
`${
|
|
1767
|
-
|
|
1692
|
+
`${m}px`,
|
|
1693
|
+
h
|
|
1768
1694
|
)
|
|
1769
1695
|
);
|
|
1770
1696
|
}
|
|
1771
|
-
if (!
|
|
1697
|
+
if (!l || !r)
|
|
1772
1698
|
e.push(
|
|
1773
1699
|
_(
|
|
1774
1700
|
"C5",
|
|
1775
1701
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1776
1702
|
"present",
|
|
1777
|
-
`coordinator=${
|
|
1703
|
+
`coordinator=${l ? "present" : "absent"} chrome=${r ? "present" : "absent"}`,
|
|
1778
1704
|
!1
|
|
1779
1705
|
)
|
|
1780
1706
|
);
|
|
1781
1707
|
else {
|
|
1782
|
-
const
|
|
1708
|
+
const o = getComputedStyle(l), s = getComputedStyle(r), c = o.perspective || l.style.perspective || "", d = (o.perspectiveOrigin || l.style.perspectiveOrigin || "").trim(), m = s.perspectiveStyle || r.style.perspectiveStyle || "", y = c !== "" && c !== "none" && (d === "center bottom" || d === "50% 100%") && m === "flat";
|
|
1783
1709
|
e.push(
|
|
1784
1710
|
_(
|
|
1785
1711
|
"C5",
|
|
1786
1712
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1787
1713
|
"perspective:not-none, origin:center bottom, chrome-style:flat",
|
|
1788
|
-
`perspective=${c} origin=${d} chrome-style=${
|
|
1789
|
-
|
|
1714
|
+
`perspective=${c} origin=${d} chrome-style=${m}`,
|
|
1715
|
+
y
|
|
1790
1716
|
)
|
|
1791
1717
|
);
|
|
1792
1718
|
}
|
|
1793
1719
|
{
|
|
1794
|
-
let
|
|
1720
|
+
let o = !1, s = "absent";
|
|
1795
1721
|
try {
|
|
1796
1722
|
for (const c of Array.from(document.styleSheets)) {
|
|
1797
1723
|
let d = [];
|
|
@@ -1800,10 +1726,10 @@ function re() {
|
|
|
1800
1726
|
} catch {
|
|
1801
1727
|
continue;
|
|
1802
1728
|
}
|
|
1803
|
-
for (const
|
|
1804
|
-
if (
|
|
1805
|
-
const b = Array.from(
|
|
1806
|
-
|
|
1729
|
+
for (const m of d)
|
|
1730
|
+
if (m.name === "stage-spin") {
|
|
1731
|
+
const b = Array.from(m.cssRules), p = b.find((N) => N.keyText === "0%" || N.keyText === "from"), y = b.find((N) => N.keyText === "100%" || N.keyText === "to"), E = p?.style.transform ?? "", T = y?.style.transform ?? "", v = /rotateY\(\s*0(?:deg)?\s*\)/;
|
|
1732
|
+
o = v.test(E) && v.test(T), s = `0%=${E || "n/a"} 100%=${T || "n/a"}`;
|
|
1807
1733
|
break;
|
|
1808
1734
|
}
|
|
1809
1735
|
if (s !== "absent") break;
|
|
@@ -1817,12 +1743,12 @@ function re() {
|
|
|
1817
1743
|
"@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
|
|
1818
1744
|
"both frames rotateY(0)",
|
|
1819
1745
|
s,
|
|
1820
|
-
|
|
1746
|
+
o
|
|
1821
1747
|
)
|
|
1822
1748
|
);
|
|
1823
1749
|
}
|
|
1824
1750
|
{
|
|
1825
|
-
const
|
|
1751
|
+
const o = document.documentElement, s = getComputedStyle(o), c = s.getPropertyValue("--panel-open-dur").trim() || o.style.getPropertyValue("--panel-open-dur").trim(), d = s.getPropertyValue("--panel-close-dur").trim() || o.style.getPropertyValue("--panel-close-dur").trim(), m = M(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), h = M(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), b = Number.isFinite(m) && Number.isFinite(h) && m > h;
|
|
1826
1752
|
e.push(
|
|
1827
1753
|
_("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${d || "n/a"}`, b)
|
|
1828
1754
|
);
|
|
@@ -1830,7 +1756,7 @@ function re() {
|
|
|
1830
1756
|
if (!a)
|
|
1831
1757
|
e.push(_("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
|
|
1832
1758
|
else {
|
|
1833
|
-
const
|
|
1759
|
+
const o = getComputedStyle(a), s = o.animationName || "", c = o.transitionProperty || "", d = (s === "" || s === "none") && (c === "" || c === "none" || c === "all");
|
|
1834
1760
|
e.push(
|
|
1835
1761
|
_(
|
|
1836
1762
|
"C8",
|
|
@@ -1844,33 +1770,33 @@ function re() {
|
|
|
1844
1770
|
if (!t)
|
|
1845
1771
|
e.push(_("C9", "mount closed-state clipPath", J, "absent", !1));
|
|
1846
1772
|
else {
|
|
1847
|
-
const
|
|
1773
|
+
const o = t.style.clipPath, s = getComputedStyle(t), c = o || s.clipPath || "", d = c === J;
|
|
1848
1774
|
e.push(_("C9", "mount closed-state clipPath", J, c || "n/a", d));
|
|
1849
1775
|
}
|
|
1850
1776
|
if (!i)
|
|
1851
1777
|
e.push(_("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
|
|
1852
1778
|
else {
|
|
1853
|
-
const
|
|
1779
|
+
const o = i.parentElement, s = o === document.body;
|
|
1854
1780
|
e.push(
|
|
1855
1781
|
_(
|
|
1856
1782
|
"C10",
|
|
1857
1783
|
"bell-popover parentElement === document.body (open)",
|
|
1858
1784
|
"body",
|
|
1859
|
-
|
|
1785
|
+
o === document.body ? "body" : o?.tagName ?? "n/a",
|
|
1860
1786
|
s
|
|
1861
1787
|
)
|
|
1862
1788
|
);
|
|
1863
1789
|
}
|
|
1864
|
-
if (!
|
|
1790
|
+
if (!l)
|
|
1865
1791
|
e.push(_("C11", "coordinator overflow === visible", "visible", "absent", !1));
|
|
1866
1792
|
else {
|
|
1867
|
-
const s = getComputedStyle(
|
|
1793
|
+
const s = getComputedStyle(l).overflow || l.style.overflow || "", c = s === "visible";
|
|
1868
1794
|
e.push(_("C11", "coordinator overflow === visible", "visible", s || "n/a", c));
|
|
1869
1795
|
}
|
|
1870
1796
|
if (!u)
|
|
1871
1797
|
e.push(_("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, "absent", !1));
|
|
1872
1798
|
else {
|
|
1873
|
-
const
|
|
1799
|
+
const o = u.style.clipPath, s = getComputedStyle(u), c = o || s.clipPath || "", d = c === ee;
|
|
1874
1800
|
e.push(_("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, c || "n/a", d));
|
|
1875
1801
|
}
|
|
1876
1802
|
return e.push(
|
|
@@ -1891,10 +1817,10 @@ function re() {
|
|
|
1891
1817
|
)
|
|
1892
1818
|
), e;
|
|
1893
1819
|
}
|
|
1894
|
-
function
|
|
1895
|
-
return
|
|
1820
|
+
function mt(e) {
|
|
1821
|
+
return oe().find((t) => t.id === e);
|
|
1896
1822
|
}
|
|
1897
|
-
function
|
|
1823
|
+
function ht() {
|
|
1898
1824
|
const e = ne();
|
|
1899
1825
|
return { q12: [
|
|
1900
1826
|
{
|
|
@@ -1904,83 +1830,84 @@ function vt() {
|
|
|
1904
1830
|
actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
|
|
1905
1831
|
pass: e.valid
|
|
1906
1832
|
}
|
|
1907
|
-
], cc:
|
|
1833
|
+
], cc: oe() };
|
|
1908
1834
|
}
|
|
1909
|
-
function
|
|
1835
|
+
function ft() {
|
|
1910
1836
|
return {
|
|
1911
|
-
enable:
|
|
1912
|
-
disable:
|
|
1913
|
-
isEnabled: () =>
|
|
1837
|
+
enable: gt,
|
|
1838
|
+
disable: bt,
|
|
1839
|
+
isEnabled: () => H,
|
|
1914
1840
|
getLastReport: () => j,
|
|
1915
1841
|
recordTransition: (e) => {
|
|
1916
|
-
|
|
1842
|
+
H && (j = { ...e, ...ne() });
|
|
1917
1843
|
},
|
|
1918
1844
|
assertOnce: () => {
|
|
1919
1845
|
const e = ne();
|
|
1920
1846
|
return j = e, e;
|
|
1921
1847
|
},
|
|
1922
|
-
assertCcOnly:
|
|
1923
|
-
getCcRowById:
|
|
1924
|
-
assertPanelTruths:
|
|
1848
|
+
assertCcOnly: oe,
|
|
1849
|
+
getCcRowById: mt,
|
|
1850
|
+
assertPanelTruths: ht
|
|
1925
1851
|
};
|
|
1926
1852
|
}
|
|
1927
|
-
function
|
|
1928
|
-
if (
|
|
1929
|
-
window.__panelsAsserter || (window.__panelsAsserter =
|
|
1853
|
+
function gt() {
|
|
1854
|
+
if (H = !0, typeof window > "u") return;
|
|
1855
|
+
window.__panelsAsserter || (window.__panelsAsserter = ft(), console.info(
|
|
1930
1856
|
"[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
|
|
1931
1857
|
));
|
|
1932
1858
|
}
|
|
1933
|
-
function
|
|
1934
|
-
|
|
1859
|
+
function bt() {
|
|
1860
|
+
H = !1;
|
|
1935
1861
|
}
|
|
1936
1862
|
export {
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1863
|
+
Ut as COMMITS,
|
|
1864
|
+
At as CatalogAddShell,
|
|
1865
|
+
xt as CatalogFooter,
|
|
1866
|
+
kt as CatalogReplaceShell,
|
|
1941
1867
|
se as CatalogStateContext,
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1868
|
+
He as CloneCard,
|
|
1869
|
+
$t as CloneStage,
|
|
1870
|
+
ye as MOCK_DEFAULT_LENS,
|
|
1871
|
+
ve as MOCK_LENSES,
|
|
1946
1872
|
ae as MOCK_LENS_META,
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1873
|
+
et as MOCK_PAGES,
|
|
1874
|
+
_e as MOCK_TILES_BY_LENS,
|
|
1875
|
+
zt as NotificationCenterShell,
|
|
1876
|
+
Lt as PANEL_IDS,
|
|
1877
|
+
Je as PageMgmtFooter,
|
|
1878
|
+
Dt as PageMgmtShell,
|
|
1879
|
+
Ne as PageMgmtStateContext,
|
|
1880
|
+
Ht as PanelBody,
|
|
1881
|
+
Vt as PanelChrome,
|
|
1882
|
+
V as PanelChromeV2,
|
|
1883
|
+
Bt as PanelFooter,
|
|
1884
|
+
Et as PanelFooterMessage,
|
|
1885
|
+
Kt as PanelHeader,
|
|
1959
1886
|
Yt as PanelHost,
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1887
|
+
Ot as PanelHostShell,
|
|
1888
|
+
xe as PanelMount,
|
|
1889
|
+
Wt as PanelNavigation,
|
|
1890
|
+
Gt as PanelProvider,
|
|
1891
|
+
Mt as PanelSlot,
|
|
1892
|
+
Qt as PanelStage,
|
|
1893
|
+
Pt as SettingsShell,
|
|
1894
|
+
oe as assertCcOnly,
|
|
1968
1895
|
ne as assertPanelDomShape,
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1896
|
+
ht as assertPanelTruths,
|
|
1897
|
+
qt as deriveSurfaceState,
|
|
1898
|
+
bt as disablePanelAsserter,
|
|
1899
|
+
gt as enablePanelAsserter,
|
|
1900
|
+
mt as getCcRowById,
|
|
1901
|
+
jt as initialState,
|
|
1902
|
+
me as positionKey,
|
|
1903
|
+
Zt as reducer,
|
|
1904
|
+
ut as transitionToPanel,
|
|
1905
|
+
re as useCatalogState,
|
|
1906
|
+
wt as useEditingCardId,
|
|
1907
|
+
Te as usePageMgmtState,
|
|
1908
|
+
Pe as usePanelContext,
|
|
1909
|
+
O as usePanelContextOptional,
|
|
1910
|
+
Xt as usePanelCoordinator,
|
|
1911
|
+
fe as useReducedMotionPanel,
|
|
1912
|
+
It as useTransitionToPanel
|
|
1986
1913
|
};
|