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