@vendorflow/components 3.0.4 → 3.0.6
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/lib/components/material-ui/Button/Button.d.ts +1 -1
- package/lib/components/material-ui/ButtonMenu/ButtonMenu.d.ts +2 -2
- package/lib/components/material-ui/ColorPicker/ColorPicker.d.ts +1 -1
- package/lib/components/material-ui/DataTable/DataTable.d.ts +1 -1
- package/lib/components/material-ui/InputDate/InputDate.d.ts +2 -2
- package/lib/components/material-ui/InputDateTime/InputDateTime.d.ts +2 -2
- package/lib/components/material-ui/InputGroup/InputGroup.d.ts +1 -1
- package/lib/components/material-ui/InputSearchDropdown/InputSearchDropdown.d.ts +2 -2
- package/lib/components/material-ui/InputTime/InputTime.d.ts +2 -2
- package/lib/components/material-ui/Modal/Modal.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.LICENSE.txt +0 -6
- package/lib/index.js.map +1 -1
- package/lib/types/Component.types.d.ts +9 -9
- package/lib/types/DataTable.types.d.ts +9 -9
- package/package.json +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AutocompleteChangeReason } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
export type { Color as ColorPickerColor } from 'react-color-palette';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type Variant = 'standard' | 'outlined' | 'filled' | undefined;
|
|
5
|
+
export type Color = 'default' | 'primary' | 'secondary' | undefined;
|
|
6
6
|
export interface BasicOption {
|
|
7
7
|
label: string;
|
|
8
8
|
value: string | number;
|
|
@@ -13,10 +13,10 @@ export interface SimpleEvent<T> {
|
|
|
13
13
|
value: T | null | undefined;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
16
|
+
export type SimpleEventHandler<T> = (evt: SimpleEvent<T>) => void;
|
|
17
|
+
export type UniqueKey<T> = string | ((item: T) => string | number);
|
|
18
|
+
export type InputValueRender<T> = (item: T) => string;
|
|
19
|
+
export type TagRender<T> = (item: T) => ReactNode;
|
|
20
20
|
export interface DropdownEvent {
|
|
21
21
|
target: {
|
|
22
22
|
name?: string;
|
|
@@ -24,15 +24,15 @@ export interface DropdownEvent {
|
|
|
24
24
|
reason: AutocompleteChangeReason;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type MenuItem = {
|
|
28
28
|
content: ReactNode;
|
|
29
29
|
onClick: () => void;
|
|
30
30
|
type: 'MenuItem';
|
|
31
31
|
disabled?: boolean;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type Divider = {
|
|
34
34
|
text: string;
|
|
35
35
|
textAlign: 'center' | 'left' | 'right';
|
|
36
36
|
type: 'Divider';
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type ParsableDate = string | number | Date;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Column, UseSortByColumnProps, HeaderGroup, UseSortByOptions, TableOptions, UseSortByColumnOptions, UsePaginationOptions, UseSortByInstanceProps, UsePaginationInstanceProps, TableInstance, TableState, UseSortByState, UsePaginationState, UseRowSelectOptions, UseRowSelectInstanceProps, UseRowSelectState, Row, UseRowSelectRowProps, UseExpandedOptions, UseExpandedInstanceProps, UseExpandedState, UseExpandedRowProps, UseGlobalFiltersInstanceProps, UseGlobalFiltersState, UseFiltersOptions, UseFiltersInstanceProps, UseFiltersState, UseFiltersColumnOptions, UseFiltersColumnProps, UseTableOptions, UseGlobalFiltersOptions, UseResizeColumnsColumnOptions, UseResizeColumnsColumnProps, UseResizeColumnsState } from 'react-table';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type Mode = 'single' | 'multi';
|
|
3
|
+
export type CustomColumnConfigProps<D extends object> = {
|
|
4
4
|
name?: string;
|
|
5
5
|
filterName?: string;
|
|
6
6
|
columns?: EnhancedColumn<D>[];
|
|
7
7
|
};
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
8
|
+
export type EnhancedHeader<D extends object> = HeaderGroup<D> & UseFiltersColumnProps<D> & UseSortByColumnProps<D> & UseResizeColumnsColumnProps<D> & CustomColumnConfigProps<D>;
|
|
9
|
+
export type EnhancedTableOptions<D extends object> = TableOptions<D> & UseExpandedOptions<D> & UseFiltersOptions<D> & UseGlobalFiltersOptions<D> & UseSortByOptions<D> & UsePaginationOptions<D> & UseRowSelectOptions<D>;
|
|
10
|
+
export type EnhancedTableInstance<D extends object> = Omit<TableInstance<D>, 'state'> & UseExpandedInstanceProps<D> & UseFiltersInstanceProps<D> & UseGlobalFiltersInstanceProps<D> & UseSortByInstanceProps<D> & UsePaginationInstanceProps<D> & UseRowSelectInstanceProps<D> & {
|
|
11
11
|
state: EnhancedTableState<D>;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
13
|
+
export type EnhancedTableState<D extends object> = TableState<D> & UseExpandedState<D> & UseFiltersState<D> & UseGlobalFiltersState<D> & UseSortByState<D> & UsePaginationState<D> & UseRowSelectState<D> & UseResizeColumnsState<D>;
|
|
14
|
+
export type EnhancedColumn<D extends object> = CustomColumnConfigProps<D> & Partial<Omit<Column<D>, 'columns'>> & Partial<UseFiltersColumnOptions<D>> & Partial<UseSortByColumnOptions<D>> & Partial<UseResizeColumnsColumnOptions<D>>;
|
|
15
|
+
export type EnhancedRow<D extends object> = Row<D> & UseExpandedRowProps<D> & UseRowSelectRowProps<D>;
|
|
16
16
|
export interface TableFeatureOptions<D extends object> {
|
|
17
17
|
rowExpanding?: {
|
|
18
18
|
enabled: boolean;
|
|
@@ -59,7 +59,7 @@ export interface TableFeatureOptions<D extends object> {
|
|
|
59
59
|
defaultRowHeight?: number;
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
export
|
|
62
|
+
export type FilterType = 'text' | 'select' | 'multi-select' | 'range';
|
|
63
63
|
export interface UseDefaultTableInstanceProps<D extends object> {
|
|
64
64
|
columns: EnhancedColumn<D>[];
|
|
65
65
|
data: D[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendorflow/components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "React components for vendorflow",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"file-loader": "4.3.0",
|
|
61
61
|
"html-webpack-plugin": "4.0.0-beta.11",
|
|
62
62
|
"immer": "^9.0.6",
|
|
63
|
-
"lodash": "^4.17.
|
|
63
|
+
"lodash": "^4.17.21",
|
|
64
64
|
"material-ui-popup-state": "^2.0.0",
|
|
65
65
|
"mini-css-extract-plugin": "0.9.0",
|
|
66
|
-
"nanoid": "
|
|
66
|
+
"nanoid": "3.1.31",
|
|
67
67
|
"optimize-css-assets-webpack-plugin": "5.0.3",
|
|
68
68
|
"pnp-webpack-plugin": "1.6.4",
|
|
69
69
|
"postcss-flexbugs-fixes": "4.1.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"postcss-safe-parser": "4.0.1",
|
|
74
74
|
"react-app-polyfill": "^1.0.6",
|
|
75
75
|
"react-color-palette": "^6.1.0",
|
|
76
|
-
"react-dev-utils": "
|
|
76
|
+
"react-dev-utils": "11.0.4",
|
|
77
77
|
"react-h5-audio-player": "^3.8.1",
|
|
78
78
|
"react-measure": "^2.5.2",
|
|
79
79
|
"react-scripts": "^4.0.3",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"style-loader": "0.23.1",
|
|
91
91
|
"terser-webpack-plugin": "2.3.5",
|
|
92
92
|
"ts-pnp": "1.1.6",
|
|
93
|
-
"typescript": "^4.
|
|
93
|
+
"typescript": "^4.5.5",
|
|
94
94
|
"url-loader": "2.3.0",
|
|
95
95
|
"webpack": "^5.68.0",
|
|
96
96
|
"webpack-dev-server": "3.10.3",
|