schummar-table 0.51.2 → 0.51.3

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.ts CHANGED
@@ -2,12 +2,12 @@ import { r as ExporterEntry } from "./exporter-zK7PhTrL.js";
2
2
  import { _ as TableTheme, a as FilterImplementation, c as InternalColumn, d as PartialTableTheme, f as Sort, g as TableRef, h as TableProps, i as CommonFilterProps, l as InternalTableState, m as TableItem, n as ColumnFactory, o as FunctionWithDeps, p as SortDirection, r as ColumnGenerator, s as Id, t as Column, u as MemoizedTableTheme, v as TableStateStorage } from "./types-BfdXNfLi.js";
3
3
  import * as react0 from "react";
4
4
  import { ComponentType, ForwardedRef, HTMLProps, ReactNode } from "react";
5
- import * as _emotion_react_jsx_runtime2 from "@emotion/react/jsx-runtime";
5
+ import * as _emotion_react_jsx_runtime9 from "@emotion/react/jsx-runtime";
6
6
  import { Store } from "schummar-state/react";
7
7
 
8
8
  //#region src/components/autoFocusTextField.d.ts
9
9
  type Props = TableTheme['components']['TextField'] extends ComponentType<infer T> ? T : never;
10
- declare function AutoFocusTextField(props: Omit<Props, 'inputRef'>): _emotion_react_jsx_runtime2.JSX.Element;
10
+ declare function AutoFocusTextField(props: Omit<Props, 'inputRef'>): _emotion_react_jsx_runtime9.JSX.Element;
11
11
  //#endregion
12
12
  //#region src/components/combinedFilter.d.ts
13
13
  interface CombinedFilterProps extends Pick<CommonFilterProps<any, any, any, any>, 'classNames'> {
@@ -16,7 +16,7 @@ interface CombinedFilterProps extends Pick<CommonFilterProps<any, any, any, any>
16
16
  declare function CombinedFilter({
17
17
  columnIds: inputColumnIds,
18
18
  ...props
19
- }: CombinedFilterProps): _emotion_react_jsx_runtime2.JSX.Element;
19
+ }: CombinedFilterProps): _emotion_react_jsx_runtime9.JSX.Element;
20
20
  //#endregion
21
21
  //#region src/components/datePicker.d.ts
22
22
  type DateRange = {
@@ -68,7 +68,7 @@ declare function DatePickerProvider({
68
68
  ...props
69
69
  }: Partial<Omit<DatePickerProps, 'value' | 'onChange'>> & {
70
70
  children?: ReactNode;
71
- }): _emotion_react_jsx_runtime2.JSX.Element;
71
+ }): _emotion_react_jsx_runtime9.JSX.Element;
72
72
  /** Rounds a date down to the start of the day. */
73
73
  declare const startOfDay: (d: Date) => Date;
74
74
  /** Rounds a date up to the end of the day. */
@@ -81,34 +81,34 @@ declare const thisYear: (delta?: number) => DateRange;
81
81
  declare const getCalendarWeek: (date: Date) => number;
82
82
  declare const commonQuickOptions: {
83
83
  today: {
84
- label: _emotion_react_jsx_runtime2.JSX.Element;
84
+ label: _emotion_react_jsx_runtime9.JSX.Element;
85
85
  value: () => DateRange;
86
86
  };
87
87
  thisWeek: {
88
- label: _emotion_react_jsx_runtime2.JSX.Element;
88
+ label: _emotion_react_jsx_runtime9.JSX.Element;
89
89
  value: (props: DatePickerProps) => DateRange;
90
90
  };
91
91
  thisMonth: {
92
- label: _emotion_react_jsx_runtime2.JSX.Element;
92
+ label: _emotion_react_jsx_runtime9.JSX.Element;
93
93
  value: () => DateRange;
94
94
  };
95
95
  thisYear: {
96
- label: _emotion_react_jsx_runtime2.JSX.Element;
96
+ label: _emotion_react_jsx_runtime9.JSX.Element;
97
97
  value: () => DateRange;
98
98
  };
99
99
  lastSevenDays: {
100
- label: _emotion_react_jsx_runtime2.JSX.Element;
100
+ label: _emotion_react_jsx_runtime9.JSX.Element;
101
101
  value: () => DateRange;
102
102
  };
103
103
  lastThirtyDays: {
104
- label: _emotion_react_jsx_runtime2.JSX.Element;
104
+ label: _emotion_react_jsx_runtime9.JSX.Element;
105
105
  value: () => DateRange;
106
106
  };
107
107
  };
108
108
  /** Returns whether two dates and/or date ranges intersect. Intersection is considered per day. */
109
109
  declare function dateIntersect(a: Date | DateRange | null | undefined, b: Date | DateRange | null | undefined): boolean;
110
110
  declare function dateClamp(date: Date, min?: Date, max?: Date): Date;
111
- declare function DatePicker(props: DatePickerProps): _emotion_react_jsx_runtime2.JSX.Element;
111
+ declare function DatePicker(props: DatePickerProps): _emotion_react_jsx_runtime9.JSX.Element;
112
112
  //#endregion
113
113
  //#region src/components/dateFilter.d.ts
114
114
  declare function DateFilter<TItem, TColumnValue>({
@@ -259,7 +259,7 @@ declare function TableSettingsProvider({
259
259
  }: Partial<TableSettingsContextType> & {
260
260
  additionalExporters?: ExporterEntry[];
261
261
  children?: ReactNode;
262
- }): _emotion_react_jsx_runtime2.JSX.Element;
262
+ }): _emotion_react_jsx_runtime9.JSX.Element;
263
263
  //#endregion
264
264
  //#region src/misc/textMatch.d.ts
265
265
  declare const textMatch: (text: string, query: string) => boolean;
package/dist/index.js CHANGED
@@ -2894,6 +2894,7 @@ function filterColumns(state) {
2894
2894
  ], ([columns, hiddenColumns, columnOrder, displaySize], draft) => {
2895
2895
  draft.activeColumns = orderBy(columns.filter((column) => !(column.hidden ?? hiddenColumns.has(column.id))), [(column) => columnOrder.indexOf(column.id)]);
2896
2896
  draft.visibleColumns = draft.activeColumns.filter((column) => displaySize === void 0 || column.displaySize === void 0 || column.displaySize.includes(displaySize));
2897
+ draft.rowHeights.clear();
2897
2898
  }, { runNow: true }), [state]);
2898
2899
  }
2899
2900
 
@@ -3561,7 +3562,9 @@ const Cell = memo(function Cell$1({ itemId, rowIndex }) {
3561
3562
  const wrapCell = table.useState((state) => state.props.wrapCell) ?? defaultWrapCell;
3562
3563
  const item = table.useState((state) => state.activeItemsById.get(itemId));
3563
3564
  const columnStyleOverride = table.useState((state) => state.columnStyleOverride.get(columnId), { throttle: 16 });
3564
- useLayoutEffect(() => table.getState().props.debugRender?.("render cell", itemId, columnId));
3565
+ useLayoutEffect(() => {
3566
+ table.getState().props.debugRender?.("render cell", itemId, columnId);
3567
+ });
3565
3568
  const className$2 = useTheme((t) => cx(...calcClassNames(t.classes, item?.value, rowIndex)));
3566
3569
  const styles = useTheme((t) => calcCss(t.styles, item?.value, rowIndex));
3567
3570
  if (!column || !item) return null;
@@ -3736,7 +3739,9 @@ const Row = memo(function Row$1({ itemId, rowIndex }) {
3736
3739
  divRef.current,
3737
3740
  detailsDivRef.current
3738
3741
  ]);
3739
- useLayoutEffect(() => table.getState().props.debugRender?.("render row", itemId));
3742
+ useLayoutEffect(() => {
3743
+ table.getState().props.debugRender?.("render row", itemId);
3744
+ });
3740
3745
  if (!item) return null;
3741
3746
  return /* @__PURE__ */ jsx(ClassNames, { children: ({ css: css$1, cx: cx$1 }) => /* @__PURE__ */ jsx(Fragment$1, { children: wrapRow({
3742
3747
  className: cx$1(css$1([subgrid ? {
@@ -3855,7 +3860,9 @@ function Virtualized({ header, footer, children,...props }) {
3855
3860
  };
3856
3861
  }, [update, virtual]);
3857
3862
  useEffect(() => update.cancel, [update]);
3858
- useLayoutEffect(() => table.getState().props.debugRender?.(`Virtualalized render ${from} to ${to}`));
3863
+ useLayoutEffect(() => {
3864
+ table.getState().props.debugRender?.(`Virtualized render ${from} to ${to}`);
3865
+ });
3859
3866
  return /* @__PURE__ */ jsxs("div", {
3860
3867
  ...props,
3861
3868
  children: [
@@ -3888,7 +3895,9 @@ function _Table(props, ref) {
3888
3895
  await clearStorage();
3889
3896
  resetState();
3890
3897
  }
3891
- useLayoutEffect(() => table.getState().props.debugRender?.("render table"));
3898
+ useLayoutEffect(() => {
3899
+ table.getState().props.debugRender?.("render table");
3900
+ });
3892
3901
  return /* @__PURE__ */ jsx(TableContext.Provider, {
3893
3902
  value: table,
3894
3903
  children: /* @__PURE__ */ jsx(TableResetContext.Provider, {
@@ -3934,7 +3943,9 @@ const TableInner = memo(function TableInner$1({ hidden }) {
3934
3943
  const enableExport = table.useState((state) => state.props.enableExport);
3935
3944
  const cssVariables = useCssVariables();
3936
3945
  const enableClearFiltersButton = table.useState((state) => state.props.enableClearFiltersButton);
3937
- useLayoutEffect(() => table.getState().props.debugRender?.("render table inner"));
3946
+ useLayoutEffect(() => {
3947
+ table.getState().props.debugRender?.("render table inner");
3948
+ });
3938
3949
  return /* @__PURE__ */ jsx(Virtualized, {
3939
3950
  className: classes?.table,
3940
3951
  css: [