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.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-B8KLTUz2.cjs';
5
- export { e as Column, f as FunctionWithDeps, g as InternalColumn, S as Sort, h as SortDirection, d as TableStateStorage } from './types-B8KLTUz2.cjs';
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-C_rX6bDQ.js';
5
- export { e as Column, f as FunctionWithDeps, g as InternalColumn, S as Sort, h as SortDirection, d as TableStateStorage } from './types-C_rX6bDQ.js';
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 : defaultWrapRow;
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
- css: [
3747
- {
3748
- display: "contents"
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
- className: rowClassName,
3758
- children: wrapRow(
3759
- /* @__PURE__ */ jsxs17(Fragment7, { children: [
3760
- /* @__PURE__ */ jsx31("div", { className: cellClassName, css: [defaultClasses.cellFill, css_], ref: divRef }),
3761
- /* @__PURE__ */ jsxs17(
3762
- "div",
3763
- {
3764
- className: cellClassName,
3765
- css: [defaultClasses.cell, defaultClasses.firstCell, css_],
3766
- children: [
3767
- indent > 0 && /* @__PURE__ */ jsx31("div", { css: { width: indent * 20 } }),
3768
- enableSelection && /* @__PURE__ */ jsx31(SelectComponent, { itemId }),
3769
- (hasChildren || hasDeferredChildren || hasDetails) && /* @__PURE__ */ jsx31(ExpandControl, { itemId, hasDeferredChildren }),
3770
- rowAction
3771
- ]
3772
- }
3773
- ),
3774
- columnIds.map((columnId) => /* @__PURE__ */ jsx31(ColumnContext.Provider, { value: columnId, children: /* @__PURE__ */ jsx31(Cell, { itemId, rowIndex }) }, columnId)),
3775
- /* @__PURE__ */ jsx31("div", { className: cellClassName, css: [defaultClasses.cellFill, css_] }),
3776
- /* @__PURE__ */ jsx31(Details, { ref: detailsDivRef, itemId, rowIndex })
3777
- ] }),
3778
- item.value,
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