wimui 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data-display/PivotTable/PivotTable.cjs +1 -1
- package/dist/components/data-display/PivotTable/PivotTable.d.ts +12 -0
- package/dist/components/data-display/PivotTable/PivotTable.js +210 -117
- package/dist/components/data-display/PivotTable/layoutPivot.cjs +1 -1
- package/dist/components/data-display/PivotTable/layoutPivot.d.ts +29 -0
- package/dist/components/data-display/PivotTable/layoutPivot.js +29 -1
- package/dist/components/data-display/PivotTable/pivot-table.module.cjs +1 -1
- package/dist/components/data-display/PivotTable/pivot-table.module.js +5 -4
- package/dist/llms-full.txt +4 -1
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/chevron-right.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),r=require("../../../icon/chevron-right.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../../../hooks/useMergedRef.cjs"),o=require("../Table/Table.cjs"),s=require("./layoutPivot.cjs"),c=require("./pivot-table.module.cjs");let l=require("react");l=e.__toESM(l,1);let u=require("classnames");u=e.__toESM(u,1);let d=require("react/jsx-runtime");var f=40,ee=8,te=30,p=(e,t=[])=>{for(let n of e)n.children?.length&&(t.push(n.key),p(n.children,t));return t},m=l.default.forwardRef(({rows:e,columns:m,getValue:h,rowAxisLabel:g,caption:_,expandedValues:v,defaultExpandedValues:ne,onExpandedChange:re,maxHeight:ie,stickyHeader:y=!1,stickyRowHeaders:ae=!1,virtualized:b=!1,columnSubtotals:x=!1,totalRow:S=!1,totalColumn:C=!1,labels:oe,className:se,...w},ce)=>{let{t:le}=t.useWimTranslation(`components`),T=l.default.useId(),E=oe?.total??le(`pivottable.total`),D=(0,l.useMemo)(()=>s.layoutPivotColumns(m,{subtotals:x,total:C}),[m,x,C]),[ue,de]=(0,l.useState)(()=>ne??p(e)),O=v??ue,k=(0,l.useMemo)(()=>new Set(O),[O]),fe=(0,l.useCallback)(e=>{let t=k.has(e)?O.filter(t=>t!==e):[...O,e];v===void 0&&de(t),re?.(t)},[O,k,v,re]),A=(0,l.useMemo)(()=>s.layoutPivotRows(e,e=>k.has(e)),[e,k]),j=(0,l.useMemo)(()=>p(e).length>0,[e]),M=g!=null&&g!==!1,N=`${T}corner`,pe=e=>`${T}c${e}`,P=e=>`${T}r${e}`,F=`${T}total`,I=(0,l.useMemo)(()=>D.columns.map(e=>e.headerIds.map(e=>`${T}c${e}`).join(` `)),[D,T]),L=l.default.useRef(null),R=l.default.useRef(null),[z,me]=l.default.useState(!1),[he,ge]=l.default.useState(!0);l.default.useLayoutEffect(()=>{let e=L.current,t=R.current;if(!e||!t||typeof ResizeObserver>`u`)return;let n=()=>{me(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight);let n=t.rows[0]?.cells[0];ge(!n||n.offsetWidth<=e.clientWidth/2)};n();let r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[]);let _e=a.useMergedRef(ce,R),B=ae&&he,V=l.default.useRef([]),[ve,ye]=(0,l.useState)([]),H=D.depth;l.default.useLayoutEffect(()=>{if(!y)return;let e=V.current.slice(0,H),t=()=>{let t=0,n=e.map(e=>{let n=t;return t+=e?.getBoundingClientRect().height??0,n});ye(e=>e.length===n.length&&e.every((e,t)=>e===n[t])?e:n)};if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return e.forEach(e=>e&&n.observe(e)),()=>n.disconnect()},[y,H]);let U=l.default.useRef(null),[W,be]=(0,l.useState)(0),[G,xe]=(0,l.useState)(null),[K,q]=(0,l.useState)(null),[J,Se]=(0,l.useState)([]),Ce=l.default.useRef(0),Y=(0,l.useCallback)(()=>{let e=L.current,t=U.current,n=R.current;if(!e||!t||!n)return;let r=t.querySelector(`tr[data-row-index]`)?.getBoundingClientRect().height??0;r>0&&be(e=>Math.abs(e-r)<.01?e:r);let i={scrollTop:e.scrollTop,height:e.clientHeight,bodyOffset:t.getBoundingClientRect().top-e.getBoundingClientRect().top+e.scrollTop};xe(e=>e&&e.scrollTop===i.scrollTop&&e.height===i.height&&e.bodyOffset===i.bodyOffset?e:i);let a=Array.from(n.querySelectorAll(`thead [data-column-index]`)).reduce((e,t)=>(e[Number(t.dataset.columnIndex)]=t.getBoundingClientRect().width,e),[]),o=Ce.current!==e.clientWidth;Ce.current=e.clientWidth,Se(e=>{let t=o?[]:e,n=a.map((e,n)=>(e||0)>(t[n]??0)+.01?e:t[n]??0);return n.length===e.length&&n.every((t,n)=>t===e[n])?e:n})},[]),X=A.length,we=D.columns.length;l.default.useLayoutEffect(()=>{if(!b||(Y(),typeof ResizeObserver>`u`))return;let e=new ResizeObserver(Y);return L.current&&e.observe(L.current),()=>e.disconnect()},[b,Y,X,we]);let Te=(0,l.useMemo)(()=>new Map(A.map((e,t)=>[e.key,t])),[A]),Ee=(0,l.useMemo)(()=>b?G?s.pivotRowWindow({rowCount:X,rowHeight:W||f,scrollTop:G.scrollTop,viewportHeight:G.height,bodyOffset:G.bodyOffset,overscan:ee,keep:K===null?null:Te.get(K)??null}):s.pivotRowWindow({rowCount:X,rowHeight:f,scrollTop:0,viewportHeight:Math.min(X,te)*f,bodyOffset:0,overscan:0}):null,[b,G,X,W,K,Te]),De=(0,l.useMemo)(()=>new Map(D.columns.map((e,t)=>[e.headerIds[e.headerIds.length-1],t])),[D]),Z=e=>b&&e!==void 0?{"data-column-index":e,style:J[e]?{minWidth:J[e]}:void 0}:null,Q=(e,t=!1)=>y?{top:Math.floor(ve[e]??0),zIndex:10+H-e+ +!!t}:void 0,Oe=`${T}caption`,$=_?{"aria-labelledby":Oe}:w[`aria-label`]?{"aria-label":w[`aria-label`]}:w[`aria-labelledby`]?{"aria-labelledby":w[`aria-labelledby`]}:null,ke=(e,t)=>{let a=b?P(t):[...e.ancestors.map(P),P(t)].join(` `),s=[...M?[N]:[],...b?[]:e.ancestors.map(P)].join(` `);return(0,d.jsxs)(o.Table.Row,{className:(0,u.default)(e.hasChildren&&c.default.groupRow),"data-row-index":b?t:void 0,"data-row-key":b?e.key:void 0,"aria-rowindex":b?H+t+1:void 0,children:[(0,d.jsxs)(`th`,{id:P(t),scope:`row`,headers:s||void 0,className:(0,u.default)(c.default.rowHeader,B&&c.default.stickyLeft),style:{"--wim-pivot-table-depth":e.depth},children:[b&&e.ancestors.length>0&&(0,d.jsx)(n.VisuallyHidden,{children:e.ancestors.map(e=>(0,d.jsxs)(l.default.Fragment,{children:[A[e].node.label,`, `]},e))}),e.hasChildren?(0,d.jsxs)(`button`,{type:`button`,className:c.default.toggle,"aria-expanded":e.expanded,onClick:()=>fe(e.key),children:[(0,d.jsx)(`span`,{className:(0,u.default)(c.default.chevron,e.expanded&&c.default.open),"aria-hidden":`true`,children:(0,d.jsx)(i.Icon,{component:r.default,size:`sm`})}),e.node.label]}):(0,d.jsx)(`span`,{className:(0,u.default)(j&&c.default.leafLabel),children:e.node.label})]}),D.columns.map((t,n)=>(0,d.jsx)(o.Table.Cell,{headers:`${a} ${I[n]}`,className:(0,u.default)(c.default.value,t.kind!==`leaf`&&c.default.aggregate,t.startsGroup&&!(B&&n===0)&&c.default.groupStart),children:h(e.key,t.key)},n))]},e.key)};return(0,d.jsx)(`div`,{ref:L,className:c.default.scroller,style:ie===void 0?void 0:{maxHeight:ie},tabIndex:z?0:void 0,onScroll:b?Y:void 0,...z&&$?{role:`region`,...$}:null,children:(0,d.jsxs)(`table`,{ref:_e,className:(0,u.default)(`wim-pivot-table`,c.default.root,se),"aria-rowcount":b?H+X+ +!!S:void 0,...w,children:[_&&(0,d.jsx)(`caption`,{id:Oe,className:c.default.caption,children:_}),(0,d.jsx)(`colgroup`,{}),D.groupSpans.map((e,t)=>(0,d.jsx)(`colgroup`,{span:e},t)),(0,d.jsx)(o.Table.Header,{children:D.headerRows.map((e,t)=>(0,d.jsxs)(`tr`,{"aria-rowindex":b?t+1:void 0,ref:e=>{V.current[t]=e},children:[t===0&&(M?(0,d.jsx)(`th`,{id:N,scope:`col`,rowSpan:D.depth,className:(0,u.default)(c.default.columnHeader,c.default.corner,c.default.bottom,y&&c.default.stickyTop,B&&c.default.stickyLeft),...Z(0),style:{...Q(0,!0),...Z(0)?.style},children:g}):(0,d.jsx)(`td`,{rowSpan:D.depth,className:(0,u.default)(c.default.columnHeader,c.default.bottom,y&&c.default.stickyTop,B&&c.default.stickyLeft),...Z(0),style:{...Q(0,!0),...Z(0)?.style}})),e.map((e,n)=>(0,d.jsx)(`th`,{id:pe(e.id),scope:e.kind===`group`&&e.topLevel?`colgroup`:`col`,colSpan:e.colSpan>1?e.colSpan:void 0,rowSpan:e.rowSpan>1?e.rowSpan:void 0,className:(0,u.default)(c.default.columnHeader,e.kind===`group`&&c.default.group,e.reachesBottom&&c.default.bottom,e.startsGroup&&!(B&&n===0)&&c.default.groupStart,y&&c.default.stickyTop),...e.reachesBottom?Z((De.get(e.id)??-1)+1):null,style:{...Q(t),...e.reachesBottom?Z((De.get(e.id)??-1)+1)?.style:null},children:e.kind===`group`||e.kind===`leaf`?e.node?.label:E},e.id))]},t))}),(0,d.jsx)(o.Table.Body,{ref:U,onFocus:b?e=>{let t=e.target.closest(`tr`)?.dataset.rowKey;t!==void 0&&q(t)}:void 0,onBlur:b?e=>{e.currentTarget.contains(e.relatedTarget)||q(null)}:void 0,children:(Ee??[{kind:`rows`,from:0,to:X}]).map((e,t)=>e.kind===`gap`?(0,d.jsx)(`tr`,{"aria-hidden":`true`,className:c.default.gap,children:(0,d.jsx)(`td`,{colSpan:we+1,style:{height:e.count*(W||f)}})},`gap-${t}`):A.slice(e.from,e.to).map((t,n)=>ke(t,e.from+n)))}),S&&(0,d.jsx)(o.Table.Footer,{children:(0,d.jsxs)(o.Table.Row,{className:c.default.totalRow,"aria-rowindex":b?H+X+1:void 0,children:[(0,d.jsx)(`th`,{id:F,scope:`row`,headers:M?N:void 0,className:(0,u.default)(c.default.rowHeader,B&&c.default.stickyLeft),children:(0,d.jsx)(`span`,{className:(0,u.default)(j&&c.default.leafLabel),children:E})}),D.columns.map((e,t)=>(0,d.jsx)(o.Table.Cell,{headers:`${F} ${I[t]}`,className:(0,u.default)(c.default.value,e.startsGroup&&!(B&&t===0)&&c.default.groupStart),children:h(null,e.key)},t))]})})]})})});m.displayName=`PivotTable`,exports.PivotTable=m;
|
|
@@ -54,6 +54,12 @@ export type PivotTableProps = Omit<React.ComponentPropsWithoutRef<"table">, "chi
|
|
|
54
54
|
* scrolls with the rest, so that the values stay readable.
|
|
55
55
|
*/
|
|
56
56
|
stickyRowHeaders?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Renders only the rows in view (plus a few around them) and keeps the scroll height
|
|
59
|
+
* with empty spacer rows. Use it for tables with hundreds of rows, together with
|
|
60
|
+
* `maxHeight`. Rows must all have the same height, so keep labels and values on one line.
|
|
61
|
+
*/
|
|
62
|
+
virtualized?: boolean;
|
|
57
63
|
/** Adds a subtotal column after the columns of each column group. */
|
|
58
64
|
columnSubtotals?: boolean;
|
|
59
65
|
/** Adds a grand total row at the bottom. */
|
|
@@ -122,6 +128,12 @@ export declare const PivotTable: React.ForwardRefExoticComponent<Omit<Omit<React
|
|
|
122
128
|
* scrolls with the rest, so that the values stay readable.
|
|
123
129
|
*/
|
|
124
130
|
stickyRowHeaders?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Renders only the rows in view (plus a few around them) and keeps the scroll height
|
|
133
|
+
* with empty spacer rows. Use it for tables with hundreds of rows, together with
|
|
134
|
+
* `maxHeight`. Rows must all have the same height, so keep labels and values on one line.
|
|
135
|
+
*/
|
|
136
|
+
virtualized?: boolean;
|
|
125
137
|
/** Adds a subtotal column after the columns of each column group. */
|
|
126
138
|
columnSubtotals?: boolean;
|
|
127
139
|
/** Adds a grand total row at the bottom. */
|
|
@@ -1,166 +1,259 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
|
-
import t from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import s from "./
|
|
9
|
-
import c
|
|
10
|
-
import d from "
|
|
11
|
-
import
|
|
3
|
+
import { VisuallyHidden as t } from "../../layout/VisuallyHidden/VisuallyHidden.js";
|
|
4
|
+
import n from "../../../icon/chevron-right.js";
|
|
5
|
+
import { Icon as r } from "../../media/Icon/Icon.js";
|
|
6
|
+
import { useMergedRef as i } from "../../../hooks/useMergedRef.js";
|
|
7
|
+
import { Table as a } from "../Table/Table.js";
|
|
8
|
+
import { layoutPivotColumns as o, layoutPivotRows as s, pivotRowWindow as ee } from "./layoutPivot.js";
|
|
9
|
+
import c from "./pivot-table.module.js";
|
|
10
|
+
import l, { useCallback as te, useMemo as u, useState as d } from "react";
|
|
11
|
+
import f from "classnames";
|
|
12
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
13
|
//#region src/components/data-display/PivotTable/PivotTable.tsx
|
|
13
|
-
var
|
|
14
|
-
for (let n of e) n.children?.length && (t.push(n.key),
|
|
14
|
+
var h = 40, ne = 8, re = 30, g = (e, t = []) => {
|
|
15
|
+
for (let n of e) n.children?.length && (t.push(n.key), g(n.children, t));
|
|
15
16
|
return t;
|
|
16
|
-
},
|
|
17
|
-
let { t:
|
|
17
|
+
}, _ = l.forwardRef(({ rows: _, columns: ie, getValue: ae, rowAxisLabel: v, caption: y, expandedValues: b, defaultExpandedValues: oe, onExpandedChange: x, maxHeight: S, stickyHeader: C = !1, stickyRowHeaders: se = !1, virtualized: w = !1, columnSubtotals: T = !1, totalRow: E = !1, totalColumn: ce = !1, labels: le, className: ue, ...D }, de) => {
|
|
18
|
+
let { t: fe } = e("components"), O = l.useId(), pe = le?.total ?? fe("pivottable.total"), k = u(() => o(ie, {
|
|
18
19
|
subtotals: T,
|
|
19
|
-
total:
|
|
20
|
+
total: ce
|
|
20
21
|
}), [
|
|
21
|
-
|
|
22
|
+
ie,
|
|
22
23
|
T,
|
|
23
|
-
|
|
24
|
-
]), [
|
|
25
|
-
let t =
|
|
26
|
-
b === void 0 &&
|
|
24
|
+
ce
|
|
25
|
+
]), [me, he] = d(() => oe ?? g(_)), A = b ?? me, j = u(() => new Set(A), [A]), ge = te((e) => {
|
|
26
|
+
let t = j.has(e) ? A.filter((t) => t !== e) : [...A, e];
|
|
27
|
+
b === void 0 && he(t), x?.(t);
|
|
27
28
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
A,
|
|
30
|
+
j,
|
|
30
31
|
b,
|
|
31
|
-
|
|
32
|
-
]),
|
|
33
|
-
|
|
34
|
-
let e =
|
|
32
|
+
x
|
|
33
|
+
]), M = u(() => s(_, (e) => j.has(e)), [_, j]), N = u(() => g(_).length > 0, [_]), P = v != null && v !== !1, F = `${O}corner`, _e = (e) => `${O}c${e}`, I = (e) => `${O}r${e}`, L = `${O}total`, R = u(() => k.columns.map((e) => e.headerIds.map((e) => `${O}c${e}`).join(" ")), [k, O]), z = l.useRef(null), B = l.useRef(null), [V, ve] = l.useState(!1), [ye, be] = l.useState(!0);
|
|
34
|
+
l.useLayoutEffect(() => {
|
|
35
|
+
let e = z.current, t = B.current;
|
|
35
36
|
if (!e || !t || typeof ResizeObserver > "u") return;
|
|
36
37
|
let n = () => {
|
|
37
|
-
|
|
38
|
+
ve(e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight);
|
|
38
39
|
let n = t.rows[0]?.cells[0];
|
|
39
|
-
|
|
40
|
+
be(!n || n.offsetWidth <= e.clientWidth / 2);
|
|
40
41
|
};
|
|
41
42
|
n();
|
|
42
43
|
let r = new ResizeObserver(n);
|
|
43
44
|
return r.observe(e), r.observe(t), () => r.disconnect();
|
|
44
45
|
}, []);
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
if (!
|
|
48
|
-
let e =
|
|
46
|
+
let xe = i(de, B), H = se && ye, U = l.useRef([]), [Se, Ce] = d([]), W = k.depth;
|
|
47
|
+
l.useLayoutEffect(() => {
|
|
48
|
+
if (!C) return;
|
|
49
|
+
let e = U.current.slice(0, W), t = () => {
|
|
49
50
|
let t = 0, n = e.map((e) => {
|
|
50
51
|
let n = t;
|
|
51
52
|
return t += e?.getBoundingClientRect().height ?? 0, n;
|
|
52
53
|
});
|
|
53
|
-
|
|
54
|
+
Ce((e) => e.length === n.length && e.every((e, t) => e === n[t]) ? e : n);
|
|
54
55
|
};
|
|
55
56
|
if (t(), typeof ResizeObserver > "u") return;
|
|
56
57
|
let n = new ResizeObserver(t);
|
|
57
58
|
return e.forEach((e) => e && n.observe(e)), () => n.disconnect();
|
|
58
|
-
}, [
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
59
|
+
}, [C, W]);
|
|
60
|
+
let we = l.useRef(null), [G, Te] = d(0), [K, Ee] = d(null), [q, De] = d(null), [Oe, ke] = d([]), Ae = l.useRef(0), J = te(() => {
|
|
61
|
+
let e = z.current, t = we.current, n = B.current;
|
|
62
|
+
if (!e || !t || !n) return;
|
|
63
|
+
let r = t.querySelector("tr[data-row-index]")?.getBoundingClientRect().height ?? 0;
|
|
64
|
+
r > 0 && Te((e) => Math.abs(e - r) < .01 ? e : r);
|
|
65
|
+
let i = {
|
|
66
|
+
scrollTop: e.scrollTop,
|
|
67
|
+
height: e.clientHeight,
|
|
68
|
+
bodyOffset: t.getBoundingClientRect().top - e.getBoundingClientRect().top + e.scrollTop
|
|
69
|
+
};
|
|
70
|
+
Ee((e) => e && e.scrollTop === i.scrollTop && e.height === i.height && e.bodyOffset === i.bodyOffset ? e : i);
|
|
71
|
+
let a = Array.from(n.querySelectorAll("thead [data-column-index]")).reduce((e, t) => (e[Number(t.dataset.columnIndex)] = t.getBoundingClientRect().width, e), []), o = Ae.current !== e.clientWidth;
|
|
72
|
+
Ae.current = e.clientWidth, ke((e) => {
|
|
73
|
+
let t = o ? [] : e, n = a.map((e, n) => (e || 0) > (t[n] ?? 0) + .01 ? e : t[n] ?? 0);
|
|
74
|
+
return n.length === e.length && n.every((t, n) => t === e[n]) ? e : n;
|
|
75
|
+
});
|
|
76
|
+
}, []), Y = M.length, X = k.columns.length;
|
|
77
|
+
l.useLayoutEffect(() => {
|
|
78
|
+
if (!w || (J(), typeof ResizeObserver > "u")) return;
|
|
79
|
+
let e = new ResizeObserver(J);
|
|
80
|
+
return z.current && e.observe(z.current), () => e.disconnect();
|
|
81
|
+
}, [
|
|
82
|
+
w,
|
|
83
|
+
J,
|
|
84
|
+
Y,
|
|
85
|
+
X
|
|
86
|
+
]);
|
|
87
|
+
let je = u(() => new Map(M.map((e, t) => [e.key, t])), [M]), Me = u(() => w ? ee(K ? {
|
|
88
|
+
rowCount: Y,
|
|
89
|
+
rowHeight: G || h,
|
|
90
|
+
scrollTop: K.scrollTop,
|
|
91
|
+
viewportHeight: K.height,
|
|
92
|
+
bodyOffset: K.bodyOffset,
|
|
93
|
+
overscan: ne,
|
|
94
|
+
keep: q === null ? null : je.get(q) ?? null
|
|
95
|
+
} : {
|
|
96
|
+
rowCount: Y,
|
|
97
|
+
rowHeight: h,
|
|
98
|
+
scrollTop: 0,
|
|
99
|
+
viewportHeight: Math.min(Y, re) * h,
|
|
100
|
+
bodyOffset: 0,
|
|
101
|
+
overscan: 0
|
|
102
|
+
}) : null, [
|
|
103
|
+
w,
|
|
104
|
+
K,
|
|
105
|
+
Y,
|
|
106
|
+
G,
|
|
107
|
+
q,
|
|
108
|
+
je
|
|
109
|
+
]), Ne = u(() => new Map(k.columns.map((e, t) => [e.headerIds[e.headerIds.length - 1], t])), [k]), Z = (e) => w && e !== void 0 ? {
|
|
110
|
+
"data-column-index": e,
|
|
111
|
+
style: Oe[e] ? { minWidth: Oe[e] } : void 0
|
|
112
|
+
} : null, Q = (e, t = !1) => C ? {
|
|
113
|
+
top: Math.floor(Se[e] ?? 0),
|
|
114
|
+
zIndex: 10 + W - e + +!!t
|
|
115
|
+
} : void 0, Pe = `${O}caption`, $ = y ? { "aria-labelledby": Pe } : D["aria-label"] ? { "aria-label": D["aria-label"] } : D["aria-labelledby"] ? { "aria-labelledby": D["aria-labelledby"] } : null, Fe = (e, i) => {
|
|
116
|
+
let o = w ? I(i) : [...e.ancestors.map(I), I(i)].join(" "), s = [...P ? [F] : [], ...w ? [] : e.ancestors.map(I)].join(" ");
|
|
117
|
+
return /* @__PURE__ */ m(a.Row, {
|
|
118
|
+
className: f(e.hasChildren && c.groupRow),
|
|
119
|
+
"data-row-index": w ? i : void 0,
|
|
120
|
+
"data-row-key": w ? e.key : void 0,
|
|
121
|
+
"aria-rowindex": w ? W + i + 1 : void 0,
|
|
122
|
+
children: [/* @__PURE__ */ m("th", {
|
|
123
|
+
id: I(i),
|
|
124
|
+
scope: "row",
|
|
125
|
+
headers: s || void 0,
|
|
126
|
+
className: f(c.rowHeader, H && c.stickyLeft),
|
|
127
|
+
style: { "--wim-pivot-table-depth": e.depth },
|
|
128
|
+
children: [w && e.ancestors.length > 0 && /* @__PURE__ */ p(t, { children: e.ancestors.map((e) => /* @__PURE__ */ m(l.Fragment, { children: [M[e].node.label, ", "] }, e)) }), e.hasChildren ? /* @__PURE__ */ m("button", {
|
|
129
|
+
type: "button",
|
|
130
|
+
className: c.toggle,
|
|
131
|
+
"aria-expanded": e.expanded,
|
|
132
|
+
onClick: () => ge(e.key),
|
|
133
|
+
children: [/* @__PURE__ */ p("span", {
|
|
134
|
+
className: f(c.chevron, e.expanded && c.open),
|
|
135
|
+
"aria-hidden": "true",
|
|
136
|
+
children: /* @__PURE__ */ p(r, {
|
|
137
|
+
component: n,
|
|
138
|
+
size: "sm"
|
|
139
|
+
})
|
|
140
|
+
}), e.node.label]
|
|
141
|
+
}) : /* @__PURE__ */ p("span", {
|
|
142
|
+
className: f(N && c.leafLabel),
|
|
143
|
+
children: e.node.label
|
|
144
|
+
})]
|
|
145
|
+
}), k.columns.map((t, n) => /* @__PURE__ */ p(a.Cell, {
|
|
146
|
+
headers: `${o} ${R[n]}`,
|
|
147
|
+
className: f(c.value, t.kind !== "leaf" && c.aggregate, t.startsGroup && !(H && n === 0) && c.groupStart),
|
|
148
|
+
children: ae(e.key, t.key)
|
|
149
|
+
}, n))]
|
|
150
|
+
}, e.key);
|
|
151
|
+
};
|
|
152
|
+
return /* @__PURE__ */ p("div", {
|
|
153
|
+
ref: z,
|
|
154
|
+
className: c.scroller,
|
|
155
|
+
style: S === void 0 ? void 0 : { maxHeight: S },
|
|
156
|
+
tabIndex: V ? 0 : void 0,
|
|
157
|
+
onScroll: w ? J : void 0,
|
|
158
|
+
...V && $ ? {
|
|
69
159
|
role: "region",
|
|
70
160
|
...$
|
|
71
161
|
} : null,
|
|
72
|
-
children: /* @__PURE__ */
|
|
73
|
-
ref:
|
|
74
|
-
className:
|
|
75
|
-
|
|
162
|
+
children: /* @__PURE__ */ m("table", {
|
|
163
|
+
ref: xe,
|
|
164
|
+
className: f("wim-pivot-table", c.root, ue),
|
|
165
|
+
"aria-rowcount": w ? W + Y + +!!E : void 0,
|
|
166
|
+
...D,
|
|
76
167
|
children: [
|
|
77
|
-
y && /* @__PURE__ */
|
|
78
|
-
id:
|
|
79
|
-
className:
|
|
168
|
+
y && /* @__PURE__ */ p("caption", {
|
|
169
|
+
id: Pe,
|
|
170
|
+
className: c.caption,
|
|
80
171
|
children: y
|
|
81
172
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
84
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ p("colgroup", {}),
|
|
174
|
+
k.groupSpans.map((e, t) => /* @__PURE__ */ p("colgroup", { span: e }, t)),
|
|
175
|
+
/* @__PURE__ */ p(a.Header, { children: k.headerRows.map((e, t) => /* @__PURE__ */ m("tr", {
|
|
176
|
+
"aria-rowindex": w ? t + 1 : void 0,
|
|
85
177
|
ref: (e) => {
|
|
86
|
-
|
|
178
|
+
U.current[t] = e;
|
|
87
179
|
},
|
|
88
|
-
children: [t === 0 && (
|
|
89
|
-
id:
|
|
180
|
+
children: [t === 0 && (P ? /* @__PURE__ */ p("th", {
|
|
181
|
+
id: F,
|
|
90
182
|
scope: "col",
|
|
91
|
-
rowSpan:
|
|
92
|
-
className:
|
|
93
|
-
|
|
183
|
+
rowSpan: k.depth,
|
|
184
|
+
className: f(c.columnHeader, c.corner, c.bottom, C && c.stickyTop, H && c.stickyLeft),
|
|
185
|
+
...Z(0),
|
|
186
|
+
style: {
|
|
187
|
+
...Q(0, !0),
|
|
188
|
+
...Z(0)?.style
|
|
189
|
+
},
|
|
94
190
|
children: v
|
|
95
|
-
}) : /* @__PURE__ */
|
|
96
|
-
rowSpan:
|
|
97
|
-
className:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
191
|
+
}) : /* @__PURE__ */ p("td", {
|
|
192
|
+
rowSpan: k.depth,
|
|
193
|
+
className: f(c.columnHeader, c.bottom, C && c.stickyTop, H && c.stickyLeft),
|
|
194
|
+
...Z(0),
|
|
195
|
+
style: {
|
|
196
|
+
...Q(0, !0),
|
|
197
|
+
...Z(0)?.style
|
|
198
|
+
}
|
|
199
|
+
})), e.map((e, n) => /* @__PURE__ */ p("th", {
|
|
200
|
+
id: _e(e.id),
|
|
101
201
|
scope: e.kind === "group" && e.topLevel ? "colgroup" : "col",
|
|
102
202
|
colSpan: e.colSpan > 1 ? e.colSpan : void 0,
|
|
103
203
|
rowSpan: e.rowSpan > 1 ? e.rowSpan : void 0,
|
|
104
|
-
className:
|
|
105
|
-
|
|
106
|
-
|
|
204
|
+
className: f(c.columnHeader, e.kind === "group" && c.group, e.reachesBottom && c.bottom, e.startsGroup && !(H && n === 0) && c.groupStart, C && c.stickyTop),
|
|
205
|
+
...e.reachesBottom ? Z((Ne.get(e.id) ?? -1) + 1) : null,
|
|
206
|
+
style: {
|
|
207
|
+
...Q(t),
|
|
208
|
+
...e.reachesBottom ? Z((Ne.get(e.id) ?? -1) + 1)?.style : null
|
|
209
|
+
},
|
|
210
|
+
children: e.kind === "group" || e.kind === "leaf" ? e.node?.label : pe
|
|
107
211
|
}, e.id))]
|
|
108
212
|
}, t)) }),
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}), M.columns.map((t, n) => /* @__PURE__ */ f(i.Cell, {
|
|
137
|
-
headers: `${a} ${W[n]}`,
|
|
138
|
-
className: d(s.value, t.kind !== "leaf" && s.aggregate, t.startsGroup && !(J && n === 0) && s.groupStart),
|
|
139
|
-
children: _(e.key, t.key)
|
|
140
|
-
}, n))]
|
|
141
|
-
}, e.key);
|
|
142
|
-
}) }),
|
|
143
|
-
ne && /* @__PURE__ */ f(i.Footer, { children: /* @__PURE__ */ p(i.Row, {
|
|
144
|
-
className: s.totalRow,
|
|
145
|
-
children: [/* @__PURE__ */ f("th", {
|
|
146
|
-
id: U,
|
|
213
|
+
/* @__PURE__ */ p(a.Body, {
|
|
214
|
+
ref: we,
|
|
215
|
+
onFocus: w ? (e) => {
|
|
216
|
+
let t = e.target.closest("tr")?.dataset.rowKey;
|
|
217
|
+
t !== void 0 && De(t);
|
|
218
|
+
} : void 0,
|
|
219
|
+
onBlur: w ? (e) => {
|
|
220
|
+
e.currentTarget.contains(e.relatedTarget) || De(null);
|
|
221
|
+
} : void 0,
|
|
222
|
+
children: (Me ?? [{
|
|
223
|
+
kind: "rows",
|
|
224
|
+
from: 0,
|
|
225
|
+
to: Y
|
|
226
|
+
}]).map((e, t) => e.kind === "gap" ? /* @__PURE__ */ p("tr", {
|
|
227
|
+
"aria-hidden": "true",
|
|
228
|
+
className: c.gap,
|
|
229
|
+
children: /* @__PURE__ */ p("td", {
|
|
230
|
+
colSpan: X + 1,
|
|
231
|
+
style: { height: e.count * (G || h) }
|
|
232
|
+
})
|
|
233
|
+
}, `gap-${t}`) : M.slice(e.from, e.to).map((t, n) => Fe(t, e.from + n)))
|
|
234
|
+
}),
|
|
235
|
+
E && /* @__PURE__ */ p(a.Footer, { children: /* @__PURE__ */ m(a.Row, {
|
|
236
|
+
className: c.totalRow,
|
|
237
|
+
"aria-rowindex": w ? W + Y + 1 : void 0,
|
|
238
|
+
children: [/* @__PURE__ */ p("th", {
|
|
239
|
+
id: L,
|
|
147
240
|
scope: "row",
|
|
148
|
-
headers:
|
|
149
|
-
className:
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
-
className:
|
|
152
|
-
children:
|
|
241
|
+
headers: P ? F : void 0,
|
|
242
|
+
className: f(c.rowHeader, H && c.stickyLeft),
|
|
243
|
+
children: /* @__PURE__ */ p("span", {
|
|
244
|
+
className: f(N && c.leafLabel),
|
|
245
|
+
children: pe
|
|
153
246
|
})
|
|
154
|
-
}),
|
|
155
|
-
headers: `${
|
|
156
|
-
className:
|
|
157
|
-
children:
|
|
247
|
+
}), k.columns.map((e, t) => /* @__PURE__ */ p(a.Cell, {
|
|
248
|
+
headers: `${L} ${R[t]}`,
|
|
249
|
+
className: f(c.value, e.startsGroup && !(H && t === 0) && c.groupStart),
|
|
250
|
+
children: ae(null, e.key)
|
|
158
251
|
}, t))]
|
|
159
252
|
}) })
|
|
160
253
|
]
|
|
161
254
|
})
|
|
162
255
|
});
|
|
163
256
|
});
|
|
164
|
-
|
|
257
|
+
_.displayName = "PivotTable";
|
|
165
258
|
//#endregion
|
|
166
|
-
export {
|
|
259
|
+
export { _ as PivotTable };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=e=>!!e.children?.length,t=n=>n.reduce((n,r)=>Math.max(n,1+(e(r)?t(r.children):0)),0);function n(n,r={}){let i=Math.max(1,t(n)),a=Array.from({length:i},()=>[]),o=[],s=[],c=0,l=(e,t,n,r,s,l)=>{let u=c++,d=e?.key??null;a[n].push({id:u,key:d,node:e,kind:t,colSpan:1,rowSpan:i-n,reachesBottom:!0,startsGroup:l,topLevel:s}),o.push({key:d,kind:t,headerIds:[...r,u],startsGroup:l})},u=(t,n,i,o)=>{let s=n===0;if(!e(t))return l(t,`leaf`,n,i,s,o),1;let d={id:c++,key:t.key,node:t,kind:`group`,colSpan:0,rowSpan:1,reachesBottom:!1,startsGroup:o,topLevel:s};a[n].push(d);let f=[...i,d.id],p=0;return t.children.forEach((e,t)=>{p+=u(e,n+1,f,o&&t===0)}),r.subtotals&&(l(t,`subtotal`,n+1,f,!1,!1),p+=1),d.colSpan=p,p};for(let e of n)s.push(u(e,0,[],!0));return r.total&&(l(null,`total`,0,[],!0,!0),s.push(1)),{headerRows:a,columns:o,depth:i,groupSpans:s}}function r(t,n=()=>!0){let r=[],i=(t,a,o)=>{for(let s of t){let t=r.length,c=e(s),l=c&&n(s.key);r.push({key:s.key,node:s,depth:a,hasChildren:c,expanded:l,ancestors:o}),l&&i(s.children,a+1,[...o,t])}};return i(t,0,[]),r}exports.layoutPivotColumns=n,exports.layoutPivotRows=r;
|
|
2
|
+
var e=e=>!!e.children?.length,t=n=>n.reduce((n,r)=>Math.max(n,1+(e(r)?t(r.children):0)),0);function n(n,r={}){let i=Math.max(1,t(n)),a=Array.from({length:i},()=>[]),o=[],s=[],c=0,l=(e,t,n,r,s,l)=>{let u=c++,d=e?.key??null;a[n].push({id:u,key:d,node:e,kind:t,colSpan:1,rowSpan:i-n,reachesBottom:!0,startsGroup:l,topLevel:s}),o.push({key:d,kind:t,headerIds:[...r,u],startsGroup:l})},u=(t,n,i,o)=>{let s=n===0;if(!e(t))return l(t,`leaf`,n,i,s,o),1;let d={id:c++,key:t.key,node:t,kind:`group`,colSpan:0,rowSpan:1,reachesBottom:!1,startsGroup:o,topLevel:s};a[n].push(d);let f=[...i,d.id],p=0;return t.children.forEach((e,t)=>{p+=u(e,n+1,f,o&&t===0)}),r.subtotals&&(l(t,`subtotal`,n+1,f,!1,!1),p+=1),d.colSpan=p,p};for(let e of n)s.push(u(e,0,[],!0));return r.total&&(l(null,`total`,0,[],!0,!0),s.push(1)),{headerRows:a,columns:o,depth:i,groupSpans:s}}function r(t,n=()=>!0){let r=[],i=(t,a,o)=>{for(let s of t){let t=r.length,c=e(s),l=c&&n(s.key);r.push({key:s.key,node:s,depth:a,hasChildren:c,expanded:l,ancestors:o}),l&&i(s.children,a+1,[...o,t])}};return i(t,0,[]),r}function i(e){let{rowCount:t,rowHeight:n,scrollTop:r,viewportHeight:i,bodyOffset:a,overscan:o,keep:s}=e;if(t<=0)return[];if(n<=0)return[{kind:`rows`,from:0,to:t}];let c=(e,t,n)=>Math.min(Math.max(e,t),n),l=r-a,u=c(Math.floor(l/n)-o,0,t-1),d=c(Math.ceil((l+i)/n)+o,u+1,t),f=[],p=e=>{e>0&&f.push({kind:`gap`,count:e})},m=s!=null&&s>=0&&s<t?s:null;return m!==null&&m<u?(p(m),f.push({kind:`rows`,from:m,to:m+1}),p(u-m-1)):p(u),f.push({kind:`rows`,from:u,to:d}),m!==null&&m>=d?(p(m-d),f.push({kind:`rows`,from:m,to:m+1}),p(t-m-1)):p(t-d),f}exports.layoutPivotColumns=n,exports.layoutPivotRows=r,exports.pivotRowWindow=i;
|
|
@@ -65,3 +65,32 @@ export declare function layoutPivotColumns<T extends PivotAxisInput>(nodes: T[],
|
|
|
65
65
|
* 折りたたまれたグループは自分の行だけを出し、配下の行は出さない。
|
|
66
66
|
*/
|
|
67
67
|
export declare function layoutPivotRows<T extends PivotAxisInput>(nodes: T[], isExpanded?: (key: string) => boolean): PivotRow<T>[];
|
|
68
|
+
/** 仮想化したときに描く行の並び。`gap` は、描かない行を 1 つの空の行でまとめた分。 */
|
|
69
|
+
export type PivotRowSegment = {
|
|
70
|
+
kind: "rows";
|
|
71
|
+
from: number;
|
|
72
|
+
to: number;
|
|
73
|
+
} | {
|
|
74
|
+
kind: "gap";
|
|
75
|
+
count: number;
|
|
76
|
+
};
|
|
77
|
+
export type PivotRowWindowInput = {
|
|
78
|
+
rowCount: number;
|
|
79
|
+
/** 1 行の高さ(全行が同じ高さの前提)。0 以下なら全部描く。 */
|
|
80
|
+
rowHeight: number;
|
|
81
|
+
/** スクロールの器の `scrollTop`。 */
|
|
82
|
+
scrollTop: number;
|
|
83
|
+
/** スクロールの器の見えている高さ。 */
|
|
84
|
+
viewportHeight: number;
|
|
85
|
+
/** 器の中身の先頭から、最初の行までの距離(caption と見出しの高さ)。 */
|
|
86
|
+
bodyOffset: number;
|
|
87
|
+
/** 見えている範囲の上下に、余分に描いておく行の数。 */
|
|
88
|
+
overscan: number;
|
|
89
|
+
/** 範囲の外でも描いたままにする行(フォーカスを持つ行)。 */
|
|
90
|
+
keep?: number | null;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* 見えている行(と上下の余分)だけを描くための並びを返す。描かない行は `gap` にまとめ、
|
|
94
|
+
* 行の総数ぶんの高さが保たれるようにする。`keep` の行は、範囲の外にあっても 1 行だけ描く。
|
|
95
|
+
*/
|
|
96
|
+
export declare function pivotRowWindow(input: PivotRowWindowInput): PivotRowSegment[];
|
|
@@ -64,5 +64,33 @@ function r(t, n = () => !0) {
|
|
|
64
64
|
};
|
|
65
65
|
return i(t, 0, []), r;
|
|
66
66
|
}
|
|
67
|
+
function i(e) {
|
|
68
|
+
let { rowCount: t, rowHeight: n, scrollTop: r, viewportHeight: i, bodyOffset: a, overscan: o, keep: s } = e;
|
|
69
|
+
if (t <= 0) return [];
|
|
70
|
+
if (n <= 0) return [{
|
|
71
|
+
kind: "rows",
|
|
72
|
+
from: 0,
|
|
73
|
+
to: t
|
|
74
|
+
}];
|
|
75
|
+
let c = (e, t, n) => Math.min(Math.max(e, t), n), l = r - a, u = c(Math.floor(l / n) - o, 0, t - 1), d = c(Math.ceil((l + i) / n) + o, u + 1, t), f = [], p = (e) => {
|
|
76
|
+
e > 0 && f.push({
|
|
77
|
+
kind: "gap",
|
|
78
|
+
count: e
|
|
79
|
+
});
|
|
80
|
+
}, m = s != null && s >= 0 && s < t ? s : null;
|
|
81
|
+
return m !== null && m < u ? (p(m), f.push({
|
|
82
|
+
kind: "rows",
|
|
83
|
+
from: m,
|
|
84
|
+
to: m + 1
|
|
85
|
+
}), p(u - m - 1)) : p(u), f.push({
|
|
86
|
+
kind: "rows",
|
|
87
|
+
from: u,
|
|
88
|
+
to: d
|
|
89
|
+
}), m !== null && m >= d ? (p(m - d), f.push({
|
|
90
|
+
kind: "rows",
|
|
91
|
+
from: m,
|
|
92
|
+
to: m + 1
|
|
93
|
+
}), p(t - m - 1)) : p(t - d), f;
|
|
94
|
+
}
|
|
67
95
|
//#endregion
|
|
68
|
-
export { n as layoutPivotColumns, r as layoutPivotRows };
|
|
96
|
+
export { n as layoutPivotColumns, r as layoutPivotRows, i as pivotRowWindow };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_scroller_1kzph_7`,t=`_root_1kzph_22`,n=`_caption_1kzph_34`,r=`_columnHeader_1kzph_41`,i=`_group_1kzph_55`,a=`_bottom_1kzph_62`,o=`_corner_1kzph_65`,s=`_rowHeader_1kzph_68`,c=`_toggle_1kzph_83`,l=`_chevron_1kzph_102`,u=`_open_1kzph_118`,d=`_leafLabel_1kzph_122`,f=`_value_1kzph_129`,p=`_groupRow_1kzph_135`,m=`_aggregate_1kzph_140`,h=`_groupStart_1kzph_144`,g=`_totalRow_1kzph_147`,_=`_gap_1kzph_152`,v=`_stickyTop_1kzph_161`,y=`_stickyLeft_1kzph_166`,b={scroller:e,root:t,caption:n,columnHeader:r,group:i,bottom:a,corner:o,rowHeader:s,toggle:c,chevron:l,open:u,leafLabel:d,value:f,groupRow:p,aggregate:m,groupStart:h,totalRow:g,gap:_,stickyTop:v,stickyLeft:y};exports.aggregate=m,exports.bottom=a,exports.caption=n,exports.chevron=l,exports.columnHeader=r,exports.corner=o,exports.default=b,exports.gap=_,exports.group=i,exports.groupRow=p,exports.groupStart=h,exports.leafLabel=d,exports.open=u,exports.root=t,exports.rowHeader=s,exports.scroller=e,exports.stickyLeft=y,exports.stickyTop=v,exports.toggle=c,exports.totalRow=g,exports.value=f;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/PivotTable/pivot-table.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_scroller_1kzph_7", t = "_root_1kzph_22", n = "_caption_1kzph_34", r = "_columnHeader_1kzph_41", i = "_group_1kzph_55", a = "_bottom_1kzph_62", o = "_corner_1kzph_65", s = "_rowHeader_1kzph_68", c = "_toggle_1kzph_83", l = "_chevron_1kzph_102", u = "_open_1kzph_118", d = "_leafLabel_1kzph_122", f = "_value_1kzph_129", p = "_groupRow_1kzph_135", m = "_aggregate_1kzph_140", h = "_groupStart_1kzph_144", g = "_totalRow_1kzph_147", _ = "_gap_1kzph_152", v = "_stickyTop_1kzph_161", y = "_stickyLeft_1kzph_166", b = {
|
|
4
4
|
scroller: e,
|
|
5
5
|
root: t,
|
|
6
6
|
caption: n,
|
|
@@ -18,8 +18,9 @@ var e = "_scroller_1xfhj_7", t = "_root_1xfhj_22", n = "_caption_1xfhj_34", r =
|
|
|
18
18
|
aggregate: m,
|
|
19
19
|
groupStart: h,
|
|
20
20
|
totalRow: g,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
gap: _,
|
|
22
|
+
stickyTop: v,
|
|
23
|
+
stickyLeft: y
|
|
23
24
|
};
|
|
24
25
|
//#endregion
|
|
25
|
-
export { m as aggregate, a as bottom, n as caption, l as chevron, r as columnHeader, o as corner,
|
|
26
|
+
export { m as aggregate, a as bottom, n as caption, l as chevron, r as columnHeader, o as corner, b as default, _ as gap, i as group, p as groupRow, h as groupStart, d as leafLabel, u as open, t as root, s as rowHeader, e as scroller, y as stickyLeft, v as stickyTop, c as toggle, g as totalRow, f as value };
|
package/dist/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.46.0 — a React 19 component library: 228 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
|
@@ -2510,6 +2510,9 @@ level stays, stacked in order. Only has an effect together with `maxHeight`.
|
|
|
2510
2510
|
- `stickyRowHeaders: boolean` = false — Keeps the row headings in view while the table scrolls sideways. The column is only
|
|
2511
2511
|
pinned while it takes at most half of the visible width; in a narrower container it
|
|
2512
2512
|
scrolls with the rest, so that the values stay readable.
|
|
2513
|
+
- `virtualized: boolean` = false — Renders only the rows in view (plus a few around them) and keeps the scroll height
|
|
2514
|
+
with empty spacer rows. Use it for tables with hundreds of rows, together with
|
|
2515
|
+
`maxHeight`. Rows must all have the same height, so keep labels and values on one line.
|
|
2513
2516
|
- `columnSubtotals: boolean` = false — Adds a subtotal column after the columns of each column group.
|
|
2514
2517
|
- `totalRow: boolean` = false — Adds a grand total row at the bottom.
|
|
2515
2518
|
- `totalColumn: boolean` = false — Adds a grand total column at the right edge.
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.46.0 — a React 19 component library: 228 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|