@quillsql/react 2.12.4 → 2.12.5
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/cjs/Chart.d.ts.map +1 -1
- package/dist/cjs/Chart.js +192 -74
- package/dist/cjs/ChartBuilder.d.ts +24 -1
- package/dist/cjs/ChartBuilder.d.ts.map +1 -1
- package/dist/cjs/ChartBuilder.js +22 -6
- package/dist/cjs/ChartEditor.d.ts.map +1 -1
- package/dist/cjs/ChartEditor.js +97 -41
- package/dist/cjs/Context.d.ts.map +1 -1
- package/dist/cjs/Context.js +2 -1
- package/dist/cjs/Dashboard.d.ts +22 -1
- package/dist/cjs/Dashboard.d.ts.map +1 -1
- package/dist/cjs/Dashboard.js +2 -2
- package/dist/cjs/ReportBuilder.d.ts.map +1 -1
- package/dist/cjs/ReportBuilder.js +34 -21
- package/dist/cjs/SQLEditor.d.ts.map +1 -1
- package/dist/cjs/SQLEditor.js +1 -1
- package/dist/cjs/Table.d.ts.map +1 -1
- package/dist/cjs/Table.js +1 -3
- package/dist/cjs/components/Dashboard/DataLoader.d.ts +9 -1
- package/dist/cjs/components/Dashboard/DataLoader.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/DataLoader.js +144 -114
- package/dist/cjs/components/Dashboard/TableComponent.d.ts +1 -1
- package/dist/cjs/components/Dashboard/TableComponent.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/TableComponent.js +29 -11
- package/dist/cjs/components/QuillTable.d.ts +15 -2
- package/dist/cjs/components/QuillTable.d.ts.map +1 -1
- package/dist/cjs/components/QuillTable.js +58 -29
- package/dist/cjs/components/UiComponents.d.ts +11 -1
- package/dist/cjs/components/UiComponents.d.ts.map +1 -1
- package/dist/cjs/components/UiComponents.js +48 -4
- package/dist/cjs/hooks/useExport.d.ts +2 -1
- package/dist/cjs/hooks/useExport.d.ts.map +1 -1
- package/dist/cjs/hooks/useExport.js +44 -9
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/cjs/utils/csv.d.ts.map +1 -1
- package/dist/cjs/utils/dashboard.d.ts.map +1 -1
- package/dist/cjs/utils/dashboard.js +2 -0
- package/dist/cjs/utils/pivotProcessing.d.ts +2 -6
- package/dist/cjs/utils/pivotProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/pivotProcessing.js +31 -28
- package/dist/cjs/utils/schema.d.ts.map +1 -1
- package/dist/cjs/utils/schema.js +4 -0
- package/dist/esm/Chart.d.ts.map +1 -1
- package/dist/esm/Chart.js +192 -74
- package/dist/esm/ChartBuilder.d.ts +24 -1
- package/dist/esm/ChartBuilder.d.ts.map +1 -1
- package/dist/esm/ChartBuilder.js +22 -6
- package/dist/esm/ChartEditor.d.ts.map +1 -1
- package/dist/esm/ChartEditor.js +98 -42
- package/dist/esm/Context.d.ts.map +1 -1
- package/dist/esm/Context.js +2 -1
- package/dist/esm/Dashboard.d.ts +22 -1
- package/dist/esm/Dashboard.d.ts.map +1 -1
- package/dist/esm/Dashboard.js +2 -2
- package/dist/esm/ReportBuilder.d.ts.map +1 -1
- package/dist/esm/ReportBuilder.js +37 -24
- package/dist/esm/SQLEditor.d.ts.map +1 -1
- package/dist/esm/SQLEditor.js +2 -2
- package/dist/esm/Table.d.ts.map +1 -1
- package/dist/esm/Table.js +1 -3
- package/dist/esm/components/Dashboard/DataLoader.d.ts +9 -1
- package/dist/esm/components/Dashboard/DataLoader.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/DataLoader.js +144 -114
- package/dist/esm/components/Dashboard/TableComponent.d.ts +1 -1
- package/dist/esm/components/Dashboard/TableComponent.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/TableComponent.js +30 -12
- package/dist/esm/components/QuillTable.d.ts +15 -2
- package/dist/esm/components/QuillTable.d.ts.map +1 -1
- package/dist/esm/components/QuillTable.js +58 -26
- package/dist/esm/components/UiComponents.d.ts +11 -1
- package/dist/esm/components/UiComponents.d.ts.map +1 -1
- package/dist/esm/components/UiComponents.js +47 -4
- package/dist/esm/hooks/useExport.d.ts +2 -1
- package/dist/esm/hooks/useExport.d.ts.map +1 -1
- package/dist/esm/hooks/useExport.js +44 -9
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/esm/utils/csv.d.ts.map +1 -1
- package/dist/esm/utils/dashboard.d.ts.map +1 -1
- package/dist/esm/utils/dashboard.js +2 -0
- package/dist/esm/utils/pivotProcessing.d.ts +2 -6
- package/dist/esm/utils/pivotProcessing.d.ts.map +1 -1
- package/dist/esm/utils/pivotProcessing.js +31 -28
- package/dist/esm/utils/schema.d.ts.map +1 -1
- package/dist/esm/utils/schema.js +4 -0
- package/package.json +1 -1
|
@@ -15,71 +15,101 @@ function DataLoader({ id, children, }) {
|
|
|
15
15
|
const { dashboardFilters } = (0, react_1.useContext)(Context_1.DashboardFiltersContext);
|
|
16
16
|
const [customFields] = (0, react_1.useContext)(Context_1.CustomFieldContext);
|
|
17
17
|
const [isLoading, setIsLoading] = (0, react_1.useState)(true);
|
|
18
|
+
const [isPaginationLoading, setIsPaginationLoading] = (0, react_1.useState)(true);
|
|
18
19
|
const [error, setError] = (0, react_1.useState)(undefined);
|
|
19
|
-
(0, react_1.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
const [previousPage, setPreviousPage] = (0, react_1.useState)(0);
|
|
21
|
+
const [additionalProcessing, setAdditionProcessing] = (0, react_1.useState)({
|
|
22
|
+
page: 0,
|
|
23
|
+
});
|
|
24
|
+
const onPageChange = (page) => {
|
|
25
|
+
if ((previousPage < page.currentPage &&
|
|
26
|
+
(page.currentPage * page.rowsPerPage) % 100 === 0) ||
|
|
27
|
+
(previousPage > page.currentPage &&
|
|
28
|
+
(previousPage * page.rowsPerPage) % 100 === 0)) {
|
|
29
|
+
getChartOptions({ page });
|
|
30
|
+
}
|
|
31
|
+
setPreviousPage(page.currentPage);
|
|
32
|
+
};
|
|
33
|
+
const onSortChange = (sort) => {
|
|
34
|
+
getChartOptions({ sort });
|
|
35
|
+
setPreviousPage(0);
|
|
36
|
+
};
|
|
37
|
+
const getChartOptions = async (processing) => {
|
|
38
|
+
setIsLoading(true);
|
|
39
|
+
if (!(0, Chart_1.didFiltersChange)(dashboard[id], dashboardFilters)) {
|
|
40
|
+
setIsLoading(false);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
let updatedProcessing = { ...additionalProcessing, ...processing };
|
|
45
|
+
if (processing && processing.sort) {
|
|
46
|
+
if (!updatedProcessing.page) {
|
|
47
|
+
updatedProcessing.page = {};
|
|
48
|
+
}
|
|
49
|
+
updatedProcessing.page.currentPage = 0;
|
|
25
50
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
delete newFilter['selectedValue'];
|
|
35
|
-
}
|
|
36
|
-
return newFilter;
|
|
37
|
-
})
|
|
38
|
-
: [];
|
|
39
|
-
const hostedBody = {
|
|
40
|
-
metadata: {
|
|
41
|
-
dashboardItemId: id,
|
|
42
|
-
orgId: client.customerId || '*',
|
|
43
|
-
clientId: client.publicKey,
|
|
44
|
-
task: 'item',
|
|
45
|
-
databaseType: client.databaseType,
|
|
46
|
-
filters: minimalFilters,
|
|
47
|
-
customFields,
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
const cloudBody = {
|
|
51
|
-
id: id,
|
|
52
|
-
filters: minimalFilters,
|
|
53
|
-
};
|
|
54
|
-
const resp = await (0, dataFetcher_1.getData)(client, 'itempost', 'omit', hostedBody, cloudBody);
|
|
55
|
-
(0, errorProcessing_1.processFilterErrorList)(resp);
|
|
56
|
-
if (resp && resp.name !== 'error' && !resp.errorMessage) {
|
|
57
|
-
if (resp.compareRows) {
|
|
58
|
-
(0, merge_1.mergeComparisonRange)(resp);
|
|
51
|
+
// Remove extra fields on each filter so we don't confuse the backend.
|
|
52
|
+
const minimalFilters = Object.values(dashboardFilters).length
|
|
53
|
+
? Object.values(dashboardFilters).map((filter) => {
|
|
54
|
+
const newFilter = { ...filter };
|
|
55
|
+
if (newFilter.filterType === 'date_range') {
|
|
56
|
+
delete newFilter['field'];
|
|
57
|
+
delete newFilter['options'];
|
|
58
|
+
delete newFilter['selectedValue'];
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
return newFilter;
|
|
61
|
+
})
|
|
62
|
+
: [];
|
|
63
|
+
const hostedBody = {
|
|
64
|
+
metadata: {
|
|
65
|
+
dashboardItemId: id,
|
|
66
|
+
orgId: client.customerId || '*',
|
|
67
|
+
clientId: client.publicKey,
|
|
68
|
+
task: 'item',
|
|
69
|
+
databaseType: client.databaseType,
|
|
70
|
+
filters: minimalFilters,
|
|
71
|
+
customFields,
|
|
72
|
+
paginateTable: true,
|
|
73
|
+
additionalProcessing: updatedProcessing,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
const cloudBody = {
|
|
77
|
+
id: id,
|
|
78
|
+
filters: minimalFilters,
|
|
79
|
+
};
|
|
80
|
+
const resp = await (0, dataFetcher_1.getData)(client, 'itempost', 'omit', hostedBody, cloudBody);
|
|
81
|
+
(0, errorProcessing_1.processFilterErrorList)(resp);
|
|
82
|
+
if (resp && resp.name !== 'error' && !resp.errorMessage) {
|
|
83
|
+
if (resp.compareRows) {
|
|
84
|
+
(0, merge_1.mergeComparisonRange)(resp);
|
|
72
85
|
}
|
|
73
|
-
|
|
86
|
+
dispatch({
|
|
87
|
+
type: 'UPDATE_DASHBOARD_ITEM',
|
|
88
|
+
id: id,
|
|
89
|
+
data: {
|
|
90
|
+
...resp,
|
|
91
|
+
filtersApplied: dashboardFilters,
|
|
92
|
+
id: resp._id,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
74
95
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
setError(e.message);
|
|
96
|
+
else {
|
|
97
|
+
setError(resp?.errorMessage);
|
|
78
98
|
}
|
|
99
|
+
setAdditionProcessing(updatedProcessing);
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
setIsLoading(false);
|
|
102
|
+
}, 200);
|
|
103
|
+
}
|
|
104
|
+
catch (e) {
|
|
105
|
+
console.log('Error fetching chart: ', e);
|
|
106
|
+
setError(e.message);
|
|
79
107
|
}
|
|
108
|
+
};
|
|
109
|
+
(0, react_1.useEffect)(() => {
|
|
80
110
|
getChartOptions();
|
|
81
111
|
}, [dashboardFilters, client, id]);
|
|
82
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children({ isLoading, error }) });
|
|
112
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children({ isLoading, error, onPageChange, onSortChange }) });
|
|
83
113
|
}
|
|
84
114
|
exports.default = DataLoader;
|
|
85
115
|
// The same data-loader pattern as above, but with special logic for charts
|
|
@@ -94,69 +124,69 @@ const ChartDataLoader = ({ id, children, hideDateRangeFilter = false, }) => {
|
|
|
94
124
|
const [client, _] = (0, react_1.useContext)(Context_1.ClientContext);
|
|
95
125
|
const [customFields] = (0, react_1.useContext)(Context_1.CustomFieldContext);
|
|
96
126
|
const theme = (0, hooks_1.useTheme)();
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
delete newFilter['selectedValue'];
|
|
116
|
-
}
|
|
117
|
-
return newFilter;
|
|
118
|
-
})
|
|
119
|
-
: [];
|
|
120
|
-
const hostedBody = {
|
|
121
|
-
metadata: {
|
|
122
|
-
dashboardItemId: id,
|
|
123
|
-
orgId: client.customerId || '*',
|
|
124
|
-
clientId: client.publicKey,
|
|
125
|
-
task: 'item',
|
|
126
|
-
databaseType: client.databaseType,
|
|
127
|
-
filters: minimalFilters,
|
|
128
|
-
customFields,
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
const cloudBody = {
|
|
132
|
-
id: id,
|
|
133
|
-
filters: minimalFilters,
|
|
134
|
-
};
|
|
135
|
-
setError(undefined);
|
|
136
|
-
const resp = await (0, dataFetcher_1.getData)(client, 'itempost', 'omit', hostedBody, cloudBody);
|
|
137
|
-
(0, errorProcessing_1.processFilterErrorList)(resp);
|
|
138
|
-
if (resp && resp.name !== 'error' && !resp.errorMessage) {
|
|
139
|
-
setIsComparison(!!resp.compareRows?.length);
|
|
140
|
-
if (resp.compareRows) {
|
|
141
|
-
(0, merge_1.mergeComparisonRange)(resp);
|
|
127
|
+
const getChartOptions = async () => {
|
|
128
|
+
setLoading(true);
|
|
129
|
+
if (!(0, Chart_1.didFiltersChange)(dashboard[id], dashboardFilters)) {
|
|
130
|
+
setLoading(false);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
// Remove extra fields on each filter so we don't confuse the backend.
|
|
135
|
+
const allowDateRange = !hideDateRangeFilter;
|
|
136
|
+
const minimalFilters = Object.values(dashboardFilters).length
|
|
137
|
+
? Object.values(dashboardFilters)
|
|
138
|
+
.filter((f) => allowDateRange || f.filterType !== 'date_range')
|
|
139
|
+
.map((filter) => {
|
|
140
|
+
const newFilter = { ...filter };
|
|
141
|
+
if (newFilter.filterType === 'date_range') {
|
|
142
|
+
delete newFilter['field'];
|
|
143
|
+
delete newFilter['options'];
|
|
144
|
+
delete newFilter['selectedValue'];
|
|
142
145
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
return newFilter;
|
|
147
|
+
})
|
|
148
|
+
: [];
|
|
149
|
+
const hostedBody = {
|
|
150
|
+
metadata: {
|
|
151
|
+
dashboardItemId: id,
|
|
152
|
+
orgId: client.customerId || '*',
|
|
153
|
+
clientId: client.publicKey,
|
|
154
|
+
task: 'item',
|
|
155
|
+
databaseType: client.databaseType,
|
|
156
|
+
filters: minimalFilters,
|
|
157
|
+
customFields,
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
const cloudBody = {
|
|
161
|
+
id: id,
|
|
162
|
+
filters: minimalFilters,
|
|
163
|
+
};
|
|
164
|
+
setError(undefined);
|
|
165
|
+
const resp = await (0, dataFetcher_1.getData)(client, 'itempost', 'omit', hostedBody, cloudBody);
|
|
166
|
+
(0, errorProcessing_1.processFilterErrorList)(resp);
|
|
167
|
+
if (resp && resp.name !== 'error' && !resp.errorMessage) {
|
|
168
|
+
setIsComparison(!!resp.compareRows?.length);
|
|
169
|
+
if (resp.compareRows) {
|
|
170
|
+
(0, merge_1.mergeComparisonRange)(resp);
|
|
152
171
|
}
|
|
153
|
-
|
|
172
|
+
const dashboardItem = { ...resp, filtersApplied: dashboardFilters };
|
|
173
|
+
dispatch({
|
|
174
|
+
type: 'UPDATE_DASHBOARD_ITEM',
|
|
175
|
+
id: id,
|
|
176
|
+
data: dashboardItem,
|
|
177
|
+
});
|
|
154
178
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
setLoading(false);
|
|
179
|
+
else {
|
|
180
|
+
setError(resp?.errorMessage);
|
|
158
181
|
}
|
|
182
|
+
setLoading(false);
|
|
183
|
+
}
|
|
184
|
+
catch (e) {
|
|
185
|
+
console.log('Error fetching chart: ', e);
|
|
186
|
+
setLoading(false);
|
|
159
187
|
}
|
|
188
|
+
};
|
|
189
|
+
(0, react_1.useEffect)(() => {
|
|
160
190
|
setInitialLoad(false);
|
|
161
191
|
getChartOptions();
|
|
162
192
|
}, [dashboardFilters, client, id]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { QuillReportProps } from '../../Dashboard';
|
|
3
|
-
export default function QuillTableComponent({ report, onClick, isLoading, error, }: QuillReportProps): JSX.Element;
|
|
3
|
+
export default function QuillTableComponent({ report, onClick, isLoading, error, onPageChange, onSortChange, }: QuillReportProps): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=TableComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/TableComponent.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"TableComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/TableComponent.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAInD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,YAAY,EACZ,YAAY,GACb,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAuLhC"}
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const csv_1 = require("../../utils/csv");
|
|
9
8
|
const QuillTable_1 = __importDefault(require("../QuillTable"));
|
|
10
9
|
const PivotModal_1 = require("../../internals/ReportBuilder/PivotModal");
|
|
11
10
|
const Context_1 = require("../../Context");
|
|
@@ -13,9 +12,17 @@ const valueFormatter_1 = require("../../utils/valueFormatter");
|
|
|
13
12
|
const ChartSkeleton_1 = __importDefault(require("../Chart/ChartSkeleton"));
|
|
14
13
|
const ChartError_1 = __importDefault(require("../Chart/ChartError"));
|
|
15
14
|
const hooks_1 = require("../../hooks");
|
|
16
|
-
|
|
15
|
+
const useExport_1 = require("../../hooks/useExport");
|
|
16
|
+
function QuillTableComponent({ report, onClick, isLoading, error, onPageChange, onSortChange, }) {
|
|
17
17
|
const theme = (0, hooks_1.useTheme)();
|
|
18
18
|
const { dashboardFilters } = (0, react_1.useContext)(Context_1.DashboardFiltersContext);
|
|
19
|
+
const [initialLoad, setInitialLoad] = (0, react_1.useState)(true);
|
|
20
|
+
const { downloadCSV } = (0, useExport_1.useExport)(report?.id);
|
|
21
|
+
(0, react_1.useEffect)(() => {
|
|
22
|
+
if (!isLoading) {
|
|
23
|
+
setInitialLoad(false);
|
|
24
|
+
}
|
|
25
|
+
}, [isLoading]);
|
|
19
26
|
const config = report;
|
|
20
27
|
const data = report;
|
|
21
28
|
const dateFilter = Object.values(dashboardFilters).find((filter) => filter.filterType == 'date_range');
|
|
@@ -66,6 +73,17 @@ function QuillTableComponent({ report, onClick, isLoading, error, }) {
|
|
|
66
73
|
return formattedRow;
|
|
67
74
|
}, {});
|
|
68
75
|
});
|
|
76
|
+
let numberOfRows = undefined;
|
|
77
|
+
if (data.compareRows &&
|
|
78
|
+
data.compareRows[0] &&
|
|
79
|
+
(data.compareRows[0].count || data.compareRows[0].COUNT)) {
|
|
80
|
+
if (data.compareRows[0].COUNT) {
|
|
81
|
+
numberOfRows = parseInt(data.compareRows[0].COUNT);
|
|
82
|
+
}
|
|
83
|
+
else if (data.compareRows[0].count) {
|
|
84
|
+
numberOfRows = parseInt(data.compareRows[0].count);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
69
87
|
return ((0, jsx_runtime_1.jsxs)("div", { style: { cursor: 'pointer' }, onClick: () => onClick && onClick(report), children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
70
88
|
display: 'flex',
|
|
71
89
|
flexDirection: 'row',
|
|
@@ -95,21 +113,21 @@ function QuillTableComponent({ report, onClick, isLoading, error, }) {
|
|
|
95
113
|
display: 'flex',
|
|
96
114
|
alignItems: 'center',
|
|
97
115
|
justifyContent: 'flex-end',
|
|
98
|
-
}, children: 'view report →' })) : null] }),
|
|
116
|
+
}, children: 'view report →' })) : null] }), initialLoad ? ((0, jsx_runtime_1.jsx)(ChartSkeleton_1.default, { containerStyle: {
|
|
99
117
|
width: '100%',
|
|
100
118
|
height: '400px',
|
|
101
119
|
} })) : error ? ((0, jsx_runtime_1.jsx)(ChartError_1.default, { containerStyle: {
|
|
102
120
|
width: '100%',
|
|
103
121
|
height: '400px',
|
|
104
|
-
} })) : ((0, jsx_runtime_1.jsx)(QuillTable_1.default, { rows: formattedRows ?? [], columns: columns ?? data.yAxisFields, rowsPerPage: 10, containerStyle: {
|
|
122
|
+
} })) : ((0, jsx_runtime_1.jsx)(QuillTable_1.default, { isLoading: isLoading, rows: formattedRows ?? [], numberOfRows: numberOfRows, columns: columns ?? data.yAxisFields, rowsPerPage: 10, containerStyle: {
|
|
105
123
|
width: '100%',
|
|
106
124
|
height: '400px',
|
|
107
|
-
},
|
|
108
|
-
(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} }))] }, report?.name));
|
|
125
|
+
}, downloadCSV: () => {
|
|
126
|
+
downloadCSV();
|
|
127
|
+
}, onPageChange: (page) => {
|
|
128
|
+
onPageChange && onPageChange(page);
|
|
129
|
+
}, onSortChange: (sort) => {
|
|
130
|
+
onSortChange && onSortChange(sort);
|
|
131
|
+
}, currentPage: data.page, sort: data.sort }))] }, report?.name));
|
|
114
132
|
}
|
|
115
133
|
exports.default = QuillTableComponent;
|
|
@@ -2,20 +2,33 @@ import React from 'react';
|
|
|
2
2
|
import { ButtonComponentProps } from './UiComponents';
|
|
3
3
|
export interface TableComponentProps {
|
|
4
4
|
rows: any[];
|
|
5
|
+
numberOfRows?: number;
|
|
5
6
|
columns: {
|
|
6
7
|
label: string;
|
|
7
8
|
field: string;
|
|
8
9
|
}[];
|
|
10
|
+
currentPage?: number;
|
|
11
|
+
sort?: {
|
|
12
|
+
field: string;
|
|
13
|
+
direction: string;
|
|
14
|
+
};
|
|
9
15
|
className?: string;
|
|
10
16
|
containerStyle?: React.CSSProperties;
|
|
11
17
|
isLoading?: boolean;
|
|
12
18
|
hideCSVDownloadButton?: boolean;
|
|
13
|
-
downloadFileName?: string;
|
|
14
19
|
downloadCSV?: () => void;
|
|
15
20
|
LoadingComponent?: () => JSX.Element;
|
|
16
21
|
DownloadCSVButtonComponent?: (props: ButtonComponentProps) => JSX.Element;
|
|
17
22
|
rowsPerPage?: number;
|
|
18
23
|
emptyStateLabel?: string;
|
|
24
|
+
onPageChange?: (page: {
|
|
25
|
+
currentPage: number;
|
|
26
|
+
rowsPerPage: number;
|
|
27
|
+
}) => void;
|
|
28
|
+
onSortChange?: (sort: {
|
|
29
|
+
field: string;
|
|
30
|
+
direction: string;
|
|
31
|
+
}) => void;
|
|
19
32
|
}
|
|
20
|
-
export default function QuillTable({ rows, columns, isLoading,
|
|
33
|
+
export default function QuillTable({ rows, numberOfRows, columns, isLoading, currentPage, sort, hideCSVDownloadButton, containerStyle, className, LoadingComponent, rowsPerPage, emptyStateLabel, downloadCSV, onPageChange, onSortChange, }: TableComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
21
34
|
//# sourceMappingURL=QuillTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuillTable.d.ts","sourceRoot":"","sources":["../../../src/components/QuillTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"QuillTable.d.ts","sourceRoot":"","sources":["../../../src/components/QuillTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAIxE,OAAO,EAAE,oBAAoB,EAAyB,MAAM,gBAAgB,CAAC;AAI7E,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,YAAY,C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2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const react_1 = require("react");
|
|
8
5
|
const valueFormatter_1 = require("../utils/valueFormatter");
|
|
9
6
|
const Context_1 = require("../Context");
|
|
10
|
-
const
|
|
11
|
-
function QuillTable({ rows, columns, isLoading, hideCSVDownloadButton = true,
|
|
7
|
+
const UiComponents_1 = require("./UiComponents");
|
|
8
|
+
function QuillTable({ rows, numberOfRows, columns, isLoading, currentPage, sort, hideCSVDownloadButton = true, containerStyle, className, LoadingComponent = UiComponents_1.QuillLoadingComponent, rowsPerPage = 10, emptyStateLabel = 'No results', downloadCSV, onPageChange, onSortChange, }) {
|
|
12
9
|
const [activeRows, setActiveRows] = (0, react_1.useState)([]);
|
|
13
|
-
const [
|
|
10
|
+
const [pageIndex, setPageIndex] = (0, react_1.useState)(currentPage || 0);
|
|
14
11
|
const [maxPage, setMaxPage] = (0, react_1.useState)(1);
|
|
15
|
-
const [sortColumn, setSortColumn] = (0, react_1.useState)('');
|
|
16
|
-
const [sortDirection, setSortDirection] = (0, react_1.useState)('desc');
|
|
12
|
+
const [sortColumn, setSortColumn] = (0, react_1.useState)(sort?.field || '');
|
|
13
|
+
const [sortDirection, setSortDirection] = (0, react_1.useState)(sort?.direction || 'desc');
|
|
17
14
|
const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
|
|
18
15
|
const [isPaginating, setIsPaginating] = (0, react_1.useState)(true);
|
|
16
|
+
const [initialLoad, setInitialLoad] = (0, react_1.useState)(isLoading);
|
|
17
|
+
const [currentLoad, setCurrentLoad] = (0, react_1.useState)(isLoading);
|
|
18
|
+
(0, react_1.useEffect)(() => {
|
|
19
|
+
setSortColumn(sort?.field || '');
|
|
20
|
+
setSortDirection(sort?.direction || 'desc');
|
|
21
|
+
}, [sort]);
|
|
19
22
|
(0, react_1.useEffect)(() => {
|
|
20
23
|
setIsPaginating(true);
|
|
24
|
+
const curInterval = pageIndex
|
|
25
|
+
? Math.floor(pageIndex / (100 / rowsPerPage)) * (100 / rowsPerPage)
|
|
26
|
+
: 0;
|
|
21
27
|
if (rows?.length === 0 && isLoading) {
|
|
22
28
|
return;
|
|
23
29
|
}
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
+
const start = (pageIndex - curInterval) * rowsPerPage;
|
|
31
|
+
const end = (pageIndex - curInterval + 1) * rowsPerPage;
|
|
32
|
+
if (numberOfRows) {
|
|
33
|
+
setMaxPage(Math.ceil(numberOfRows / rowsPerPage));
|
|
34
|
+
setActiveRows(rows.slice(start, end));
|
|
30
35
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
else {
|
|
37
|
+
const sortedRows = [...rows];
|
|
38
|
+
if (sortColumn) {
|
|
39
|
+
sortedRows.sort((a, b) => {
|
|
40
|
+
const result = (0, valueFormatter_1.compareValues)(a, b, sortColumn);
|
|
41
|
+
return sortDirection === 'asc' ? result : -result;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
34
44
|
setMaxPage(Math.ceil(sortedRows.length / rowsPerPage));
|
|
45
|
+
setActiveRows(sortedRows.slice(start, end));
|
|
35
46
|
}
|
|
36
|
-
setActiveRows(sortedRows.slice(start, end));
|
|
37
47
|
setIsPaginating(false);
|
|
38
|
-
|
|
48
|
+
setInitialLoad(false);
|
|
49
|
+
}, [pageIndex, rows, sortColumn, sortDirection, columns, numberOfRows]);
|
|
39
50
|
const increasePage = () => {
|
|
40
|
-
if (
|
|
51
|
+
if (pageIndex + 1 === maxPage) {
|
|
41
52
|
return;
|
|
42
53
|
}
|
|
43
|
-
|
|
54
|
+
setPageIndex((pageIndex) => pageIndex + 1);
|
|
55
|
+
onPageChange && onPageChange({ currentPage: pageIndex + 1, rowsPerPage });
|
|
44
56
|
};
|
|
45
57
|
const decreasePage = () => {
|
|
46
|
-
if (
|
|
58
|
+
if (pageIndex === 0) {
|
|
47
59
|
return;
|
|
48
60
|
}
|
|
49
|
-
|
|
61
|
+
setPageIndex((pageIndex) => pageIndex - 1);
|
|
62
|
+
onPageChange && onPageChange({ currentPage: pageIndex - 1, rowsPerPage });
|
|
50
63
|
};
|
|
51
64
|
const toggleSort = (column) => {
|
|
52
65
|
if (sortColumn === column.field) {
|
|
53
66
|
setSortDirection(sortDirection === 'asc' ? 'desc' : 'asc');
|
|
67
|
+
setPageIndex(0);
|
|
68
|
+
if (onSortChange) {
|
|
69
|
+
onSortChange({
|
|
70
|
+
field: column.field,
|
|
71
|
+
direction: sortDirection === 'asc' ? 'desc' : 'asc',
|
|
72
|
+
});
|
|
73
|
+
}
|
|
54
74
|
}
|
|
55
75
|
else {
|
|
56
76
|
setSortColumn(column.field);
|
|
57
77
|
setSortDirection('desc');
|
|
78
|
+
setPageIndex(0);
|
|
79
|
+
if (onSortChange) {
|
|
80
|
+
onSortChange({
|
|
81
|
+
field: column.field,
|
|
82
|
+
direction: 'desc',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
58
85
|
}
|
|
59
86
|
};
|
|
60
|
-
if (
|
|
87
|
+
if (initialLoad) {
|
|
61
88
|
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
62
89
|
height: '100%',
|
|
63
90
|
...containerStyle,
|
|
@@ -92,7 +119,9 @@ function QuillTable({ rows, columns, isLoading, hideCSVDownloadButton = true, do
|
|
|
92
119
|
minWidth: '100px',
|
|
93
120
|
boxSizing: 'border-box',
|
|
94
121
|
}, children: columns &&
|
|
95
|
-
columns.map((column, index) => ((0, jsx_runtime_1.jsxs)("div", { onClick: () =>
|
|
122
|
+
columns.map((column, index) => ((0, jsx_runtime_1.jsxs)("div", { onClick: () => {
|
|
123
|
+
toggleSort(column);
|
|
124
|
+
}, style: {
|
|
96
125
|
boxSizing: 'border-box',
|
|
97
126
|
flex: '150 0 auto',
|
|
98
127
|
minWidth: '50px',
|
|
@@ -134,10 +163,10 @@ function QuillTable({ rows, columns, isLoading, hideCSVDownloadButton = true, do
|
|
|
134
163
|
transform: sortDirection === 'desc'
|
|
135
164
|
? 'rotate(180deg)'
|
|
136
165
|
: undefined,
|
|
137
|
-
}, children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z", clipRule: "evenodd" }) }))] }, 'sqlcol' + index))) }) }), (activeRows && activeRows.length === 0) ||
|
|
166
|
+
}, children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z", clipRule: "evenodd" }) }))] }, 'sqlcol' + index))) }) }), (isPaginating || isLoading) && ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(LoadingComponent, {}) })), (activeRows && activeRows.length === 0) ||
|
|
138
167
|
(columns && columns.length === 0) ? ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
139
168
|
padding: '30px 0',
|
|
140
|
-
display: 'flex',
|
|
169
|
+
display: isPaginating || isLoading ? 'none' : 'flex',
|
|
141
170
|
flex: '1 0 auto',
|
|
142
171
|
margin: 'auto',
|
|
143
172
|
justifyContent: 'center',
|
|
@@ -146,7 +175,7 @@ function QuillTable({ rows, columns, isLoading, hideCSVDownloadButton = true, do
|
|
|
146
175
|
color: theme?.secondaryTextColor || 'rgb(55, 65, 81)',
|
|
147
176
|
}, children: emptyStateLabel })) : ((0, jsx_runtime_1.jsx)("div", { role: "rowgroup", className: "tbody", children: activeRows &&
|
|
148
177
|
activeRows.map((row, rowIndex) => ((0, jsx_runtime_1.jsx)("div", { role: "row", className: "tr", style: {
|
|
149
|
-
display: 'flex',
|
|
178
|
+
display: isPaginating || isLoading ? 'none' : 'flex',
|
|
150
179
|
flex: '1 0 auto',
|
|
151
180
|
minWidth: '100px',
|
|
152
181
|
boxSizing: 'border-box',
|
|
@@ -224,7 +253,7 @@ function QuillTable({ rows, columns, isLoading, hideCSVDownloadButton = true, do
|
|
|
224
253
|
fontSize: 12,
|
|
225
254
|
fontFamily: theme?.fontFamily,
|
|
226
255
|
color: theme?.primaryTextColor,
|
|
227
|
-
}, children: [
|
|
256
|
+
}, children: [pageIndex + 1, ' of ', maxPage] }), (0, jsx_runtime_1.jsx)("div", { style: { width: 8 } }), (0, jsx_runtime_1.jsx)("button", { onClick: decreasePage, style: {
|
|
228
257
|
cursor: 'pointer',
|
|
229
258
|
border: 'none',
|
|
230
259
|
background: 'transparent',
|
|
@@ -149,8 +149,18 @@ export interface TableComponentProps {
|
|
|
149
149
|
label: string;
|
|
150
150
|
}[];
|
|
151
151
|
isLoading?: boolean;
|
|
152
|
+
onPageChange?: (page: {
|
|
153
|
+
currentPage: number;
|
|
154
|
+
rowsPerPage: number;
|
|
155
|
+
}) => void;
|
|
156
|
+
onSortChange?: (sort: {
|
|
157
|
+
field: string;
|
|
158
|
+
direction: string;
|
|
159
|
+
}) => void;
|
|
160
|
+
numberOfRows?: number;
|
|
152
161
|
}
|
|
153
|
-
export declare const
|
|
162
|
+
export declare const QuillTableSQLEditorComponent: ({ rows, columns, isLoading, numberOfRows, onPageChange, onSortChange, }: TableComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
163
|
+
export declare const QuillTableComponent: ({ rows, columns, isLoading, numberOfRows, onPageChange, onSortChange, }: TableComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
154
164
|
export declare const QuillEmptyDashboardComponent: () => import("react/jsx-runtime").JSX.Element;
|
|
155
165
|
export declare const QuillChartBuilderInputRowContainer: ({ children, }: {
|
|
156
166
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiComponents.d.ts","sourceRoot":"","sources":["../../../src/components/UiComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,WAAW,EAEX,SAAS,
|
|
1
|
+
{"version":3,"file":"UiComponents.d.ts","sourceRoot":"","sources":["../../../src/components/UiComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,WAAW,EAEX,SAAS,EAOV,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CA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