@konoma-development/react-components 0.0.8 → 0.0.9
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/@konoma-development/react-components.js +5185 -5374
- package/dist/@konoma-development/react-components.js.map +1 -1
- package/dist/components/table/table.d.ts +1 -2
- package/dist/components/table/tableActions.d.ts +3 -1
- package/dist/main.d.ts +1 -2
- package/package.json +1 -1
- package/dist/components/table/column.d.ts +0 -54
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import { ColumnClasses } from './column';
|
|
3
2
|
import { PaginationClasses } from './pagination';
|
|
4
3
|
export interface TableColumn<DataType> {
|
|
5
4
|
id: keyof DataType;
|
|
@@ -17,6 +16,7 @@ export interface TableColumn<DataType> {
|
|
|
17
16
|
}
|
|
18
17
|
export default function Table<DataType extends {
|
|
19
18
|
dragRef?: React.RefObject<HTMLDivElement>;
|
|
19
|
+
index?: number;
|
|
20
20
|
}>({ noDataClasses, wrapperClasses, tableClasses, rowClasses, rowLeftWrapperClasses, rowCenterWrapperClasses, rowRightWrapperClasses, paginationClasses, columnsCenter, columnsRight, columnsLeft, cellRenderer, filters, data, pagination, totalRows, noEntryLabel, allowReorder, showFilters, onDragRow, onDropRow, onRowClick, onRowDoubleClick, onScroll, onUpdateFilters, onSort, }: {
|
|
21
21
|
wrapperClasses?: string;
|
|
22
22
|
tableClasses?: string;
|
|
@@ -30,7 +30,6 @@ export default function Table<DataType extends {
|
|
|
30
30
|
columnsRightClasses?: string;
|
|
31
31
|
noDataClasses?: string;
|
|
32
32
|
paginationClasses?: PaginationClasses;
|
|
33
|
-
columnClasses?: ColumnClasses;
|
|
34
33
|
columnsCenter: TableColumn<DataType>[];
|
|
35
34
|
columnsRight?: TableColumn<DataType>[];
|
|
36
35
|
columnsLeft?: TableColumn<DataType>[];
|
|
@@ -3,8 +3,10 @@ export default function TableActions({ children, classes }: {
|
|
|
3
3
|
classes?: string;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
type TableActionVariant = 'error' | 'success' | 'warning' | 'default';
|
|
6
|
-
export declare function TableActionEntry({ text, variant, onClick, }: {
|
|
6
|
+
export declare function TableActionEntry({ text, errorClasses, defaultClasses, variant, onClick, }: {
|
|
7
7
|
text: string;
|
|
8
|
+
errorClasses?: string;
|
|
9
|
+
defaultClasses?: string;
|
|
8
10
|
variant?: TableActionVariant;
|
|
9
11
|
onClick: () => void;
|
|
10
12
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/main.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { default as Select } from './components/form/select';
|
|
|
9
9
|
import { default as TagList } from './components/form/tagList';
|
|
10
10
|
import { default as TextArea } from './components/form/textarea';
|
|
11
11
|
import { Classes, FormFieldProps, FormValue, Mask, Option } from './components/form/types';
|
|
12
|
-
import { default as Column } from './components/table/column';
|
|
13
12
|
import { default as ColumnChooser } from './components/table/columnChooser';
|
|
14
13
|
import { default as ColumnChooserEntry } from './components/table/columnChooserEntry';
|
|
15
14
|
import { FilterContext } from './components/table/FilterContext';
|
|
@@ -23,4 +22,4 @@ import { default as Modal } from './components/ui/modal';
|
|
|
23
22
|
import { default as Tabs } from './components/ui/tabs';
|
|
24
23
|
import { default as Tag } from './components/ui/tag';
|
|
25
24
|
import * as validators from './components/form/validators';
|
|
26
|
-
export { Button, Checkbox, CheckboxList, Classes,
|
|
25
|
+
export { Button, Checkbox, CheckboxList, Classes, ColumnChooser, ColumnChooserEntry, FilterContext, Form, FormField, FormFieldProps, FormValue, Icon, Input, LoadingIndicator, Mask, Modal, Option, Pagination, PhoneInput, RadioButtonGroup, Select, Table, TableActionEntry, TableActions, TableColumn, Tabs, Tag, TagList, TextArea, validators, };
|
package/package.json
CHANGED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
import { TableColumn } from './table';
|
|
3
|
-
export interface ColumnClasses {
|
|
4
|
-
resizableClasses?: string;
|
|
5
|
-
resizableComponentWrapperClasses?: string;
|
|
6
|
-
resizableComponentWithFiltersClasses?: string;
|
|
7
|
-
resizableComponentNoFiltersClasses?: string;
|
|
8
|
-
resizableComponentStaticClasses?: string;
|
|
9
|
-
resizableComponentHoveringClasses?: string;
|
|
10
|
-
resizableComponentClasses?: string;
|
|
11
|
-
headerWrapperClasses?: string;
|
|
12
|
-
headerWrapperSortingClasses?: string;
|
|
13
|
-
headerIconClasses?: string;
|
|
14
|
-
filterWrapperClasses?: string;
|
|
15
|
-
filterInputClasses?: string;
|
|
16
|
-
cellClasses?: string;
|
|
17
|
-
rowStaticClasses?: string;
|
|
18
|
-
rowHoveringClasses?: string;
|
|
19
|
-
firstColumnRowClasses?: string;
|
|
20
|
-
intermediateColumnRowClasses?: string;
|
|
21
|
-
lastColumnRowClasses?: string;
|
|
22
|
-
}
|
|
23
|
-
export default function Column<DataType>({ column, data, cellRenderer, index, dragType, tableHasFilters, isFirst, isLast, headerWrapperClasses, headerWrapperSortingClasses, headerIconClasses, filterWrapperClasses, filterInputClasses, cellClasses, rowStaticClasses, rowHoveringClasses, firstColumnRowClasses, intermediateColumnRowClasses, lastColumnRowClasses, filterComponent, hoveredRowIds, onRowHoverEnter, onRowHoverLeave, onRowClick, onRowDoubleClick, onSort, onDragEnd, moveColumn, }: {
|
|
24
|
-
column: TableColumn<DataType>;
|
|
25
|
-
data: DataType[];
|
|
26
|
-
cellRenderer?: {
|
|
27
|
-
[key in keyof DataType]?: (data: DataType) => JSX.Element;
|
|
28
|
-
};
|
|
29
|
-
index: number;
|
|
30
|
-
dragType: string;
|
|
31
|
-
tableHasFilters: boolean;
|
|
32
|
-
headerWrapperClasses?: string;
|
|
33
|
-
headerWrapperSortingClasses?: string;
|
|
34
|
-
headerIconClasses?: string;
|
|
35
|
-
filterWrapperClasses?: string;
|
|
36
|
-
filterInputClasses?: string;
|
|
37
|
-
cellClasses?: string;
|
|
38
|
-
rowStaticClasses?: string;
|
|
39
|
-
firstColumnRowClasses?: string;
|
|
40
|
-
intermediateColumnRowClasses?: string;
|
|
41
|
-
lastColumnRowClasses?: string;
|
|
42
|
-
isFirst: boolean;
|
|
43
|
-
isLast: boolean;
|
|
44
|
-
rowHoveringClasses?: string;
|
|
45
|
-
filterComponent?: JSX.Element;
|
|
46
|
-
hoveredRowIds: number[];
|
|
47
|
-
onRowHoverEnter?: (index: number) => void;
|
|
48
|
-
onRowHoverLeave?: (index: number) => void;
|
|
49
|
-
onRowClick?: (data: DataType) => void;
|
|
50
|
-
onRowDoubleClick?: (data: DataType) => void;
|
|
51
|
-
onSort?: (column: TableColumn<DataType>) => void;
|
|
52
|
-
onDragEnd?: (dragIndex: number, hoverIndex: number) => void;
|
|
53
|
-
moveColumn: (dragIndex: number, hoverIndex: number) => void;
|
|
54
|
-
}): import("react/jsx-runtime").JSX.Element;
|