@quillsql/react 2.11.12 → 2.11.14
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/ChartBuilder.d.ts.map +1 -1
- package/dist/cjs/ChartBuilder.js +1 -1
- package/dist/cjs/Dashboard.js +1 -1
- package/dist/cjs/ReportBuilder.d.ts.map +1 -1
- package/dist/cjs/ReportBuilder.js +354 -197
- package/dist/cjs/SQLEditor.d.ts.map +1 -1
- package/dist/cjs/SQLEditor.js +1 -0
- package/dist/cjs/components/Chart/ChartTooltipFrame.d.ts.map +1 -1
- package/dist/cjs/components/Chart/ChartTooltipFrame.js +1 -0
- package/dist/cjs/components/Chart/LineChart.d.ts.map +1 -1
- package/dist/cjs/components/Chart/LineChart.js +3 -0
- package/dist/cjs/components/Dashboard/MetricComponent.js +2 -2
- package/dist/cjs/components/QuillCard.d.ts.map +1 -1
- package/dist/cjs/components/QuillCard.js +2 -4
- package/dist/cjs/components/QuillSelect.d.ts.map +1 -1
- package/dist/cjs/components/QuillSelect.js +7 -1
- package/dist/cjs/components/QuillTable.d.ts.map +1 -1
- package/dist/cjs/components/QuillTable.js +2 -2
- package/dist/cjs/components/ReportBuilder/AddColumnPopover.js +3 -3
- package/dist/cjs/components/ReportBuilder/AddLimitPopover.d.ts +3 -0
- package/dist/cjs/components/ReportBuilder/AddLimitPopover.d.ts.map +1 -0
- package/dist/cjs/components/ReportBuilder/AddLimitPopover.js +43 -0
- package/dist/cjs/components/ReportBuilder/AddSortPopover.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/AddSortPopover.js +10 -4
- package/dist/cjs/components/ReportBuilder/bigDateMap.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/bigDateMap.js +2 -1
- package/dist/cjs/components/ReportBuilder/convert.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/convert.js +38 -12
- package/dist/cjs/components/ReportBuilder/ui.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/ui.js +4 -3
- package/dist/cjs/components/ReportBuilder/util.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/util.js +7 -5
- package/dist/cjs/components/UiComponents.js +2 -2
- package/dist/cjs/internals/ReportBuilder/PivotList.d.ts.map +1 -1
- package/dist/cjs/internals/ReportBuilder/PivotList.js +28 -2
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts +2 -1
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/cjs/internals/ReportBuilder/PivotModal.js +49 -32
- package/dist/cjs/utils/getDomain.d.ts.map +1 -1
- package/dist/cjs/utils/getDomain.js +3 -0
- package/dist/esm/ChartBuilder.d.ts.map +1 -1
- package/dist/esm/ChartBuilder.js +1 -1
- package/dist/esm/Dashboard.js +1 -1
- package/dist/esm/ReportBuilder.d.ts.map +1 -1
- package/dist/esm/ReportBuilder.js +354 -197
- package/dist/esm/SQLEditor.d.ts.map +1 -1
- package/dist/esm/SQLEditor.js +1 -0
- package/dist/esm/components/Chart/ChartTooltipFrame.d.ts.map +1 -1
- package/dist/esm/components/Chart/ChartTooltipFrame.js +1 -0
- package/dist/esm/components/Chart/LineChart.d.ts.map +1 -1
- package/dist/esm/components/Chart/LineChart.js +3 -0
- package/dist/esm/components/Dashboard/MetricComponent.js +2 -2
- package/dist/esm/components/QuillCard.d.ts.map +1 -1
- package/dist/esm/components/QuillCard.js +2 -4
- package/dist/esm/components/QuillSelect.d.ts.map +1 -1
- package/dist/esm/components/QuillSelect.js +7 -1
- package/dist/esm/components/QuillTable.d.ts.map +1 -1
- package/dist/esm/components/QuillTable.js +2 -2
- package/dist/esm/components/ReportBuilder/AddColumnPopover.js +3 -3
- package/dist/esm/components/ReportBuilder/AddLimitPopover.d.ts +3 -0
- package/dist/esm/components/ReportBuilder/AddLimitPopover.d.ts.map +1 -0
- package/dist/esm/components/ReportBuilder/AddLimitPopover.js +38 -0
- package/dist/esm/components/ReportBuilder/AddSortPopover.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/AddSortPopover.js +10 -4
- package/dist/esm/components/ReportBuilder/bigDateMap.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/bigDateMap.js +2 -1
- package/dist/esm/components/ReportBuilder/convert.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/convert.js +38 -12
- package/dist/esm/components/ReportBuilder/ui.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/ui.js +4 -3
- package/dist/esm/components/ReportBuilder/util.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/util.js +7 -5
- package/dist/esm/components/UiComponents.js +2 -2
- package/dist/esm/internals/ReportBuilder/PivotList.d.ts.map +1 -1
- package/dist/esm/internals/ReportBuilder/PivotList.js +28 -2
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts +2 -1
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/esm/internals/ReportBuilder/PivotModal.js +49 -32
- package/dist/esm/utils/getDomain.d.ts.map +1 -1
- package/dist/esm/utils/getDomain.js +3 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SQLEditor.d.ts","sourceRoot":"","sources":["../../src/SQLEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAMN,MAAM,OAAO,CAAC;AAQf,OAAO,EAGL,mBAAmB,EACnB,mBAAmB,EAEpB,MAAM,2BAA2B,CAAC;AAInC,wBAAgB,qBAAqB,CAAC,MAAM,KAAA;;;;;EAwE3C;AA2BD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,cAAc;IACtB,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;IAEpC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,GAAG,CAAC,OAAO,CAAC;IAC/D,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAA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W,CAAC,EAAE,MAAM,CAAC;CACtB;AAuCD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,cAAoC,EACpC,eAAgC,EAChC,wBAAkD,EAClD,kBAAmC,EACnC,cAA2B,EAC3B,eAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,eAAe,EACf,cAAc,EACd,UAAkB,EAClB,mBAA2B,EAC3B,sBAA8B,EAC9B,oBAA4B,EAC5B,wBAAgC,EAChC,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,yBAA8C,EAC9C,aAAyB,EACzB,gBAA4B,EAC5B,0BAAkC,GACnC,EAAE,cAAc,2CA+WhB;AA6JD,eAAO,MAAM,mBAAmB;;;;;;;6CAuG/B,CAAC"}
|
package/dist/esm/SQLEditor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTooltipFrame.d.ts","sourceRoot":"","sources":["../../../../src/components/Chart/ChartTooltipFrame.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,GAAG,CAAC;CACZ,
|
|
1
|
+
{"version":3,"file":"ChartTooltipFrame.d.ts","sourceRoot":"","sources":["../../../../src/components/Chart/ChartTooltipFrame.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,GAAG,CAAC;CACZ,2CAmBA"}
|
|
@@ -8,6 +8,7 @@ export default function ChartTooltipFrame({ children, theme, }) {
|
|
|
8
8
|
background: theme?.backgroundColor || '#ffffff',
|
|
9
9
|
borderRadius: '6px',
|
|
10
10
|
zIndex: 40,
|
|
11
|
+
display: 'block',
|
|
11
12
|
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
|
12
13
|
}, children: children }));
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Chart/LineChart.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,MAAM,EACN,QAAa,EACb,WAAW,EACX,IAAI,EACJ,cAAc,EACd,UAAU,EACV,WAAW,EACX,KAAK,EACL,UAAU,EACV,iBAAwB,EACxB,SAAiB,EACjB,SAAiB,EACjB,iBAAyB,EACzB,gBAAwB,EACxB,gBAAwB,GACzB,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,KAAK,GAAG,MAAM,CAAC;CAClC,
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Chart/LineChart.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,MAAM,EACN,QAAa,EACb,WAAW,EACX,IAAI,EACJ,cAAc,EACd,UAAU,EACV,WAAW,EACX,KAAK,EACL,UAAU,EACV,iBAAwB,EACxB,SAAiB,EACjB,SAAiB,EACjB,iBAAyB,EACzB,gBAAwB,EACxB,gBAAwB,GACzB,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,KAAK,GAAG,MAAM,CAAC;CAClC,kDAgPA"}
|
|
@@ -50,6 +50,7 @@ export default function LineChart({ colors, colorMap = {}, yAxisFields, data, co
|
|
|
50
50
|
// Allows the users to override the color scheme on a per-chart basis.
|
|
51
51
|
const getCustomColor = (index, field, gradient) => {
|
|
52
52
|
let key = index === 0 ? 'primary' : 'comparison';
|
|
53
|
+
field = field.replace('comparison_', '');
|
|
53
54
|
if (colorMap && colorMap[field]) {
|
|
54
55
|
if (index === 0 && gradient === 'start')
|
|
55
56
|
key = 'primaryGradientStart';
|
|
@@ -110,12 +111,14 @@ export default function LineChart({ colors, colorMap = {}, yAxisFields, data, co
|
|
|
110
111
|
}, position: { y: 0 } }), yAxisFields.map((elem, index) => {
|
|
111
112
|
// hash the color stops so they're stable, valid html ids
|
|
112
113
|
const gradientStart = getCustomColor(index, elem.field, 'start') ??
|
|
114
|
+
getCustomColor(index, elem.field) ??
|
|
113
115
|
selectColor(elem, colors, index);
|
|
114
116
|
const gradientStop = getCustomColor(index, elem.field, 'stop') ?? '#00000000';
|
|
115
117
|
const uniqueId = `gradient_${hashCode(gradientStart)}_${hashCode(gradientStop)}`;
|
|
116
118
|
return (_jsx("defs", { children: _jsxs("linearGradient", { id: uniqueId, x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "5%", stopColor: gradientStart, stopOpacity: 0.4 }), _jsx("stop", { offset: "95%", stopColor: gradientStop, stopOpacity: 0 })] }) }, `defs_${uniqueId}_${index}`));
|
|
117
119
|
}), yAxisFields.map((elem, index) => {
|
|
118
120
|
const gradientStart = hashCode(getCustomColor(index, elem.field, 'start') ??
|
|
121
|
+
getCustomColor(index, elem.field) ??
|
|
119
122
|
selectColor(elem, colors, index));
|
|
120
123
|
const gradientStop = hashCode(getCustomColor(index, elem.field, 'stop') ?? '#00000000');
|
|
121
124
|
const uniqueId = `gradient_${gradientStart}_${gradientStop}`;
|
|
@@ -16,7 +16,7 @@ export default function QuillMetricComponent({ dashboardItem, onClickDashboardIt
|
|
|
16
16
|
cursor: 'pointer',
|
|
17
17
|
boxSizing: 'content-box',
|
|
18
18
|
borderRadius: 8,
|
|
19
|
-
paddingBottom: 30,
|
|
19
|
+
paddingBottom: isLoading ? 0 : 30,
|
|
20
20
|
...style,
|
|
21
21
|
}, children: _jsx("div", { style: {
|
|
22
22
|
width: '100%',
|
|
@@ -60,7 +60,7 @@ export default function QuillMetricComponent({ dashboardItem, onClickDashboardIt
|
|
|
60
60
|
display: 'flex',
|
|
61
61
|
alignItems: 'center',
|
|
62
62
|
justifyContent: 'flex-end',
|
|
63
|
-
}, children: 'view report →' })) : null] }), isLoading ? (_jsx(ChartSkeleton, {})) : error ? (_jsx(ChartError, {})) : data.rows?.length === 0 ||
|
|
63
|
+
}, children: 'view report →' })) : null] }), isLoading ? (_jsx(ChartSkeleton, { containerStyle: { maxHeight: '78px', height: style?.height ?? '100%' } })) : error ? (_jsx(ChartError, {})) : data.rows?.length === 0 ||
|
|
64
64
|
data.rows[0][data.xAxisField] === null ? (_jsx("div", { style: {
|
|
65
65
|
display: 'flex',
|
|
66
66
|
flex: '1 0 auto',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuillCard.d.ts","sourceRoot":"","sources":["../../../src/components/QuillCard.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,UAAU,cAAc;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,UAAkB,EAClB,SAAgB,EAChB,OAAO,EACP,SAAa,EACb,KAAU,GACX,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"QuillCard.d.ts","sourceRoot":"","sources":["../../../src/components/QuillCard.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,UAAU,cAAc;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,UAAkB,EAClB,SAAgB,EAChB,OAAO,EACP,SAAa,EACb,KAAU,GACX,EAAE,cAAc,2CAmEhB"}
|
|
@@ -28,12 +28,10 @@ export function QuillCard({ children, theme, onClick, isSelected = false, clicka
|
|
|
28
28
|
e.stopPropagation();
|
|
29
29
|
onClose();
|
|
30
30
|
}, style: {
|
|
31
|
-
height:
|
|
32
|
-
width:
|
|
31
|
+
height: 40,
|
|
32
|
+
width: 40,
|
|
33
33
|
top: 4,
|
|
34
34
|
right: 4,
|
|
35
|
-
// marginTop: -12,
|
|
36
|
-
// marginRight: -12,
|
|
37
35
|
position: 'absolute',
|
|
38
36
|
cursor: 'pointer',
|
|
39
37
|
border: 'none',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuillSelect.d.ts","sourceRoot":"","sources":["../../../src/components/QuillSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGtD,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,KAAK,GACN,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"QuillSelect.d.ts","sourceRoot":"","sources":["../../../src/components/QuillSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGtD,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,KAAK,GACN,EAAE,oBAAoB,2CAwMtB"}
|
|
@@ -7,7 +7,13 @@ export function QuillSelectComponent({ options, value, onChange, theme, label, }
|
|
|
7
7
|
useOnClickOutside(modalRef, (e) => {
|
|
8
8
|
setShowModal(false);
|
|
9
9
|
});
|
|
10
|
-
return (_jsxs("div", { style: {
|
|
10
|
+
return (_jsxs("div", { style: {
|
|
11
|
+
position: 'relative',
|
|
12
|
+
width: 200,
|
|
13
|
+
minWidth: 200,
|
|
14
|
+
boxShadow: 'rgba(0, 0, 0, 0.1) 0px 1px 5px 0px',
|
|
15
|
+
borderRadius: '6px',
|
|
16
|
+
}, children: [label && (_jsx("div", { style: {
|
|
11
17
|
fontSize: 14,
|
|
12
18
|
color: theme.primaryTextColor,
|
|
13
19
|
fontFamily: theme.fontFamily,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuillTable.d.ts","sourceRoot":"","sources":["../../../src/components/QuillTable.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAMrD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,IAAI,EACJ,OAAO,EACP,OAAO,EACP,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,gBAA0C,EAC1C,WAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"QuillTable.d.ts","sourceRoot":"","sources":["../../../src/components/QuillTable.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAMrD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,IAAI,EACJ,OAAO,EACP,OAAO,EACP,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,gBAA0C,EAC1C,WAAgB,EAChB,eAA8B,EAC9B,WAAW,GACZ,EAAE,mBAAmB,2CAwZrB"}
|
|
@@ -3,7 +3,7 @@ import { useContext, useEffect, useState } from 'react';
|
|
|
3
3
|
import { compareValues } from '../utils/valueFormatter';
|
|
4
4
|
import { ThemeContext } from '../Context';
|
|
5
5
|
import ChartSkeleton from './Chart/ChartSkeleton';
|
|
6
|
-
export default function QuillTable({ rows, columns, loading, showDownloadCSVButton, downloadFileName, containerStyle, LoadingComponent = () => _jsx(ChartSkeleton, {}), rowsPerPage = 10, emptyStateLabel = 'No results
|
|
6
|
+
export default function QuillTable({ rows, columns, loading, showDownloadCSVButton, downloadFileName, containerStyle, LoadingComponent = () => _jsx(ChartSkeleton, {}), rowsPerPage = 10, emptyStateLabel = 'No results', downloadCSV, }) {
|
|
7
7
|
const [activeRows, setActiveRows] = useState([]);
|
|
8
8
|
const [page, setPage] = useState(1);
|
|
9
9
|
const [maxPage, setMaxPage] = useState(1);
|
|
@@ -130,7 +130,7 @@ export default function QuillTable({ rows, columns, loading, showDownloadCSVButt
|
|
|
130
130
|
: undefined,
|
|
131
131
|
}, children: _jsx("path", { fillRule: "evenodd", d: "M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z", clipRule: "evenodd" }) }))] }, 'sqlcol' + index))) }) }), (activeRows && activeRows.length === 0) ||
|
|
132
132
|
(columns && columns.length === 0) ? (_jsx("div", { style: {
|
|
133
|
-
padding: '
|
|
133
|
+
padding: '30px 0',
|
|
134
134
|
display: 'flex',
|
|
135
135
|
flex: '1 0 auto',
|
|
136
136
|
margin: 'auto',
|
|
@@ -45,14 +45,14 @@ export default function AddColumnPopover({ onSave, orderedColumnNames, setOrdere
|
|
|
45
45
|
flexDirection: 'row',
|
|
46
46
|
alignItems: 'center',
|
|
47
47
|
marginTop: 2,
|
|
48
|
-
}, children: _jsx(TextInput, { type: "text", value: search, placeholder: 'Search...', style: {
|
|
48
|
+
}, children: _jsx(TextInput, { type: "text", value: search, placeholder: 'Search...', style: { marginBottom: 6, width: '100%' }, onChange: (e) => setSearch(e.target.value) }) }), _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: _jsx(SortableContext, { items: orderedColumnNames, strategy: verticalListSortingStrategy, children: _jsxs("div", { style: {
|
|
49
49
|
display: 'flex',
|
|
50
50
|
flexDirection: 'column',
|
|
51
51
|
gap: 8,
|
|
52
52
|
overflowY: 'auto',
|
|
53
53
|
maxWidth: '300px',
|
|
54
54
|
}, children: [searchResults.map((value) => {
|
|
55
|
-
return (_jsx(SortableItem, { theme: theme, selectedColumns: selectedColumns, setSelectedColumns: setSelectedColumns, id: value, label: value.replace('.', ' '), SelectColumn: SelectColumn, HandleButton: HandleButton }, value));
|
|
55
|
+
return (_jsx(SortableItem, { theme: theme, selectedColumns: selectedColumns, setSelectedColumns: setSelectedColumns, id: value, label: value.replace('.', ' | '), SelectColumn: SelectColumn, HandleButton: HandleButton }, value));
|
|
56
56
|
}), search.length > 0 && searchResults.length === 0 && (_jsx("div", { style: { fontFamily: theme?.fontFamily }, children: "No results found" }))] }) }) }), _jsxs("div", { style: {
|
|
57
57
|
display: 'flex',
|
|
58
58
|
width: '100%',
|
|
@@ -103,7 +103,7 @@ export default function AddColumnPopover({ onSave, orderedColumnNames, setOrdere
|
|
|
103
103
|
setPivot(null);
|
|
104
104
|
}
|
|
105
105
|
onSave();
|
|
106
|
-
}, label: "
|
|
106
|
+
}, label: "Select columns" })] })] }));
|
|
107
107
|
}
|
|
108
108
|
const SortableItem = ({ id, label, setSelectedColumns, theme, selectedColumns, SelectColumn, HandleButton, }) => {
|
|
109
109
|
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: id });
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const LimitSentence: ({ limit, handleDelete, setOpenPopover, onSave, popoverTitle, LimitPopover, EditPopover, children, }: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AddLimitPopover: ({ onSave, initialLimit, isEdit, onDelete, }: any) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=AddLimitPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddLimitPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/AddLimitPopover.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa,wGASvB,GAAG,4CAiCL,CAAC;AAEF,eAAO,MAAM,eAAe,gDAKzB,GAAG,4CAmCL,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useContext } from 'react';
|
|
3
|
+
import { MemoizedButton, MemoizedSecondaryButton } from '../UiComponents';
|
|
4
|
+
import { ThemeContext } from '../../Context';
|
|
5
|
+
import { QuillTextInput } from './ui';
|
|
6
|
+
const SORT_VALUE_TO_LABEL = {
|
|
7
|
+
ASC: 'ascending',
|
|
8
|
+
DESC: 'descending',
|
|
9
|
+
};
|
|
10
|
+
export const LimitSentence = ({ limit, handleDelete, setOpenPopover, onSave, popoverTitle = 'Edit limit', LimitPopover, EditPopover, children, }) => {
|
|
11
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
12
|
+
const handleClickDelete = (e) => {
|
|
13
|
+
setOpenPopover(null);
|
|
14
|
+
handleDelete();
|
|
15
|
+
};
|
|
16
|
+
return (_jsx("div", { style: { width: '100%' }, children: _jsx(LimitPopover
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
, {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
filterLabel: `limit ${limit.value[0].value}`, onClickDelete: handleClickDelete, popoverTitle: popoverTitle, popoverChildren: _jsx(EditPopover, { onSave: (column, direction) => {
|
|
21
|
+
setIsOpen(false);
|
|
22
|
+
onSave(column, direction);
|
|
23
|
+
}, isEdit: true, onDelete: handleClickDelete, initialLimit: limit.value[0].value }), isOpen: isOpen, setIsOpen: setIsOpen, onDelete: () => {
|
|
24
|
+
handleDelete();
|
|
25
|
+
} }) }));
|
|
26
|
+
};
|
|
27
|
+
export const AddLimitPopover = ({ onSave, initialLimit, isEdit, onDelete, }) => {
|
|
28
|
+
const [limit, setLimit] = useState(initialLimit || 0);
|
|
29
|
+
const [theme] = useContext(ThemeContext);
|
|
30
|
+
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 12 }, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'row', gap: 12, padding: '6px 0px' }, children: _jsx(QuillTextInput, { value: limit, type: "number", style: { width: 200, minHeight: 32, padding: '6px 12px' }, onChange: (e) => {
|
|
31
|
+
setLimit(e.target.value);
|
|
32
|
+
} }) }), _jsx("div", { style: {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
flexDirection: 'row',
|
|
35
|
+
justifyContent: 'end',
|
|
36
|
+
gap: 12,
|
|
37
|
+
}, children: isEdit ? (_jsxs(_Fragment, { children: [_jsx(MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), _jsx(MemoizedButton, { onClick: () => onSave(limit), label: "Edit limit" })] })) : (_jsx(MemoizedButton, { onClick: () => onSave(limit), label: "Add limit" })) })] }));
|
|
38
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddSortPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/AddSortPopover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddSortPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/AddSortPopover.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,YAAY,iMAetB,GAAG,wDA2CL,CAAC;AAEF,eAAO,MAAM,cAAc,mDAMxB,GAAG,4CAiEL,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { useState, useContext } from 'react';
|
|
|
3
3
|
import { QuillSelectComponent } from '../QuillSelect';
|
|
4
4
|
import { MemoizedButton, MemoizedSecondaryButton } from '../UiComponents';
|
|
5
5
|
import { ThemeContext } from '../../Context';
|
|
6
|
+
import { snakeCaseToTitleCase } from '../../utils/textProcessing';
|
|
6
7
|
const SORT_VALUE_TO_LABEL = {
|
|
7
8
|
ASC: 'ascending',
|
|
8
9
|
DESC: 'descending',
|
|
@@ -24,7 +25,7 @@ export const SortSentence = ({ sortData, keyPrefix, columns, handleDelete, setEd
|
|
|
24
25
|
// @ts-ignore
|
|
25
26
|
, {
|
|
26
27
|
// @ts-ignore
|
|
27
|
-
filterLabel: `${sortData.expr.column || sortData.expr.value}
|
|
28
|
+
filterLabel: `${snakeCaseToTitleCase(sortData.expr.column) || snakeCaseToTitleCase(sortData.expr.value)} ${SORT_VALUE_TO_LABEL[sortData.type]}`, onClickDelete: handleClickDelete, popoverTitle: popoverTitle, popoverChildren: _jsx(EditPopover, { onSave: (column, direction) => {
|
|
28
29
|
setIsOpen(false);
|
|
29
30
|
onSave(column, direction);
|
|
30
31
|
}, columns: columns, isEdit: true, onDelete: handleClickDelete, column: sortData.expr.column || sortData.expr.value }), isOpen: isOpen, setIsOpen: setIsOpen, onDelete: () => {
|
|
@@ -37,11 +38,16 @@ export const AddSortPopover = ({ onSave, columns, isEdit, onDelete, column, }) =
|
|
|
37
38
|
const [sortColumn, setSortColumn] = useState(column || '');
|
|
38
39
|
const [sortDirection, setSortDirection] = useState('ASC');
|
|
39
40
|
const [theme] = useContext(ThemeContext);
|
|
40
|
-
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 12 }, children: [_jsxs("div", { style: {
|
|
41
|
+
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 12 }, children: [_jsxs("div", { style: {
|
|
42
|
+
display: 'flex',
|
|
43
|
+
flexDirection: 'row',
|
|
44
|
+
gap: 12,
|
|
45
|
+
padding: '6px 0px',
|
|
46
|
+
}, children: [_jsx(QuillSelectComponent, { theme: theme, value: sortColumn, onChange: (value) => {
|
|
41
47
|
setSortColumn(value);
|
|
42
48
|
}, options: [
|
|
43
49
|
...columns.map((column) => ({
|
|
44
|
-
label: column.split('.')[1],
|
|
50
|
+
label: snakeCaseToTitleCase(column.split('.')[1] || ''),
|
|
45
51
|
value: column.split('.')[1],
|
|
46
52
|
})),
|
|
47
53
|
] }), _jsx(QuillSelectComponent, { theme: theme, value: sortDirection, onChange: (value) => {
|
|
@@ -54,5 +60,5 @@ export const AddSortPopover = ({ onSave, columns, isEdit, onDelete, column, }) =
|
|
|
54
60
|
flexDirection: 'row',
|
|
55
61
|
justifyContent: 'end',
|
|
56
62
|
gap: 12,
|
|
57
|
-
}, children: isEdit ? (_jsxs(_Fragment, { children: [_jsx(MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), _jsx(MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "
|
|
63
|
+
}, children: isEdit ? (_jsxs(_Fragment, { children: [_jsx(MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), _jsx(MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "Edit sort" })] })) : (_jsx(MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "Add sort" })) })] }));
|
|
58
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigDateMap.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/bigDateMap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bigDateMap.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/bigDateMap.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,eAAO,MAAM,oBAAoB;wBAoCnB,GAAG;CAmpBhB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// A giant map of partial objects keys to functions that take the root node
|
|
2
2
|
// and return a strinified version of the node. Used to populate the filters.
|
|
3
|
+
import { snakeCaseToTitleCase } from '../../utils/textProcessing';
|
|
3
4
|
/**
|
|
4
5
|
* Trims off the _at suffix of columnNames so "created_at" becomes "created"
|
|
5
6
|
*/
|
|
6
7
|
function cleanDateFieldName(fieldName) {
|
|
7
8
|
if (!fieldName)
|
|
8
9
|
return undefined;
|
|
9
|
-
return fieldName.replace('_at', '');
|
|
10
|
+
return snakeCaseToTitleCase(fieldName.replace('_at', ''));
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* A big map of partial objects and a callback to convert each to a string.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/convert.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,GAAG,EACpB,GAAG,EAMJ,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAc,SAAS,EAAE,MAAM,UAAU,CAAC;AASjD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAuBlE;AAGD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,QAahB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAuCpD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,GAAG,CAAC,MAAM,EACf,YAAY,EAAE,SAAS,EAAE,GACxB,GAAG,CAAC,MAAM,CAwBZ;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,GAAG,EACR,SAAS,mBAAc,EACvB,YAAY,EAAE,SAAS,EAAE;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/convert.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,GAAG,EACpB,GAAG,EAMJ,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAc,SAAS,EAAE,MAAM,UAAU,CAAC;AASjD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAuBlE;AAGD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,QAahB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAuCpD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,GAAG,CAAC,MAAM,EACf,YAAY,EAAE,SAAS,EAAE,GACxB,GAAG,CAAC,MAAM,CAwBZ;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,GAAG,EACR,SAAS,mBAAc,EACvB,YAAY,EAAE,SAAS,EAAE;;;;;;;;;;;;;;EA8b1B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG;;;EA6G5D;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,OAyJtE;AAID,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAY1E"}
|
|
@@ -191,8 +191,14 @@ export function convertGroupBy(ast, prevPivot = null, schemaTables) {
|
|
|
191
191
|
}
|
|
192
192
|
if (columnName === '*') {
|
|
193
193
|
// TODO: make valueField be a number
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
for (let i = 0; i < columns.length; i++) {
|
|
195
|
+
if (!isIdColumn(columns[i]?.field) &&
|
|
196
|
+
isNumericColumnType(columns[i]?.fieldType)) {
|
|
197
|
+
pivot.valueField = columns[i].field;
|
|
198
|
+
columnName = columns[i].field;
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
196
202
|
}
|
|
197
203
|
newColumns.push({
|
|
198
204
|
type: 'expr',
|
|
@@ -270,17 +276,19 @@ export function convertGroupBy(ast, prevPivot = null, schemaTables) {
|
|
|
270
276
|
const columnName = columnNode?.value || columnNode?.column;
|
|
271
277
|
// if count(*), make the value field an actual column
|
|
272
278
|
if (columnName === '*') {
|
|
273
|
-
|
|
274
|
-
|
|
279
|
+
const numericColumn = columns.find((c) => {
|
|
280
|
+
return isNumericColumnType(c.fieldType) && !isIdColumn(c.field);
|
|
281
|
+
});
|
|
282
|
+
pivot.valueField = numericColumn?.field;
|
|
275
283
|
pivot.aggregationType = column?.expr?.name.toLowerCase();
|
|
276
|
-
const findByName = (x) => [x.expr?.value, x.expr?.column].includes(
|
|
284
|
+
const findByName = (x) => [x.expr?.value, x.expr?.column].includes(numericColumn.field);
|
|
277
285
|
if (!newColumns.find(findByName)) {
|
|
278
286
|
newColumns.push({
|
|
279
287
|
type: 'expr',
|
|
280
288
|
expr: {
|
|
281
289
|
type: 'column_ref',
|
|
282
290
|
table: null,
|
|
283
|
-
column:
|
|
291
|
+
column: numericColumn?.field || '',
|
|
284
292
|
},
|
|
285
293
|
as: null,
|
|
286
294
|
});
|
|
@@ -628,8 +636,14 @@ export function convertStringComparison(node, databaseType) {
|
|
|
628
636
|
type: 'expr_list',
|
|
629
637
|
value: [
|
|
630
638
|
databaseType === 'BigQuery'
|
|
631
|
-
? {
|
|
632
|
-
|
|
639
|
+
? {
|
|
640
|
+
type: 'column_ref',
|
|
641
|
+
value: obj.left.column || obj.left.value,
|
|
642
|
+
}
|
|
643
|
+
: {
|
|
644
|
+
type: 'double_quote_string',
|
|
645
|
+
value: obj.left.column || obj.left.value,
|
|
646
|
+
},
|
|
633
647
|
],
|
|
634
648
|
},
|
|
635
649
|
};
|
|
@@ -666,8 +680,14 @@ export function convertStringComparison(node, databaseType) {
|
|
|
666
680
|
type: 'expr_list',
|
|
667
681
|
value: [
|
|
668
682
|
databaseType === 'BigQuery'
|
|
669
|
-
? {
|
|
670
|
-
|
|
683
|
+
? {
|
|
684
|
+
type: 'column_ref',
|
|
685
|
+
value: obj.left.column || obj.left.value,
|
|
686
|
+
}
|
|
687
|
+
: {
|
|
688
|
+
type: 'double_quote_string',
|
|
689
|
+
value: obj.left.column || obj.left.value,
|
|
690
|
+
},
|
|
671
691
|
],
|
|
672
692
|
},
|
|
673
693
|
};
|
|
@@ -702,8 +722,14 @@ export function convertStringComparison(node, databaseType) {
|
|
|
702
722
|
type: 'expr_list',
|
|
703
723
|
value: [
|
|
704
724
|
databaseType === 'BigQuery'
|
|
705
|
-
? {
|
|
706
|
-
|
|
725
|
+
? {
|
|
726
|
+
type: 'column_ref',
|
|
727
|
+
value: obj.left.column || obj.left.value,
|
|
728
|
+
}
|
|
729
|
+
: {
|
|
730
|
+
type: 'double_quote_string',
|
|
731
|
+
value: obj.left.column || obj.left.value,
|
|
732
|
+
},
|
|
707
733
|
],
|
|
708
734
|
},
|
|
709
735
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/ui.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/ui.tsx"],"names":[],"mappings":";AAiBA;;;;;GAKG;AAEH,eAAO,MAAM,WAAW,2BAA4B,GAAG,4CA2BtD,CAAC;AAEF,eAAO,MAAM,oBAAoB,2BAA4B,GAAG,4CA2B/D,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,GAAG,4CAuBxC,CAAC;AAEF,eAAO,MAAM,uBAAuB,uCAKjC,GAAG,4CAiBL,CAAC;AAEF,eAAO,MAAM,QAAQ,sGAoEpB,CAAC;AAGF,eAAO,MAAM,mBAAmB,cAAe,GAAG,4CAEjD,CAAC;AAGF,eAAO,MAAM,sBAAsB,cAAe,GAAG,4CAEpD,CAAC;AAGF,eAAO,MAAM,YAAY,sGAiBxB,CAAC;AAGF,eAAO,MAAM,eAAe,sGAuB3B,CAAC;AAEF,eAAO,MAAM,WAAW,2BAA4B,GAAG,4CAUtD,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,KAAU,EACV,OAAO,EACP,MAAM,GACP,EAAE,GAAG,2CAgDL;AAED,eAAO,MAAM,YAAY,sGAkCxB,CAAC;AAGF,eAAO,MAAM,iBAAiB,+CAwE7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,gDAK3B,GAAG,4CA6CL,CAAC;AAGF,eAAO,MAAM,oBAAoB,kCAAmC,GAAG,4CAiDtE,CAAC;AAGF,eAAO,MAAM,uBAAuB,+CAMnC,CAAC;AAGF,eAAO,MAAM,sBAAsB,+CAMlC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;GAG/B,CAAC;AAEF,eAAO,MAAM,SAAS,sGAIrB,CAAC;AAEF,eAAO,MAAM,WAAW,8DAMrB,GAAG,4CAwBL,CAAC;AAEF,eAAO,MAAM,kBAAkB,4FAO5B,GAAG,4CAqBL,CAAC;AAEF,eAAO,MAAM,gBAAgB,sFAO1B,GAAG,4CAqBL,CAAC;AAEF,eAAO,MAAM,UAAU,sTAuBpB,GAAG,4CAqFL,CAAC;AAEF,eAAO,MAAM,gBAAgB,oDAK1B,GAAG,4CAeL,CAAC"}
|
|
@@ -5,6 +5,7 @@ import MemoizedQuillTable from '../QuillTable';
|
|
|
5
5
|
import { ThemeContext } from '../../Context';
|
|
6
6
|
import { isNodeEmptyCollection } from './util';
|
|
7
7
|
import { downloadCSV } from '../../utils/csv';
|
|
8
|
+
import { snakeCaseToTitleCase } from '../../utils/textProcessing';
|
|
8
9
|
/**
|
|
9
10
|
* This file is a collection of basic UI components that conform to the shape
|
|
10
11
|
* expected by the Report Builder. Where possible, we use our existing
|
|
@@ -106,7 +107,7 @@ export const QuillSidebarHeading = ({ label }) => (_jsx(MemoizedHeader, { childr
|
|
|
106
107
|
export const QuillSidebarSubHeading = ({ label }) => (_jsx(MemoizedLabel, { children: label }));
|
|
107
108
|
// The gray thing on the left.
|
|
108
109
|
export const QuillSidebar = forwardRef(({ children, ...props }, forwardedRef) => (_jsx("div", { style: {
|
|
109
|
-
|
|
110
|
+
overflowX: 'visible',
|
|
110
111
|
padding: '12px',
|
|
111
112
|
width: '25%',
|
|
112
113
|
height: '100%',
|
|
@@ -175,7 +176,7 @@ export const QuillPopover = forwardRef(({ children, trigger, isOpen, onClose = (
|
|
|
175
176
|
fontSize: 18,
|
|
176
177
|
margin: 0,
|
|
177
178
|
textAlign: 'left',
|
|
178
|
-
|
|
179
|
+
marginBottom: 5,
|
|
179
180
|
color: theme?.primaryTextColor,
|
|
180
181
|
fontFamily: theme?.fontFamily,
|
|
181
182
|
}, children: title })), children] }));
|
|
@@ -250,7 +251,7 @@ export const QuillSelectColumn = ({ label, selected, setSelected, children, }) =
|
|
|
250
251
|
overflow: 'hidden',
|
|
251
252
|
fontFamily: theme?.fontFamily,
|
|
252
253
|
color: theme?.primaryTextColor,
|
|
253
|
-
}, children: label })] })] }));
|
|
254
|
+
}, children: snakeCaseToTitleCase(label) })] })] }));
|
|
254
255
|
};
|
|
255
256
|
// A draggable card with a grab-handle and a column name
|
|
256
257
|
export const QuillDraggableColumn = ({ label, children, onDelete }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/util.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,qBAAqB,SAAU,GAAG,YAW9C,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,WAa1C;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,WAK5C;AAGD,eAAO,MAAM,WAAW,SAAU,GAAG,YAuBpC,CAAC;AAKF,eAAO,MAAM,oBAAoB,SAAU,GAAG,QAE7C,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG;;;;;;;;EAU3C;AAKD,eAAO,MAAM,eAAe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ACH,eAAO,MAAM,eAAe,SAAU,GAAG,YAOxC,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,WAehD;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,GAAG,GACV,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAyB1C;AAED,eAAO,MAAM,QAAQ,QAAS,GAAG,QAAoC,CAAC;AAEtE,eAAO,MAAM,QAAQ,MAAO,MAAM,WAA2C,CAAC;AA4L9E,eAAO,MAAM,iBAAiB,SAAU,GAAG;;;;;;;CAc1C,CAAC;AAqCF,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,OAQvE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// A collection of reusable, pure, utility functions for the Report Builder.
|
|
2
2
|
import { getQuarter } from 'date-fns';
|
|
3
3
|
import { DATE_DESCRIPTION_MAP } from './bigDateMap';
|
|
4
|
+
import { snakeCaseToTitleCase } from '../../utils/textProcessing';
|
|
4
5
|
/**
|
|
5
6
|
* A node that is "in" or "not in" where none of the variants are selected.
|
|
6
7
|
*/
|
|
@@ -120,7 +121,7 @@ export function formatDateComparisonNode(node) {
|
|
|
120
121
|
}
|
|
121
122
|
export function getInTheCurrentIntervalSentence(node, databaseType) {
|
|
122
123
|
if (databaseType === 'BigQuery') {
|
|
123
|
-
const dateColumn = node.left.args.value[0].column;
|
|
124
|
+
const dateColumn = snakeCaseToTitleCase(node.left.args.value[0].column);
|
|
124
125
|
const periodValue = node.left.args.value[1].column.toLowerCase();
|
|
125
126
|
return `${dateColumn} in the current ${periodValue}`;
|
|
126
127
|
}
|
|
@@ -133,7 +134,7 @@ const BIG_QUERY_DAY_TO_INTERVAL_MAP = {
|
|
|
133
134
|
};
|
|
134
135
|
export function getInTheLastIntervalSentence(node, databaseType) {
|
|
135
136
|
if (databaseType === 'BigQuery') {
|
|
136
|
-
const dateColumn = node.left.column;
|
|
137
|
+
const dateColumn = snakeCaseToTitleCase(node.left.column);
|
|
137
138
|
const amount = node.right.args.value[1].expr.value;
|
|
138
139
|
let unit = node.right.args.value[1].unit.toLowerCase();
|
|
139
140
|
if (unit.includes('*')) {
|
|
@@ -145,7 +146,7 @@ export function getInTheLastIntervalSentence(node, databaseType) {
|
|
|
145
146
|
}
|
|
146
147
|
export function getInThePreviousIntervalSentence(node, databaseType) {
|
|
147
148
|
if (databaseType === 'BigQuery') {
|
|
148
|
-
const dateColumn = node.left.args.value[0].column;
|
|
149
|
+
const dateColumn = snakeCaseToTitleCase(node.left.args.value[0].column);
|
|
149
150
|
const periodValue = node.left.args.value[1].column.toLowerCase();
|
|
150
151
|
return `${dateColumn} in the previous ${periodValue}`;
|
|
151
152
|
}
|
|
@@ -201,6 +202,7 @@ export const isTheCurrentInterval = (node, databaseType) => {
|
|
|
201
202
|
const isInsideOfDateTrunc = ['AND'].includes(node.operator) &&
|
|
202
203
|
(node.left.operator === '=' || node.left.type === 'double_quote_string') &&
|
|
203
204
|
node.right.operator === '=' &&
|
|
205
|
+
node.right.name &&
|
|
204
206
|
node.right.name.toLowerCase() === 'date_trunc' &&
|
|
205
207
|
node.args.value[0].type === 'single_quote_string' &&
|
|
206
208
|
node.args.value[1].type === 'binary_expr' &&
|
|
@@ -356,14 +358,14 @@ export function tryConvertDateEquality(node, databaseType) {
|
|
|
356
358
|
if (isDateTruncEquals(node)) {
|
|
357
359
|
const columnNode = node.left.args.value[1];
|
|
358
360
|
const columnName = columnNode.column ?? columnNode.value;
|
|
359
|
-
const cleanColumnName = columnName.replaceAll('_at', '');
|
|
361
|
+
const cleanColumnName = snakeCaseToTitleCase(columnName.replaceAll('_at', ''));
|
|
360
362
|
const prettyDateSuffix = dateTruncSuffixToString(node, databaseType);
|
|
361
363
|
return `${cleanColumnName} ${prettyDateSuffix}`;
|
|
362
364
|
}
|
|
363
365
|
else if (isExtractEquals(node)) {
|
|
364
366
|
const columnNode = node.left.args.source;
|
|
365
367
|
const columnName = columnNode.column ?? columnNode.value;
|
|
366
|
-
const cleanColumnName = columnName.replaceAll('_at', '');
|
|
368
|
+
const cleanColumnName = snakeCaseToTitleCase(columnName.replaceAll('_at', ''));
|
|
367
369
|
const prettyDateSuffix = extractSuffixToString(node);
|
|
368
370
|
return `${cleanColumnName} ${prettyDateSuffix}`;
|
|
369
371
|
}
|
|
@@ -300,8 +300,8 @@ export function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, the
|
|
|
300
300
|
}, children: title }), _jsx(MemoizedDeleteButton, { onClick: onClose, style: { marginRight: 10, marginTop: 10 } })] }), children] }) })] }));
|
|
301
301
|
}
|
|
302
302
|
export const MemoizedDeleteButton = ({ onClick, style }) => (_jsxs("button", { className: "quill-delete-button", type: "button", onClick: onClick, style: {
|
|
303
|
-
height:
|
|
304
|
-
width:
|
|
303
|
+
height: 40,
|
|
304
|
+
width: 40,
|
|
305
305
|
border: 'none',
|
|
306
306
|
cursor: 'pointer',
|
|
307
307
|
display: 'flex',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PivotList.d.ts","sourceRoot":"","sources":["../../../../src/internals/ReportBuilder/PivotList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PivotList.d.ts","sourceRoot":"","sources":["../../../../src/internals/ReportBuilder/PivotList.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;6CA8MrB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;6CAmFrB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { QuillCard } from '../../components/QuillCard';
|
|
3
3
|
import { quillFormat } from '../../utils/valueFormatter';
|
|
4
|
+
import { snakeCaseToTitleCase } from '../../utils/textProcessing';
|
|
4
5
|
export const PivotCard = ({ pivotTable, theme, index, onSelectPivot, selectedPivotIndex, onEditPivot, ButtonComponent, showEdit = false, clickable = true, onClose = () => { }, minHeight = 0, LabelComponent, TextComponent, HeaderComponent, }) => {
|
|
5
6
|
const maxRowsInPivotPeak = 5;
|
|
6
7
|
return (_jsx(QuillCard, { theme: theme, onClick: () => onSelectPivot(pivotTable.pivot, index), isSelected: index === selectedPivotIndex, clickable: clickable, onClose: onClose, minHeight: minHeight, children: _jsxs("div", { style: {
|
|
@@ -17,7 +18,32 @@ export const PivotCard = ({ pivotTable, theme, index, onSelectPivot, selectedPiv
|
|
|
17
18
|
whiteSpace: 'nowrap',
|
|
18
19
|
textOverflow: 'ellipsis',
|
|
19
20
|
paddingBottom: 6,
|
|
20
|
-
}, children: _jsx(HeaderComponent, { children: pivotTable.pivot.title }) })), _jsxs("table", { children: [_jsx("thead", { children:
|
|
21
|
+
}, children: _jsx(HeaderComponent, { children: pivotTable.pivot.title }) })), pivotTable.columns.length === 0 ? (_jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [pivotTable.pivot.rowField && (_jsx("th", { style: {
|
|
22
|
+
fontWeight: 600,
|
|
23
|
+
paddingRight: 5,
|
|
24
|
+
flex: 1,
|
|
25
|
+
textAlign: 'left',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
textOverflow: 'ellipsis',
|
|
28
|
+
}, children: _jsx(LabelComponent, { children: snakeCaseToTitleCase(pivotTable.pivot.rowField) }) }, pivotTable.pivot.rowField)), pivotTable.pivot.columnField && (_jsx("th", { style: {
|
|
29
|
+
fontWeight: 600,
|
|
30
|
+
paddingRight: 5,
|
|
31
|
+
flex: 1,
|
|
32
|
+
textAlign: 'left',
|
|
33
|
+
whiteSpace: 'nowrap',
|
|
34
|
+
textOverflow: 'ellipsis',
|
|
35
|
+
}, children: _jsx(LabelComponent, { children: snakeCaseToTitleCase(pivotTable.pivot.columnField) }) }, pivotTable.pivot.columnField)), !pivotTable.pivot.columnField &&
|
|
36
|
+
pivotTable.pivot.valueField && (_jsx("th", { style: {
|
|
37
|
+
fontWeight: 600,
|
|
38
|
+
paddingRight: 5,
|
|
39
|
+
flex: 1,
|
|
40
|
+
textAlign: 'left',
|
|
41
|
+
whiteSpace: 'nowrap',
|
|
42
|
+
textOverflow: 'ellipsis',
|
|
43
|
+
}, children: _jsx(LabelComponent, { children: snakeCaseToTitleCase(pivotTable.pivot.valueField) }) }, pivotTable.pivot.valueField))] }) }), _jsx("div", { style: {
|
|
44
|
+
paddingLeft: '2px',
|
|
45
|
+
width: '100%',
|
|
46
|
+
}, children: _jsx(TextComponent, { children: "No results" }) })] })) : (_jsxs("table", { children: [_jsx("thead", { children: _jsx("tr", { children: pivotTable.columns.map((column) => (_jsx("th", { style: {
|
|
21
47
|
fontWeight: 600,
|
|
22
48
|
paddingRight: 5,
|
|
23
49
|
flex: 1,
|
|
@@ -36,7 +62,7 @@ export const PivotCard = ({ pivotTable, theme, index, onSelectPivot, selectedPiv
|
|
|
36
62
|
value: row[colum.field],
|
|
37
63
|
format: pivotTable.pivot.valueFieldType,
|
|
38
64
|
})
|
|
39
|
-
: row[colum.field] }) }, i))) }, index))) })] })] }), _jsxs("div", { style: {
|
|
65
|
+
: row[colum.field] }) }, i))) }, index))) })] }))] }), _jsxs("div", { style: {
|
|
40
66
|
display: 'flex',
|
|
41
67
|
justifyContent: 'space-between',
|
|
42
68
|
}, children: [pivotTable.rows.length > maxRowsInPivotPeak ? (_jsx("div", { children: _jsxs(TextComponent, { children: ["...", pivotTable.rows.length - maxRowsInPivotPeak < 5
|