@quillsql/react 2.11.30 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Chart.d.ts +25 -18
- package/dist/cjs/Chart.d.ts.map +1 -1
- package/dist/cjs/Chart.js +25 -17
- package/dist/cjs/ChartBuilder.d.ts +9 -5
- package/dist/cjs/ChartBuilder.d.ts.map +1 -1
- package/dist/cjs/ChartBuilder.js +34 -38
- package/dist/cjs/ChartEditor.d.ts +10 -6
- package/dist/cjs/ChartEditor.d.ts.map +1 -1
- package/dist/cjs/ChartEditor.js +11 -9
- package/dist/cjs/Dashboard.d.ts +53 -38
- package/dist/cjs/Dashboard.d.ts.map +1 -1
- package/dist/cjs/Dashboard.js +36 -17
- package/dist/cjs/ReportBuilder.d.ts +3 -3
- package/dist/cjs/ReportBuilder.d.ts.map +1 -1
- package/dist/cjs/ReportBuilder.js +20 -22
- package/dist/cjs/SQLEditor.d.ts +5 -5
- package/dist/cjs/SQLEditor.d.ts.map +1 -1
- package/dist/cjs/SQLEditor.js +2 -2
- package/dist/cjs/Table.d.ts +6 -6
- package/dist/cjs/Table.d.ts.map +1 -1
- package/dist/cjs/Table.js +14 -12
- package/dist/cjs/components/Chart/BarChart.d.ts.map +1 -1
- package/dist/cjs/components/Chart/BarChart.js +8 -1
- package/dist/cjs/components/Chart/ChartSkeleton.d.ts +2 -1
- package/dist/cjs/components/Chart/ChartSkeleton.d.ts.map +1 -1
- package/dist/cjs/components/Chart/ChartSkeleton.js +5 -1
- package/dist/cjs/components/Dashboard/ChartComponent.d.ts +2 -2
- package/dist/cjs/components/Dashboard/ChartComponent.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/ChartComponent.js +4 -4
- package/dist/cjs/components/Dashboard/DashboardFilter.d.ts +12 -1
- package/dist/cjs/components/Dashboard/DashboardFilter.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/DashboardFilter.js +26 -2
- package/dist/cjs/components/Dashboard/DataLoader.d.ts +2 -2
- package/dist/cjs/components/Dashboard/DataLoader.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/DataLoader.js +3 -0
- package/dist/cjs/components/Dashboard/MetricComponent.d.ts +2 -2
- package/dist/cjs/components/Dashboard/MetricComponent.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/MetricComponent.js +6 -6
- package/dist/cjs/components/Dashboard/TableComponent.d.ts +2 -2
- package/dist/cjs/components/Dashboard/TableComponent.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/TableComponent.js +6 -6
- package/dist/cjs/components/QuillMultiSelect.d.ts +11 -0
- package/dist/cjs/components/QuillMultiSelect.d.ts.map +1 -0
- package/dist/cjs/components/QuillMultiSelect.js +183 -0
- package/dist/cjs/components/QuillSelect.d.ts.map +1 -1
- package/dist/cjs/components/QuillSelect.js +0 -1
- package/dist/cjs/components/ReportBuilder/ui.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/ui.js +1 -0
- package/dist/cjs/components/UiComponents.d.ts +10 -0
- package/dist/cjs/components/UiComponents.d.ts.map +1 -1
- package/dist/cjs/components/UiComponents.js +15 -17
- package/dist/cjs/hooks/useExport.d.ts +1 -1
- package/dist/cjs/hooks/useExport.d.ts.map +1 -1
- package/dist/cjs/hooks/useExport.js +2 -2
- package/dist/cjs/hooks/useFormat.d.ts +1 -1
- package/dist/cjs/hooks/useFormat.d.ts.map +1 -1
- package/dist/cjs/hooks/useFormat.js +2 -2
- package/dist/cjs/hooks/useQuill.d.ts +2 -2
- package/dist/cjs/hooks/useQuill.d.ts.map +1 -1
- package/dist/cjs/hooks/useQuill.js +12 -11
- package/dist/cjs/index.d.ts +1 -3
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/models/Filter.d.ts +7 -0
- package/dist/cjs/models/Filter.d.ts.map +1 -0
- package/dist/cjs/models/Filter.js +2 -0
- package/dist/cjs/utils/dashboard.d.ts +2 -2
- package/dist/cjs/utils/dashboard.d.ts.map +1 -1
- package/dist/cjs/utils/dashboard.js +2 -14
- package/dist/cjs/utils/errorProcessing.d.ts +2 -0
- package/dist/cjs/utils/errorProcessing.d.ts.map +1 -0
- package/dist/cjs/utils/errorProcessing.js +12 -0
- package/dist/cjs/utils/valueFormatter.js +1 -1
- package/dist/esm/Chart.d.ts +25 -18
- package/dist/esm/Chart.d.ts.map +1 -1
- package/dist/esm/Chart.js +25 -17
- package/dist/esm/ChartBuilder.d.ts +9 -5
- package/dist/esm/ChartBuilder.d.ts.map +1 -1
- package/dist/esm/ChartBuilder.js +35 -39
- package/dist/esm/ChartEditor.d.ts +10 -6
- package/dist/esm/ChartEditor.d.ts.map +1 -1
- package/dist/esm/ChartEditor.js +12 -10
- package/dist/esm/Dashboard.d.ts +53 -38
- package/dist/esm/Dashboard.d.ts.map +1 -1
- package/dist/esm/Dashboard.js +36 -17
- package/dist/esm/ReportBuilder.d.ts +3 -3
- package/dist/esm/ReportBuilder.d.ts.map +1 -1
- package/dist/esm/ReportBuilder.js +20 -22
- package/dist/esm/SQLEditor.d.ts +5 -5
- package/dist/esm/SQLEditor.d.ts.map +1 -1
- package/dist/esm/SQLEditor.js +2 -2
- package/dist/esm/Table.d.ts +6 -6
- package/dist/esm/Table.d.ts.map +1 -1
- package/dist/esm/Table.js +14 -12
- package/dist/esm/components/Chart/BarChart.d.ts.map +1 -1
- package/dist/esm/components/Chart/BarChart.js +8 -1
- package/dist/esm/components/Chart/ChartSkeleton.d.ts +2 -1
- package/dist/esm/components/Chart/ChartSkeleton.d.ts.map +1 -1
- package/dist/esm/components/Chart/ChartSkeleton.js +3 -1
- package/dist/esm/components/Dashboard/ChartComponent.d.ts +2 -2
- package/dist/esm/components/Dashboard/ChartComponent.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/ChartComponent.js +4 -4
- package/dist/esm/components/Dashboard/DashboardFilter.d.ts +12 -1
- package/dist/esm/components/Dashboard/DashboardFilter.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/DashboardFilter.js +26 -2
- package/dist/esm/components/Dashboard/DataLoader.d.ts +2 -2
- package/dist/esm/components/Dashboard/DataLoader.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/DataLoader.js +3 -0
- package/dist/esm/components/Dashboard/MetricComponent.d.ts +2 -2
- package/dist/esm/components/Dashboard/MetricComponent.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/MetricComponent.js +6 -6
- package/dist/esm/components/Dashboard/TableComponent.d.ts +2 -2
- package/dist/esm/components/Dashboard/TableComponent.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/TableComponent.js +6 -6
- package/dist/esm/components/QuillMultiSelect.d.ts +11 -0
- package/dist/esm/components/QuillMultiSelect.d.ts.map +1 -0
- package/dist/esm/components/QuillMultiSelect.js +178 -0
- package/dist/esm/components/QuillSelect.d.ts.map +1 -1
- package/dist/esm/components/QuillSelect.js +0 -1
- package/dist/esm/components/ReportBuilder/ui.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/ui.js +1 -0
- package/dist/esm/components/UiComponents.d.ts +10 -0
- package/dist/esm/components/UiComponents.d.ts.map +1 -1
- package/dist/esm/components/UiComponents.js +15 -17
- package/dist/esm/hooks/useExport.d.ts +1 -1
- package/dist/esm/hooks/useExport.d.ts.map +1 -1
- package/dist/esm/hooks/useExport.js +2 -2
- package/dist/esm/hooks/useFormat.d.ts +1 -1
- package/dist/esm/hooks/useFormat.d.ts.map +1 -1
- package/dist/esm/hooks/useFormat.js +2 -2
- package/dist/esm/hooks/useQuill.d.ts +2 -2
- package/dist/esm/hooks/useQuill.d.ts.map +1 -1
- package/dist/esm/hooks/useQuill.js +12 -11
- package/dist/esm/index.d.ts +1 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/models/Filter.d.ts +7 -0
- package/dist/esm/models/Filter.d.ts.map +1 -0
- package/dist/esm/models/Filter.js +1 -0
- package/dist/esm/utils/dashboard.d.ts +2 -2
- package/dist/esm/utils/dashboard.d.ts.map +1 -1
- package/dist/esm/utils/dashboard.js +2 -14
- package/dist/esm/utils/errorProcessing.d.ts +2 -0
- package/dist/esm/utils/errorProcessing.d.ts.map +1 -0
- package/dist/esm/utils/errorProcessing.js +8 -0
- package/dist/esm/utils/valueFormatter.js +1 -1
- package/package.json +1 -1
|
@@ -47,25 +47,22 @@ export const MemoizedButton = ({ label, onClick, icon, }) => {
|
|
|
47
47
|
whiteSpace: 'nowrap',
|
|
48
48
|
alignItems: 'center',
|
|
49
49
|
gap: 6,
|
|
50
|
+
borderRadius: 6,
|
|
51
|
+
color: 'white',
|
|
52
|
+
height: 38,
|
|
53
|
+
border: '1px solid transparent',
|
|
54
|
+
fontWeight: theme.buttonFontWeight ?? 600,
|
|
55
|
+
boxSizing: 'content-box',
|
|
56
|
+
paddingLeft: 16,
|
|
57
|
+
paddingRight: 16,
|
|
58
|
+
cursor: 'pointer',
|
|
50
59
|
}, children: [_jsx("style", { children: `
|
|
51
|
-
|
|
60
|
+
.quill-button {
|
|
52
61
|
background-color: #212121;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
border-radius: 6px;
|
|
58
|
-
box-sizing: content-box;
|
|
59
|
-
padding-left: 16px;
|
|
60
|
-
padding-right: 16px;
|
|
61
|
-
font-size: 14px;
|
|
62
|
-
white-space: nowrap;
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
}
|
|
65
|
-
.quill-button:hover {
|
|
66
|
-
background-color: rgba(56, 65, 81, 0.9);
|
|
67
|
-
border-radius: 6px;
|
|
68
|
-
}` }), icon, label] }));
|
|
62
|
+
}
|
|
63
|
+
.quill-button:hover {
|
|
64
|
+
background-color: rgba(56, 65, 81, 0.9);
|
|
65
|
+
}` }), icon, label] }));
|
|
69
66
|
};
|
|
70
67
|
export const MemoizedSecondaryButton = ({ label, onClick, icon, }) => {
|
|
71
68
|
const theme = useTheme();
|
|
@@ -290,6 +287,7 @@ export function MemoizedModal({ isOpen, setIsOpen, title, children, width, heigh
|
|
|
290
287
|
position: 'relative',
|
|
291
288
|
fontFamily: theme?.fontFamily,
|
|
292
289
|
}, children: [_jsxs("div", { id: "quill-modal-header", style: {
|
|
290
|
+
boxSizing: 'border-box',
|
|
293
291
|
display: 'flex',
|
|
294
292
|
flexDirection: 'row',
|
|
295
293
|
width: '100%',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExport.d.ts","sourceRoot":"","sources":["../../../src/hooks/useExport.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"useExport.d.ts","sourceRoot":"","sources":["../../../src/hooks/useExport.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,SAAS,aAAc,MAAM;;;CAYzC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { downloadCSV } from '../utils/csv';
|
|
2
2
|
import { useQuill } from '../hooks/useQuill';
|
|
3
|
-
export const useExport = (
|
|
4
|
-
const chartData = useQuill(
|
|
3
|
+
export const useExport = (reportId) => {
|
|
4
|
+
const chartData = useQuill(reportId).data;
|
|
5
5
|
if (!chartData)
|
|
6
6
|
return { downloadCSV: () => { }, downloadPDF: () => { } };
|
|
7
7
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormat.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFormat.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"useFormat.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFormat.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,aAChB,MAAM,KACf;IAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAwBjC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { quillFormat } from '../utils/valueFormatter';
|
|
2
2
|
import { useQuill } from './useQuill';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
export const useMemoizedRows = (
|
|
5
|
-
const { data } = useQuill(
|
|
4
|
+
export const useMemoizedRows = (reportId) => {
|
|
5
|
+
const { data } = useQuill(reportId);
|
|
6
6
|
const formattedRows = useMemo(() => {
|
|
7
7
|
if (!data || !data.rows || !data.columns)
|
|
8
8
|
return { rows: [], loading: true };
|
|
@@ -19,7 +19,7 @@ interface YAxisField {
|
|
|
19
19
|
chartType: string;
|
|
20
20
|
format: string;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
interface QuillReport {
|
|
23
23
|
name: string;
|
|
24
24
|
rows: any[];
|
|
25
25
|
columns: Array<Column>;
|
|
@@ -38,7 +38,7 @@ export interface QuillReport {
|
|
|
38
38
|
pivot: object;
|
|
39
39
|
referencedTables: string[];
|
|
40
40
|
}
|
|
41
|
-
export declare const useQuill: (
|
|
41
|
+
export declare const useQuill: (reportId: string) => {
|
|
42
42
|
data: QuillReport | null;
|
|
43
43
|
loading: boolean;
|
|
44
44
|
error: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuill.d.ts","sourceRoot":"","sources":["../../../src/hooks/useQuill.ts"],"names":[],"mappings":"AAUA,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM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AAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,eAAO,MAAM,QAAQ,aACT,MAAM;UAEV,WAAW,GAAG,IAAI;aACf,OAAO;WACT,MAAM,GAAG,IAAI;CAkFrB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
import { useContext, useEffect, useState } from 'react';
|
|
3
2
|
import { ClientContext, DashboardContext, DashboardFiltersContext, } from '../Context';
|
|
4
3
|
import { getData } from '../utils/dataFetcher';
|
|
5
4
|
import { mergeComparisonRange } from '../utils/merge';
|
|
6
|
-
|
|
5
|
+
import { processFilterErrorList } from '../utils/errorProcessing';
|
|
6
|
+
export const useQuill = (reportId) => {
|
|
7
7
|
const { dashboard, dispatch } = useContext(DashboardContext);
|
|
8
8
|
const { dashboardFilters } = useContext(DashboardFiltersContext);
|
|
9
9
|
const [client] = useContext(ClientContext);
|
|
@@ -14,19 +14,19 @@ export const useQuill = (chartId) => {
|
|
|
14
14
|
let isSubscribed = true;
|
|
15
15
|
async function getChartOptions() {
|
|
16
16
|
if (isSubscribed) {
|
|
17
|
-
if (dashboard && dashboard[
|
|
17
|
+
if (dashboard && dashboard[reportId]) {
|
|
18
18
|
setLoading(false);
|
|
19
|
-
if (dashboard[
|
|
20
|
-
mergeComparisonRange(dashboard[
|
|
19
|
+
if (dashboard[reportId].compareRows) {
|
|
20
|
+
mergeComparisonRange(dashboard[reportId]);
|
|
21
21
|
}
|
|
22
|
-
setData({ ...dashboard[
|
|
22
|
+
setData({ ...dashboard[reportId] });
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
try {
|
|
26
26
|
setLoading(true);
|
|
27
27
|
const hostedBody = {
|
|
28
28
|
metadata: {
|
|
29
|
-
dashboardItemId:
|
|
29
|
+
dashboardItemId: reportId,
|
|
30
30
|
orgId: client.customerId || '*',
|
|
31
31
|
clientId: client.publicKey,
|
|
32
32
|
task: 'item',
|
|
@@ -35,10 +35,11 @@ export const useQuill = (chartId) => {
|
|
|
35
35
|
},
|
|
36
36
|
};
|
|
37
37
|
const cloudBody = {
|
|
38
|
-
id:
|
|
38
|
+
id: reportId,
|
|
39
39
|
filters: [...Object.values(dashboardFilters)],
|
|
40
40
|
};
|
|
41
41
|
const resp = await getData(client, 'itempost', 'same-origin', hostedBody, cloudBody);
|
|
42
|
+
processFilterErrorList(resp);
|
|
42
43
|
if (resp) {
|
|
43
44
|
if (resp.name === 'error' || resp.errorMessage) {
|
|
44
45
|
setError(JSON.stringify(resp));
|
|
@@ -50,7 +51,7 @@ export const useQuill = (chartId) => {
|
|
|
50
51
|
setData(resp);
|
|
51
52
|
dispatch({
|
|
52
53
|
type: 'UPDATE_DASHBOARD_ITEM',
|
|
53
|
-
id:
|
|
54
|
+
id: reportId,
|
|
54
55
|
data: { ...resp, filtersApplied: dashboardFilters },
|
|
55
56
|
});
|
|
56
57
|
}
|
|
@@ -68,13 +69,13 @@ export const useQuill = (chartId) => {
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
if (
|
|
72
|
+
if (reportId) {
|
|
72
73
|
getChartOptions();
|
|
73
74
|
}
|
|
74
75
|
return () => {
|
|
75
76
|
isSubscribed = false;
|
|
76
77
|
};
|
|
77
|
-
}, [
|
|
78
|
+
}, [reportId, dashboard]);
|
|
78
79
|
return { data, loading, error };
|
|
79
80
|
};
|
|
80
81
|
function stringifyIfObject(e) {
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Dashboard } from './Dashboard';
|
|
2
|
-
export type { DashboardProps,
|
|
2
|
+
export type { DashboardProps, QuillReportProps, QuillReport, AxisFormat, } from './Dashboard';
|
|
3
3
|
export { default as QuillProvider } from './QuillProvider';
|
|
4
4
|
export type { QuillProviderProps, QuillTheme } from './QuillProvider';
|
|
5
5
|
export { default as Chart } from './Chart';
|
|
@@ -10,8 +10,6 @@ export { default as SQLEditor, SchemaListComponent } from './SQLEditor';
|
|
|
10
10
|
export type { SQLEditorProps } from './SQLEditor';
|
|
11
11
|
export { default as ReportBuilder } from './ReportBuilder';
|
|
12
12
|
export type { ReportBuilderProps } from './ReportBuilder';
|
|
13
|
-
export { default as ChartBuilder } from './ChartBuilder';
|
|
14
|
-
export type { ChartBuilderProps } from './ChartBuilder';
|
|
15
13
|
export { default as ChartEditor } from './ChartEditor';
|
|
16
14
|
export type { ChartEditorProps } from './ChartEditor';
|
|
17
15
|
export { quillFormat as format } from './utils/valueFormatter';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EACV,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxE,YAAY,EAAE,cAAc,EAAE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chart } from './Chart';
|
|
|
5
5
|
export { default as Table } from './Table';
|
|
6
6
|
export { default as SQLEditor, SchemaListComponent } from './SQLEditor';
|
|
7
7
|
export { default as ReportBuilder } from './ReportBuilder';
|
|
8
|
-
export { default as ChartBuilder } from './ChartBuilder';
|
|
9
8
|
export { default as ChartEditor } from './ChartEditor';
|
|
10
9
|
export { quillFormat as format } from './utils/valueFormatter';
|
|
11
10
|
export { useDashboard } from './hooks/useDashboard';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../../src/models/Filter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuillReport } from '../Dashboard';
|
|
2
2
|
/**
|
|
3
3
|
* Returns a cleaned version of the dashboard item we store in state. We clean
|
|
4
4
|
* the dashboard item so that we aren't exposing unnecessary details to the
|
|
@@ -8,5 +8,5 @@ import { DashboardItem } from '../Dashboard';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function cleanDashboardItem(item: {
|
|
10
10
|
[key: string]: any;
|
|
11
|
-
} | undefined, dashboardFilters: any):
|
|
11
|
+
} | undefined, dashboardFilters: any): QuillReport;
|
|
12
12
|
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/utils/dashboard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/utils/dashboard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA6B3C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,SAAS,EACxC,gBAAgB,EAAE,GAAG,GACpB,WAAW,CAmCb"}
|
|
@@ -12,7 +12,7 @@ const defaultDashboardItem = {
|
|
|
12
12
|
pivot: null,
|
|
13
13
|
primaryAggregation: '',
|
|
14
14
|
comparisonAggregation: '',
|
|
15
|
-
aggregationPercentChange:
|
|
15
|
+
aggregationPercentChange: undefined,
|
|
16
16
|
yAxisFields: [],
|
|
17
17
|
xAxisLabel: '',
|
|
18
18
|
xAxisField: '',
|
|
@@ -79,7 +79,7 @@ function getAggragations(pivotTable, item) {
|
|
|
79
79
|
return {
|
|
80
80
|
primaryAggregation: formatAggragation(item, primary),
|
|
81
81
|
comparisonAggregation: formatAggragation(item, comparison),
|
|
82
|
-
aggregationPercentChange:
|
|
82
|
+
aggregationPercentChange: Number(primary - comparison),
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
@@ -94,18 +94,6 @@ function formatAggragation(item, value) {
|
|
|
94
94
|
fields: item.yAxisFields,
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Formats the percentage change from a to b with the sign included.
|
|
99
|
-
*/
|
|
100
|
-
function formatPercentageWithSign(a, b) {
|
|
101
|
-
const formatter = new Intl.NumberFormat('en-US', {
|
|
102
|
-
style: 'percent',
|
|
103
|
-
signDisplay: 'exceptZero',
|
|
104
|
-
minimumFractionDigits: 2,
|
|
105
|
-
maximumFractionDigits: 2,
|
|
106
|
-
});
|
|
107
|
-
return formatter.format(Number(b - a));
|
|
108
|
-
}
|
|
109
97
|
/**
|
|
110
98
|
* Extract and transform the data from itemInfo.
|
|
111
99
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorProcessing.d.ts","sourceRoot":"","sources":["../../../src/utils/errorProcessing.ts"],"names":[],"mappings":"AAAA,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,QAO/C"}
|
|
@@ -99,7 +99,7 @@ export const quillFormat = ({ value, format, }) => {
|
|
|
99
99
|
* Formats the value as a string using the built-in converstion.
|
|
100
100
|
*/
|
|
101
101
|
const formatString = (value) => {
|
|
102
|
-
if (
|
|
102
|
+
if (value === null || value === undefined) {
|
|
103
103
|
return 'null';
|
|
104
104
|
}
|
|
105
105
|
if (typeof value === 'object') {
|