@corva/ui 0.48.0-9-test-674373bf → 0.49.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.
Files changed (46) hide show
  1. package/_virtual/_tslib.js +1 -1
  2. package/components/AssetNameLabel/styles.css.js +1 -1
  3. package/components/Chip/index.d.ts +14 -7
  4. package/components/Chip/index.d.ts.map +1 -1
  5. package/components/Chip/index.js +1 -1
  6. package/components/ColorPickerPalette/ColorPickerPalette.d.ts +17 -19
  7. package/components/ColorPickerPalette/ColorPickerPalette.d.ts.map +1 -1
  8. package/components/ColorPickerPalette/ColorPickerPalette.js +1 -1
  9. package/components/Comment/CommentIcon/index.d.ts +20 -21
  10. package/components/Comment/CommentIcon/index.d.ts.map +1 -1
  11. package/components/Comment/CommentIcon/index.js +1 -1
  12. package/components/CommentInput/index.js +1 -1
  13. package/components/DatePicker/index.d.ts +17 -19
  14. package/components/DatePicker/index.d.ts.map +1 -1
  15. package/components/DatePicker/index.js +1 -1
  16. package/components/DevCenter/AppHeader/AppHeader.css.js +1 -1
  17. package/components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js +1 -1
  18. package/components/EmptyView/EmptyView.js +1 -1
  19. package/components/Notifications/components/Toast.d.ts.map +1 -1
  20. package/components/Notifications/components/Toast.js +1 -1
  21. package/components/Notifications/components/styles.d.ts.map +1 -1
  22. package/components/Notifications/components/styles.js +1 -1
  23. package/components/OffsetWellButton/OffsetWellButton.d.ts.map +1 -1
  24. package/components/OffsetWellButton/OffsetWellButton.js +1 -1
  25. package/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
  26. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.d.ts +3 -1
  27. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.d.ts.map +1 -1
  28. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js +1 -1
  29. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.d.ts +3 -1
  30. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.d.ts.map +1 -1
  31. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  32. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  33. package/components/SwitchControl/index.d.ts +124 -2
  34. package/components/SwitchControl/index.d.ts.map +1 -1
  35. package/components/SwitchControl/index.js +1 -1
  36. package/components/Tabs/Tabs.d.ts +23 -25
  37. package/components/Tabs/Tabs.d.ts.map +1 -1
  38. package/components/Tabs/Tabs.js +1 -1
  39. package/components/TextLink/index.d.ts +33 -38
  40. package/components/TextLink/index.d.ts.map +1 -1
  41. package/components/TextLink/index.js +1 -1
  42. package/components/VirtualizedTable/VirtualizedTable.d.ts +227 -81
  43. package/components/VirtualizedTable/VirtualizedTable.d.ts.map +1 -1
  44. package/components/VirtualizedTable/VirtualizedTable.js +1 -1
  45. package/package.json +2 -2
  46. package/types.d.ts +141 -0
@@ -1,40 +1,32 @@
1
- export function VirtualizedTableComponent({ columns, data, useColumnSetting, useFixedColumnWidth, onOpenSettingDlg, classes, width, height, headerHeight, rowHeight, showTopSettingIcon, customMuiStyles, isTopSettingIconShownAlways, CustomCellRenderer, customRowStyle, sort, sortBy, sortDirection, }: {
2
- columns: any;
3
- data: any;
4
- useColumnSetting: any;
5
- useFixedColumnWidth: any;
6
- onOpenSettingDlg: any;
7
- classes: any;
8
- width: any;
9
- height: any;
10
- headerHeight: any;
11
- rowHeight: any;
12
- showTopSettingIcon: any;
13
- customMuiStyles: any;
14
- isTopSettingIconShownAlways: any;
15
- CustomCellRenderer: any;
16
- customRowStyle: any;
17
- sort: any;
18
- sortBy: any;
19
- sortDirection: any;
20
- }): JSX.Element;
21
- export namespace VirtualizedTableComponent {
22
- namespace propTypes {
23
- const columns: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
24
- const data: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
25
- const useColumnSetting: PropTypes.Validator<boolean>;
26
- const useFixedColumnWidth: PropTypes.Validator<boolean>;
27
- const headerHeight: PropTypes.Validator<number>;
28
- const rowHeight: PropTypes.Validator<number>;
29
- const width: PropTypes.Validator<number>;
30
- const height: PropTypes.Validator<number>;
31
- const onOpenSettingDlg: PropTypes.Validator<(...args: any[]) => any>;
32
- const showTopSettingIcon: PropTypes.Validator<(...args: any[]) => any>;
33
- const sort: PropTypes.Requireable<(...args: any[]) => any>;
34
- const sortBy: PropTypes.Requireable<string>;
35
- const sortDirection: PropTypes.Requireable<string>;
36
- const classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
37
- const customMuiStyles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ declare type VirtualizedTableComponentProps = PropTypes.InferProps<typeof virtualizedTableComponentPropTypes>;
4
+ export declare const VirtualizedTableComponent: {
5
+ ({ columns, data, useColumnSetting, useFixedColumnWidth, onOpenSettingDlg, classes, width, height, headerHeight, rowHeight, showTopSettingIcon, customMuiStyles, isTopSettingIconShownAlways, CustomCellRenderer, customRowStyle, sort, sortBy, sortDirection, }: VirtualizedTableComponentProps): JSX.Element;
6
+ propTypes: {
7
+ columns: PropTypes.Validator<PropTypes.InferProps<{
8
+ show: PropTypes.Requireable<boolean>;
9
+ minWidth: PropTypes.Requireable<number>;
10
+ width: PropTypes.Requireable<number>;
11
+ key: PropTypes.Requireable<string>;
12
+ label: PropTypes.Requireable<string>;
13
+ }>[]>;
14
+ data: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
15
+ useColumnSetting: PropTypes.Validator<boolean>;
16
+ useFixedColumnWidth: PropTypes.Validator<boolean>;
17
+ headerHeight: PropTypes.Validator<number>;
18
+ rowHeight: PropTypes.Validator<number>;
19
+ width: PropTypes.Validator<number>;
20
+ height: PropTypes.Validator<number>;
21
+ onOpenSettingDlg: PropTypes.Validator<(...args: any[]) => any>;
22
+ showTopSettingIcon: PropTypes.Validator<(...args: any[]) => any>;
23
+ sort: PropTypes.Requireable<(...args: any[]) => any>;
24
+ sortBy: PropTypes.Requireable<string>;
25
+ sortDirection: PropTypes.Requireable<string>;
26
+ classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
27
+ sortIcon: PropTypes.Requireable<string>;
28
+ }>>>;
29
+ customMuiStyles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
38
30
  table: PropTypes.Requireable<string>;
39
31
  oddRow: PropTypes.Requireable<string>;
40
32
  headerLabel: PropTypes.Requireable<string>;
@@ -42,44 +34,129 @@ export namespace VirtualizedTableComponent {
42
34
  unitLabel: PropTypes.Requireable<string>;
43
35
  settingIcon: PropTypes.Requireable<string>;
44
36
  }>>>;
45
- const isTopSettingIconShownAlways: PropTypes.Validator<boolean>;
46
- const CustomCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
47
- const customRowStyle: PropTypes.Requireable<(...args: any[]) => any>;
48
- }
49
- namespace defaultProps {
50
- const CustomCellRenderer_1: any;
51
- export { CustomCellRenderer_1 as CustomCellRenderer };
52
- const customRowStyle_1: any;
53
- export { customRowStyle_1 as customRowStyle };
54
- const sort_1: any;
55
- export { sort_1 as sort };
56
- const sortBy_1: any;
57
- export { sortBy_1 as sortBy };
58
- const sortDirection_1: any;
59
- export { sortDirection_1 as sortDirection };
60
- }
61
- }
62
- declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
63
- columns: any;
64
- data: any;
65
- useColumnSetting: any;
66
- useFixedColumnWidth: any;
67
- onOpenSettingDlg: any;
68
- classes: any;
69
- width: any;
70
- height: any;
71
- headerHeight: any;
72
- rowHeight: any;
73
- showTopSettingIcon: any;
74
- customMuiStyles: any;
75
- isTopSettingIconShownAlways: any;
76
- CustomCellRenderer: any;
77
- customRowStyle: any;
78
- sort: any;
79
- sortBy: any;
80
- sortDirection: any;
81
- }, never> & Pick<PropTypes.InferProps<{
82
- columns: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
37
+ isTopSettingIconShownAlways: PropTypes.Validator<boolean>;
38
+ CustomCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
39
+ customRowStyle: PropTypes.Requireable<(...args: any[]) => any>;
40
+ };
41
+ defaultProps: {
42
+ CustomCellRenderer: any;
43
+ customRowStyle: any;
44
+ sort: any;
45
+ sortBy: any;
46
+ sortDirection: any;
47
+ };
48
+ };
49
+ declare const virtualizedTableComponentPropTypes: {
50
+ columns: PropTypes.Validator<PropTypes.InferProps<{
51
+ show: PropTypes.Requireable<boolean>;
52
+ minWidth: PropTypes.Requireable<number>;
53
+ width: PropTypes.Requireable<number>;
54
+ key: PropTypes.Requireable<string>;
55
+ label: PropTypes.Requireable<string>;
56
+ }>[]>;
57
+ data: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
58
+ useColumnSetting: PropTypes.Validator<boolean>;
59
+ useFixedColumnWidth: PropTypes.Validator<boolean>;
60
+ headerHeight: PropTypes.Validator<number>;
61
+ rowHeight: PropTypes.Validator<number>;
62
+ width: PropTypes.Validator<number>;
63
+ height: PropTypes.Validator<number>;
64
+ onOpenSettingDlg: PropTypes.Validator<(...args: any[]) => any>;
65
+ showTopSettingIcon: PropTypes.Validator<(...args: any[]) => any>;
66
+ sort: PropTypes.Requireable<(...args: any[]) => any>;
67
+ sortBy: PropTypes.Requireable<string>;
68
+ sortDirection: PropTypes.Requireable<string>;
69
+ classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
70
+ sortIcon: PropTypes.Requireable<string>;
71
+ }>>>;
72
+ customMuiStyles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
73
+ table: PropTypes.Requireable<string>;
74
+ oddRow: PropTypes.Requireable<string>;
75
+ headerLabel: PropTypes.Requireable<string>;
76
+ cellData: PropTypes.Requireable<string>;
77
+ unitLabel: PropTypes.Requireable<string>;
78
+ settingIcon: PropTypes.Requireable<string>;
79
+ }>>>;
80
+ isTopSettingIconShownAlways: PropTypes.Validator<boolean>;
81
+ CustomCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
82
+ customRowStyle: PropTypes.Requireable<(...args: any[]) => any>;
83
+ };
84
+ declare const _default: import("react").ComponentType<Pick<Pick<Pick<PropTypes.InferPropsInner<Pick<{
85
+ columns: PropTypes.Validator<PropTypes.InferProps<{
86
+ show: PropTypes.Requireable<boolean>;
87
+ minWidth: PropTypes.Requireable<number>;
88
+ width: PropTypes.Requireable<number>;
89
+ key: PropTypes.Requireable<string>;
90
+ label: PropTypes.Requireable<string>;
91
+ }>[]>;
92
+ data: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
93
+ useColumnSetting: PropTypes.Validator<boolean>;
94
+ useFixedColumnWidth: PropTypes.Validator<boolean>;
95
+ headerHeight: PropTypes.Validator<number>;
96
+ rowHeight: PropTypes.Validator<number>;
97
+ width: PropTypes.Validator<number>;
98
+ height: PropTypes.Validator<number>;
99
+ onOpenSettingDlg: PropTypes.Validator<(...args: any[]) => any>;
100
+ showTopSettingIcon: PropTypes.Validator<(...args: any[]) => any>;
101
+ sort: PropTypes.Requireable<(...args: any[]) => any>;
102
+ sortBy: PropTypes.Requireable<string>;
103
+ sortDirection: PropTypes.Requireable<string>;
104
+ classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
105
+ sortIcon: PropTypes.Requireable<string>;
106
+ }>>>;
107
+ customMuiStyles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
108
+ table: PropTypes.Requireable<string>;
109
+ oddRow: PropTypes.Requireable<string>;
110
+ headerLabel: PropTypes.Requireable<string>;
111
+ cellData: PropTypes.Requireable<string>;
112
+ unitLabel: PropTypes.Requireable<string>;
113
+ settingIcon: PropTypes.Requireable<string>;
114
+ }>>>;
115
+ isTopSettingIconShownAlways: PropTypes.Validator<boolean>;
116
+ CustomCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
117
+ customRowStyle: PropTypes.Requireable<(...args: any[]) => any>;
118
+ }, never>> & Partial<PropTypes.InferPropsInner<Pick<{
119
+ columns: PropTypes.Validator<PropTypes.InferProps<{
120
+ show: PropTypes.Requireable<boolean>;
121
+ minWidth: PropTypes.Requireable<number>;
122
+ width: PropTypes.Requireable<number>;
123
+ key: PropTypes.Requireable<string>;
124
+ label: PropTypes.Requireable<string>;
125
+ }>[]>;
126
+ data: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
127
+ useColumnSetting: PropTypes.Validator<boolean>;
128
+ useFixedColumnWidth: PropTypes.Validator<boolean>;
129
+ headerHeight: PropTypes.Validator<number>;
130
+ rowHeight: PropTypes.Validator<number>;
131
+ width: PropTypes.Validator<number>;
132
+ height: PropTypes.Validator<number>;
133
+ onOpenSettingDlg: PropTypes.Validator<(...args: any[]) => any>;
134
+ showTopSettingIcon: PropTypes.Validator<(...args: any[]) => any>;
135
+ sort: PropTypes.Requireable<(...args: any[]) => any>;
136
+ sortBy: PropTypes.Requireable<string>;
137
+ sortDirection: PropTypes.Requireable<string>;
138
+ classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
139
+ sortIcon: PropTypes.Requireable<string>;
140
+ }>>>;
141
+ customMuiStyles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
142
+ table: PropTypes.Requireable<string>;
143
+ oddRow: PropTypes.Requireable<string>;
144
+ headerLabel: PropTypes.Requireable<string>;
145
+ cellData: PropTypes.Requireable<string>;
146
+ unitLabel: PropTypes.Requireable<string>;
147
+ settingIcon: PropTypes.Requireable<string>;
148
+ }>>>;
149
+ isTopSettingIconShownAlways: PropTypes.Validator<boolean>;
150
+ CustomCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
151
+ customRowStyle: PropTypes.Requireable<(...args: any[]) => any>;
152
+ }, "data" | "sort" | "width" | "height" | "classes" | "columns" | "useColumnSetting" | "useFixedColumnWidth" | "headerHeight" | "rowHeight" | "onOpenSettingDlg" | "showTopSettingIcon" | "sortBy" | "sortDirection" | "customMuiStyles" | "isTopSettingIconShownAlways" | "CustomCellRenderer" | "customRowStyle">>>, "data" | "sort" | "width" | "height" | "classes" | "columns" | "useColumnSetting" | "useFixedColumnWidth" | "headerHeight" | "rowHeight" | "onOpenSettingDlg" | "showTopSettingIcon" | "sortBy" | "sortDirection" | "customMuiStyles" | "isTopSettingIconShownAlways" | "CustomCellRenderer" | "customRowStyle"> & Pick<PropTypes.InferProps<{
153
+ columns: PropTypes.Validator<PropTypes.InferProps<{
154
+ show: PropTypes.Requireable<boolean>;
155
+ minWidth: PropTypes.Requireable<number>;
156
+ width: PropTypes.Requireable<number>;
157
+ key: PropTypes.Requireable<string>;
158
+ label: PropTypes.Requireable<string>;
159
+ }>[]>;
83
160
  data: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
84
161
  useColumnSetting: PropTypes.Validator<boolean>;
85
162
  useFixedColumnWidth: PropTypes.Validator<boolean>;
@@ -92,7 +169,9 @@ declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
92
169
  sort: PropTypes.Requireable<(...args: any[]) => any>;
93
170
  sortBy: PropTypes.Requireable<string>;
94
171
  sortDirection: PropTypes.Requireable<string>;
95
- classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
172
+ classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
173
+ sortIcon: PropTypes.Requireable<string>;
174
+ }>>>;
96
175
  customMuiStyles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
97
176
  table: PropTypes.Requireable<string>;
98
177
  oddRow: PropTypes.Requireable<string>;
@@ -104,13 +183,80 @@ declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
104
183
  isTopSettingIconShownAlways: PropTypes.Validator<boolean>;
105
184
  CustomCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
106
185
  customRowStyle: PropTypes.Requireable<(...args: any[]) => any>;
107
- }>, "data" | "sort" | "width" | "height" | "classes" | "columns" | "useColumnSetting" | "useFixedColumnWidth" | "onOpenSettingDlg" | "headerHeight" | "rowHeight" | "showTopSettingIcon" | "customMuiStyles" | "isTopSettingIconShownAlways" | "CustomCellRenderer" | "customRowStyle" | "sortBy" | "sortDirection">, "data" | "width" | "height" | "classes" | "columns" | "useColumnSetting" | "useFixedColumnWidth" | "onOpenSettingDlg" | "headerHeight" | "rowHeight" | "showTopSettingIcon" | "customMuiStyles" | "isTopSettingIconShownAlways"> & {
186
+ }>, never> & Pick<PropTypes.InferPropsInner<Pick<{
187
+ columns: PropTypes.Validator<PropTypes.InferProps<{
188
+ show: PropTypes.Requireable<boolean>;
189
+ minWidth: PropTypes.Requireable<number>;
190
+ width: PropTypes.Requireable<number>;
191
+ key: PropTypes.Requireable<string>;
192
+ label: PropTypes.Requireable<string>;
193
+ }>[]>;
194
+ data: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
195
+ useColumnSetting: PropTypes.Validator<boolean>;
196
+ useFixedColumnWidth: PropTypes.Validator<boolean>;
197
+ headerHeight: PropTypes.Validator<number>;
198
+ rowHeight: PropTypes.Validator<number>;
199
+ width: PropTypes.Validator<number>;
200
+ height: PropTypes.Validator<number>;
201
+ onOpenSettingDlg: PropTypes.Validator<(...args: any[]) => any>;
202
+ showTopSettingIcon: PropTypes.Validator<(...args: any[]) => any>;
203
+ sort: PropTypes.Requireable<(...args: any[]) => any>;
204
+ sortBy: PropTypes.Requireable<string>;
205
+ sortDirection: PropTypes.Requireable<string>;
206
+ classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
207
+ sortIcon: PropTypes.Requireable<string>;
208
+ }>>>;
209
+ customMuiStyles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
210
+ table: PropTypes.Requireable<string>;
211
+ oddRow: PropTypes.Requireable<string>;
212
+ headerLabel: PropTypes.Requireable<string>;
213
+ cellData: PropTypes.Requireable<string>;
214
+ unitLabel: PropTypes.Requireable<string>;
215
+ settingIcon: PropTypes.Requireable<string>;
216
+ }>>>;
217
+ isTopSettingIconShownAlways: PropTypes.Validator<boolean>;
218
+ CustomCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
219
+ customRowStyle: PropTypes.Requireable<(...args: any[]) => any>;
220
+ }, never>> & Partial<PropTypes.InferPropsInner<Pick<{
221
+ columns: PropTypes.Validator<PropTypes.InferProps<{
222
+ show: PropTypes.Requireable<boolean>;
223
+ minWidth: PropTypes.Requireable<number>;
224
+ width: PropTypes.Requireable<number>;
225
+ key: PropTypes.Requireable<string>;
226
+ label: PropTypes.Requireable<string>;
227
+ }>[]>;
228
+ data: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
229
+ useColumnSetting: PropTypes.Validator<boolean>;
230
+ useFixedColumnWidth: PropTypes.Validator<boolean>;
231
+ headerHeight: PropTypes.Validator<number>;
232
+ rowHeight: PropTypes.Validator<number>;
233
+ width: PropTypes.Validator<number>;
234
+ height: PropTypes.Validator<number>;
235
+ onOpenSettingDlg: PropTypes.Validator<(...args: any[]) => any>;
236
+ showTopSettingIcon: PropTypes.Validator<(...args: any[]) => any>;
237
+ sort: PropTypes.Requireable<(...args: any[]) => any>;
238
+ sortBy: PropTypes.Requireable<string>;
239
+ sortDirection: PropTypes.Requireable<string>;
240
+ classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
241
+ sortIcon: PropTypes.Requireable<string>;
242
+ }>>>;
243
+ customMuiStyles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
244
+ table: PropTypes.Requireable<string>;
245
+ oddRow: PropTypes.Requireable<string>;
246
+ headerLabel: PropTypes.Requireable<string>;
247
+ cellData: PropTypes.Requireable<string>;
248
+ unitLabel: PropTypes.Requireable<string>;
249
+ settingIcon: PropTypes.Requireable<string>;
250
+ }>>>;
251
+ isTopSettingIconShownAlways: PropTypes.Validator<boolean>;
252
+ CustomCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
253
+ customRowStyle: PropTypes.Requireable<(...args: any[]) => any>;
254
+ }, "data" | "sort" | "width" | "height" | "classes" | "columns" | "useColumnSetting" | "useFixedColumnWidth" | "headerHeight" | "rowHeight" | "onOpenSettingDlg" | "showTopSettingIcon" | "sortBy" | "sortDirection" | "customMuiStyles" | "isTopSettingIconShownAlways" | "CustomCellRenderer" | "customRowStyle">>>, never>, "data" | "width" | "height" | "classes" | "columns" | "useColumnSetting" | "useFixedColumnWidth" | "headerHeight" | "rowHeight" | "onOpenSettingDlg" | "showTopSettingIcon" | "customMuiStyles" | "isTopSettingIconShownAlways"> & {
108
255
  sort?: (...args: any[]) => any;
109
- CustomCellRenderer?: (...args: any[]) => any;
110
- customRowStyle?: (...args: any[]) => any;
111
256
  sortBy?: string;
112
257
  sortDirection?: string;
113
- } & {}, "data" | "sort" | "width" | "height" | "columns" | "useColumnSetting" | "useFixedColumnWidth" | "onOpenSettingDlg" | "headerHeight" | "rowHeight" | "showTopSettingIcon" | "customMuiStyles" | "isTopSettingIconShownAlways" | "CustomCellRenderer" | "customRowStyle" | "sortBy" | "sortDirection"> & import("@material-ui/core").StyledComponentProps<"table" | "oddRow" | "headerLabel" | "cellData" | "unitLabel" | "settingIcon" | "sortIcon">>;
258
+ CustomCellRenderer?: (...args: any[]) => any;
259
+ customRowStyle?: (...args: any[]) => any;
260
+ } & {}, "data" | "sort" | "width" | "height" | "columns" | "useColumnSetting" | "useFixedColumnWidth" | "headerHeight" | "rowHeight" | "onOpenSettingDlg" | "showTopSettingIcon" | "sortBy" | "sortDirection" | "customMuiStyles" | "isTopSettingIconShownAlways" | "CustomCellRenderer" | "customRowStyle"> & import("@material-ui/core").StyledComponentProps<"table" | "sortIcon" | "oddRow" | "headerLabel" | "cellData" | "unitLabel" | "settingIcon">>;
114
261
  export default _default;
115
- import PropTypes from "prop-types";
116
262
  //# sourceMappingURL=VirtualizedTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.js"],"names":[],"mappings":"AA6FA;;;;;;;;;;;;;;;;;;;gBAkMC"}
1
+ {"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AA4FnC,aAAK,8BAA8B,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEtG,eAAO,MAAM,yBAAyB;sQAmBnC,8BAA8B,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+K9C,CAAA;AAED,QAAA,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaF,wBAAgE"}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import{useMemo as r,useEffect as n}from"react";import i from"prop-types";import o from"classnames";import{Table as a,Column as l,SortDirection as s}from"react-virtualized";import{withStyles as u,IconButton as c,Typography as d,Tooltip as f}from"@material-ui/core";import{Settings as m,Sort as h,ArrowUpward as p,ArrowDownward as b}from"@material-ui/icons";import{getUnitDisplay as g}from"../../utils/convert.js";import{jsx as y,Fragment as w,jsxs as S}from"react/jsx-runtime";function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?R(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,i=r.customUnit;return i?"(".concat(i,")"):n?"(".concat(g(n),")"):""}function v(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function C(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}function z(i){var u=i.columns,g=i.data,R=i.useColumnSetting,z=i.useFixedColumnWidth,_=i.onOpenSettingDlg,j=i.classes,k=i.width,D=i.height,T=i.headerHeight,q=i.rowHeight,N=i.showTopSettingIcon,I=i.customMuiStyles,L=i.isTopSettingIconShownAlways,P=i.CustomCellRenderer,H=i.customRowStyle,B=i.sort,A=i.sortBy,W=i.sortDirection,E=x(x({},j),I),F=r((function(){return{label:"",key:"setting",width:R?25:0}}),[R]),K=r((function(){return u.filter((function(e){return e.show}))}),[u]),V=r((function(){return R?[].concat(e(K),[F]):K}),[K,R,F]),M=r((function(){if(k<=0)return{};var e=t({},F.key,F.width),r=[];return K.filter((function(e){return Number.isFinite(e.width)})).forEach((function(t){e[t.key]=t.width-1,r.push(t.width-1)})),K.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(t){var n=r.reduce((function(e,t){return e+t}),0),i=Math.floor((k-n-F.width)/(K.length-r.length)),o=t.minWidth||65,a=i<o?o:i;e[t.key]=a-1,r.push(a-1)})),e}),[k,K,F]),G=r((function(){return Object.values(M).reduce((function(e,t){return e+t}),0)}),[M]),U=L||G-12.5>=k;n((function(){N(U)}),[U]);var Z=function(e){var t=e.label,r=e.dataKey,n=A||W||B;return r===F.key?U?null:y(c,{size:"small","aria-label":"customize columns",className:E.settingIcon,onClick:_,children:y(m,{fontSize:"inherit"})}):S(d,{variant:"body2",className:o(E.headerLabel,v(u,r)),children:[t," ",y("span",{className:o(E.unitLabel,C(u,r)),children:O(u,r)}),n&&r!==A&&y(f,{title:"Sort A-Z",children:y(h,{fontSize:"small",className:j.sortIcon})}),n&&r===A&&(W===s.ASC?y(p,{fontSize:"small",className:j.sortIcon}):y(b,{fontSize:"small",className:j.sortIcon}))]})},J=function(e){var t=e.dataKey,r=e.rowData;return P?y(P,{columnKey:t,value:r[t]}):y(d,{variant:"body2",className:E.cellData,children:r[t]})};return y(w,{children:y(a,{width:z?G:k,height:D,headerHeight:T,rowClassName:function(e){var r=e.index;return o(t({},E.oddRow,r%2==1))},rowHeight:q,rowCount:g.length,rowGetter:function(e){var t=e.index;return g[t]},rowStyle:H||{},className:E.table,sort:B,sortBy:A,sortDirection:W,children:V.map((function(e){return y(l,{width:M[e.key]||0,dataKey:e.key,label:e.label,headerRenderer:Z,cellRenderer:J},e.key)}))})})}z.propTypes={columns:i.arrayOf(i.shape({})).isRequired,data:i.arrayOf(i.shape({})).isRequired,useColumnSetting:i.bool.isRequired,useFixedColumnWidth:i.bool.isRequired,headerHeight:i.number.isRequired,rowHeight:i.number.isRequired,width:i.number.isRequired,height:i.number.isRequired,onOpenSettingDlg:i.func.isRequired,showTopSettingIcon:i.func.isRequired,sort:i.func,sortBy:i.string,sortDirection:i.string,classes:i.shape({}).isRequired,customMuiStyles:i.shape({table:i.string,oddRow:i.string,headerLabel:i.string,cellData:i.string,unitLabel:i.string,settingIcon:i.string}).isRequired,isTopSettingIconShownAlways:i.bool.isRequired,CustomCellRenderer:i.func,customRowStyle:i.func},z.defaultProps={CustomCellRenderer:null,customRowStyle:null,sort:null,sortBy:null,sortDirection:null};var _=u((function(e){return{table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}))(z);export{z as VirtualizedTableComponent,_ as default};
1
+ import{__assign as e,__spreadArray as t}from"../../_virtual/_tslib.js";import{jsx as r,Fragment as n,jsxs as i}from"react/jsx-runtime";import{useMemo as o,useEffect as a}from"react";import l from"prop-types";import s from"classnames";import{Table as u,Column as c,SortDirection as d}from"react-virtualized";import{withStyles as m,IconButton as h,Typography as f,Tooltip as g}from"@material-ui/core";import{Settings as p,Sort as b,ArrowUpward as y,ArrowDownward as w}from"@material-ui/icons";import{getUnitDisplay as S}from"../../utils/convert.js";function R(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,i=r.customUnit;return i?"(".concat(i,")"):n?"(".concat(S(n),")"):""}function x(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function v(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var C=function(l){var m=l.columns,S=l.data,C=l.useColumnSetting,_=l.useFixedColumnWidth,z=l.onOpenSettingDlg,k=l.classes,T=l.width,q=l.height,I=l.headerHeight,N=l.rowHeight,L=l.showTopSettingIcon,D=l.customMuiStyles,H=l.isTopSettingIconShownAlways,B=l.CustomCellRenderer,W=l.customRowStyle,O=l.sort,j=l.sortBy,A=l.sortDirection,F=e(e({},k),D),K=o((function(){return{label:"",key:"setting",width:C?25:0}}),[C]),V=o((function(){return m.filter((function(e){return e.show}))}),[m]),M=o((function(){return C?t(t([],V,!0),[K],!1):V}),[V,C,K]),E=o((function(){var e;if(T<=0)return{};var t=((e={})[K.key]=K.width,e),r=[];return V.filter((function(e){return Number.isFinite(e.width)})).forEach((function(e){t[e.key]=e.width-1,r.push(e.width-1)})),V.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(e){var n=r.reduce((function(e,t){return e+t}),0),i=Math.floor((T-n-K.width)/(V.length-r.length)),o=e.minWidth||65,a=i<o?o:i;t[e.key]=a-1,r.push(a-1)})),t}),[T,V,K]),G=o((function(){return Object.values(E).reduce((function(e,t){return e+t}),0)}),[E]),U=H||G-12.5>=T;a((function(){L(U)}),[U]);var P=function(t){var n=t.label,o=t.dataKey,a=j||A||O;return o===K.key?U?null:r(h,e({size:"small","aria-label":"customize columns",className:F.settingIcon,onClick:z},{children:r(p,{fontSize:"inherit"})})):i(f,e({variant:"body2",className:s(F.headerLabel,x(m,o))},{children:[n," ",r("span",e({className:s(F.unitLabel,v(m,o))},{children:R(m,o)})),a&&o!==j&&r(g,e({title:"Sort A-Z"},{children:r(b,{fontSize:"small",className:k.sortIcon})})),a&&o===j&&(A===d.ASC?r(y,{fontSize:"small",className:k.sortIcon}):r(w,{fontSize:"small",className:k.sortIcon}))]}))},Z=function(t){var n=t.dataKey,i=t.rowData;return B?r(B,{columnKey:n,value:i[n]}):r(f,e({variant:"body2",className:F.cellData},{children:i[n]}))};return r(n,{children:r(u,e({width:_?G:T,height:q,headerHeight:I,rowClassName:function(e){var t,r=e.index;return s(((t={})[F.oddRow]=r%2==1,t))},rowHeight:N,rowCount:S.length,rowGetter:function(e){var t=e.index;return S[t]},rowStyle:W||{},className:F.table,sort:O,sortBy:j,sortDirection:A},{children:M.map((function(e){return r(c,{width:E[e.key]||0,dataKey:e.key,label:e.label,headerRenderer:P,cellRenderer:Z},e.key)}))}))})},_={columns:l.arrayOf(l.shape({show:l.bool,minWidth:l.number,width:l.number,key:l.string,label:l.string})).isRequired,data:l.arrayOf(l.shape({})).isRequired,useColumnSetting:l.bool.isRequired,useFixedColumnWidth:l.bool.isRequired,headerHeight:l.number.isRequired,rowHeight:l.number.isRequired,width:l.number.isRequired,height:l.number.isRequired,onOpenSettingDlg:l.func.isRequired,showTopSettingIcon:l.func.isRequired,sort:l.func,sortBy:l.string,sortDirection:l.string,classes:l.shape({sortIcon:l.string}).isRequired,customMuiStyles:l.shape({table:l.string,oddRow:l.string,headerLabel:l.string,cellData:l.string,unitLabel:l.string,settingIcon:l.string}).isRequired,isTopSettingIconShownAlways:l.bool.isRequired,CustomCellRenderer:l.func,customRowStyle:l.func};C.propTypes=_,C.defaultProps={CustomCellRenderer:null,customRowStyle:null,sort:null,sortBy:null,sortDirection:null};var z=m((function(e){return{table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}))(C);export{C as VirtualizedTableComponent,z as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.48.0-9-test-674373bf",
3
+ "version": "0.49.0-0",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -86,7 +86,7 @@
86
86
  "@babel/plugin-transform-runtime": "^7.12.10",
87
87
  "@babel/preset-env": "^7.12.11",
88
88
  "@babel/preset-react": "^7.12.10",
89
- "@corva/dc-platform-shared": "0.1.7-2",
89
+ "@corva/dc-platform-shared": "0.1.7-3",
90
90
  "@corva/eslint-config-browser": "^0.0.4",
91
91
  "@date-io/moment": "1.3.13",
92
92
  "@material-ui/core": "4.11.2",
package/types.d.ts ADDED
@@ -0,0 +1,141 @@
1
+ /* eslint-disable camelcase */
2
+
3
+ declare module '*.css';
4
+
5
+ declare module '@corva/ui/clients' {
6
+ export type QueryParams = {
7
+ limit: number;
8
+ skip: number;
9
+ sort: string;
10
+ query: string;
11
+ fields?: string;
12
+ };
13
+
14
+ export type CollectionRecord<T> = {
15
+ _id: string;
16
+ version: number;
17
+ app_key: string;
18
+ asset_id: number;
19
+ company_id: number;
20
+ provider: string;
21
+ collection: string;
22
+ timestamp: number;
23
+ data: T;
24
+ };
25
+
26
+ function get<T>(url: string, params: QueryParams): Promise<CollectionRecord<T>[]>;
27
+
28
+ function post<T>(
29
+ url: string,
30
+ content: Omit<CollectionRecord<T>, '_id'>[]
31
+ ): Promise<{
32
+ failed_count: number;
33
+ inserted_ids: string[];
34
+ messages: string[];
35
+ }>;
36
+
37
+ function put<T>(url: string, content: T, params: QueryParams): Promise<T>;
38
+
39
+ function del(
40
+ url: string,
41
+ params: QueryParams
42
+ ): Promise<{
43
+ deleted_count: 0;
44
+ }>;
45
+
46
+ export const corvaDataAPI = {
47
+ get,
48
+ post,
49
+ put,
50
+ del,
51
+ };
52
+ }
53
+
54
+ declare module '@corva/ui/clients/jsonApi' {
55
+ export function getS3SignedUrl(
56
+ filename: string,
57
+ contentType: string,
58
+ assetId?: number | null
59
+ ): Promise<{
60
+ bucket: string;
61
+ display_name: string;
62
+ file_name: string;
63
+ signed_url: string;
64
+ }>;
65
+
66
+ export function getS3DownloadLink(filename: string): Promise<{
67
+ url: string;
68
+ }>;
69
+
70
+ export type TaskOptions<Properties, Payload> = {
71
+ provider: string;
72
+ app_key: string;
73
+ asset_id: number;
74
+ properties: Properties;
75
+ payload: Payload;
76
+ };
77
+
78
+ export enum TaskState {
79
+ Running = 'running',
80
+ Succeeded = 'succeeded',
81
+ Failed = 'failed'
82
+ }
83
+
84
+ export type TaskResponse = {
85
+ id: string;
86
+ name: string;
87
+ options: Record<string, unknown>;
88
+ type: 'task';
89
+ attributes: {
90
+ id: string;
91
+ state: TaskState
92
+ fail_reason: null;
93
+ asset_id: number;
94
+ company_id: number;
95
+ app_id: number;
96
+ document_bucket: string;
97
+ properties: Record<string, unknown>;
98
+ payload: Record<string, unknown>;
99
+ };
100
+ };
101
+
102
+ export function postTask<P>(options: TaskOptions<P>): Promise<TaskResponse>;
103
+ }
104
+
105
+ declare module '@corva/ui/utils' {
106
+ export function convertValue(
107
+ value: number,
108
+ unitType: string,
109
+ unitFrom: string,
110
+ unitTo?: string,
111
+ precision?: number
112
+ ): number;
113
+
114
+ function convertJsonToCsv<T>(records: T[], mapping: Partial<Record<keyof T, string>>): string;
115
+ function downloadFile(filename: string, csv: string): void;
116
+
117
+ export const csvExport = {
118
+ convertJsonToCsv,
119
+ downloadFile,
120
+ };
121
+ }
122
+
123
+ declare module '@corva/ui/components' {
124
+ import { FC } from 'react';
125
+ import { TabProps, TabsProps } from '@material-ui/core';
126
+
127
+ // corva components
128
+ type LoadingIndicatorProps = {
129
+ fullscreen?: boolean;
130
+ white?: boolean;
131
+ size?: number;
132
+ className?: string;
133
+ };
134
+ export const LoadingIndicator: FC<LoadingIndicatorProps>;
135
+
136
+ export const AppHeader: FC<any>;
137
+
138
+ // MUI Components
139
+ export const Tabs: FC<TabsProps>;
140
+ export const Tab: FC<TabProps>;
141
+ }