@quillsql/react 1.4.9 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@ interface DashboardProps {
5
5
  maxColumnWidth?: number;
6
6
  rowHeight?: number;
7
7
  onClickDashboardItem?: (item: any) => void;
8
+ hideDateFilter?: boolean;
8
9
  }
9
- export default function Dashboard({ name, containerStyle, maxColumnWidth, rowHeight, onClickDashboardItem, }: DashboardProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export default function Dashboard({ name, containerStyle, maxColumnWidth, rowHeight, onClickDashboardItem, hideDateFilter, }: DashboardProps): import("react/jsx-runtime").JSX.Element | null;
10
11
  export {};
package/lib/Dashboard.js CHANGED
@@ -62,7 +62,7 @@ import axios from 'axios';
62
62
  // chartColors: ['#6269E9', '#E14F62'],
63
63
  // };
64
64
  export default function Dashboard(_a) {
65
- var name = _a.name, containerStyle = _a.containerStyle, maxColumnWidth = _a.maxColumnWidth, rowHeight = _a.rowHeight, onClickDashboardItem = _a.onClickDashboardItem;
65
+ var name = _a.name, containerStyle = _a.containerStyle, maxColumnWidth = _a.maxColumnWidth, rowHeight = _a.rowHeight, onClickDashboardItem = _a.onClickDashboardItem, hideDateFilter = _a.hideDateFilter;
66
66
  var _b = useState(null), dashboardSections = _b[0], setDashboardSections = _b[1];
67
67
  var dashboard = useContext(DashboardContext).dashboard;
68
68
  var _c = useContext(ClientContext), client = _c[0], _ = _c[1];
@@ -134,11 +134,11 @@ export default function Dashboard(_a) {
134
134
  if (!dashboardSections) {
135
135
  return null;
136
136
  }
137
- return (_jsxs("div", __assign({ style: containerStyle }, { children: [_jsx("div", __assign({ style: { width: 420, marginBottom: 25, marginLeft: 25 } }, { children: _jsx(DateRangePicker
137
+ return (_jsxs("div", __assign({ style: containerStyle }, { children: [!hideDateFilter ? (_jsx("div", __assign({ style: { width: 420, marginBottom: 25, marginLeft: 25 } }, { children: _jsx(DateRangePicker
138
138
  // change to be set on the dashboard / section as default date range
139
139
  , {
140
140
  // change to be set on the dashboard / section as default date range
141
- defaultValue: [undefined, undefined, '90d'], onValueChange: onChangeDateFilter, theme: theme }) })), Object.keys(dashboardSections)
141
+ defaultValue: [undefined, undefined, '90d'], onValueChange: onChangeDateFilter, theme: theme }) }))) : null, Object.keys(dashboardSections)
142
142
  .sort(function (a, b) {
143
143
  return a.length - b.length;
144
144
  })
@@ -1 +1 @@
1
- {"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../src/Dashboard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,kBAAkB;AAClB,oCAAoC;AACpC,iCAAiC;AACjC,mCAAmC;AACnC,gCAAgC;AAChC,+BAA+B;AAC/B,yCAAyC;AACzC,KAAK;AAEL,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAMjB;QALf,IAAI,UAAA,EACJ,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,SAAS,eAAA,EACT,oBAAoB,0BAAA;IAEd,IAAA,KAA4C,QAAQ,CAAM,IAAI,CAAC,EAA9D,iBAAiB,QAAA,EAAE,oBAAoB,QAAuB,CAAC;IAC9D,IAAA,SAAS,GAAK,UAAU,CAAC,gBAAgB,CAAC,UAAjC,CAAkC;IAC7C,IAAA,KAAc,UAAU,CAAC,aAAa,CAAC,EA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jB,MAAM,EACJ,CAAA,MAAA,KAAK,CAAC,WAAW,0CAAE,MAAM;gEACvB,CAAC,CAAC,KAAK,CAAC,WAAW;gEACnB,CAAC,CAAC,SAAS,GAGf,IACE,KACF,IACF,IACF,KA5HD,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,KAAK,CA6HvB,CACP,CAAC;4BACJ,CAAC,CACF,IACC,MA7WD,OAAO,GAAG,EAAE,GAAG,YAAY,CA8W5B,CACP,CAAC;YACJ,CAAC,CAAC,KACA,CACP,CAAC;AACJ,CAAC"}
package/lib/Table.js CHANGED
@@ -1,662 +1,282 @@
1
- var __assign =
2
- (this && this.__assign) ||
3
- function () {
4
- __assign =
5
- Object.assign ||
6
- function (t) {
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
7
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s)
10
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
11
7
  }
12
8
  return t;
13
- };
9
+ };
14
10
  return __assign.apply(this, arguments);
15
- };
16
- var __awaiter =
17
- (this && this.__awaiter) ||
18
- function (thisArg, _arguments, P, generator) {
19
- function adopt(value) {
20
- return value instanceof P
21
- ? value
22
- : new P(function (resolve) {
23
- resolve(value);
24
- });
25
- }
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); }); }
26
14
  return new (P || (P = Promise))(function (resolve, reject) {
27
- function fulfilled(value) {
28
- try {
29
- step(generator.next(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- }
34
- function rejected(value) {
35
- try {
36
- step(generator['throw'](value));
37
- } catch (e) {
38
- reject(e);
39
- }
40
- }
41
- function step(result) {
42
- result.done
43
- ? resolve(result.value)
44
- : adopt(result.value).then(fulfilled, rejected);
45
- }
46
- step((generator = generator.apply(thisArg, _arguments || [])).next());
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());
47
19
  });
48
- };
49
- var __generator =
50
- (this && this.__generator) ||
51
- function (thisArg, body) {
52
- var _ = {
53
- label: 0,
54
- sent: function () {
55
- if (t[0] & 1) throw t[1];
56
- return t[1];
57
- },
58
- trys: [],
59
- ops: [],
60
- },
61
- f,
62
- y,
63
- t,
64
- g;
65
- return (
66
- (g = { next: verb(0), throw: verb(1), return: verb(2) }),
67
- typeof Symbol === 'function' &&
68
- (g[Symbol.iterator] = function () {
69
- return this;
70
- }),
71
- g
72
- );
73
- function verb(n) {
74
- return function (v) {
75
- return step([n, v]);
76
- };
77
- }
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]); }; }
78
25
  function step(op) {
79
- if (f) throw new TypeError('Generator is already executing.');
80
- while ((g && ((g = 0), op[0] && (_ = 0)), _))
81
- try {
82
- if (
83
- ((f = 1),
84
- y &&
85
- (t =
86
- op[0] & 2
87
- ? y['return']
88
- : op[0]
89
- ? y['throw'] || ((t = y['return']) && t.call(y), 0)
90
- : y.next) &&
91
- !(t = t.call(y, op[1])).done)
92
- )
93
- return t;
94
- if (((y = 0), t)) op = [op[0] & 2, t.value];
95
- switch (op[0]) {
96
- case 0:
97
- case 1:
98
- t = op;
99
- break;
100
- case 4:
101
- _.label++;
102
- return { value: op[1], done: false };
103
- case 5:
104
- _.label++;
105
- y = op[1];
106
- op = [0];
107
- continue;
108
- case 7:
109
- op = _.ops.pop();
110
- _.trys.pop();
111
- continue;
112
- default:
113
- if (
114
- !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) &&
115
- (op[0] === 6 || op[0] === 2)
116
- ) {
117
- _ = 0;
118
- continue;
119
- }
120
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
121
- _.label = op[1];
122
- break;
123
- }
124
- if (op[0] === 6 && _.label < t[1]) {
125
- _.label = t[1];
126
- t = op;
127
- break;
128
- }
129
- if (t && _.label < t[2]) {
130
- _.label = t[2];
131
- _.ops.push(op);
132
- break;
133
- }
134
- if (t[2]) _.ops.pop();
135
- _.trys.pop();
136
- continue;
137
- }
138
- op = body.call(thisArg, _);
139
- } catch (e) {
140
- op = [6, e];
141
- y = 0;
142
- } finally {
143
- f = t = 0;
144
- }
145
- if (op[0] & 5) throw op[1];
146
- return { value: op[0] ? op[1] : void 0, done: true };
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 };
147
46
  }
148
- };
149
- import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
47
+ };
48
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
150
49
  /* eslint-disable @typescript-eslint/ban-ts-comment */
151
50
  // @ts-nocheck
152
51
  import { useContext, useEffect, useMemo, useState } from 'react';
153
52
  import axios from 'axios';
154
- import { ClientContext, DashboardContext, ThemeContext } from './Context';
53
+ import { ClientContext, DashboardContext, ThemeContext, } from './Context';
155
54
  import Skeleton from 'react-loading-skeleton';
156
55
  import { valueFormatter } from './Chart';
157
56
  var Table = function (_a) {
158
- var chartId = _a.chartId,
159
- containerStyle = _a.containerStyle;
160
- var _b = useContext(DashboardContext),
161
- dispatch = _b.dispatch,
162
- dashboard = _b.dashboard;
163
- var _c = useContext(ClientContext),
164
- client = _c[0],
165
- _ = _c[1];
166
- var theme = useContext(ThemeContext)[0];
167
- var downloadCSV = function (rows, name) {
168
- // report.rows
169
- if (!rows.length) {
170
- return;
171
- }
172
- var json = rows; // JSON data passed as a prop
173
- var fields = Object.keys(json[0]); // Assumes all objects have same keys
174
- var csvRows = [];
175
- // Header row
176
- csvRows.push(fields.join(','));
177
- var _loop_1 = function (row) {
178
- var values = fields.map(function (field) {
179
- return JSON.stringify(row[field] || '');
180
- });
181
- csvRows.push(values.join(','));
57
+ var chartId = _a.chartId, containerStyle = _a.containerStyle;
58
+ var _b = useContext(DashboardContext), dispatch = _b.dispatch, dashboard = _b.dashboard;
59
+ var _c = useContext(ClientContext), client = _c[0], _ = _c[1];
60
+ var theme = useContext(ThemeContext)[0];
61
+ var downloadCSV = function (rows, name) {
62
+ // report.rows
63
+ if (!rows.length) {
64
+ return;
65
+ }
66
+ var json = rows; // JSON data passed as a prop
67
+ var fields = Object.keys(json[0]); // Assumes all objects have same keys
68
+ var csvRows = [];
69
+ // Header row
70
+ csvRows.push(fields.join(','));
71
+ var _loop_1 = function (row) {
72
+ var values = fields.map(function (field) { return JSON.stringify(row[field] || ''); });
73
+ csvRows.push(values.join(','));
74
+ };
75
+ // Data rows
76
+ for (var _i = 0, json_1 = json; _i < json_1.length; _i++) {
77
+ var row = json_1[_i];
78
+ _loop_1(row);
79
+ }
80
+ // Create CSV string and create a 'blob' with it
81
+ var csvString = csvRows.join('\r\n');
82
+ var csvBlob = new Blob([csvString], { type: 'text/csv' });
83
+ // Create a download link and click it
84
+ var downloadLink = document.createElement('a');
85
+ downloadLink.download = "".concat(name, ".csv");
86
+ downloadLink.href = URL.createObjectURL(csvBlob);
87
+ downloadLink.style.display = 'none';
88
+ document.body.appendChild(downloadLink);
89
+ downloadLink.click();
90
+ document.body.removeChild(downloadLink);
182
91
  };
183
- // Data rows
184
- for (var _i = 0, json_1 = json; _i < json_1.length; _i++) {
185
- var row = json_1[_i];
186
- _loop_1(row);
187
- }
188
- // Create CSV string and create a 'blob' with it
189
- var csvString = csvRows.join('\r\n');
190
- var csvBlob = new Blob([csvString], { type: 'text/csv' });
191
- // Create a download link and click it
192
- var downloadLink = document.createElement('a');
193
- downloadLink.download = ''.concat(name, '.csv');
194
- downloadLink.href = URL.createObjectURL(csvBlob);
195
- downloadLink.style.display = 'none';
196
- document.body.appendChild(downloadLink);
197
- downloadLink.click();
198
- document.body.removeChild(downloadLink);
199
- };
200
- return _jsx(ChartUpdater, {
201
- dispatch: dispatch,
202
- dashboard: dashboard,
203
- chartId: chartId,
204
- containerStyle: containerStyle,
205
- client: client,
206
- theme: theme,
207
- downloadCSV: downloadCSV,
208
- });
92
+ return (_jsx(ChartUpdater, { dispatch: dispatch, dashboard: dashboard, chartId: chartId, containerStyle: containerStyle, client: client, theme: theme, downloadCSV: downloadCSV }));
209
93
  };
210
94
  var ChartUpdater = function (_a) {
211
- var chartId = _a.chartId,
212
- containerStyle = _a.containerStyle,
213
- dashboard = _a.dashboard,
214
- dispatch = _a.dispatch,
215
- client = _a.client,
216
- theme = _a.theme,
217
- downloadCSV = _a.downloadCSV;
218
- var _b = useState(null),
219
- chartConfig = _b[0],
220
- setChartConfig = _b[1];
221
- var _c = useState(true),
222
- loading = _c[0],
223
- setLoading = _c[1];
224
- useEffect(
225
- function () {
226
- var isSubscribed = true;
227
- function getChartOptions(id) {
228
- return __awaiter(this, void 0, void 0, function () {
229
- var _a,
230
- columns,
231
- rows,
232
- name_1,
233
- publicKey,
234
- customerId,
235
- environment,
236
- resp,
237
- _b,
238
- columns,
239
- rows,
240
- name_2,
241
- e_1;
242
- return __generator(this, function (_c) {
243
- switch (_c.label) {
244
- case 0:
245
- if (!isSubscribed) return [3 /*break*/, 4];
246
- // @ts-ignore
247
- if (dashboard && dashboard[id]) {
248
- (_a = dashboard[id]),
249
- (columns = _a.columns),
250
- (rows = _a.rows),
251
- (name_1 = _a.name);
252
- setChartConfig({
253
- columns: columns,
254
- rows: rows,
255
- name: name_1,
256
- });
257
- setLoading(false);
258
- return [2 /*return*/];
259
- }
260
- (publicKey = client.publicKey),
261
- (customerId = client.customerId),
262
- (environment = client.environment);
263
- setLoading(true);
264
- _c.label = 1;
265
- case 1:
266
- _c.trys.push([1, 3, , 4]);
267
- return [
268
- 4 /*yield*/,
269
- axios.get('https://quill-344421.uc.r.appspot.com/item', {
270
- params: {
271
- id: chartId,
272
- orgId: customerId,
273
- publicKey: publicKey,
274
- },
275
- headers: {
276
- environment: environment || undefined,
277
- },
278
- }),
279
- ];
280
- case 2:
281
- resp = _c.sent();
282
- (_b = resp.data),
283
- (columns = _b.columns),
284
- (rows = _b.rows),
285
- (name_2 = _b.name);
286
- setChartConfig({
287
- columns: columns,
288
- rows: rows,
289
- name: name_2,
95
+ var chartId = _a.chartId, containerStyle = _a.containerStyle, dashboard = _a.dashboard, dispatch = _a.dispatch, client = _a.client, theme = _a.theme, downloadCSV = _a.downloadCSV;
96
+ var _b = useState(null), chartConfig = _b[0], setChartConfig = _b[1];
97
+ var _c = useState(true), loading = _c[0], setLoading = _c[1];
98
+ useEffect(function () {
99
+ var isSubscribed = true;
100
+ function getChartOptions(id) {
101
+ return __awaiter(this, void 0, void 0, function () {
102
+ var _a, columns, rows, name_1, publicKey, customerId, environment, resp, _b, columns, rows, name_2, e_1;
103
+ return __generator(this, function (_c) {
104
+ switch (_c.label) {
105
+ case 0:
106
+ if (!isSubscribed) return [3 /*break*/, 4];
107
+ // @ts-ignore
108
+ if (dashboard && dashboard[id]) {
109
+ _a = dashboard[id], columns = _a.columns, rows = _a.rows, name_1 = _a.name;
110
+ setChartConfig({
111
+ columns: columns,
112
+ rows: rows,
113
+ name: name_1,
114
+ });
115
+ setLoading(false);
116
+ return [2 /*return*/];
117
+ }
118
+ publicKey = client.publicKey, customerId = client.customerId, environment = client.environment;
119
+ setLoading(true);
120
+ _c.label = 1;
121
+ case 1:
122
+ _c.trys.push([1, 3, , 4]);
123
+ return [4 /*yield*/, axios.get('https://quill-344421.uc.r.appspot.com/item', {
124
+ params: {
125
+ id: chartId,
126
+ orgId: customerId,
127
+ publicKey: publicKey,
128
+ },
129
+ headers: {
130
+ environment: environment || undefined,
131
+ },
132
+ })];
133
+ case 2:
134
+ resp = _c.sent();
135
+ _b = resp.data, columns = _b.columns, rows = _b.rows, name_2 = _b.name;
136
+ setChartConfig({
137
+ columns: columns,
138
+ rows: rows,
139
+ name: name_2,
140
+ });
141
+ setLoading(false);
142
+ return [3 /*break*/, 4];
143
+ case 3:
144
+ e_1 = _c.sent();
145
+ console.log('Error fetching chart: ', e_1);
146
+ setLoading(false);
147
+ return [3 /*break*/, 4];
148
+ case 4: return [2 /*return*/];
149
+ }
150
+ });
151
+ });
152
+ }
153
+ if (chartId && !chartConfig) {
154
+ getChartOptions(chartId);
155
+ }
156
+ return function () {
157
+ isSubscribed = false;
158
+ };
159
+ }, [chartConfig]);
160
+ var NUM_TO_SHOW = (containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.height)
161
+ ? Math.floor(containerStyle.height / 40) - 1
162
+ : 6;
163
+ var memoizedData = useMemo(function () {
164
+ // Deep copy of data
165
+ var copiedData = JSON.parse(JSON.stringify(chartConfig && chartConfig.rows && chartConfig.rows.length
166
+ ? chartConfig.rows
167
+ : []));
168
+ return copiedData.slice(0, NUM_TO_SHOW).map(function (item) {
169
+ var fieldsWithFormattedValues = {};
170
+ for (var _i = 0, _a = chartConfig.columns; _i < _a.length; _i++) {
171
+ var field = _a[_i];
172
+ var value = item[field.field];
173
+ fieldsWithFormattedValues[field.field] = valueFormatter({
174
+ value: value,
175
+ field: field.field,
176
+ fields: chartConfig.columns,
290
177
  });
291
- setLoading(false);
292
- return [3 /*break*/, 4];
293
- case 3:
294
- e_1 = _c.sent();
295
- console.log('Error fetching chart: ', e_1);
296
- setLoading(false);
297
- return [3 /*break*/, 4];
298
- case 4:
299
- return [2 /*return*/];
300
178
  }
301
- });
179
+ return fieldsWithFormattedValues;
302
180
  });
303
- }
304
- if (chartId && !chartConfig) {
305
- getChartOptions(chartId);
306
- }
307
- return function () {
308
- isSubscribed = false;
309
- };
310
- },
311
- [chartConfig]
312
- );
313
- var NUM_TO_SHOW = (
314
- containerStyle === null || containerStyle === void 0
315
- ? void 0
316
- : containerStyle.height
317
- )
318
- ? Math.floor(containerStyle.height / 40) - 1
319
- : 6;
320
- var memoizedData = useMemo(
321
- function () {
322
- // Deep copy of data
323
- var copiedData = JSON.parse(
324
- JSON.stringify(
325
- chartConfig && chartConfig.rows && chartConfig.rows.length
326
- ? chartConfig.rows
327
- : []
328
- )
329
- );
330
- return copiedData.slice(0, NUM_TO_SHOW).map(function (item) {
331
- var fieldsWithFormattedValues = {};
332
- for (var _i = 0, _a = chartConfig.columns; _i < _a.length; _i++) {
333
- var field = _a[_i];
334
- var value = item[field.field];
335
- fieldsWithFormattedValues[field.field] = valueFormatter({
336
- value: value,
337
- field: field.field,
338
- fields: chartConfig.columns,
339
- });
340
- }
341
- return fieldsWithFormattedValues;
342
- });
343
- },
344
- [chartConfig, NUM_TO_SHOW]
345
- );
346
- var handleDownloadCSV = function () {
347
- downloadCSV(memoizedData, chartConfig.name);
348
- };
349
- if (!chartConfig || loading || !memoizedData.length) {
350
- return _jsx(
351
- 'div',
352
- __assign(
353
- {
354
- // className="flex flex-col flex-1 h-[100%]"
355
- style: __assign(__assign({}, containerStyle), {
356
- marginLeft: 25,
357
- marginRight: 25,
181
+ }, [chartConfig, NUM_TO_SHOW]);
182
+ var handleDownloadCSV = function () {
183
+ downloadCSV(memoizedData, chartConfig.name);
184
+ };
185
+ if (!chartConfig || loading || !memoizedData.length) {
186
+ return (_jsx("div", __assign({
187
+ // className="flex flex-col flex-1 h-[100%]"
188
+ style: __assign(__assign({}, containerStyle), { marginLeft: 25, marginRight: 25, boxSizing: 'content-box', height: '100%', display: 'flex', flexDirection: 'column', flex: 1 }) }, { children: _jsx("div", __assign({ style: {
189
+ height: (containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.height) || 300,
190
+ width: '100%',
191
+ boxSizing: 'content-box',
192
+ } }, { children: _jsx(Skeleton, { count: 1,
193
+ // height={containerStyle?.height}
194
+ height: (containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.height) && (containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.marginTop)
195
+ ? (containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.height) + (containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.marginTop)
196
+ : (containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.height)
197
+ ? containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.height
198
+ : 300, borderRadius: 8,
199
+ // highlightColor="#F7F7F8"
200
+ highlightColor: "#FDFDFD",
201
+ // baseColor="#F3F4F6"
202
+ baseColor: "#F9F9FA", width: "100%" }) })) })));
203
+ }
204
+ return (_jsx("div", __assign({ style: {
358
205
  boxSizing: 'content-box',
359
- height: '100%',
206
+ height: (containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.height) || '100%',
207
+ marginTop: 20,
208
+ // overflow: 'hidden',
360
209
  display: 'flex',
210
+ marginLeft: '1rem',
361
211
  flexDirection: 'column',
362
- flex: 1,
363
- }),
364
- },
365
- {
366
- children: _jsx(
367
- 'div',
368
- __assign(
369
- {
370
- style: {
371
- height:
372
- (containerStyle === null || containerStyle === void 0
373
- ? void 0
374
- : containerStyle.height) || 300,
375
- width: '100%',
376
- boxSizing: 'content-box',
377
- },
378
- },
379
- {
380
- children: _jsx(Skeleton, {
381
- count: 1,
382
- // height={containerStyle?.height}
383
- height:
384
- (containerStyle === null || containerStyle === void 0
385
- ? void 0
386
- : containerStyle.height) &&
387
- (containerStyle === null || containerStyle === void 0
388
- ? void 0
389
- : containerStyle.marginTop)
390
- ? (containerStyle === null || containerStyle === void 0
391
- ? void 0
392
- : containerStyle.height) +
393
- (containerStyle === null || containerStyle === void 0
394
- ? void 0
395
- : containerStyle.marginTop)
396
- : (
397
- containerStyle === null || containerStyle === void 0
398
- ? void 0
399
- : containerStyle.height
400
- )
401
- ? containerStyle === null || containerStyle === void 0
402
- ? void 0
403
- : containerStyle.height
404
- : 300,
405
- borderRadius: 8,
406
- // highlightColor="#F7F7F8"
407
- highlightColor: '#FDFDFD',
408
- // baseColor="#F3F4F6"
409
- baseColor: '#F9F9FA',
410
- width: '100%',
411
- }),
412
- }
413
- )
414
- ),
415
- }
416
- )
417
- );
418
- }
419
- return _jsx(
420
- 'div',
421
- __assign(
422
- {
423
- style: {
424
- boxSizing: 'content-box',
425
- height:
426
- (containerStyle === null || containerStyle === void 0
427
- ? void 0
428
- : containerStyle.height) || '100%',
429
- marginTop: 20,
430
- // overflow: 'hidden',
431
- display: 'flex',
432
- marginLeft: '1rem',
433
- flexDirection: 'column',
434
- // justifyContent: 'space-between',
435
- },
436
- },
437
- {
438
- children: _jsx(Columns, {
439
- columns: chartConfig.columns,
440
- data: memoizedData,
441
- theme: theme,
442
- handleDownloadCSV: handleDownloadCSV,
443
- numToShow: NUM_TO_SHOW,
444
- }),
445
- }
446
- )
447
- );
212
+ // justifyContent: 'space-between',
213
+ } }, { children: _jsx(Columns, { columns: chartConfig.columns, data: memoizedData, theme: theme, handleDownloadCSV: handleDownloadCSV, numToShow: NUM_TO_SHOW }) })));
448
214
  };
449
215
  function Columns(_a) {
450
- var columns = _a.columns,
451
- data = _a.data,
452
- theme = _a.theme,
453
- handleDownloadCSV = _a.handleDownloadCSV,
454
- numToShow = _a.numToShow;
455
- return _jsxs(
456
- 'div',
457
- __assign(
458
- { style: { display: 'flex', flexDirection: 'column', height: '100%' } },
459
- {
460
- children: [
461
- _jsx(
462
- 'div',
463
- __assign(
464
- {
465
- style: {
466
- display: 'flex',
467
- flexDirection: 'row',
468
- // overflowX: 'scroll',
469
- // overflowY: 'hidden',
470
- overflow: 'scroll',
471
- height: '100%',
472
- },
473
- },
474
- {
475
- children: columns.map(function (elem) {
476
- return _jsx(
477
- Column,
478
- { column: elem, data: data, theme: theme },
479
- elem.field
480
- );
481
- }),
482
- }
483
- )
484
- ),
485
- _jsxs(
486
- 'div',
487
- __assign(
488
- {
489
- style: {
490
- display: 'flex',
491
- flexDirection: 'row',
492
- alignItems: 'center',
493
- justifyContent: 'space-between',
494
- // background: 'black',
495
- },
496
- },
497
- {
498
- children: [
499
- data.length > numToShow &&
500
- _jsxs(
501
- 'div',
502
- __assign(
503
- {
504
- style: {
505
- color:
506
- theme === null || theme === void 0
507
- ? void 0
508
- : theme.chartLabelColor,
216
+ var columns = _a.columns, data = _a.data, theme = _a.theme, handleDownloadCSV = _a.handleDownloadCSV, numToShow = _a.numToShow;
217
+ return (_jsxs("div", __assign({ style: { display: 'flex', flexDirection: 'column', height: '100%' } }, { children: [_jsx("div", __assign({ style: {
218
+ display: 'flex',
219
+ flexDirection: 'row',
220
+ // overflowX: 'scroll',
221
+ // overflowY: 'hidden',
222
+ overflow: 'scroll',
223
+ height: '100%',
224
+ } }, { children: columns.map(function (elem) { return (_jsx(Column, { column: elem, data: data, theme: theme }, elem.field)); }) })), _jsxs("div", __assign({ style: {
225
+ display: 'flex',
226
+ flexDirection: 'row',
227
+ alignItems: 'center',
228
+ justifyContent: 'space-between',
229
+ // background: 'black',
230
+ } }, { children: [data.length > numToShow && (_jsxs("div", __assign({ style: {
231
+ color: theme === null || theme === void 0 ? void 0 : theme.chartLabelColor,
509
232
  boxSizing: 'content-box',
510
- fontFamily:
511
- (theme === null || theme === void 0
512
- ? void 0
513
- : theme.chartLabelFontFamily) ||
514
- (theme === null || theme === void 0
515
- ? void 0
516
- : theme.fontFamily),
517
- fontSize:
518
- (theme === null || theme === void 0
519
- ? void 0
520
- : theme.fontSizeSmall) || '0.875rem',
233
+ fontFamily: (theme === null || theme === void 0 ? void 0 : theme.chartLabelFontFamily) || (theme === null || theme === void 0 ? void 0 : theme.fontFamily),
234
+ fontSize: (theme === null || theme === void 0 ? void 0 : theme.fontSizeSmall) || '0.875rem',
521
235
  marginLeft: 12,
522
236
  marginTop: 8,
523
- },
524
- },
525
- { children: ['...', data.length - numToShow, ' more'] }
526
- )
527
- ),
528
- _jsx(
529
- 'div',
530
- __assign(
531
- {
532
- onClick: handleDownloadCSV,
533
- style: {
534
- height: 40,
535
- minHeight: 40,
536
- color:
537
- theme === null || theme === void 0
538
- ? void 0
539
- : theme.primaryTextColor,
540
- boxSizing: 'content-box',
541
- fontFamily:
542
- (theme === null || theme === void 0
543
- ? void 0
544
- : theme.chartLabelFontFamily) ||
545
- (theme === null || theme === void 0
546
- ? void 0
547
- : theme.fontFamily),
548
- fontSize:
549
- (theme === null || theme === void 0
550
- ? void 0
551
- : theme.fontSizeSmall) || '0.875rem',
552
- fontWeight:
553
- (theme === null || theme === void 0
554
- ? void 0
555
- : theme.fontWeightMedium) || '500',
556
- marginTop: 8,
557
- marginLeft: 20,
558
- cursor: 'pointer',
559
- },
560
- },
561
- { children: 'Download CSV' }
562
- )
563
- ),
564
- ],
565
- }
566
- )
567
- ),
568
- ],
569
- }
570
- )
571
- );
237
+ } }, { children: ["...", data.length - numToShow, " more"] }))), _jsx("div", __assign({ onClick: handleDownloadCSV, style: {
238
+ height: 40,
239
+ minHeight: 40,
240
+ color: theme === null || theme === void 0 ? void 0 : theme.primaryTextColor,
241
+ boxSizing: 'content-box',
242
+ fontFamily: (theme === null || theme === void 0 ? void 0 : theme.chartLabelFontFamily) || (theme === null || theme === void 0 ? void 0 : theme.fontFamily),
243
+ fontSize: (theme === null || theme === void 0 ? void 0 : theme.fontSizeSmall) || '0.875rem',
244
+ fontWeight: (theme === null || theme === void 0 ? void 0 : theme.fontWeightMedium) || '500',
245
+ marginTop: 8,
246
+ marginLeft: 20,
247
+ cursor: 'pointer',
248
+ } }, { children: "Download CSV" }))] }))] })));
572
249
  }
573
250
  function Column(_a) {
574
- var column = _a.column,
575
- data = _a.data,
576
- theme = _a.theme;
577
- return _jsxs(
578
- 'div',
579
- __assign(
580
- {
581
- style: {
582
- paddingLeft: 20,
583
- paddingRight: 20,
584
- // width: 'max-content',
585
- display: 'inline-flex',
586
- flexDirection: 'column',
587
- whiteSpace: 'nowrap',
588
- },
589
- },
590
- {
591
- children: [
592
- _jsx(
593
- 'div',
594
- __assign(
595
- {
596
- style: {
597
- height: 40,
598
- minHeight: 40,
599
- color:
600
- theme === null || theme === void 0
601
- ? void 0
602
- : theme.primaryTextColor,
603
- boxSizing: 'content-box',
604
- fontFamily:
605
- (theme === null || theme === void 0
606
- ? void 0
607
- : theme.chartLabelFontFamily) ||
608
- (theme === null || theme === void 0
609
- ? void 0
610
- : theme.fontFamily),
611
- fontSize:
612
- (theme === null || theme === void 0
613
- ? void 0
614
- : theme.fontSizeSmall) || '0.875rem',
615
- fontWeight:
616
- (theme === null || theme === void 0
617
- ? void 0
618
- : theme.fontWeightMedium) || '500',
619
- },
620
- },
621
- { children: column.label }
622
- )
623
- ),
624
- data.map(function (elem) {
625
- return _jsx(Cell, { item: elem[column.field], theme: theme });
626
- }),
627
- ],
628
- }
629
- )
630
- );
251
+ var column = _a.column, data = _a.data, theme = _a.theme;
252
+ return (_jsxs("div", __assign({ style: {
253
+ paddingLeft: 20,
254
+ paddingRight: 20,
255
+ // width: 'max-content',
256
+ display: 'inline-flex',
257
+ flexDirection: 'column',
258
+ whiteSpace: 'nowrap',
259
+ } }, { children: [_jsx("div", __assign({ style: {
260
+ height: 40,
261
+ minHeight: 40,
262
+ color: theme === null || theme === void 0 ? void 0 : theme.primaryTextColor,
263
+ boxSizing: 'content-box',
264
+ fontFamily: (theme === null || theme === void 0 ? void 0 : theme.chartLabelFontFamily) || (theme === null || theme === void 0 ? void 0 : theme.fontFamily),
265
+ fontSize: (theme === null || theme === void 0 ? void 0 : theme.fontSizeSmall) || '0.875rem',
266
+ fontWeight: (theme === null || theme === void 0 ? void 0 : theme.fontWeightMedium) || '500',
267
+ } }, { children: column.label })), data.map(function (elem) { return (_jsx(Cell, { item: elem[column.field], theme: theme })); })] })));
631
268
  }
632
269
  function Cell(_a) {
633
- var item = _a.item,
634
- theme = _a.theme;
635
- return _jsx(
636
- 'div',
637
- __assign(
638
- {
639
- style: {
640
- height: 40,
641
- minHeight: 40,
642
- whiteSpace: 'nowrap',
643
- width: '100%',
644
- fontFamily:
645
- (theme === null || theme === void 0
646
- ? void 0
647
- : theme.chartLabelFontFamily) ||
648
- (theme === null || theme === void 0 ? void 0 : theme.fontFamily),
649
- fontSize:
650
- (theme === null || theme === void 0
651
- ? void 0
652
- : theme.fontSizeSmall) || '0.875rem',
653
- color:
654
- theme === null || theme === void 0 ? void 0 : theme.chartLabelColor,
655
- },
656
- },
657
- { children: item }
658
- )
659
- );
270
+ var item = _a.item, theme = _a.theme;
271
+ return (_jsx("div", __assign({ style: {
272
+ height: 40,
273
+ minHeight: 40,
274
+ whiteSpace: 'nowrap',
275
+ width: '100%',
276
+ fontFamily: (theme === null || theme === void 0 ? void 0 : theme.chartLabelFontFamily) || (theme === null || theme === void 0 ? void 0 : theme.fontFamily),
277
+ fontSize: (theme === null || theme === void 0 ? void 0 : theme.fontSizeSmall) || '0.875rem',
278
+ color: theme === null || theme === void 0 ? void 0 : theme.chartLabelColor,
279
+ } }, { children: item })));
660
280
  }
661
281
  export default Table;
662
- //# sourceMappingURL=Table.js.map
282
+ //# sourceMappingURL=Table.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "1.4.9",
3
+ "version": "1.5.0",
4
4
  "access": "public",
5
5
  "description": "Quill React components for building dashboards and reporting.",
6
6
  "main": "lib/index.js",
package/src/Dashboard.tsx CHANGED
@@ -17,6 +17,7 @@ interface DashboardProps {
17
17
  maxColumnWidth?: number;
18
18
  rowHeight?: number;
19
19
  onClickDashboardItem?: (item: any) => void;
20
+ hideDateFilter?: boolean;
20
21
  }
21
22
 
22
23
  // const theme = {
@@ -34,6 +35,7 @@ export default function Dashboard({
34
35
  maxColumnWidth,
35
36
  rowHeight,
36
37
  onClickDashboardItem,
38
+ hideDateFilter,
37
39
  }: DashboardProps) {
38
40
  const [dashboardSections, setDashboardSections] = useState<any>(null);
39
41
  const { dashboard } = useContext(DashboardContext);
@@ -108,14 +110,16 @@ export default function Dashboard({
108
110
  }
109
111
  return (
110
112
  <div style={containerStyle}>
111
- <div style={{ width: 420, marginBottom: 25, marginLeft: 25 }}>
112
- <DateRangePicker
113
- // change to be set on the dashboard / section as default date range
114
- defaultValue={[undefined, undefined, '90d']}
115
- onValueChange={onChangeDateFilter}
116
- theme={theme}
117
- />
118
- </div>
113
+ {!hideDateFilter ? (
114
+ <div style={{ width: 420, marginBottom: 25, marginLeft: 25 }}>
115
+ <DateRangePicker
116
+ // change to be set on the dashboard / section as default date range
117
+ defaultValue={[undefined, undefined, '90d']}
118
+ onValueChange={onChangeDateFilter}
119
+ theme={theme}
120
+ />
121
+ </div>
122
+ ) : null}
119
123
  {Object.keys(dashboardSections)
120
124
  .sort(function (a, b) {
121
125
  return a.length - b.length;