@mt-gloss/ui 0.1.157 → 0.1.158
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.
|
@@ -5,7 +5,7 @@ import { S as Z, E as qe, C as P, e as Jn, R as Ce, h as Qn, i as es, j as ts, a
|
|
|
5
5
|
import { easings as nt, durations as st } from "@mt-gloss/tokens";
|
|
6
6
|
import { formatValue as Ys, isInRange as Us, isSameDay as er, formatMarketDates as Xs, DEFAULT_MARKET_PRESETS as tr, isMarketActive as kt, getDateRangeForPreset as Ze, detectPreset as rr, ROLLING_OPTIONS as Sr, PERIOD_OPTIONS as Cr, getDateRangeDisplayInfo as Ot, formatDateRangeSmart as yt, toUppercasePresetId as ar, generateMarketId as Zs } from "@mt-gloss/utils";
|
|
7
7
|
import { B as be, b as qs, a as Js } from "./BaseText-Dxbk1JJa.js";
|
|
8
|
-
import { u as Qs, a as eo, b as to, M as dt } from "./TimeframeQuickBar-
|
|
8
|
+
import { u as Qs, a as eo, b as to, M as dt } from "./TimeframeQuickBar-DFK4fnAA.js";
|
|
9
9
|
import { useGridApiRef as ro, DataGridPro as ao } from "@mui/x-data-grid-pro";
|
|
10
10
|
import { Chip as Wr, Tooltip as xt, MenuItem as dr, Menu as no, Box as ue, IconButton as et, Select as ha, Typography as De, Button as at, Collapse as so, Popover as oo, Dialog as io, DialogTitle as lo, DialogContent as co, TextField as nr, DialogActions as uo, Tabs as mo, Tab as po } from "@mui/material";
|
|
11
11
|
import go from "@mui/icons-material/Person";
|
|
@@ -4335,20 +4335,7 @@ const Xc = function(t) {
|
|
|
4335
4335
|
definition: { display: "flex", direction: "column" },
|
|
4336
4336
|
style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" },
|
|
4337
4337
|
children: [
|
|
4338
|
-
/* @__PURE__ */ e("div", {
|
|
4339
|
-
fontSize: 10.5,
|
|
4340
|
-
fontWeight: 600,
|
|
4341
|
-
textTransform: "uppercase",
|
|
4342
|
-
letterSpacing: "0.04em",
|
|
4343
|
-
color: "#6B7280",
|
|
4344
|
-
lineHeight: "14px",
|
|
4345
|
-
marginBottom: 4,
|
|
4346
|
-
whiteSpace: "nowrap",
|
|
4347
|
-
overflow: "hidden",
|
|
4348
|
-
textOverflow: "ellipsis",
|
|
4349
|
-
position: "relative",
|
|
4350
|
-
zIndex: 2
|
|
4351
|
-
}, children: a }),
|
|
4338
|
+
/* @__PURE__ */ e("div", { className: "gloss-metric-card__zone-a", children: /* @__PURE__ */ e("div", { className: "gloss-metric-card__label", children: a }) }),
|
|
4352
4339
|
/* @__PURE__ */ e(
|
|
4353
4340
|
Tt,
|
|
4354
4341
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as u, jsx as e, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import { useId as me, useMemo as O, useState as ge, useRef as B, useCallback as C, useEffect as pe } from "react";
|
|
3
|
-
import { formatTrend as ye, pickMetricTier as xe, getValueFontSize as Y, hexToRgba as q, formatValue as Q, getDateRangeForPreset as be, formatDateRangeSmart as ve, ROLLING_OPTIONS as ke, PERIOD_OPTIONS as
|
|
4
|
-
import { B as
|
|
5
|
-
import { Box as D, Chip as K, Popper as Ce, Paper as Ie, MenuList as ze, MenuItem as
|
|
3
|
+
import { formatTrend as ye, pickMetricTier as xe, getValueFontSize as Y, hexToRgba as q, formatValue as Q, getDateRangeForPreset as be, formatDateRangeSmart as ve, ROLLING_OPTIONS as ke, PERIOD_OPTIONS as we } from "@mt-gloss/utils";
|
|
4
|
+
import { B as M, a as R, b as Se } from "./BaseText-Dxbk1JJa.js";
|
|
5
|
+
import { Box as D, Chip as K, Popper as Ce, Paper as Ie, MenuList as ze, MenuItem as _e, ListItemText as Me, IconButton as Te, Tooltip as Le, Divider as Ne } from "@mui/material";
|
|
6
6
|
import Re from "@mui/icons-material/ExpandMore";
|
|
7
7
|
import De from "@mui/icons-material/Star";
|
|
8
8
|
import Be from "@mui/icons-material/StarBorder";
|
|
@@ -17,7 +17,7 @@ const Z = {
|
|
|
17
17
|
flat: "▶"
|
|
18
18
|
}, j = function({ value: o, direction: t }) {
|
|
19
19
|
if (o == null) return null;
|
|
20
|
-
const { text: d, direction: f } = ye(o),
|
|
20
|
+
const { text: d, direction: f } = ye(o), s = t || f, { color: r, bg: l } = Z[s] || Z.flat, n = X[s] || X.flat;
|
|
21
21
|
return /* @__PURE__ */ u(
|
|
22
22
|
"span",
|
|
23
23
|
{
|
|
@@ -31,7 +31,7 @@ const Z = {
|
|
|
31
31
|
fontWeight: 600,
|
|
32
32
|
lineHeight: 1,
|
|
33
33
|
color: r,
|
|
34
|
-
backgroundColor:
|
|
34
|
+
backgroundColor: l,
|
|
35
35
|
whiteSpace: "nowrap"
|
|
36
36
|
},
|
|
37
37
|
children: [
|
|
@@ -43,13 +43,13 @@ const Z = {
|
|
|
43
43
|
};
|
|
44
44
|
j.displayName = "TrendIndicator";
|
|
45
45
|
const F = ({ data: i, color: o, isStale: t }) => {
|
|
46
|
-
const f = "sparkbg-" + me().replace(/:/g, ""),
|
|
46
|
+
const f = "sparkbg-" + me().replace(/:/g, ""), s = o || "#4f46e5", r = O(() => {
|
|
47
47
|
if (!i || i.length < 2) return null;
|
|
48
|
-
const
|
|
49
|
-
x:
|
|
48
|
+
const l = 300, n = 55, a = 2, c = Math.min(...i), m = Math.max(...i) - c || 1, p = i.map((x, S) => ({
|
|
49
|
+
x: S / (i.length - 1) * l,
|
|
50
50
|
y: a + (1 - (x - c) / m) * (n - a * 2)
|
|
51
|
-
})).map((x,
|
|
52
|
-
return { line: p, area:
|
|
51
|
+
})).map((x, S) => `${S === 0 ? "M" : "L"}${x.x},${x.y}`).join(" "), w = `${p} L${l},${n} L0,${n}Z`;
|
|
52
|
+
return { line: p, area: w, w: l, h: n };
|
|
53
53
|
}, [i]);
|
|
54
54
|
return r ? /* @__PURE__ */ u(
|
|
55
55
|
"svg",
|
|
@@ -82,8 +82,8 @@ const F = ({ data: i, color: o, isStale: t }) => {
|
|
|
82
82
|
},
|
|
83
83
|
children: [
|
|
84
84
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ u("linearGradient", { id: f, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
85
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
86
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
85
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: s, stopOpacity: "0.09" }),
|
|
86
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: s, stopOpacity: "0.01" })
|
|
87
87
|
] }) }),
|
|
88
88
|
/* @__PURE__ */ e("path", { d: r.area, fill: `url(#${f})` }),
|
|
89
89
|
/* @__PURE__ */ e(
|
|
@@ -91,7 +91,7 @@ const F = ({ data: i, color: o, isStale: t }) => {
|
|
|
91
91
|
{
|
|
92
92
|
d: r.line,
|
|
93
93
|
fill: "none",
|
|
94
|
-
stroke:
|
|
94
|
+
stroke: s,
|
|
95
95
|
strokeOpacity: "0.22",
|
|
96
96
|
strokeWidth: "1.5",
|
|
97
97
|
strokeLinecap: "round",
|
|
@@ -106,9 +106,9 @@ F.displayName = "SparklineBg";
|
|
|
106
106
|
const ee = ({ data: i, color: o, isStale: t }) => {
|
|
107
107
|
const d = o || "#4f46e5", f = O(() => {
|
|
108
108
|
if (!i || i.length < 1) return null;
|
|
109
|
-
const
|
|
109
|
+
const s = 300, r = 50, l = r * 0.82, n = i.length, a = s / (n * 4), c = a * 3, m = Math.max(...i) || 1;
|
|
110
110
|
return i.map((y, p) => {
|
|
111
|
-
const
|
|
111
|
+
const w = y / m, x = Math.max(w * l, 2);
|
|
112
112
|
return {
|
|
113
113
|
x: p * (c + a),
|
|
114
114
|
y: r - x,
|
|
@@ -137,15 +137,15 @@ const ee = ({ data: i, color: o, isStale: t }) => {
|
|
|
137
137
|
transformOrigin: "bottom",
|
|
138
138
|
transition: t ? "transform 400ms ease-out" : "transform 500ms ease-in-out"
|
|
139
139
|
},
|
|
140
|
-
children: f.map((
|
|
140
|
+
children: f.map((s, r) => /* @__PURE__ */ e(
|
|
141
141
|
"rect",
|
|
142
142
|
{
|
|
143
|
-
x:
|
|
144
|
-
y:
|
|
145
|
-
width:
|
|
146
|
-
height:
|
|
143
|
+
x: s.x,
|
|
144
|
+
y: s.y,
|
|
145
|
+
width: s.width,
|
|
146
|
+
height: s.height,
|
|
147
147
|
fill: d,
|
|
148
|
-
fillOpacity:
|
|
148
|
+
fillOpacity: s.isLast ? 0.14 : 0.06,
|
|
149
149
|
rx: "2.5"
|
|
150
150
|
},
|
|
151
151
|
r
|
|
@@ -155,21 +155,21 @@ const ee = ({ data: i, color: o, isStale: t }) => {
|
|
|
155
155
|
};
|
|
156
156
|
ee.displayName = "BarsBg";
|
|
157
157
|
const te = ({ value: i = 0, max: o = 100, color: t = "#4f46e5", colSpan: d = 1, isStale: f }) => {
|
|
158
|
-
const
|
|
158
|
+
const s = d >= 2 ? 40 : 34, r = 3.5, l = (s - r) / 2, n = 2 * Math.PI * l, a = f ? 0 : Math.min(Math.max(i / (o || 1), 0), 1), c = n * (1 - a);
|
|
159
159
|
return /* @__PURE__ */ u(
|
|
160
160
|
"svg",
|
|
161
161
|
{
|
|
162
|
-
width:
|
|
163
|
-
height:
|
|
164
|
-
viewBox: `0 0 ${
|
|
162
|
+
width: s,
|
|
163
|
+
height: s,
|
|
164
|
+
viewBox: `0 0 ${s} ${s}`,
|
|
165
165
|
style: { flexShrink: 0, marginRight: 8, display: "block" },
|
|
166
166
|
children: [
|
|
167
167
|
/* @__PURE__ */ e(
|
|
168
168
|
"circle",
|
|
169
169
|
{
|
|
170
|
-
cx:
|
|
171
|
-
cy:
|
|
172
|
-
r:
|
|
170
|
+
cx: s / 2,
|
|
171
|
+
cy: s / 2,
|
|
172
|
+
r: l,
|
|
173
173
|
fill: "none",
|
|
174
174
|
stroke: t,
|
|
175
175
|
strokeOpacity: "0.06",
|
|
@@ -179,16 +179,16 @@ const te = ({ value: i = 0, max: o = 100, color: t = "#4f46e5", colSpan: d = 1,
|
|
|
179
179
|
/* @__PURE__ */ e(
|
|
180
180
|
"circle",
|
|
181
181
|
{
|
|
182
|
-
cx:
|
|
183
|
-
cy:
|
|
184
|
-
r:
|
|
182
|
+
cx: s / 2,
|
|
183
|
+
cy: s / 2,
|
|
184
|
+
r: l,
|
|
185
185
|
fill: "none",
|
|
186
186
|
stroke: t,
|
|
187
187
|
strokeWidth: r,
|
|
188
188
|
strokeDasharray: n,
|
|
189
189
|
strokeDashoffset: c,
|
|
190
190
|
strokeLinecap: "round",
|
|
191
|
-
transform: `rotate(-90 ${
|
|
191
|
+
transform: `rotate(-90 ${s / 2} ${s / 2})`,
|
|
192
192
|
style: { transition: "stroke-dashoffset 0.4s ease" }
|
|
193
193
|
}
|
|
194
194
|
)
|
|
@@ -197,8 +197,8 @@ const te = ({ value: i = 0, max: o = 100, color: t = "#4f46e5", colSpan: d = 1,
|
|
|
197
197
|
);
|
|
198
198
|
};
|
|
199
199
|
te.displayName = "DonutChart";
|
|
200
|
-
const re = ({ value: i = 0, max: o = 100, trendValue: t = 0, color: d = "#6b7280", colSpan: f = 1, isStale:
|
|
201
|
-
const r = f >= 2 ? 44 : 36,
|
|
200
|
+
const re = ({ value: i = 0, max: o = 100, trendValue: t = 0, color: d = "#6b7280", colSpan: f = 1, isStale: s }) => {
|
|
201
|
+
const r = f >= 2 ? 44 : 36, l = 3.5, n = (r - l) / 2, a = 2 * Math.PI * n, c = s ? 0 : Math.min(Math.max(i / (o || 1), 0), 1), h = a * (1 - c), m = f >= 2 ? 11 : 9, y = `${Math.round(Math.abs(t))}%`;
|
|
202
202
|
return /* @__PURE__ */ u(
|
|
203
203
|
"div",
|
|
204
204
|
{
|
|
@@ -230,7 +230,7 @@ const re = ({ value: i = 0, max: o = 100, trendValue: t = 0, color: d = "#6b7280
|
|
|
230
230
|
fill: "none",
|
|
231
231
|
stroke: d,
|
|
232
232
|
strokeOpacity: "0.06",
|
|
233
|
-
strokeWidth:
|
|
233
|
+
strokeWidth: l
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
236
|
/* @__PURE__ */ e(
|
|
@@ -241,7 +241,7 @@ const re = ({ value: i = 0, max: o = 100, trendValue: t = 0, color: d = "#6b7280
|
|
|
241
241
|
r: n,
|
|
242
242
|
fill: "none",
|
|
243
243
|
stroke: d,
|
|
244
|
-
strokeWidth:
|
|
244
|
+
strokeWidth: l,
|
|
245
245
|
strokeDasharray: a,
|
|
246
246
|
strokeDashoffset: h,
|
|
247
247
|
strokeLinecap: "round",
|
|
@@ -277,21 +277,21 @@ const re = ({ value: i = 0, max: o = 100, trendValue: t = 0, color: d = "#6b7280
|
|
|
277
277
|
re.displayName = "ObjectArrow";
|
|
278
278
|
const We = { slot3: 200, slot5: 380 };
|
|
279
279
|
function $e(i, o) {
|
|
280
|
-
const t = We, d = 150, [f,
|
|
280
|
+
const t = We, d = 150, [f, s] = ge(1), r = B(null), l = B(null), n = C(() => {
|
|
281
281
|
const c = r.current;
|
|
282
282
|
if (c == null) return;
|
|
283
283
|
const h = c < t.slot3 ? 1 : c < t.slot5 ? 3 : 5;
|
|
284
|
-
|
|
284
|
+
s((m) => m === h ? m : h), r.current = null, l.current && (clearTimeout(l.current), l.current = null);
|
|
285
285
|
}, [t.slot3, t.slot5]);
|
|
286
286
|
pe(() => {
|
|
287
287
|
const c = i.current;
|
|
288
288
|
if (!c || typeof ResizeObserver > "u") return;
|
|
289
289
|
const h = new ResizeObserver((m) => {
|
|
290
290
|
const y = m[0]?.contentRect.width ?? 0;
|
|
291
|
-
r.current = y,
|
|
291
|
+
r.current = y, l.current && clearTimeout(l.current), l.current = setTimeout(n, d);
|
|
292
292
|
});
|
|
293
293
|
return h.observe(c), () => {
|
|
294
|
-
h.disconnect(),
|
|
294
|
+
h.disconnect(), l.current && clearTimeout(l.current);
|
|
295
295
|
};
|
|
296
296
|
}, [i, n, d]);
|
|
297
297
|
const a = C(() => {
|
|
@@ -303,16 +303,16 @@ function Ee() {
|
|
|
303
303
|
return typeof globalThis < "u" && globalThis.__GLOSS_FLAGS__?.v1_1_status_mode === !0 ? !0 : typeof process < "u" && process.env ? process.env.NEXT_PUBLIC_V1_1_STATUS_MODE === "true" : !1;
|
|
304
304
|
}
|
|
305
305
|
function ie(i) {
|
|
306
|
-
const { onStatusSlotClick: o } = i, t = B(null), d = Ee(), { capacity: f, onPointerUp:
|
|
306
|
+
const { onStatusSlotClick: o } = i, t = B(null), d = Ee(), { capacity: f, onPointerUp: s } = $e(t), r = i.maxSlots ?? f, l = i.statuses.slice(0, r);
|
|
307
307
|
if (!d) {
|
|
308
308
|
const n = i.statuses[0];
|
|
309
309
|
return /* @__PURE__ */ u(
|
|
310
|
-
|
|
310
|
+
M,
|
|
311
311
|
{
|
|
312
312
|
definition: { display: "flex", direction: "column" },
|
|
313
313
|
className: "gloss-status-card gloss-status-card--flag-off",
|
|
314
314
|
children: [
|
|
315
|
-
/* @__PURE__ */ e(R, { className: "gloss-metric-card__label", children: i.label }),
|
|
315
|
+
/* @__PURE__ */ e(M, { className: "gloss-metric-card__zone-a", children: /* @__PURE__ */ e(R, { className: "gloss-metric-card__label", children: i.label }) }),
|
|
316
316
|
n != null ? /* @__PURE__ */ e(R, { children: String(n.value) }) : null
|
|
317
317
|
]
|
|
318
318
|
}
|
|
@@ -325,10 +325,10 @@ function ie(i) {
|
|
|
325
325
|
className: "gloss-status-card",
|
|
326
326
|
"data-status-mode": "on",
|
|
327
327
|
"data-status-capacity": r,
|
|
328
|
-
onPointerUp:
|
|
328
|
+
onPointerUp: s,
|
|
329
329
|
children: [
|
|
330
|
-
/* @__PURE__ */ e(R, { className: "gloss-metric-card__label", children: i.label }),
|
|
331
|
-
/* @__PURE__ */ e("div", { className: "gloss-status-slots", "data-status-slot-count":
|
|
330
|
+
/* @__PURE__ */ e(M, { className: "gloss-metric-card__zone-a", children: /* @__PURE__ */ e(R, { className: "gloss-metric-card__label", children: i.label }) }),
|
|
331
|
+
/* @__PURE__ */ e("div", { className: "gloss-status-slots", "data-status-slot-count": l.length, children: l.map((n, a) => {
|
|
332
332
|
const c = i.sparklinePerStatus?.[n.id], h = n.id === i.activeStatusId;
|
|
333
333
|
return /* @__PURE__ */ u(
|
|
334
334
|
"div",
|
|
@@ -355,8 +355,8 @@ ie.displayName = "StatusModeCard";
|
|
|
355
355
|
function je(i, o) {
|
|
356
356
|
if (!o) return;
|
|
357
357
|
if (i == null) return o.fallback;
|
|
358
|
-
const { operator: t, threshold: d, result: f, fallback:
|
|
359
|
-
return (t === "lt" ? i < d : t === "gt" ? i > d : t === "eq" ? Math.abs(i - d) < 1e-9 : t === "gte" ? i >= d : t === "lte" ? i <= d : !1) ? f :
|
|
358
|
+
const { operator: t, threshold: d, result: f, fallback: s } = o;
|
|
359
|
+
return (t === "lt" ? i < d : t === "gt" ? i > d : t === "eq" ? Math.abs(i - d) < 1e-9 : t === "gte" ? i >= d : t === "lte" ? i <= d : !1) ? f : s;
|
|
360
360
|
}
|
|
361
361
|
const E = {
|
|
362
362
|
up: "var(--color-positive)",
|
|
@@ -418,31 +418,31 @@ const E = {
|
|
|
418
418
|
variant: t = "standard",
|
|
419
419
|
label: d,
|
|
420
420
|
labelAdornment: f,
|
|
421
|
-
value:
|
|
421
|
+
value: s,
|
|
422
422
|
valueFormat: r,
|
|
423
|
-
trend:
|
|
423
|
+
trend: l,
|
|
424
424
|
subtitle: n,
|
|
425
425
|
colSpan: a = 1,
|
|
426
426
|
isStale: c,
|
|
427
427
|
thresholdBreach: h = "none"
|
|
428
|
-
} = o, m = t === "sparkline" || t === "bars" || t === "donut" ? o.accentColor ?? "#4f46e5" : "#4f46e5", y = t === "highlight" ? o.highlightColor : void 0, p = t === "sparkline" ? o.sparklineData : void 0,
|
|
428
|
+
} = o, m = t === "sparkline" || t === "bars" || t === "donut" ? o.accentColor ?? "#4f46e5" : "#4f46e5", y = t === "highlight" ? o.highlightColor : void 0, p = t === "sparkline" ? o.sparklineData : void 0, w = t === "bars" ? o.barData : void 0, x = t === "donut" ? o.donutValue : 0, S = t === "donut" ? o.donutMax ?? 100 : 100, L = t === "object-arrow" ? o.objectArrowValue : 0, W = t === "object-arrow" ? o.objectArrowMax : 100, $ = t === "arrow" ? o.arrowDirection : void 0, I = t === "versus" ? o.versusData : void 0, z = t === "segmented" ? o.segments : void 0, b = (t === "highlight" && o.tintCondition ? je(
|
|
429
429
|
typeof o.value == "number" ? o.value : null,
|
|
430
430
|
o.tintCondition
|
|
431
|
-
) : void 0) ?? y, k = (b ? Ae[b] : void 0) || b, { formatted:
|
|
432
|
-
() => t === "status-mode" ? { formatted: "", tier: 0, length: 0 } : xe(
|
|
431
|
+
) : void 0) ?? y, k = (b ? Ae[b] : void 0) || b, { formatted: N, tier: ne, length: oe } = O(
|
|
432
|
+
() => t === "status-mode" ? { formatted: "", tier: 0, length: 0 } : xe(s, {
|
|
433
433
|
prefix: r?.prefix || "",
|
|
434
434
|
suffix: r?.suffix || "",
|
|
435
435
|
abbreviated: r?.abbreviated
|
|
436
436
|
}, a),
|
|
437
|
-
[t,
|
|
437
|
+
[t, s, r?.prefix, r?.suffix, r?.abbreviated, a]
|
|
438
438
|
);
|
|
439
439
|
if (o.variant === "status-mode")
|
|
440
440
|
return /* @__PURE__ */ e(ie, { ...o });
|
|
441
|
-
const
|
|
441
|
+
const T = { display: N, full: N, length: oe }, se = Y(T.length, a), le = l?.direction && E[l.direction] || E.flat, H = c ? "gloss-metric-data-stale" : "gloss-metric-data-fresh", P = {
|
|
442
442
|
fontWeight: 700,
|
|
443
443
|
letterSpacing: "-0.03em",
|
|
444
444
|
color: t === "highlight" ? k : "rgba(0,0,0,0.87)",
|
|
445
|
-
fontSize:
|
|
445
|
+
fontSize: se,
|
|
446
446
|
lineHeight: 1.1,
|
|
447
447
|
whiteSpace: "nowrap",
|
|
448
448
|
overflow: "hidden"
|
|
@@ -490,7 +490,7 @@ const E = {
|
|
|
490
490
|
prefix: r?.prefix || "",
|
|
491
491
|
suffix: r?.suffix || "",
|
|
492
492
|
abbreviated: r?.abbreviated
|
|
493
|
-
}),
|
|
493
|
+
}), _ = Q(I.prior, {
|
|
494
494
|
prefix: r?.prefix || "",
|
|
495
495
|
suffix: r?.suffix || "",
|
|
496
496
|
abbreviated: r?.abbreviated
|
|
@@ -514,7 +514,7 @@ const E = {
|
|
|
514
514
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.35)", marginTop: 2 }, children: I.currentLabel })
|
|
515
515
|
] }),
|
|
516
516
|
/* @__PURE__ */ e(
|
|
517
|
-
|
|
517
|
+
Se,
|
|
518
518
|
{
|
|
519
519
|
definition: { orientation: "vertical", color: "rgba(0,0,0,0.08)" },
|
|
520
520
|
style: { flexShrink: 0 }
|
|
@@ -531,8 +531,8 @@ const E = {
|
|
|
531
531
|
color: "rgba(0,0,0,0.5)",
|
|
532
532
|
lineHeight: 1.1
|
|
533
533
|
},
|
|
534
|
-
title:
|
|
535
|
-
children:
|
|
534
|
+
title: _.full,
|
|
535
|
+
children: _.display
|
|
536
536
|
}
|
|
537
537
|
),
|
|
538
538
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.35)", marginTop: 2 }, children: I.priorLabel })
|
|
@@ -549,7 +549,7 @@ const E = {
|
|
|
549
549
|
gap: 1,
|
|
550
550
|
overflow: "hidden"
|
|
551
551
|
},
|
|
552
|
-
children: z.map((v,
|
|
552
|
+
children: z.map((v, _) => /* @__PURE__ */ e(
|
|
553
553
|
"div",
|
|
554
554
|
{
|
|
555
555
|
style: {
|
|
@@ -558,7 +558,7 @@ const E = {
|
|
|
558
558
|
minWidth: 2
|
|
559
559
|
}
|
|
560
560
|
},
|
|
561
|
-
|
|
561
|
+
_
|
|
562
562
|
))
|
|
563
563
|
}
|
|
564
564
|
),
|
|
@@ -571,7 +571,7 @@ const E = {
|
|
|
571
571
|
flexWrap: "wrap",
|
|
572
572
|
marginTop: 4
|
|
573
573
|
},
|
|
574
|
-
children: z.map((v,
|
|
574
|
+
children: z.map((v, _) => /* @__PURE__ */ u(
|
|
575
575
|
"div",
|
|
576
576
|
{
|
|
577
577
|
style: {
|
|
@@ -595,7 +595,7 @@ const E = {
|
|
|
595
595
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "rgba(0,0,0,0.5)" }, children: v.label })
|
|
596
596
|
]
|
|
597
597
|
},
|
|
598
|
-
|
|
598
|
+
_
|
|
599
599
|
))
|
|
600
600
|
}
|
|
601
601
|
)
|
|
@@ -624,13 +624,12 @@ const E = {
|
|
|
624
624
|
}
|
|
625
625
|
),
|
|
626
626
|
t === "sparkline" && /* @__PURE__ */ e(F, { data: p, color: m, isStale: c }),
|
|
627
|
-
t === "bars" && /* @__PURE__ */ e(ee, { data:
|
|
627
|
+
t === "bars" && /* @__PURE__ */ e(ee, { data: w, color: m, isStale: c }),
|
|
628
628
|
/* @__PURE__ */ u(
|
|
629
|
-
|
|
629
|
+
M,
|
|
630
630
|
{
|
|
631
631
|
className: "gloss-metric-card__zone-a",
|
|
632
632
|
"data-tier": ne,
|
|
633
|
-
style: { height: 28, flexShrink: 0, zIndex: 2, position: "relative", display: "flex", alignItems: "center" },
|
|
634
633
|
children: [
|
|
635
634
|
/* @__PURE__ */ e(R, { className: "gloss-metric-card__label", children: d }),
|
|
636
635
|
f
|
|
@@ -638,47 +637,47 @@ const E = {
|
|
|
638
637
|
}
|
|
639
638
|
),
|
|
640
639
|
/* @__PURE__ */ u(
|
|
641
|
-
|
|
640
|
+
M,
|
|
642
641
|
{
|
|
643
642
|
definition: { display: "flex", align: "center" },
|
|
644
643
|
className: `gloss-metric-card__zone-b ${H}`,
|
|
645
644
|
style: { flex: 1, zIndex: 2, position: "relative", minHeight: 0 },
|
|
646
645
|
children: [
|
|
647
|
-
t === "donut" && /* @__PURE__ */ e(te, { value: x, max:
|
|
646
|
+
t === "donut" && /* @__PURE__ */ e(te, { value: x, max: S, color: m, colSpan: a, isStale: c }),
|
|
648
647
|
t === "object-arrow" && /* @__PURE__ */ e(
|
|
649
648
|
re,
|
|
650
649
|
{
|
|
651
|
-
value:
|
|
650
|
+
value: L,
|
|
652
651
|
max: W,
|
|
653
|
-
trendValue:
|
|
654
|
-
color:
|
|
652
|
+
trendValue: l?.value,
|
|
653
|
+
color: le,
|
|
655
654
|
colSpan: a,
|
|
656
655
|
isStale: c
|
|
657
656
|
}
|
|
658
657
|
),
|
|
659
658
|
t === "arrow" && ce(),
|
|
660
|
-
t !== "versus" && t !== "segmented" && /* @__PURE__ */ e("span", { style: P, title:
|
|
659
|
+
t !== "versus" && t !== "segmented" && /* @__PURE__ */ e("span", { style: P, title: T.full, children: T.display }),
|
|
661
660
|
t === "versus" && de(),
|
|
662
|
-
t === "segmented" && /* @__PURE__ */ e("span", { style: P, title:
|
|
661
|
+
t === "segmented" && /* @__PURE__ */ e("span", { style: P, title: T.full, children: T.display })
|
|
663
662
|
]
|
|
664
663
|
}
|
|
665
664
|
),
|
|
666
665
|
/* @__PURE__ */ u(
|
|
667
|
-
|
|
666
|
+
M,
|
|
668
667
|
{
|
|
669
668
|
definition: { display: "flex", justify: "between", align: "center" },
|
|
670
669
|
className: `gloss-metric-card__zone-c ${H}`,
|
|
671
670
|
style: { minHeight: 18, flexShrink: 0, zIndex: 2, position: "relative" },
|
|
672
671
|
children: [
|
|
673
672
|
/* @__PURE__ */ e("span", { style: ae, children: n }),
|
|
674
|
-
G &&
|
|
673
|
+
G && l?.value != null ? /* @__PURE__ */ e("span", { style: {
|
|
675
674
|
backgroundColor: "rgba(255,255,255,0.78)",
|
|
676
675
|
backdropFilter: "blur(4px)",
|
|
677
676
|
WebkitBackdropFilter: "blur(4px)",
|
|
678
677
|
borderRadius: 4,
|
|
679
678
|
display: "inline-flex",
|
|
680
679
|
flexShrink: 0
|
|
681
|
-
}, children: /* @__PURE__ */ e(j, { value:
|
|
680
|
+
}, children: /* @__PURE__ */ e(j, { value: l?.value, direction: l?.direction }) }) : /* @__PURE__ */ e(j, { value: l?.value, direction: l?.direction })
|
|
682
681
|
]
|
|
683
682
|
}
|
|
684
683
|
),
|
|
@@ -692,35 +691,35 @@ const A = ({
|
|
|
692
691
|
selectedId: t,
|
|
693
692
|
defaultId: d,
|
|
694
693
|
onSelect: f,
|
|
695
|
-
pinnedId:
|
|
694
|
+
pinnedId: s,
|
|
696
695
|
onPin: r,
|
|
697
|
-
isOpen:
|
|
696
|
+
isOpen: l = !1,
|
|
698
697
|
onOpenChange: n,
|
|
699
698
|
disableHover: a = !1
|
|
700
699
|
}) => {
|
|
701
|
-
const c = B(null), h =
|
|
700
|
+
const c = B(null), h = l, m = o.find((g) => g.id === t), y = !!m, p = m || o.find((g) => g.id === s) || o.find((g) => g.id === d) || o[0], w = O(() => {
|
|
702
701
|
if (!p || !["7d", "30d", "60d", "90d", "mtd", "qtd", "ytd", "lytd"].includes(p.id))
|
|
703
702
|
return "";
|
|
704
703
|
const { start: b, end: k } = be(p.id);
|
|
705
704
|
return ve(b, k, /* @__PURE__ */ new Date());
|
|
706
705
|
}, [p]), x = C(() => {
|
|
707
706
|
a || n && n(i, !0);
|
|
708
|
-
}, [i, n, a]),
|
|
707
|
+
}, [i, n, a]), S = C(() => {
|
|
709
708
|
a || n && n(i, !1);
|
|
710
|
-
}, [i, n, a]),
|
|
709
|
+
}, [i, n, a]), L = C(() => {
|
|
711
710
|
n && n(i, !1);
|
|
712
711
|
}, [i, n]), W = C(() => {
|
|
713
712
|
n && n(i, !h);
|
|
714
713
|
}, [i, h, n]), $ = C((g) => {
|
|
715
|
-
f(g),
|
|
716
|
-
}, [f,
|
|
714
|
+
f(g), L();
|
|
715
|
+
}, [f, L]), I = C((g, b) => {
|
|
717
716
|
g.stopPropagation(), r && r(b);
|
|
718
717
|
}, [r]), z = /* @__PURE__ */ u(
|
|
719
718
|
D,
|
|
720
719
|
{
|
|
721
720
|
ref: c,
|
|
722
721
|
onMouseEnter: x,
|
|
723
|
-
onMouseLeave:
|
|
722
|
+
onMouseLeave: S,
|
|
724
723
|
sx: { position: "relative", display: "inline-flex" },
|
|
725
724
|
children: [
|
|
726
725
|
/* @__PURE__ */ e(
|
|
@@ -765,16 +764,16 @@ const A = ({
|
|
|
765
764
|
{
|
|
766
765
|
elevation: 8,
|
|
767
766
|
onMouseEnter: x,
|
|
768
|
-
onMouseLeave:
|
|
767
|
+
onMouseLeave: S,
|
|
769
768
|
sx: {
|
|
770
769
|
minWidth: 120,
|
|
771
770
|
mt: 0.5,
|
|
772
771
|
py: 0.5
|
|
773
772
|
},
|
|
774
773
|
children: /* @__PURE__ */ e(ze, { dense: !0, children: o.map((g) => {
|
|
775
|
-
const b = t === g.id, k =
|
|
774
|
+
const b = t === g.id, k = s === g.id;
|
|
776
775
|
return /* @__PURE__ */ u(
|
|
777
|
-
|
|
776
|
+
_e,
|
|
778
777
|
{
|
|
779
778
|
onClick: () => $(g.id),
|
|
780
779
|
selected: b,
|
|
@@ -790,7 +789,7 @@ const A = ({
|
|
|
790
789
|
/* @__PURE__ */ u(D, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
791
790
|
b && /* @__PURE__ */ e(Oe, { fontSize: "small", color: "primary", sx: { fontSize: 14 } }),
|
|
792
791
|
/* @__PURE__ */ e(
|
|
793
|
-
|
|
792
|
+
Me,
|
|
794
793
|
{
|
|
795
794
|
primary: g.label,
|
|
796
795
|
primaryTypographyProps: {
|
|
@@ -805,7 +804,7 @@ const A = ({
|
|
|
805
804
|
Te,
|
|
806
805
|
{
|
|
807
806
|
size: "small",
|
|
808
|
-
onClick: (
|
|
807
|
+
onClick: (N) => I(N, g.id),
|
|
809
808
|
sx: {
|
|
810
809
|
p: 0.25,
|
|
811
810
|
opacity: k ? 1 : 0,
|
|
@@ -830,10 +829,10 @@ const A = ({
|
|
|
830
829
|
]
|
|
831
830
|
}
|
|
832
831
|
);
|
|
833
|
-
return
|
|
832
|
+
return w ? /* @__PURE__ */ e(
|
|
834
833
|
Le,
|
|
835
834
|
{
|
|
836
|
-
title:
|
|
835
|
+
title: w,
|
|
837
836
|
placement: "top-start",
|
|
838
837
|
slotProps: {
|
|
839
838
|
popper: {
|
|
@@ -851,9 +850,9 @@ function Ve({
|
|
|
851
850
|
pinnedPreset: t = "30d",
|
|
852
851
|
onPin: d,
|
|
853
852
|
openGroup: f,
|
|
854
|
-
onOpenChange:
|
|
853
|
+
onOpenChange: s,
|
|
855
854
|
disableHover: r = !1,
|
|
856
|
-
showCalendarEntry:
|
|
855
|
+
showCalendarEntry: l = !0,
|
|
857
856
|
calendarEntry: n
|
|
858
857
|
}) {
|
|
859
858
|
const a = i === "today";
|
|
@@ -883,7 +882,7 @@ function Ve({
|
|
|
883
882
|
pinnedId: t,
|
|
884
883
|
onPin: d,
|
|
885
884
|
isOpen: f === "rolling",
|
|
886
|
-
onOpenChange:
|
|
885
|
+
onOpenChange: s,
|
|
887
886
|
disableHover: r
|
|
888
887
|
}
|
|
889
888
|
),
|
|
@@ -891,18 +890,18 @@ function Ve({
|
|
|
891
890
|
A,
|
|
892
891
|
{
|
|
893
892
|
groupId: "period",
|
|
894
|
-
options:
|
|
893
|
+
options: we,
|
|
895
894
|
selectedId: i,
|
|
896
895
|
defaultId: t,
|
|
897
896
|
onSelect: o,
|
|
898
897
|
pinnedId: t,
|
|
899
898
|
onPin: d,
|
|
900
899
|
isOpen: f === "period",
|
|
901
|
-
onOpenChange:
|
|
900
|
+
onOpenChange: s,
|
|
902
901
|
disableHover: r
|
|
903
902
|
}
|
|
904
903
|
),
|
|
905
|
-
|
|
904
|
+
l && /* @__PURE__ */ u(J, { children: [
|
|
906
905
|
/* @__PURE__ */ e(Ne, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5 } }),
|
|
907
906
|
n
|
|
908
907
|
] })
|
package/catalog.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as I, Q as N, E as B, J as x, L as D, D as F, F as A, H as M, K as v, T as R, U as _, V as H, aX as W, W as k, aY as z, aZ as L, a_ as E, X as G, Y as $, Z as O } from "./Expandable-
|
|
2
|
-
import { a5 as Be, b2 as xe, aA as De, aj as Fe, $ as Ae, ap as Me, bG as ve, N as Re, aa as _e, P as He, B as We, bc as ke, C as ze, bk as Le, b as Ee, c as Ge, O as $e, q as Oe, af as we, aO as Ve, aD as Xe, as as je, m as Ze, o as Ue, aG as qe, ad as Ke, b4 as Qe, ab as Ye, _ as Je, ar as ea, aR as aa, b6 as sa, p as ta, ao as ra, a2 as oa, at as ia, a4 as na, ac as la, bw as da, aU as ca, t as ma, I as ga, i as pa, ax as ua, M as ba, y as fa, au as ha, bB as Ta, aq as ya, w as Sa, aT as Pa, a$ as Ca, al as Ia, aL as Na, ai as Ba, an as xa, av as Da, bI as Fa, aS as Aa, bH as Ma, ae as va, e as Ra, R as _a, l as Ha, r as Wa, aI as ka, ak as za, ag as La, j as Ea, z as Ga, b3 as $a, ah as Oa, b8 as wa, bb as Va, b9 as Xa, ba as ja, k as Za, b5 as Ua, S as qa, bd as Ka, aw as Qa, b7 as Ya, bC as Ja, am as es, bF as as, v as ss, bx as ts, n as rs, h as os, s as is, a0 as ns, a9 as ls, bj as ds, bq as cs, aC as ms, a8 as gs, aQ as ps, aF as us, az as bs, aN as fs, aK as hs, a3 as Ts } from "./Expandable-
|
|
1
|
+
import { A as I, Q as N, E as B, J as x, L as D, D as F, F as A, H as M, K as v, T as R, U as _, V as H, aX as W, W as k, aY as z, aZ as L, a_ as E, X as G, Y as $, Z as O } from "./Expandable-BnGSJjQg.js";
|
|
2
|
+
import { a5 as Be, b2 as xe, aA as De, aj as Fe, $ as Ae, ap as Me, bG as ve, N as Re, aa as _e, P as He, B as We, bc as ke, C as ze, bk as Le, b as Ee, c as Ge, O as $e, q as Oe, af as we, aO as Ve, aD as Xe, as as je, m as Ze, o as Ue, aG as qe, ad as Ke, b4 as Qe, ab as Ye, _ as Je, ar as ea, aR as aa, b6 as sa, p as ta, ao as ra, a2 as oa, at as ia, a4 as na, ac as la, bw as da, aU as ca, t as ma, I as ga, i as pa, ax as ua, M as ba, y as fa, au as ha, bB as Ta, aq as ya, w as Sa, aT as Pa, a$ as Ca, al as Ia, aL as Na, ai as Ba, an as xa, av as Da, bI as Fa, aS as Aa, bH as Ma, ae as va, e as Ra, R as _a, l as Ha, r as Wa, aI as ka, ak as za, ag as La, j as Ea, z as Ga, b3 as $a, ah as Oa, b8 as wa, bb as Va, b9 as Xa, ba as ja, k as Za, b5 as Ua, S as qa, bd as Ka, aw as Qa, b7 as Ya, bC as Ja, am as es, bF as as, v as ss, bx as ts, n as rs, h as os, s as is, a0 as ns, a9 as ls, bj as ds, bq as cs, aC as ms, a8 as gs, aQ as ps, aF as us, az as bs, aN as fs, aK as hs, a3 as Ts } from "./Expandable-BnGSJjQg.js";
|
|
3
3
|
import { jsx as c, jsxs as S } from "react/jsx-runtime";
|
|
4
4
|
import { C as e, T as a, aa as w, S as s, E as u, R as g, Z as V } from "./UIContext-CGQI_KJk.js";
|
|
5
5
|
import { B as X, a as j, e as Z, c as U, d as q, b as K } from "./BaseAsyncButton-CJlY7Uik.js";
|
|
6
6
|
import { b as Q } from "./BaseText-Dxbk1JJa.js";
|
|
7
|
-
import { B as Ss, D as Ps, M as Cs, O as Is, a as Ns, T as Bs } from "./TimeframeQuickBar-
|
|
7
|
+
import { B as Ss, D as Ps, M as Cs, O as Is, a as Ns, T as Bs } from "./TimeframeQuickBar-DFK4fnAA.js";
|
|
8
8
|
import { formatDateRange as Ds, resolveEvent as Fs, resolvePreset as As, smartDateFormat as Ms } from "@mt-gloss/utils/dateInterpretation";
|
|
9
9
|
const Y = {
|
|
10
10
|
page: {
|
package/composites-panels.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as B from "react";
|
|
|
5
5
|
import k, { useState as x, useRef as q, createContext as be, useContext as ve, useMemo as ce, useEffect as z, useCallback as R, useLayoutEffect as Re } from "react";
|
|
6
6
|
import { SPIN_COMMIT_REDUCED as $e, SPIN_COMMIT_FULL as Fe } from "@mt-gloss/motion";
|
|
7
7
|
import { useMotionValue as de, animate as V, motion as ze } from "framer-motion";
|
|
8
|
-
import { b as He, M as ue } from "./TimeframeQuickBar-
|
|
8
|
+
import { b as He, M as ue } from "./TimeframeQuickBar-DFK4fnAA.js";
|
|
9
9
|
import { useSensors as Ue, useSensor as pe, PointerSensor as Be, KeyboardSensor as Ve, DndContext as Ye, closestCenter as Ke } from "@dnd-kit/core";
|
|
10
10
|
import { sortableKeyboardCoordinates as qe, SortableContext as Ge, horizontalListSortingStrategy as Qe, arrayMove as We, useSortable as je } from "@dnd-kit/sortable";
|
|
11
11
|
import { CSS as Ze } from "@dnd-kit/utilities";
|