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