@mt-gloss/ui 0.1.109 → 0.1.111
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/composites-panels.js +670 -551
- package/lib/composites/panels/shells/CatalogAddShell.d.ts +4 -2
- package/lib/composites/panels/shells/CatalogReplaceShell.d.ts +4 -2
- package/lib/composites/panels/shells/internals/CatalogTileGrid.d.ts +15 -1
- package/lib/composites/panels/shells/internals/catalog-mocks.d.ts +78 -0
- package/package.json +1 -1
- package/ui.css +1 -1
package/composites-panels.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { C as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import B, { useState as
|
|
5
|
-
import { useSensors as
|
|
6
|
-
import { sortableKeyboardCoordinates as
|
|
7
|
-
import { CSS as
|
|
8
|
-
import { M as
|
|
1
|
+
import { u as L, f as J, S as fe, a as ge, g as E, c as k } from "./COMMITS-DG0Q_9DU.js";
|
|
2
|
+
import { C as Pt, b as xt, P as At, e as Et, i as kt, r as Dt, d as Ot } from "./COMMITS-DG0Q_9DU.js";
|
|
3
|
+
import { jsx as s, jsxs as h, Fragment as Z } from "react/jsx-runtime";
|
|
4
|
+
import B, { useState as T, useRef as I, createContext as ee, useContext as te, useMemo as W, useEffect as A, useCallback as x, useLayoutEffect as be } from "react";
|
|
5
|
+
import { useSensors as ye, useSensor as G, PointerSensor as ve, KeyboardSensor as Ce, DndContext as Se, closestCenter as Te } from "@dnd-kit/core";
|
|
6
|
+
import { sortableKeyboardCoordinates as _e, SortableContext as we, horizontalListSortingStrategy as Ne, arrayMove as Pe, useSortable as xe } from "@dnd-kit/sortable";
|
|
7
|
+
import { CSS as Ae } from "@dnd-kit/utilities";
|
|
8
|
+
import { M as Q } from "./MetricCard-Cyoxhb_S.js";
|
|
9
9
|
function ft() {
|
|
10
|
-
const e =
|
|
10
|
+
const e = L();
|
|
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
|
-
return /* @__PURE__ */
|
|
15
|
+
function Ee({ children: e }) {
|
|
16
|
+
return /* @__PURE__ */ s("div", { className: "clone-stage", children: e });
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */
|
|
18
|
+
function ke({ span: e, rotating: t = !0, children: l }) {
|
|
19
|
+
const i = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = l != null ? "full" : "fallback";
|
|
20
|
+
return /* @__PURE__ */ s("div", { className: i, "data-clone-fidelity": n, children: l });
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function De({ value: e, onChange: t }) {
|
|
23
23
|
return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
|
|
24
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
|
|
25
25
|
/* @__PURE__ */ h("div", { className: "settings-shell__slider-row", children: [
|
|
26
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ s(
|
|
27
27
|
"input",
|
|
28
28
|
{
|
|
29
29
|
id: "settings-threshold-input",
|
|
@@ -46,11 +46,11 @@ function Le({ value: e, onChange: t }) {
|
|
|
46
46
|
] })
|
|
47
47
|
] });
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Oe({ value: e, onChange: t }) {
|
|
50
50
|
return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
|
|
52
52
|
/* @__PURE__ */ h("div", { className: "settings-shell__slider-row", children: [
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ s(
|
|
54
54
|
"input",
|
|
55
55
|
{
|
|
56
56
|
id: "settings-timeframe-input",
|
|
@@ -73,32 +73,32 @@ function ke({ value: e, onChange: t }) {
|
|
|
73
73
|
] })
|
|
74
74
|
] });
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
const { attributes:
|
|
78
|
-
transform:
|
|
76
|
+
function Le({ id: e, onRemove: t }) {
|
|
77
|
+
const { attributes: l, listeners: i, setNodeRef: n, transform: c, transition: u, isDragging: r } = xe({ id: e }), a = {
|
|
78
|
+
transform: Ae.Transform.toString(c),
|
|
79
79
|
transition: u,
|
|
80
|
-
opacity:
|
|
80
|
+
opacity: r ? 0.6 : 1
|
|
81
81
|
};
|
|
82
82
|
return /* @__PURE__ */ h(
|
|
83
83
|
"li",
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
86
|
-
style:
|
|
87
|
-
className: `settings-shell__slot-pill${
|
|
85
|
+
ref: n,
|
|
86
|
+
style: a,
|
|
87
|
+
className: `settings-shell__slot-pill${r ? " settings-shell__slot-pill--dragging" : ""}`,
|
|
88
88
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ s(
|
|
90
90
|
"button",
|
|
91
91
|
{
|
|
92
92
|
type: "button",
|
|
93
93
|
className: "settings-shell__slot-pill__handle",
|
|
94
94
|
"aria-label": `Reorder ${e}`,
|
|
95
|
-
...
|
|
96
|
-
...
|
|
97
|
-
children: /* @__PURE__ */
|
|
95
|
+
...l,
|
|
96
|
+
...i,
|
|
97
|
+
children: /* @__PURE__ */ s("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
|
|
98
98
|
}
|
|
99
99
|
),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__slot-pill__label", children: e }),
|
|
101
|
+
/* @__PURE__ */ s(
|
|
102
102
|
"button",
|
|
103
103
|
{
|
|
104
104
|
type: "button",
|
|
@@ -112,42 +112,42 @@ function Ie({ id: e, onRemove: t }) {
|
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
),
|
|
120
|
-
const { active: u, over:
|
|
121
|
-
if (!
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
t(e.filter((u) => u !==
|
|
115
|
+
function Ie({ value: e, onChange: t }) {
|
|
116
|
+
const l = ye(
|
|
117
|
+
G(ve, { activationConstraint: { distance: 4 } }),
|
|
118
|
+
G(Ce, { coordinateGetter: _e })
|
|
119
|
+
), i = (c) => {
|
|
120
|
+
const { active: u, over: r } = c;
|
|
121
|
+
if (!r || u.id === r.id) return;
|
|
122
|
+
const a = e.findIndex((d) => d === u.id), o = e.findIndex((d) => d === r.id);
|
|
123
|
+
a === -1 || o === -1 || t(Pe([...e], a, o));
|
|
124
|
+
}, n = (c) => {
|
|
125
|
+
t(e.filter((u) => u !== c));
|
|
126
126
|
};
|
|
127
127
|
return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
e.length === 0 && /* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Stack slots" }),
|
|
129
|
+
/* @__PURE__ */ s(Se, { sensors: l, collisionDetection: Te, onDragEnd: i, children: /* @__PURE__ */ s(we, { items: [...e], strategy: Ne, children: /* @__PURE__ */ s("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((c) => /* @__PURE__ */ s(Le, { id: c, onRemove: () => n(c) }, c)) }) }) }),
|
|
130
|
+
e.length === 0 && /* @__PURE__ */ s("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
|
|
131
|
+
/* @__PURE__ */ s("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
|
|
132
132
|
] });
|
|
133
133
|
}
|
|
134
134
|
const Me = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
|
|
135
135
|
function $e({ value: e, onSelect: t }) {
|
|
136
136
|
return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
const
|
|
140
|
-
return /* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Accent color" }),
|
|
138
|
+
/* @__PURE__ */ s("div", { className: "settings-shell__swatch-row", children: Me.map((l) => {
|
|
139
|
+
const i = e === l;
|
|
140
|
+
return /* @__PURE__ */ s(
|
|
141
141
|
"button",
|
|
142
142
|
{
|
|
143
143
|
type: "button",
|
|
144
|
-
"aria-pressed":
|
|
145
|
-
"aria-label": `Accent ${
|
|
146
|
-
className: `settings-shell__swatch${
|
|
147
|
-
style: { backgroundColor:
|
|
148
|
-
onClick: () => t(
|
|
144
|
+
"aria-pressed": i,
|
|
145
|
+
"aria-label": `Accent ${l}`,
|
|
146
|
+
className: `settings-shell__swatch${i ? " settings-shell__swatch--active" : ""}`,
|
|
147
|
+
style: { backgroundColor: l },
|
|
148
|
+
onClick: () => t(l)
|
|
149
149
|
},
|
|
150
|
-
|
|
150
|
+
l
|
|
151
151
|
);
|
|
152
152
|
}) })
|
|
153
153
|
] });
|
|
@@ -156,37 +156,37 @@ const Re = ["Orders", "Quota", "Unassigned"], Fe = ["threshold", "timeframe", "c
|
|
|
156
156
|
function gt({
|
|
157
157
|
isOpen: e,
|
|
158
158
|
cardSpan: t,
|
|
159
|
-
cardLabel:
|
|
160
|
-
cardValue:
|
|
161
|
-
previewSlot:
|
|
162
|
-
dimensions:
|
|
159
|
+
cardLabel: l = "Metric",
|
|
160
|
+
cardValue: i = "—",
|
|
161
|
+
previewSlot: n,
|
|
162
|
+
dimensions: c = Fe,
|
|
163
163
|
initialTab: u,
|
|
164
|
-
initialValues:
|
|
164
|
+
initialValues: r
|
|
165
165
|
}) {
|
|
166
|
-
const
|
|
166
|
+
const a = L(), o = a?.state.activeTrigger, d = o?.kind === "card-overflow" ? o.cardId : null, p = J(), m = o?.span, f = t ?? m ?? 1, C = c[0] ?? "threshold", [b, S] = B.useState(u ?? C);
|
|
167
167
|
B.useEffect(() => {
|
|
168
|
-
|
|
169
|
-
}, [
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
}, pe = (
|
|
173
|
-
|
|
174
|
-
}, me = (
|
|
175
|
-
|
|
176
|
-
}, he = (
|
|
177
|
-
|
|
168
|
+
c.includes(b) || S(C);
|
|
169
|
+
}, [c, b, C]);
|
|
170
|
+
const v = d != null ? a?.state?.bufferByCard?.[d]?.changes ?? {} : {}, y = typeof v.threshold == "number" ? v.threshold : typeof r?.threshold == "number" ? r.threshold : 80, P = typeof v.timeframe == "number" ? v.timeframe : typeof r?.timeframe == "number" ? r.timeframe : 30, ce = typeof v.accent == "string" ? v.accent : typeof r?.accent == "string" ? r.accent : null, de = Array.isArray(v.slots) ? v.slots : Array.isArray(r?.slots) ? r.slots : Re, ue = (_) => {
|
|
171
|
+
d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(_.target.value) });
|
|
172
|
+
}, pe = (_) => {
|
|
173
|
+
d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(_.target.value) });
|
|
174
|
+
}, me = (_) => {
|
|
175
|
+
d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: _ });
|
|
176
|
+
}, he = (_) => {
|
|
177
|
+
d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: _ });
|
|
178
178
|
};
|
|
179
179
|
return /* @__PURE__ */ h("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ s("div", { "aria-hidden": "true", children: /* @__PURE__ */ s(Ee, { children: /* @__PURE__ */ s(ke, { span: f, rotating: !p, children: n ?? /* @__PURE__ */ h(Z, { children: [
|
|
181
|
+
/* @__PURE__ */ s("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: l }),
|
|
182
|
+
/* @__PURE__ */ s("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: i })
|
|
183
183
|
] }) }) }) }),
|
|
184
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ s(
|
|
185
185
|
fe,
|
|
186
186
|
{
|
|
187
|
-
dimensions:
|
|
187
|
+
dimensions: c,
|
|
188
188
|
activeTab: b,
|
|
189
|
-
onSelect:
|
|
189
|
+
onSelect: S,
|
|
190
190
|
reduced: p
|
|
191
191
|
}
|
|
192
192
|
),
|
|
@@ -199,16 +199,16 @@ function gt({
|
|
|
199
199
|
tabIndex: 0,
|
|
200
200
|
className: "settings-shell__tabpanel",
|
|
201
201
|
children: [
|
|
202
|
-
b === "threshold" && /* @__PURE__ */
|
|
203
|
-
b === "timeframe" && /* @__PURE__ */
|
|
204
|
-
b === "slots" && /* @__PURE__ */
|
|
205
|
-
b === "color" && /* @__PURE__ */
|
|
202
|
+
b === "threshold" && /* @__PURE__ */ s(De, { value: y, onChange: ue }),
|
|
203
|
+
b === "timeframe" && /* @__PURE__ */ s(Oe, { value: P, onChange: pe }),
|
|
204
|
+
b === "slots" && /* @__PURE__ */ s(Ie, { value: de, onChange: he }),
|
|
205
|
+
b === "color" && /* @__PURE__ */ s($e, { value: ce, onSelect: me })
|
|
206
206
|
]
|
|
207
207
|
}
|
|
208
208
|
)
|
|
209
209
|
] });
|
|
210
210
|
}
|
|
211
|
-
const
|
|
211
|
+
const ne = [
|
|
212
212
|
"Overbought",
|
|
213
213
|
"What's selling",
|
|
214
214
|
"On track vs plan",
|
|
@@ -216,7 +216,7 @@ const te = [
|
|
|
216
216
|
"Vendor performance",
|
|
217
217
|
"Assortment mix",
|
|
218
218
|
"Customer retention"
|
|
219
|
-
],
|
|
219
|
+
], ae = "Overbought", z = {
|
|
220
220
|
Overbought: {
|
|
221
221
|
headline: "Am I overbought?",
|
|
222
222
|
helper: "Find slow-moving inventory before discount cycles eat margin."
|
|
@@ -257,14 +257,16 @@ const se = {
|
|
|
257
257
|
desc: "Inventory units flagged as overbought relative to forward demand.",
|
|
258
258
|
variants: ["1×1"],
|
|
259
259
|
startHere: !0,
|
|
260
|
-
isNew: !0
|
|
260
|
+
isNew: !0,
|
|
261
|
+
cardType: "standard"
|
|
261
262
|
},
|
|
262
263
|
{
|
|
263
264
|
id: "ob-weeks-of-supply",
|
|
264
265
|
label: "Weeks of supply",
|
|
265
266
|
value: "18.4",
|
|
266
267
|
desc: "Weighted average weeks of forward cover across the assortment.",
|
|
267
|
-
variants: ["1×1"]
|
|
268
|
+
variants: ["1×1"],
|
|
269
|
+
cardType: "standard"
|
|
268
270
|
},
|
|
269
271
|
{
|
|
270
272
|
id: "ob-discount-exposure",
|
|
@@ -276,7 +278,9 @@ const se = {
|
|
|
276
278
|
{ label: "MTD", value: "$48K" },
|
|
277
279
|
{ label: "QTD", value: "$112K" },
|
|
278
280
|
{ label: "YTD", value: "$184K" }
|
|
279
|
-
]
|
|
281
|
+
],
|
|
282
|
+
cardType: "stacked-group",
|
|
283
|
+
stackedTimeframes: ["MTD", "QTD", "YTD"]
|
|
280
284
|
}
|
|
281
285
|
],
|
|
282
286
|
secondary: [
|
|
@@ -284,7 +288,8 @@ const se = {
|
|
|
284
288
|
id: "ob-sku-coverage",
|
|
285
289
|
label: "SKUs over plan",
|
|
286
290
|
value: "342",
|
|
287
|
-
desc: "SKUs exceeding planned forward cover."
|
|
291
|
+
desc: "SKUs exceeding planned forward cover.",
|
|
292
|
+
cardType: "standard"
|
|
288
293
|
},
|
|
289
294
|
{
|
|
290
295
|
id: "ob-vendor-share",
|
|
@@ -292,7 +297,10 @@ const se = {
|
|
|
292
297
|
value: "38%",
|
|
293
298
|
desc: "Share of overbought inventory concentrated in the top vendor.",
|
|
294
299
|
donut: !0,
|
|
295
|
-
accent: "#7c3aed"
|
|
300
|
+
accent: "#7c3aed",
|
|
301
|
+
cardType: "donut",
|
|
302
|
+
donutValue: 0.38,
|
|
303
|
+
accentColor: "#7c3aed"
|
|
296
304
|
}
|
|
297
305
|
]
|
|
298
306
|
},
|
|
@@ -303,14 +311,17 @@ const se = {
|
|
|
303
311
|
label: "Top SKU",
|
|
304
312
|
value: "SKU-9241",
|
|
305
313
|
desc: "Highest-velocity SKU over the trailing 7 days.",
|
|
306
|
-
startHere: !0
|
|
314
|
+
startHere: !0,
|
|
315
|
+
cardType: "name"
|
|
307
316
|
},
|
|
308
317
|
{
|
|
309
318
|
id: "ws-velocity",
|
|
310
319
|
label: "Velocity Δ",
|
|
311
320
|
value: "+12.4%",
|
|
312
321
|
desc: "Rolling 7-day velocity change versus the prior comparable period.",
|
|
313
|
-
variants: ["1×1"]
|
|
322
|
+
variants: ["1×1"],
|
|
323
|
+
cardType: "sparkline",
|
|
324
|
+
sparklineData: [10, 12, 15, 14, 18, 21, 19, 23, 25, 28]
|
|
314
325
|
},
|
|
315
326
|
{
|
|
316
327
|
id: "ws-sellthrough",
|
|
@@ -324,7 +335,9 @@ const se = {
|
|
|
324
335
|
{ label: "LYTD", value: "62%" },
|
|
325
336
|
{ label: "7D", value: "74%" }
|
|
326
337
|
],
|
|
327
|
-
desc: "Sell-through across multiple windows."
|
|
338
|
+
desc: "Sell-through across multiple windows.",
|
|
339
|
+
cardType: "stacked-group",
|
|
340
|
+
stackedTimeframes: ["MTD", "QTD", "YTD", "LYTD", "7D"]
|
|
328
341
|
}
|
|
329
342
|
],
|
|
330
343
|
secondary: [
|
|
@@ -333,7 +346,9 @@ const se = {
|
|
|
333
346
|
label: "New arrival lift",
|
|
334
347
|
value: "+8.1%",
|
|
335
348
|
desc: "Velocity boost from new-arrival SKUs versus the assortment mean.",
|
|
336
|
-
isNew: !0
|
|
349
|
+
isNew: !0,
|
|
350
|
+
cardType: "sparkline",
|
|
351
|
+
sparklineData: [3, 4, 5, 6, 6, 7, 8, 8]
|
|
337
352
|
}
|
|
338
353
|
]
|
|
339
354
|
},
|
|
@@ -346,7 +361,10 @@ const se = {
|
|
|
346
361
|
desc: "Revenue pace versus plan, period-to-date.",
|
|
347
362
|
donut: !0,
|
|
348
363
|
accent: "#16a34a",
|
|
349
|
-
startHere: !0
|
|
364
|
+
startHere: !0,
|
|
365
|
+
cardType: "donut",
|
|
366
|
+
donutValue: 1.02,
|
|
367
|
+
accentColor: "#16a34a"
|
|
350
368
|
},
|
|
351
369
|
{
|
|
352
370
|
id: "pl-units-pace",
|
|
@@ -354,7 +372,10 @@ const se = {
|
|
|
354
372
|
value: "94%",
|
|
355
373
|
desc: "Units pace versus plan, period-to-date.",
|
|
356
374
|
donut: !0,
|
|
357
|
-
accent: "#f59e0b"
|
|
375
|
+
accent: "#f59e0b",
|
|
376
|
+
cardType: "donut",
|
|
377
|
+
donutValue: 0.94,
|
|
378
|
+
accentColor: "#f59e0b"
|
|
358
379
|
},
|
|
359
380
|
{
|
|
360
381
|
id: "pl-margin-pace",
|
|
@@ -366,87 +387,129 @@ const se = {
|
|
|
366
387
|
{ label: "QTD", value: "37.9%" },
|
|
367
388
|
{ label: "YTD", value: "38.1%" }
|
|
368
389
|
],
|
|
369
|
-
desc: "Gross margin pace across multiple windows."
|
|
390
|
+
desc: "Gross margin pace across multiple windows.",
|
|
391
|
+
cardType: "stacked-group",
|
|
392
|
+
stackedTimeframes: ["MTD", "QTD", "YTD"]
|
|
370
393
|
},
|
|
371
394
|
// PHASE 17 D1 — agency-revenue port (J1) + commission-economics port (J6)
|
|
372
395
|
{
|
|
373
396
|
id: "agency-sales",
|
|
374
397
|
label: "Sales",
|
|
375
398
|
value: "$892,450",
|
|
376
|
-
desc: "Agency total sales with trend sparkline"
|
|
399
|
+
desc: "Agency total sales with trend sparkline",
|
|
400
|
+
cardType: "sparkline",
|
|
401
|
+
sparklineData: [620, 640, 680, 700, 740, 760, 790, 820, 850, 892],
|
|
402
|
+
prefix: "$"
|
|
377
403
|
},
|
|
378
404
|
{
|
|
379
405
|
id: "agency-commission",
|
|
380
406
|
label: "Commissions",
|
|
381
407
|
value: "$133,868",
|
|
382
|
-
desc: "Total commission earned by the agency"
|
|
408
|
+
desc: "Total commission earned by the agency",
|
|
409
|
+
cardType: "standard",
|
|
410
|
+
prefix: "$"
|
|
383
411
|
},
|
|
384
412
|
{
|
|
385
413
|
id: "agency-growth",
|
|
386
414
|
label: "Sales Growth",
|
|
387
415
|
value: "+18%",
|
|
388
|
-
desc: "Year-over-year agency sales growth rate"
|
|
416
|
+
desc: "Year-over-year agency sales growth rate",
|
|
417
|
+
cardType: "standard",
|
|
418
|
+
suffix: "%",
|
|
419
|
+
trend: { value: 18, direction: "up" }
|
|
389
420
|
},
|
|
390
421
|
{
|
|
391
422
|
id: "agency-aov",
|
|
392
423
|
label: "Avg Order",
|
|
393
424
|
value: "$2,340",
|
|
394
|
-
desc: "Average order value with trend sparkline"
|
|
425
|
+
desc: "Average order value with trend sparkline",
|
|
426
|
+
cardType: "sparkline",
|
|
427
|
+
sparklineData: [2100, 2150, 2200, 2180, 2250, 2280, 2300, 2320, 2335, 2340],
|
|
428
|
+
prefix: "$"
|
|
395
429
|
},
|
|
396
430
|
{
|
|
397
431
|
id: "agency-conversion",
|
|
398
432
|
label: "Conversion",
|
|
399
433
|
value: "68%",
|
|
400
|
-
desc: "Order completion rate vs cancellations"
|
|
434
|
+
desc: "Order completion rate vs cancellations",
|
|
435
|
+
cardType: "donut",
|
|
436
|
+
donutValue: 0.68,
|
|
437
|
+
accentColor: "#10b981",
|
|
438
|
+
suffix: "%"
|
|
401
439
|
},
|
|
402
440
|
{
|
|
403
441
|
id: "agency-revenue-compact",
|
|
404
442
|
label: "Total Revenue",
|
|
405
443
|
value: "$892,450",
|
|
406
|
-
desc: "Agency revenue with sparkline trend"
|
|
444
|
+
desc: "Agency revenue with sparkline trend",
|
|
445
|
+
cardType: "sparkline",
|
|
446
|
+
sparklineData: [620, 660, 700, 740, 780, 820, 860, 892],
|
|
447
|
+
prefix: "$"
|
|
407
448
|
},
|
|
408
449
|
// degrade-to-standard: stacked-group with MTD segment shown at span-1
|
|
409
450
|
{
|
|
410
451
|
id: "agency-sales-stacked",
|
|
411
452
|
label: "Sales",
|
|
412
453
|
value: "$892,450",
|
|
413
|
-
desc: "Agency sales across three timeframes at a glance (MTD shown)"
|
|
454
|
+
desc: "Agency sales across three timeframes at a glance (MTD shown)",
|
|
455
|
+
cardType: "stacked-group",
|
|
456
|
+
stackedTimeframes: ["MTD", "QTD", "YTD"]
|
|
414
457
|
},
|
|
415
458
|
{
|
|
416
459
|
id: "agency-aov-stacked",
|
|
417
460
|
label: "Avg Order",
|
|
418
461
|
value: "$2,340",
|
|
419
|
-
desc: "Average order value across three timeframes (MTD shown)"
|
|
462
|
+
desc: "Average order value across three timeframes (MTD shown)",
|
|
463
|
+
cardType: "stacked-group",
|
|
464
|
+
stackedTimeframes: ["MTD", "QTD", "YTD"]
|
|
420
465
|
},
|
|
421
466
|
{
|
|
422
467
|
id: "agency-yoy-versus",
|
|
423
468
|
label: "YoY Comparison",
|
|
424
469
|
value: "$892K",
|
|
425
|
-
desc: "TY vs LY sales side-by-side"
|
|
470
|
+
desc: "TY vs LY sales side-by-side",
|
|
471
|
+
cardType: "versus",
|
|
472
|
+
comparison: {
|
|
473
|
+
current: { value: "$892K", label: "This year" },
|
|
474
|
+
prior: { value: "$724K", label: "Last year" }
|
|
475
|
+
}
|
|
426
476
|
},
|
|
427
477
|
{
|
|
428
478
|
id: "agency-revenue-by-mfr",
|
|
429
479
|
label: "Mfr Revenue",
|
|
430
480
|
value: "$892K",
|
|
431
|
-
desc: "Revenue mix across top manufacturers"
|
|
481
|
+
desc: "Revenue mix across top manufacturers",
|
|
482
|
+
cardType: "segmented",
|
|
483
|
+
segments: [
|
|
484
|
+
{ label: "A", value: 35, color: "#7c3aed" },
|
|
485
|
+
{ label: "B", value: 28, color: "#1d6fd8" },
|
|
486
|
+
{ label: "C", value: 22, color: "#10b981" },
|
|
487
|
+
{ label: "D", value: 15, color: "#f59e0b" }
|
|
488
|
+
]
|
|
432
489
|
},
|
|
433
490
|
{
|
|
434
491
|
id: "agency-outstanding",
|
|
435
492
|
label: "Outstanding",
|
|
436
493
|
value: "$24,500",
|
|
437
|
-
desc: "Unpaid order balance across all accounts"
|
|
494
|
+
desc: "Unpaid order balance across all accounts",
|
|
495
|
+
cardType: "standard",
|
|
496
|
+
prefix: "$"
|
|
438
497
|
},
|
|
439
498
|
{
|
|
440
499
|
id: "agency-commission-rate",
|
|
441
500
|
label: "Commission",
|
|
442
501
|
value: "8.4%",
|
|
443
|
-
desc: "Effective commission rate %"
|
|
502
|
+
desc: "Effective commission rate %",
|
|
503
|
+
cardType: "standard",
|
|
504
|
+
suffix: "%"
|
|
444
505
|
},
|
|
445
506
|
{
|
|
446
507
|
id: "agency-commission-aging",
|
|
447
508
|
label: "Commission Aging",
|
|
448
509
|
value: "$24K",
|
|
449
|
-
desc: "Unpaid commission aging by buckets"
|
|
510
|
+
desc: "Unpaid commission aging by buckets",
|
|
511
|
+
cardType: "bars",
|
|
512
|
+
barData: [4, 8, 7, 5]
|
|
450
513
|
}
|
|
451
514
|
]
|
|
452
515
|
},
|
|
@@ -457,52 +520,70 @@ const se = {
|
|
|
457
520
|
label: "On-time rate",
|
|
458
521
|
value: "94.2%",
|
|
459
522
|
desc: "Share of orders shipped within SLA.",
|
|
460
|
-
startHere: !0
|
|
523
|
+
startHere: !0,
|
|
524
|
+
cardType: "donut",
|
|
525
|
+
donutValue: 0.942,
|
|
526
|
+
accentColor: "#16a34a",
|
|
527
|
+
suffix: "%"
|
|
461
528
|
},
|
|
462
529
|
{
|
|
463
530
|
id: "ot-at-risk",
|
|
464
531
|
label: "At-risk shipments",
|
|
465
532
|
value: "18",
|
|
466
533
|
desc: "Open shipments projected to miss SLA.",
|
|
467
|
-
isNew: !0
|
|
534
|
+
isNew: !0,
|
|
535
|
+
cardType: "highlight",
|
|
536
|
+
highlightColor: "#f59e0b"
|
|
468
537
|
},
|
|
469
538
|
// PHASE 17 D1 — agency-order-flow port (J5)
|
|
470
539
|
{
|
|
471
540
|
id: "agency-activity",
|
|
472
541
|
label: "Orders",
|
|
473
542
|
value: "47 Orders",
|
|
474
|
-
desc: "Daily team order count with bar chart"
|
|
543
|
+
desc: "Daily team order count with bar chart",
|
|
544
|
+
cardType: "bars",
|
|
545
|
+
barData: [12, 18, 15, 22, 19, 25, 28]
|
|
475
546
|
},
|
|
476
547
|
{
|
|
477
548
|
id: "agency-unassigned-orders",
|
|
478
549
|
label: "Unassigned",
|
|
479
550
|
value: "0",
|
|
480
|
-
desc: "Orders awaiting salesperson assignment"
|
|
551
|
+
desc: "Orders awaiting salesperson assignment",
|
|
552
|
+
cardType: "standard"
|
|
481
553
|
},
|
|
482
554
|
{
|
|
483
555
|
id: "agency-orders-compact",
|
|
484
556
|
label: "Order Count",
|
|
485
557
|
value: "156",
|
|
486
|
-
desc: "Total order count with bar chart trend"
|
|
558
|
+
desc: "Total order count with bar chart trend",
|
|
559
|
+
cardType: "bars",
|
|
560
|
+
barData: [18, 22, 19, 24, 26, 23, 28]
|
|
487
561
|
},
|
|
488
562
|
// degrade-to-standard: stacked-group with MTD segment shown at span-1
|
|
489
563
|
{
|
|
490
564
|
id: "agency-orders-stacked",
|
|
491
565
|
label: "Orders",
|
|
492
566
|
value: "156",
|
|
493
|
-
desc: "Order count across three timeframes at a glance (MTD shown)"
|
|
567
|
+
desc: "Order count across three timeframes at a glance (MTD shown)",
|
|
568
|
+
cardType: "stacked-group",
|
|
569
|
+
stackedTimeframes: ["MTD", "QTD", "YTD"]
|
|
494
570
|
},
|
|
495
571
|
{
|
|
496
572
|
id: "agency-order-pipeline-value",
|
|
497
573
|
label: "Pipeline Value",
|
|
498
574
|
value: "$284,500",
|
|
499
|
-
desc: "Open + transmitted order $ pipeline"
|
|
575
|
+
desc: "Open + transmitted order $ pipeline",
|
|
576
|
+
cardType: "standard",
|
|
577
|
+
prefix: "$"
|
|
500
578
|
},
|
|
501
579
|
{
|
|
502
580
|
id: "agency-cancel-rate",
|
|
503
581
|
label: "Cancel Rate",
|
|
504
582
|
value: "4.2%",
|
|
505
|
-
desc: "Order cancel-rate percentage (warn-tinted highlight)"
|
|
583
|
+
desc: "Order cancel-rate percentage (warn-tinted highlight)",
|
|
584
|
+
cardType: "highlight",
|
|
585
|
+
highlightColor: "#f59e0b",
|
|
586
|
+
suffix: "%"
|
|
506
587
|
}
|
|
507
588
|
]
|
|
508
589
|
},
|
|
@@ -513,7 +594,8 @@ const se = {
|
|
|
513
594
|
label: "Top vendor",
|
|
514
595
|
value: "Acme Co.",
|
|
515
596
|
desc: "Highest sell-through vendor over the trailing 30 days.",
|
|
516
|
-
startHere: !0
|
|
597
|
+
startHere: !0,
|
|
598
|
+
cardType: "name"
|
|
517
599
|
},
|
|
518
600
|
{
|
|
519
601
|
id: "vp-fill-rate",
|
|
@@ -521,20 +603,32 @@ const se = {
|
|
|
521
603
|
value: "97.1%",
|
|
522
604
|
desc: "Vendor fill rate against placed orders.",
|
|
523
605
|
donut: !0,
|
|
524
|
-
accent: "#2563eb"
|
|
606
|
+
accent: "#2563eb",
|
|
607
|
+
cardType: "donut",
|
|
608
|
+
donutValue: 0.971,
|
|
609
|
+
accentColor: "#2563eb",
|
|
610
|
+
suffix: "%"
|
|
525
611
|
},
|
|
526
612
|
// PHASE 17 D1 — agency-brand-portfolio port (J3)
|
|
527
613
|
{
|
|
528
614
|
id: "agency-mfr-mix",
|
|
529
615
|
label: "Mfr Mix",
|
|
530
616
|
value: "$892K",
|
|
531
|
-
desc: "Revenue mix by manufacturer (segmented bar)"
|
|
617
|
+
desc: "Revenue mix by manufacturer (segmented bar)",
|
|
618
|
+
cardType: "segmented",
|
|
619
|
+
segments: [
|
|
620
|
+
{ label: "A", value: 35, color: "#7c3aed" },
|
|
621
|
+
{ label: "B", value: 28, color: "#1d6fd8" },
|
|
622
|
+
{ label: "C", value: 22, color: "#10b981" },
|
|
623
|
+
{ label: "D", value: 15, color: "#f59e0b" }
|
|
624
|
+
]
|
|
532
625
|
},
|
|
533
626
|
{
|
|
534
627
|
id: "agency-mfr-new-line",
|
|
535
628
|
label: "New Mfrs",
|
|
536
629
|
value: "3",
|
|
537
|
-
desc: "New manufacturer count for the period"
|
|
630
|
+
desc: "New manufacturer count for the period",
|
|
631
|
+
cardType: "standard"
|
|
538
632
|
}
|
|
539
633
|
]
|
|
540
634
|
},
|
|
@@ -551,7 +645,13 @@ const se = {
|
|
|
551
645
|
{ label: "Test", value: "15%" }
|
|
552
646
|
],
|
|
553
647
|
desc: "Assortment mix across brand tiers.",
|
|
554
|
-
startHere: !0
|
|
648
|
+
startHere: !0,
|
|
649
|
+
cardType: "segmented",
|
|
650
|
+
segments: [
|
|
651
|
+
{ label: "Core", value: 58, color: "#7c3aed" },
|
|
652
|
+
{ label: "Growth", value: 27, color: "#10b981" },
|
|
653
|
+
{ label: "Test", value: 15, color: "#f59e0b" }
|
|
654
|
+
]
|
|
555
655
|
}
|
|
556
656
|
]
|
|
557
657
|
},
|
|
@@ -563,83 +663,96 @@ const se = {
|
|
|
563
663
|
value: "62.4%",
|
|
564
664
|
desc: "Share of buyers placing two or more orders in the period.",
|
|
565
665
|
startHere: !0,
|
|
566
|
-
isNew: !0
|
|
666
|
+
isNew: !0,
|
|
667
|
+
cardType: "donut",
|
|
668
|
+
donutValue: 0.624,
|
|
669
|
+
accentColor: "#1d6fd8",
|
|
670
|
+
suffix: "%"
|
|
567
671
|
},
|
|
568
672
|
{
|
|
569
673
|
id: "cr-lapsed",
|
|
570
674
|
label: "Lapsed accounts",
|
|
571
675
|
value: "47",
|
|
572
|
-
desc: "Accounts with zero orders in the last 90 days."
|
|
676
|
+
desc: "Accounts with zero orders in the last 90 days.",
|
|
677
|
+
cardType: "highlight",
|
|
678
|
+
highlightColor: "#f59e0b"
|
|
573
679
|
},
|
|
574
680
|
// PHASE 17 D1 — agency-account-coverage port (J4)
|
|
575
681
|
{
|
|
576
682
|
id: "agency-new-accounts",
|
|
577
683
|
label: "New Accounts",
|
|
578
684
|
value: "12",
|
|
579
|
-
desc: "New customer accounts opened this period"
|
|
685
|
+
desc: "New customer accounts opened this period",
|
|
686
|
+
cardType: "standard"
|
|
580
687
|
},
|
|
581
688
|
{
|
|
582
689
|
id: "agency-customers-compact",
|
|
583
690
|
label: "Customers",
|
|
584
691
|
value: "287",
|
|
585
|
-
desc: "Active customer count with bar chart trend"
|
|
692
|
+
desc: "Active customer count with bar chart trend",
|
|
693
|
+
cardType: "bars",
|
|
694
|
+
barData: [240, 250, 260, 270, 275, 280, 287]
|
|
586
695
|
},
|
|
587
696
|
{
|
|
588
697
|
id: "agency-inactive-accounts",
|
|
589
698
|
label: "Inactive Act",
|
|
590
699
|
value: "5",
|
|
591
|
-
desc: "Inactive customer-account count (warn-tinted)"
|
|
700
|
+
desc: "Inactive customer-account count (warn-tinted)",
|
|
701
|
+
cardType: "highlight",
|
|
702
|
+
highlightColor: "#f59e0b"
|
|
592
703
|
},
|
|
593
704
|
{
|
|
594
705
|
id: "agency-account-churn",
|
|
595
706
|
label: "Account Churn",
|
|
596
707
|
value: "8%",
|
|
597
|
-
desc: "Customer churn rate (LY-active not TY-active)"
|
|
708
|
+
desc: "Customer churn rate (LY-active not TY-active)",
|
|
709
|
+
cardType: "standard",
|
|
710
|
+
suffix: "%"
|
|
598
711
|
}
|
|
599
712
|
]
|
|
600
713
|
}
|
|
601
714
|
};
|
|
602
|
-
function
|
|
715
|
+
function re({
|
|
603
716
|
lenses: e,
|
|
604
717
|
activeLens: t,
|
|
605
|
-
onLensChange:
|
|
606
|
-
variant:
|
|
607
|
-
lensMeta:
|
|
718
|
+
onLensChange: l,
|
|
719
|
+
variant: i = "pills",
|
|
720
|
+
lensMeta: n = z
|
|
608
721
|
}) {
|
|
609
|
-
return
|
|
610
|
-
const u =
|
|
611
|
-
return u &&
|
|
722
|
+
return i === "pills" ? /* @__PURE__ */ s("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ s("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((c) => {
|
|
723
|
+
const u = c === t, r = n[c], a = ["cat-pill"];
|
|
724
|
+
return u && a.push("active"), /* @__PURE__ */ h(
|
|
612
725
|
"button",
|
|
613
726
|
{
|
|
614
727
|
type: "button",
|
|
615
728
|
role: "tab",
|
|
616
729
|
"aria-selected": u,
|
|
617
|
-
className:
|
|
618
|
-
"data-lens":
|
|
730
|
+
className: a.join(" "),
|
|
731
|
+
"data-lens": c,
|
|
619
732
|
onClick: () => {
|
|
620
|
-
u ||
|
|
733
|
+
u || l(c);
|
|
621
734
|
},
|
|
622
735
|
children: [
|
|
623
|
-
|
|
624
|
-
|
|
736
|
+
c,
|
|
737
|
+
r?.beta && /* @__PURE__ */ s("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
|
|
625
738
|
]
|
|
626
739
|
},
|
|
627
|
-
|
|
740
|
+
c
|
|
628
741
|
);
|
|
629
|
-
}) }) }) : /* @__PURE__ */
|
|
742
|
+
}) }) }) : /* @__PURE__ */ s(Ue, { lenses: e, activeLens: t, onLensChange: l });
|
|
630
743
|
}
|
|
631
744
|
function Ue({
|
|
632
745
|
lenses: e,
|
|
633
746
|
activeLens: t,
|
|
634
|
-
onLensChange:
|
|
747
|
+
onLensChange: l
|
|
635
748
|
}) {
|
|
636
|
-
const [
|
|
637
|
-
|
|
638
|
-
},
|
|
639
|
-
u(),
|
|
640
|
-
},
|
|
641
|
-
return /* @__PURE__ */
|
|
642
|
-
/* @__PURE__ */
|
|
749
|
+
const [i, n] = T(!1), c = I(null), u = () => {
|
|
750
|
+
c.current != null && (window.clearTimeout(c.current), c.current = null);
|
|
751
|
+
}, r = () => {
|
|
752
|
+
u(), c.current = window.setTimeout(() => n(!1), 100);
|
|
753
|
+
}, a = e.filter((o) => o !== t);
|
|
754
|
+
return /* @__PURE__ */ s("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ h("div", { className: "cat-segmented", children: [
|
|
755
|
+
/* @__PURE__ */ s(
|
|
643
756
|
"button",
|
|
644
757
|
{
|
|
645
758
|
type: "button",
|
|
@@ -654,26 +767,26 @@ function Ue({
|
|
|
654
767
|
{
|
|
655
768
|
className: "cat-seg-more",
|
|
656
769
|
onMouseEnter: () => {
|
|
657
|
-
u(),
|
|
770
|
+
u(), n(!0);
|
|
658
771
|
},
|
|
659
|
-
onMouseLeave:
|
|
772
|
+
onMouseLeave: r,
|
|
660
773
|
children: [
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
|
|
774
|
+
/* @__PURE__ */ s("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": i, children: "More ▾" }),
|
|
775
|
+
i && /* @__PURE__ */ s(
|
|
663
776
|
"div",
|
|
664
777
|
{
|
|
665
778
|
className: "cat-seg-overflow",
|
|
666
779
|
role: "menu",
|
|
667
780
|
onMouseEnter: u,
|
|
668
|
-
onMouseLeave:
|
|
669
|
-
children:
|
|
781
|
+
onMouseLeave: r,
|
|
782
|
+
children: a.map((o) => /* @__PURE__ */ s(
|
|
670
783
|
"button",
|
|
671
784
|
{
|
|
672
785
|
type: "button",
|
|
673
786
|
"data-lens": o,
|
|
674
787
|
role: "menuitem",
|
|
675
788
|
onClick: () => {
|
|
676
|
-
|
|
789
|
+
l(o), n(!1);
|
|
677
790
|
},
|
|
678
791
|
children: o
|
|
679
792
|
},
|
|
@@ -686,86 +799,87 @@ function Ue({
|
|
|
686
799
|
)
|
|
687
800
|
] }) });
|
|
688
801
|
}
|
|
689
|
-
function
|
|
690
|
-
return /* @__PURE__ */
|
|
691
|
-
const
|
|
692
|
-
let
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
const
|
|
697
|
-
let
|
|
802
|
+
function V({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: i }) {
|
|
803
|
+
return /* @__PURE__ */ s("div", { className: "cat-tiles", children: e.map((n) => {
|
|
804
|
+
const c = n.id === t, u = n.subStats != null && n.subStats.length > 0;
|
|
805
|
+
let r = null;
|
|
806
|
+
u ? n.subStats.length === 5 ? r = "span-5" : n.subStats.length === 3 ? r = "span-3" : r = "span-2" : n.stack === !0 && (r = "span-2");
|
|
807
|
+
const a = ["cat-tile"];
|
|
808
|
+
r && a.push(r), c && a.push("selected"), n.isNew && a.push("is-new"), n.startHere && a.push("start-here"), n.donut && a.push("has-donut");
|
|
809
|
+
const o = 1;
|
|
810
|
+
let d = 0.7;
|
|
698
811
|
if (n.donut) {
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
701
|
-
const
|
|
702
|
-
Number.isFinite(
|
|
812
|
+
const p = /([\d.]+)\s*%/.exec(n.value);
|
|
813
|
+
if (p) {
|
|
814
|
+
const m = parseFloat(p[1]);
|
|
815
|
+
Number.isFinite(m) && (d = Math.max(0, Math.min(1, m / 100)));
|
|
703
816
|
}
|
|
704
817
|
}
|
|
705
818
|
return /* @__PURE__ */ h(
|
|
706
819
|
"button",
|
|
707
820
|
{
|
|
708
821
|
type: "button",
|
|
709
|
-
className:
|
|
822
|
+
className: a.join(" "),
|
|
710
823
|
"data-metric": n.id,
|
|
711
824
|
"data-desc": n.desc,
|
|
712
|
-
"data-col-span": String(
|
|
825
|
+
"data-col-span": String(o),
|
|
713
826
|
"data-donut": n.donut ? "true" : void 0,
|
|
714
827
|
"data-accent": n.accent,
|
|
715
|
-
"aria-pressed":
|
|
716
|
-
onClick: () =>
|
|
828
|
+
"aria-pressed": c,
|
|
829
|
+
onClick: () => l(n.id, n.desc),
|
|
717
830
|
style: n.accent ? { "--cat-tile-accent": n.accent } : void 0,
|
|
718
831
|
children: [
|
|
719
|
-
n.startHere && /* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
832
|
+
n.startHere && /* @__PURE__ */ s("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
|
|
833
|
+
i ? i(n) : /* @__PURE__ */ s(
|
|
721
834
|
"div",
|
|
722
835
|
{
|
|
723
836
|
className: "cat-tile-primitive-wrapper gloss-metric-card",
|
|
837
|
+
"data-col-span": "1",
|
|
724
838
|
style: { pointerEvents: "none", width: "100%", height: "100%" },
|
|
725
839
|
"aria-hidden": "true",
|
|
726
|
-
children: n.donut ? /* @__PURE__ */
|
|
727
|
-
|
|
840
|
+
children: n.donut ? /* @__PURE__ */ s(
|
|
841
|
+
Q,
|
|
728
842
|
{
|
|
729
843
|
variant: "donut",
|
|
730
844
|
label: n.label,
|
|
731
845
|
value: n.value,
|
|
732
|
-
donutValue:
|
|
846
|
+
donutValue: d,
|
|
733
847
|
donutMax: 1,
|
|
734
848
|
accentColor: n.accent,
|
|
735
|
-
colSpan:
|
|
849
|
+
colSpan: o
|
|
736
850
|
}
|
|
737
|
-
) : /* @__PURE__ */
|
|
738
|
-
|
|
851
|
+
) : /* @__PURE__ */ s(
|
|
852
|
+
Q,
|
|
739
853
|
{
|
|
740
854
|
variant: "standard",
|
|
741
855
|
label: n.label,
|
|
742
856
|
value: n.value,
|
|
743
|
-
colSpan:
|
|
857
|
+
colSpan: o
|
|
744
858
|
}
|
|
745
859
|
)
|
|
746
860
|
}
|
|
747
861
|
),
|
|
748
|
-
n.variants && n.variants.length > 0 && /* @__PURE__ */
|
|
749
|
-
n.isNew && /* @__PURE__ */
|
|
862
|
+
n.variants && n.variants.length > 0 && /* @__PURE__ */ s("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((p) => /* @__PURE__ */ s("span", { children: p }, p)) }),
|
|
863
|
+
n.isNew && /* @__PURE__ */ s("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
|
|
750
864
|
]
|
|
751
865
|
},
|
|
752
866
|
n.id
|
|
753
867
|
);
|
|
754
868
|
}) });
|
|
755
869
|
}
|
|
756
|
-
const
|
|
757
|
-
function
|
|
758
|
-
return
|
|
870
|
+
const Y = ee(null);
|
|
871
|
+
function Ve() {
|
|
872
|
+
return te(Y);
|
|
759
873
|
}
|
|
760
|
-
function
|
|
761
|
-
const
|
|
762
|
-
if (
|
|
763
|
-
const
|
|
874
|
+
function He({ mode: e, dispatch: t }) {
|
|
875
|
+
const l = Ve();
|
|
876
|
+
if (l == null && e == null) return null;
|
|
877
|
+
const i = l?.mode ?? e ?? "add", n = l?.selectedTileId ?? null, c = l?.description ?? null, u = n == null;
|
|
764
878
|
return /* @__PURE__ */ h("div", { className: "panel-footer catalog", children: [
|
|
765
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ s("div", { className: "cat-description", id: "cat-desc", children: c ?? /* @__PURE__ */ s("em", { children: "Tap a metric to see its description" }) }),
|
|
766
880
|
/* @__PURE__ */ h("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
|
|
882
|
+
/* @__PURE__ */ s(
|
|
769
883
|
"button",
|
|
770
884
|
{
|
|
771
885
|
id: "btn-cat-cancel",
|
|
@@ -775,7 +889,7 @@ function ze({ mode: e, dispatch: t }) {
|
|
|
775
889
|
children: "Cancel"
|
|
776
890
|
}
|
|
777
891
|
),
|
|
778
|
-
|
|
892
|
+
i === "add" && /* @__PURE__ */ s(
|
|
779
893
|
"button",
|
|
780
894
|
{
|
|
781
895
|
id: "btn-cat-add",
|
|
@@ -786,7 +900,7 @@ function ze({ mode: e, dispatch: t }) {
|
|
|
786
900
|
children: "Add metric"
|
|
787
901
|
}
|
|
788
902
|
),
|
|
789
|
-
|
|
903
|
+
i === "replace" && /* @__PURE__ */ s(
|
|
790
904
|
"button",
|
|
791
905
|
{
|
|
792
906
|
id: "btn-cat-replace",
|
|
@@ -802,163 +916,168 @@ function ze({ mode: e, dispatch: t }) {
|
|
|
802
916
|
}
|
|
803
917
|
function q(e, t) {
|
|
804
918
|
if (t.length === 0) return !0;
|
|
805
|
-
const
|
|
806
|
-
if (e.label.toLowerCase().includes(
|
|
919
|
+
const l = t.toLowerCase();
|
|
920
|
+
if (e.label.toLowerCase().includes(l) || e.value.toLowerCase().includes(l)) return !0;
|
|
807
921
|
if (e.subStats) {
|
|
808
|
-
for (const
|
|
809
|
-
if (
|
|
922
|
+
for (const i of e.subStats)
|
|
923
|
+
if (i.label.toLowerCase().includes(l) || i.value.toLowerCase().includes(l)) return !0;
|
|
810
924
|
}
|
|
811
925
|
return !1;
|
|
812
926
|
}
|
|
813
|
-
function
|
|
927
|
+
function bt({
|
|
814
928
|
isOpen: e,
|
|
815
|
-
lenses: t =
|
|
816
|
-
defaultLens:
|
|
817
|
-
tilesByLens:
|
|
818
|
-
lensMeta:
|
|
819
|
-
footerSlot:
|
|
929
|
+
lenses: t = ne,
|
|
930
|
+
defaultLens: l = ae,
|
|
931
|
+
tilesByLens: i = se,
|
|
932
|
+
lensMeta: n = z,
|
|
933
|
+
footerSlot: c,
|
|
934
|
+
renderTile: u
|
|
820
935
|
}) {
|
|
821
|
-
const [
|
|
822
|
-
() =>
|
|
823
|
-
[
|
|
824
|
-
),
|
|
825
|
-
() => (
|
|
826
|
-
[
|
|
936
|
+
const [r, a] = T(l), [o, d] = T(null), [p, m] = T(null), [f, C] = T(""), b = i[r] ?? { primary: [] }, S = n[r], w = W(
|
|
937
|
+
() => b.primary.filter((y) => q(y, f)),
|
|
938
|
+
[b.primary, f]
|
|
939
|
+
), v = W(
|
|
940
|
+
() => (b.secondary ?? []).filter((y) => q(y, f)),
|
|
941
|
+
[b.secondary, f]
|
|
827
942
|
);
|
|
828
943
|
return /* @__PURE__ */ h(
|
|
829
|
-
|
|
944
|
+
Y.Provider,
|
|
830
945
|
{
|
|
831
|
-
value: { mode: "add", selectedTileId:
|
|
946
|
+
value: { mode: "add", selectedTileId: o, description: p },
|
|
832
947
|
children: [
|
|
833
948
|
/* @__PURE__ */ h("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
|
|
834
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ s("div", { className: "cat-search", children: /* @__PURE__ */ s(
|
|
835
950
|
"input",
|
|
836
951
|
{
|
|
837
952
|
type: "search",
|
|
838
953
|
className: "cat-search-input",
|
|
839
954
|
placeholder: "Search metrics",
|
|
840
955
|
"aria-label": "Search metrics",
|
|
841
|
-
value:
|
|
842
|
-
onChange: (
|
|
956
|
+
value: f,
|
|
957
|
+
onChange: (y) => C(y.target.value)
|
|
843
958
|
}
|
|
844
959
|
) }),
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
|
|
960
|
+
/* @__PURE__ */ s(
|
|
961
|
+
re,
|
|
847
962
|
{
|
|
848
963
|
lenses: t,
|
|
849
|
-
activeLens:
|
|
850
|
-
lensMeta:
|
|
964
|
+
activeLens: r,
|
|
965
|
+
lensMeta: n,
|
|
851
966
|
variant: "pills",
|
|
852
|
-
onLensChange: (
|
|
853
|
-
|
|
967
|
+
onLensChange: (y) => {
|
|
968
|
+
a(y), d(null), m(null), C("");
|
|
854
969
|
}
|
|
855
970
|
}
|
|
856
971
|
),
|
|
857
|
-
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
/* @__PURE__ */
|
|
972
|
+
S && /* @__PURE__ */ h("div", { className: "cat-lens-meta", children: [
|
|
973
|
+
/* @__PURE__ */ s("h3", { className: "cat-lens-headline", children: S.headline }),
|
|
974
|
+
/* @__PURE__ */ s("p", { className: "cat-lens-helper", children: S.helper })
|
|
860
975
|
] }),
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
-
|
|
976
|
+
/* @__PURE__ */ s(
|
|
977
|
+
V,
|
|
863
978
|
{
|
|
864
|
-
tiles:
|
|
865
|
-
selectedTileId:
|
|
866
|
-
onSelectTile: (
|
|
867
|
-
|
|
868
|
-
}
|
|
979
|
+
tiles: w,
|
|
980
|
+
selectedTileId: o,
|
|
981
|
+
onSelectTile: (y, P) => {
|
|
982
|
+
d(y), m(P);
|
|
983
|
+
},
|
|
984
|
+
renderTile: u
|
|
869
985
|
}
|
|
870
986
|
),
|
|
871
|
-
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
|
|
987
|
+
v.length > 0 && /* @__PURE__ */ h("div", { className: "cat-more-in-lens", children: [
|
|
988
|
+
/* @__PURE__ */ s("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
|
|
989
|
+
/* @__PURE__ */ s(
|
|
990
|
+
V,
|
|
875
991
|
{
|
|
876
|
-
tiles:
|
|
877
|
-
selectedTileId:
|
|
878
|
-
onSelectTile: (
|
|
879
|
-
|
|
880
|
-
}
|
|
992
|
+
tiles: v,
|
|
993
|
+
selectedTileId: o,
|
|
994
|
+
onSelectTile: (y, P) => {
|
|
995
|
+
d(y), m(P);
|
|
996
|
+
},
|
|
997
|
+
renderTile: u
|
|
881
998
|
}
|
|
882
999
|
)
|
|
883
1000
|
] }),
|
|
884
|
-
|
|
1001
|
+
w.length === 0 && v.length === 0 && f.length > 0 && /* @__PURE__ */ h("div", { className: "cat-empty", children: [
|
|
885
1002
|
'No metrics match "',
|
|
886
|
-
|
|
1003
|
+
f,
|
|
887
1004
|
'".'
|
|
888
1005
|
] })
|
|
889
1006
|
] }),
|
|
890
|
-
|
|
1007
|
+
c
|
|
891
1008
|
]
|
|
892
1009
|
}
|
|
893
1010
|
);
|
|
894
1011
|
}
|
|
895
|
-
function
|
|
1012
|
+
function yt({
|
|
896
1013
|
isOpen: e,
|
|
897
1014
|
replacingLabel: t,
|
|
898
|
-
lenses:
|
|
899
|
-
defaultLens:
|
|
900
|
-
tilesByLens:
|
|
901
|
-
footerSlot:
|
|
1015
|
+
lenses: l = ne,
|
|
1016
|
+
defaultLens: i = ae,
|
|
1017
|
+
tilesByLens: n = se,
|
|
1018
|
+
footerSlot: c,
|
|
1019
|
+
renderTile: u
|
|
902
1020
|
}) {
|
|
903
|
-
const [
|
|
1021
|
+
const [r, a] = T(i), [o, d] = T(null), [p, m] = T(null), f = n[r] ?? { primary: [] }, C = [...f.primary, ...f.secondary ?? []];
|
|
904
1022
|
return /* @__PURE__ */ h(
|
|
905
|
-
|
|
1023
|
+
Y.Provider,
|
|
906
1024
|
{
|
|
907
|
-
value: { mode: "replace", selectedTileId:
|
|
1025
|
+
value: { mode: "replace", selectedTileId: o, description: p },
|
|
908
1026
|
children: [
|
|
909
1027
|
/* @__PURE__ */ h("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
|
|
910
1028
|
t && /* @__PURE__ */ h("p", { className: "cat-subtitle", children: [
|
|
911
1029
|
"replacing ",
|
|
912
1030
|
t
|
|
913
1031
|
] }),
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
-
|
|
1032
|
+
/* @__PURE__ */ s(
|
|
1033
|
+
re,
|
|
916
1034
|
{
|
|
917
|
-
lenses:
|
|
918
|
-
activeLens:
|
|
919
|
-
onLensChange: (
|
|
920
|
-
|
|
1035
|
+
lenses: l,
|
|
1036
|
+
activeLens: r,
|
|
1037
|
+
onLensChange: (b) => {
|
|
1038
|
+
a(b), d(null), m(null);
|
|
921
1039
|
}
|
|
922
1040
|
}
|
|
923
1041
|
),
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
|
|
1042
|
+
/* @__PURE__ */ s(
|
|
1043
|
+
V,
|
|
926
1044
|
{
|
|
927
|
-
tiles:
|
|
928
|
-
selectedTileId:
|
|
929
|
-
onSelectTile: (
|
|
930
|
-
|
|
931
|
-
}
|
|
1045
|
+
tiles: C,
|
|
1046
|
+
selectedTileId: o,
|
|
1047
|
+
onSelectTile: (b, S) => {
|
|
1048
|
+
d(b), m(S);
|
|
1049
|
+
},
|
|
1050
|
+
renderTile: u
|
|
932
1051
|
}
|
|
933
1052
|
)
|
|
934
1053
|
] }),
|
|
935
|
-
|
|
1054
|
+
c
|
|
936
1055
|
]
|
|
937
1056
|
}
|
|
938
1057
|
);
|
|
939
1058
|
}
|
|
940
|
-
const
|
|
941
|
-
function
|
|
942
|
-
return
|
|
1059
|
+
const le = ee(null);
|
|
1060
|
+
function oe() {
|
|
1061
|
+
return te(le);
|
|
943
1062
|
}
|
|
944
|
-
function
|
|
945
|
-
const
|
|
1063
|
+
function ze(e = {}) {
|
|
1064
|
+
const l = oe()?.setPages;
|
|
946
1065
|
return /* @__PURE__ */ h(
|
|
947
1066
|
"div",
|
|
948
1067
|
{
|
|
949
1068
|
className: "panel-footer pm",
|
|
950
1069
|
style: { display: "flex", justifyContent: "flex-end", padding: "10px 14px" },
|
|
951
1070
|
children: [
|
|
952
|
-
/* @__PURE__ */
|
|
953
|
-
/* @__PURE__ */
|
|
1071
|
+
/* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
|
|
1072
|
+
/* @__PURE__ */ s(
|
|
954
1073
|
"button",
|
|
955
1074
|
{
|
|
956
1075
|
id: "btn-new-page",
|
|
957
1076
|
type: "button",
|
|
958
1077
|
className: "btn btn-primary",
|
|
959
1078
|
onClick: () => {
|
|
960
|
-
|
|
961
|
-
...
|
|
1079
|
+
l && l((i) => [
|
|
1080
|
+
...i,
|
|
962
1081
|
{ id: `new-${Date.now()}`, name: "Untitled", active: !1 }
|
|
963
1082
|
]);
|
|
964
1083
|
},
|
|
@@ -969,61 +1088,61 @@ function Ve(e = {}) {
|
|
|
969
1088
|
}
|
|
970
1089
|
);
|
|
971
1090
|
}
|
|
972
|
-
function
|
|
973
|
-
const
|
|
1091
|
+
function Ye({ page: e, onRename: t, onKebab: l, onDragStart: i }) {
|
|
1092
|
+
const n = oe(), [c, u] = T(!1), r = I(null);
|
|
974
1093
|
A(() => {
|
|
975
|
-
if (!
|
|
976
|
-
const m = (
|
|
977
|
-
|
|
1094
|
+
if (!c) return;
|
|
1095
|
+
const m = (f) => {
|
|
1096
|
+
r.current && (r.current.contains(f.target) || u(!1));
|
|
978
1097
|
};
|
|
979
1098
|
return document.addEventListener("mousedown", m, !0), () => document.removeEventListener("mousedown", m, !0);
|
|
980
|
-
}, [
|
|
981
|
-
const
|
|
1099
|
+
}, [c]);
|
|
1100
|
+
const a = () => {
|
|
982
1101
|
if (u(!1), t) return t(e.id);
|
|
983
|
-
if (!
|
|
1102
|
+
if (!n?.renamePage) return;
|
|
984
1103
|
const m = window.prompt("Rename page", e.name);
|
|
985
|
-
m != null && m.trim().length > 0 &&
|
|
1104
|
+
m != null && m.trim().length > 0 && n.renamePage(e.id, m.trim());
|
|
986
1105
|
}, o = () => {
|
|
987
|
-
u(!1),
|
|
988
|
-
},
|
|
989
|
-
u(!1), !e.active &&
|
|
1106
|
+
u(!1), n?.duplicatePage?.(e.id);
|
|
1107
|
+
}, d = () => {
|
|
1108
|
+
u(!1), !e.active && n?.deletePage?.(e.id);
|
|
990
1109
|
}, p = ["pm-row"];
|
|
991
|
-
return e.active && p.push("active"), /* @__PURE__ */ h("div", { ref:
|
|
992
|
-
/* @__PURE__ */
|
|
1110
|
+
return e.active && p.push("active"), /* @__PURE__ */ h("div", { ref: r, className: p.join(" "), "data-page-id": e.id, role: "listitem", children: [
|
|
1111
|
+
/* @__PURE__ */ s(
|
|
993
1112
|
"div",
|
|
994
1113
|
{
|
|
995
1114
|
className: "pm-handle",
|
|
996
1115
|
"aria-hidden": "true",
|
|
997
|
-
onMouseDown: () =>
|
|
1116
|
+
onMouseDown: () => i?.(e.id),
|
|
998
1117
|
children: "⋮⋮"
|
|
999
1118
|
}
|
|
1000
1119
|
),
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ s("div", { className: "pm-name", children: e.name }),
|
|
1121
|
+
/* @__PURE__ */ s(
|
|
1003
1122
|
"button",
|
|
1004
1123
|
{
|
|
1005
1124
|
type: "button",
|
|
1006
1125
|
className: "pm-kebab",
|
|
1007
1126
|
"aria-label": "Page options",
|
|
1008
1127
|
"aria-haspopup": "menu",
|
|
1009
|
-
"aria-expanded":
|
|
1128
|
+
"aria-expanded": c,
|
|
1010
1129
|
onClick: (m) => {
|
|
1011
|
-
if (m.stopPropagation(),
|
|
1012
|
-
u((
|
|
1130
|
+
if (m.stopPropagation(), l) return l(e.id);
|
|
1131
|
+
u((f) => !f);
|
|
1013
1132
|
},
|
|
1014
1133
|
children: "⋯"
|
|
1015
1134
|
}
|
|
1016
1135
|
),
|
|
1017
|
-
|
|
1018
|
-
/* @__PURE__ */
|
|
1019
|
-
/* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
1136
|
+
c && /* @__PURE__ */ h("div", { className: "pm-kebab-menu", role: "menu", "data-page-id": e.id, children: [
|
|
1137
|
+
/* @__PURE__ */ s("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: a, children: "Rename" }),
|
|
1138
|
+
/* @__PURE__ */ s("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: o, children: "Duplicate" }),
|
|
1139
|
+
/* @__PURE__ */ s(
|
|
1021
1140
|
"button",
|
|
1022
1141
|
{
|
|
1023
1142
|
type: "button",
|
|
1024
1143
|
role: "menuitem",
|
|
1025
1144
|
className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
|
|
1026
|
-
onClick:
|
|
1145
|
+
onClick: d,
|
|
1027
1146
|
"aria-disabled": e.active,
|
|
1028
1147
|
children: "Delete"
|
|
1029
1148
|
}
|
|
@@ -1031,45 +1150,45 @@ function Ke({ page: e, onRename: t, onKebab: r, onDragStart: n }) {
|
|
|
1031
1150
|
] })
|
|
1032
1151
|
] });
|
|
1033
1152
|
}
|
|
1034
|
-
const
|
|
1153
|
+
const Ke = [
|
|
1035
1154
|
{ id: "p-pipeline", name: "My Pipeline", active: !0 },
|
|
1036
1155
|
{ id: "p-numbers", name: "My Numbers", active: !1 },
|
|
1037
1156
|
{ id: "p-morning", name: "My Morning", active: !1 },
|
|
1038
1157
|
{ id: "p-accounts", name: "My Accounts", active: !1 }
|
|
1039
1158
|
];
|
|
1040
|
-
function
|
|
1159
|
+
function vt({
|
|
1041
1160
|
isOpen: e,
|
|
1042
|
-
pages: t =
|
|
1043
|
-
footerSlot:
|
|
1161
|
+
pages: t = Ke,
|
|
1162
|
+
footerSlot: l
|
|
1044
1163
|
}) {
|
|
1045
|
-
const [
|
|
1046
|
-
|
|
1047
|
-
}, []), u =
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1050
|
-
if (!
|
|
1164
|
+
const [i, n] = T(() => [...t]), c = x((a, o) => {
|
|
1165
|
+
n((d) => d.map((p) => p.id === a ? { ...p, name: o } : p));
|
|
1166
|
+
}, []), u = x((a) => {
|
|
1167
|
+
n((o) => {
|
|
1168
|
+
const d = o.find((f) => f.id === a);
|
|
1169
|
+
if (!d) return o;
|
|
1051
1170
|
const p = {
|
|
1052
|
-
id: `${
|
|
1053
|
-
name: `${
|
|
1171
|
+
id: `${d.id}-copy-${Date.now()}`,
|
|
1172
|
+
name: `${d.name} copy`,
|
|
1054
1173
|
active: !1
|
|
1055
|
-
}, m = o.findIndex((
|
|
1174
|
+
}, m = o.findIndex((f) => f.id === a);
|
|
1056
1175
|
return [...o.slice(0, m + 1), p, ...o.slice(m + 1)];
|
|
1057
1176
|
});
|
|
1058
|
-
}, []),
|
|
1059
|
-
|
|
1177
|
+
}, []), r = x((a) => {
|
|
1178
|
+
n((o) => o.filter((d) => d.id !== a));
|
|
1060
1179
|
}, []);
|
|
1061
|
-
return /* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
|
|
1180
|
+
return /* @__PURE__ */ s(le.Provider, { value: { pages: i, setPages: n, renamePage: c, duplicatePage: u, deletePage: r }, children: /* @__PURE__ */ h("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
|
|
1181
|
+
/* @__PURE__ */ s("div", { className: "pm-list", role: "list", children: i.map((a) => /* @__PURE__ */ s(Ye, { page: a }, a.id)) }),
|
|
1182
|
+
l != null && /* @__PURE__ */ s("div", { className: "pm-footer-pin", children: l })
|
|
1064
1183
|
] }) });
|
|
1065
1184
|
}
|
|
1066
|
-
const
|
|
1185
|
+
const Ct = {
|
|
1067
1186
|
SETTINGS: "settings",
|
|
1068
1187
|
CATALOG_ADD: "catalog-add",
|
|
1069
1188
|
CATALOG_REPLACE: "catalog-replace",
|
|
1070
1189
|
PAGE_MGMT: "page-management",
|
|
1071
1190
|
NOTIFICATION_CENTER: "notification-center"
|
|
1072
|
-
},
|
|
1191
|
+
}, Be = {
|
|
1073
1192
|
position: "fixed",
|
|
1074
1193
|
inset: 0,
|
|
1075
1194
|
pointerEvents: "none",
|
|
@@ -1083,80 +1202,80 @@ const St = {
|
|
|
1083
1202
|
pointerEvents: "none",
|
|
1084
1203
|
background: "rgba(0, 0, 0, 0.04)"
|
|
1085
1204
|
};
|
|
1086
|
-
function
|
|
1087
|
-
const { state: e, dispatch: t, getCloseLog:
|
|
1205
|
+
function St() {
|
|
1206
|
+
const { state: e, dispatch: t, getCloseLog: l } = ge();
|
|
1088
1207
|
A(() => {
|
|
1089
1208
|
if (e.activePanelId == null) return;
|
|
1090
|
-
function
|
|
1209
|
+
function c(u) {
|
|
1091
1210
|
u.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
1092
1211
|
}
|
|
1093
|
-
return document.addEventListener("keydown",
|
|
1212
|
+
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1094
1213
|
}, [e.activePanelId, t]);
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1097
|
-
|
|
1214
|
+
const i = I(e);
|
|
1215
|
+
be(() => {
|
|
1216
|
+
i.current = e;
|
|
1098
1217
|
}), A(() => {
|
|
1099
1218
|
if (process.env.NODE_ENV === "production") return;
|
|
1100
|
-
const
|
|
1101
|
-
return
|
|
1219
|
+
const c = window;
|
|
1220
|
+
return c.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), c.__panelsHostHandle = {
|
|
1102
1221
|
dispatch: t,
|
|
1103
|
-
getState: () =>
|
|
1104
|
-
getCloseLog:
|
|
1222
|
+
getState: () => i.current,
|
|
1223
|
+
getCloseLog: l
|
|
1105
1224
|
}, () => {
|
|
1106
|
-
|
|
1225
|
+
c.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
|
|
1107
1226
|
};
|
|
1108
|
-
}, [t,
|
|
1109
|
-
const
|
|
1227
|
+
}, [t, l]);
|
|
1228
|
+
const n = x(() => {
|
|
1110
1229
|
t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
1111
1230
|
}, [t]);
|
|
1112
|
-
return /* @__PURE__ */
|
|
1231
|
+
return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: Be, children: e.activePanelId != null && /* @__PURE__ */ s(
|
|
1113
1232
|
"div",
|
|
1114
1233
|
{
|
|
1115
1234
|
"data-panel-scrim": "true",
|
|
1116
1235
|
style: We,
|
|
1117
|
-
onClick:
|
|
1236
|
+
onClick: n
|
|
1118
1237
|
}
|
|
1119
1238
|
) });
|
|
1120
1239
|
}
|
|
1121
1240
|
const Ge = 700;
|
|
1122
|
-
function
|
|
1123
|
-
const [t,
|
|
1241
|
+
function Qe(e) {
|
|
1242
|
+
const [t, l] = T(null), i = I(null);
|
|
1124
1243
|
return A(() => {
|
|
1125
1244
|
if (e != null) {
|
|
1126
|
-
|
|
1245
|
+
i.current != null && (clearTimeout(i.current), i.current = null), l(null);
|
|
1127
1246
|
return;
|
|
1128
1247
|
}
|
|
1129
|
-
return
|
|
1130
|
-
|
|
1248
|
+
return l((n) => n), i.current = setTimeout(() => {
|
|
1249
|
+
l(null), i.current = null;
|
|
1131
1250
|
}, Ge), () => {
|
|
1132
|
-
|
|
1251
|
+
i.current != null && (clearTimeout(i.current), i.current = null);
|
|
1133
1252
|
};
|
|
1134
1253
|
}, [e]), A(() => {
|
|
1135
|
-
e != null &&
|
|
1254
|
+
e != null && l(e);
|
|
1136
1255
|
}, [e]), e != null ? { panelId: e, isOpen: !0 } : t != null ? { panelId: t, isOpen: !1 } : { panelId: null, isOpen: !1 };
|
|
1137
1256
|
}
|
|
1138
|
-
function
|
|
1139
|
-
const
|
|
1140
|
-
if (
|
|
1141
|
-
const { state:
|
|
1142
|
-
if (
|
|
1143
|
-
const u =
|
|
1144
|
-
if (
|
|
1257
|
+
function Tt({ panelComponents: e, children: t }) {
|
|
1258
|
+
const l = L();
|
|
1259
|
+
if (l == null) return null;
|
|
1260
|
+
const { state: i, dispatch: n } = l, c = Qe(i.activePanelId);
|
|
1261
|
+
if (c.panelId == null) return null;
|
|
1262
|
+
const u = c.panelId, r = c.isOpen, a = e?.[u];
|
|
1263
|
+
if (a == null && t == null)
|
|
1145
1264
|
return process.env.NODE_ENV !== "production" && console.error(
|
|
1146
1265
|
"[panels] No panel component registered for activePanelId:",
|
|
1147
1266
|
u
|
|
1148
1267
|
), null;
|
|
1149
1268
|
if (u === "settings") {
|
|
1150
|
-
const o =
|
|
1151
|
-
return /* @__PURE__ */
|
|
1152
|
-
|
|
1269
|
+
const o = i.isDirty, d = i.activeTrigger, p = d?.kind === "card-overflow" ? d.cardId : null;
|
|
1270
|
+
return /* @__PURE__ */ s(E, { isOpen: r, children: /* @__PURE__ */ s(
|
|
1271
|
+
k,
|
|
1153
1272
|
{
|
|
1154
|
-
isOpen:
|
|
1273
|
+
isOpen: r,
|
|
1155
1274
|
title: "Configure metric",
|
|
1156
1275
|
variant: "merged-stage",
|
|
1157
|
-
onClose: () =>
|
|
1158
|
-
footer: /* @__PURE__ */ h(
|
|
1159
|
-
/* @__PURE__ */
|
|
1276
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1277
|
+
footer: /* @__PURE__ */ h(Z, { children: [
|
|
1278
|
+
/* @__PURE__ */ s(
|
|
1160
1279
|
"button",
|
|
1161
1280
|
{
|
|
1162
1281
|
id: "btn-reset",
|
|
@@ -1164,145 +1283,145 @@ function _t({ panelComponents: e, children: t }) {
|
|
|
1164
1283
|
className: "gloss-panel-chrome__footer-btn",
|
|
1165
1284
|
disabled: !o,
|
|
1166
1285
|
onClick: () => {
|
|
1167
|
-
p != null &&
|
|
1286
|
+
p != null && n({ type: "CLEAR_BUFFER", cardId: p });
|
|
1168
1287
|
},
|
|
1169
1288
|
children: "Reset"
|
|
1170
1289
|
}
|
|
1171
1290
|
),
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
/* @__PURE__ */
|
|
1291
|
+
/* @__PURE__ */ s("span", { style: { flex: 1 } }),
|
|
1292
|
+
/* @__PURE__ */ s(
|
|
1174
1293
|
"button",
|
|
1175
1294
|
{
|
|
1176
1295
|
id: "settings-cancel",
|
|
1177
1296
|
type: "button",
|
|
1178
1297
|
className: "gloss-panel-chrome__footer-btn",
|
|
1179
|
-
onClick: () =>
|
|
1298
|
+
onClick: () => n({ type: "CLOSE_PANEL", reason: "cancel-button" }),
|
|
1180
1299
|
children: "Cancel"
|
|
1181
1300
|
}
|
|
1182
1301
|
),
|
|
1183
|
-
/* @__PURE__ */
|
|
1302
|
+
/* @__PURE__ */ s(
|
|
1184
1303
|
"button",
|
|
1185
1304
|
{
|
|
1186
1305
|
id: "settings-apply",
|
|
1187
1306
|
type: "button",
|
|
1188
1307
|
className: "gloss-panel-chrome__footer-btn gloss-panel-chrome__footer-btn--primary",
|
|
1189
1308
|
disabled: !o,
|
|
1190
|
-
onClick: () =>
|
|
1309
|
+
onClick: () => n({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
1191
1310
|
children: "Apply"
|
|
1192
1311
|
}
|
|
1193
1312
|
)
|
|
1194
1313
|
] }),
|
|
1195
|
-
children:
|
|
1314
|
+
children: a != null ? /* @__PURE__ */ s(a, { isOpen: r }) : t
|
|
1196
1315
|
}
|
|
1197
1316
|
) });
|
|
1198
1317
|
}
|
|
1199
1318
|
if (u === "catalog-add" || u === "catalog-replace") {
|
|
1200
|
-
if (
|
|
1319
|
+
if (a == null) return null;
|
|
1201
1320
|
const o = u === "catalog-replace" ? "replace" : "add";
|
|
1202
|
-
return /* @__PURE__ */
|
|
1203
|
-
|
|
1321
|
+
return /* @__PURE__ */ s(E, { isOpen: r, children: /* @__PURE__ */ s(
|
|
1322
|
+
k,
|
|
1204
1323
|
{
|
|
1205
|
-
isOpen:
|
|
1206
|
-
onClose: () =>
|
|
1324
|
+
isOpen: r,
|
|
1325
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1207
1326
|
footer: null,
|
|
1208
1327
|
title: o === "replace" ? "Replace metric" : "Add a metric",
|
|
1209
|
-
children: /* @__PURE__ */
|
|
1210
|
-
|
|
1328
|
+
children: /* @__PURE__ */ s(
|
|
1329
|
+
a,
|
|
1211
1330
|
{
|
|
1212
|
-
isOpen:
|
|
1213
|
-
footerSlot: /* @__PURE__ */
|
|
1331
|
+
isOpen: r,
|
|
1332
|
+
footerSlot: /* @__PURE__ */ s(He, { mode: o, dispatch: n })
|
|
1214
1333
|
}
|
|
1215
1334
|
)
|
|
1216
1335
|
}
|
|
1217
1336
|
) });
|
|
1218
1337
|
}
|
|
1219
|
-
return u === "page-management" ?
|
|
1220
|
-
|
|
1338
|
+
return u === "page-management" ? a == null ? null : /* @__PURE__ */ s(E, { isOpen: r, children: /* @__PURE__ */ s(
|
|
1339
|
+
k,
|
|
1221
1340
|
{
|
|
1222
|
-
isOpen:
|
|
1223
|
-
onClose: () =>
|
|
1341
|
+
isOpen: r,
|
|
1342
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1224
1343
|
footer: null,
|
|
1225
1344
|
title: "Manage pages",
|
|
1226
|
-
children: /* @__PURE__ */ a
|
|
1345
|
+
children: /* @__PURE__ */ s(a, { isOpen: r, footerSlot: /* @__PURE__ */ s(ze, {}) })
|
|
1227
1346
|
}
|
|
1228
|
-
) }) : /* @__PURE__ */
|
|
1229
|
-
|
|
1347
|
+
) }) : /* @__PURE__ */ s(E, { isOpen: r, children: /* @__PURE__ */ s(
|
|
1348
|
+
k,
|
|
1230
1349
|
{
|
|
1231
1350
|
isOpen: !0,
|
|
1232
|
-
onClose: () =>
|
|
1351
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1233
1352
|
footer: null,
|
|
1234
|
-
children:
|
|
1353
|
+
children: a != null ? /* @__PURE__ */ s(a, { isOpen: r }) : t
|
|
1235
1354
|
}
|
|
1236
1355
|
) });
|
|
1237
1356
|
}
|
|
1238
1357
|
function j(e) {
|
|
1239
1358
|
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;
|
|
1240
1359
|
}
|
|
1241
|
-
const
|
|
1242
|
-
function
|
|
1360
|
+
const qe = 685, X = 627, je = "cubic-bezier(0.22, 1, 0.36, 1)", Xe = 200;
|
|
1361
|
+
function ie(e, t) {
|
|
1243
1362
|
if (typeof window > "u") return t;
|
|
1244
|
-
const
|
|
1245
|
-
if (!
|
|
1246
|
-
const
|
|
1247
|
-
return Number.isNaN(
|
|
1363
|
+
const l = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
1364
|
+
if (!l) return t;
|
|
1365
|
+
const i = parseFloat(l);
|
|
1366
|
+
return Number.isNaN(i) ? t : l.endsWith("s") && !l.endsWith("ms") ? i * 1e3 : i;
|
|
1248
1367
|
}
|
|
1249
1368
|
function Je(e, t) {
|
|
1250
1369
|
return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
1251
1370
|
}
|
|
1252
|
-
function
|
|
1371
|
+
function D(e) {
|
|
1253
1372
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1254
1373
|
}
|
|
1255
1374
|
function Ze(e) {
|
|
1256
|
-
const { mountEl: t, chromeEl:
|
|
1257
|
-
if (t == null ||
|
|
1258
|
-
|
|
1375
|
+
const { mountEl: t, chromeEl: l, reducedMotion: i, onAssert: n } = e;
|
|
1376
|
+
if (t == null || l == null) {
|
|
1377
|
+
D(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
|
|
1259
1378
|
return;
|
|
1260
1379
|
}
|
|
1261
|
-
if (
|
|
1262
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
1380
|
+
if (i) {
|
|
1381
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), n?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
|
|
1263
1382
|
return;
|
|
1264
1383
|
}
|
|
1265
|
-
if (typeof
|
|
1266
|
-
|
|
1384
|
+
if (typeof l.animate != "function") {
|
|
1385
|
+
D(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
|
|
1267
1386
|
return;
|
|
1268
1387
|
}
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
const u =
|
|
1388
|
+
const c = l.cloneNode(!0);
|
|
1389
|
+
c.id = "panel-chrome-frozen", c.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(c), l.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1390
|
+
const u = ie("--panel-open-dur", qe), r = Je("--panel-easing", je), a = l.animate(
|
|
1272
1391
|
[{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
|
|
1273
|
-
{ duration: u, easing:
|
|
1392
|
+
{ duration: u, easing: r, fill: "forwards" }
|
|
1274
1393
|
);
|
|
1275
|
-
|
|
1394
|
+
a.addEventListener(
|
|
1276
1395
|
"finish",
|
|
1277
1396
|
() => {
|
|
1278
|
-
|
|
1397
|
+
c.remove(), l.style.zIndex = "", a.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
|
|
1279
1398
|
},
|
|
1280
1399
|
{ once: !0 }
|
|
1281
1400
|
);
|
|
1282
1401
|
}
|
|
1283
1402
|
function et(e) {
|
|
1284
|
-
const { mountEl: t, onAssert:
|
|
1403
|
+
const { mountEl: t, onAssert: l } = e;
|
|
1285
1404
|
if (t == null) {
|
|
1286
|
-
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() =>
|
|
1405
|
+
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => D(e), X), l?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
|
|
1287
1406
|
return;
|
|
1288
1407
|
}
|
|
1289
|
-
const
|
|
1290
|
-
let
|
|
1291
|
-
const u = (
|
|
1292
|
-
|
|
1293
|
-
},
|
|
1294
|
-
|
|
1408
|
+
const i = ie("--panel-close-dur", X);
|
|
1409
|
+
let n = !1, c = null;
|
|
1410
|
+
const u = (a) => {
|
|
1411
|
+
a.target !== t || a.propertyName !== "max-height" || n || (n = !0, c != null && clearTimeout(c), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "handoff-complete", timestamp: Date.now() }));
|
|
1412
|
+
}, r = () => {
|
|
1413
|
+
n || (n = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "handoff-forced", timestamp: Date.now() }));
|
|
1295
1414
|
};
|
|
1296
|
-
t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }),
|
|
1415
|
+
t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), c = setTimeout(r, i + Xe);
|
|
1297
1416
|
}
|
|
1298
1417
|
function tt(e) {
|
|
1299
|
-
const { state: t, onAssert:
|
|
1418
|
+
const { state: t, onAssert: l } = e;
|
|
1300
1419
|
if (t.activePanelId && t.isDirty) {
|
|
1301
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
1420
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "blocked-dirty", timestamp: Date.now() });
|
|
1302
1421
|
return;
|
|
1303
1422
|
}
|
|
1304
|
-
const
|
|
1305
|
-
if (!!t.activePanelId &&
|
|
1423
|
+
const i = j(t.activeTrigger), n = j(e.trigger);
|
|
1424
|
+
if (!!t.activePanelId && i != null && i === n) {
|
|
1306
1425
|
Ze(e);
|
|
1307
1426
|
return;
|
|
1308
1427
|
}
|
|
@@ -1310,28 +1429,28 @@ function tt(e) {
|
|
|
1310
1429
|
et(e);
|
|
1311
1430
|
return;
|
|
1312
1431
|
}
|
|
1313
|
-
|
|
1432
|
+
D(e), l?.({ branch: "fresh-open", timestamp: Date.now() });
|
|
1314
1433
|
}
|
|
1315
1434
|
function nt() {
|
|
1316
1435
|
if (!(typeof window > "u"))
|
|
1317
1436
|
return window.__panelsAsserter;
|
|
1318
1437
|
}
|
|
1319
|
-
function
|
|
1320
|
-
const e =
|
|
1321
|
-
return
|
|
1322
|
-
(
|
|
1438
|
+
function _t() {
|
|
1439
|
+
const e = L(), t = J();
|
|
1440
|
+
return x(
|
|
1441
|
+
(l, i) => {
|
|
1323
1442
|
if (!e)
|
|
1324
1443
|
return;
|
|
1325
|
-
const
|
|
1326
|
-
panelId:
|
|
1327
|
-
trigger:
|
|
1444
|
+
const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, c = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
|
|
1445
|
+
panelId: l,
|
|
1446
|
+
trigger: i,
|
|
1328
1447
|
state: e.state,
|
|
1329
1448
|
dispatch: e.dispatch,
|
|
1330
|
-
mountEl:
|
|
1331
|
-
chromeEl:
|
|
1449
|
+
mountEl: n,
|
|
1450
|
+
chromeEl: c,
|
|
1332
1451
|
reducedMotion: t,
|
|
1333
|
-
onAssert: (
|
|
1334
|
-
nt()?.recordTransition?.(
|
|
1452
|
+
onAssert: (r) => {
|
|
1453
|
+
nt()?.recordTransition?.(r);
|
|
1335
1454
|
}
|
|
1336
1455
|
};
|
|
1337
1456
|
tt(u);
|
|
@@ -1339,191 +1458,191 @@ function Nt() {
|
|
|
1339
1458
|
[e, t]
|
|
1340
1459
|
);
|
|
1341
1460
|
}
|
|
1342
|
-
let
|
|
1461
|
+
let O = !1, M = null;
|
|
1343
1462
|
function H() {
|
|
1344
1463
|
const e = [];
|
|
1345
1464
|
let t = "cleaned";
|
|
1346
1465
|
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
|
|
1347
|
-
const
|
|
1348
|
-
|
|
1349
|
-
const
|
|
1350
|
-
|
|
1351
|
-
const u =
|
|
1466
|
+
const i = document.querySelectorAll(".gloss-panel-mount");
|
|
1467
|
+
i.length > 1 && e.push(`mount-count=${i.length}`);
|
|
1468
|
+
const n = i[0] ?? null, c = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
|
|
1469
|
+
c.length > 1 && e.push(`chrome-count=${c.length}`);
|
|
1470
|
+
const u = c[0] ?? null;
|
|
1352
1471
|
if (u) {
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1472
|
+
const d = u.style.zIndex;
|
|
1473
|
+
d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
|
|
1355
1474
|
}
|
|
1356
|
-
const
|
|
1475
|
+
const r = n ? "present" : "absent", a = u ? "present" : "absent";
|
|
1357
1476
|
return {
|
|
1358
1477
|
valid: e.length === 0,
|
|
1359
|
-
mount:
|
|
1360
|
-
chrome:
|
|
1478
|
+
mount: r,
|
|
1479
|
+
chrome: a,
|
|
1361
1480
|
frozen: t,
|
|
1362
1481
|
orphans: e,
|
|
1363
1482
|
timestamp: Date.now()
|
|
1364
1483
|
};
|
|
1365
1484
|
}
|
|
1366
|
-
const
|
|
1367
|
-
function
|
|
1368
|
-
return { id: e, constraint: t, expected:
|
|
1485
|
+
const $ = "8px 8px 0px", R = "64px", F = "inset(0px 0px 60px 0px)", U = "inset(0px -40px -40px -40px)";
|
|
1486
|
+
function g(e, t, l, i, n) {
|
|
1487
|
+
return { id: e, constraint: t, expected: l, actual: i, pass: n };
|
|
1369
1488
|
}
|
|
1370
|
-
function
|
|
1489
|
+
function N(e) {
|
|
1371
1490
|
const t = parseInt(e, 10);
|
|
1372
1491
|
return Number.isFinite(t) ? t : NaN;
|
|
1373
1492
|
}
|
|
1374
1493
|
function K() {
|
|
1375
|
-
const e = [], t = document.querySelector(".gloss-panel-mount"),
|
|
1494
|
+
const e = [], t = document.querySelector(".gloss-panel-mount"), l = t?.querySelector(".gloss-panel-chrome") ?? null, i = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), c = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
|
|
1376
1495
|
if (!t)
|
|
1377
|
-
e.push(
|
|
1496
|
+
e.push(g("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
|
|
1378
1497
|
else {
|
|
1379
|
-
const
|
|
1498
|
+
const r = getComputedStyle(t), a = r.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), o = r.clipPath || t.style.clipPath || "", d = o.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), p = d ? parseInt(d[1], 10) : NaN, m = N(a), f = Number.isFinite(p) && Number.isFinite(m) && p === m;
|
|
1380
1499
|
e.push(
|
|
1381
|
-
|
|
1500
|
+
g(
|
|
1382
1501
|
"C1",
|
|
1383
1502
|
"mount --reveal-y matches clip-path inset-bottom Npx",
|
|
1384
1503
|
`inset(0 0 ${m}px 0) === --reveal-y(${m}px)`,
|
|
1385
|
-
`--reveal-y=${
|
|
1386
|
-
|
|
1504
|
+
`--reveal-y=${a || "n/a"} clip-path=${o || "n/a"}`,
|
|
1505
|
+
f
|
|
1387
1506
|
)
|
|
1388
1507
|
);
|
|
1389
1508
|
}
|
|
1390
1509
|
if (!t)
|
|
1391
|
-
e.push(
|
|
1510
|
+
e.push(g("C2", "mount padding constant", $, "absent", !1));
|
|
1392
1511
|
else {
|
|
1393
|
-
const
|
|
1394
|
-
e.push(
|
|
1512
|
+
const r = t.style.padding, a = getComputedStyle(t), o = r || a.padding || "", d = o === $ || o === "8px 8px 0px 8px";
|
|
1513
|
+
e.push(g("C2", "mount padding constant", $, o || "n/a", d));
|
|
1395
1514
|
}
|
|
1396
1515
|
if (!t)
|
|
1397
|
-
e.push(
|
|
1516
|
+
e.push(g("C3", "mount.bottom resolves to var(--tb-h)=64px", R, "absent", !1));
|
|
1398
1517
|
else {
|
|
1399
|
-
const
|
|
1400
|
-
e.push(
|
|
1518
|
+
const a = getComputedStyle(t).bottom || t.style.bottom || "", o = a === R;
|
|
1519
|
+
e.push(g("C3", "mount.bottom resolves to var(--tb-h)=64px", R, a || "n/a", o));
|
|
1401
1520
|
}
|
|
1402
|
-
if (!
|
|
1403
|
-
e.push(
|
|
1521
|
+
if (!l)
|
|
1522
|
+
e.push(g("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
|
|
1404
1523
|
else {
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1407
|
-
), o =
|
|
1408
|
-
|
|
1409
|
-
),
|
|
1524
|
+
const r = getComputedStyle(l), a = N(
|
|
1525
|
+
r.getPropertyValue("--row-h").trim() || l.style.getPropertyValue("--row-h").trim() || "0"
|
|
1526
|
+
), o = N(
|
|
1527
|
+
r.getPropertyValue("--row-gap").trim() || l.style.getPropertyValue("--row-gap").trim() || "0"
|
|
1528
|
+
), d = a * 3 + o * 3 - 8, p = N(r.height || l.style.height || ""), m = Number.isFinite(a) && Number.isFinite(o) && Number.isFinite(p) && Number.isFinite(d) && p === d;
|
|
1410
1529
|
e.push(
|
|
1411
|
-
|
|
1530
|
+
g(
|
|
1412
1531
|
"C4",
|
|
1413
1532
|
"panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
|
|
1414
|
-
`${
|
|
1533
|
+
`${d}px (rh=${a} rg=${o})`,
|
|
1415
1534
|
`${p}px`,
|
|
1416
1535
|
m
|
|
1417
1536
|
)
|
|
1418
1537
|
);
|
|
1419
1538
|
}
|
|
1420
|
-
if (!
|
|
1539
|
+
if (!i || !l)
|
|
1421
1540
|
e.push(
|
|
1422
|
-
|
|
1541
|
+
g(
|
|
1423
1542
|
"C5",
|
|
1424
1543
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1425
1544
|
"present",
|
|
1426
|
-
`coordinator=${
|
|
1545
|
+
`coordinator=${i ? "present" : "absent"} chrome=${l ? "present" : "absent"}`,
|
|
1427
1546
|
!1
|
|
1428
1547
|
)
|
|
1429
1548
|
);
|
|
1430
1549
|
else {
|
|
1431
|
-
const
|
|
1550
|
+
const r = getComputedStyle(i), a = getComputedStyle(l), o = r.perspective || i.style.perspective || "", d = (r.perspectiveOrigin || i.style.perspectiveOrigin || "").trim(), p = a.perspectiveStyle || l.style.perspectiveStyle || "", b = o !== "" && o !== "none" && (d === "center bottom" || d === "50% 100%") && p === "flat";
|
|
1432
1551
|
e.push(
|
|
1433
|
-
|
|
1552
|
+
g(
|
|
1434
1553
|
"C5",
|
|
1435
1554
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1436
1555
|
"perspective:not-none, origin:center bottom, chrome-style:flat",
|
|
1437
|
-
`perspective=${o} origin=${
|
|
1556
|
+
`perspective=${o} origin=${d} chrome-style=${p}`,
|
|
1438
1557
|
b
|
|
1439
1558
|
)
|
|
1440
1559
|
);
|
|
1441
1560
|
}
|
|
1442
1561
|
{
|
|
1443
|
-
let
|
|
1562
|
+
let r = !1, a = "absent";
|
|
1444
1563
|
try {
|
|
1445
1564
|
for (const o of Array.from(document.styleSheets)) {
|
|
1446
|
-
let
|
|
1565
|
+
let d = [];
|
|
1447
1566
|
try {
|
|
1448
|
-
|
|
1567
|
+
d = Array.from(o.cssRules ?? []);
|
|
1449
1568
|
} catch {
|
|
1450
1569
|
continue;
|
|
1451
1570
|
}
|
|
1452
|
-
for (const p of
|
|
1571
|
+
for (const p of d)
|
|
1453
1572
|
if (p.name === "stage-spin") {
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1573
|
+
const f = Array.from(p.cssRules), C = f.find((y) => y.keyText === "0%" || y.keyText === "from"), b = f.find((y) => y.keyText === "100%" || y.keyText === "to"), S = C?.style.transform ?? "", w = b?.style.transform ?? "", v = /rotateY\(\s*0(?:deg)?\s*\)/;
|
|
1574
|
+
r = v.test(S) && v.test(w), a = `0%=${S || "n/a"} 100%=${w || "n/a"}`;
|
|
1456
1575
|
break;
|
|
1457
1576
|
}
|
|
1458
|
-
if (
|
|
1577
|
+
if (a !== "absent") break;
|
|
1459
1578
|
}
|
|
1460
1579
|
} catch {
|
|
1461
|
-
|
|
1580
|
+
a = "inspection-error";
|
|
1462
1581
|
}
|
|
1463
1582
|
e.push(
|
|
1464
|
-
|
|
1583
|
+
g(
|
|
1465
1584
|
"C6",
|
|
1466
1585
|
"@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
|
|
1467
1586
|
"both frames rotateY(0)",
|
|
1468
|
-
|
|
1469
|
-
|
|
1587
|
+
a,
|
|
1588
|
+
r
|
|
1470
1589
|
)
|
|
1471
1590
|
);
|
|
1472
1591
|
}
|
|
1473
1592
|
{
|
|
1474
|
-
const
|
|
1593
|
+
const r = document.documentElement, a = getComputedStyle(r), o = a.getPropertyValue("--panel-open-dur").trim() || r.style.getPropertyValue("--panel-open-dur").trim(), d = a.getPropertyValue("--panel-close-dur").trim() || r.style.getPropertyValue("--panel-close-dur").trim(), p = N(o) || parseFloat(o) * (o.endsWith("s") && !o.endsWith("ms") ? 1e3 : 1), m = N(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), f = Number.isFinite(p) && Number.isFinite(m) && p > m;
|
|
1475
1594
|
e.push(
|
|
1476
|
-
|
|
1595
|
+
g("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${o || "n/a"} close=${d || "n/a"}`, f)
|
|
1477
1596
|
);
|
|
1478
1597
|
}
|
|
1479
|
-
if (!
|
|
1480
|
-
e.push(
|
|
1598
|
+
if (!n)
|
|
1599
|
+
e.push(g("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
|
|
1481
1600
|
else {
|
|
1482
|
-
const
|
|
1601
|
+
const r = getComputedStyle(n), a = r.animationName || "", o = r.transitionProperty || "", d = (a === "" || a === "none") && (o === "" || o === "none" || o === "all");
|
|
1483
1602
|
e.push(
|
|
1484
|
-
|
|
1603
|
+
g(
|
|
1485
1604
|
"C8",
|
|
1486
1605
|
"BellCutout zero computed animation/transition",
|
|
1487
1606
|
"animation:none AND transition:none",
|
|
1488
|
-
`animation=${
|
|
1489
|
-
|
|
1607
|
+
`animation=${a || "n/a"} transition=${o || "n/a"}`,
|
|
1608
|
+
d
|
|
1490
1609
|
)
|
|
1491
1610
|
);
|
|
1492
1611
|
}
|
|
1493
1612
|
if (!t)
|
|
1494
|
-
e.push(
|
|
1613
|
+
e.push(g("C9", "mount closed-state clipPath", F, "absent", !1));
|
|
1495
1614
|
else {
|
|
1496
|
-
const
|
|
1497
|
-
e.push(
|
|
1615
|
+
const r = t.style.clipPath, a = getComputedStyle(t), o = r || a.clipPath || "", d = o === F;
|
|
1616
|
+
e.push(g("C9", "mount closed-state clipPath", F, o || "n/a", d));
|
|
1498
1617
|
}
|
|
1499
|
-
if (!
|
|
1500
|
-
e.push(
|
|
1618
|
+
if (!c)
|
|
1619
|
+
e.push(g("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
|
|
1501
1620
|
else {
|
|
1502
|
-
const
|
|
1621
|
+
const r = c.parentElement, a = r === document.body;
|
|
1503
1622
|
e.push(
|
|
1504
|
-
|
|
1623
|
+
g(
|
|
1505
1624
|
"C10",
|
|
1506
1625
|
"bell-popover parentElement === document.body (open)",
|
|
1507
1626
|
"body",
|
|
1508
|
-
|
|
1509
|
-
|
|
1627
|
+
r === document.body ? "body" : r?.tagName ?? "n/a",
|
|
1628
|
+
a
|
|
1510
1629
|
)
|
|
1511
1630
|
);
|
|
1512
1631
|
}
|
|
1513
|
-
if (!
|
|
1514
|
-
e.push(
|
|
1632
|
+
if (!i)
|
|
1633
|
+
e.push(g("C11", "coordinator overflow === visible", "visible", "absent", !1));
|
|
1515
1634
|
else {
|
|
1516
|
-
const
|
|
1517
|
-
e.push(
|
|
1635
|
+
const a = getComputedStyle(i).overflow || i.style.overflow || "", o = a === "visible";
|
|
1636
|
+
e.push(g("C11", "coordinator overflow === visible", "visible", a || "n/a", o));
|
|
1518
1637
|
}
|
|
1519
1638
|
if (!u)
|
|
1520
|
-
e.push(
|
|
1639
|
+
e.push(g("C12", "toolbar clipPath = inset(0 -40 -40 -40)", U, "absent", !1));
|
|
1521
1640
|
else {
|
|
1522
|
-
const
|
|
1523
|
-
e.push(
|
|
1641
|
+
const r = u.style.clipPath, a = getComputedStyle(u), o = r || a.clipPath || "", d = o === U;
|
|
1642
|
+
e.push(g("C12", "toolbar clipPath = inset(0 -40 -40 -40)", U, o || "n/a", d));
|
|
1524
1643
|
}
|
|
1525
1644
|
return e.push(
|
|
1526
|
-
|
|
1645
|
+
g(
|
|
1527
1646
|
"C13",
|
|
1528
1647
|
"same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
|
|
1529
1648
|
"WAAPI driver wired in orchestrator (source-proof)",
|
|
@@ -1531,7 +1650,7 @@ function K() {
|
|
|
1531
1650
|
"wiring_only"
|
|
1532
1651
|
)
|
|
1533
1652
|
), e.push(
|
|
1534
|
-
|
|
1653
|
+
g(
|
|
1535
1654
|
"C14",
|
|
1536
1655
|
'cross-position handoff transitionend filtered by propertyName="max-height"',
|
|
1537
1656
|
"transitionend filter wired in orchestrator (source-proof)",
|
|
@@ -1540,10 +1659,10 @@ function K() {
|
|
|
1540
1659
|
)
|
|
1541
1660
|
), e;
|
|
1542
1661
|
}
|
|
1543
|
-
function
|
|
1662
|
+
function at(e) {
|
|
1544
1663
|
return K().find((t) => t.id === e);
|
|
1545
1664
|
}
|
|
1546
|
-
function
|
|
1665
|
+
function st() {
|
|
1547
1666
|
const e = H();
|
|
1548
1667
|
return { q12: [
|
|
1549
1668
|
{
|
|
@@ -1559,70 +1678,70 @@ function rt() {
|
|
|
1559
1678
|
return {
|
|
1560
1679
|
enable: lt,
|
|
1561
1680
|
disable: ot,
|
|
1562
|
-
isEnabled: () =>
|
|
1563
|
-
getLastReport: () =>
|
|
1681
|
+
isEnabled: () => O,
|
|
1682
|
+
getLastReport: () => M,
|
|
1564
1683
|
recordTransition: (e) => {
|
|
1565
|
-
|
|
1684
|
+
O && (M = { ...e, ...H() });
|
|
1566
1685
|
},
|
|
1567
1686
|
assertOnce: () => {
|
|
1568
1687
|
const e = H();
|
|
1569
|
-
return
|
|
1688
|
+
return M = e, e;
|
|
1570
1689
|
},
|
|
1571
1690
|
assertCcOnly: K,
|
|
1572
|
-
getCcRowById:
|
|
1573
|
-
assertPanelTruths:
|
|
1691
|
+
getCcRowById: at,
|
|
1692
|
+
assertPanelTruths: st
|
|
1574
1693
|
};
|
|
1575
1694
|
}
|
|
1576
1695
|
function lt() {
|
|
1577
|
-
if (
|
|
1696
|
+
if (O = !0, typeof window > "u") return;
|
|
1578
1697
|
window.__panelsAsserter || (window.__panelsAsserter = rt(), console.info(
|
|
1579
1698
|
"[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
|
|
1580
1699
|
));
|
|
1581
1700
|
}
|
|
1582
1701
|
function ot() {
|
|
1583
|
-
|
|
1702
|
+
O = !1;
|
|
1584
1703
|
}
|
|
1585
1704
|
export {
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1705
|
+
Pt as COMMITS,
|
|
1706
|
+
bt as CatalogAddShell,
|
|
1707
|
+
He as CatalogFooter,
|
|
1708
|
+
yt as CatalogReplaceShell,
|
|
1709
|
+
Y as CatalogStateContext,
|
|
1710
|
+
ke as CloneCard,
|
|
1711
|
+
Ee as CloneStage,
|
|
1712
|
+
ae as MOCK_DEFAULT_LENS,
|
|
1713
|
+
ne as MOCK_LENSES,
|
|
1595
1714
|
z as MOCK_LENS_META,
|
|
1596
|
-
|
|
1715
|
+
Ke as MOCK_PAGES,
|
|
1597
1716
|
se as MOCK_TILES_BY_LENS,
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1717
|
+
Ct as PANEL_IDS,
|
|
1718
|
+
ze as PageMgmtFooter,
|
|
1719
|
+
vt as PageMgmtShell,
|
|
1720
|
+
le as PageMgmtStateContext,
|
|
1721
|
+
k as PanelChrome,
|
|
1722
|
+
xt as PanelHost,
|
|
1723
|
+
St as PanelHostShell,
|
|
1724
|
+
E as PanelMount,
|
|
1725
|
+
At as PanelProvider,
|
|
1726
|
+
Tt as PanelSlot,
|
|
1608
1727
|
gt as SettingsShell,
|
|
1609
1728
|
K as assertCcOnly,
|
|
1610
1729
|
H as assertPanelDomShape,
|
|
1611
|
-
|
|
1612
|
-
|
|
1730
|
+
st as assertPanelTruths,
|
|
1731
|
+
Et as deriveSurfaceState,
|
|
1613
1732
|
ot as disablePanelAsserter,
|
|
1614
1733
|
lt as enablePanelAsserter,
|
|
1615
|
-
|
|
1616
|
-
|
|
1734
|
+
at as getCcRowById,
|
|
1735
|
+
kt as initialState,
|
|
1617
1736
|
j as positionKey,
|
|
1618
|
-
|
|
1737
|
+
Dt as reducer,
|
|
1619
1738
|
tt as transitionToPanel,
|
|
1620
|
-
|
|
1739
|
+
Ve as useCatalogState,
|
|
1621
1740
|
ft as useEditingCardId,
|
|
1622
|
-
|
|
1741
|
+
oe as usePageMgmtState,
|
|
1623
1742
|
ge as usePanelContext,
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1743
|
+
L as usePanelContextOptional,
|
|
1744
|
+
Ot as usePanelCoordinator,
|
|
1745
|
+
J as useReducedMotionPanel,
|
|
1746
|
+
_t as useTransitionToPanel
|
|
1628
1747
|
};
|