@mt-gloss/ui 0.1.138 → 0.2.0
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-CJlY7Uik.js → BaseAsyncButton-Cq_l7clO.js} +29 -30
- package/COMMITS-Dm8qIHaq.js +444 -0
- package/Expandable-BcmIxWR8.js +13807 -0
- package/UIContext-DP6JGCto.js +1731 -0
- package/catalog.js +120 -122
- package/composites-panels.js +578 -1442
- package/index.d.ts +4 -2
- package/index.js +2368 -2029
- package/internals.js +80 -81
- package/lib/base/BaseAccordion/BaseAccordion.d.ts +4 -24
- package/lib/base/BaseCard/BaseCard.d.ts +8 -48
- package/lib/base/BaseCheckbox/BaseCheckbox.d.ts +1 -6
- package/lib/base/BaseInput/BaseInput.d.ts +1 -6
- package/lib/base/BaseMaskedInput/BaseMaskedInput.d.ts +1 -6
- package/lib/base/BaseMenu/BaseMenu.d.ts +2 -12
- package/lib/base/BaseRadio/BaseRadio.d.ts +1 -6
- package/lib/base/BaseRating/BaseRating.d.ts +1 -6
- package/lib/base/BaseSegmentedControl/BaseSegmentedControl.d.ts +1 -6
- package/lib/base/BaseSelect/BaseSelect.d.ts +2 -12
- package/lib/base/BaseTextarea/BaseTextarea.d.ts +1 -6
- package/lib/base/BaseToggle/BaseToggle.d.ts +1 -6
- package/lib/base/BaseTooltip/BaseTooltip.d.ts +1 -6
- package/lib/composites/dashboard/BellPopover/BellPopover.d.ts +0 -12
- package/lib/composites/forms/PasswordInput.d.ts +1 -6
- package/lib/composites/forms/PhoneInput.d.ts +1 -6
- package/lib/composites/forms/SearchInput.d.ts +1 -6
- package/lib/composites/forms/TagInput.d.ts +1 -6
- package/lib/composites/inputs/FilterChip.d.ts +1 -6
- package/lib/composites/overlay/SplitButton/SplitButton.d.ts +1 -6
- package/lib/composites/panels/PanelChrome.d.ts +1 -23
- package/lib/composites/panels/PanelSlot.d.ts +3 -14
- package/lib/composites/panels/coordinator/types.d.ts +1 -12
- package/lib/composites/panels/index.d.ts +4 -5
- package/lib/composites/panels/shells/CatalogAddShell.d.ts +8 -21
- package/lib/composites/panels/shells/CatalogReplaceShell.d.ts +4 -9
- package/lib/composites/panels/shells/PageMgmtShell.d.ts +3 -28
- package/lib/composites/panels/shells/SettingsShell.d.ts +3 -55
- package/lib/composites/panels/shells/index.d.ts +2 -2
- package/lib/composites/panels/shells/internals/CatalogLensPicker.d.ts +1 -14
- package/lib/composites/panels/shells/internals/CatalogTileGrid.d.ts +1 -18
- package/lib/composites/panels/shells/internals/PageMgmtFooter.d.ts +0 -11
- package/lib/composites/panels/shells/internals/PageMgmtRow.d.ts +1 -6
- package/lib/composites/panels/shells/internals/catalog-mocks.d.ts +8 -145
- package/lib/composites/panels/stage3d/CloneStage.d.ts +1 -11
- package/lib/containers/ContainerDialog/ContainerDialog.d.ts +3 -18
- package/lib/containers/ContainerFormSection/ContainerFormSection.d.ts +1 -6
- package/lib/containers/ContainerPanel/ContainerPanel.d.ts +1 -6
- package/lib/containers/ContainerTable/ContainerTable.d.ts +1 -6
- package/lib/containers/ContainerToolbar/ContainerToolbar.d.ts +1 -6
- package/lib/facade/index.d.ts +2 -0
- package/lib/presets/PresetAccordion/PresetAccordion.d.ts +4 -24
- package/lib/presets/PresetBadge/PresetBadge.d.ts +1 -6
- package/lib/presets/PresetCard/PresetCard.d.ts +8 -48
- package/lib/presets/PresetCheckbox/PresetCheckbox.d.ts +1 -6
- package/lib/presets/PresetChip/PresetChip.d.ts +1 -6
- package/lib/presets/PresetColorPicker/PresetColorPicker.d.ts +1 -6
- package/lib/presets/PresetDatePicker/PresetDatePicker.d.ts +1 -6
- package/lib/presets/PresetDateRangePicker/PresetDateRangePicker.d.ts +1 -6
- package/lib/presets/PresetFileUpload/PresetFileUpload.d.ts +1 -6
- package/lib/presets/PresetInput/PresetInput.d.ts +1 -6
- package/lib/presets/PresetLink/PresetLink.d.ts +1 -6
- package/lib/presets/PresetMaskedInput/PresetMaskedInput.d.ts +1 -6
- package/lib/presets/PresetMenu/PresetMenu.d.ts +2 -13
- package/lib/presets/PresetNumberInput/PresetNumberInput.d.ts +1 -6
- package/lib/presets/PresetRadio/PresetRadio.d.ts +1 -6
- package/lib/presets/PresetRangeSlider/PresetRangeSlider.d.ts +1 -6
- package/lib/presets/PresetRating/PresetRating.d.ts +1 -6
- package/lib/presets/PresetTextarea/PresetTextarea.d.ts +1 -6
- package/lib/presets/PresetTimePicker/PresetTimePicker.d.ts +1 -6
- package/lib/presets/PresetToggle/PresetToggle.d.ts +1 -6
- package/lib/primitives/dashboard/ResizePill/ResizePill.d.ts +1 -7
- package/lib/primitives/dashboard/index.d.ts +0 -1
- package/lib/wrappers/Actionable/Actionable.d.ts +1 -6
- package/lib/wrappers/AsyncLoader/AsyncLoader.d.ts +1 -6
- package/lib/wrappers/ButtonGroup/ButtonGroup.d.ts +1 -6
- package/lib/wrappers/CheckboxGroup/CheckboxGroup.d.ts +1 -6
- package/lib/wrappers/Dismissible/Dismissible.d.ts +1 -6
- package/lib/wrappers/Expandable/Expandable.d.ts +1 -6
- package/lib/wrappers/InputGroup/InputGroup.d.ts +2 -12
- package/lib/wrappers/RadioGroup/RadioGroup.d.ts +1 -6
- package/lib/wrappers/Selectable/Selectable.d.ts +1 -6
- package/lib/wrappers/Sortable/Sortable.d.ts +1 -6
- package/package.json +1 -1
- package/ui.css +1 -1
- package/BaseText-Dxbk1JJa.js +0 -66
- package/COMMITS-aGwevMtR.js +0 -975
- package/Expandable-G7SCUlMb.js +0 -13245
- package/MetricCard-DOPtBpek.js +0 -698
- package/UIContext-CGQI_KJk.js +0 -1808
- package/lib/composites/panels/chrome-v2/PanelBody.d.ts +0 -5
- package/lib/composites/panels/chrome-v2/PanelChromeV2.d.ts +0 -18
- package/lib/composites/panels/chrome-v2/PanelFooter.d.ts +0 -6
- package/lib/composites/panels/chrome-v2/PanelFooterMessage.d.ts +0 -6
- package/lib/composites/panels/chrome-v2/PanelHeader.d.ts +0 -10
- package/lib/composites/panels/chrome-v2/PanelNavigation.d.ts +0 -5
- package/lib/composites/panels/chrome-v2/PanelStage.d.ts +0 -5
- package/lib/composites/panels/chrome-v2/index.d.ts +0 -23
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +0 -18
- package/lib/composites/panels/hooks/useEditingCardId.d.ts +0 -16
- package/lib/composites/panels/shells/NotificationCenterShell.d.ts +0 -2
- package/lib/composites/panels/shells/settings/ColorControls.d.ts +0 -13
- package/lib/composites/panels/shells/settings/SlotsControls.d.ts +0 -6
- package/lib/composites/panels/shells/settings/ThresholdControls.d.ts +0 -10
- package/lib/composites/panels/shells/settings/TimeframeControls.d.ts +0 -6
- package/lib/composites/panels/shells/settings/index.d.ts +0 -12
- package/lib/primitives/dashboard/SettingsTabStrip/SettingsTabStrip.d.ts +0 -17
- package/lib/primitives/dashboard/SettingsTabStrip/index.d.ts +0 -6
- package/lib/primitives/dashboard/SettingsTabStrip/types.d.ts +0 -12
package/composites-panels.js
CHANGED
|
@@ -1,752 +1,80 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { C as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function je({ span: e, rotating: t = !0, children: r }) {
|
|
19
|
-
const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = r != null ? "full" : "fallback";
|
|
20
|
-
return /* @__PURE__ */ a("div", { className: l, "data-clone-fidelity": n, children: r });
|
|
21
|
-
}
|
|
22
|
-
const Ze = 500, Xe = 1, Je = "var(--gloss-color-primary, #6366f1)";
|
|
23
|
-
function et({
|
|
24
|
-
children: e,
|
|
25
|
-
spinTrigger: t,
|
|
26
|
-
onSpinComplete: r,
|
|
27
|
-
spinDuration: l,
|
|
28
|
-
spinRotations: n,
|
|
29
|
-
accentColor: i
|
|
30
|
-
}) {
|
|
31
|
-
const u = de(0), o = de(1), s = H.useRef(null), c = H.useMemo(() => ke() === "reduced", []), d = H.useRef(t);
|
|
32
|
-
return H.useEffect(() => {
|
|
33
|
-
if (t === void 0 || t === d.current) return;
|
|
34
|
-
d.current = t;
|
|
35
|
-
const h = (l ?? Ze) / 1e3, y = n ?? Xe, p = s.current;
|
|
36
|
-
if (c) {
|
|
37
|
-
const _ = [];
|
|
38
|
-
if (p) {
|
|
39
|
-
const x = B(
|
|
40
|
-
p,
|
|
41
|
-
{ opacity: [0, 0.4, 0] },
|
|
42
|
-
Re
|
|
43
|
-
);
|
|
44
|
-
_.push(x), x.then(() => {
|
|
45
|
-
r?.();
|
|
46
|
-
});
|
|
47
|
-
} else
|
|
48
|
-
Promise.resolve().then(() => {
|
|
49
|
-
r?.();
|
|
50
|
-
});
|
|
51
|
-
return () => {
|
|
52
|
-
_.forEach((x) => x.stop());
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
const v = { ...$e, duration: h }, T = B(u, [0, 360 * y], v), S = B(o, [1, 1.03, 1], v), b = [T, S];
|
|
56
|
-
if (p) {
|
|
57
|
-
const _ = B(
|
|
58
|
-
p,
|
|
59
|
-
{ opacity: [0, 0.6, 0, 0] },
|
|
60
|
-
{ ...v, times: [0, 0.3, 0.8, 1] }
|
|
61
|
-
);
|
|
62
|
-
b.push(_);
|
|
63
|
-
}
|
|
64
|
-
return T.then(() => {
|
|
65
|
-
r?.();
|
|
66
|
-
}), () => {
|
|
67
|
-
b.forEach((_) => _.stop());
|
|
68
|
-
};
|
|
69
|
-
}, [t, l, n, c, r, u, o]), /* @__PURE__ */ f(
|
|
70
|
-
Fe.div,
|
|
71
|
-
{
|
|
72
|
-
className: "clone-stage",
|
|
73
|
-
style: { rotateY: u, scale: o },
|
|
74
|
-
children: [
|
|
75
|
-
e,
|
|
76
|
-
/* @__PURE__ */ a(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
ref: s,
|
|
80
|
-
className: "clone-stage__accent",
|
|
81
|
-
style: {
|
|
82
|
-
"--spin-accent-color": i ?? Je
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
function Bt({ primary: e, secondary: t }) {
|
|
91
|
-
return /* @__PURE__ */ f("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
|
|
92
|
-
/* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-primary", children: e }),
|
|
93
|
-
t != null && /* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-secondary", children: t })
|
|
94
|
-
] });
|
|
95
|
-
}
|
|
96
|
-
function tt({
|
|
97
|
-
value: e,
|
|
98
|
-
onChange: t,
|
|
99
|
-
enabled: r = !1,
|
|
100
|
-
onToggleEnabled: l
|
|
1
|
+
import { u as I, f as q, a as Z, g as N, c as w } from "./COMMITS-Dm8qIHaq.js";
|
|
2
|
+
import { C as Ve, b as qe, P as Be, e as He, i as Ue, r as Ye, d as Ke } from "./COMMITS-Dm8qIHaq.js";
|
|
3
|
+
import { jsx as s, jsxs as h, Fragment as ee } from "react/jsx-runtime";
|
|
4
|
+
import { useState as y, useRef as B, createContext as H, useContext as U, useEffect as F, useLayoutEffect as te, useCallback as Y } from "react";
|
|
5
|
+
function ne({ children: e }) {
|
|
6
|
+
return /* @__PURE__ */ s("div", { className: "clone-stage", children: e });
|
|
7
|
+
}
|
|
8
|
+
function oe({ span: e, rotating: t = !0, children: o }) {
|
|
9
|
+
const n = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" ");
|
|
10
|
+
return /* @__PURE__ */ s("div", { className: n, children: o });
|
|
11
|
+
}
|
|
12
|
+
const se = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
|
|
13
|
+
function Le({
|
|
14
|
+
isOpen: e,
|
|
15
|
+
cardSpan: t,
|
|
16
|
+
cardLabel: o = "Metric",
|
|
17
|
+
cardValue: n = "—"
|
|
101
18
|
}) {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
)
|
|
119
|
-
] }),
|
|
120
|
-
r ? /* @__PURE__ */ f(q, { children: [
|
|
121
|
-
/* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
|
|
122
|
-
/* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
|
|
123
|
-
/* @__PURE__ */ a(
|
|
19
|
+
const a = I(), r = a?.state.activeTrigger, d = r?.kind === "card-overflow" ? r.cardId : null, l = q(), i = r?.span, c = t ?? i ?? 1, u = d != null ? a?.state?.bufferByCard?.[d]?.changes ?? {} : {}, m = typeof u.threshold == "number" ? u.threshold : 50, f = typeof u.accent == "string" ? u.accent : null, v = (g) => {
|
|
20
|
+
d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(g.target.value) });
|
|
21
|
+
}, b = (g) => {
|
|
22
|
+
d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: g });
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ h("div", { "data-shell": "settings", "aria-hidden": !e, children: [
|
|
25
|
+
/* @__PURE__ */ s(ne, { children: /* @__PURE__ */ h(oe, { span: c, rotating: !l, children: [
|
|
26
|
+
/* @__PURE__ */ s("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: o }),
|
|
27
|
+
/* @__PURE__ */ s("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: n })
|
|
28
|
+
] }) }),
|
|
29
|
+
/* @__PURE__ */ h("div", { className: "settings-shell__controls", children: [
|
|
30
|
+
/* @__PURE__ */ s("h3", { className: "settings-shell__heading", children: "Settings" }),
|
|
31
|
+
/* @__PURE__ */ h("label", { className: "settings-shell__field", children: [
|
|
32
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Threshold" }),
|
|
33
|
+
/* @__PURE__ */ s(
|
|
124
34
|
"input",
|
|
125
35
|
{
|
|
126
|
-
id: "settings-threshold-input",
|
|
127
36
|
type: "range",
|
|
128
37
|
min: 0,
|
|
129
38
|
max: 100,
|
|
130
|
-
|
|
131
|
-
|
|
39
|
+
step: 1,
|
|
40
|
+
value: m,
|
|
41
|
+
onChange: v,
|
|
42
|
+
className: "settings-shell__slider",
|
|
132
43
|
"aria-label": "Threshold",
|
|
133
|
-
"
|
|
134
|
-
"aria-valuemin": 0,
|
|
135
|
-
"aria-valuemax": 100,
|
|
136
|
-
className: "settings-shell__slider"
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
/* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
140
|
-
e,
|
|
141
|
-
"%"
|
|
142
|
-
] })
|
|
143
|
-
] })
|
|
144
|
-
] }) : /* @__PURE__ */ a("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default styling. Turn on to tint values below the threshold." })
|
|
145
|
-
] });
|
|
146
|
-
}
|
|
147
|
-
function nt({ value: e, onChange: t }) {
|
|
148
|
-
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
|
|
149
|
-
/* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
|
|
150
|
-
/* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
|
|
151
|
-
/* @__PURE__ */ a(
|
|
152
|
-
"input",
|
|
153
|
-
{
|
|
154
|
-
id: "settings-timeframe-input",
|
|
155
|
-
type: "range",
|
|
156
|
-
min: 7,
|
|
157
|
-
max: 90,
|
|
158
|
-
value: e,
|
|
159
|
-
onChange: t,
|
|
160
|
-
"aria-label": "Timeframe",
|
|
161
|
-
"aria-valuenow": e,
|
|
162
|
-
"aria-valuemin": 7,
|
|
163
|
-
"aria-valuemax": 90,
|
|
164
|
-
className: "settings-shell__slider"
|
|
165
|
-
}
|
|
166
|
-
),
|
|
167
|
-
/* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
168
|
-
e,
|
|
169
|
-
" days"
|
|
170
|
-
] })
|
|
171
|
-
] })
|
|
172
|
-
] });
|
|
173
|
-
}
|
|
174
|
-
function at({ id: e, onRemove: t }) {
|
|
175
|
-
const { attributes: r, listeners: l, setNodeRef: n, transform: i, transition: u, isDragging: o } = We({ id: e }), s = {
|
|
176
|
-
transform: Ge.Transform.toString(i),
|
|
177
|
-
transition: u,
|
|
178
|
-
opacity: o ? 0.6 : 1
|
|
179
|
-
};
|
|
180
|
-
return /* @__PURE__ */ f(
|
|
181
|
-
"li",
|
|
182
|
-
{
|
|
183
|
-
ref: n,
|
|
184
|
-
style: s,
|
|
185
|
-
className: `settings-shell__slot-pill${o ? " settings-shell__slot-pill--dragging" : ""}`,
|
|
186
|
-
children: [
|
|
187
|
-
/* @__PURE__ */ a(
|
|
188
|
-
"button",
|
|
189
|
-
{
|
|
190
|
-
type: "button",
|
|
191
|
-
className: "settings-shell__slot-pill__handle",
|
|
192
|
-
"aria-label": `Reorder ${e}`,
|
|
193
|
-
...r,
|
|
194
|
-
...l,
|
|
195
|
-
children: /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
|
|
44
|
+
"data-testid": "settings-threshold-slider"
|
|
196
45
|
}
|
|
197
46
|
),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
className: "settings-shell__slot-pill__remove",
|
|
204
|
-
"aria-label": `Remove ${e}`,
|
|
205
|
-
onClick: t,
|
|
206
|
-
children: "×"
|
|
207
|
-
}
|
|
208
|
-
)
|
|
209
|
-
]
|
|
210
|
-
}
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
function st({ value: e, onChange: t }) {
|
|
214
|
-
const r = Ue(
|
|
215
|
-
ue(ze, { activationConstraint: { distance: 4 } }),
|
|
216
|
-
ue(He, { coordinateGetter: Ve })
|
|
217
|
-
), l = R.useRef(!1), [n, i] = R.useState(!1), u = (s) => {
|
|
218
|
-
const { active: c, over: d } = s;
|
|
219
|
-
if (!d || c.id === d.id) return;
|
|
220
|
-
const m = e.findIndex((y) => y === c.id), h = e.findIndex((y) => y === d.id);
|
|
221
|
-
m === -1 || h === -1 || t(Qe([...e], m, h));
|
|
222
|
-
}, o = (s) => {
|
|
223
|
-
l.current || (l.current = !0, i(!0)), t(e.filter((c) => c !== s));
|
|
224
|
-
};
|
|
225
|
-
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
|
|
226
|
-
/* @__PURE__ */ a(Be, { sensors: r, collisionDetection: Ye, onDragEnd: u, children: /* @__PURE__ */ a(Ke, { items: [...e], strategy: qe, children: /* @__PURE__ */ a("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ a(at, { id: s, onRemove: () => o(s) }, s)) }) }) }),
|
|
227
|
-
e.length === 0 && n && /* @__PURE__ */ a("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
|
|
228
|
-
/* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
|
|
229
|
-
] });
|
|
230
|
-
}
|
|
231
|
-
const rt = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
|
|
232
|
-
function ot({
|
|
233
|
-
value: e,
|
|
234
|
-
onSelect: t,
|
|
235
|
-
enabled: r = !1,
|
|
236
|
-
onToggleEnabled: l
|
|
237
|
-
}) {
|
|
238
|
-
const n = "settings-accent-enabled";
|
|
239
|
-
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
|
|
240
|
-
/* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
|
|
241
|
-
/* @__PURE__ */ a("label", { htmlFor: n, className: "settings-shell__toggle-label", children: "Override default accent" }),
|
|
242
|
-
/* @__PURE__ */ a(
|
|
243
|
-
"input",
|
|
244
|
-
{
|
|
245
|
-
id: n,
|
|
246
|
-
type: "checkbox",
|
|
247
|
-
role: "switch",
|
|
248
|
-
"aria-label": "Enable accent override",
|
|
249
|
-
"aria-checked": r,
|
|
250
|
-
checked: r,
|
|
251
|
-
onChange: (i) => l?.(i.target.checked),
|
|
252
|
-
className: "settings-shell__toggle"
|
|
253
|
-
}
|
|
254
|
-
)
|
|
255
|
-
] }),
|
|
256
|
-
r ? /* @__PURE__ */ f(q, { children: [
|
|
257
|
-
/* @__PURE__ */ a("span", { className: "settings-shell__label", children: "Accent color" }),
|
|
258
|
-
/* @__PURE__ */ a("div", { className: "settings-shell__swatch-row", children: rt.map((i) => {
|
|
259
|
-
const u = e === i;
|
|
260
|
-
return /* @__PURE__ */ a(
|
|
47
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__value", "aria-live": "polite", children: m })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ h("div", { className: "settings-shell__field", children: [
|
|
50
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Accent" }),
|
|
51
|
+
/* @__PURE__ */ s("div", { className: "settings-shell__swatches", role: "radiogroup", "aria-label": "Accent color", children: se.map((g) => /* @__PURE__ */ s(
|
|
261
52
|
"button",
|
|
262
53
|
{
|
|
263
54
|
type: "button",
|
|
264
|
-
"
|
|
265
|
-
"aria-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
55
|
+
role: "radio",
|
|
56
|
+
"aria-pressed": f === g,
|
|
57
|
+
"aria-checked": f === g,
|
|
58
|
+
"aria-label": `Accent ${g}`,
|
|
59
|
+
className: "settings-shell__swatch",
|
|
60
|
+
style: { backgroundColor: g },
|
|
61
|
+
onClick: () => b(g),
|
|
62
|
+
"data-testid": `settings-swatch-${g}`
|
|
269
63
|
},
|
|
270
|
-
|
|
271
|
-
)
|
|
272
|
-
|
|
273
|
-
] })
|
|
64
|
+
g
|
|
65
|
+
)) })
|
|
66
|
+
] })
|
|
67
|
+
] })
|
|
274
68
|
] });
|
|
275
69
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
initialTab: u,
|
|
285
|
-
initialValues: o
|
|
286
|
-
}) {
|
|
287
|
-
const s = O(), c = s?.state.activeTrigger, d = c?.kind === "card-overflow" ? c.cardId : null, m = be(), h = c?.span, y = t ?? h ?? 1, p = i[0] ?? "threshold", [v, T] = R.useState(u ?? p);
|
|
288
|
-
R.useEffect(() => {
|
|
289
|
-
i.includes(v) || T(p);
|
|
290
|
-
}, [i, v, p]);
|
|
291
|
-
const b = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, _ = typeof b.threshold == "number" ? b.threshold : typeof o?.threshold == "number" ? o.threshold : 80, x = typeof b.timeframe == "number" ? b.timeframe : typeof o?.timeframe == "number" ? o.timeframe : 30, $ = typeof b.accent == "string" ? b.accent : typeof o?.accent == "string" ? o.accent : null, F = Array.isArray(b.slots) ? b.slots : Array.isArray(o?.slots) ? o.slots : lt, E = typeof b.thresholdEnabled == "boolean" ? b.thresholdEnabled : typeof o?.thresholdEnabled == "boolean" ? o.thresholdEnabled : !1, L = typeof b.accentEnabled == "boolean" ? b.accentEnabled : typeof o?.accentEnabled == "boolean" ? o.accentEnabled : !1, W = (w) => {
|
|
292
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(w.target.value) });
|
|
293
|
-
}, G = (w) => {
|
|
294
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(w.target.value) });
|
|
295
|
-
}, ie = (w) => {
|
|
296
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: w });
|
|
297
|
-
}, j = (w) => {
|
|
298
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: w });
|
|
299
|
-
}, Z = (w) => {
|
|
300
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "thresholdEnabled", value: w });
|
|
301
|
-
}, g = (w) => {
|
|
302
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accentEnabled", value: w });
|
|
303
|
-
}, N = s?.state.isDirty ?? !1, P = d, k = () => {
|
|
304
|
-
P != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: P });
|
|
305
|
-
}, [D, U] = R.useState(0), Ae = () => {
|
|
306
|
-
U((w) => w + 1), s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
|
|
307
|
-
}, xe = R.useCallback(() => {
|
|
308
|
-
}, []);
|
|
309
|
-
return /* @__PURE__ */ a(
|
|
310
|
-
K,
|
|
311
|
-
{
|
|
312
|
-
variant: "with-stage",
|
|
313
|
-
onClose: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
314
|
-
stage: (
|
|
315
|
-
// M003-S004-MOT-02 — CloneStage wraps CloneCard so the spin-commit
|
|
316
|
-
// gesture has a transform host that does NOT disturb the inner
|
|
317
|
-
// CloneCard's existing sway / span-N geometry. Counter is owned here
|
|
318
|
-
// (Option 3); reptime sees no spinTrigger plumbing.
|
|
319
|
-
/* @__PURE__ */ a(et, { spinTrigger: D, onSpinComplete: xe, children: /* @__PURE__ */ a(je, { span: y, rotating: !m, children: n ?? /* @__PURE__ */ f(q, { children: [
|
|
320
|
-
/* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
|
|
321
|
-
/* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: l })
|
|
322
|
-
] }) }) })
|
|
323
|
-
),
|
|
324
|
-
navigation: /* @__PURE__ */ a(
|
|
325
|
-
De,
|
|
326
|
-
{
|
|
327
|
-
dimensions: i,
|
|
328
|
-
activeTab: v,
|
|
329
|
-
onSelect: T,
|
|
330
|
-
reduced: m
|
|
331
|
-
}
|
|
332
|
-
),
|
|
333
|
-
footer: {
|
|
334
|
-
left: /* @__PURE__ */ a(
|
|
335
|
-
"button",
|
|
336
|
-
{
|
|
337
|
-
id: "btn-reset",
|
|
338
|
-
type: "button",
|
|
339
|
-
className: "gloss-panel-chrome-v2__footer-btn",
|
|
340
|
-
disabled: !N,
|
|
341
|
-
onClick: k,
|
|
342
|
-
children: "Reset"
|
|
343
|
-
}
|
|
344
|
-
),
|
|
345
|
-
right: /* @__PURE__ */ a(
|
|
346
|
-
"button",
|
|
347
|
-
{
|
|
348
|
-
id: "settings-apply",
|
|
349
|
-
type: "button",
|
|
350
|
-
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
351
|
-
disabled: !N,
|
|
352
|
-
onClick: Ae,
|
|
353
|
-
children: "Apply"
|
|
354
|
-
}
|
|
355
|
-
)
|
|
356
|
-
},
|
|
357
|
-
children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ f(
|
|
358
|
-
"div",
|
|
359
|
-
{
|
|
360
|
-
role: "tabpanel",
|
|
361
|
-
id: `settings-tabpanel-${v}`,
|
|
362
|
-
"aria-label": "Settings dimension controls",
|
|
363
|
-
tabIndex: 0,
|
|
364
|
-
className: "settings-shell__tabpanel",
|
|
365
|
-
children: [
|
|
366
|
-
v === "threshold" && /* @__PURE__ */ a(
|
|
367
|
-
tt,
|
|
368
|
-
{
|
|
369
|
-
value: _,
|
|
370
|
-
onChange: W,
|
|
371
|
-
enabled: E,
|
|
372
|
-
onToggleEnabled: Z
|
|
373
|
-
}
|
|
374
|
-
),
|
|
375
|
-
v === "timeframe" && /* @__PURE__ */ a(nt, { value: x, onChange: G }),
|
|
376
|
-
v === "slots" && /* @__PURE__ */ a(st, { value: F, onChange: j }),
|
|
377
|
-
v === "color" && /* @__PURE__ */ a(
|
|
378
|
-
ot,
|
|
379
|
-
{
|
|
380
|
-
value: $,
|
|
381
|
-
onSelect: ie,
|
|
382
|
-
enabled: L,
|
|
383
|
-
onToggleEnabled: g
|
|
384
|
-
}
|
|
385
|
-
)
|
|
386
|
-
]
|
|
387
|
-
}
|
|
388
|
-
) })
|
|
389
|
-
}
|
|
390
|
-
);
|
|
391
|
-
}
|
|
392
|
-
const _e = [
|
|
393
|
-
"Revenue",
|
|
394
|
-
"Order flow",
|
|
395
|
-
"Rep performance",
|
|
396
|
-
"Brand portfolio",
|
|
397
|
-
"Account coverage",
|
|
398
|
-
"Commission"
|
|
399
|
-
], Ce = "Revenue", Ne = {
|
|
400
|
-
Revenue: {
|
|
401
|
-
headline: "Are we hitting our number?",
|
|
402
|
-
helper: "Top-line sales, growth, average order value, and pace-to-plan signals."
|
|
403
|
-
},
|
|
404
|
-
"Order flow": {
|
|
405
|
-
headline: "Are orders flowing through?",
|
|
406
|
-
helper: "Daily activity, pipeline, unassigned work, and cancel-rate health."
|
|
407
|
-
},
|
|
408
|
-
"Rep performance": {
|
|
409
|
-
headline: "How are my reps performing?",
|
|
410
|
-
helper: "Quota attainment, leaderboards, and activity flags across the rep team."
|
|
411
|
-
},
|
|
412
|
-
"Brand portfolio": {
|
|
413
|
-
headline: "Which brands matter?",
|
|
414
|
-
helper: "Manufacturer mix, top performers, and emerging line health."
|
|
415
|
-
},
|
|
416
|
-
"Account coverage": {
|
|
417
|
-
headline: "Where are the gaps?",
|
|
418
|
-
helper: "New, active, inactive, and at-risk customer accounts."
|
|
419
|
-
},
|
|
420
|
-
Commission: {
|
|
421
|
-
headline: "What's our commission rate?",
|
|
422
|
-
helper: "Outstanding balances, aging buckets, and effective commission yield."
|
|
423
|
-
}
|
|
424
|
-
}, Se = {
|
|
425
|
-
Revenue: {
|
|
426
|
-
primary: [
|
|
427
|
-
{
|
|
428
|
-
id: "agency-sales",
|
|
429
|
-
label: "Sales",
|
|
430
|
-
value: "$892,450",
|
|
431
|
-
desc: "Agency total sales with trend sparkline",
|
|
432
|
-
cardType: "sparkline",
|
|
433
|
-
sparklineData: [620, 640, 680, 700, 740, 760, 790, 820, 850, 892],
|
|
434
|
-
prefix: "$",
|
|
435
|
-
startHere: !0
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
id: "agency-sales-stacked",
|
|
439
|
-
label: "Sales",
|
|
440
|
-
value: "$892,450",
|
|
441
|
-
desc: "Agency sales across three timeframes at a glance (MTD shown)",
|
|
442
|
-
variants: ["1×3"],
|
|
443
|
-
subStats: [
|
|
444
|
-
{ label: "MTD", value: "$892K" },
|
|
445
|
-
{ label: "QTD", value: "$2.4M" },
|
|
446
|
-
{ label: "YTD", value: "$8.6M" }
|
|
447
|
-
],
|
|
448
|
-
cardType: "stacked-group",
|
|
449
|
-
stackedTimeframes: ["MTD", "QTD", "YTD"]
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
id: "agency-growth",
|
|
453
|
-
label: "Sales Growth",
|
|
454
|
-
value: "+18%",
|
|
455
|
-
desc: "Year-over-year agency sales growth rate",
|
|
456
|
-
cardType: "standard",
|
|
457
|
-
suffix: "%",
|
|
458
|
-
trend: { value: 18, direction: "up" }
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
id: "agency-aov",
|
|
462
|
-
label: "Avg Order",
|
|
463
|
-
value: "$2,340",
|
|
464
|
-
desc: "Average order value with trend sparkline",
|
|
465
|
-
cardType: "sparkline",
|
|
466
|
-
sparklineData: [2100, 2150, 2200, 2180, 2250, 2280, 2300, 2320, 2335, 2340],
|
|
467
|
-
prefix: "$"
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
id: "agency-aov-stacked",
|
|
471
|
-
label: "Avg Order",
|
|
472
|
-
value: "$2,340",
|
|
473
|
-
desc: "Average order value across three timeframes",
|
|
474
|
-
variants: ["1×3"],
|
|
475
|
-
subStats: [
|
|
476
|
-
{ label: "MTD", value: "$2,340" },
|
|
477
|
-
{ label: "QTD", value: "$2,280" },
|
|
478
|
-
{ label: "YTD", value: "$2,210" }
|
|
479
|
-
],
|
|
480
|
-
cardType: "stacked-group",
|
|
481
|
-
stackedTimeframes: ["MTD", "QTD", "YTD"]
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
id: "agency-conversion",
|
|
485
|
-
label: "Conversion",
|
|
486
|
-
value: "68%",
|
|
487
|
-
desc: "Order completion rate vs cancellations",
|
|
488
|
-
cardType: "donut",
|
|
489
|
-
donutValue: 0.68,
|
|
490
|
-
accentColor: "#10b981",
|
|
491
|
-
suffix: "%"
|
|
492
|
-
}
|
|
493
|
-
],
|
|
494
|
-
secondary: [
|
|
495
|
-
{
|
|
496
|
-
id: "agency-revenue-compact",
|
|
497
|
-
label: "Total Revenue",
|
|
498
|
-
value: "$892,450",
|
|
499
|
-
desc: "Agency revenue with sparkline trend",
|
|
500
|
-
cardType: "sparkline",
|
|
501
|
-
sparklineData: [620, 660, 700, 740, 780, 820, 860, 892],
|
|
502
|
-
prefix: "$"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
id: "agency-yoy-versus",
|
|
506
|
-
label: "YoY Comparison",
|
|
507
|
-
value: "$892K",
|
|
508
|
-
desc: "TY vs LY sales side-by-side",
|
|
509
|
-
cardType: "versus",
|
|
510
|
-
comparison: {
|
|
511
|
-
current: { value: "$892K", label: "This year" },
|
|
512
|
-
prior: { value: "$724K", label: "Last year" }
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
id: "agency-revenue-by-mfr",
|
|
517
|
-
label: "Mfr Revenue",
|
|
518
|
-
value: "$892K",
|
|
519
|
-
desc: "Revenue mix across top manufacturers",
|
|
520
|
-
cardType: "segmented",
|
|
521
|
-
segments: [
|
|
522
|
-
{ label: "A", value: 35, color: "#7c3aed" },
|
|
523
|
-
{ label: "B", value: 28, color: "#1d6fd8" },
|
|
524
|
-
{ label: "C", value: 22, color: "#10b981" },
|
|
525
|
-
{ label: "D", value: 15, color: "#f59e0b" }
|
|
526
|
-
]
|
|
527
|
-
}
|
|
528
|
-
]
|
|
529
|
-
},
|
|
530
|
-
"Order flow": {
|
|
531
|
-
primary: [
|
|
532
|
-
{
|
|
533
|
-
id: "agency-activity",
|
|
534
|
-
label: "Orders",
|
|
535
|
-
value: "47 Orders",
|
|
536
|
-
desc: "Daily team order count with bar chart",
|
|
537
|
-
cardType: "bars",
|
|
538
|
-
barData: [12, 18, 15, 22, 19, 25, 28],
|
|
539
|
-
startHere: !0
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
id: "agency-orders-compact",
|
|
543
|
-
label: "Order Count",
|
|
544
|
-
value: "156",
|
|
545
|
-
desc: "Total order count with bar chart trend",
|
|
546
|
-
cardType: "bars",
|
|
547
|
-
barData: [18, 22, 19, 24, 26, 23, 28]
|
|
548
|
-
},
|
|
549
|
-
{
|
|
550
|
-
id: "agency-orders-stacked",
|
|
551
|
-
label: "Orders",
|
|
552
|
-
value: "156",
|
|
553
|
-
desc: "Order count across three timeframes",
|
|
554
|
-
variants: ["1×3"],
|
|
555
|
-
subStats: [
|
|
556
|
-
{ label: "MTD", value: "156" },
|
|
557
|
-
{ label: "QTD", value: "482" },
|
|
558
|
-
{ label: "YTD", value: "1,847" }
|
|
559
|
-
],
|
|
560
|
-
cardType: "stacked-group",
|
|
561
|
-
stackedTimeframes: ["MTD", "QTD", "YTD"]
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
id: "agency-order-pipeline-value",
|
|
565
|
-
label: "Pipeline Value",
|
|
566
|
-
value: "$284,500",
|
|
567
|
-
desc: "Open + transmitted order $ pipeline",
|
|
568
|
-
cardType: "standard",
|
|
569
|
-
prefix: "$"
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
id: "agency-unassigned-orders",
|
|
573
|
-
label: "Unassigned",
|
|
574
|
-
value: "0",
|
|
575
|
-
desc: "Orders awaiting salesperson assignment",
|
|
576
|
-
cardType: "standard"
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
id: "agency-cancel-rate",
|
|
580
|
-
label: "Cancel Rate",
|
|
581
|
-
value: "4.2%",
|
|
582
|
-
desc: "Order cancel-rate percentage (warn-tinted highlight)",
|
|
583
|
-
cardType: "highlight",
|
|
584
|
-
highlightColor: "#f59e0b",
|
|
585
|
-
suffix: "%"
|
|
586
|
-
}
|
|
587
|
-
]
|
|
588
|
-
},
|
|
589
|
-
"Rep performance": {
|
|
590
|
-
primary: [
|
|
591
|
-
{
|
|
592
|
-
id: "agency-top-rep",
|
|
593
|
-
label: "#1 Rep",
|
|
594
|
-
value: "Sarah Mitchell",
|
|
595
|
-
desc: "Top-performing rep on the team this period",
|
|
596
|
-
cardType: "name",
|
|
597
|
-
startHere: !0
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
id: "agency-quota",
|
|
601
|
-
label: "Below Quota",
|
|
602
|
-
value: "3 of 12",
|
|
603
|
-
desc: "Reps currently tracking under their quota",
|
|
604
|
-
cardType: "ratio",
|
|
605
|
-
numerator: 3,
|
|
606
|
-
denominator: 12
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
id: "agency-rep-leaderboard-sales",
|
|
610
|
-
label: "Rep Sales",
|
|
611
|
-
value: "Top 5",
|
|
612
|
-
desc: "Sales leaderboard across the rep team",
|
|
613
|
-
cardType: "leaderboard",
|
|
614
|
-
catalogValue: "Top 5"
|
|
615
|
-
}
|
|
616
|
-
]
|
|
617
|
-
},
|
|
618
|
-
"Brand portfolio": {
|
|
619
|
-
primary: [
|
|
620
|
-
{
|
|
621
|
-
id: "agency-mfr-mix",
|
|
622
|
-
label: "Mfr Mix",
|
|
623
|
-
value: "$892K",
|
|
624
|
-
desc: "Revenue mix by manufacturer (segmented bar)",
|
|
625
|
-
cardType: "segmented",
|
|
626
|
-
segments: [
|
|
627
|
-
{ label: "A", value: 35, color: "#7c3aed" },
|
|
628
|
-
{ label: "B", value: 28, color: "#1d6fd8" },
|
|
629
|
-
{ label: "C", value: 22, color: "#10b981" },
|
|
630
|
-
{ label: "D", value: 15, color: "#f59e0b" }
|
|
631
|
-
],
|
|
632
|
-
startHere: !0
|
|
633
|
-
},
|
|
634
|
-
{
|
|
635
|
-
id: "agency-mfr-new-line",
|
|
636
|
-
label: "New Mfrs",
|
|
637
|
-
value: "3",
|
|
638
|
-
desc: "New manufacturer count for the period",
|
|
639
|
-
cardType: "standard"
|
|
640
|
-
}
|
|
641
|
-
]
|
|
642
|
-
},
|
|
643
|
-
"Account coverage": {
|
|
644
|
-
primary: [
|
|
645
|
-
{
|
|
646
|
-
id: "agency-new-accounts",
|
|
647
|
-
label: "New Accounts",
|
|
648
|
-
value: "12",
|
|
649
|
-
desc: "New customer accounts opened this period",
|
|
650
|
-
cardType: "standard",
|
|
651
|
-
startHere: !0
|
|
652
|
-
},
|
|
653
|
-
{
|
|
654
|
-
id: "agency-customers-compact",
|
|
655
|
-
label: "Customers",
|
|
656
|
-
value: "287",
|
|
657
|
-
desc: "Active customer count with bar chart trend",
|
|
658
|
-
cardType: "bars",
|
|
659
|
-
barData: [240, 250, 260, 270, 275, 280, 287]
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
id: "agency-inactive-accounts",
|
|
663
|
-
label: "Inactive Act",
|
|
664
|
-
value: "5",
|
|
665
|
-
desc: "Inactive customer-account count (warn-tinted)",
|
|
666
|
-
cardType: "highlight",
|
|
667
|
-
highlightColor: "#f59e0b"
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
id: "agency-account-churn",
|
|
671
|
-
label: "Account Churn",
|
|
672
|
-
value: "8%",
|
|
673
|
-
desc: "Customer churn rate (LY-active not TY-active)",
|
|
674
|
-
cardType: "standard",
|
|
675
|
-
suffix: "%"
|
|
676
|
-
}
|
|
677
|
-
]
|
|
678
|
-
},
|
|
679
|
-
Commission: {
|
|
680
|
-
primary: [
|
|
681
|
-
{
|
|
682
|
-
id: "agency-outstanding",
|
|
683
|
-
label: "Outstanding",
|
|
684
|
-
value: "$24,500",
|
|
685
|
-
desc: "Unpaid order balance across all accounts",
|
|
686
|
-
cardType: "standard",
|
|
687
|
-
prefix: "$",
|
|
688
|
-
startHere: !0
|
|
689
|
-
},
|
|
690
|
-
{
|
|
691
|
-
id: "agency-commission-rate",
|
|
692
|
-
label: "Commission",
|
|
693
|
-
value: "8.4%",
|
|
694
|
-
desc: "Effective commission rate %",
|
|
695
|
-
cardType: "standard",
|
|
696
|
-
suffix: "%"
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
id: "agency-commission-aging",
|
|
700
|
-
label: "Commission Aging",
|
|
701
|
-
value: "$24K",
|
|
702
|
-
desc: "Unpaid commission aging by buckets",
|
|
703
|
-
cardType: "bars",
|
|
704
|
-
barData: [4, 8, 7, 5]
|
|
705
|
-
}
|
|
706
|
-
]
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
function Ee({
|
|
710
|
-
lenses: e,
|
|
711
|
-
activeLens: t,
|
|
712
|
-
onLensChange: r,
|
|
713
|
-
variant: l = "pills",
|
|
714
|
-
lensMeta: n = Ne
|
|
715
|
-
}) {
|
|
716
|
-
return l === "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) => {
|
|
717
|
-
const u = i === t, o = n[i], s = ["cat-pill"];
|
|
718
|
-
return u && s.push("active"), /* @__PURE__ */ f(
|
|
719
|
-
"button",
|
|
720
|
-
{
|
|
721
|
-
type: "button",
|
|
722
|
-
role: "tab",
|
|
723
|
-
"aria-selected": u,
|
|
724
|
-
className: s.join(" "),
|
|
725
|
-
"data-lens": i,
|
|
726
|
-
onClick: () => {
|
|
727
|
-
u || r(i);
|
|
728
|
-
},
|
|
729
|
-
children: [
|
|
730
|
-
i,
|
|
731
|
-
o?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
|
|
732
|
-
]
|
|
733
|
-
},
|
|
734
|
-
i
|
|
735
|
-
);
|
|
736
|
-
}) }) }) : /* @__PURE__ */ a(ct, { lenses: e, activeLens: t, onLensChange: r });
|
|
737
|
-
}
|
|
738
|
-
function ct({
|
|
739
|
-
lenses: e,
|
|
740
|
-
activeLens: t,
|
|
741
|
-
onLensChange: r
|
|
742
|
-
}) {
|
|
743
|
-
const [l, n] = A(!1), i = Q(null), u = () => {
|
|
744
|
-
i.current != null && (window.clearTimeout(i.current), i.current = null);
|
|
745
|
-
}, o = () => {
|
|
746
|
-
u(), i.current = window.setTimeout(() => n(!1), 100);
|
|
747
|
-
}, s = e.filter((c) => c !== t);
|
|
748
|
-
return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ f("div", { className: "cat-segmented", children: [
|
|
749
|
-
/* @__PURE__ */ a(
|
|
70
|
+
function K({ lenses: e, activeLens: t, onLensChange: o }) {
|
|
71
|
+
const [n, a] = y(!1), r = B(null), d = () => {
|
|
72
|
+
r.current != null && (window.clearTimeout(r.current), r.current = null);
|
|
73
|
+
}, l = () => {
|
|
74
|
+
d(), r.current = window.setTimeout(() => a(!1), 100);
|
|
75
|
+
}, i = e.filter((c) => c !== t);
|
|
76
|
+
return /* @__PURE__ */ s("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ h("div", { className: "cat-segmented", children: [
|
|
77
|
+
/* @__PURE__ */ s(
|
|
750
78
|
"button",
|
|
751
79
|
{
|
|
752
80
|
type: "button",
|
|
@@ -756,31 +84,31 @@ function ct({
|
|
|
756
84
|
children: t
|
|
757
85
|
}
|
|
758
86
|
),
|
|
759
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ h(
|
|
760
88
|
"div",
|
|
761
89
|
{
|
|
762
90
|
className: "cat-seg-more",
|
|
763
91
|
onMouseEnter: () => {
|
|
764
|
-
|
|
92
|
+
d(), a(!0);
|
|
765
93
|
},
|
|
766
|
-
onMouseLeave:
|
|
94
|
+
onMouseLeave: l,
|
|
767
95
|
children: [
|
|
768
|
-
/* @__PURE__ */
|
|
769
|
-
|
|
96
|
+
/* @__PURE__ */ s("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": n, children: "More ▾" }),
|
|
97
|
+
n && /* @__PURE__ */ s(
|
|
770
98
|
"div",
|
|
771
99
|
{
|
|
772
100
|
className: "cat-seg-overflow",
|
|
773
101
|
role: "menu",
|
|
774
|
-
onMouseEnter:
|
|
775
|
-
onMouseLeave:
|
|
776
|
-
children:
|
|
102
|
+
onMouseEnter: d,
|
|
103
|
+
onMouseLeave: l,
|
|
104
|
+
children: i.map((c) => /* @__PURE__ */ s(
|
|
777
105
|
"button",
|
|
778
106
|
{
|
|
779
107
|
type: "button",
|
|
780
108
|
"data-lens": c,
|
|
781
109
|
role: "menuitem",
|
|
782
110
|
onClick: () => {
|
|
783
|
-
|
|
111
|
+
o(c), a(!1);
|
|
784
112
|
},
|
|
785
113
|
children: c
|
|
786
114
|
},
|
|
@@ -793,87 +121,50 @@ function ct({
|
|
|
793
121
|
)
|
|
794
122
|
] }) });
|
|
795
123
|
}
|
|
796
|
-
function ae(
|
|
797
|
-
return
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
Number.isFinite(h) && (d = Math.max(0, Math.min(1, h / 100)));
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
return /* @__PURE__ */ f(
|
|
124
|
+
function ae(e) {
|
|
125
|
+
return e.split("·").map((t, o) => {
|
|
126
|
+
const n = t.trim(), a = n.match(/^([$+\-]?[\d,]+(?:\.\d+)?[%+]?)\s*(.*)$/), r = a ? a[1] : "", d = a ? a[2] : n;
|
|
127
|
+
return /* @__PURE__ */ h("span", { children: [
|
|
128
|
+
/* @__PURE__ */ s("strong", { children: r }),
|
|
129
|
+
/* @__PURE__ */ s("small", { children: d })
|
|
130
|
+
] }, o);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function j({ tiles: e, selectedTileId: t, onSelectTile: o }) {
|
|
134
|
+
return /* @__PURE__ */ s("div", { className: "cat-tiles", children: e.map((n) => {
|
|
135
|
+
const a = n.id === t, r = n.stack === !0, d = ["cat-tile"];
|
|
136
|
+
return r && d.push("span-2"), a && d.push("selected"), /* @__PURE__ */ h(
|
|
813
137
|
"button",
|
|
814
138
|
{
|
|
815
139
|
type: "button",
|
|
816
|
-
className:
|
|
140
|
+
className: d.join(" "),
|
|
817
141
|
"data-metric": n.id,
|
|
818
142
|
"data-desc": n.desc,
|
|
819
|
-
"
|
|
820
|
-
|
|
821
|
-
"data-accent": n.accent,
|
|
822
|
-
"aria-pressed": i,
|
|
823
|
-
onClick: () => r(n.id, n.desc),
|
|
824
|
-
style: n.accent ? { "--cat-tile-accent": n.accent } : void 0,
|
|
143
|
+
"aria-pressed": a,
|
|
144
|
+
onClick: () => o(n.id, n.desc),
|
|
825
145
|
children: [
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
{
|
|
830
|
-
className: "cat-tile-primitive-wrapper gloss-metric-card",
|
|
831
|
-
"data-col-span": "1",
|
|
832
|
-
style: { pointerEvents: "none", width: "100%", height: "100%" },
|
|
833
|
-
"aria-hidden": "true",
|
|
834
|
-
children: n.donut ? /* @__PURE__ */ a(
|
|
835
|
-
pe,
|
|
836
|
-
{
|
|
837
|
-
variant: "donut",
|
|
838
|
-
label: n.label,
|
|
839
|
-
value: n.value,
|
|
840
|
-
donutValue: d,
|
|
841
|
-
donutMax: 1,
|
|
842
|
-
accentColor: n.accent,
|
|
843
|
-
colSpan: c
|
|
844
|
-
}
|
|
845
|
-
) : /* @__PURE__ */ a(
|
|
846
|
-
pe,
|
|
847
|
-
{
|
|
848
|
-
variant: "standard",
|
|
849
|
-
label: n.label,
|
|
850
|
-
value: n.value,
|
|
851
|
-
colSpan: c
|
|
852
|
-
}
|
|
853
|
-
)
|
|
854
|
-
}
|
|
855
|
-
),
|
|
856
|
-
n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((m) => /* @__PURE__ */ a("span", { children: m }, m)) }),
|
|
857
|
-
n.isNew && /* @__PURE__ */ a("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
|
|
146
|
+
/* @__PURE__ */ s("span", { className: "cat-tile-label", children: n.label }),
|
|
147
|
+
/* @__PURE__ */ s("span", { className: "cat-tile-value", children: r ? ae(n.value) : n.value }),
|
|
148
|
+
n.variants && n.variants.length > 0 && /* @__PURE__ */ s("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((l) => /* @__PURE__ */ s("span", { children: l }, l)) })
|
|
858
149
|
]
|
|
859
150
|
},
|
|
860
151
|
n.id
|
|
861
152
|
);
|
|
862
153
|
}) });
|
|
863
154
|
}
|
|
864
|
-
const
|
|
865
|
-
function
|
|
866
|
-
return
|
|
867
|
-
}
|
|
868
|
-
function
|
|
869
|
-
const
|
|
870
|
-
if (
|
|
871
|
-
const
|
|
872
|
-
return /* @__PURE__ */
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
876
|
-
/* @__PURE__ */
|
|
155
|
+
const k = H(null);
|
|
156
|
+
function re() {
|
|
157
|
+
return U(k);
|
|
158
|
+
}
|
|
159
|
+
function le({ mode: e, dispatch: t }) {
|
|
160
|
+
const o = re();
|
|
161
|
+
if (o == null && e == null) return null;
|
|
162
|
+
const n = o?.mode ?? e ?? "add", a = o?.selectedTileId ?? null, r = o?.description ?? null, d = a == null;
|
|
163
|
+
return /* @__PURE__ */ h("div", { className: "panel-footer catalog", children: [
|
|
164
|
+
/* @__PURE__ */ s("div", { className: "cat-description", id: "cat-desc", children: r ?? /* @__PURE__ */ s("em", { children: "Tap a metric to see its description" }) }),
|
|
165
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
|
|
166
|
+
/* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
|
|
167
|
+
/* @__PURE__ */ s(
|
|
877
168
|
"button",
|
|
878
169
|
{
|
|
879
170
|
id: "btn-cat-cancel",
|
|
@@ -883,24 +174,24 @@ function Vt({ mode: e, dispatch: t }) {
|
|
|
883
174
|
children: "Cancel"
|
|
884
175
|
}
|
|
885
176
|
),
|
|
886
|
-
|
|
177
|
+
n === "add" && /* @__PURE__ */ s(
|
|
887
178
|
"button",
|
|
888
179
|
{
|
|
889
180
|
id: "btn-cat-add",
|
|
890
181
|
type: "button",
|
|
891
182
|
className: "btn btn-primary",
|
|
892
|
-
disabled:
|
|
183
|
+
disabled: d,
|
|
893
184
|
onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
894
185
|
children: "Add metric"
|
|
895
186
|
}
|
|
896
187
|
),
|
|
897
|
-
|
|
188
|
+
n === "replace" && /* @__PURE__ */ s(
|
|
898
189
|
"button",
|
|
899
190
|
{
|
|
900
191
|
id: "btn-cat-replace",
|
|
901
192
|
type: "button",
|
|
902
193
|
className: "btn btn-primary",
|
|
903
|
-
disabled:
|
|
194
|
+
disabled: d,
|
|
904
195
|
onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
905
196
|
children: "Replace metric"
|
|
906
197
|
}
|
|
@@ -908,220 +199,192 @@ function Vt({ mode: e, dispatch: t }) {
|
|
|
908
199
|
] })
|
|
909
200
|
] });
|
|
910
201
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
202
|
+
const W = [
|
|
203
|
+
"Revenue",
|
|
204
|
+
"Order flow",
|
|
205
|
+
"Rep performance",
|
|
206
|
+
"Brand portfolio",
|
|
207
|
+
"Account coverage",
|
|
208
|
+
"Commission"
|
|
209
|
+
], G = "Order flow", Q = {
|
|
210
|
+
Revenue: [
|
|
211
|
+
{ id: "rev-mtd", label: "Revenue MTD", value: "$184K", desc: "Month-to-date revenue across all manufacturers and territories." },
|
|
212
|
+
{ id: "rev-ytd", label: "Revenue YTD", value: "$2.1M", desc: "Year-to-date revenue including pending and posted orders.", variants: ["1×1", "1×3"] },
|
|
213
|
+
{ id: "rev-yoy", label: "YoY Δ", value: "+12.4%", desc: "Revenue growth versus the prior comparable period." },
|
|
214
|
+
{ id: "rev-avg", label: "Avg order", value: "$1,820", desc: "Average order value over the last 30 days." }
|
|
215
|
+
],
|
|
216
|
+
"Order flow": [
|
|
217
|
+
{
|
|
218
|
+
id: "of-funnel",
|
|
219
|
+
label: "Order funnel",
|
|
220
|
+
value: "New 42 · Incomplete 18 · Transmitted 91",
|
|
221
|
+
stack: !0,
|
|
222
|
+
desc: "Funnel snapshot — new orders, incomplete (awaiting attention), and transmitted to manufacturer.",
|
|
223
|
+
variants: ["1×3"]
|
|
224
|
+
},
|
|
225
|
+
{ id: "of-incomplete", label: "Incomplete", value: "18", desc: "Orders started but not yet transmitted." },
|
|
226
|
+
{ id: "of-transmitted", label: "Transmitted", value: "91", desc: "Orders successfully sent to manufacturer." },
|
|
227
|
+
{ id: "of-today", label: "New today", value: "7", desc: "Orders created in the current calendar day." },
|
|
228
|
+
{ id: "of-velocity", label: "Order velocity", value: "+3.1/d", desc: "Rolling 7-day order-creation rate change." }
|
|
229
|
+
],
|
|
230
|
+
"Rep performance": [
|
|
231
|
+
{ id: "rp-leader", label: "#1 Rep", value: "A. Chen", desc: "Top revenue performer in the current period." },
|
|
232
|
+
{ id: "rp-quota", label: "Below quota", value: "4 reps", desc: "Reps currently tracking below pace-to-quota." },
|
|
233
|
+
{ id: "rp-commission", label: "Commission pace", value: "$48K", desc: "Projected commission pool at current burn rate." },
|
|
234
|
+
{ id: "rp-active", label: "Active reps", value: "14", desc: "Reps with at least one order this period." }
|
|
235
|
+
],
|
|
236
|
+
"Brand portfolio": [
|
|
237
|
+
{ id: "bp-top", label: "Top brand", value: "Acme Co.", desc: "Highest-revenue manufacturer this period." },
|
|
238
|
+
{ id: "bp-mix", label: "Mix Δ", value: "+2pp", desc: "Portfolio mix shift versus the prior period." },
|
|
239
|
+
{ id: "bp-coverage", label: "Brand coverage", value: "73%", desc: "Percent of accounts with at least one active brand." },
|
|
240
|
+
{ id: "bp-new", label: "New brand adds", value: "3", desc: "Brands with first-order activity this period." }
|
|
241
|
+
],
|
|
242
|
+
"Account coverage": [
|
|
243
|
+
{ id: "ac-active", label: "Active accounts", value: "128", desc: "Accounts with at least one order in the period." },
|
|
244
|
+
{ id: "ac-untouched", label: "Untouched", value: "34", desc: "Accounts with zero activity in the period." },
|
|
245
|
+
{ id: "ac-concentration", label: "Concentration", value: "38% top-5", desc: "Revenue concentration in top-5 accounts." },
|
|
246
|
+
{ id: "ac-new", label: "New accounts", value: "6", desc: "Accounts with first-ever order this period." }
|
|
247
|
+
],
|
|
248
|
+
Commission: [
|
|
249
|
+
{ id: "cm-projected", label: "Projected", value: "$48K", desc: "Forecast commission at current pace." },
|
|
250
|
+
{ id: "cm-paid", label: "Paid", value: "$31K", desc: "Commission posted to ledger this period." },
|
|
251
|
+
{ id: "cm-pending", label: "Pending", value: "$17K", desc: "Commission earned but not yet posted." },
|
|
252
|
+
{ id: "cm-rate", label: "Effective rate", value: "6.8%", desc: "Realized commission rate across all orders." }
|
|
253
|
+
]
|
|
254
|
+
};
|
|
255
|
+
function Te({
|
|
926
256
|
isOpen: e,
|
|
927
|
-
lenses: t =
|
|
928
|
-
defaultLens:
|
|
929
|
-
tilesByLens:
|
|
930
|
-
|
|
931
|
-
renderTile: i,
|
|
932
|
-
onAdd: u
|
|
257
|
+
lenses: t = W,
|
|
258
|
+
defaultLens: o = G,
|
|
259
|
+
tilesByLens: n = Q,
|
|
260
|
+
footerSlot: a
|
|
933
261
|
}) {
|
|
934
|
-
const
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
), _ = ce(
|
|
938
|
-
() => (T.secondary ?? []).filter((E) => me(E, p)),
|
|
939
|
-
[T.secondary, p]
|
|
940
|
-
), x = () => {
|
|
941
|
-
d != null && u?.(d), o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
|
|
942
|
-
}, $ = () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), F = d == null;
|
|
943
|
-
return /* @__PURE__ */ a(
|
|
944
|
-
re.Provider,
|
|
262
|
+
const [r, d] = y(o), [l, i] = y(null), [c, u] = y(null), m = n[r] ?? [];
|
|
263
|
+
return /* @__PURE__ */ h(
|
|
264
|
+
k.Provider,
|
|
945
265
|
{
|
|
946
|
-
value: { mode: "add", selectedTileId:
|
|
947
|
-
children:
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
{
|
|
958
|
-
id: "btn-cat-add",
|
|
959
|
-
type: "button",
|
|
960
|
-
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
961
|
-
disabled: F,
|
|
962
|
-
onClick: x,
|
|
963
|
-
children: "Add metric"
|
|
964
|
-
}
|
|
965
|
-
)
|
|
966
|
-
},
|
|
967
|
-
children: /* @__PURE__ */ f("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
|
|
968
|
-
/* @__PURE__ */ a("div", { className: "cat-search", children: /* @__PURE__ */ a(
|
|
969
|
-
"input",
|
|
970
|
-
{
|
|
971
|
-
type: "search",
|
|
972
|
-
className: "cat-search-input",
|
|
973
|
-
placeholder: "Search metrics",
|
|
974
|
-
"aria-label": "Search metrics",
|
|
975
|
-
value: p,
|
|
976
|
-
onChange: (E) => v(E.target.value)
|
|
977
|
-
}
|
|
978
|
-
) }),
|
|
979
|
-
/* @__PURE__ */ a(
|
|
980
|
-
Ee,
|
|
981
|
-
{
|
|
982
|
-
lenses: t,
|
|
983
|
-
activeLens: s,
|
|
984
|
-
lensMeta: n,
|
|
985
|
-
variant: "pills",
|
|
986
|
-
onLensChange: (E) => {
|
|
987
|
-
c(E), m(null), y(null), v("");
|
|
988
|
-
}
|
|
266
|
+
value: { mode: "add", selectedTileId: l, description: c },
|
|
267
|
+
children: [
|
|
268
|
+
/* @__PURE__ */ h("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
|
|
269
|
+
/* @__PURE__ */ s("h3", { children: "Add a metric" }),
|
|
270
|
+
/* @__PURE__ */ s(
|
|
271
|
+
K,
|
|
272
|
+
{
|
|
273
|
+
lenses: t,
|
|
274
|
+
activeLens: r,
|
|
275
|
+
onLensChange: (f) => {
|
|
276
|
+
d(f), i(null), u(null);
|
|
989
277
|
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
{
|
|
998
|
-
|
|
999
|
-
selectedTileId: d,
|
|
1000
|
-
onSelectTile: (E, L) => {
|
|
1001
|
-
m(E), y(L);
|
|
1002
|
-
},
|
|
1003
|
-
renderTile: i
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ s(
|
|
281
|
+
j,
|
|
282
|
+
{
|
|
283
|
+
tiles: m,
|
|
284
|
+
selectedTileId: l,
|
|
285
|
+
onSelectTile: (f, v) => {
|
|
286
|
+
i(f), u(v);
|
|
1004
287
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
{
|
|
1011
|
-
tiles: _,
|
|
1012
|
-
selectedTileId: d,
|
|
1013
|
-
onSelectTile: (E, L) => {
|
|
1014
|
-
m(E), y(L);
|
|
1015
|
-
},
|
|
1016
|
-
renderTile: i
|
|
1017
|
-
}
|
|
1018
|
-
)
|
|
1019
|
-
] }),
|
|
1020
|
-
b.length === 0 && _.length === 0 && p.length > 0 && /* @__PURE__ */ f("div", { className: "cat-empty", children: [
|
|
1021
|
-
'No metrics match "',
|
|
1022
|
-
p,
|
|
1023
|
-
'".'
|
|
1024
|
-
] })
|
|
1025
|
-
] })
|
|
1026
|
-
}
|
|
1027
|
-
)
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
] }),
|
|
291
|
+
a
|
|
292
|
+
]
|
|
1028
293
|
}
|
|
1029
294
|
);
|
|
1030
295
|
}
|
|
1031
|
-
function
|
|
1032
|
-
const t = oe()?.description ?? null;
|
|
1033
|
-
return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(q, { children: t });
|
|
1034
|
-
}
|
|
1035
|
-
function qt({
|
|
296
|
+
function Ie({
|
|
1036
297
|
isOpen: e,
|
|
1037
298
|
replacingLabel: t,
|
|
1038
|
-
lenses:
|
|
1039
|
-
defaultLens:
|
|
1040
|
-
tilesByLens:
|
|
1041
|
-
|
|
299
|
+
lenses: o = W,
|
|
300
|
+
defaultLens: n = G,
|
|
301
|
+
tilesByLens: a = Q,
|
|
302
|
+
footerSlot: r
|
|
1042
303
|
}) {
|
|
1043
|
-
const
|
|
1044
|
-
return /* @__PURE__ */
|
|
1045
|
-
|
|
304
|
+
const [d, l] = y(n), [i, c] = y(null), [u, m] = y(null), f = a[d] ?? [];
|
|
305
|
+
return /* @__PURE__ */ h(
|
|
306
|
+
k.Provider,
|
|
1046
307
|
{
|
|
1047
|
-
value: { mode: "replace", selectedTileId:
|
|
1048
|
-
children:
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
disabled: S,
|
|
1063
|
-
onClick: v,
|
|
1064
|
-
children: "Replace metric"
|
|
1065
|
-
}
|
|
1066
|
-
)
|
|
1067
|
-
},
|
|
1068
|
-
children: /* @__PURE__ */ f("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
|
|
1069
|
-
t && /* @__PURE__ */ f("p", { className: "cat-subtitle", children: [
|
|
1070
|
-
"replacing ",
|
|
1071
|
-
t
|
|
1072
|
-
] }),
|
|
1073
|
-
/* @__PURE__ */ a(
|
|
1074
|
-
Ee,
|
|
1075
|
-
{
|
|
1076
|
-
lenses: r,
|
|
1077
|
-
activeLens: o,
|
|
1078
|
-
onLensChange: (b) => {
|
|
1079
|
-
s(b), d(null), h(null);
|
|
1080
|
-
}
|
|
308
|
+
value: { mode: "replace", selectedTileId: i, description: u },
|
|
309
|
+
children: [
|
|
310
|
+
/* @__PURE__ */ h("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
|
|
311
|
+
/* @__PURE__ */ s("h3", { children: "Replace metric" }),
|
|
312
|
+
t && /* @__PURE__ */ h("p", { className: "cat-subtitle", children: [
|
|
313
|
+
"replacing ",
|
|
314
|
+
t
|
|
315
|
+
] }),
|
|
316
|
+
/* @__PURE__ */ s(
|
|
317
|
+
K,
|
|
318
|
+
{
|
|
319
|
+
lenses: o,
|
|
320
|
+
activeLens: d,
|
|
321
|
+
onLensChange: (v) => {
|
|
322
|
+
l(v), c(null), m(null);
|
|
1081
323
|
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
renderTile: i
|
|
324
|
+
}
|
|
325
|
+
),
|
|
326
|
+
/* @__PURE__ */ s(
|
|
327
|
+
j,
|
|
328
|
+
{
|
|
329
|
+
tiles: f,
|
|
330
|
+
selectedTileId: i,
|
|
331
|
+
onSelectTile: (v, b) => {
|
|
332
|
+
c(v), m(b);
|
|
1092
333
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}
|
|
1096
|
-
|
|
334
|
+
}
|
|
335
|
+
)
|
|
336
|
+
] }),
|
|
337
|
+
r
|
|
338
|
+
]
|
|
1097
339
|
}
|
|
1098
340
|
);
|
|
1099
341
|
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
return
|
|
342
|
+
function ie({ page: e, onRename: t, onKebab: o, onDragStart: n }) {
|
|
343
|
+
const a = ["pm-row"];
|
|
344
|
+
return e.active && a.push("active"), /* @__PURE__ */ h("div", { className: a.join(" "), "data-page-id": e.id, role: "listitem", children: [
|
|
345
|
+
/* @__PURE__ */ s(
|
|
346
|
+
"div",
|
|
347
|
+
{
|
|
348
|
+
className: "pm-handle",
|
|
349
|
+
"aria-hidden": "true",
|
|
350
|
+
onMouseDown: () => n?.(e.id),
|
|
351
|
+
children: "⋮⋮"
|
|
352
|
+
}
|
|
353
|
+
),
|
|
354
|
+
/* @__PURE__ */ s("div", { className: "pm-name", onClick: () => t?.(e.id), children: e.name }),
|
|
355
|
+
/* @__PURE__ */ s(
|
|
356
|
+
"button",
|
|
357
|
+
{
|
|
358
|
+
type: "button",
|
|
359
|
+
className: "pm-kebab",
|
|
360
|
+
"aria-label": "Page options",
|
|
361
|
+
onClick: () => o?.(e.id),
|
|
362
|
+
children: "⋯"
|
|
363
|
+
}
|
|
364
|
+
)
|
|
365
|
+
] });
|
|
366
|
+
}
|
|
367
|
+
const X = H(null);
|
|
368
|
+
function ce() {
|
|
369
|
+
return U(X);
|
|
1103
370
|
}
|
|
1104
|
-
function
|
|
1105
|
-
const
|
|
1106
|
-
return /* @__PURE__ */
|
|
371
|
+
function de(e = {}) {
|
|
372
|
+
const o = ce()?.setPages;
|
|
373
|
+
return /* @__PURE__ */ h(
|
|
1107
374
|
"div",
|
|
1108
375
|
{
|
|
1109
376
|
className: "panel-footer pm",
|
|
1110
377
|
style: { display: "flex", justifyContent: "flex-end", padding: "10px 14px" },
|
|
1111
378
|
children: [
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
|
|
380
|
+
/* @__PURE__ */ s(
|
|
1114
381
|
"button",
|
|
1115
382
|
{
|
|
1116
383
|
id: "btn-new-page",
|
|
1117
384
|
type: "button",
|
|
1118
385
|
className: "btn btn-primary",
|
|
1119
386
|
onClick: () => {
|
|
1120
|
-
|
|
1121
|
-
r();
|
|
1122
|
-
return;
|
|
1123
|
-
}
|
|
1124
|
-
l && l((n) => [
|
|
387
|
+
o && o((n) => [
|
|
1125
388
|
...n,
|
|
1126
389
|
{ id: `new-${Date.now()}`, name: "Untitled", active: !1 }
|
|
1127
390
|
]);
|
|
@@ -1133,566 +396,448 @@ function pt(e = {}) {
|
|
|
1133
396
|
}
|
|
1134
397
|
);
|
|
1135
398
|
}
|
|
1136
|
-
|
|
1137
|
-
const i = Pe(), [u, o] = A(!1), s = Q(null);
|
|
1138
|
-
z(() => {
|
|
1139
|
-
if (!u) return;
|
|
1140
|
-
const p = (v) => {
|
|
1141
|
-
s.current && (s.current.contains(v.target) || o(!1));
|
|
1142
|
-
};
|
|
1143
|
-
return document.addEventListener("mousedown", p, !0), () => document.removeEventListener("mousedown", p, !0);
|
|
1144
|
-
}, [u]);
|
|
1145
|
-
const c = () => {
|
|
1146
|
-
if (o(!1), t) return t(e.id);
|
|
1147
|
-
if (!i?.renamePage) return;
|
|
1148
|
-
const p = window.prompt("Rename page", e.name);
|
|
1149
|
-
p != null && p.trim().length > 0 && i.renamePage(e.id, p.trim());
|
|
1150
|
-
}, d = () => {
|
|
1151
|
-
o(!1), i?.duplicatePage?.(e.id);
|
|
1152
|
-
}, m = () => {
|
|
1153
|
-
o(!1), i?.deletePage?.(e.id);
|
|
1154
|
-
}, h = (p) => {
|
|
1155
|
-
p.stopPropagation(), n && !e.active && n(e.id);
|
|
1156
|
-
}, y = ["pm-row"];
|
|
1157
|
-
return e.active && y.push("active"), /* @__PURE__ */ f("div", { ref: s, className: y.join(" "), "data-page-id": e.id, role: "listitem", children: [
|
|
1158
|
-
/* @__PURE__ */ a(
|
|
1159
|
-
"div",
|
|
1160
|
-
{
|
|
1161
|
-
className: "pm-handle",
|
|
1162
|
-
"aria-hidden": "true",
|
|
1163
|
-
onMouseDown: () => l?.(e.id),
|
|
1164
|
-
children: "⋮⋮"
|
|
1165
|
-
}
|
|
1166
|
-
),
|
|
1167
|
-
/* @__PURE__ */ a(
|
|
1168
|
-
"div",
|
|
1169
|
-
{
|
|
1170
|
-
className: "pm-name",
|
|
1171
|
-
role: n && !e.active ? "button" : void 0,
|
|
1172
|
-
tabIndex: n && !e.active ? 0 : void 0,
|
|
1173
|
-
onClick: n ? h : void 0,
|
|
1174
|
-
onKeyDown: (p) => {
|
|
1175
|
-
!n || e.active || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), p.stopPropagation(), n(e.id));
|
|
1176
|
-
},
|
|
1177
|
-
"aria-label": n && !e.active ? `Switch to ${e.name}` : void 0,
|
|
1178
|
-
children: e.name
|
|
1179
|
-
}
|
|
1180
|
-
),
|
|
1181
|
-
/* @__PURE__ */ a(
|
|
1182
|
-
"button",
|
|
1183
|
-
{
|
|
1184
|
-
type: "button",
|
|
1185
|
-
className: "pm-kebab",
|
|
1186
|
-
"aria-label": "Page options",
|
|
1187
|
-
"aria-haspopup": "menu",
|
|
1188
|
-
"aria-expanded": u,
|
|
1189
|
-
onPointerDown: (p) => p.stopPropagation(),
|
|
1190
|
-
onMouseDown: (p) => p.stopPropagation(),
|
|
1191
|
-
onClick: (p) => {
|
|
1192
|
-
if (p.stopPropagation(), r) return r(e.id);
|
|
1193
|
-
o((v) => !v);
|
|
1194
|
-
},
|
|
1195
|
-
children: "⋯"
|
|
1196
|
-
}
|
|
1197
|
-
),
|
|
1198
|
-
u && /* @__PURE__ */ f(
|
|
1199
|
-
"div",
|
|
1200
|
-
{
|
|
1201
|
-
className: "pm-kebab-menu",
|
|
1202
|
-
role: "menu",
|
|
1203
|
-
"data-page-id": e.id,
|
|
1204
|
-
onPointerDown: (p) => p.stopPropagation(),
|
|
1205
|
-
onMouseDown: (p) => p.stopPropagation(),
|
|
1206
|
-
children: [
|
|
1207
|
-
/* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: c, children: "Rename" }),
|
|
1208
|
-
/* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
|
|
1209
|
-
/* @__PURE__ */ a(
|
|
1210
|
-
"button",
|
|
1211
|
-
{
|
|
1212
|
-
type: "button",
|
|
1213
|
-
role: "menuitem",
|
|
1214
|
-
className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
|
|
1215
|
-
onClick: m,
|
|
1216
|
-
children: "Delete"
|
|
1217
|
-
}
|
|
1218
|
-
)
|
|
1219
|
-
]
|
|
1220
|
-
}
|
|
1221
|
-
)
|
|
1222
|
-
] });
|
|
1223
|
-
}
|
|
1224
|
-
const mt = [
|
|
399
|
+
const ue = [
|
|
1225
400
|
{ id: "p-pipeline", name: "My Pipeline", active: !0 },
|
|
1226
401
|
{ id: "p-numbers", name: "My Numbers", active: !1 },
|
|
1227
402
|
{ id: "p-morning", name: "My Morning", active: !1 },
|
|
1228
403
|
{ id: "p-accounts", name: "My Accounts", active: !1 }
|
|
1229
404
|
];
|
|
1230
|
-
function
|
|
405
|
+
function ke({
|
|
1231
406
|
isOpen: e,
|
|
1232
|
-
pages: t =
|
|
1233
|
-
|
|
1234
|
-
activePageId: l,
|
|
1235
|
-
onRename: n,
|
|
1236
|
-
onDuplicate: i,
|
|
1237
|
-
onDelete: u,
|
|
1238
|
-
onReorder: o,
|
|
1239
|
-
onCreatePage: s,
|
|
1240
|
-
onSwitchPage: c
|
|
407
|
+
pages: t = ue,
|
|
408
|
+
footerSlot: o
|
|
1241
409
|
}) {
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
name: `${P.name} copy`,
|
|
1251
|
-
active: !1
|
|
1252
|
-
}, D = N.findIndex((U) => U.id === g);
|
|
1253
|
-
return [...N.slice(0, D + 1), k, ...N.slice(D + 1)];
|
|
1254
|
-
});
|
|
1255
|
-
}, []), v = M((g) => {
|
|
1256
|
-
h((N) => N.filter((P) => P.id !== g));
|
|
1257
|
-
}, []), T = M((g) => {
|
|
1258
|
-
h((N) => {
|
|
1259
|
-
const P = new Map(N.map((D) => [D.id, D])), k = g.map((D) => P.get(D)).filter(Boolean);
|
|
1260
|
-
return k.length === N.length ? k : N;
|
|
1261
|
-
});
|
|
1262
|
-
}, []), S = r != null, b = S ? r : m, _ = l != null ? b.map((g) => ({ ...g, active: g.id === l })) : [...b], x = n ?? (S ? void 0 : y), $ = i ?? (S ? void 0 : p), F = u ?? (S ? void 0 : v), E = o ?? (S ? void 0 : T), L = M(
|
|
1263
|
-
(g) => {
|
|
1264
|
-
S || h(g);
|
|
1265
|
-
},
|
|
1266
|
-
[S]
|
|
1267
|
-
), W = M(
|
|
1268
|
-
(g) => {
|
|
1269
|
-
const N = g[0]?.items.map((P) => P.id) ?? [];
|
|
1270
|
-
N.length > 0 && E && E(N);
|
|
1271
|
-
},
|
|
1272
|
-
[E]
|
|
1273
|
-
), G = _.map((g) => `${g.id}:${g.name}`).join("|"), j = E != null && _.length > 1 ? /* @__PURE__ */ a(
|
|
1274
|
-
Le,
|
|
1275
|
-
{
|
|
1276
|
-
zones: [
|
|
1277
|
-
{
|
|
1278
|
-
zoneKey: "pm-pages",
|
|
1279
|
-
items: _.map((g) => ({ ...g, id: g.id }))
|
|
1280
|
-
}
|
|
1281
|
-
],
|
|
1282
|
-
onZoneChange: W,
|
|
1283
|
-
renderZone: (g, N, P) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: P }),
|
|
1284
|
-
renderItem: (g) => /* @__PURE__ */ a(
|
|
1285
|
-
he,
|
|
1286
|
-
{
|
|
1287
|
-
page: g,
|
|
1288
|
-
onSwitchPage: c
|
|
1289
|
-
},
|
|
1290
|
-
g.id
|
|
1291
|
-
)
|
|
1292
|
-
},
|
|
1293
|
-
G
|
|
1294
|
-
) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: _.map((g) => /* @__PURE__ */ a(
|
|
1295
|
-
he,
|
|
1296
|
-
{
|
|
1297
|
-
page: g,
|
|
1298
|
-
onSwitchPage: c
|
|
1299
|
-
},
|
|
1300
|
-
g.id
|
|
1301
|
-
)) }), Z = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
|
|
1302
|
-
return /* @__PURE__ */ a(
|
|
1303
|
-
Te.Provider,
|
|
1304
|
-
{
|
|
1305
|
-
value: {
|
|
1306
|
-
pages: _,
|
|
1307
|
-
setPages: L,
|
|
1308
|
-
renamePage: x,
|
|
1309
|
-
duplicatePage: $,
|
|
1310
|
-
deletePage: F,
|
|
1311
|
-
// Sprint 2026-05-20 — propagate live create binding for footer.
|
|
1312
|
-
createPage: s
|
|
1313
|
-
},
|
|
1314
|
-
children: /* @__PURE__ */ a(
|
|
1315
|
-
K,
|
|
1316
|
-
{
|
|
1317
|
-
variant: "no-stage",
|
|
1318
|
-
title: "Manage pages",
|
|
1319
|
-
onClose: Z,
|
|
1320
|
-
footer: { right: /* @__PURE__ */ a(pt, {}) },
|
|
1321
|
-
children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: j })
|
|
1322
|
-
}
|
|
1323
|
-
)
|
|
1324
|
-
}
|
|
1325
|
-
);
|
|
410
|
+
const [n, a] = y(() => [...t]);
|
|
411
|
+
return /* @__PURE__ */ h(X.Provider, { value: { pages: n, setPages: a }, children: [
|
|
412
|
+
/* @__PURE__ */ h("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
|
|
413
|
+
/* @__PURE__ */ s("h3", { children: "Manage pages" }),
|
|
414
|
+
/* @__PURE__ */ s("div", { className: "pm-list", role: "list", children: n.map((r) => /* @__PURE__ */ s(ie, { page: r }, r.id)) })
|
|
415
|
+
] }),
|
|
416
|
+
o
|
|
417
|
+
] });
|
|
1326
418
|
}
|
|
1327
|
-
const
|
|
419
|
+
const Me = {
|
|
1328
420
|
SETTINGS: "settings",
|
|
1329
421
|
CATALOG_ADD: "catalog-add",
|
|
1330
422
|
CATALOG_REPLACE: "catalog-replace",
|
|
1331
423
|
PAGE_MGMT: "page-management",
|
|
1332
424
|
NOTIFICATION_CENTER: "notification-center"
|
|
1333
|
-
},
|
|
425
|
+
}, pe = {
|
|
1334
426
|
position: "fixed",
|
|
1335
427
|
inset: 0,
|
|
1336
428
|
pointerEvents: "none",
|
|
1337
429
|
zIndex: 55
|
|
1338
|
-
},
|
|
430
|
+
}, me = {
|
|
1339
431
|
position: "absolute",
|
|
1340
432
|
inset: 0,
|
|
1341
433
|
zIndex: 1,
|
|
1342
434
|
// CR-03 fix: pass-through tint — scrim is visual-only and must not intercept
|
|
1343
|
-
// grid card clicks.
|
|
435
|
+
// grid card clicks. See PanelHost.tsx CR-03 comment for full rationale.
|
|
1344
436
|
pointerEvents: "none",
|
|
1345
437
|
background: "rgba(0, 0, 0, 0.04)"
|
|
1346
438
|
};
|
|
1347
|
-
function
|
|
1348
|
-
const { state: e, dispatch: t, getCloseLog:
|
|
1349
|
-
|
|
439
|
+
function $e() {
|
|
440
|
+
const { state: e, dispatch: t, getCloseLog: o } = Z();
|
|
441
|
+
F(() => {
|
|
1350
442
|
if (e.activePanelId == null) return;
|
|
1351
|
-
function
|
|
1352
|
-
|
|
443
|
+
function r(d) {
|
|
444
|
+
d.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
1353
445
|
}
|
|
1354
|
-
return document.addEventListener("keydown",
|
|
446
|
+
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
1355
447
|
}, [e.activePanelId, t]);
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
}),
|
|
448
|
+
const n = B(e);
|
|
449
|
+
te(() => {
|
|
450
|
+
n.current = e;
|
|
451
|
+
}), F(() => {
|
|
1360
452
|
if (process.env.NODE_ENV === "production") return;
|
|
1361
|
-
const
|
|
1362
|
-
return
|
|
453
|
+
const r = window;
|
|
454
|
+
return r.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), r.__panelsHostHandle = {
|
|
1363
455
|
dispatch: t,
|
|
1364
|
-
getState: () =>
|
|
1365
|
-
getCloseLog:
|
|
456
|
+
getState: () => n.current,
|
|
457
|
+
getCloseLog: o
|
|
1366
458
|
}, () => {
|
|
1367
|
-
|
|
459
|
+
r.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
|
|
1368
460
|
};
|
|
1369
|
-
}, [t,
|
|
461
|
+
}, [t, o]);
|
|
462
|
+
const a = Y(() => {
|
|
463
|
+
t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
464
|
+
}, [t]);
|
|
465
|
+
return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: pe, children: e.activePanelId != null && /* @__PURE__ */ s(
|
|
1370
466
|
"div",
|
|
1371
467
|
{
|
|
1372
468
|
"data-panel-scrim": "true",
|
|
1373
|
-
style:
|
|
469
|
+
style: me,
|
|
470
|
+
onClick: a
|
|
1374
471
|
}
|
|
1375
472
|
) });
|
|
1376
473
|
}
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
474
|
+
function De({ panelComponents: e }) {
|
|
475
|
+
const t = I();
|
|
476
|
+
if (t == null) return null;
|
|
477
|
+
const { state: o, dispatch: n } = t;
|
|
478
|
+
if (o.activePanelId == null) return null;
|
|
479
|
+
const a = e[o.activePanelId];
|
|
480
|
+
if (a == null)
|
|
481
|
+
return process.env.NODE_ENV !== "production" && console.error(
|
|
482
|
+
"[panels] No panel component registered for activePanelId:",
|
|
483
|
+
o.activePanelId
|
|
484
|
+
), null;
|
|
485
|
+
if (o.activePanelId === "settings")
|
|
486
|
+
return /* @__PURE__ */ s(N, { isOpen: !0, children: /* @__PURE__ */ s(
|
|
487
|
+
w,
|
|
488
|
+
{
|
|
489
|
+
isOpen: !0,
|
|
490
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
491
|
+
footer: /* @__PURE__ */ h(ee, { children: [
|
|
492
|
+
/* @__PURE__ */ s(
|
|
493
|
+
"button",
|
|
494
|
+
{
|
|
495
|
+
id: "settings-cancel",
|
|
496
|
+
type: "button",
|
|
497
|
+
className: "gloss-panel-chrome__footer-btn",
|
|
498
|
+
onClick: () => n({ type: "CLOSE_PANEL", reason: "cancel-button" }),
|
|
499
|
+
children: "Cancel"
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
/* @__PURE__ */ s(
|
|
503
|
+
"button",
|
|
504
|
+
{
|
|
505
|
+
id: "settings-apply",
|
|
506
|
+
type: "button",
|
|
507
|
+
className: "gloss-panel-chrome__footer-btn gloss-panel-chrome__footer-btn--primary",
|
|
508
|
+
onClick: () => n({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
509
|
+
children: "Apply"
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
] }),
|
|
513
|
+
children: /* @__PURE__ */ s(a, { isOpen: !0 })
|
|
514
|
+
}
|
|
515
|
+
) });
|
|
516
|
+
if (o.activePanelId === "catalog-add" || o.activePanelId === "catalog-replace") {
|
|
517
|
+
const r = o.activePanelId === "catalog-replace" ? "replace" : "add";
|
|
518
|
+
return /* @__PURE__ */ s(N, { isOpen: !0, children: /* @__PURE__ */ s(
|
|
519
|
+
w,
|
|
520
|
+
{
|
|
521
|
+
isOpen: !0,
|
|
522
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
523
|
+
footer: null,
|
|
524
|
+
children: /* @__PURE__ */ s(
|
|
525
|
+
a,
|
|
526
|
+
{
|
|
527
|
+
isOpen: !0,
|
|
528
|
+
footerSlot: /* @__PURE__ */ s(le, { mode: r, dispatch: n })
|
|
529
|
+
}
|
|
530
|
+
)
|
|
531
|
+
}
|
|
532
|
+
) });
|
|
533
|
+
}
|
|
534
|
+
return o.activePanelId === "page-management" ? /* @__PURE__ */ s(N, { isOpen: !0, children: /* @__PURE__ */ s(
|
|
535
|
+
w,
|
|
536
|
+
{
|
|
537
|
+
isOpen: !0,
|
|
538
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
539
|
+
footer: null,
|
|
540
|
+
children: /* @__PURE__ */ s(a, { isOpen: !0, footerSlot: /* @__PURE__ */ s(de, {}) })
|
|
1384
541
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
542
|
+
) }) : /* @__PURE__ */ s(N, { isOpen: !0, children: /* @__PURE__ */ s(
|
|
543
|
+
w,
|
|
544
|
+
{
|
|
545
|
+
isOpen: !0,
|
|
546
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
547
|
+
footer: null,
|
|
548
|
+
children: /* @__PURE__ */ s(a, { isOpen: !0 })
|
|
1388
549
|
}
|
|
1389
|
-
|
|
1390
|
-
l(null), n.current = null;
|
|
1391
|
-
}, gt), () => {
|
|
1392
|
-
n.current != null && (clearTimeout(n.current), n.current = null);
|
|
1393
|
-
};
|
|
1394
|
-
}, [e, t]), z(() => {
|
|
1395
|
-
e != null && l(e);
|
|
1396
|
-
}, [e]), e != null ? { panelId: e, isOpen: !0 } : r != null ? { panelId: r, isOpen: !1 } : { panelId: null, isOpen: !1 };
|
|
1397
|
-
}
|
|
1398
|
-
function jt({ panelComponents: e, children: t }) {
|
|
1399
|
-
const r = O(), l = r?.state.lastClose?.reason === "section-hidden", n = bt(r?.state.activePanelId ?? null, l);
|
|
1400
|
-
if (r == null || n.panelId == null) return null;
|
|
1401
|
-
const i = n.panelId, u = n.isOpen, o = e?.[i];
|
|
1402
|
-
return o == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
|
|
1403
|
-
"[panels] No panel component registered for activePanelId:",
|
|
1404
|
-
i
|
|
1405
|
-
), null) : /* @__PURE__ */ a(Oe, { isOpen: u, children: o != null ? /* @__PURE__ */ a(o, { isOpen: u }) : t });
|
|
550
|
+
) });
|
|
1406
551
|
}
|
|
1407
|
-
function
|
|
552
|
+
function z(e) {
|
|
1408
553
|
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;
|
|
1409
554
|
}
|
|
1410
|
-
const
|
|
1411
|
-
function
|
|
555
|
+
const he = 685, V = 627, fe = "cubic-bezier(0.22, 1, 0.36, 1)", ve = 200;
|
|
556
|
+
function J(e, t) {
|
|
1412
557
|
if (typeof window > "u") return t;
|
|
1413
|
-
const
|
|
1414
|
-
if (!
|
|
1415
|
-
const
|
|
1416
|
-
return Number.isNaN(
|
|
558
|
+
const o = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
559
|
+
if (!o) return t;
|
|
560
|
+
const n = parseFloat(o);
|
|
561
|
+
return Number.isNaN(n) ? t : o.endsWith("s") && !o.endsWith("ms") ? n * 1e3 : n;
|
|
1417
562
|
}
|
|
1418
|
-
function
|
|
563
|
+
function ge(e, t) {
|
|
1419
564
|
return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
1420
565
|
}
|
|
1421
|
-
function
|
|
566
|
+
function S(e) {
|
|
1422
567
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1423
568
|
}
|
|
1424
|
-
function
|
|
1425
|
-
const { mountEl: t, chromeEl:
|
|
1426
|
-
if (t == null ||
|
|
1427
|
-
|
|
569
|
+
function ye(e) {
|
|
570
|
+
const { mountEl: t, chromeEl: o, reducedMotion: n, onAssert: a } = e;
|
|
571
|
+
if (t == null || o == null) {
|
|
572
|
+
S(e), a?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
|
|
1428
573
|
return;
|
|
1429
574
|
}
|
|
1430
|
-
if (
|
|
1431
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
575
|
+
if (n) {
|
|
576
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), a?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
|
|
1432
577
|
return;
|
|
1433
578
|
}
|
|
1434
|
-
if (typeof
|
|
1435
|
-
|
|
579
|
+
if (typeof o.animate != "function") {
|
|
580
|
+
S(e), a?.({ branch: "slide-no-waapi", timestamp: Date.now() });
|
|
1436
581
|
return;
|
|
1437
582
|
}
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1440
|
-
const
|
|
583
|
+
const r = o.cloneNode(!0);
|
|
584
|
+
r.id = "panel-chrome-frozen", r.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(r), o.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
585
|
+
const d = J("--panel-open-dur", he), l = ge("--panel-easing", fe), i = o.animate(
|
|
1441
586
|
[{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
|
|
1442
|
-
{ duration:
|
|
587
|
+
{ duration: d, easing: l, fill: "forwards" }
|
|
1443
588
|
);
|
|
1444
|
-
|
|
589
|
+
i.addEventListener(
|
|
1445
590
|
"finish",
|
|
1446
591
|
() => {
|
|
1447
|
-
|
|
592
|
+
r.remove(), o.style.zIndex = "", i.cancel(), a?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
|
|
1448
593
|
},
|
|
1449
594
|
{ once: !0 }
|
|
1450
595
|
);
|
|
1451
596
|
}
|
|
1452
|
-
function
|
|
1453
|
-
const { mountEl: t, onAssert:
|
|
597
|
+
function be(e) {
|
|
598
|
+
const { mountEl: t, onAssert: o } = e;
|
|
1454
599
|
if (t == null) {
|
|
1455
|
-
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() =>
|
|
600
|
+
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => S(e), V), o?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
|
|
1456
601
|
return;
|
|
1457
602
|
}
|
|
1458
|
-
const
|
|
1459
|
-
let
|
|
1460
|
-
const
|
|
1461
|
-
|
|
1462
|
-
},
|
|
1463
|
-
|
|
603
|
+
const n = J("--panel-close-dur", V);
|
|
604
|
+
let a = !1, r = null;
|
|
605
|
+
const d = (i) => {
|
|
606
|
+
i.target !== t || i.propertyName !== "max-height" || a || (a = !0, r != null && clearTimeout(r), t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-complete", timestamp: Date.now() }));
|
|
607
|
+
}, l = () => {
|
|
608
|
+
a || (a = !0, t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-forced", timestamp: Date.now() }));
|
|
1464
609
|
};
|
|
1465
|
-
t.addEventListener("transitionend",
|
|
610
|
+
t.addEventListener("transitionend", d), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), r = setTimeout(l, n + ve);
|
|
1466
611
|
}
|
|
1467
|
-
function
|
|
1468
|
-
const { state: t, onAssert:
|
|
612
|
+
function Pe(e) {
|
|
613
|
+
const { state: t, onAssert: o } = e;
|
|
1469
614
|
if (t.activePanelId && t.isDirty) {
|
|
1470
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
615
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "blocked-dirty", timestamp: Date.now() });
|
|
1471
616
|
return;
|
|
1472
617
|
}
|
|
1473
|
-
const
|
|
1474
|
-
if (!!t.activePanelId &&
|
|
1475
|
-
|
|
618
|
+
const n = z(t.activeTrigger), a = z(e.trigger);
|
|
619
|
+
if (!!t.activePanelId && n != null && n === a) {
|
|
620
|
+
ye(e);
|
|
1476
621
|
return;
|
|
1477
622
|
}
|
|
1478
623
|
if (t.activePanelId) {
|
|
1479
|
-
|
|
624
|
+
be(e);
|
|
1480
625
|
return;
|
|
1481
626
|
}
|
|
1482
|
-
|
|
627
|
+
S(e), o?.({ branch: "fresh-open", timestamp: Date.now() });
|
|
1483
628
|
}
|
|
1484
|
-
function
|
|
629
|
+
function Ce() {
|
|
1485
630
|
if (!(typeof window > "u"))
|
|
1486
631
|
return window.__panelsAsserter;
|
|
1487
632
|
}
|
|
1488
|
-
function
|
|
1489
|
-
const e =
|
|
1490
|
-
return
|
|
1491
|
-
(
|
|
633
|
+
function Re() {
|
|
634
|
+
const e = I(), t = q();
|
|
635
|
+
return Y(
|
|
636
|
+
(o, n) => {
|
|
1492
637
|
if (!e)
|
|
1493
638
|
return;
|
|
1494
|
-
const
|
|
1495
|
-
panelId:
|
|
1496
|
-
trigger:
|
|
639
|
+
const a = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, r = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, d = {
|
|
640
|
+
panelId: o,
|
|
641
|
+
trigger: n,
|
|
1497
642
|
state: e.state,
|
|
1498
643
|
dispatch: e.dispatch,
|
|
1499
|
-
mountEl:
|
|
1500
|
-
chromeEl:
|
|
644
|
+
mountEl: a,
|
|
645
|
+
chromeEl: r,
|
|
1501
646
|
reducedMotion: t,
|
|
1502
|
-
onAssert: (
|
|
1503
|
-
|
|
647
|
+
onAssert: (l) => {
|
|
648
|
+
Ce()?.recordTransition?.(l);
|
|
1504
649
|
}
|
|
1505
650
|
};
|
|
1506
|
-
|
|
651
|
+
Pe(d);
|
|
1507
652
|
},
|
|
1508
653
|
[e, t]
|
|
1509
654
|
);
|
|
1510
655
|
}
|
|
1511
|
-
let
|
|
1512
|
-
function
|
|
656
|
+
let E = !1, _ = null;
|
|
657
|
+
function T() {
|
|
1513
658
|
const e = [];
|
|
1514
659
|
let t = "cleaned";
|
|
1515
660
|
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
-
const
|
|
1521
|
-
if (
|
|
1522
|
-
const
|
|
1523
|
-
|
|
661
|
+
const n = document.querySelectorAll(".gloss-panel-mount");
|
|
662
|
+
n.length > 1 && e.push(`mount-count=${n.length}`);
|
|
663
|
+
const a = n[0] ?? null, r = a ? a.querySelectorAll(".gloss-panel-chrome") : [];
|
|
664
|
+
r.length > 1 && e.push(`chrome-count=${r.length}`);
|
|
665
|
+
const d = r[0] ?? null;
|
|
666
|
+
if (d) {
|
|
667
|
+
const u = d.style.zIndex;
|
|
668
|
+
u !== "" && u !== "2" && e.push(`chrome-zindex=${u}`);
|
|
1524
669
|
}
|
|
1525
|
-
const
|
|
670
|
+
const l = a ? "present" : "absent", i = d ? "present" : "absent";
|
|
1526
671
|
return {
|
|
1527
672
|
valid: e.length === 0,
|
|
1528
|
-
mount:
|
|
1529
|
-
chrome:
|
|
673
|
+
mount: l,
|
|
674
|
+
chrome: i,
|
|
1530
675
|
frozen: t,
|
|
1531
676
|
orphans: e,
|
|
1532
677
|
timestamp: Date.now()
|
|
1533
678
|
};
|
|
1534
679
|
}
|
|
1535
|
-
const
|
|
1536
|
-
function
|
|
1537
|
-
return { id: e, constraint: t, expected:
|
|
680
|
+
const A = "8px 8px 0px", x = "64px", O = "inset(0px 0px 60px 0px)", L = "inset(0px -40px -40px -40px)";
|
|
681
|
+
function p(e, t, o, n, a) {
|
|
682
|
+
return { id: e, constraint: t, expected: o, actual: n, pass: a };
|
|
1538
683
|
}
|
|
1539
|
-
function
|
|
684
|
+
function P(e) {
|
|
1540
685
|
const t = parseInt(e, 10);
|
|
1541
686
|
return Number.isFinite(t) ? t : NaN;
|
|
1542
687
|
}
|
|
1543
|
-
function
|
|
1544
|
-
const e = [], t = document.querySelector(".gloss-panel-mount"),
|
|
688
|
+
function M() {
|
|
689
|
+
const e = [], t = document.querySelector(".gloss-panel-mount"), o = t?.querySelector(".gloss-panel-chrome") ?? null, n = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), a = document.querySelector(".bell-cutout"), r = document.querySelector(".bell-popover"), d = document.querySelector(".gloss-bottom-toolbar");
|
|
1545
690
|
if (!t)
|
|
1546
|
-
e.push(
|
|
691
|
+
e.push(p("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
|
|
1547
692
|
else {
|
|
1548
|
-
const
|
|
693
|
+
const l = getComputedStyle(t), i = l.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = l.clipPath || t.style.clipPath || "", u = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), m = u ? parseInt(u[1], 10) : NaN, f = P(i), v = Number.isFinite(m) && Number.isFinite(f) && m === f;
|
|
1549
694
|
e.push(
|
|
1550
|
-
|
|
695
|
+
p(
|
|
1551
696
|
"C1",
|
|
1552
697
|
"mount --reveal-y matches clip-path inset-bottom Npx",
|
|
1553
|
-
`inset(0 0 ${
|
|
1554
|
-
`--reveal-y=${
|
|
1555
|
-
|
|
698
|
+
`inset(0 0 ${f}px 0) === --reveal-y(${f}px)`,
|
|
699
|
+
`--reveal-y=${i || "n/a"} clip-path=${c || "n/a"}`,
|
|
700
|
+
v
|
|
1556
701
|
)
|
|
1557
702
|
);
|
|
1558
703
|
}
|
|
1559
704
|
if (!t)
|
|
1560
|
-
e.push(
|
|
705
|
+
e.push(p("C2", "mount padding constant", A, "absent", !1));
|
|
1561
706
|
else {
|
|
1562
|
-
const
|
|
1563
|
-
e.push(
|
|
707
|
+
const l = t.style.padding, i = getComputedStyle(t), c = l || i.padding || "", u = c === A || c === "8px 8px 0px 8px";
|
|
708
|
+
e.push(p("C2", "mount padding constant", A, c || "n/a", u));
|
|
1564
709
|
}
|
|
1565
710
|
if (!t)
|
|
1566
|
-
e.push(
|
|
711
|
+
e.push(p("C3", "mount.bottom resolves to var(--tb-h)=64px", x, "absent", !1));
|
|
1567
712
|
else {
|
|
1568
|
-
const
|
|
1569
|
-
e.push(
|
|
713
|
+
const i = getComputedStyle(t).bottom || t.style.bottom || "", c = i === x;
|
|
714
|
+
e.push(p("C3", "mount.bottom resolves to var(--tb-h)=64px", x, i || "n/a", c));
|
|
1570
715
|
}
|
|
1571
|
-
if (!
|
|
1572
|
-
e.push(
|
|
716
|
+
if (!o)
|
|
717
|
+
e.push(p("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
|
|
1573
718
|
else {
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1576
|
-
), c =
|
|
1577
|
-
|
|
1578
|
-
),
|
|
719
|
+
const l = getComputedStyle(o), i = P(
|
|
720
|
+
l.getPropertyValue("--row-h").trim() || o.style.getPropertyValue("--row-h").trim() || "0"
|
|
721
|
+
), c = P(
|
|
722
|
+
l.getPropertyValue("--row-gap").trim() || o.style.getPropertyValue("--row-gap").trim() || "0"
|
|
723
|
+
), u = i * 3 + c * 3 - 8, m = P(l.height || o.style.height || ""), f = Number.isFinite(i) && Number.isFinite(c) && Number.isFinite(m) && Number.isFinite(u) && m === u;
|
|
1579
724
|
e.push(
|
|
1580
|
-
|
|
725
|
+
p(
|
|
1581
726
|
"C4",
|
|
1582
727
|
"panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
|
|
1583
|
-
`${
|
|
728
|
+
`${u}px (rh=${i} rg=${c})`,
|
|
1584
729
|
`${m}px`,
|
|
1585
|
-
|
|
730
|
+
f
|
|
1586
731
|
)
|
|
1587
732
|
);
|
|
1588
733
|
}
|
|
1589
|
-
if (!
|
|
734
|
+
if (!n || !o)
|
|
1590
735
|
e.push(
|
|
1591
|
-
|
|
736
|
+
p(
|
|
1592
737
|
"C5",
|
|
1593
738
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1594
739
|
"present",
|
|
1595
|
-
`coordinator=${
|
|
740
|
+
`coordinator=${n ? "present" : "absent"} chrome=${o ? "present" : "absent"}`,
|
|
1596
741
|
!1
|
|
1597
742
|
)
|
|
1598
743
|
);
|
|
1599
744
|
else {
|
|
1600
|
-
const
|
|
745
|
+
const l = getComputedStyle(n), i = getComputedStyle(o), c = l.perspective || n.style.perspective || "", u = (l.perspectiveOrigin || n.style.perspectiveOrigin || "").trim(), m = i.perspectiveStyle || o.style.perspectiveStyle || "", g = c !== "" && c !== "none" && (u === "center bottom" || u === "50% 100%") && m === "flat";
|
|
1601
746
|
e.push(
|
|
1602
|
-
|
|
747
|
+
p(
|
|
1603
748
|
"C5",
|
|
1604
749
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1605
750
|
"perspective:not-none, origin:center bottom, chrome-style:flat",
|
|
1606
|
-
`perspective=${c} origin=${
|
|
1607
|
-
|
|
751
|
+
`perspective=${c} origin=${u} chrome-style=${m}`,
|
|
752
|
+
g
|
|
1608
753
|
)
|
|
1609
754
|
);
|
|
1610
755
|
}
|
|
1611
756
|
{
|
|
1612
|
-
let
|
|
757
|
+
let l = !1, i = "absent";
|
|
1613
758
|
try {
|
|
1614
759
|
for (const c of Array.from(document.styleSheets)) {
|
|
1615
|
-
let
|
|
760
|
+
let u = [];
|
|
1616
761
|
try {
|
|
1617
|
-
|
|
762
|
+
u = Array.from(c.cssRules ?? []);
|
|
1618
763
|
} catch {
|
|
1619
764
|
continue;
|
|
1620
765
|
}
|
|
1621
|
-
for (const m of
|
|
766
|
+
for (const m of u)
|
|
1622
767
|
if (m.name === "stage-spin") {
|
|
1623
|
-
const
|
|
1624
|
-
|
|
768
|
+
const v = Array.from(m.cssRules), b = v.find((C) => C.keyText === "0%" || C.keyText === "from"), g = v.find((C) => C.keyText === "100%" || C.keyText === "to"), $ = b?.style.transform ?? "", D = g?.style.transform ?? "", R = /rotateY\(\s*0(?:deg)?\s*\)/;
|
|
769
|
+
l = R.test($) && R.test(D), i = `0%=${$ || "n/a"} 100%=${D || "n/a"}`;
|
|
1625
770
|
break;
|
|
1626
771
|
}
|
|
1627
|
-
if (
|
|
772
|
+
if (i !== "absent") break;
|
|
1628
773
|
}
|
|
1629
774
|
} catch {
|
|
1630
|
-
|
|
775
|
+
i = "inspection-error";
|
|
1631
776
|
}
|
|
1632
777
|
e.push(
|
|
1633
|
-
|
|
778
|
+
p(
|
|
1634
779
|
"C6",
|
|
1635
780
|
"@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
|
|
1636
781
|
"both frames rotateY(0)",
|
|
1637
|
-
|
|
1638
|
-
|
|
782
|
+
i,
|
|
783
|
+
l
|
|
1639
784
|
)
|
|
1640
785
|
);
|
|
1641
786
|
}
|
|
1642
787
|
{
|
|
1643
|
-
const
|
|
788
|
+
const l = document.documentElement, i = getComputedStyle(l), c = i.getPropertyValue("--panel-open-dur").trim() || l.style.getPropertyValue("--panel-open-dur").trim(), u = i.getPropertyValue("--panel-close-dur").trim() || l.style.getPropertyValue("--panel-close-dur").trim(), m = P(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), f = P(u) || parseFloat(u) * (u.endsWith("s") && !u.endsWith("ms") ? 1e3 : 1), v = Number.isFinite(m) && Number.isFinite(f) && m > f;
|
|
1644
789
|
e.push(
|
|
1645
|
-
|
|
790
|
+
p("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${u || "n/a"}`, v)
|
|
1646
791
|
);
|
|
1647
792
|
}
|
|
1648
|
-
if (!
|
|
1649
|
-
e.push(
|
|
793
|
+
if (!a)
|
|
794
|
+
e.push(p("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
|
|
1650
795
|
else {
|
|
1651
|
-
const
|
|
796
|
+
const l = getComputedStyle(a), i = l.animationName || "", c = l.transitionProperty || "", u = (i === "" || i === "none") && (c === "" || c === "none" || c === "all");
|
|
1652
797
|
e.push(
|
|
1653
|
-
|
|
798
|
+
p(
|
|
1654
799
|
"C8",
|
|
1655
800
|
"BellCutout zero computed animation/transition",
|
|
1656
801
|
"animation:none AND transition:none",
|
|
1657
|
-
`animation=${
|
|
1658
|
-
|
|
802
|
+
`animation=${i || "n/a"} transition=${c || "n/a"}`,
|
|
803
|
+
u
|
|
1659
804
|
)
|
|
1660
805
|
);
|
|
1661
806
|
}
|
|
1662
807
|
if (!t)
|
|
1663
|
-
e.push(
|
|
808
|
+
e.push(p("C9", "mount closed-state clipPath", O, "absent", !1));
|
|
1664
809
|
else {
|
|
1665
|
-
const
|
|
1666
|
-
e.push(
|
|
810
|
+
const l = t.style.clipPath, i = getComputedStyle(t), c = l || i.clipPath || "", u = c === O;
|
|
811
|
+
e.push(p("C9", "mount closed-state clipPath", O, c || "n/a", u));
|
|
1667
812
|
}
|
|
1668
|
-
if (!
|
|
1669
|
-
e.push(
|
|
813
|
+
if (!r)
|
|
814
|
+
e.push(p("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
|
|
1670
815
|
else {
|
|
1671
|
-
const
|
|
816
|
+
const l = r.parentElement, i = l === document.body;
|
|
1672
817
|
e.push(
|
|
1673
|
-
|
|
818
|
+
p(
|
|
1674
819
|
"C10",
|
|
1675
820
|
"bell-popover parentElement === document.body (open)",
|
|
1676
821
|
"body",
|
|
1677
|
-
|
|
1678
|
-
|
|
822
|
+
l === document.body ? "body" : l?.tagName ?? "n/a",
|
|
823
|
+
i
|
|
1679
824
|
)
|
|
1680
825
|
);
|
|
1681
826
|
}
|
|
1682
|
-
if (!
|
|
1683
|
-
e.push(
|
|
827
|
+
if (!n)
|
|
828
|
+
e.push(p("C11", "coordinator overflow === visible", "visible", "absent", !1));
|
|
1684
829
|
else {
|
|
1685
|
-
const
|
|
1686
|
-
e.push(
|
|
830
|
+
const i = getComputedStyle(n).overflow || n.style.overflow || "", c = i === "visible";
|
|
831
|
+
e.push(p("C11", "coordinator overflow === visible", "visible", i || "n/a", c));
|
|
1687
832
|
}
|
|
1688
|
-
if (!
|
|
1689
|
-
e.push(
|
|
833
|
+
if (!d)
|
|
834
|
+
e.push(p("C12", "toolbar clipPath = inset(0 -40 -40 -40)", L, "absent", !1));
|
|
1690
835
|
else {
|
|
1691
|
-
const
|
|
1692
|
-
e.push(
|
|
836
|
+
const l = d.style.clipPath, i = getComputedStyle(d), c = l || i.clipPath || "", u = c === L;
|
|
837
|
+
e.push(p("C12", "toolbar clipPath = inset(0 -40 -40 -40)", L, c || "n/a", u));
|
|
1693
838
|
}
|
|
1694
839
|
return e.push(
|
|
1695
|
-
|
|
840
|
+
p(
|
|
1696
841
|
"C13",
|
|
1697
842
|
"same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
|
|
1698
843
|
"WAAPI driver wired in orchestrator (source-proof)",
|
|
@@ -1700,7 +845,7 @@ function le() {
|
|
|
1700
845
|
"wiring_only"
|
|
1701
846
|
)
|
|
1702
847
|
), e.push(
|
|
1703
|
-
|
|
848
|
+
p(
|
|
1704
849
|
"C14",
|
|
1705
850
|
'cross-position handoff transitionend filtered by propertyName="max-height"',
|
|
1706
851
|
"transitionend filter wired in orchestrator (source-proof)",
|
|
@@ -1709,11 +854,11 @@ function le() {
|
|
|
1709
854
|
)
|
|
1710
855
|
), e;
|
|
1711
856
|
}
|
|
1712
|
-
function
|
|
1713
|
-
return
|
|
857
|
+
function Ne(e) {
|
|
858
|
+
return M().find((t) => t.id === e);
|
|
1714
859
|
}
|
|
1715
|
-
function
|
|
1716
|
-
const e =
|
|
860
|
+
function we() {
|
|
861
|
+
const e = T();
|
|
1717
862
|
return { q12: [
|
|
1718
863
|
{
|
|
1719
864
|
id: "Q12-12",
|
|
@@ -1722,83 +867,74 @@ function wt() {
|
|
|
1722
867
|
actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
|
|
1723
868
|
pass: e.valid
|
|
1724
869
|
}
|
|
1725
|
-
], cc:
|
|
870
|
+
], cc: M() };
|
|
1726
871
|
}
|
|
1727
|
-
function
|
|
872
|
+
function Se() {
|
|
1728
873
|
return {
|
|
1729
|
-
enable:
|
|
1730
|
-
disable:
|
|
1731
|
-
isEnabled: () =>
|
|
1732
|
-
getLastReport: () =>
|
|
874
|
+
enable: Ee,
|
|
875
|
+
disable: _e,
|
|
876
|
+
isEnabled: () => E,
|
|
877
|
+
getLastReport: () => _,
|
|
1733
878
|
recordTransition: (e) => {
|
|
1734
|
-
|
|
879
|
+
E && (_ = { ...e, ...T() });
|
|
1735
880
|
},
|
|
1736
881
|
assertOnce: () => {
|
|
1737
|
-
const e =
|
|
1738
|
-
return
|
|
882
|
+
const e = T();
|
|
883
|
+
return _ = e, e;
|
|
1739
884
|
},
|
|
1740
|
-
assertCcOnly:
|
|
1741
|
-
getCcRowById:
|
|
1742
|
-
assertPanelTruths:
|
|
885
|
+
assertCcOnly: M,
|
|
886
|
+
getCcRowById: Ne,
|
|
887
|
+
assertPanelTruths: we
|
|
1743
888
|
};
|
|
1744
889
|
}
|
|
1745
|
-
function
|
|
1746
|
-
if (
|
|
1747
|
-
window.__panelsAsserter || (window.__panelsAsserter =
|
|
890
|
+
function Ee() {
|
|
891
|
+
if (E = !0, typeof window > "u") return;
|
|
892
|
+
window.__panelsAsserter || (window.__panelsAsserter = Se(), console.info(
|
|
1748
893
|
"[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
|
|
1749
894
|
));
|
|
1750
895
|
}
|
|
1751
|
-
function
|
|
1752
|
-
|
|
896
|
+
function _e() {
|
|
897
|
+
E = !1;
|
|
1753
898
|
}
|
|
1754
899
|
export {
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
Et as transitionToPanel,
|
|
1796
|
-
oe as useCatalogState,
|
|
1797
|
-
Ht as useEditingCardId,
|
|
1798
|
-
Pe as usePageMgmtState,
|
|
1799
|
-
Me as usePanelContext,
|
|
1800
|
-
O as usePanelContextOptional,
|
|
1801
|
-
mn as usePanelCoordinator,
|
|
1802
|
-
be as useReducedMotionPanel,
|
|
1803
|
-
Zt as useTransitionToPanel
|
|
900
|
+
Ve as COMMITS,
|
|
901
|
+
Te as CatalogAddShell,
|
|
902
|
+
le as CatalogFooter,
|
|
903
|
+
Ie as CatalogReplaceShell,
|
|
904
|
+
k as CatalogStateContext,
|
|
905
|
+
oe as CloneCard,
|
|
906
|
+
ne as CloneStage,
|
|
907
|
+
G as MOCK_DEFAULT_LENS,
|
|
908
|
+
W as MOCK_LENSES,
|
|
909
|
+
ue as MOCK_PAGES,
|
|
910
|
+
Q as MOCK_TILES_BY_LENS,
|
|
911
|
+
Me as PANEL_IDS,
|
|
912
|
+
de as PageMgmtFooter,
|
|
913
|
+
ke as PageMgmtShell,
|
|
914
|
+
X as PageMgmtStateContext,
|
|
915
|
+
w as PanelChrome,
|
|
916
|
+
qe as PanelHost,
|
|
917
|
+
$e as PanelHostShell,
|
|
918
|
+
N as PanelMount,
|
|
919
|
+
Be as PanelProvider,
|
|
920
|
+
De as PanelSlot,
|
|
921
|
+
Le as SettingsShell,
|
|
922
|
+
M as assertCcOnly,
|
|
923
|
+
T as assertPanelDomShape,
|
|
924
|
+
we as assertPanelTruths,
|
|
925
|
+
He as deriveSurfaceState,
|
|
926
|
+
_e as disablePanelAsserter,
|
|
927
|
+
Ee as enablePanelAsserter,
|
|
928
|
+
Ne as getCcRowById,
|
|
929
|
+
Ue as initialState,
|
|
930
|
+
z as positionKey,
|
|
931
|
+
Ye as reducer,
|
|
932
|
+
Pe as transitionToPanel,
|
|
933
|
+
re as useCatalogState,
|
|
934
|
+
ce as usePageMgmtState,
|
|
935
|
+
Z as usePanelContext,
|
|
936
|
+
I as usePanelContextOptional,
|
|
937
|
+
Ke as usePanelCoordinator,
|
|
938
|
+
q as useReducedMotionPanel,
|
|
939
|
+
Re as useTransitionToPanel
|
|
1804
940
|
};
|