schummar-table 0.43.0 → 0.43.1
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/index.cjs +59 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +40 -39
- package/dist/index.js.map +1 -1
- package/dist/mui4Theme.d.cts +1 -1
- package/dist/mui4Theme.d.ts +1 -1
- package/dist/mui5Theme.d.cts +1 -1
- package/dist/mui5Theme.d.ts +1 -1
- package/dist/{types-C_rX6bDQ.d.ts → types-C_rP1nwr.d.ts} +9 -4
- package/dist/{types-B8KLTUz2.d.cts → types-CkiMjwT9.d.cts} +9 -4
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ComponentType, ReactNode, HTMLProps } from 'react';
|
|
4
|
-
import { T as TableTheme, C as CommonFilterProps, a as TableProps, F as FilterImplementation, M as MemoizedTableTheme, I as Id, b as TableItem, c as InternalTableState, P as PartialTableTheme } from './types-
|
|
5
|
-
export { e as Column, f as FunctionWithDeps, g as InternalColumn, S as Sort, h as SortDirection, d as TableStateStorage } from './types-
|
|
4
|
+
import { T as TableTheme, C as CommonFilterProps, a as TableProps, F as FilterImplementation, M as MemoizedTableTheme, I as Id, b as TableItem, c as InternalTableState, P as PartialTableTheme } from './types-CkiMjwT9.cjs';
|
|
5
|
+
export { e as Column, f as FunctionWithDeps, g as InternalColumn, S as Sort, h as SortDirection, d as TableStateStorage } from './types-CkiMjwT9.cjs';
|
|
6
6
|
import { Store } from 'schummar-state/react';
|
|
7
7
|
import { E as ExporterEntry } from './exporter-u6SatTo6.cjs';
|
|
8
8
|
import '@emotion/react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ComponentType, ReactNode, HTMLProps } from 'react';
|
|
4
|
-
import { T as TableTheme, C as CommonFilterProps, a as TableProps, F as FilterImplementation, M as MemoizedTableTheme, I as Id, b as TableItem, c as InternalTableState, P as PartialTableTheme } from './types-
|
|
5
|
-
export { e as Column, f as FunctionWithDeps, g as InternalColumn, S as Sort, h as SortDirection, d as TableStateStorage } from './types-
|
|
4
|
+
import { T as TableTheme, C as CommonFilterProps, a as TableProps, F as FilterImplementation, M as MemoizedTableTheme, I as Id, b as TableItem, c as InternalTableState, P as PartialTableTheme } from './types-C_rP1nwr.js';
|
|
5
|
+
export { e as Column, f as FunctionWithDeps, g as InternalColumn, S as Sort, h as SortDirection, d as TableStateStorage } from './types-C_rP1nwr.js';
|
|
6
6
|
import { Store } from 'schummar-state/react';
|
|
7
7
|
import { E as ExporterEntry } from './exporter-u6SatTo6.js';
|
|
8
8
|
import '@emotion/react';
|
package/dist/index.js
CHANGED
|
@@ -3469,6 +3469,7 @@ function Export2() {
|
|
|
3469
3469
|
}
|
|
3470
3470
|
|
|
3471
3471
|
// src/components/row.tsx
|
|
3472
|
+
import { ClassNames as ClassNames2 } from "@emotion/react";
|
|
3472
3473
|
import { memo as memo2, useLayoutEffect as useLayoutEffect4, useRef as useRef5 } from "react";
|
|
3473
3474
|
|
|
3474
3475
|
// src/misc/calcClassNames.ts
|
|
@@ -3669,9 +3670,6 @@ function SelectComponent({ itemId }) {
|
|
|
3669
3670
|
|
|
3670
3671
|
// src/components/row.tsx
|
|
3671
3672
|
import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
|
|
3672
|
-
var defaultWrapRow = (content) => {
|
|
3673
|
-
return content;
|
|
3674
|
-
};
|
|
3675
3673
|
var Row = memo2(function Row2({
|
|
3676
3674
|
itemId,
|
|
3677
3675
|
rowIndex
|
|
@@ -3683,7 +3681,7 @@ var Row = memo2(function Row2({
|
|
|
3683
3681
|
const classes = useTheme((t) => t.classes);
|
|
3684
3682
|
const styles = useTheme((t) => t.styles);
|
|
3685
3683
|
const item = table.useState((state) => state.activeItemsById.get(itemId));
|
|
3686
|
-
const wrapRow = (_a = table.useState((state) => state.props.wrapRow)) != null ? _a :
|
|
3684
|
+
const wrapRow = (_a = table.useState((state) => state.props.wrapRow)) != null ? _a : (props) => /* @__PURE__ */ jsx31("div", __spreadValues({}, props));
|
|
3687
3685
|
const rowClassName = (classes == null ? void 0 : classes.row) instanceof Function ? classes.row(item == null ? void 0 : item.value, rowIndex) : classes == null ? void 0 : classes.row;
|
|
3688
3686
|
const rowStyles = (styles == null ? void 0 : styles.row) instanceof Function ? styles.row(item == null ? void 0 : item.value, rowIndex) : styles == null ? void 0 : styles.row;
|
|
3689
3687
|
const subgrid = table.useState((state) => state.props.subgrid);
|
|
@@ -3740,46 +3738,49 @@ var Row = memo2(function Row2({
|
|
|
3740
3738
|
if (!item) {
|
|
3741
3739
|
return null;
|
|
3742
3740
|
}
|
|
3743
|
-
return /* @__PURE__ */ jsx31(
|
|
3744
|
-
"div",
|
|
3741
|
+
return /* @__PURE__ */ jsx31(ClassNames2, { children: ({ css: css3 }) => /* @__PURE__ */ jsx31(Fragment7, { children: wrapRow(
|
|
3745
3742
|
{
|
|
3746
|
-
|
|
3747
|
-
{
|
|
3748
|
-
|
|
3749
|
-
},
|
|
3750
|
-
subgrid && {
|
|
3751
|
-
gridColumn: "1 / -1",
|
|
3743
|
+
className: css3([
|
|
3744
|
+
subgrid ? {
|
|
3745
|
+
gridColumn: `1 / -1`,
|
|
3752
3746
|
display: "grid",
|
|
3753
3747
|
gridTemplateColumns: "subgrid"
|
|
3748
|
+
} : {
|
|
3749
|
+
display: "contents"
|
|
3754
3750
|
},
|
|
3751
|
+
rowClassName,
|
|
3755
3752
|
rowStyles
|
|
3756
|
-
],
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
rowIndex
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3753
|
+
]),
|
|
3754
|
+
children: /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
3755
|
+
/* @__PURE__ */ jsx31(
|
|
3756
|
+
"div",
|
|
3757
|
+
{
|
|
3758
|
+
className: cellClassName,
|
|
3759
|
+
css: [defaultClasses.cellFill, css_],
|
|
3760
|
+
ref: divRef
|
|
3761
|
+
}
|
|
3762
|
+
),
|
|
3763
|
+
/* @__PURE__ */ jsxs17(
|
|
3764
|
+
"div",
|
|
3765
|
+
{
|
|
3766
|
+
className: cellClassName,
|
|
3767
|
+
css: [defaultClasses.cell, defaultClasses.firstCell, css_],
|
|
3768
|
+
children: [
|
|
3769
|
+
indent > 0 && /* @__PURE__ */ jsx31("div", { css: { width: indent * 20 } }),
|
|
3770
|
+
enableSelection && /* @__PURE__ */ jsx31(SelectComponent, { itemId }),
|
|
3771
|
+
(hasChildren || hasDeferredChildren || hasDetails) && /* @__PURE__ */ jsx31(ExpandControl, { itemId, hasDeferredChildren }),
|
|
3772
|
+
rowAction
|
|
3773
|
+
]
|
|
3774
|
+
}
|
|
3775
|
+
),
|
|
3776
|
+
columnIds.map((columnId) => /* @__PURE__ */ jsx31(ColumnContext.Provider, { value: columnId, children: /* @__PURE__ */ jsx31(Cell, { itemId, rowIndex }) }, columnId)),
|
|
3777
|
+
/* @__PURE__ */ jsx31("div", { className: cellClassName, css: [defaultClasses.cellFill, css_] }),
|
|
3778
|
+
/* @__PURE__ */ jsx31(Details, { ref: detailsDivRef, itemId, rowIndex })
|
|
3779
|
+
] })
|
|
3780
|
+
},
|
|
3781
|
+
item.value,
|
|
3782
|
+
rowIndex
|
|
3783
|
+
) }) });
|
|
3783
3784
|
});
|
|
3784
3785
|
|
|
3785
3786
|
// src/components/virtualized.tsx
|