@quillsql/react 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AddToDashboardModal.js +249 -369
- package/lib/AddToDashboardModal.js.map +1 -1
- package/lib/BarList.js +92 -109
- package/lib/BarList.js.map +1 -1
- package/lib/Chart.d.ts +0 -1
- package/lib/Chart.js +359 -419
- package/lib/Chart.js.map +1 -1
- package/lib/Context.d.ts +1 -2
- package/lib/Context.js +91 -85
- package/lib/Context.js.map +1 -1
- package/lib/Dashboard.js +181 -209
- package/lib/Dashboard.js.map +1 -1
- package/lib/DateRangePicker/Calendar.js +87 -91
- package/lib/DateRangePicker/Calendar.js.map +1 -1
- package/lib/DateRangePicker/DateRangePicker.js +70 -68
- package/lib/DateRangePicker/DateRangePicker.js.map +1 -1
- package/lib/DateRangePicker/DateRangePickerButton.js +46 -57
- package/lib/DateRangePicker/DateRangePickerButton.js.map +1 -1
- package/lib/DateRangePicker/dateRangePickerUtils.js +105 -99
- package/lib/DateRangePicker/dateRangePickerUtils.js.map +1 -1
- package/lib/DateRangePicker/index.js +8 -1
- package/lib/DateRangePicker/index.js.map +1 -1
- package/lib/PieChart.js +221 -225
- package/lib/PieChart.js.map +1 -1
- package/lib/QuillProvider.d.ts +1 -2
- package/lib/QuillProvider.js +8 -18
- package/lib/QuillProvider.js.map +1 -1
- package/lib/ReportBuilder.js +430 -526
- package/lib/ReportBuilder.js.map +1 -1
- package/lib/SQLEditor.js +182 -268
- package/lib/SQLEditor.js.map +1 -1
- package/lib/Table.js +208 -261
- package/lib/Table.js.map +1 -1
- package/lib/TableChart.js +76 -75
- package/lib/TableChart.js.map +1 -1
- package/lib/assets/ArrowDownHeadIcon.js +5 -28
- package/lib/assets/ArrowDownHeadIcon.js.map +1 -1
- package/lib/assets/ArrowDownIcon.js +5 -28
- package/lib/assets/ArrowDownIcon.js.map +1 -1
- package/lib/assets/ArrowDownRightIcon.js +5 -28
- package/lib/assets/ArrowDownRightIcon.js.map +1 -1
- package/lib/assets/ArrowLeftHeadIcon.js +5 -28
- package/lib/assets/ArrowLeftHeadIcon.js.map +1 -1
- package/lib/assets/ArrowRightHeadIcon.js +5 -28
- package/lib/assets/ArrowRightHeadIcon.js.map +1 -1
- package/lib/assets/ArrowRightIcon.js +5 -28
- package/lib/assets/ArrowRightIcon.js.map +1 -1
- package/lib/assets/ArrowUpHeadIcon.js +5 -28
- package/lib/assets/ArrowUpHeadIcon.js.map +1 -1
- package/lib/assets/ArrowUpIcon.js +5 -28
- package/lib/assets/ArrowUpIcon.js.map +1 -1
- package/lib/assets/ArrowUpRightIcon.js +5 -28
- package/lib/assets/ArrowUpRightIcon.js.map +1 -1
- package/lib/assets/CalendarIcon.js +5 -28
- package/lib/assets/CalendarIcon.js.map +1 -1
- package/lib/assets/DoubleArrowLeftHeadIcon.js +5 -28
- package/lib/assets/DoubleArrowLeftHeadIcon.js.map +1 -1
- package/lib/assets/DoubleArrowRightHeadIcon.js +5 -28
- package/lib/assets/DoubleArrowRightHeadIcon.js.map +1 -1
- package/lib/assets/ExclamationFilledIcon.js +5 -28
- package/lib/assets/ExclamationFilledIcon.js.map +1 -1
- package/lib/assets/LoadingSpinner.js +5 -28
- package/lib/assets/LoadingSpinner.js.map +1 -1
- package/lib/assets/SearchIcon.js +5 -28
- package/lib/assets/SearchIcon.js.map +1 -1
- package/lib/assets/XCircleIcon.js +5 -28
- package/lib/assets/XCircleIcon.js.map +1 -1
- package/lib/assets/index.js +38 -16
- package/lib/assets/index.js.map +1 -1
- package/lib/components/BigModal/BigModal.js +45 -43
- package/lib/components/BigModal/BigModal.js.map +1 -1
- package/lib/components/Dropdown/Dropdown.js +57 -53
- package/lib/components/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/Dropdown/DropdownItem.js +43 -40
- package/lib/components/Dropdown/DropdownItem.js.map +1 -1
- package/lib/components/Dropdown/index.js +10 -2
- package/lib/components/Dropdown/index.js.map +1 -1
- package/lib/components/Modal/Modal.js +45 -43
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/Modal/index.js +8 -1
- package/lib/components/Modal/index.js.map +1 -1
- package/lib/components/selectUtils.js +20 -15
- package/lib/components/selectUtils.js.map +1 -1
- package/lib/contexts/BaseColorContext.js +5 -3
- package/lib/contexts/BaseColorContext.js.map +1 -1
- package/lib/contexts/HoveredValueContext.js +5 -3
- package/lib/contexts/HoveredValueContext.js.map +1 -1
- package/lib/contexts/RootStylesContext.js +5 -3
- package/lib/contexts/RootStylesContext.js.map +1 -1
- package/lib/contexts/SelectedValueContext.js +5 -3
- package/lib/contexts/SelectedValueContext.js.map +1 -1
- package/lib/contexts/index.js +14 -4
- package/lib/contexts/index.js.map +1 -1
- package/lib/hooks/index.js +14 -4
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useInternalState.js +9 -7
- package/lib/hooks/useInternalState.js.map +1 -1
- package/lib/hooks/useOnClickOutside.js +8 -6
- package/lib/hooks/useOnClickOutside.js.map +1 -1
- package/lib/hooks/useOnWindowResize.js +9 -7
- package/lib/hooks/useOnWindowResize.js.map +1 -1
- package/lib/hooks/useQuill.js +60 -111
- package/lib/hooks/useQuill.js.map +1 -1
- package/lib/hooks/useSelectOnKeyDown.js +17 -15
- package/lib/hooks/useSelectOnKeyDown.js.map +1 -1
- package/lib/index.js +22 -8
- package/lib/index.js.map +1 -1
- package/lib/lib/font.d.ts +13 -0
- package/lib/lib/font.js +17 -0
- package/lib/lib/font.js.map +1 -0
- package/lib/lib/index.d.ts +3 -0
- package/lib/lib/index.js +20 -0
- package/lib/lib/index.js.map +1 -0
- package/lib/lib/inputTypes.d.ts +20 -0
- package/lib/lib/inputTypes.js +57 -0
- package/lib/lib/inputTypes.js.map +1 -0
- package/lib/lib/utils.d.ts +9 -0
- package/lib/lib/utils.js +46 -0
- package/lib/lib/utils.js.map +1 -0
- package/package.json +6 -13
- package/src/AddToDashboardModal.tsx +2 -9
- package/src/Chart.tsx +49 -20
- package/src/Context.tsx +0 -3
- package/src/Dashboard.tsx +2 -3
- package/src/PieChart.tsx +2 -2
- package/src/QuillProvider.tsx +0 -3
- package/src/ReportBuilder.tsx +3 -9
- package/src/SQLEditor.tsx +99 -12
- package/src/Table.tsx +51 -8
- package/src/hooks/useQuill.ts +1 -2
- package/src/lib/font.ts +14 -0
- package/src/lib/index.ts +3 -0
- package/src/lib/inputTypes.ts +81 -0
- package/src/lib/utils.tsx +46 -0
- package/tsconfig.json +3 -3
- package/rollup.config.ts +0 -21
package/lib/ReportBuilder.js
CHANGED
|
@@ -1,73 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
-
function step(op) {
|
|
26
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
-
switch (op[0]) {
|
|
31
|
-
case 0: case 1: t = op; break;
|
|
32
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
-
default:
|
|
36
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
-
if (t[2]) _.ops.pop();
|
|
41
|
-
_.trys.pop(); continue;
|
|
42
|
-
}
|
|
43
|
-
op = body.call(thisArg, _);
|
|
44
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
47
4
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
ar[i] = from[i];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
56
|
-
};
|
|
57
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
58
|
-
import { useState, useContext, useCallback, useEffect } from 'react';
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPostgresBasicType = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
59
9
|
// import './nightOwlLight.css';
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
function QuillModal(
|
|
66
|
-
var children = _a.children, isOpen = _a.isOpen, onClose = _a.onClose, title = _a.title, theme = _a.theme;
|
|
10
|
+
const axios_1 = __importDefault(require("axios"));
|
|
11
|
+
const Context_1 = require("./Context");
|
|
12
|
+
const solid_1 = require("@heroicons/react/20/solid");
|
|
13
|
+
const SQLEditor_1 = require("./SQLEditor");
|
|
14
|
+
const date_fns_1 = require("date-fns");
|
|
15
|
+
function QuillModal({ children, isOpen, onClose, title, theme }) {
|
|
67
16
|
if (!isOpen) {
|
|
68
17
|
return null;
|
|
69
18
|
}
|
|
70
|
-
return (
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
71
20
|
position: 'absolute',
|
|
72
21
|
top: 45,
|
|
73
22
|
minWidth: 300,
|
|
@@ -80,134 +29,99 @@ function QuillModal(_a) {
|
|
|
80
29
|
borderWidth: theme.borderWidth,
|
|
81
30
|
borderStyle: 'solid',
|
|
82
31
|
borderColor: theme.borderColor,
|
|
83
|
-
}
|
|
32
|
+
}, children: children }));
|
|
84
33
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
orgId: customerId,
|
|
108
|
-
publicKey: publicKey,
|
|
109
|
-
},
|
|
110
|
-
headers: {
|
|
111
|
-
Authorization: "Bearer ",
|
|
112
|
-
environment: environment || undefined,
|
|
113
|
-
},
|
|
114
|
-
})];
|
|
115
|
-
case 1:
|
|
116
|
-
response = _a.sent();
|
|
117
|
-
setData(response.data.rows);
|
|
118
|
-
_a.label = 2;
|
|
119
|
-
case 2: return [2 /*return*/];
|
|
120
|
-
}
|
|
34
|
+
function ReportBuilder({ onChangeQuery, onChangeData, onChangeColumns, onChangeLoading, onError, SelectComponent, ButtonComponent, ModalComponent, ModalTriggerComponent, TextInputComponent, tagStyle, }) {
|
|
35
|
+
const [data, setData] = (0, react_1.useState)([]);
|
|
36
|
+
const [client] = (0, react_1.useContext)(Context_1.ClientContext);
|
|
37
|
+
const [schema, setSchema] = (0, react_1.useContext)(Context_1.SchemaContext);
|
|
38
|
+
const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
|
|
39
|
+
const [columns, setColumns] = (0, react_1.useState)([]);
|
|
40
|
+
const [fields, setFields] = (0, react_1.useState)([]);
|
|
41
|
+
(0, react_1.useEffect)(() => {
|
|
42
|
+
async function getData(schema) {
|
|
43
|
+
if (schema.length && !data.length) {
|
|
44
|
+
const { publicKey, customerId, environment } = client;
|
|
45
|
+
const response = await axios_1.default.post(`https://quill-344421.uc.r.appspot.com/dashquery`, {
|
|
46
|
+
query: `select * from ${schema[0].displayName} limit 10;`,
|
|
47
|
+
}, {
|
|
48
|
+
params: {
|
|
49
|
+
orgId: customerId,
|
|
50
|
+
publicKey,
|
|
51
|
+
},
|
|
52
|
+
headers: {
|
|
53
|
+
Authorization: `Bearer `,
|
|
54
|
+
environment: environment || undefined,
|
|
55
|
+
},
|
|
121
56
|
});
|
|
122
|
-
|
|
57
|
+
setData(response.data.rows);
|
|
58
|
+
}
|
|
123
59
|
}
|
|
124
60
|
getData(schema);
|
|
125
61
|
}, [schema]);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
function getSchema() {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return [4 /*yield*/, axios.get("https://quill-344421.uc.r.appspot.com/schema2/".concat(publicKey, "/"), {
|
|
136
|
-
headers: {
|
|
137
|
-
Authorization: "Bearer ",
|
|
138
|
-
environment: environment || undefined,
|
|
139
|
-
},
|
|
140
|
-
})];
|
|
141
|
-
case 1:
|
|
142
|
-
response3 = _a.sent();
|
|
143
|
-
if (isSubscribed) {
|
|
144
|
-
setSchema(response3.data.tables);
|
|
145
|
-
}
|
|
146
|
-
return [2 /*return*/];
|
|
147
|
-
}
|
|
148
|
-
});
|
|
62
|
+
(0, react_1.useEffect)(() => {
|
|
63
|
+
let isSubscribed = true;
|
|
64
|
+
async function getSchema() {
|
|
65
|
+
const { publicKey, environment } = client;
|
|
66
|
+
const response3 = await axios_1.default.get(`https://quill-344421.uc.r.appspot.com/schema2/${publicKey}/`, {
|
|
67
|
+
headers: {
|
|
68
|
+
Authorization: `Bearer `,
|
|
69
|
+
environment: environment || undefined,
|
|
70
|
+
},
|
|
149
71
|
});
|
|
72
|
+
if (isSubscribed) {
|
|
73
|
+
setSchema(response3.data.tables);
|
|
74
|
+
}
|
|
150
75
|
}
|
|
151
76
|
if (isSubscribed) {
|
|
152
77
|
getSchema();
|
|
153
78
|
}
|
|
154
|
-
return
|
|
79
|
+
return () => {
|
|
155
80
|
isSubscribed = false;
|
|
156
81
|
};
|
|
157
82
|
}, []);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
setData(response.data.rows);
|
|
195
|
-
onChangeData(response.data.rows);
|
|
196
|
-
setColumns(response.data.fields.map(function (elem) { return convertPostgresColumn(elem); }));
|
|
197
|
-
onChangeColumns(response.data.fields.map(function (elem) { return convertPostgresColumn(elem); }));
|
|
198
|
-
setFields(response.data.fields);
|
|
199
|
-
return [2 /*return*/];
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}); };
|
|
83
|
+
const runQuery = async (query) => {
|
|
84
|
+
const { publicKey, customerId, environment, queryEndpoint, queryHeaders } = client;
|
|
85
|
+
let response;
|
|
86
|
+
if (queryEndpoint) {
|
|
87
|
+
response = await axios_1.default.post(queryEndpoint, { metadata: { query, task: 'query' } }, { headers: queryHeaders });
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
response = await axios_1.default.post(`https://quill-344421.uc.r.appspot.com/dashquery`, {
|
|
91
|
+
query,
|
|
92
|
+
}, {
|
|
93
|
+
params: {
|
|
94
|
+
orgId: customerId,
|
|
95
|
+
publicKey,
|
|
96
|
+
},
|
|
97
|
+
headers: {
|
|
98
|
+
Authorization: `Bearer `,
|
|
99
|
+
environment: environment || undefined,
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (response && response.data && response.data.errorMessage) {
|
|
104
|
+
onError(response.data.errorMessage);
|
|
105
|
+
setData([]);
|
|
106
|
+
onChangeData([]);
|
|
107
|
+
setColumns([]);
|
|
108
|
+
onChangeColumns([]);
|
|
109
|
+
setFields([]);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
setData(response.data.rows);
|
|
113
|
+
onChangeData(response.data.rows);
|
|
114
|
+
setColumns(response.data.fields.map(elem => (0, SQLEditor_1.convertPostgresColumn)(elem)));
|
|
115
|
+
onChangeColumns(response.data.fields.map(elem => (0, SQLEditor_1.convertPostgresColumn)(elem)));
|
|
116
|
+
setFields(response.data.fields);
|
|
117
|
+
};
|
|
203
118
|
if (!schema.length) {
|
|
204
119
|
return null;
|
|
205
120
|
}
|
|
206
|
-
return (
|
|
121
|
+
return ((0, jsx_runtime_1.jsx)(ReportingTool, { theme: theme, data: data, schema: schema, onChangeQuery: onChangeQuery, runQuery: runQuery, SelectComponent: SelectComponent
|
|
207
122
|
? SelectComponent
|
|
208
|
-
:
|
|
209
|
-
|
|
210
|
-
return (_jsx("select", __assign({ onChange: function (event) { return onChange(event.target.value); }, value: value, id: 'reportbuilderdropdown', style: {
|
|
123
|
+
: ({ onChange, value, options }) => {
|
|
124
|
+
return ((0, jsx_runtime_1.jsx)("select", { onChange: event => onChange(event.target.value), value: value, id: 'reportbuilderdropdown', style: {
|
|
211
125
|
width: '100%',
|
|
212
126
|
minWidth: 230,
|
|
213
127
|
outline: 'none',
|
|
@@ -225,12 +139,11 @@ export default function ReportBuilder(_a) {
|
|
|
225
139
|
color: theme.primaryTextColor,
|
|
226
140
|
boxShadow: '0 1px 2px 0 rgba(0,0,0,.05)',
|
|
227
141
|
fontFamily: theme.fontFamily,
|
|
228
|
-
}
|
|
142
|
+
}, children: options.map((option, index) => ((0, jsx_runtime_1.jsx)("option", { value: option.value, children: option.label }, option.label + index))) }));
|
|
229
143
|
}, ButtonComponent: ButtonComponent
|
|
230
144
|
? ButtonComponent
|
|
231
|
-
:
|
|
232
|
-
|
|
233
|
-
return (_jsx("div", __assign({ style: {
|
|
145
|
+
: ({ onClick, label }) => {
|
|
146
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
234
147
|
height: 32,
|
|
235
148
|
background: theme.primaryButtonColor,
|
|
236
149
|
borderWidth: theme.borderWidth,
|
|
@@ -244,17 +157,15 @@ export default function ReportBuilder(_a) {
|
|
|
244
157
|
cursor: 'pointer',
|
|
245
158
|
fontFamily: theme.fontFamily,
|
|
246
159
|
fontWeight: theme.buttonFontWeight || 600,
|
|
247
|
-
}, onClick: onClick
|
|
160
|
+
}, onClick: onClick, children: label }));
|
|
248
161
|
}, ModalComponent: ModalComponent
|
|
249
162
|
? ModalComponent
|
|
250
|
-
:
|
|
251
|
-
|
|
252
|
-
return (_jsx(QuillModal, __assign({ isOpen: isOpen, theme: theme, onClose: onClose, title: title }, { children: children })));
|
|
163
|
+
: ({ children, isOpen, onClose, title }) => {
|
|
164
|
+
return ((0, jsx_runtime_1.jsx)(QuillModal, { isOpen: isOpen, theme: theme, onClose: onClose, title: title, children: children }));
|
|
253
165
|
}, ModalTriggerComponent: ModalTriggerComponent
|
|
254
166
|
? ModalTriggerComponent
|
|
255
|
-
:
|
|
256
|
-
|
|
257
|
-
return (_jsx("div", __assign({ style: {
|
|
167
|
+
: ({ onClick, label }) => {
|
|
168
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
258
169
|
height: 32,
|
|
259
170
|
background: theme.backgroundColor,
|
|
260
171
|
borderWidth: theme.borderWidth,
|
|
@@ -273,12 +184,11 @@ export default function ReportBuilder(_a) {
|
|
|
273
184
|
color: theme.primaryTextColor,
|
|
274
185
|
fontWeight: theme.buttonFontWeight || 600,
|
|
275
186
|
fontFamily: theme.fontFamily,
|
|
276
|
-
}, onClick: onClick
|
|
187
|
+
}, onClick: onClick, children: label }));
|
|
277
188
|
}, TextInputComponent: TextInputComponent
|
|
278
189
|
? TextInputComponent
|
|
279
|
-
:
|
|
280
|
-
|
|
281
|
-
return (_jsx("input", { style: {
|
|
190
|
+
: ({ onChange, value, id }) => {
|
|
191
|
+
return ((0, jsx_runtime_1.jsx)("input", { style: {
|
|
282
192
|
outline: 'none',
|
|
283
193
|
textAlign: 'left',
|
|
284
194
|
whiteSpace: 'nowrap',
|
|
@@ -298,8 +208,9 @@ export default function ReportBuilder(_a) {
|
|
|
298
208
|
}, id: id, onChange: onChange, value: value }));
|
|
299
209
|
}, tagStyle: tagStyle }));
|
|
300
210
|
}
|
|
301
|
-
|
|
302
|
-
|
|
211
|
+
exports.default = ReportBuilder;
|
|
212
|
+
function getPostgresBasicType(column) {
|
|
213
|
+
let format;
|
|
303
214
|
// first check if column.dataTypeID exists
|
|
304
215
|
if (column.dataTypeID) {
|
|
305
216
|
switch (column.dataTypeID) {
|
|
@@ -346,13 +257,12 @@ export function getPostgresBasicType(column) {
|
|
|
346
257
|
}
|
|
347
258
|
return format;
|
|
348
259
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
var _e = useState({
|
|
260
|
+
exports.getPostgresBasicType = getPostgresBasicType;
|
|
261
|
+
function ReportingTool({ schema, data, runQuery, SelectComponent, ButtonComponent, onChangeQuery, theme, ModalComponent, ModalTriggerComponent, TextInputComponent, tagStyle, }) {
|
|
262
|
+
const [selectedTable, setSelectedTable] = (0, react_1.useState)(schema[0]);
|
|
263
|
+
const [selectedColumn, setSelectedColumn] = (0, react_1.useState)(schema[0].columns[0]);
|
|
264
|
+
const [filters, setFilters] = (0, react_1.useState)([]);
|
|
265
|
+
const [AST, setAST] = (0, react_1.useState)({
|
|
356
266
|
with: null,
|
|
357
267
|
type: 'select',
|
|
358
268
|
options: null,
|
|
@@ -366,39 +276,40 @@ function ReportingTool(_a) {
|
|
|
366
276
|
orderby: null,
|
|
367
277
|
limit: { seperator: '', value: [] },
|
|
368
278
|
window: null,
|
|
369
|
-
})
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
279
|
+
});
|
|
280
|
+
const [numberStart, setNumberStart] = (0, react_1.useState)(0);
|
|
281
|
+
const [numberEnd, setNumberEnd] = (0, react_1.useState)(0);
|
|
282
|
+
const [dateStart, setDateStart] = (0, react_1.useState)('');
|
|
283
|
+
const [dateEnd, setDateEnd] = (0, react_1.useState)('');
|
|
284
|
+
const [computedColumns, setComputedColumns] = (0, react_1.useState)({});
|
|
285
|
+
const [stringFilterValues, setStringFilterValues] = (0, react_1.useState)([]);
|
|
286
|
+
const [columnType, setColumnType] = (0, react_1.useState)(getPostgresBasicType(schema[0].columns[0]));
|
|
287
|
+
const [sqlQuery, setSqlQuery] = (0, react_1.useState)('');
|
|
378
288
|
// month | week | day | quarter
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
289
|
+
const [dateBucket, setDateBucket] = (0, react_1.useState)('month');
|
|
290
|
+
const [indexBeingEdited, setIndexBeingEdited] = (0, react_1.useState)(-1);
|
|
291
|
+
const [groupBys, setGroupBys] = (0, react_1.useState)([]);
|
|
292
|
+
const [aggregations, setAggregations] = (0, react_1.useState)([]);
|
|
293
|
+
const [selectedGroupByColumn, setSelectedGroupByColumn] = (0, react_1.useState)(schema[0].columns[0]);
|
|
294
|
+
const [groupByColumnType, setGroupByColumnType] = (0, react_1.useState)(getPostgresBasicType(schema[0].columns[0]));
|
|
295
|
+
const [selectedSortByColumn, setSelectedSortByColumn] = (0, react_1.useState)(schema[0].columns[0].name);
|
|
296
|
+
const [sortBys, setSortBys] = (0, react_1.useState)([]);
|
|
297
|
+
const [selectedSortByDirection, setSelectedSortByDirection] = (0, react_1.useState)('ascending');
|
|
298
|
+
const [groupByIndexBeingEdited, setGroupByIndexBeingEdited] = (0, react_1.useState)(-1);
|
|
299
|
+
const [sortByIndexBeingEdited, setSortByIndexBeingEdited] = (0, react_1.useState)(-1);
|
|
300
|
+
const [sortableColumns, setSortableColumns] = (0, react_1.useState)(schema[0].columns.map(col => col.name));
|
|
301
|
+
const addGroupBy = () => {
|
|
392
302
|
if (selectedGroupByColumn && groupByColumnType) {
|
|
393
303
|
if (groupByColumnType === 'string') {
|
|
394
|
-
setGroupBys(
|
|
395
|
-
return
|
|
304
|
+
setGroupBys(groupBys => {
|
|
305
|
+
return [
|
|
306
|
+
...groupBys,
|
|
396
307
|
{
|
|
397
308
|
column: selectedGroupByColumn.name,
|
|
398
309
|
columnType: groupByColumnType,
|
|
399
310
|
tag: selectedGroupByColumn.name,
|
|
400
311
|
},
|
|
401
|
-
]
|
|
312
|
+
];
|
|
402
313
|
});
|
|
403
314
|
return;
|
|
404
315
|
}
|
|
@@ -407,55 +318,59 @@ function ReportingTool(_a) {
|
|
|
407
318
|
return;
|
|
408
319
|
}
|
|
409
320
|
else if (groupByColumnType === 'date') {
|
|
410
|
-
setGroupBys(
|
|
411
|
-
return
|
|
321
|
+
setGroupBys(groupBys => {
|
|
322
|
+
return [
|
|
323
|
+
...groupBys,
|
|
412
324
|
{
|
|
413
325
|
column: selectedGroupByColumn.name,
|
|
414
326
|
columnType: groupByColumnType,
|
|
415
327
|
bucket: dateBucket,
|
|
416
328
|
tag: dateBucket,
|
|
417
329
|
},
|
|
418
|
-
]
|
|
330
|
+
];
|
|
419
331
|
});
|
|
420
332
|
return;
|
|
421
333
|
}
|
|
422
334
|
}
|
|
423
335
|
};
|
|
424
|
-
|
|
425
|
-
setSortBys(
|
|
426
|
-
return
|
|
336
|
+
const addSortBy = () => {
|
|
337
|
+
setSortBys(sortBys => {
|
|
338
|
+
return [
|
|
339
|
+
...sortBys,
|
|
427
340
|
{
|
|
428
341
|
column: selectedSortByColumn,
|
|
429
342
|
direction: selectedSortByDirection,
|
|
430
343
|
},
|
|
431
|
-
]
|
|
344
|
+
];
|
|
432
345
|
});
|
|
433
346
|
};
|
|
434
|
-
|
|
435
|
-
setSortBys(
|
|
436
|
-
|
|
347
|
+
const removeSortBy = index => {
|
|
348
|
+
setSortBys(oldSortBys => {
|
|
349
|
+
const newSortBys = [...oldSortBys];
|
|
437
350
|
newSortBys.splice(index, 1);
|
|
438
351
|
return newSortBys;
|
|
439
352
|
});
|
|
440
353
|
setSortByIndexBeingEdited(-1);
|
|
441
354
|
};
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
setSortBys(
|
|
445
|
-
|
|
355
|
+
const removeGroupBy = index => {
|
|
356
|
+
const columnBeingDeleted = groupBys[index].tag;
|
|
357
|
+
setSortBys(oldSortBys => {
|
|
358
|
+
const newSortBys = [
|
|
359
|
+
...oldSortBys.filter(sortBy => sortBy.column !== columnBeingDeleted),
|
|
360
|
+
];
|
|
446
361
|
return newSortBys;
|
|
447
362
|
});
|
|
448
|
-
setGroupBys(
|
|
449
|
-
|
|
363
|
+
setGroupBys(oldGroupBys => {
|
|
364
|
+
const newGroupBys = [...oldGroupBys];
|
|
450
365
|
newGroupBys.splice(index, 1);
|
|
451
366
|
return newGroupBys;
|
|
452
367
|
});
|
|
453
368
|
setGroupByIndexBeingEdited(-1);
|
|
454
369
|
};
|
|
455
|
-
|
|
370
|
+
const updateSortBy = index => {
|
|
456
371
|
if (selectedSortByColumn && selectedSortByDirection) {
|
|
457
|
-
setSortBys(
|
|
458
|
-
|
|
372
|
+
setSortBys(sortBys => {
|
|
373
|
+
const newSortBys = [...sortBys];
|
|
459
374
|
newSortBys[index] = {
|
|
460
375
|
column: selectedSortByColumn,
|
|
461
376
|
direction: selectedSortByDirection,
|
|
@@ -466,16 +381,16 @@ function ReportingTool(_a) {
|
|
|
466
381
|
return;
|
|
467
382
|
}
|
|
468
383
|
};
|
|
469
|
-
|
|
384
|
+
(0, react_1.useEffect)(() => {
|
|
470
385
|
setColumnType(getPostgresBasicType(selectedColumn));
|
|
471
386
|
// console.log("WTF: ", selectedColumn);
|
|
472
387
|
}, [selectedColumn]);
|
|
473
|
-
|
|
388
|
+
(0, react_1.useEffect)(() => {
|
|
474
389
|
setGroupByColumnType(getPostgresBasicType(selectedGroupByColumn));
|
|
475
390
|
}, [selectedGroupByColumn]);
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
391
|
+
const selectFilter = index => {
|
|
392
|
+
const filter = filters[index];
|
|
393
|
+
const matchingColumn = selectedTable.columns.find(column => column.name === filter.column);
|
|
479
394
|
setSelectedColumn(matchingColumn);
|
|
480
395
|
if (filter.columnType === 'string') {
|
|
481
396
|
setStringFilterValues(filter.stringFilterValues);
|
|
@@ -492,34 +407,36 @@ function ReportingTool(_a) {
|
|
|
492
407
|
setIndexBeingEdited(index);
|
|
493
408
|
}
|
|
494
409
|
};
|
|
495
|
-
|
|
496
|
-
|
|
410
|
+
const selectSortBy = index => {
|
|
411
|
+
const sortBy = sortBys[index];
|
|
497
412
|
setSelectedSortByColumn(sortBy.column);
|
|
498
413
|
setSelectedSortByDirection(sortBy.direction);
|
|
499
414
|
setSortByIndexBeingEdited(index);
|
|
500
415
|
};
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
416
|
+
const selectGroupBy = index => {
|
|
417
|
+
const groupBy = groupBys[index];
|
|
418
|
+
const matchingColumn = selectedTable.columns.find(column => column.name === groupBy.column);
|
|
504
419
|
setSelectedGroupByColumn(matchingColumn);
|
|
505
420
|
if (groupBy.bucket) {
|
|
506
421
|
setDateBucket(groupBy.bucket);
|
|
507
422
|
}
|
|
508
423
|
setGroupByIndexBeingEdited(index);
|
|
509
424
|
};
|
|
510
|
-
|
|
425
|
+
const updateGroupBy = index => {
|
|
511
426
|
if (selectedGroupByColumn && groupByColumnType) {
|
|
512
427
|
// if column changed, then auto delete the sort using that column
|
|
513
|
-
|
|
428
|
+
const columnBeingDeleted = selectedGroupByColumn.name !== groupBys[index].column
|
|
514
429
|
? groupBys[index].tag
|
|
515
430
|
: 'nocolumnbeingdeleted';
|
|
516
|
-
setSortBys(
|
|
517
|
-
|
|
431
|
+
setSortBys(oldSortBys => {
|
|
432
|
+
const newSortBys = [
|
|
433
|
+
...oldSortBys.filter(sortBy => sortBy.column !== columnBeingDeleted),
|
|
434
|
+
];
|
|
518
435
|
return newSortBys;
|
|
519
436
|
});
|
|
520
437
|
if (groupByColumnType === 'date') {
|
|
521
|
-
setGroupBys(
|
|
522
|
-
|
|
438
|
+
setGroupBys(groupBys => {
|
|
439
|
+
const newGroupBys = [...groupBys];
|
|
523
440
|
newGroupBys[index] = {
|
|
524
441
|
column: selectedGroupByColumn.name,
|
|
525
442
|
columnType: groupByColumnType,
|
|
@@ -530,8 +447,8 @@ function ReportingTool(_a) {
|
|
|
530
447
|
});
|
|
531
448
|
}
|
|
532
449
|
else {
|
|
533
|
-
setGroupBys(
|
|
534
|
-
|
|
450
|
+
setGroupBys(groupBys => {
|
|
451
|
+
const newGroupBys = [...groupBys];
|
|
535
452
|
newGroupBys[index] = {
|
|
536
453
|
column: selectedGroupByColumn.name,
|
|
537
454
|
columnType: groupByColumnType,
|
|
@@ -544,42 +461,42 @@ function ReportingTool(_a) {
|
|
|
544
461
|
return;
|
|
545
462
|
}
|
|
546
463
|
};
|
|
547
|
-
|
|
464
|
+
const updateFilter = index => {
|
|
548
465
|
if (selectedColumn && columnType) {
|
|
549
466
|
if (columnType === 'string') {
|
|
550
|
-
setFilters(
|
|
551
|
-
|
|
467
|
+
setFilters(filters => {
|
|
468
|
+
const newFilters = [...filters];
|
|
552
469
|
newFilters[index] = {
|
|
553
470
|
column: selectedColumn.name,
|
|
554
|
-
columnType
|
|
555
|
-
stringFilterValues
|
|
556
|
-
tag:
|
|
471
|
+
columnType,
|
|
472
|
+
stringFilterValues,
|
|
473
|
+
tag: `${selectedColumn.name} (${stringFilterValues.join(', ')})`,
|
|
557
474
|
};
|
|
558
475
|
return newFilters;
|
|
559
476
|
});
|
|
560
477
|
}
|
|
561
478
|
else if (columnType === 'number') {
|
|
562
|
-
setFilters(
|
|
563
|
-
|
|
479
|
+
setFilters(filters => {
|
|
480
|
+
const newFilters = [...filters];
|
|
564
481
|
newFilters[index] = {
|
|
565
482
|
column: selectedColumn.name,
|
|
566
|
-
columnType
|
|
567
|
-
numberStart
|
|
568
|
-
numberEnd
|
|
569
|
-
tag:
|
|
483
|
+
columnType,
|
|
484
|
+
numberStart,
|
|
485
|
+
numberEnd,
|
|
486
|
+
tag: `${numberStart} < ${selectedColumn.name} < ${numberEnd}`,
|
|
570
487
|
};
|
|
571
488
|
return newFilters;
|
|
572
489
|
});
|
|
573
490
|
}
|
|
574
491
|
else if (columnType === 'date') {
|
|
575
|
-
setFilters(
|
|
576
|
-
|
|
492
|
+
setFilters(filters => {
|
|
493
|
+
const newFilters = [...filters];
|
|
577
494
|
newFilters[index] = {
|
|
578
495
|
column: selectedColumn.name,
|
|
579
|
-
columnType
|
|
580
|
-
dateStart
|
|
581
|
-
dateEnd
|
|
582
|
-
tag:
|
|
496
|
+
columnType,
|
|
497
|
+
dateStart,
|
|
498
|
+
dateEnd,
|
|
499
|
+
tag: `${selectedColumn.name} (${(0, date_fns_1.format)(new Date(dateStart), 'MMM dd')} - ${(0, date_fns_1.format)(new Date(dateEnd), 'MMM dd')})`,
|
|
583
500
|
};
|
|
584
501
|
return newFilters;
|
|
585
502
|
});
|
|
@@ -594,20 +511,21 @@ function ReportingTool(_a) {
|
|
|
594
511
|
}
|
|
595
512
|
};
|
|
596
513
|
// ADD FILTER TO "FILTERS" ARRAY
|
|
597
|
-
|
|
514
|
+
const addFilter = () => {
|
|
598
515
|
if (selectedColumn && columnType) {
|
|
599
516
|
// const type = getPostgresBasicType(selectedColumn);
|
|
600
|
-
|
|
517
|
+
let newCondition;
|
|
601
518
|
if (columnType === 'string') {
|
|
602
|
-
setFilters(
|
|
603
|
-
return
|
|
519
|
+
setFilters(filters => {
|
|
520
|
+
return [
|
|
521
|
+
...filters,
|
|
604
522
|
{
|
|
605
523
|
column: selectedColumn.name,
|
|
606
|
-
columnType
|
|
607
|
-
stringFilterValues
|
|
608
|
-
tag:
|
|
524
|
+
columnType,
|
|
525
|
+
stringFilterValues,
|
|
526
|
+
tag: `${selectedColumn.name} (${stringFilterValues.join(', ')})`,
|
|
609
527
|
},
|
|
610
|
-
]
|
|
528
|
+
];
|
|
611
529
|
});
|
|
612
530
|
setStringFilterValues([]);
|
|
613
531
|
setNumberStart(0);
|
|
@@ -617,16 +535,17 @@ function ReportingTool(_a) {
|
|
|
617
535
|
return;
|
|
618
536
|
}
|
|
619
537
|
else if (columnType === 'number') {
|
|
620
|
-
setFilters(
|
|
621
|
-
return
|
|
538
|
+
setFilters(filters => {
|
|
539
|
+
return [
|
|
540
|
+
...filters,
|
|
622
541
|
{
|
|
623
542
|
column: selectedColumn.name,
|
|
624
|
-
columnType
|
|
625
|
-
numberStart
|
|
626
|
-
numberEnd
|
|
627
|
-
tag:
|
|
543
|
+
columnType,
|
|
544
|
+
numberStart,
|
|
545
|
+
numberEnd,
|
|
546
|
+
tag: `${numberStart} < ${selectedColumn.name} < ${numberEnd}`,
|
|
628
547
|
},
|
|
629
|
-
]
|
|
548
|
+
];
|
|
630
549
|
});
|
|
631
550
|
setStringFilterValues([]);
|
|
632
551
|
setNumberStart(0);
|
|
@@ -636,16 +555,17 @@ function ReportingTool(_a) {
|
|
|
636
555
|
return;
|
|
637
556
|
}
|
|
638
557
|
else if (columnType === 'date') {
|
|
639
|
-
setFilters(
|
|
640
|
-
return
|
|
558
|
+
setFilters(filters => {
|
|
559
|
+
return [
|
|
560
|
+
...filters,
|
|
641
561
|
{
|
|
642
562
|
column: selectedColumn.name,
|
|
643
|
-
columnType
|
|
644
|
-
dateStart
|
|
645
|
-
dateEnd
|
|
646
|
-
tag:
|
|
563
|
+
columnType,
|
|
564
|
+
dateStart,
|
|
565
|
+
dateEnd,
|
|
566
|
+
tag: `${selectedColumn.name} (${(0, date_fns_1.format)(new Date(dateStart), 'MMM dd')} - ${(0, date_fns_1.format)(new Date(dateEnd), 'MMM dd')})`,
|
|
647
567
|
},
|
|
648
|
-
]
|
|
568
|
+
];
|
|
649
569
|
});
|
|
650
570
|
setStringFilterValues([]);
|
|
651
571
|
setNumberStart(0);
|
|
@@ -655,23 +575,29 @@ function ReportingTool(_a) {
|
|
|
655
575
|
}
|
|
656
576
|
}
|
|
657
577
|
};
|
|
658
|
-
|
|
578
|
+
const setAggregationColumn = (column, index) => {
|
|
659
579
|
// ex
|
|
660
|
-
setAggregations(
|
|
661
|
-
|
|
662
|
-
newAggregations[index] =
|
|
580
|
+
setAggregations(aggregations => {
|
|
581
|
+
const newAggregations = [...aggregations];
|
|
582
|
+
newAggregations[index] = {
|
|
583
|
+
...newAggregations[index],
|
|
584
|
+
column: column,
|
|
585
|
+
};
|
|
663
586
|
return newAggregations;
|
|
664
587
|
});
|
|
665
588
|
};
|
|
666
|
-
|
|
589
|
+
const setAggregationType = (aggregationType, index) => {
|
|
667
590
|
// ex
|
|
668
|
-
setAggregations(
|
|
669
|
-
|
|
670
|
-
newAggregations[index] =
|
|
591
|
+
setAggregations(aggregations => {
|
|
592
|
+
const newAggregations = [...aggregations];
|
|
593
|
+
newAggregations[index] = {
|
|
594
|
+
...newAggregations[index],
|
|
595
|
+
aggregationType: aggregationType,
|
|
596
|
+
};
|
|
671
597
|
return newAggregations;
|
|
672
598
|
});
|
|
673
599
|
};
|
|
674
|
-
|
|
600
|
+
const addAggregation = () => {
|
|
675
601
|
// setAggregations([
|
|
676
602
|
// {
|
|
677
603
|
// column: selectedTable.columns.filter(
|
|
@@ -680,24 +606,23 @@ function ReportingTool(_a) {
|
|
|
680
606
|
// aggregationType: "sum",
|
|
681
607
|
// },
|
|
682
608
|
// ]);
|
|
683
|
-
setAggregations(
|
|
684
|
-
|
|
609
|
+
setAggregations(aggregations => {
|
|
610
|
+
const newAggregations = [
|
|
611
|
+
...aggregations,
|
|
685
612
|
{
|
|
686
|
-
column: selectedTable.columns.filter(
|
|
687
|
-
|
|
688
|
-
!aggregations.map(function (elem) { return elem.name; }).includes(col.name);
|
|
689
|
-
})[0],
|
|
613
|
+
column: selectedTable.columns.filter(col => getPostgresBasicType(col) === 'number' &&
|
|
614
|
+
!aggregations.map(elem => elem.name).includes(col.name))[0],
|
|
690
615
|
aggregationType: 'sum',
|
|
691
616
|
},
|
|
692
|
-
]
|
|
617
|
+
];
|
|
693
618
|
return newAggregations;
|
|
694
619
|
});
|
|
695
620
|
};
|
|
696
|
-
|
|
621
|
+
(0, react_1.useEffect)(() => {
|
|
697
622
|
// if selected table changes, clear everything
|
|
698
623
|
if (selectedTable.displayName !== AST.from.table) {
|
|
699
624
|
setSelectedColumn(selectedTable.columns[0]);
|
|
700
|
-
setSortableColumns(selectedTable.columns.map(
|
|
625
|
+
setSortableColumns(selectedTable.columns.map(col => col.name));
|
|
701
626
|
setGroupBys([]);
|
|
702
627
|
setSortBys([]);
|
|
703
628
|
setFilters([]);
|
|
@@ -722,9 +647,9 @@ function ReportingTool(_a) {
|
|
|
722
647
|
}
|
|
723
648
|
}, [selectedTable]);
|
|
724
649
|
// USE EFFECT HOOK THAT TRANSFORMS "FILTERS ARRAY INTO AST"
|
|
725
|
-
|
|
650
|
+
(0, react_1.useEffect)(() => {
|
|
726
651
|
if (filters.length || groupBys.length || aggregations.length) {
|
|
727
|
-
|
|
652
|
+
const newAST = {
|
|
728
653
|
with: null,
|
|
729
654
|
type: 'select',
|
|
730
655
|
options: null,
|
|
@@ -740,11 +665,11 @@ function ReportingTool(_a) {
|
|
|
740
665
|
window: null,
|
|
741
666
|
};
|
|
742
667
|
// FILTERS
|
|
743
|
-
for (
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
if (
|
|
668
|
+
for (let i = 0; i < filters.length; i++) {
|
|
669
|
+
const filter = filters[i];
|
|
670
|
+
const { column, columnType, stringFilterValues, numberStart, numberEnd, dateStart, dateEnd, } = filter;
|
|
671
|
+
let newCondition;
|
|
672
|
+
if (columnType === 'string') {
|
|
748
673
|
newCondition = {
|
|
749
674
|
type: 'binary_expr',
|
|
750
675
|
operator: 'IN',
|
|
@@ -755,14 +680,14 @@ function ReportingTool(_a) {
|
|
|
755
680
|
},
|
|
756
681
|
right: {
|
|
757
682
|
type: 'expr_list',
|
|
758
|
-
value:
|
|
683
|
+
value: stringFilterValues.map(value => ({
|
|
759
684
|
type: 'single_quote_string',
|
|
760
|
-
value
|
|
761
|
-
})
|
|
685
|
+
value,
|
|
686
|
+
})),
|
|
762
687
|
},
|
|
763
688
|
};
|
|
764
689
|
}
|
|
765
|
-
else if (
|
|
690
|
+
else if (columnType === 'number') {
|
|
766
691
|
newCondition = {
|
|
767
692
|
type: 'binary_expr',
|
|
768
693
|
operator: 'BETWEEN',
|
|
@@ -774,13 +699,13 @@ function ReportingTool(_a) {
|
|
|
774
699
|
right: {
|
|
775
700
|
type: 'expr_list',
|
|
776
701
|
value: [
|
|
777
|
-
{ type: 'number', value:
|
|
778
|
-
{ type: 'number', value:
|
|
702
|
+
{ type: 'number', value: numberStart },
|
|
703
|
+
{ type: 'number', value: numberEnd },
|
|
779
704
|
],
|
|
780
705
|
},
|
|
781
706
|
};
|
|
782
707
|
}
|
|
783
|
-
else if (
|
|
708
|
+
else if (columnType === 'date') {
|
|
784
709
|
newCondition = {
|
|
785
710
|
type: 'binary_expr',
|
|
786
711
|
operator: 'BETWEEN',
|
|
@@ -794,11 +719,11 @@ function ReportingTool(_a) {
|
|
|
794
719
|
value: [
|
|
795
720
|
{
|
|
796
721
|
type: 'single_quote_string',
|
|
797
|
-
value: format(new Date(
|
|
722
|
+
value: (0, date_fns_1.format)(new Date(dateStart), 'MM/dd/yyyy'),
|
|
798
723
|
},
|
|
799
724
|
{
|
|
800
725
|
type: 'single_quote_string',
|
|
801
|
-
value: format(new Date(
|
|
726
|
+
value: (0, date_fns_1.format)(new Date(dateEnd), 'MM/dd/yyyy'),
|
|
802
727
|
},
|
|
803
728
|
],
|
|
804
729
|
},
|
|
@@ -867,8 +792,8 @@ function ReportingTool(_a) {
|
|
|
867
792
|
if (groupBys.length > 0) {
|
|
868
793
|
newAST.columns = [];
|
|
869
794
|
newAST.groupby = [];
|
|
870
|
-
for (
|
|
871
|
-
|
|
795
|
+
for (let i = 0; i < groupBys.length; i++) {
|
|
796
|
+
const groupBy = groupBys[i];
|
|
872
797
|
if (groupBy.columnType === 'date') {
|
|
873
798
|
newAST.columns.push({
|
|
874
799
|
expr: {
|
|
@@ -916,8 +841,8 @@ function ReportingTool(_a) {
|
|
|
916
841
|
}
|
|
917
842
|
// AGGREGATIONS
|
|
918
843
|
if (aggregations.length > 0) {
|
|
919
|
-
for (
|
|
920
|
-
|
|
844
|
+
for (let i = 0; i < aggregations.length; i++) {
|
|
845
|
+
const aggregation = aggregations[i];
|
|
921
846
|
newAST.columns.push({
|
|
922
847
|
expr: {
|
|
923
848
|
type: 'aggr_func',
|
|
@@ -942,8 +867,8 @@ function ReportingTool(_a) {
|
|
|
942
867
|
}
|
|
943
868
|
if (sortBys.length > 0) {
|
|
944
869
|
newAST.orderby = [];
|
|
945
|
-
for (
|
|
946
|
-
|
|
870
|
+
for (let i = 0; i < sortBys.length; i++) {
|
|
871
|
+
const sortBy = sortBys[i];
|
|
947
872
|
newAST.orderby.push({
|
|
948
873
|
expr: { type: 'column_ref', table: null, column: sortBy.column },
|
|
949
874
|
type: sortBy.direction === 'descending' ? 'DESC' : 'ASC',
|
|
@@ -954,54 +879,53 @@ function ReportingTool(_a) {
|
|
|
954
879
|
setAST(newAST);
|
|
955
880
|
}
|
|
956
881
|
}, [filters, groupBys, aggregations, sortBys]);
|
|
957
|
-
|
|
958
|
-
setFilters(
|
|
959
|
-
|
|
882
|
+
const removeFilter = index => {
|
|
883
|
+
setFilters(oldFilters => {
|
|
884
|
+
const newFilters = [...oldFilters];
|
|
960
885
|
newFilters.splice(index, 1);
|
|
961
886
|
return newFilters;
|
|
962
887
|
});
|
|
963
888
|
setIndexBeingEdited(-1);
|
|
964
889
|
};
|
|
965
|
-
|
|
966
|
-
var _a;
|
|
890
|
+
const computeStats = (0, react_1.useCallback)(column => {
|
|
967
891
|
if (!computedColumns[column.name] && data) {
|
|
968
|
-
|
|
969
|
-
|
|
892
|
+
const basicType = getPostgresBasicType(column);
|
|
893
|
+
let result;
|
|
970
894
|
if (basicType === 'number') {
|
|
971
|
-
|
|
972
|
-
data.forEach(
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
895
|
+
let min = Infinity, max = -Infinity;
|
|
896
|
+
data.forEach(row => {
|
|
897
|
+
const value = row[column.name];
|
|
898
|
+
min = Math.min(min, value);
|
|
899
|
+
max = Math.max(max, value);
|
|
976
900
|
});
|
|
977
|
-
result = { min
|
|
901
|
+
result = { min, max };
|
|
978
902
|
}
|
|
979
903
|
else if (basicType === 'string') {
|
|
980
|
-
|
|
981
|
-
data.forEach(
|
|
982
|
-
|
|
983
|
-
|
|
904
|
+
const freqMap = {};
|
|
905
|
+
data.forEach(row => {
|
|
906
|
+
const value = row[column.name];
|
|
907
|
+
freqMap[value] = (freqMap[value] || 0) + 1;
|
|
984
908
|
});
|
|
985
|
-
result = Object.entries(
|
|
986
|
-
.sort(
|
|
909
|
+
result = Object.entries(freqMap)
|
|
910
|
+
.sort((a, b) => b[1] - a[1])
|
|
987
911
|
.slice(0, 6)
|
|
988
|
-
.map(
|
|
989
|
-
var key = _a[0];
|
|
990
|
-
return key;
|
|
991
|
-
});
|
|
912
|
+
.map(([key]) => key);
|
|
992
913
|
}
|
|
993
914
|
else {
|
|
994
915
|
// Handle other column types if necessary
|
|
995
916
|
}
|
|
996
|
-
setComputedColumns(
|
|
917
|
+
setComputedColumns({
|
|
918
|
+
...computedColumns,
|
|
919
|
+
[column.name]: result,
|
|
920
|
+
});
|
|
997
921
|
}
|
|
998
922
|
}, [data, computedColumns]);
|
|
999
923
|
// Call this function whenever the selected column changes
|
|
1000
|
-
|
|
924
|
+
(0, react_1.useEffect)(() => {
|
|
1001
925
|
computeStats(selectedColumn);
|
|
1002
926
|
}, [selectedColumn]);
|
|
1003
927
|
// Use the results directly in your component
|
|
1004
|
-
|
|
928
|
+
const columnStats = computedColumns[selectedColumn.name];
|
|
1005
929
|
// useEffect(() => {
|
|
1006
930
|
// if (AST && AST.from[0].table) {
|
|
1007
931
|
// const parser = new Parser();
|
|
@@ -1012,53 +936,43 @@ function ReportingTool(_a) {
|
|
|
1012
936
|
// }
|
|
1013
937
|
// }
|
|
1014
938
|
// }, [AST]);
|
|
1015
|
-
|
|
939
|
+
(0, react_1.useEffect)(() => {
|
|
1016
940
|
if (!aggregations.length) {
|
|
1017
941
|
setAggregations([
|
|
1018
942
|
{
|
|
1019
|
-
column: selectedTable.columns.filter(
|
|
943
|
+
column: selectedTable.columns.filter(col => getPostgresBasicType(col) === 'number')[0],
|
|
1020
944
|
aggregationType: 'sum',
|
|
1021
945
|
},
|
|
1022
946
|
]);
|
|
1023
947
|
}
|
|
1024
948
|
}, [selectedGroupByColumn]);
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
setSqlQuery(sqlQuery_1);
|
|
1042
|
-
if (AST.columns === '*') {
|
|
1043
|
-
setSortableColumns(selectedTable.columns.map(function (col) { return col.name; }));
|
|
1044
|
-
}
|
|
1045
|
-
else if (AST.columns.length) {
|
|
1046
|
-
setSortableColumns(AST.columns.map(function (elem) { return elem.as || elem.expr.name; }));
|
|
1047
|
-
}
|
|
949
|
+
(0, react_1.useEffect)(() => {
|
|
950
|
+
const getSqlQueryFromAST = async () => {
|
|
951
|
+
try {
|
|
952
|
+
if (AST && AST.from[0].table) {
|
|
953
|
+
const response = await axios_1.default.post('https://quill-344421.uc.r.appspot.com/sqlify', { ast: AST });
|
|
954
|
+
const sqlQuery = response.data.query; // assuming the response contains the SQL query
|
|
955
|
+
// alert(sqlQuery);
|
|
956
|
+
if (sqlQuery) {
|
|
957
|
+
onChangeQuery(sqlQuery);
|
|
958
|
+
runQuery(sqlQuery);
|
|
959
|
+
setSqlQuery(sqlQuery);
|
|
960
|
+
if (AST.columns === '*') {
|
|
961
|
+
setSortableColumns(selectedTable.columns.map(col => col.name));
|
|
962
|
+
}
|
|
963
|
+
else if (AST.columns.length) {
|
|
964
|
+
setSortableColumns(AST.columns.map(elem => elem.as || elem.expr.name));
|
|
1048
965
|
}
|
|
1049
|
-
|
|
1050
|
-
case 2: return [3 /*break*/, 4];
|
|
1051
|
-
case 3:
|
|
1052
|
-
err_1 = _a.sent();
|
|
1053
|
-
console.error(err_1);
|
|
1054
|
-
return [3 /*break*/, 4];
|
|
1055
|
-
case 4: return [2 /*return*/];
|
|
966
|
+
}
|
|
1056
967
|
}
|
|
1057
|
-
}
|
|
1058
|
-
|
|
968
|
+
}
|
|
969
|
+
catch (err) {
|
|
970
|
+
console.error(err);
|
|
971
|
+
}
|
|
972
|
+
};
|
|
1059
973
|
getSqlQueryFromAST();
|
|
1060
974
|
}, [AST]);
|
|
1061
|
-
|
|
975
|
+
(0, react_1.useEffect)(() => {
|
|
1062
976
|
if (sortableColumns.length) {
|
|
1063
977
|
setSelectedSortByColumn(sortableColumns[0]);
|
|
1064
978
|
}
|
|
@@ -1066,31 +980,30 @@ function ReportingTool(_a) {
|
|
|
1066
980
|
if (!schema || !schema.length) {
|
|
1067
981
|
return null;
|
|
1068
982
|
}
|
|
1069
|
-
return (
|
|
983
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { marginLeft: '25px' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { maxWidth: 245 }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1070
984
|
fontSize: 14,
|
|
1071
985
|
marginBottom: '6px',
|
|
1072
986
|
fontWeight: '600',
|
|
1073
987
|
color: theme.secondaryTextColor,
|
|
1074
|
-
fontFamily: theme
|
|
1075
|
-
}
|
|
1076
|
-
|
|
988
|
+
fontFamily: theme?.fontFamily,
|
|
989
|
+
}, children: "Table" }), (0, jsx_runtime_1.jsx)(SelectComponent, { label: "Table", value: selectedTable.displayName, onChange: e => {
|
|
990
|
+
const table = schema.find(t => t.displayName === e);
|
|
1077
991
|
setSelectedTable(table);
|
|
1078
|
-
}, options:
|
|
1079
|
-
? schema.map(
|
|
992
|
+
}, options: schema?.length
|
|
993
|
+
? schema.map(elem => {
|
|
1080
994
|
return { label: elem.displayName, value: elem.displayName };
|
|
1081
995
|
})
|
|
1082
|
-
: [] })] })
|
|
996
|
+
: [] })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', marginTop: '12px' }, children: [(0, jsx_runtime_1.jsx)(AddFilterModal2, { filters: filters, selectedColumn: selectedColumn, numberStart: numberStart, numberEnd: numberEnd, dateStart: dateStart, setDateStart: setDateStart, columnStats: columnStats, stringFilterValues: stringFilterValues, setStringFilterValues: setStringFilterValues, addFilter: addFilter, setSelectedColumn: setSelectedColumn, setNumberStart: setNumberStart, setNumberEnd: setNumberEnd, selectedTable: selectedTable, columnType: columnType, dateEnd: dateEnd, setDateEnd: setDateEnd, removeFilter: removeFilter, selectFilter: selectFilter, indexBeingEdited: indexBeingEdited, updateFilter: updateFilter, SelectComponent: SelectComponent, ButtonComponent: ButtonComponent, ModalComponent: ModalComponent, ModalTriggerComponent: ModalTriggerComponent, TextInputComponent: TextInputComponent, tagStyle: tagStyle, theme: theme }), (0, jsx_runtime_1.jsx)(GroupByModal2, { selectedTable: selectedTable, groupBys: groupBys, selectedGroupByColumn: selectedGroupByColumn, setSelectedGroupByColumn: setSelectedGroupByColumn, addGroupBy: addGroupBy, groupByColumnType: groupByColumnType, removeGroupBy: removeGroupBy, selectGroupBy: selectGroupBy, groupByIndexBeingEdited: groupByIndexBeingEdited, updateGroupBy: updateGroupBy, aggregations: aggregations, setAggregationColumn: setAggregationColumn, setAggregationType: setAggregationType, SelectComponent: SelectComponent, ButtonComponent: ButtonComponent, ModalComponent: ModalComponent, ModalTriggerComponent: ModalTriggerComponent, TextInputComponent: TextInputComponent, tagStyle: tagStyle, addAggregation: addAggregation, dateBucket: dateBucket, setDateBucket: setDateBucket, theme: theme }), (0, jsx_runtime_1.jsx)(SortByModal, { selectedTable: selectedTable, sortableColumns: sortableColumns, sortBys: sortBys, selectedSortByColumn: selectedSortByColumn, setSelectedSortByColumn: setSelectedSortByColumn, selectedSortByDirection: selectedSortByDirection, setSelectedSortByDirection: setSelectedSortByDirection, addSortBy: addSortBy, removeSortBy: removeSortBy, selectSortBy: selectSortBy, sortByIndexBeingEdited: sortByIndexBeingEdited, updateSortBy: updateSortBy, SelectComponent: SelectComponent, ButtonComponent: ButtonComponent, ModalComponent: ModalComponent, ModalTriggerComponent: ModalTriggerComponent, tagStyle: tagStyle, theme: theme })] })] }));
|
|
1083
997
|
}
|
|
1084
|
-
function FilterTag(
|
|
1085
|
-
|
|
1086
|
-
var handleRemoveFilter = function () {
|
|
998
|
+
function FilterTag({ id, label, removeFilter, index, setIsOpen, selectFilter, theme, tagStyle, }) {
|
|
999
|
+
const handleRemoveFilter = () => {
|
|
1087
1000
|
removeFilter(index);
|
|
1088
1001
|
};
|
|
1089
|
-
|
|
1002
|
+
const handleSelectFilter = () => {
|
|
1090
1003
|
selectFilter(index);
|
|
1091
1004
|
setIsOpen(true);
|
|
1092
1005
|
};
|
|
1093
|
-
return (
|
|
1006
|
+
return ((0, jsx_runtime_1.jsxs)("div", { id: id, onClick: handleSelectFilter, style: tagStyle || {
|
|
1094
1007
|
marginLeft: '12px',
|
|
1095
1008
|
cursor: 'pointer',
|
|
1096
1009
|
borderRadius: 8,
|
|
@@ -1102,17 +1015,17 @@ function FilterTag(_a) {
|
|
|
1102
1015
|
alignItems: 'center',
|
|
1103
1016
|
fontSize: 13,
|
|
1104
1017
|
fontWeight: 'medium',
|
|
1105
|
-
color: theme
|
|
1106
|
-
fontFamily: theme
|
|
1018
|
+
color: theme?.primaryTextColor,
|
|
1019
|
+
fontFamily: theme?.fontFamily,
|
|
1107
1020
|
outline: 'none',
|
|
1108
|
-
}
|
|
1021
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { id: id, style: {
|
|
1109
1022
|
textOverflow: 'ellipsis',
|
|
1110
1023
|
whiteSpace: 'nowrap',
|
|
1111
1024
|
overflow: 'hidden',
|
|
1112
1025
|
maxWidth: '80px',
|
|
1113
|
-
}
|
|
1026
|
+
}, children: label }), (0, jsx_runtime_1.jsx)("div", {
|
|
1114
1027
|
// onClick={handleRemoveFilter}
|
|
1115
|
-
onClick:
|
|
1028
|
+
onClick: e => {
|
|
1116
1029
|
e.stopPropagation(); // Prevents the event from bubbling up to the parent
|
|
1117
1030
|
handleRemoveFilter();
|
|
1118
1031
|
}, style: {
|
|
@@ -1121,54 +1034,53 @@ function FilterTag(_a) {
|
|
|
1121
1034
|
alignItems: 'center',
|
|
1122
1035
|
cursor: 'pointer',
|
|
1123
1036
|
paddingLeft: '6px',
|
|
1124
|
-
}
|
|
1037
|
+
}, children: (0, jsx_runtime_1.jsx)(solid_1.XMarkIcon, { style: {
|
|
1125
1038
|
height: '20px',
|
|
1126
1039
|
width: '20px',
|
|
1127
|
-
color:
|
|
1128
|
-
}, "aria-hidden": "true" }) })
|
|
1040
|
+
color: tagStyle?.color || theme?.primaryTextColor,
|
|
1041
|
+
}, "aria-hidden": "true" }) })] }));
|
|
1129
1042
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
return (_jsx("div", __assign({ style: { display: 'flex', flexDirection: 'column', marginTop: 12 } }, { children: _jsxs("div", __assign({ style: {
|
|
1043
|
+
const SortByModal = ({ selectedSortByColumn, selectedSortByDirection, setSelectedSortByColumn, setSelectedSortByDirection, selectedTable, sortableColumns, removeSortBy, selectSortBy, updateSortBy, addSortBy, sortBys, SelectComponent, ButtonComponent, ModalComponent, tagStyle, ModalTriggerComponent, sortByIndexBeingEdited, theme, }) => {
|
|
1044
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
1045
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column', marginTop: 12 }, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1134
1046
|
position: 'relative',
|
|
1135
1047
|
display: 'inline-block',
|
|
1136
1048
|
textAlign: 'left',
|
|
1137
|
-
}
|
|
1049
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1138
1050
|
display: 'flex',
|
|
1139
1051
|
flexDirection: 'row',
|
|
1140
1052
|
alignItems: 'center',
|
|
1141
|
-
}
|
|
1053
|
+
}, children: [(0, jsx_runtime_1.jsx)(ModalTriggerComponent, { onClick: () => setIsOpen(isOpen => !isOpen), label: "Sort" }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
1142
1054
|
overflowX: 'scroll',
|
|
1143
1055
|
display: 'flex',
|
|
1144
1056
|
flexDirection: 'row',
|
|
1145
1057
|
alignItems: 'center',
|
|
1146
|
-
}
|
|
1058
|
+
}, children: sortBys.map((elem, index) => ((0, jsx_runtime_1.jsx)(FilterTag, { id: "sort-tag", label: elem.column, removeFilter: removeSortBy, selectFilter: selectSortBy, setIsOpen: setIsOpen, index: index, theme: theme, tagStyle: tagStyle }, 'sort' + index))) })] }), (0, jsx_runtime_1.jsx)(ModalComponent, { isOpen: isOpen, onClose: () => setIsOpen(false), title: "Add sort", children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1147
1059
|
display: 'flex',
|
|
1148
1060
|
flexDirection: 'column',
|
|
1149
|
-
}
|
|
1061
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1150
1062
|
fontSize: '14px',
|
|
1151
1063
|
marginBottom: '6px',
|
|
1152
1064
|
fontWeight: '600',
|
|
1153
1065
|
color: theme.secondaryTextColor,
|
|
1154
|
-
fontFamily: theme
|
|
1155
|
-
}
|
|
1066
|
+
fontFamily: theme?.fontFamily,
|
|
1067
|
+
}, children: "Column" }), (0, jsx_runtime_1.jsx)(SelectComponent, { value: selectedSortByColumn, onChange: e => {
|
|
1156
1068
|
setSelectedSortByColumn(e);
|
|
1157
|
-
}, options: sortableColumns.map(
|
|
1069
|
+
}, options: sortableColumns.map(elem => {
|
|
1158
1070
|
return { label: elem, value: elem };
|
|
1159
|
-
}) })] })
|
|
1071
|
+
}) })] }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
1160
1072
|
fontSize: '14px',
|
|
1161
1073
|
marginBottom: '6px',
|
|
1162
1074
|
fontWeight: '600',
|
|
1163
1075
|
color: theme.secondaryTextColor,
|
|
1164
|
-
fontFamily: theme
|
|
1076
|
+
fontFamily: theme?.fontFamily,
|
|
1165
1077
|
marginTop: 20,
|
|
1166
|
-
}
|
|
1078
|
+
}, children: "Direction" }), (0, jsx_runtime_1.jsx)(SelectComponent, { value: selectedSortByDirection, onChange: e => {
|
|
1167
1079
|
setSelectedSortByDirection(e);
|
|
1168
1080
|
}, options: [
|
|
1169
1081
|
{ label: 'ascending', value: 'ascending' },
|
|
1170
1082
|
{ label: 'descending', value: 'descending' },
|
|
1171
|
-
] }),
|
|
1083
|
+
] }), (0, jsx_runtime_1.jsx)("div", { style: { height: 20 } }), (0, jsx_runtime_1.jsx)(ButtonComponent, { id: "custom-button", onClick: () => {
|
|
1172
1084
|
if (sortByIndexBeingEdited > -1) {
|
|
1173
1085
|
updateSortBy(sortByIndexBeingEdited);
|
|
1174
1086
|
setIsOpen(false);
|
|
@@ -1178,80 +1090,76 @@ var SortByModal = function (_a) {
|
|
|
1178
1090
|
addSortBy();
|
|
1179
1091
|
setIsOpen(false);
|
|
1180
1092
|
// close();
|
|
1181
|
-
}, label: sortByIndexBeingEdited > -1 ? 'Edit sort' : 'Add sort' })] })
|
|
1093
|
+
}, label: sortByIndexBeingEdited > -1 ? 'Edit sort' : 'Add sort' })] }) })] }) }));
|
|
1182
1094
|
};
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
return (_jsx("div", __assign({ style: { display: 'flex', flexDirection: 'column' } }, { children: _jsxs("div", __assign({ style: {
|
|
1095
|
+
const GroupByModal2 = ({ selectedGroupByColumn, addGroupBy, setSelectedGroupByColumn, selectedTable, groupByColumnType, groupByIndexBeingEdited, updateGroupBy, groupBys, removeGroupBy, selectGroupBy, SelectComponent, ButtonComponent, aggregations, setAggregationColumn, setAggregationType, addAggregation, dateBucket, setDateBucket, ModalComponent, theme, ModalTriggerComponent, TextInputComponent, tagStyle, }) => {
|
|
1096
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
1097
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column' }, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1187
1098
|
position: 'relative',
|
|
1188
1099
|
display: 'inline-block',
|
|
1189
1100
|
textAlign: 'left',
|
|
1190
|
-
}
|
|
1101
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1191
1102
|
display: 'flex',
|
|
1192
1103
|
flexDirection: 'row',
|
|
1193
1104
|
alignItems: 'center',
|
|
1194
|
-
}
|
|
1105
|
+
}, children: [(0, jsx_runtime_1.jsx)(ModalTriggerComponent, { onClick: () => setIsOpen(isOpen => !isOpen), label: "Group by" }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
1195
1106
|
overflowX: 'scroll',
|
|
1196
1107
|
display: 'flex',
|
|
1197
1108
|
flexDirection: 'row',
|
|
1198
1109
|
alignItems: 'center',
|
|
1199
|
-
}
|
|
1110
|
+
}, children: groupBys.map((elem, index) => ((0, jsx_runtime_1.jsx)(FilterTag, { id: "group-tag", label: elem.tag, removeFilter: removeGroupBy, selectFilter: selectGroupBy, setIsOpen: setIsOpen, index: index, theme: theme, tagStyle: tagStyle }, 'groupby' + index))) })] }), (0, jsx_runtime_1.jsx)(ModalComponent, { isOpen: isOpen, onClose: () => setIsOpen(false), title: "Add group by", children: (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1200
1111
|
fontSize: '14px',
|
|
1201
1112
|
marginBottom: '6px',
|
|
1202
1113
|
fontWeight: '600',
|
|
1203
|
-
fontFamily: theme
|
|
1114
|
+
fontFamily: theme?.fontFamily,
|
|
1204
1115
|
color: theme.secondaryTextColor,
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1116
|
+
}, children: "Column" }), (0, jsx_runtime_1.jsx)(SelectComponent, { label: "Column", value: selectedGroupByColumn.name, onChange: e => {
|
|
1117
|
+
const column = selectedTable.columns.find(c => c.name === e);
|
|
1207
1118
|
setSelectedGroupByColumn(column);
|
|
1208
|
-
}, options: selectedTable.columns.map(
|
|
1119
|
+
}, options: selectedTable.columns.map(elem => {
|
|
1209
1120
|
return { label: elem.name, value: elem.name };
|
|
1210
|
-
}) })] })
|
|
1121
|
+
}) })] }), groupByColumnType === 'date' && ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1211
1122
|
display: 'flex',
|
|
1212
1123
|
flexDirection: 'column',
|
|
1213
1124
|
// marginLeft: 12,
|
|
1214
|
-
}
|
|
1125
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1215
1126
|
fontSize: '14px',
|
|
1216
1127
|
marginBottom: '6px',
|
|
1217
1128
|
fontWeight: '600',
|
|
1218
1129
|
color: theme.secondaryTextColor,
|
|
1219
|
-
fontFamily: theme
|
|
1130
|
+
fontFamily: theme?.fontFamily,
|
|
1220
1131
|
marginTop: 20,
|
|
1221
|
-
}
|
|
1132
|
+
}, children: "Bucket" }), (0, jsx_runtime_1.jsx)(SelectComponent, { label: "Bucket", value: dateBucket, onChange: e => {
|
|
1222
1133
|
setDateBucket(e);
|
|
1223
1134
|
}, options: [
|
|
1224
1135
|
{ label: 'month', value: 'month' },
|
|
1225
1136
|
{ label: 'day', value: 'day' },
|
|
1226
1137
|
{ label: 'week', value: 'week' },
|
|
1227
|
-
] })] }))
|
|
1138
|
+
] })] })), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
1228
1139
|
fontSize: 14,
|
|
1229
1140
|
marginBottom: '6px',
|
|
1230
1141
|
fontWeight: '600',
|
|
1231
1142
|
marginTop: 20,
|
|
1232
1143
|
color: theme.secondaryTextColor,
|
|
1233
|
-
fontFamily: theme
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
{ label: 'count', value: 'count' },
|
|
1253
|
-
] })] }), 'agg' + index));
|
|
1254
|
-
}), _jsx("div", { style: { height: 20 } }), _jsx(ButtonComponent, { id: "custom-button", onClick: function () {
|
|
1144
|
+
fontFamily: theme?.fontFamily,
|
|
1145
|
+
}, children: "Aggregations" }), aggregations.map((aggregation, index) => (
|
|
1146
|
+
// setAggregationType
|
|
1147
|
+
(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1148
|
+
display: 'flex',
|
|
1149
|
+
flexDirection: 'row',
|
|
1150
|
+
alignItems: 'center',
|
|
1151
|
+
}, children: [(0, jsx_runtime_1.jsx)(SelectComponent, { value: aggregation.column?.name, onChange: e => {
|
|
1152
|
+
const column = selectedTable.columns.find(c => c.name === e);
|
|
1153
|
+
setAggregationColumn(column, index);
|
|
1154
|
+
}, options: selectedTable.columns.map(elem => {
|
|
1155
|
+
return { label: elem.name, value: elem.name };
|
|
1156
|
+
}) }), (0, jsx_runtime_1.jsx)("div", { style: { width: 16 } }), (0, jsx_runtime_1.jsx)(SelectComponent, { value: aggregation.aggregationType, onChange: e => {
|
|
1157
|
+
setAggregationType(e, index);
|
|
1158
|
+
}, options: [
|
|
1159
|
+
{ label: 'sum', value: 'sum' },
|
|
1160
|
+
{ label: 'average', value: 'average' },
|
|
1161
|
+
{ label: 'count', value: 'count' },
|
|
1162
|
+
] })] }, 'agg' + index))), (0, jsx_runtime_1.jsx)("div", { style: { height: 20 } }), (0, jsx_runtime_1.jsx)(ButtonComponent, { id: "custom-button", onClick: () => {
|
|
1255
1163
|
if (groupByIndexBeingEdited > -1) {
|
|
1256
1164
|
updateGroupBy(groupByIndexBeingEdited);
|
|
1257
1165
|
setIsOpen(false);
|
|
@@ -1261,119 +1169,116 @@ var GroupByModal2 = function (_a) {
|
|
|
1261
1169
|
addGroupBy();
|
|
1262
1170
|
setIsOpen(false);
|
|
1263
1171
|
// close();
|
|
1264
|
-
}, label: groupByIndexBeingEdited > -1 ? 'Edit group by' : 'Add group by' })] })
|
|
1172
|
+
}, label: groupByIndexBeingEdited > -1 ? 'Edit group by' : 'Add group by' })] }) })] }) }));
|
|
1265
1173
|
};
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
return (_jsxs("div", __assign({ style: { display: 'flex', flexDirection: 'column' } }, { children: [_jsxs("div", __assign({ style: {
|
|
1174
|
+
const AddFilterModal2 = ({ filters, selectedColumn, numberStart, numberEnd, dateStart, setDateStart, columnStats, stringFilterValues, setStringFilterValues, addFilter, setSelectedColumn, setNumberStart, setNumberEnd, selectedTable, columnType, setDateEnd, dateEnd, removeFilter, selectFilter, indexBeingEdited, updateFilter, SelectComponent, ButtonComponent, ModalComponent, theme, ModalTriggerComponent, TextInputComponent, tagStyle, }) => {
|
|
1175
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
1176
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1270
1177
|
position: 'relative',
|
|
1271
1178
|
display: 'inline-block',
|
|
1272
1179
|
textAlign: 'left',
|
|
1273
|
-
}
|
|
1180
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1274
1181
|
display: 'flex',
|
|
1275
1182
|
flexDirection: 'row',
|
|
1276
1183
|
alignItems: 'center',
|
|
1277
|
-
}
|
|
1184
|
+
}, children: [(0, jsx_runtime_1.jsx)(ModalTriggerComponent, { onClick: () => setIsOpen(isOpen => !isOpen), label: "Filter" }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
1278
1185
|
overflowX: 'scroll',
|
|
1279
1186
|
display: 'flex',
|
|
1280
1187
|
flexDirection: 'row',
|
|
1281
1188
|
alignItems: 'center',
|
|
1282
|
-
}
|
|
1189
|
+
}, children: filters.map((elem, index) => ((0, jsx_runtime_1.jsx)(FilterTag, { id: "filter-tag", label: elem.tag, removeFilter: removeFilter, selectFilter: selectFilter, index: index, theme: theme, setIsOpen: setIsOpen, tagStyle: tagStyle }, 'filter' + index))) })] }), (0, jsx_runtime_1.jsx)(ModalComponent, { isOpen: isOpen, onClose: () => setIsOpen(false), title: "Add filter", children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1283
1190
|
backgroundColor: 'rgb(255, 255, 255)',
|
|
1284
1191
|
display: 'flex',
|
|
1285
1192
|
flexDirection: 'column',
|
|
1286
|
-
}
|
|
1193
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1287
1194
|
fontSize: 14,
|
|
1288
1195
|
marginBottom: '6px',
|
|
1289
1196
|
fontWeight: '600',
|
|
1290
1197
|
color: theme.secondaryTextColor,
|
|
1291
|
-
fontFamily: theme
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1198
|
+
fontFamily: theme?.fontFamily,
|
|
1199
|
+
}, children: "Column" }), (0, jsx_runtime_1.jsx)(SelectComponent, { id: "custom-select", value: selectedColumn.name, onChange: e => {
|
|
1200
|
+
const column = selectedTable.columns.find(c => c.name === e);
|
|
1294
1201
|
setSelectedColumn(column);
|
|
1295
|
-
}, options: selectedTable.columns.map(
|
|
1202
|
+
}, options: selectedTable.columns.map(elem => {
|
|
1296
1203
|
return { label: elem.name, value: elem.name };
|
|
1297
|
-
}) }), columnType === 'number' && (
|
|
1204
|
+
}) }), columnType === 'number' && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1298
1205
|
display: 'flex',
|
|
1299
1206
|
flexDirection: 'row',
|
|
1300
1207
|
alignItems: 'center',
|
|
1301
1208
|
justifyContent: 'space-between',
|
|
1302
|
-
}
|
|
1209
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1303
1210
|
display: 'flex',
|
|
1304
1211
|
flexDirection: 'column',
|
|
1305
1212
|
marginTop: '20px',
|
|
1306
|
-
}
|
|
1213
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1307
1214
|
fontSize: '14px',
|
|
1308
1215
|
fontWeight: '600',
|
|
1309
1216
|
color: theme.secondaryTextColor,
|
|
1310
|
-
fontFamily: theme
|
|
1217
|
+
fontFamily: theme?.fontFamily,
|
|
1311
1218
|
marginBottom: 6,
|
|
1312
|
-
}
|
|
1219
|
+
}, children: "Minimum" }), (0, jsx_runtime_1.jsx)(TextInputComponent, { id: "min-input", value: numberStart, onChange: e => setNumberStart(e.target.value) })] }), (0, jsx_runtime_1.jsx)("div", { style: { width: 16 } }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1313
1220
|
display: 'flex',
|
|
1314
1221
|
flexDirection: 'column',
|
|
1315
1222
|
marginTop: '20px',
|
|
1316
|
-
}
|
|
1223
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1317
1224
|
fontSize: '14px',
|
|
1318
1225
|
fontWeight: '600',
|
|
1319
1226
|
color: theme.secondaryTextColor,
|
|
1320
|
-
fontFamily: theme
|
|
1227
|
+
fontFamily: theme?.fontFamily,
|
|
1321
1228
|
marginBottom: 6,
|
|
1322
|
-
}
|
|
1229
|
+
}, children: "Maximum" }), (0, jsx_runtime_1.jsx)(TextInputComponent, { id: "max-input", value: numberEnd, onChange: e => setNumberEnd(e.target.value) })] })] }) })), columnType === 'date' && ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1323
1230
|
display: 'flex',
|
|
1324
1231
|
flexDirection: 'row',
|
|
1325
1232
|
alignItems: 'center',
|
|
1326
1233
|
justifyContent: 'space-between',
|
|
1327
|
-
}
|
|
1234
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1328
1235
|
display: 'flex',
|
|
1329
1236
|
flexDirection: 'column',
|
|
1330
1237
|
marginTop: '20px',
|
|
1331
|
-
}
|
|
1238
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1332
1239
|
fontSize: 14,
|
|
1333
1240
|
fontWeight: '600',
|
|
1334
1241
|
color: 'rgba(56, 65, 81, 0.7)',
|
|
1335
|
-
fontFamily: theme
|
|
1336
|
-
}
|
|
1242
|
+
fontFamily: theme?.fontFamily,
|
|
1243
|
+
}, children: "Start date" }), (0, jsx_runtime_1.jsx)("input", { type: "date", value: dateStart, onChange: e => setDateStart(e.target.value), placeholder: "Start date" })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1337
1244
|
display: 'flex',
|
|
1338
1245
|
flexDirection: 'column',
|
|
1339
1246
|
marginTop: '20px',
|
|
1340
|
-
}
|
|
1247
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
1341
1248
|
fontSize: 14,
|
|
1342
1249
|
fontWeight: '600',
|
|
1343
1250
|
color: 'rgba(56, 65, 81, 0.7)',
|
|
1344
|
-
fontFamily: theme
|
|
1345
|
-
}
|
|
1251
|
+
fontFamily: theme?.fontFamily,
|
|
1252
|
+
}, children: "End date" }), (0, jsx_runtime_1.jsx)("input", { type: "date", value: dateEnd, onChange: e => setDateEnd(e.target.value), placeholder: "End date" })] })] })), columnType === 'string' &&
|
|
1346
1253
|
columnStats &&
|
|
1347
|
-
columnStats.length > 0 && (
|
|
1254
|
+
columnStats.length > 0 && ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
1348
1255
|
flex: 'flex',
|
|
1349
1256
|
flexDirection: 'column',
|
|
1350
1257
|
marginTop: '14px',
|
|
1351
1258
|
overflow: 'hidden',
|
|
1352
|
-
}
|
|
1259
|
+
}, children: columnStats.map(value => ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
1353
1260
|
display: 'flex',
|
|
1354
1261
|
flexDirection: 'row',
|
|
1355
1262
|
alignItems: 'center',
|
|
1356
|
-
}
|
|
1263
|
+
}, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1357
1264
|
display: 'flex',
|
|
1358
1265
|
flexDirection: 'row',
|
|
1359
1266
|
alignItems: 'center',
|
|
1360
1267
|
paddingTop: 6,
|
|
1361
1268
|
paddingBottom: 6,
|
|
1362
|
-
}
|
|
1363
|
-
setStringFilterValues(
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
});
|
|
1368
|
-
} }), _jsx("div", __assign({ style: {
|
|
1269
|
+
}, children: [(0, jsx_runtime_1.jsx)(DivCheckbox, { theme: theme, checked: stringFilterValues.includes(value), onChange: () => {
|
|
1270
|
+
setStringFilterValues(prev => prev.includes(value)
|
|
1271
|
+
? prev.filter(v => v !== value)
|
|
1272
|
+
: [...prev, value]);
|
|
1273
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
1369
1274
|
marginLeft: 6,
|
|
1370
1275
|
display: 'block',
|
|
1371
1276
|
overflow: 'hidden',
|
|
1372
1277
|
textOverflow: 'ellipsis',
|
|
1373
1278
|
whiteSpace: 'nowrap',
|
|
1374
|
-
color: theme
|
|
1375
|
-
fontFamily: theme
|
|
1376
|
-
}
|
|
1279
|
+
color: theme?.primaryTextColor,
|
|
1280
|
+
fontFamily: theme?.fontFamily,
|
|
1281
|
+
}, children: value })] }, value) }, value))) })), (0, jsx_runtime_1.jsx)("div", { style: { height: 20 } }), (0, jsx_runtime_1.jsx)(ButtonComponent, { id: "custom-button", onClick: () => {
|
|
1377
1282
|
if (indexBeingEdited > -1) {
|
|
1378
1283
|
updateFilter(indexBeingEdited);
|
|
1379
1284
|
setIsOpen(false);
|
|
@@ -1381,16 +1286,15 @@ var AddFilterModal2 = function (_a) {
|
|
|
1381
1286
|
}
|
|
1382
1287
|
addFilter();
|
|
1383
1288
|
setIsOpen(false);
|
|
1384
|
-
}, label: indexBeingEdited > -1 ? 'Edit filter' : 'Add filter' })] })
|
|
1289
|
+
}, label: indexBeingEdited > -1 ? 'Edit filter' : 'Add filter' })] }) })] }), (0, jsx_runtime_1.jsx)("div", { style: { height: '12px' } })] }));
|
|
1385
1290
|
};
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
var toggleCheckbox = function () {
|
|
1291
|
+
const DivCheckbox = ({ onChange, checked, theme }) => {
|
|
1292
|
+
const toggleCheckbox = () => {
|
|
1389
1293
|
if (onChange) {
|
|
1390
1294
|
onChange(!checked);
|
|
1391
1295
|
}
|
|
1392
1296
|
};
|
|
1393
|
-
|
|
1297
|
+
const style = {
|
|
1394
1298
|
// display: 'inline-block',
|
|
1395
1299
|
width: '18px',
|
|
1396
1300
|
height: '18px',
|
|
@@ -1400,14 +1304,14 @@ var DivCheckbox = function (_a) {
|
|
|
1400
1304
|
position: 'relative',
|
|
1401
1305
|
cursor: 'pointer',
|
|
1402
1306
|
boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
|
1403
|
-
fontFamily: theme
|
|
1307
|
+
fontFamily: theme?.fontFamily,
|
|
1404
1308
|
display: 'flex',
|
|
1405
1309
|
flexDirection: 'column',
|
|
1406
1310
|
alignItems: 'center',
|
|
1407
1311
|
justifyContent: 'center',
|
|
1408
1312
|
};
|
|
1409
|
-
return (
|
|
1313
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: style, onClick: toggleCheckbox, "aria-checked": checked,
|
|
1410
1314
|
// className="shadow-sm"
|
|
1411
|
-
role: "checkbox"
|
|
1315
|
+
role: "checkbox", children: checked && ((0, jsx_runtime_1.jsx)(solid_1.CheckIcon, { style: { color: theme?.backgroundColor, height: 16, width: 16 }, className: "text-white", "aria-hidden": "true" })) }));
|
|
1412
1316
|
};
|
|
1413
1317
|
//# sourceMappingURL=ReportBuilder.js.map
|