serverside_pivot 0.0.96 → 0.0.98
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/README.md +5 -4
- package/dist/react/chunks/ContextMenu-DQGCdUhU.mjs +211 -0
- package/dist/react/chunks/{DetailDrawer-DgKSC5Vu.mjs → DetailDrawer-yMFRd6Td.mjs} +1 -1
- package/dist/react/chunks/{DetailSidePanel-CC5Dugyl.mjs → DetailSidePanel-B6fYMnn7.mjs} +1 -1
- package/dist/react/chunks/{DetailSurfaceContent-CrQVHlcU.mjs → DetailSurfaceContent-B9cfLYti.mjs} +1 -1
- package/dist/react/chunks/{ECharts2dRenderer-46gLrUdf.mjs → ECharts2dRenderer-ER6rHtch.mjs} +1 -1
- package/dist/react/chunks/{ECharts3dRenderer-Dg4ta5Bl.mjs → ECharts3dRenderer-BMVfbpXH.mjs} +1 -1
- package/dist/react/chunks/{EditSidePanel-CkShaByb.mjs → EditSidePanel-BjJd5BaX.mjs} +1 -1
- package/dist/react/chunks/{InlineDetailPanel-mnwjoD0I.mjs → InlineDetailPanel-Bbkpv9jz.mjs} +1 -1
- package/dist/react/chunks/{PivotCharts-MX-Z7DlR.mjs → PivotCharts-P5cBJcwu.mjs} +5 -3
- package/dist/react/chunks/{ReportEditor-U0E42xKL.mjs → ReportEditor-P4UZ97Ik.mjs} +174 -175
- package/dist/react/chunks/{SidebarPanel-BzRW1Kgq.mjs → SidebarPanel-DRoxHRhK.mjs} +1039 -1024
- package/dist/react/chunks/{SparklineDetailGraph-35Tim_8B.mjs → SparklineDetailGraph-C9UX-feP.mjs} +22 -22
- package/dist/react/chunks/clientCoreRuntime-n2guUxhp.mjs +790 -0
- package/dist/react/chunks/{installCanvasRenderer-DRq0xpXO.mjs → installCanvasRenderer-BR0XmdVX.mjs} +1 -1
- package/dist/react/chunks/{react-CL4GbEOd.mjs → react-B5JcZShu.mjs} +17394 -13825
- package/dist/react/chunks/{xlsx.mini.min-kfIgXMVB.mjs → xlsx.mini.min-YUTWASKG.mjs} +1 -1
- package/dist/react/components/DashTanstackPivot.react.d.ts +6 -0
- package/dist/react/components/GlobalSearchInput.d.ts +17 -0
- package/dist/react/components/LiveCellDisplay.d.ts +25 -0
- package/dist/react/components/LiveExplainSidePanel.d.ts +15 -0
- package/dist/react/components/LiveStreamDiffBar.d.ts +15 -0
- package/dist/react/hooks/useDismiss.d.ts +43 -0
- package/dist/react/hooks/usePivotNormalization.d.ts +4 -0
- package/dist/react/hooks/usePrefersReducedMotion.d.ts +8 -0
- package/dist/react/hooks/useRenderHelpers.d.ts +1 -1
- package/dist/react/hooks/useRowCache.d.ts +2 -0
- package/dist/react/hooks/useServerSideRowModel.d.ts +1 -1
- package/dist/react/index.mjs +28 -19
- package/dist/react/react.d.ts +6 -1
- package/dist/react/runtime/client/clientPivotTransport.d.ts +16 -0
- package/dist/react/runtime/client/clientResponsePostProcessor.d.ts +8 -1
- package/dist/react/runtime/client/clientSubscriptionEngine.d.ts +88 -0
- package/dist/react/runtime/client/duckdbWasmExecutor.d.ts +22 -0
- package/dist/react/runtime/client/index.d.ts +1 -0
- package/dist/react/runtime/client/types.d.ts +6 -0
- package/dist/react/runtime/core/clientCoreRuntime.d.ts +46 -0
- package/dist/react/runtime/core/duckdbSqlEmitter.d.ts +37 -0
- package/dist/react/runtime/core/semanticIr.generated.d.ts +196 -0
- package/dist/react/runtime/responseQueue.d.ts +21 -0
- package/dist/react/runtime/rowIdentity.d.ts +20 -0
- package/dist/react/runtime/runtimeDomains.d.ts +8 -1
- package/dist/react/runtime/streamingTypes.d.ts +182 -0
- package/dist/react/runtime/useRuntimeViewportTableData.d.ts +1 -1
- package/dist/react/runtime/useViewportSubscriptionStore.d.ts +112 -0
- package/dist/react/runtime/useWorkspaceStatusPresentation.d.ts +1 -1
- package/dist/react/utils/helpers.d.ts +1 -1
- package/dist/react/utils/pivotLayoutUtils.d.ts +3 -3
- package/dist/react/utils/rowMotion.d.ts +108 -0
- package/dist/react/utils/styles.d.ts +1 -0
- package/package.json +6 -8
- package/dist/react/chunks/ContextMenu-DJuS4qTZ.mjs +0 -198
package/dist/react/chunks/{SparklineDetailGraph-35Tim_8B.mjs → SparklineDetailGraph-C9UX-feP.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { X as et, Y as nt, Z as rt, _ as w, $ as at } from "./react-B5JcZShu.mjs";
|
|
3
3
|
function it({ modal: M, theme: n }) {
|
|
4
4
|
const l = Array.isArray(M && M.points) ? M.points : [], S = M && M.sparklineConfig ? M.sparklineConfig : {}, s = ["line", "area", "column", "bar"].includes(S.type) ? S.type : "line", x = 640, i = 300, a = 46, [D, A] = e.useState(null), [X, v] = e.useState(null);
|
|
5
5
|
e.useEffect(() => {
|
|
@@ -13,7 +13,7 @@ function it({ modal: M, theme: n }) {
|
|
|
13
13
|
}, [l.length, X]), m = e.useMemo(
|
|
14
14
|
() => l.slice(u.start, u.end + 1),
|
|
15
15
|
[u, l]
|
|
16
|
-
),
|
|
16
|
+
), G = m.length, b = l.length > 4, $ = b && G > 4, g = b && (u.start > 0 || u.end < l.length - 1), f = e.useMemo(
|
|
17
17
|
() => et({ points: m, type: s, width: x, height: i, padding: a }),
|
|
18
18
|
[m, s]
|
|
19
19
|
), E = nt(m), y = e.useMemo(
|
|
@@ -71,15 +71,15 @@ function it({ modal: M, theme: n }) {
|
|
|
71
71
|
return !d || !p ? null : { index: c, label: d.label, x: p.markerX };
|
|
72
72
|
}
|
|
73
73
|
).filter(Boolean);
|
|
74
|
-
}, [k, m]),
|
|
74
|
+
}, [k, m]), z = S.color || n.primary || "#2563EB", H = S.positiveColor || (n.isDark ? "#86EFAC" : "#2F855A"), q = S.negativeColor || (n.isDark ? "#FDA4AF" : "#B91C1C"), J = E.length ? w(Math.min(...E)) : "", K = E.length ? w(Math.max(...E)) : "", T = m[0], V = m[m.length - 1], P = y.min < 0 && y.max > 0 ? at(0, y.min, y.max, a, i - a) : null, o = D !== null && k[D] ? k[D] : null, R = 172, Z = 54, L = o ? Math.max(10, Math.min(x - R - 10, o.markerX + (o.markerX > x * 0.66 ? -R - 14 : 14))) : 0, N = o ? Math.max(10, Math.min(i - Z - 10, o.markerY + (o.markerY > i * 0.55 ? -Z - 14 : 14))) : 0, Q = e.useCallback((t) => {
|
|
75
75
|
if (!k.length) return;
|
|
76
76
|
const r = t.currentTarget.getBoundingClientRect(), c = (t.clientX - r.left) / Math.max(r.width, 1) * x, d = (t.clientY - r.top) / Math.max(r.height, 1) * i;
|
|
77
77
|
let p = 0, h = Number.POSITIVE_INFINITY;
|
|
78
78
|
k.forEach(
|
|
79
79
|
/** @param {any} [mark] @param {any} [index] @returns {any} */
|
|
80
|
-
(I,
|
|
81
|
-
const
|
|
82
|
-
|
|
80
|
+
(I, C) => {
|
|
81
|
+
const W = c - I.markerX, F = d - I.markerY, _ = s === "bar" ? W * W + F * F : Math.abs(W) + Math.abs(F) * 0.08;
|
|
82
|
+
_ < h && (h = _, p = C);
|
|
83
83
|
}
|
|
84
84
|
), A(p);
|
|
85
85
|
}, [k, i, s, x]), O = e.useCallback((t, r) => {
|
|
@@ -93,16 +93,16 @@ function it({ modal: M, theme: n }) {
|
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
if (h - p + 1 < d) {
|
|
96
|
-
const I = Math.round((p + h) / 2),
|
|
97
|
-
v({ start:
|
|
96
|
+
const I = Math.round((p + h) / 2), C = Math.floor(d / 2), W = Math.max(0, Math.min(c - d + 1, I - C));
|
|
97
|
+
v({ start: W, end: W + d - 1 });
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
v({ start: p, end: h });
|
|
101
101
|
}, [l.length]), Y = e.useCallback((t) => {
|
|
102
102
|
if (!b) return;
|
|
103
|
-
const r = u.start, c = u.end, d = c - r + 1, p = Math.min(4, l.length), h = Math.max(p, Math.min(l.length, Math.round(d * t))), I = o ? o.fullIndex : Math.round((r + c) / 2),
|
|
104
|
-
O(
|
|
105
|
-
}, [o, b, u, l.length, O]),
|
|
103
|
+
const r = u.start, c = u.end, d = c - r + 1, p = Math.min(4, l.length), h = Math.max(p, Math.min(l.length, Math.round(d * t))), I = o ? o.fullIndex : Math.round((r + c) / 2), C = Math.max(0, Math.min(l.length - h, Math.round(I - h / 2)));
|
|
104
|
+
O(C, C + h - 1);
|
|
105
|
+
}, [o, b, u, l.length, O]), U = e.useCallback(() => {
|
|
106
106
|
A(null), v(null);
|
|
107
107
|
}, []), tt = e.useCallback((t) => {
|
|
108
108
|
b && (t.preventDefault(), Y(t.deltaY < 0 ? 0.68 : 1.42));
|
|
@@ -131,9 +131,9 @@ function it({ modal: M, theme: n }) {
|
|
|
131
131
|
{
|
|
132
132
|
type: "button",
|
|
133
133
|
"data-pivot-sparkline-zoom-in": "true",
|
|
134
|
-
disabled:
|
|
134
|
+
disabled: !$,
|
|
135
135
|
onClick: () => Y(0.62),
|
|
136
|
-
style: { border: `1px solid ${n.border}`, background:
|
|
136
|
+
style: { border: `1px solid ${n.border}`, background: $ ? n.background : n.headerSubtleBg, color: $ ? n.text : n.textSec, borderRadius: "6px", padding: "4px 8px", fontSize: "11px", fontWeight: 700, cursor: $ ? "pointer" : "default", opacity: $ ? 1 : 0.55 }
|
|
137
137
|
},
|
|
138
138
|
"Zoom In"
|
|
139
139
|
), /* @__PURE__ */ e.createElement(
|
|
@@ -152,7 +152,7 @@ function it({ modal: M, theme: n }) {
|
|
|
152
152
|
type: "button",
|
|
153
153
|
"data-pivot-sparkline-zoom-reset": "true",
|
|
154
154
|
disabled: !g,
|
|
155
|
-
onClick:
|
|
155
|
+
onClick: U,
|
|
156
156
|
style: { border: `1px solid ${n.border}`, background: g ? n.background : n.headerSubtleBg, color: g ? n.text : n.textSec, borderRadius: "6px", padding: "4px 8px", fontSize: "11px", fontWeight: 700, cursor: g ? "pointer" : "default", opacity: g ? 1 : 0.55 }
|
|
157
157
|
},
|
|
158
158
|
"Reset"
|
|
@@ -164,7 +164,7 @@ function it({ modal: M, theme: n }) {
|
|
|
164
164
|
"data-pivot-sparkline-detail-svg": "true",
|
|
165
165
|
viewBox: `0 0 ${x} ${i}`,
|
|
166
166
|
"aria-label": "Sparkline detail chart",
|
|
167
|
-
onMouseMove:
|
|
167
|
+
onMouseMove: Q,
|
|
168
168
|
onMouseLeave: () => A(null),
|
|
169
169
|
onWheel: tt,
|
|
170
170
|
style: { display: "block", width: "100%", height: "320px", cursor: k.length ? "crosshair" : "default" }
|
|
@@ -181,8 +181,8 @@ function it({ modal: M, theme: n }) {
|
|
|
181
181
|
P !== null ? /* @__PURE__ */ e.createElement("line", { x1: a, y1: P, x2: x - a, y2: P, stroke: n.textSec, strokeWidth: "1.2", opacity: "0.5" }) : null,
|
|
182
182
|
/* @__PURE__ */ e.createElement("line", { x1: a, y1: i - a, x2: x - a, y2: i - a, stroke: n.border, strokeWidth: "1.2" }),
|
|
183
183
|
/* @__PURE__ */ e.createElement("line", { x1: a, y1: a, x2: a, y2: i - a, stroke: n.border, strokeWidth: "1.2" }),
|
|
184
|
-
s === "area" && f.areaPath ? /* @__PURE__ */ e.createElement("path", { d: f.areaPath, fill:
|
|
185
|
-
s === "line" || s === "area" ? /* @__PURE__ */ e.createElement(e.Fragment, null, f.linePath ? /* @__PURE__ */ e.createElement("path", { d: f.linePath, fill: "none", stroke:
|
|
184
|
+
s === "area" && f.areaPath ? /* @__PURE__ */ e.createElement("path", { d: f.areaPath, fill: z, opacity: S.areaOpacity || 0.14 }) : null,
|
|
185
|
+
s === "line" || s === "area" ? /* @__PURE__ */ e.createElement(e.Fragment, null, f.linePath ? /* @__PURE__ */ e.createElement("path", { d: f.linePath, fill: "none", stroke: z, strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }) : null, k.map(
|
|
186
186
|
/** @param {any} [point] @param {any} [index] @returns {any} */
|
|
187
187
|
(t, r) => /* @__PURE__ */ e.createElement(
|
|
188
188
|
"circle",
|
|
@@ -192,7 +192,7 @@ function it({ modal: M, theme: n }) {
|
|
|
192
192
|
cx: t.markerX,
|
|
193
193
|
cy: t.markerY,
|
|
194
194
|
r: o && o.pointIndex === t.pointIndex ? "5.4" : "3.6",
|
|
195
|
-
fill:
|
|
195
|
+
fill: z,
|
|
196
196
|
stroke: n.background,
|
|
197
197
|
strokeWidth: "1.4"
|
|
198
198
|
},
|
|
@@ -211,15 +211,15 @@ function it({ modal: M, theme: n }) {
|
|
|
211
211
|
height: t.height,
|
|
212
212
|
rx: "2",
|
|
213
213
|
ry: "2",
|
|
214
|
-
fill: t.positive ? H :
|
|
214
|
+
fill: t.positive ? H : q,
|
|
215
215
|
opacity: o && o.fullIndex === t.fullIndex ? 1 : 0.88
|
|
216
216
|
},
|
|
217
217
|
/* @__PURE__ */ e.createElement("title", null, `${t.label}: ${w(t.value, 6)}`)
|
|
218
218
|
)
|
|
219
219
|
) : null,
|
|
220
|
-
o ? /* @__PURE__ */ e.createElement("g", { "data-pivot-sparkline-tooltip": "true", pointerEvents: "none" }, s !== "bar" ? /* @__PURE__ */ e.createElement("line", { x1: o.markerX, y1: a, x2: o.markerX, y2: i - a, stroke:
|
|
221
|
-
f.maxValue !== null ? /* @__PURE__ */ e.createElement("text", { x: x - a, y: "22", fill: n.textSec, fontSize: "11", fontWeight: "700", textAnchor: "end" }, "Max ",
|
|
222
|
-
f.minValue !== null ? /* @__PURE__ */ e.createElement("text", { x: x - a, y: i - 28, fill: n.textSec, fontSize: "11", fontWeight: "700", textAnchor: "end" }, "Min ",
|
|
220
|
+
o ? /* @__PURE__ */ e.createElement("g", { "data-pivot-sparkline-tooltip": "true", pointerEvents: "none" }, s !== "bar" ? /* @__PURE__ */ e.createElement("line", { x1: o.markerX, y1: a, x2: o.markerX, y2: i - a, stroke: z, strokeWidth: "1", opacity: "0.55", strokeDasharray: "5 5" }) : null, /* @__PURE__ */ e.createElement("circle", { cx: o.markerX, cy: o.markerY, r: "6.4", fill: z, stroke: n.background, strokeWidth: "2" }), /* @__PURE__ */ e.createElement("rect", { x: L, y: N, width: R, height: Z, rx: "7", fill: n.background || "#fff", stroke: n.border, strokeWidth: "1.2", opacity: "0.98" }), /* @__PURE__ */ e.createElement("text", { x: L + 10, y: N + 18, fill: n.textSec, fontSize: "10", fontWeight: "700" }, String(o.label || o.pointIndex + 1).slice(0, 28)), /* @__PURE__ */ e.createElement("text", { x: L + 10, y: N + 38, fill: n.text, fontSize: "15", fontWeight: "800" }, w(o.value, 6))) : null,
|
|
221
|
+
f.maxValue !== null ? /* @__PURE__ */ e.createElement("text", { x: x - a, y: "22", fill: n.textSec, fontSize: "11", fontWeight: "700", textAnchor: "end" }, "Max ", K) : null,
|
|
222
|
+
f.minValue !== null ? /* @__PURE__ */ e.createElement("text", { x: x - a, y: i - 28, fill: n.textSec, fontSize: "11", fontWeight: "700", textAnchor: "end" }, "Min ", J) : null,
|
|
223
223
|
/* @__PURE__ */ e.createElement("rect", { "data-pivot-sparkline-hover-target": "true", x: "0", y: "0", width: x, height: i, fill: "transparent" })
|
|
224
224
|
),
|
|
225
225
|
/* @__PURE__ */ e.createElement("div", { style: { display: "flex", justifyContent: "space-between", gap: "10px", marginTop: "6px", fontSize: "11px", color: n.textSec } }, /* @__PURE__ */ e.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, T ? T.label : ""), /* @__PURE__ */ e.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", textAlign: "right" } }, V ? V.label : ""))
|