@syook/react-tabulous 4.0.1 → 4.0.2

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.
@@ -25,7 +25,7 @@ export declare const dataSet2: {
25
25
  lastJournalPublish: Date;
26
26
  lastLogin: Date;
27
27
  journalTitle: string;
28
- level: number;
28
+ level: string | number;
29
29
  workPlace: string;
30
30
  address: {
31
31
  country: string;
@@ -44,6 +44,7 @@ export declare const dataSet2Columns: ({
44
44
  isSearchable: boolean;
45
45
  renderCell?: undefined;
46
46
  valueGetter?: undefined;
47
+ options?: undefined;
47
48
  } | {
48
49
  field: string;
49
50
  headerName: string;
@@ -53,15 +54,23 @@ export declare const dataSet2Columns: ({
53
54
  isSortable?: undefined;
54
55
  isSearchable?: undefined;
55
56
  valueGetter?: undefined;
57
+ options?: undefined;
56
58
  } | {
57
59
  field: string;
58
60
  headerName: string;
59
61
  type: string;
62
+ valueGetter: (row: any) => any;
60
63
  renderCell: (row: any) => import("react/jsx-runtime").JSX.Element;
64
+ options: ({
65
+ label: string;
66
+ value: string;
67
+ } | {
68
+ label: string;
69
+ value: number;
70
+ })[];
61
71
  isFilterable: boolean;
62
72
  isSortable: boolean;
63
73
  isSearchable: boolean;
64
- valueGetter?: undefined;
65
74
  } | {
66
75
  field: string;
67
76
  headerName: string;
@@ -71,6 +80,7 @@ export declare const dataSet2Columns: ({
71
80
  isSortable?: undefined;
72
81
  renderCell?: undefined;
73
82
  valueGetter?: undefined;
83
+ options?: undefined;
74
84
  } | {
75
85
  field: string;
76
86
  valueGetter: (row: any) => string;
@@ -80,4 +90,5 @@ export declare const dataSet2Columns: ({
80
90
  isSearchable: boolean;
81
91
  type?: undefined;
82
92
  renderCell?: undefined;
93
+ options?: undefined;
83
94
  })[];
@@ -0,0 +1,10 @@
1
+ type ValueType = string | number | boolean;
2
+ export interface OptionInterface {
3
+ value: ValueType;
4
+ label: string;
5
+ }
6
+ export declare const getLowercase: (string: ValueType) => string;
7
+ export declare const isStringMatch: (string: ValueType, search: ValueType) => boolean;
8
+ export declare const isStringIncludes: (string: ValueType, search: ValueType) => boolean;
9
+ export declare const getValueFromOptions: (options: OptionInterface[], value: string | number | boolean) => OptionInterface | null;
10
+ export {};
@@ -15,7 +15,7 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
15
15
  /**
16
16
  * Get the values to be displayed in the table cell.
17
17
  */
18
- valueGetter?: (row: any, index?: number) => string | number;
18
+ valueGetter?: (row: any, index?: number) => string | number | boolean;
19
19
  /**
20
20
  * The cell which has JSX will be displayed.
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syook/react-tabulous",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Terrifically fabulous React Table",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -64,8 +64,8 @@
64
64
  "@testing-library/react": "^13.4.0",
65
65
  "@testing-library/user-event": "^13.5.0",
66
66
  "@types/jest": "^27.5.2",
67
- "@types/node": "^16.18.96",
68
- "@types/react": "^18.3.1",
67
+ "@types/node": "^16.18.104",
68
+ "@types/react": "^18.3.3",
69
69
  "@types/react-dom": "^18.3.0",
70
70
  "@typescript-eslint/eslint-plugin": "^6.4.0",
71
71
  "eslint": "^8.0.1",