@ctlyst.id/internal-ui 4.3.1 → 5.0.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/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +709 -620
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +143 -54
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -7,7 +7,7 @@ import { SystemStyleObject, HTMLChakraProps, ThemingProps, ColorMode } from '@ch
|
|
7
7
|
import * as React$1 from 'react';
|
8
8
|
import React__default, { PropsWithChildren, ReactNode, FC } from 'react';
|
9
9
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
10
|
-
import { ColumnDef, SortingState, ColumnPinningState, RowSelectionInstance } from '@tanstack/react-table';
|
10
|
+
import { ColumnDef, RowSelectionState, OnChangeFn, SortingState, ColumnPinningState, RowSelectionInstance } from '@tanstack/react-table';
|
11
11
|
import { DatePickerProps } from 'react-datepicker';
|
12
12
|
import { IconType } from 'react-icons/lib';
|
13
13
|
import * as react_select from 'react-select';
|
@@ -246,6 +246,8 @@ interface DataTableProps<T> {
|
|
246
246
|
dataSource: T[] | undefined;
|
247
247
|
isLoading?: boolean;
|
248
248
|
withSelectedRow?: boolean | undefined;
|
249
|
+
selectedRow?: RowSelectionState;
|
250
|
+
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
249
251
|
onSelectedRow?: (data: T[]) => void;
|
250
252
|
onSort?: (data: SortingState) => void;
|
251
253
|
manualSorting?: boolean;
|
@@ -261,7 +263,7 @@ interface DataTableProps<T> {
|
|
261
263
|
}
|
262
264
|
declare const isCellDisabled: (row: DisabledRowData, cellId: string) => boolean;
|
263
265
|
type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;
|
264
|
-
declare const useDataTable: <T>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, columnPinning, }: DataTableProps<T>) => {
|
266
|
+
declare const useDataTable: <T>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, selectedRow, disabledRow, onRowSelectionChange, columnPinning, }: DataTableProps<T>) => {
|
265
267
|
table: _tanstack_react_table.Table<T>;
|
266
268
|
toggleAllRowsSelected: (value?: boolean | undefined) => void;
|
267
269
|
generateColumn: () => ColumnDef<T>[];
|
package/dist/index.d.ts
CHANGED
@@ -7,7 +7,7 @@ import { SystemStyleObject, HTMLChakraProps, ThemingProps, ColorMode } from '@ch
|
|
7
7
|
import * as React$1 from 'react';
|
8
8
|
import React__default, { PropsWithChildren, ReactNode, FC } from 'react';
|
9
9
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
10
|
-
import { ColumnDef, SortingState, ColumnPinningState, RowSelectionInstance } from '@tanstack/react-table';
|
10
|
+
import { ColumnDef, RowSelectionState, OnChangeFn, SortingState, ColumnPinningState, RowSelectionInstance } from '@tanstack/react-table';
|
11
11
|
import { DatePickerProps } from 'react-datepicker';
|
12
12
|
import { IconType } from 'react-icons/lib';
|
13
13
|
import * as react_select from 'react-select';
|
@@ -246,6 +246,8 @@ interface DataTableProps<T> {
|
|
246
246
|
dataSource: T[] | undefined;
|
247
247
|
isLoading?: boolean;
|
248
248
|
withSelectedRow?: boolean | undefined;
|
249
|
+
selectedRow?: RowSelectionState;
|
250
|
+
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
249
251
|
onSelectedRow?: (data: T[]) => void;
|
250
252
|
onSort?: (data: SortingState) => void;
|
251
253
|
manualSorting?: boolean;
|
@@ -261,7 +263,7 @@ interface DataTableProps<T> {
|
|
261
263
|
}
|
262
264
|
declare const isCellDisabled: (row: DisabledRowData, cellId: string) => boolean;
|
263
265
|
type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;
|
264
|
-
declare const useDataTable: <T>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, columnPinning, }: DataTableProps<T>) => {
|
266
|
+
declare const useDataTable: <T>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, selectedRow, disabledRow, onRowSelectionChange, columnPinning, }: DataTableProps<T>) => {
|
265
267
|
table: _tanstack_react_table.Table<T>;
|
266
268
|
toggleAllRowsSelected: (value?: boolean | undefined) => void;
|
267
269
|
generateColumn: () => ColumnDef<T>[];
|