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