pixel-react 1.5.8 → 1.6.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.
Files changed (72) hide show
  1. package/.storybook/main.ts +1 -7
  2. package/.storybook/preview-head.html +3 -0
  3. package/.yarn/install-state.gz +0 -0
  4. package/index.scss +5 -0
  5. package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +1 -1
  6. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.d.ts +2 -2
  7. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +17 -1
  8. package/lib/components/Excel/Types.d.ts +22 -1
  9. package/lib/components/Excel/dataConversion.d.ts +3 -0
  10. package/lib/components/FieldSet/FieldSet.d.ts +5 -0
  11. package/lib/components/FieldSet/index.d.ts +1 -0
  12. package/lib/components/FieldSet/types.d.ts +7 -0
  13. package/lib/components/FileDropzone/types.d.ts +8 -0
  14. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  15. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
  16. package/lib/components/TableTree/TableTree.d.ts +4 -24
  17. package/lib/components/TableTree/data.d.ts +78 -273
  18. package/lib/components/TableTree/types.d.ts +29 -0
  19. package/lib/index.d.ts +99 -21
  20. package/lib/index.esm.js +597 -392
  21. package/lib/index.esm.js.map +1 -1
  22. package/lib/index.js +601 -392
  23. package/lib/index.js.map +1 -1
  24. package/lib/tsconfig.tsbuildinfo +1 -1
  25. package/package.json +2 -3
  26. package/src/assets/icons/export.svg +5 -0
  27. package/src/assets/icons/import.svg +5 -0
  28. package/src/assets/icons/info_icon.svg +4 -16
  29. package/src/assets/icons/replace_file.svg +14 -0
  30. package/src/assets/icons/web_service_icon.svg +3 -0
  31. package/src/components/Checkbox/Checkbox.tsx +1 -7
  32. package/src/components/DragAndDrop/DragAndDropList.tsx +5 -4
  33. package/src/components/Excel/ExcelFile/ExcelFile.tsx +60 -5
  34. package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +39 -39
  35. package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +34 -28
  36. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +0 -29
  37. package/src/components/Excel/ExcelFile/ExcelFileComponents/actions.ts +29 -0
  38. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +33 -0
  39. package/src/components/Excel/ExcelFile.stories.tsx +77 -67
  40. package/src/components/Excel/Types.ts +23 -1
  41. package/src/components/Excel/dataConversion.ts +173 -0
  42. package/src/components/FieldSet/FieldSet.scss +9 -0
  43. package/src/components/FieldSet/FieldSet.stories.tsx +103 -0
  44. package/src/components/FieldSet/FieldSet.tsx +29 -0
  45. package/src/components/FieldSet/index.ts +1 -0
  46. package/src/components/FieldSet/types.ts +8 -0
  47. package/src/components/FileDropzone/FileDropzone.scss +1 -1
  48. package/src/components/FileDropzone/FileDropzone.stories.tsx +15 -3
  49. package/src/components/FileDropzone/FileDropzone.tsx +5 -0
  50. package/src/components/FileDropzone/FilePreview.tsx +1 -1
  51. package/src/components/FileDropzone/types.ts +8 -0
  52. package/src/components/Icon/iconList.ts +11 -7
  53. package/src/components/MultiSelect/Dropdown.tsx +7 -3
  54. package/src/components/MultiSelect/MultiSelect.stories.tsx +6 -1
  55. package/src/components/MultiSelect/MultiSelect.tsx +4 -20
  56. package/src/components/MultiSelect/MultiSelectTypes.ts +2 -0
  57. package/src/components/TableTree/TableTree.scss +154 -123
  58. package/src/components/TableTree/TableTree.stories.tsx +10 -5
  59. package/src/components/TableTree/TableTree.tsx +220 -287
  60. package/src/components/TableTree/data.ts +677 -569
  61. package/src/components/TableTree/types.ts +31 -0
  62. package/src/components/Toast/Toast.tsx +1 -1
  63. package/src/components/Typography/Typography.scss +1 -36
  64. package/src/index.ts +8 -0
  65. package/src/assets/fonts/Poppins-Bold.ttf +0 -0
  66. package/src/assets/fonts/Poppins-Bold.woff2 +0 -0
  67. package/src/assets/fonts/Poppins-Medium.ttf +0 -0
  68. package/src/assets/fonts/Poppins-Medium.woff2 +0 -0
  69. package/src/assets/fonts/Poppins-Regular.ttf +0 -0
  70. package/src/assets/fonts/Poppins-Regular.woff2 +0 -0
  71. package/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
  72. package/src/assets/fonts/Poppins-SemiBold.woff2 +0 -0
@@ -21,12 +21,6 @@ const config: StorybookConfig = {
21
21
 
22
22
  typescript: {
23
23
  reactDocgen: 'react-docgen-typescript'
24
- },
25
-
26
- viteFinal: async (config) => {
27
- // Ensure Vite processes font files
28
- config.assetsInclude = [/\.(woff2?|eot|ttf|otf)$/];
29
- return config;
30
- },
24
+ }
31
25
  };
32
26
  export default config;
@@ -0,0 +1,3 @@
1
+ <link rel="preconnect" href="https://fonts.googleapis.com">
2
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
3
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
Binary file
package/index.scss CHANGED
@@ -0,0 +1,5 @@
1
+ /* global.css or component CSS */
2
+ body {
3
+ font-family: 'Poppins', sans-serif;
4
+ }
5
+
@@ -14,7 +14,7 @@ interface ExcelFileProps {
14
14
  /** Controls whether the toolbar is shown, disabled, or hidden */
15
15
  toolbar?: 'show' | 'disable' | 'hide';
16
16
  /** Callback function to save the Excel data */
17
- onSave?: (excelData?: any) => void;
17
+ onSave?: (saveData: any) => void;
18
18
  }
19
19
  declare const ExcelFile: React.FC<ExcelFileProps>;
20
20
  export default ExcelFile;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import * as Types from './types';
3
- declare const ColumnIndicator: Types.ColumnIndicatorComponent;
4
- export default ColumnIndicator;
5
3
  export declare const enhance: (ColumnIndicatorComponent: Types.ColumnIndicatorComponent) => React.FC<Omit<Types.ColumnIndicatorProps, "selected" | "onSelect">>;
4
+ declare const EnhancedColumnIndicator: React.FC<Omit<Types.ColumnIndicatorProps, "selected" | "onSelect">>;
5
+ export default EnhancedColumnIndicator;
@@ -38,9 +38,25 @@ export declare const ADD_ROW_TOP = "ADD_ROW_TOP";
38
38
  export declare const ADD_COLUMN_LEFT = "ADD_COLUMN_LEFT";
39
39
  export declare const DELETE_ROW = "DELETE_ROW";
40
40
  export declare const DELETE_COLUMN = "DELETE_COLUMN";
41
+ export declare const SET_ROW_HEIGHT = "SET_ROW_HEIGHT";
42
+ export declare const SET_COLUMN_POSITION = "SET_COLUMN_POSITION";
41
43
  export type BaseAction<T extends string> = {
42
44
  type: T;
43
45
  };
46
+ export type SetRowHeight = BaseAction<typeof SET_ROW_HEIGHT> & {
47
+ payload: {
48
+ row: number;
49
+ height: number;
50
+ };
51
+ };
52
+ export declare function setRowHeight(row: number, height: number): SetRowHeight;
53
+ export type SetColumnPosition = BaseAction<typeof SET_COLUMN_POSITION> & {
54
+ payload: {
55
+ column: number;
56
+ width: number;
57
+ };
58
+ };
59
+ export declare function setColumnPosition(column: number, width: number): SetColumnPosition;
44
60
  export type BoldStyle = BaseAction<typeof BOLD> & {
45
61
  payload: {
46
62
  data: Matrix<CellBase>;
@@ -228,4 +244,4 @@ export type ClearAction = BaseAction<typeof CLEAR>;
228
244
  export declare function clear(): ClearAction;
229
245
  export type BlurAction = BaseAction<typeof BLUR>;
230
246
  export declare function blur(): BlurAction;
231
- export type Action = SetDataAction | SetCreateFormulaParserAction | SelectEntireRowAction | SelectEntireColumnAction | SelectEntireWorksheetAction | SetSelectionAction | SelectAction | ActivateAction | SetCellDataAction | SetCellDimensionsAction | PasteAction | KeyDownAction | DragStartAction | DragEndAction | CommitAction | CopyAction | CutAction | EditAction | ViewAction | ClearAction | UnderlineTypeStyle | FontSize | FontFamily | TextAlignType | BorderType | ItalicStyle | BoldStyle | ColorStyle | BackgroundStyle | FormatePainterStyle | AddRowTop | AddColumnLeft | DeleteRow | DeleteColumn | BlurAction;
247
+ export type Action = SetDataAction | SetCreateFormulaParserAction | SelectEntireRowAction | SelectEntireColumnAction | SelectEntireWorksheetAction | SetSelectionAction | SelectAction | ActivateAction | SetCellDataAction | SetCellDimensionsAction | PasteAction | KeyDownAction | DragStartAction | DragEndAction | CommitAction | CopyAction | CutAction | EditAction | ViewAction | ClearAction | UnderlineTypeStyle | FontSize | FontFamily | TextAlignType | BorderType | ItalicStyle | BoldStyle | ColorStyle | BackgroundStyle | FormatePainterStyle | AddRowTop | AddColumnLeft | DeleteRow | DeleteColumn | SetRowHeight | SetColumnPosition | BlurAction;
@@ -24,9 +24,30 @@ interface WorkData {
24
24
  /** Value of the cell */
25
25
  value: string;
26
26
  /** Styling options for the cell */
27
- style: React.CSSProperties;
27
+ style: BackendStyle;
28
28
  type?: boolean;
29
29
  }
30
+ type BackendStyle = {
31
+ name: string;
32
+ size: number;
33
+ bold: boolean;
34
+ italic: boolean;
35
+ color: string;
36
+ backgroundColor: string;
37
+ borderColor: string;
38
+ underline: string;
39
+ border: {
40
+ top: string;
41
+ bottom: string;
42
+ left: string;
43
+ right: string;
44
+ };
45
+ alignment: {
46
+ horizontal: string;
47
+ vertical: string;
48
+ wrapText: boolean;
49
+ };
50
+ };
30
51
  /** A generic type to represent a 2D matrix of any type (or undefined values) */
31
52
  type Matrix<T> = (T | undefined)[][];
32
53
  interface ContextAction {
@@ -0,0 +1,3 @@
1
+ export declare const getTextDecorationBack: (textDecoration: string) => "solid" | "dotted" | "dashed" | "wavy" | "NONE";
2
+ export declare function convertStyleToFrontend(backendStyle: BackendStyle): React.CSSProperties;
3
+ export declare const convertStyleToBackend: (frontendStyle: React.CSSProperties) => BackendStyle;
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import './FieldSet.scss';
3
+ import { fieldSetProps } from './types';
4
+ declare const FieldSet: FC<fieldSetProps>;
5
+ export default FieldSet;
@@ -0,0 +1 @@
1
+ export { default } from './FieldSet';
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface fieldSetProps {
3
+ legendName: string;
4
+ height: string;
5
+ width: string;
6
+ children: ReactNode | string;
7
+ }
@@ -54,6 +54,14 @@ export interface FileDropzoneProps {
54
54
  validateMIMEType?: boolean;
55
55
  width?: number | string;
56
56
  height?: number | string;
57
+ /**
58
+ * Returns the accepted files in the state
59
+ **/
60
+ getAcceptedFiles?: (files: File[]) => void;
61
+ /**
62
+ * Returns the rejected files in the state
63
+ **/
64
+ getRejectedFiles?: (files: FileRejection[]) => void;
57
65
  }
58
66
  export interface FileState {
59
67
  accepted: File[];
@@ -1,4 +1,4 @@
1
1
  import './MultiSelect.scss';
2
2
  import { MultiSelectProps } from './MultiSelectTypes';
3
- declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, displayCount, placeholderForSearching, variant, onLabelPlusIconClick, onManageLabelsClick, className, highlightedMachine, onSelectButtonClick, labelAccessor, valueAccessor, withSelectButton, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, displayCount, placeholderForSearching, variant, onLabelPlusIconClick, onManageLabelsClick, className, highlightedMachine, onSelectButtonClick, labelAccessor, valueAccessor, withSelectButton, onEnter }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default MultiSelect;
@@ -31,5 +31,6 @@ interface MultiSelectProps {
31
31
  highlightedMachine?: string | ReactElement;
32
32
  labelAccessor?: string;
33
33
  valueAccessor?: string;
34
+ onEnter?: (newOption: string) => void;
34
35
  }
35
36
  export { Option, MultiSelectProps };
@@ -1,25 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import React from 'react';
2
2
  import './TableTree.scss';
3
- interface ColumnDataProps {
4
- name: string;
5
- accessor: string;
6
- width: string;
7
- isClickable?: boolean;
8
- minWidth?: string;
9
- cell?: (e: any) => JSX.Element | string | ReactNode;
10
- actions?: (e: any) => JSX.Element | string | ReactNode;
11
- }
12
- interface ObjectProps {
13
- [key: string]: any;
14
- }
15
- interface TableTreeProps {
16
- select: 'checkbox' | 'radio' | 'none';
17
- columnsData: Array<ColumnDataProps>;
18
- treeData: Array<ObjectProps>;
19
- onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: any) => void;
20
- onChange?: (e: any, node: any) => void;
21
- selected: Array<string>;
22
- onPagination?: (node: ObjectProps) => void;
23
- }
24
- declare const TableTree: ({ columnsData, treeData, select, onClick, onChange, selected, onPagination, }: TableTreeProps) => import("react/jsx-runtime").JSX.Element;
25
- export default TableTree;
3
+ import { TreeTableProps } from './types';
4
+ declare const TreeTable: React.FC<TreeTableProps>;
5
+ export default TreeTable;
@@ -1,11 +1,34 @@
1
- declare const extendedData: {
2
- subModuleCount: number;
3
- title: string;
4
- scriptCount: number;
5
- path: string;
6
- expanded: boolean;
7
- modifiedOn: string;
8
- children: ({
1
+ declare const data: ({
2
+ node: {
3
+ subModuleCount: number;
4
+ title: string;
5
+ scriptCount: number;
6
+ path: string;
7
+ expanded: boolean;
8
+ modifiedOn: string;
9
+ children: boolean;
10
+ lastExecutionOrder: number;
11
+ imported: boolean;
12
+ modifiedBy: string;
13
+ moduleCountWithScript: number;
14
+ state: string;
15
+ key: string;
16
+ ver: number;
17
+ hierarchy: number;
18
+ assigneeCount: number;
19
+ searchKey: string;
20
+ modifiedByUname: string;
21
+ executionOrder: number;
22
+ createdByUname: string;
23
+ folder: boolean;
24
+ moduleLevelScriptCount: number;
25
+ name: string;
26
+ parentId?: undefined;
27
+ parentName?: undefined;
28
+ };
29
+ level: number;
30
+ } | {
31
+ node: {
9
32
  subModuleCount: number;
10
33
  title: string;
11
34
  scriptCount: number;
@@ -13,209 +36,13 @@ declare const extendedData: {
13
36
  expanded: boolean;
14
37
  modifiedOn: string;
15
38
  folder: boolean;
16
- children: ({
17
- ver: number;
18
- hierarchy: number;
19
- subModuleCount: number;
20
- assigneeCount: number;
21
- searchKey: string;
22
- modifiedByUname: string;
23
- title: string;
24
- scriptCount: number;
25
- executionOrder: number;
26
- createdByUname: string;
27
- parentId: string;
28
- path: string;
29
- expanded: boolean;
30
- modifiedOn: string;
31
- parentName: string;
32
- moduleLevelScriptCount: number;
33
- lastExecutionOrder: number;
34
- imported: boolean;
35
- name: string;
36
- modifiedBy: string;
37
- moduleCountWithScript: number;
38
- state: string;
39
- key: string;
40
- folder: boolean;
41
- children: {
42
- ver: number;
43
- hierarchy: number;
44
- subModuleCount: number;
45
- assigneeCount: number;
46
- searchKey: string;
47
- modifiedByUname: string;
48
- title: string;
49
- scriptCount: number;
50
- executionOrder: number;
51
- createdByUname: string;
52
- parentId: string;
53
- path: string;
54
- expanded: boolean;
55
- modifiedOn: string;
56
- parentName: string;
57
- moduleLevelScriptCount: number;
58
- lastExecutionOrder: number;
59
- imported: boolean;
60
- name: string;
61
- modifiedBy: string;
62
- moduleCountWithScript: number;
63
- state: string;
64
- key: string;
65
- }[];
66
- } | {
67
- subModuleCount: number;
68
- title: string;
69
- scriptCount: number;
70
- path: string;
71
- expanded: boolean;
72
- modifiedOn: string;
73
- folder: boolean;
74
- children: {
75
- ver: number;
76
- hierarchy: number;
77
- subModuleCount: number;
78
- assigneeCount: number;
79
- searchKey: string;
80
- modifiedByUname: string;
81
- title: string;
82
- scriptCount: number;
83
- executionOrder: number;
84
- createdByUname: string;
85
- parentId: string;
86
- path: string;
87
- expanded: boolean;
88
- modifiedOn: string;
89
- parentName: string;
90
- moduleLevelScriptCount: number;
91
- lastExecutionOrder: number;
92
- imported: boolean;
93
- name: string;
94
- modifiedBy: string;
95
- moduleCountWithScript: number;
96
- state: string;
97
- key: string;
98
- folder: boolean;
99
- children: {
100
- ver: number;
101
- hierarchy: number;
102
- subModuleCount: number;
103
- assigneeCount: number;
104
- searchKey: string;
105
- modifiedByUname: string;
106
- title: string;
107
- scriptCount: number;
108
- executionOrder: number;
109
- createdByUname: string;
110
- parentId: string;
111
- path: string;
112
- expanded: boolean;
113
- modifiedOn: string;
114
- parentName: string;
115
- moduleLevelScriptCount: number;
116
- lastExecutionOrder: number;
117
- imported: boolean;
118
- name: string;
119
- modifiedBy: string;
120
- moduleCountWithScript: number;
121
- state: string;
122
- key: string;
123
- }[];
124
- }[];
125
- ver?: undefined;
126
- hierarchy?: undefined;
127
- assigneeCount?: undefined;
128
- searchKey?: undefined;
129
- modifiedByUname?: undefined;
130
- executionOrder?: undefined;
131
- createdByUname?: undefined;
132
- parentId?: undefined;
133
- parentName?: undefined;
134
- moduleLevelScriptCount?: undefined;
135
- lastExecutionOrder?: undefined;
136
- imported?: undefined;
137
- name?: undefined;
138
- modifiedBy?: undefined;
139
- moduleCountWithScript?: undefined;
140
- state?: undefined;
141
- key?: undefined;
142
- } | {
143
- ver: number;
144
- hierarchy: number;
145
- subModuleCount: number;
146
- assigneeCount: number;
147
- searchKey: string;
148
- modifiedByUname: string;
149
- title: string;
150
- scriptCount: number;
151
- executionOrder: number;
152
- createdByUname: string;
153
- parentId: string;
154
- path: string;
155
- expanded: boolean;
156
- modifiedOn: string;
157
- parentName: string;
158
- moduleLevelScriptCount: number;
159
- lastExecutionOrder: number;
160
- imported: boolean;
161
- name: string;
162
- modifiedBy: string;
163
- moduleCountWithScript: number;
164
- state: string;
165
- key: string;
166
- folder?: undefined;
167
- children?: undefined;
168
- } | {
169
- subModuleCount: number;
170
- title: string;
171
- scriptCount: number;
172
- path: string;
173
- expanded: boolean;
174
- modifiedOn: string;
175
- folder: boolean;
176
- children: {
177
- ver: number;
178
- hierarchy: number;
179
- subModuleCount: number;
180
- assigneeCount: number;
181
- searchKey: string;
182
- modifiedByUname: string;
183
- title: string;
184
- scriptCount: number;
185
- executionOrder: number;
186
- createdByUname: string;
187
- parentId: string;
188
- path: string;
189
- expanded: boolean;
190
- modifiedOn: string;
191
- parentName: string;
192
- moduleLevelScriptCount: number;
193
- lastExecutionOrder: number;
194
- imported: boolean;
195
- name: string;
196
- modifiedBy: string;
197
- moduleCountWithScript: number;
198
- state: string;
199
- key: string;
200
- }[];
201
- ver?: undefined;
202
- hierarchy?: undefined;
203
- assigneeCount?: undefined;
204
- searchKey?: undefined;
205
- modifiedByUname?: undefined;
206
- executionOrder?: undefined;
207
- createdByUname?: undefined;
208
- parentId?: undefined;
209
- parentName?: undefined;
210
- moduleLevelScriptCount?: undefined;
211
- lastExecutionOrder?: undefined;
212
- imported?: undefined;
213
- name?: undefined;
214
- modifiedBy?: undefined;
215
- moduleCountWithScript?: undefined;
216
- state?: undefined;
217
- key?: undefined;
218
- })[];
39
+ children: boolean;
40
+ lastExecutionOrder?: undefined;
41
+ imported?: undefined;
42
+ modifiedBy?: undefined;
43
+ moduleCountWithScript?: undefined;
44
+ state?: undefined;
45
+ key?: undefined;
219
46
  ver?: undefined;
220
47
  hierarchy?: undefined;
221
48
  assigneeCount?: undefined;
@@ -223,17 +50,14 @@ declare const extendedData: {
223
50
  modifiedByUname?: undefined;
224
51
  executionOrder?: undefined;
225
52
  createdByUname?: undefined;
226
- parentId?: undefined;
227
- parentName?: undefined;
228
53
  moduleLevelScriptCount?: undefined;
229
- lastExecutionOrder?: undefined;
230
- imported?: undefined;
231
54
  name?: undefined;
232
- modifiedBy?: undefined;
233
- moduleCountWithScript?: undefined;
234
- state?: undefined;
235
- key?: undefined;
236
- } | {
55
+ parentId?: undefined;
56
+ parentName?: undefined;
57
+ };
58
+ level: number;
59
+ } | {
60
+ node: {
237
61
  ver: number;
238
62
  hierarchy: number;
239
63
  subModuleCount: number;
@@ -249,7 +73,35 @@ declare const extendedData: {
249
73
  expanded: boolean;
250
74
  modifiedOn: string;
251
75
  parentName: string;
76
+ moduleLevelScriptCount: number;
77
+ lastExecutionOrder: number;
78
+ imported: boolean;
79
+ name: string;
80
+ modifiedBy: string;
81
+ moduleCountWithScript: number;
82
+ state: string;
83
+ key: string;
252
84
  folder: boolean;
85
+ children: boolean;
86
+ };
87
+ level: number;
88
+ } | {
89
+ node: {
90
+ ver: number;
91
+ hierarchy: number;
92
+ subModuleCount: number;
93
+ assigneeCount: number;
94
+ searchKey: string;
95
+ modifiedByUname: string;
96
+ title: string;
97
+ scriptCount: number;
98
+ executionOrder: number;
99
+ createdByUname: string;
100
+ parentId: string;
101
+ path: string;
102
+ expanded: boolean;
103
+ modifiedOn: string;
104
+ parentName: string;
253
105
  moduleLevelScriptCount: number;
254
106
  lastExecutionOrder: number;
255
107
  imported: boolean;
@@ -258,56 +110,9 @@ declare const extendedData: {
258
110
  moduleCountWithScript: number;
259
111
  state: string;
260
112
  key: string;
261
- children: {
262
- subModuleCount: number;
263
- title: string;
264
- scriptCount: number;
265
- path: string;
266
- expanded: boolean;
267
- modifiedOn: string;
268
- folder: boolean;
269
- children: {
270
- ver: number;
271
- hierarchy: number;
272
- subModuleCount: number;
273
- assigneeCount: number;
274
- searchKey: string;
275
- modifiedByUname: string;
276
- title: string;
277
- scriptCount: number;
278
- executionOrder: number;
279
- createdByUname: string;
280
- parentId: string;
281
- path: string;
282
- expanded: boolean;
283
- modifiedOn: string;
284
- parentName: string;
285
- moduleLevelScriptCount: number;
286
- lastExecutionOrder: number;
287
- imported: boolean;
288
- name: string;
289
- modifiedBy: string;
290
- moduleCountWithScript: number;
291
- state: string;
292
- key: string;
293
- }[];
294
- }[];
295
- })[];
296
- lastExecutionOrder: number;
297
- imported: boolean;
298
- modifiedBy: string;
299
- moduleCountWithScript: number;
300
- state: string;
301
- key: string;
302
- ver: number;
303
- hierarchy: number;
304
- assigneeCount: number;
305
- searchKey: string;
306
- modifiedByUname: string;
307
- executionOrder: number;
308
- createdByUname: string;
309
- folder: boolean;
310
- moduleLevelScriptCount: number;
311
- name: string;
312
- }[];
313
- export default extendedData;
113
+ children: boolean;
114
+ folder?: undefined;
115
+ };
116
+ level: number;
117
+ })[];
118
+ export default data;
@@ -0,0 +1,29 @@
1
+ export interface TreeNode {
2
+ key: string;
3
+ [key: string]: any;
4
+ children?: TreeNode[];
5
+ expanded?: boolean;
6
+ }
7
+ export interface Column {
8
+ name: string;
9
+ accessor: string;
10
+ width: string;
11
+ isClickable?: boolean;
12
+ cell?: (row: any) => JSX.Element | string | null;
13
+ actions?: (row: any) => JSX.Element[];
14
+ isTree?: boolean;
15
+ defaultValue?: string;
16
+ defaultActions?: () => JSX.Element[];
17
+ }
18
+ export interface TreeTableProps {
19
+ treeData: any;
20
+ columnsData: Column[];
21
+ selected?: string[];
22
+ select?: 'radio' | 'checkbox' | null;
23
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>, node: TreeNode) => void;
24
+ onPagination?: (node: TreeNode) => void;
25
+ onClick?: (e: React.MouseEvent<HTMLDivElement>, row: TreeNode) => void;
26
+ expandedNodes: string[];
27
+ onExpand?: (_isExpanded: boolean, node: string) => void;
28
+ onPaginate: (_direction: 'up' | 'down', id: string) => void;
29
+ }