@quillsql/react 2.11.12 → 2.11.13
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 +167 -68
- 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/QuillSelect.d.ts.map +1 -1
- package/dist/cjs/components/QuillSelect.js +7 -1
- 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/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/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 +26 -29
- 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 +167 -68
- 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/QuillSelect.d.ts.map +1 -1
- package/dist/esm/components/QuillSelect.js +7 -1
- 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/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/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 +26 -29
- package/dist/esm/utils/getDomain.d.ts.map +1 -1
- package/dist/esm/utils/getDomain.js +3 -0
- package/package.json +2 -2
|
@@ -47,14 +47,14 @@ function AddColumnPopover({ onSave, orderedColumnNames, setOrderedColumnNames, s
|
|
|
47
47
|
flexDirection: 'row',
|
|
48
48
|
alignItems: 'center',
|
|
49
49
|
marginTop: 2,
|
|
50
|
-
}, children: (0, jsx_runtime_1.jsx)(TextInput, { type: "text", value: search, placeholder: 'Search...', style: {
|
|
50
|
+
}, children: (0, jsx_runtime_1.jsx)(TextInput, { type: "text", value: search, placeholder: 'Search...', style: { marginBottom: 6, width: '100%' }, onChange: (e) => setSearch(e.target.value) }) }), (0, jsx_runtime_1.jsx)(core_1.DndContext, { sensors: sensors, collisionDetection: core_1.closestCenter, onDragEnd: handleDragEnd, children: (0, jsx_runtime_1.jsx)(sortable_1.SortableContext, { items: orderedColumnNames, strategy: sortable_1.verticalListSortingStrategy, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
51
51
|
display: 'flex',
|
|
52
52
|
flexDirection: 'column',
|
|
53
53
|
gap: 8,
|
|
54
54
|
overflowY: 'auto',
|
|
55
55
|
maxWidth: '300px',
|
|
56
56
|
}, children: [searchResults.map((value) => {
|
|
57
|
-
return ((0, jsx_runtime_1.jsx)(SortableItem, { theme: theme, selectedColumns: selectedColumns, setSelectedColumns: setSelectedColumns, id: value, label: value.replace('.', ' '), SelectColumn: SelectColumn, HandleButton: HandleButton }, value));
|
|
57
|
+
return ((0, jsx_runtime_1.jsx)(SortableItem, { theme: theme, selectedColumns: selectedColumns, setSelectedColumns: setSelectedColumns, id: value, label: value.replace('.', ' | '), SelectColumn: SelectColumn, HandleButton: HandleButton }, value));
|
|
58
58
|
}), search.length > 0 && searchResults.length === 0 && ((0, jsx_runtime_1.jsx)("div", { style: { fontFamily: theme?.fontFamily }, children: "No results found" }))] }) }) }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
59
59
|
display: 'flex',
|
|
60
60
|
width: '100%',
|
|
@@ -105,7 +105,7 @@ function AddColumnPopover({ onSave, orderedColumnNames, setOrderedColumnNames, s
|
|
|
105
105
|
setPivot(null);
|
|
106
106
|
}
|
|
107
107
|
onSave();
|
|
108
|
-
}, label: "
|
|
108
|
+
}, label: "Select columns" })] })] }));
|
|
109
109
|
}
|
|
110
110
|
exports.default = AddColumnPopover;
|
|
111
111
|
const SortableItem = ({ id, label, setSelectedColumns, theme, selectedColumns, SelectColumn, HandleButton, }) => {
|
|
@@ -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,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddLimitPopover = exports.LimitSentence = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const UiComponents_1 = require("../UiComponents");
|
|
7
|
+
const Context_1 = require("../../Context");
|
|
8
|
+
const ui_1 = require("./ui");
|
|
9
|
+
const SORT_VALUE_TO_LABEL = {
|
|
10
|
+
ASC: 'ascending',
|
|
11
|
+
DESC: 'descending',
|
|
12
|
+
};
|
|
13
|
+
const LimitSentence = ({ limit, handleDelete, setOpenPopover, onSave, popoverTitle = 'Edit limit', LimitPopover, EditPopover, children, }) => {
|
|
14
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
15
|
+
const handleClickDelete = (e) => {
|
|
16
|
+
setOpenPopover(null);
|
|
17
|
+
handleDelete();
|
|
18
|
+
};
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { width: '100%' }, children: (0, jsx_runtime_1.jsx)(LimitPopover
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
, {
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
filterLabel: `limit ${limit.value[0].value}`, onClickDelete: handleClickDelete, popoverTitle: popoverTitle, popoverChildren: (0, jsx_runtime_1.jsx)(EditPopover, { onSave: (column, direction) => {
|
|
24
|
+
setIsOpen(false);
|
|
25
|
+
onSave(column, direction);
|
|
26
|
+
}, isEdit: true, onDelete: handleClickDelete, initialLimit: limit.value[0].value }), isOpen: isOpen, setIsOpen: setIsOpen, onDelete: () => {
|
|
27
|
+
handleDelete();
|
|
28
|
+
} }) }));
|
|
29
|
+
};
|
|
30
|
+
exports.LimitSentence = LimitSentence;
|
|
31
|
+
const AddLimitPopover = ({ onSave, initialLimit, isEdit, onDelete, }) => {
|
|
32
|
+
const [limit, setLimit] = (0, react_1.useState)(initialLimit || 0);
|
|
33
|
+
const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 12 }, children: [(0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'row', gap: 12, padding: '6px 0px' }, children: (0, jsx_runtime_1.jsx)(ui_1.QuillTextInput, { value: limit, type: "number", style: { width: 200, minHeight: 32, padding: '6px 12px' }, onChange: (e) => {
|
|
35
|
+
setLimit(e.target.value);
|
|
36
|
+
} }) }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
justifyContent: 'end',
|
|
40
|
+
gap: 12,
|
|
41
|
+
}, children: isEdit ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), (0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedButton, { onClick: () => onSave(limit), label: "Edit limit" })] })) : ((0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedButton, { onClick: () => onSave(limit), label: "Add limit" })) })] }));
|
|
42
|
+
};
|
|
43
|
+
exports.AddLimitPopover = AddLimitPopover;
|
|
@@ -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"}
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const QuillSelect_1 = require("../QuillSelect");
|
|
7
7
|
const UiComponents_1 = require("../UiComponents");
|
|
8
8
|
const Context_1 = require("../../Context");
|
|
9
|
+
const textProcessing_1 = require("../../utils/textProcessing");
|
|
9
10
|
const SORT_VALUE_TO_LABEL = {
|
|
10
11
|
ASC: 'ascending',
|
|
11
12
|
DESC: 'descending',
|
|
@@ -27,7 +28,7 @@ const SortSentence = ({ sortData, keyPrefix, columns, handleDelete, setEditPopov
|
|
|
27
28
|
// @ts-ignore
|
|
28
29
|
, {
|
|
29
30
|
// @ts-ignore
|
|
30
|
-
filterLabel: `${sortData.expr.column || sortData.expr.value} is ${SORT_VALUE_TO_LABEL[sortData.type]}`, onClickDelete: handleClickDelete, popoverTitle: popoverTitle, popoverChildren: (0, jsx_runtime_1.jsx)(EditPopover, { onSave: (column, direction) => {
|
|
31
|
+
filterLabel: `${(0, textProcessing_1.snakeCaseToTitleCase)(sortData.expr.column) || (0, textProcessing_1.snakeCaseToTitleCase)(sortData.expr.value)} is ${SORT_VALUE_TO_LABEL[sortData.type]}`, onClickDelete: handleClickDelete, popoverTitle: popoverTitle, popoverChildren: (0, jsx_runtime_1.jsx)(EditPopover, { onSave: (column, direction) => {
|
|
31
32
|
setIsOpen(false);
|
|
32
33
|
onSave(column, direction);
|
|
33
34
|
}, columns: columns, isEdit: true, onDelete: handleClickDelete, column: sortData.expr.column || sortData.expr.value }), isOpen: isOpen, setIsOpen: setIsOpen, onDelete: () => {
|
|
@@ -41,11 +42,16 @@ const AddSortPopover = ({ onSave, columns, isEdit, onDelete, column, }) => {
|
|
|
41
42
|
const [sortColumn, setSortColumn] = (0, react_1.useState)(column || '');
|
|
42
43
|
const [sortDirection, setSortDirection] = (0, react_1.useState)('ASC');
|
|
43
44
|
const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 12 }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 12 }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
46
|
+
display: 'flex',
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
gap: 12,
|
|
49
|
+
padding: '6px 0px',
|
|
50
|
+
}, children: [(0, jsx_runtime_1.jsx)(QuillSelect_1.QuillSelectComponent, { theme: theme, value: sortColumn, onChange: (value) => {
|
|
45
51
|
setSortColumn(value);
|
|
46
52
|
}, options: [
|
|
47
53
|
...columns.map((column) => ({
|
|
48
|
-
label: column.split('.')[1],
|
|
54
|
+
label: (0, textProcessing_1.snakeCaseToTitleCase)(column.split('.')[1] || ''),
|
|
49
55
|
value: column.split('.')[1],
|
|
50
56
|
})),
|
|
51
57
|
] }), (0, jsx_runtime_1.jsx)(QuillSelect_1.QuillSelectComponent, { theme: theme, value: sortDirection, onChange: (value) => {
|
|
@@ -58,6 +64,6 @@ const AddSortPopover = ({ onSave, columns, isEdit, onDelete, column, }) => {
|
|
|
58
64
|
flexDirection: 'row',
|
|
59
65
|
justifyContent: 'end',
|
|
60
66
|
gap: 12,
|
|
61
|
-
}, children: isEdit ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), (0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "
|
|
67
|
+
}, children: isEdit ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), (0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "Edit sort" })] })) : ((0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "Add sort" })) })] }));
|
|
62
68
|
};
|
|
63
69
|
exports.AddSortPopover = AddSortPopover;
|
|
@@ -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"}
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
// and return a strinified version of the node. Used to populate the filters.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.DATE_DESCRIPTION_MAP = void 0;
|
|
6
|
+
const textProcessing_1 = require("../../utils/textProcessing");
|
|
6
7
|
/**
|
|
7
8
|
* Trims off the _at suffix of columnNames so "created_at" becomes "created"
|
|
8
9
|
*/
|
|
9
10
|
function cleanDateFieldName(fieldName) {
|
|
10
11
|
if (!fieldName)
|
|
11
12
|
return undefined;
|
|
12
|
-
return fieldName.replace('_at', '');
|
|
13
|
+
return (0, textProcessing_1.snakeCaseToTitleCase)(fieldName.replace('_at', ''));
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* A big map of partial objects and a callback to convert each to a string.
|
|
@@ -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"}
|
|
@@ -11,6 +11,7 @@ const QuillTable_1 = __importDefault(require("../QuillTable"));
|
|
|
11
11
|
const Context_1 = require("../../Context");
|
|
12
12
|
const util_1 = require("./util");
|
|
13
13
|
const csv_1 = require("../../utils/csv");
|
|
14
|
+
const textProcessing_1 = require("../../utils/textProcessing");
|
|
14
15
|
/**
|
|
15
16
|
* This file is a collection of basic UI components that conform to the shape
|
|
16
17
|
* expected by the Report Builder. Where possible, we use our existing
|
|
@@ -118,7 +119,7 @@ const QuillSidebarSubHeading = ({ label }) => ((0, jsx_runtime_1.jsx)(UiComponen
|
|
|
118
119
|
exports.QuillSidebarSubHeading = QuillSidebarSubHeading;
|
|
119
120
|
// The gray thing on the left.
|
|
120
121
|
exports.QuillSidebar = (0, react_1.forwardRef)(({ children, ...props }, forwardedRef) => ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
121
|
-
|
|
122
|
+
overflowX: 'visible',
|
|
122
123
|
padding: '12px',
|
|
123
124
|
width: '25%',
|
|
124
125
|
height: '100%',
|
|
@@ -189,7 +190,7 @@ exports.QuillPopover = (0, react_1.forwardRef)(({ children, trigger, isOpen, onC
|
|
|
189
190
|
fontSize: 18,
|
|
190
191
|
margin: 0,
|
|
191
192
|
textAlign: 'left',
|
|
192
|
-
|
|
193
|
+
marginBottom: 5,
|
|
193
194
|
color: theme?.primaryTextColor,
|
|
194
195
|
fontFamily: theme?.fontFamily,
|
|
195
196
|
}, children: title })), children] }));
|
|
@@ -265,7 +266,7 @@ const QuillSelectColumn = ({ label, selected, setSelected, children, }) => {
|
|
|
265
266
|
overflow: 'hidden',
|
|
266
267
|
fontFamily: theme?.fontFamily,
|
|
267
268
|
color: theme?.primaryTextColor,
|
|
268
|
-
}, children: label })] })] }));
|
|
269
|
+
}, children: (0, textProcessing_1.snakeCaseToTitleCase)(label) })] })] }));
|
|
269
270
|
};
|
|
270
271
|
exports.QuillSelectColumn = QuillSelectColumn;
|
|
271
272
|
// A draggable card with a grab-handle and a column name
|
|
@@ -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,QAAS,GAAG,QAMvC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,WAiBvD;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,iBAQjD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E,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"}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.removeNonSelectedTableReferences = exports.getDateFilterInfo = exports.trimEndS = exports.deepCopy = exports.getPostgresBasicType = exports.showNodeAsRow = exports.isExtractEquals = exports.isDateTruncEquals = exports.tryConvertDateEquality = exports.extractSuffixToString = exports.dateTruncSuffixToString = exports.newUTCDate = exports.isColumnComparison = exports.isTheCurrentIntervalBigQuery = exports.isThePreviousInterval = exports.isTheCurrentInterval = exports.isInTheLastIntervalBigQuery = exports.isInTheLastInterval = exports.getInThePreviousIntervalSentence = exports.getInTheLastIntervalSentence = exports.getInTheCurrentIntervalSentence = exports.formatDateComparisonNode = exports.areObjectsEqualish = exports.isColumnDateish = exports.generateColumnExpr = exports.isColumnReferenceish = exports.isDateTrunc = exports.hasTopLevelOrBoolean = exports.isTopLevelBoolean = exports.isNodeEmptyCollection = void 0;
|
|
5
5
|
const date_fns_1 = require("date-fns");
|
|
6
6
|
const bigDateMap_1 = require("./bigDateMap");
|
|
7
|
+
const textProcessing_1 = require("../../utils/textProcessing");
|
|
7
8
|
/**
|
|
8
9
|
* A node that is "in" or "not in" where none of the variants are selected.
|
|
9
10
|
*/
|
|
@@ -132,7 +133,7 @@ function formatDateComparisonNode(node) {
|
|
|
132
133
|
exports.formatDateComparisonNode = formatDateComparisonNode;
|
|
133
134
|
function getInTheCurrentIntervalSentence(node, databaseType) {
|
|
134
135
|
if (databaseType === 'BigQuery') {
|
|
135
|
-
const dateColumn = node.left.args.value[0].column;
|
|
136
|
+
const dateColumn = (0, textProcessing_1.snakeCaseToTitleCase)(node.left.args.value[0].column);
|
|
136
137
|
const periodValue = node.left.args.value[1].column.toLowerCase();
|
|
137
138
|
return `${dateColumn} in the current ${periodValue}`;
|
|
138
139
|
}
|
|
@@ -146,7 +147,7 @@ const BIG_QUERY_DAY_TO_INTERVAL_MAP = {
|
|
|
146
147
|
};
|
|
147
148
|
function getInTheLastIntervalSentence(node, databaseType) {
|
|
148
149
|
if (databaseType === 'BigQuery') {
|
|
149
|
-
const dateColumn = node.left.column;
|
|
150
|
+
const dateColumn = (0, textProcessing_1.snakeCaseToTitleCase)(node.left.column);
|
|
150
151
|
const amount = node.right.args.value[1].expr.value;
|
|
151
152
|
let unit = node.right.args.value[1].unit.toLowerCase();
|
|
152
153
|
if (unit.includes('*')) {
|
|
@@ -159,7 +160,7 @@ function getInTheLastIntervalSentence(node, databaseType) {
|
|
|
159
160
|
exports.getInTheLastIntervalSentence = getInTheLastIntervalSentence;
|
|
160
161
|
function getInThePreviousIntervalSentence(node, databaseType) {
|
|
161
162
|
if (databaseType === 'BigQuery') {
|
|
162
|
-
const dateColumn = node.left.args.value[0].column;
|
|
163
|
+
const dateColumn = (0, textProcessing_1.snakeCaseToTitleCase)(node.left.args.value[0].column);
|
|
163
164
|
const periodValue = node.left.args.value[1].column.toLowerCase();
|
|
164
165
|
return `${dateColumn} in the previous ${periodValue}`;
|
|
165
166
|
}
|
|
@@ -218,6 +219,7 @@ const isTheCurrentInterval = (node, databaseType) => {
|
|
|
218
219
|
const isInsideOfDateTrunc = ['AND'].includes(node.operator) &&
|
|
219
220
|
(node.left.operator === '=' || node.left.type === 'double_quote_string') &&
|
|
220
221
|
node.right.operator === '=' &&
|
|
222
|
+
node.right.name &&
|
|
221
223
|
node.right.name.toLowerCase() === 'date_trunc' &&
|
|
222
224
|
node.args.value[0].type === 'single_quote_string' &&
|
|
223
225
|
node.args.value[1].type === 'binary_expr' &&
|
|
@@ -380,14 +382,14 @@ function tryConvertDateEquality(node, databaseType) {
|
|
|
380
382
|
if ((0, exports.isDateTruncEquals)(node)) {
|
|
381
383
|
const columnNode = node.left.args.value[1];
|
|
382
384
|
const columnName = columnNode.column ?? columnNode.value;
|
|
383
|
-
const cleanColumnName = columnName.replaceAll('_at', '');
|
|
385
|
+
const cleanColumnName = (0, textProcessing_1.snakeCaseToTitleCase)(columnName.replaceAll('_at', ''));
|
|
384
386
|
const prettyDateSuffix = dateTruncSuffixToString(node, databaseType);
|
|
385
387
|
return `${cleanColumnName} ${prettyDateSuffix}`;
|
|
386
388
|
}
|
|
387
389
|
else if ((0, exports.isExtractEquals)(node)) {
|
|
388
390
|
const columnNode = node.left.args.source;
|
|
389
391
|
const columnName = columnNode.column ?? columnNode.value;
|
|
390
|
-
const cleanColumnName = columnName.replaceAll('_at', '');
|
|
392
|
+
const cleanColumnName = (0, textProcessing_1.snakeCaseToTitleCase)(columnName.replaceAll('_at', ''));
|
|
391
393
|
const prettyDateSuffix = extractSuffixToString(node);
|
|
392
394
|
return `${cleanColumnName} ${prettyDateSuffix}`;
|
|
393
395
|
}
|
|
@@ -8,7 +8,7 @@ export interface Pivot {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
triggerButtonText?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const PivotModal: ({ pivotRowField, setPivotRowField, pivotColumnField, setPivotColumnField, pivotValueField, setPivotValueField, pivotAggregation, setPivotAggregation, popUpTitle, setPopUpTitle, selectedTable, SelectComponent, ButtonComponent, PopoverComponent, HeaderComponent, LabelComponent, TextComponent, selectedPivotIndex, setSelectedPivotIndex, removePivot, selectPivot, showUpdatePivot, setShowUpdatePivot, data, columns, theme, isOpen, setIsOpen, dateRange, createdPivots, setCreatedPivots, recommendedPivots, setRecommendedPivots, triggerButtonText, showPivotEditButton, showEditOnPivotClick, selectPivotOnEdit, showTrigger, rightAlign, parentRef, recommendPivotCount, }: {
|
|
11
|
+
export declare const PivotModal: ({ pivotRowField, setPivotRowField, pivotColumnField, setPivotColumnField, pivotValueField, setPivotValueField, pivotAggregation, setPivotAggregation, popUpTitle, setPopUpTitle, selectedTable, SelectComponent, ButtonComponent, SecondaryButtonComponent, PopoverComponent, HeaderComponent, LabelComponent, TextComponent, selectedPivotIndex, setSelectedPivotIndex, removePivot, selectPivot, showUpdatePivot, setShowUpdatePivot, data, columns, theme, isOpen, setIsOpen, dateRange, createdPivots, setCreatedPivots, recommendedPivots, setRecommendedPivots, triggerButtonText, showPivotEditButton, showEditOnPivotClick, selectPivotOnEdit, showTrigger, rightAlign, parentRef, recommendPivotCount, }: {
|
|
12
12
|
pivotRowField: any;
|
|
13
13
|
setPivotRowField: any;
|
|
14
14
|
pivotColumnField: any;
|
|
@@ -22,6 +22,7 @@ export declare const PivotModal: ({ pivotRowField, setPivotRowField, pivotColumn
|
|
|
22
22
|
selectedTable: any;
|
|
23
23
|
SelectComponent: any;
|
|
24
24
|
ButtonComponent: any;
|
|
25
|
+
SecondaryButtonComponent: any;
|
|
25
26
|
PopoverComponent: any;
|
|
26
27
|
HeaderComponent: any;
|
|
27
28
|
LabelComponent: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PivotModal.d.ts","sourceRoot":"","sources":["../../../../src/internals/ReportBuilder/PivotModal.tsx"],"names":[],"mappings":"AA+BA,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAkBD,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"PivotModal.d.ts","sourceRoot":"","sources":["../../../../src/internals/ReportBuilder/PivotModal.tsx"],"names":[],"mappings":"AA+BA,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAkBD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAqtBtB,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,KAAK,KAAA,EAAE,IAAI,KAAA,EAAE,MAAM,KAAA,OAyB1D;AAkHD,wBAAgB,WAAW,CAAC,SAAS,KAAA,WAYpC;AAgCD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,GAAG,EACT,SAAS,EAAE,GAAG,EACd,YAAY,EAAE,OAAO,EACrB,QAAQ,SAAK,EACb,SAAS,GAAE,GAAU;;;;;;EA6atB"}
|
|
@@ -6,13 +6,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const Context_1 = require("../../Context");
|
|
8
8
|
const dataFetcher_1 = require("../../utils/dataFetcher");
|
|
9
|
-
const assets_1 = require("../../assets");
|
|
10
9
|
const PivotList_1 = require("./PivotList");
|
|
11
10
|
const date_fns_1 = require("date-fns");
|
|
12
11
|
const valueFormatter_1 = require("../../utils/valueFormatter");
|
|
13
12
|
const ChartBuilder_1 = require("../../ChartBuilder");
|
|
14
13
|
const textProcessing_1 = require("../../utils/textProcessing");
|
|
15
|
-
const QuillCard_1 = require("../../components/QuillCard");
|
|
16
14
|
const QuillHover = () => {
|
|
17
15
|
return ((0, jsx_runtime_1.jsx)("style", { children: `
|
|
18
16
|
.quill-hover {
|
|
@@ -26,7 +24,7 @@ const QuillHover = () => {
|
|
|
26
24
|
}
|
|
27
25
|
` }));
|
|
28
26
|
};
|
|
29
|
-
const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivotColumnField, pivotValueField, setPivotValueField, pivotAggregation, setPivotAggregation, popUpTitle, setPopUpTitle, selectedTable, SelectComponent, ButtonComponent, PopoverComponent, HeaderComponent, LabelComponent, TextComponent, selectedPivotIndex, setSelectedPivotIndex, removePivot, selectPivot, showUpdatePivot, setShowUpdatePivot, data, columns, theme, isOpen, setIsOpen, dateRange, createdPivots, setCreatedPivots, recommendedPivots, setRecommendedPivots, triggerButtonText = 'Pivot', showPivotEditButton = false, showEditOnPivotClick = true, selectPivotOnEdit = false, showTrigger = true, rightAlign = false, parentRef, recommendPivotCount = 6, }) => {
|
|
27
|
+
const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivotColumnField, pivotValueField, setPivotValueField, pivotAggregation, setPivotAggregation, popUpTitle, setPopUpTitle, selectedTable, SelectComponent, ButtonComponent, SecondaryButtonComponent, PopoverComponent, HeaderComponent, LabelComponent, TextComponent, selectedPivotIndex, setSelectedPivotIndex, removePivot, selectPivot, showUpdatePivot, setShowUpdatePivot, data, columns, theme, isOpen, setIsOpen, dateRange, createdPivots, setCreatedPivots, recommendedPivots, setRecommendedPivots, triggerButtonText = 'Pivot', showPivotEditButton = false, showEditOnPivotClick = true, selectPivotOnEdit = false, showTrigger = true, rightAlign = false, parentRef, recommendPivotCount = 6, }) => {
|
|
30
28
|
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
31
29
|
const [pivotUpdateIndex, setPivotUpdateIndex] = (0, react_1.useState)(null);
|
|
32
30
|
const [selectedPivotType, setSelectedPivotType] = (0, react_1.useState)('recommended');
|
|
@@ -96,7 +94,7 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
|
|
|
96
94
|
const columnSelectOptions = (0, react_1.useMemo)(() => {
|
|
97
95
|
return [
|
|
98
96
|
...Object.keys(columnsToShow).map((key) => {
|
|
99
|
-
return { label: key, value: key };
|
|
97
|
+
return { label: (0, textProcessing_1.snakeCaseToTitleCase)(key), value: key };
|
|
100
98
|
}),
|
|
101
99
|
];
|
|
102
100
|
}, [columnsToShow]);
|
|
@@ -230,6 +228,9 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
|
|
|
230
228
|
setShowUpdatePivot(false);
|
|
231
229
|
setPopUpTitle('Add Pivot');
|
|
232
230
|
}, style: rightAlign ? { right: 0 } : {}, parentRef: parentRef, showTrigger: showTrigger, label: triggerButtonText, isOpen: isOpen, setIsOpen: setIsOpen, onClick: () => {
|
|
231
|
+
if (columns.length === 0) {
|
|
232
|
+
setIsOpen(false);
|
|
233
|
+
}
|
|
233
234
|
// table is not loaded yet, so pivot button is not clickable
|
|
234
235
|
if (Object.keys(columnsToShow).length === 0) {
|
|
235
236
|
return;
|
|
@@ -242,12 +243,10 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
|
|
|
242
243
|
backgroundColor: 'rgb(255, 255, 255)',
|
|
243
244
|
display: 'flex',
|
|
244
245
|
flexDirection: 'column',
|
|
245
|
-
}, children: [(0, jsx_runtime_1.jsx)(HeaderComponent, { children: popUpTitle }), (0, jsx_runtime_1.jsx)("div", { style: { height: 12 } }), (0, jsx_runtime_1.jsx)("div", { style: { width: divWidth }, children: samplePivotTable
|
|
246
|
+
}, children: [(0, jsx_runtime_1.jsx)(HeaderComponent, { children: popUpTitle }), (0, jsx_runtime_1.jsx)("div", { style: { height: 12 } }), (0, jsx_runtime_1.jsx)("div", { style: { width: divWidth }, children: samplePivotTable && ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
246
247
|
marginBottom: 20,
|
|
247
248
|
minHeight: 160,
|
|
248
|
-
}, children: (0, jsx_runtime_1.jsx)(PivotList_1.PivotCard, { pivotTable: samplePivotTable, theme: theme, index: 0, onSelectPivot: () => { }, selectedPivotIndex: -1, onEditPivot: () => { }, ButtonComponent: ButtonComponent, showEdit: false, clickable: false, minHeight: 140, LabelComponent: LabelComponent, TextComponent: TextComponent, HeaderComponent: HeaderComponent }) }))
|
|
249
|
-
color: theme.secondaryTextColor,
|
|
250
|
-
}, children: "Select a row field and aggregation type to see a preview" }) }) })) }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
249
|
+
}, children: (0, jsx_runtime_1.jsx)(PivotList_1.PivotCard, { pivotTable: samplePivotTable, theme: theme, index: 0, onSelectPivot: () => { }, selectedPivotIndex: -1, onEditPivot: () => { }, ButtonComponent: ButtonComponent, showEdit: false, clickable: false, minHeight: 140, LabelComponent: LabelComponent, TextComponent: TextComponent, HeaderComponent: HeaderComponent }) })) }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
251
250
|
display: 'flex',
|
|
252
251
|
flexDirection: 'column',
|
|
253
252
|
gap: 10,
|
|
@@ -355,26 +354,24 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
|
|
|
355
354
|
columns: selectedPivotTable?.columns,
|
|
356
355
|
}, theme: theme, index: 0, onSelectPivot: () => { }, selectedPivotIndex: -1, onEditPivot: () => { }, ButtonComponent: ButtonComponent, showEdit: false, onClose: () => {
|
|
357
356
|
removePivot();
|
|
358
|
-
}, clickable: true, minHeight: 180, LabelComponent: LabelComponent, TextComponent: TextComponent, HeaderComponent: HeaderComponent }) }) })) : ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
borderRadius: 5,
|
|
377
|
-
}, className: "quill-hover", children: [(0, jsx_runtime_1.jsx)(QuillHover, {}), (0, jsx_runtime_1.jsx)(assets_1.RefreshIcon, { style: { marginRight: 5 } }), "Refresh"] }) }), isLoading ? ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
357
|
+
}, clickable: true, minHeight: 180, LabelComponent: LabelComponent, TextComponent: TextComponent, HeaderComponent: HeaderComponent }) }) })) : ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
358
|
+
display: 'flex',
|
|
359
|
+
flexDirection: 'row',
|
|
360
|
+
width: '100%',
|
|
361
|
+
alignItems: 'center',
|
|
362
|
+
justifyContent: 'space-between',
|
|
363
|
+
paddingBottom: 12,
|
|
364
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
365
|
+
fontWeight: '600',
|
|
366
|
+
fontSize: 18,
|
|
367
|
+
}, children: "Recommended pivots" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(SecondaryButtonComponent, { onClick: refreshPivots, label: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
368
|
+
display: 'flex',
|
|
369
|
+
flexDirection: 'row',
|
|
370
|
+
whiteSpace: 'nowrap',
|
|
371
|
+
alignItems: 'center',
|
|
372
|
+
gap: 6,
|
|
373
|
+
fontSize: 14,
|
|
374
|
+
}, children: [(0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", style: { width: 16, height: 16 }, children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5ZM16.5 15a.75.75 0 0 1 .712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 0 1 0 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 0 1-1.422 0l-.395-1.183a1.5 1.5 0 0 0-.948-.948l-1.183-.395a.75.75 0 0 1 0-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0 1 16.5 15Z", clipRule: "evenodd" }) }), "Regenerate"] }) }) })] }), isLoading ? ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
378
375
|
background: theme.backgroundColor,
|
|
379
376
|
width: 250,
|
|
380
377
|
minWidth: 250,
|
|
@@ -385,7 +382,7 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
|
|
|
385
382
|
display: 'flex',
|
|
386
383
|
margin: '0px auto',
|
|
387
384
|
justifyContent: 'center',
|
|
388
|
-
}, children: [(0, jsx_runtime_1.jsx)("div", { style: { height: 100 } }), (0, jsx_runtime_1.jsxs)("svg", { width: "24", height: "24", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "9.375", strokeWidth: "3.75", strokeDasharray: "calc(2 * 3.14 * 9.375 / 3) calc(2 * 3.14 * 9.375 * 2 / 3)", strokeDashoffset: "calc(2 * 3.14 * 9.375 / 6)", stroke: theme?.primaryTextColor || '#364153', fill: "none", transform: "rotate(-90 12 12)", children: (0, jsx_runtime_1.jsx)("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", from: "-180 12 12", to: "180 12 12", dur: "0.8s", repeatCount: "indefinite" }) }), (0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "9.375", strokeWidth: "3.75", strokeDasharray: "calc(2 * 3.14 * 9.375 / 3) calc(2 * 3.14 * 9.375 * 1 / 3)", strokeDashoffset: "calc(2 * 3.14 * 9.375 / 3) calc(2 * 3.14 * 9.375 * 2 / 3)", stroke: '#ADB1B9', fill: "none", transform: "rotate(90 12 12)", children: (0, jsx_runtime_1.jsx)("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", from: "0 12 12", to: "360 12 12", dur: "0.8s", repeatCount: "indefinite" }) })] })] })) : ((0, jsx_runtime_1.
|
|
385
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: { height: 100 } }), (0, jsx_runtime_1.jsxs)("svg", { width: "24", height: "24", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "9.375", strokeWidth: "3.75", strokeDasharray: "calc(2 * 3.14 * 9.375 / 3) calc(2 * 3.14 * 9.375 * 2 / 3)", strokeDashoffset: "calc(2 * 3.14 * 9.375 / 6)", stroke: theme?.primaryTextColor || '#364153', fill: "none", transform: "rotate(-90 12 12)", children: (0, jsx_runtime_1.jsx)("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", from: "-180 12 12", to: "180 12 12", dur: "0.8s", repeatCount: "indefinite" }) }), (0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "9.375", strokeWidth: "3.75", strokeDasharray: "calc(2 * 3.14 * 9.375 / 3) calc(2 * 3.14 * 9.375 * 1 / 3)", strokeDashoffset: "calc(2 * 3.14 * 9.375 / 3) calc(2 * 3.14 * 9.375 * 2 / 3)", stroke: '#ADB1B9', fill: "none", transform: "rotate(90 12 12)", children: (0, jsx_runtime_1.jsx)("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", from: "0 12 12", to: "360 12 12", dur: "0.8s", repeatCount: "indefinite" }) })] })] })) : ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(PivotList_1.PivotList, { recommendedPivotTables: recommendedPivotTables, createdPivotTables: createdPivotTables, theme: theme, onSelectRecommendedPivot: onSelectRecommendedPivot, onSelectCreatedPivot: onSelectCreatedPivot, selectedPivotIndex: selectedPivotIndex, selectedPivotType: selectedPivotType, ButtonComponent: ButtonComponent, HeaderComponent: HeaderComponent, onEditRecommendedPivot: onEditRecommendedPivot, onEditCreatedPivot: onEditPivot, showCreatePivot: true, showPivotEditButton: showPivotEditButton, LabelComponent: LabelComponent, TextComponent: TextComponent }) }))] })) })) }) })] }) }));
|
|
389
386
|
};
|
|
390
387
|
exports.PivotModal = PivotModal;
|
|
391
388
|
function generatePivotTableYAxis(pivot, cols, format) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDomain.d.ts","sourceRoot":"","sources":["../../../src/utils/getDomain.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"getDomain.d.ts","sourceRoot":"","sources":["../../../src/utils/getDomain.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,EAAE,CA8BtE"}
|
|
@@ -23,6 +23,9 @@ function getDomain(data, fields) {
|
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
const [minValue, maxValue] = numericValues.reduce(([min, max], value) => [Math.min(min, value), Math.max(max, value)], [Infinity, -Infinity]);
|
|
26
|
+
if (minValue === 0 && maxValue === 0) {
|
|
27
|
+
return [0, 1];
|
|
28
|
+
}
|
|
26
29
|
return fuzzyRound(Math.min(minValue, 0), maxValue);
|
|
27
30
|
}
|
|
28
31
|
exports.default = getDomain;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartBuilder.d.ts","sourceRoot":"","sources":["../../src/ChartBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AASf,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACL,KAAK,EAIN,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,SAAS,EACT,iBAAiB,EAWjB,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAuKzC,eAAO,MAAM,mBAAmB,UAM/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAO7B,CAAC;AAyBF,UAAU,iBAAiB;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,GAAG,CAAC,OAAO,CAAC;IACtD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,GAAG,CAAC,OAAO,CAAC;IAC5D,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,GAAG,CAAC,OAAO,CAAC;IACtD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,GAAG,CAAC,OAAO,CAAC;IAC/D,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,GAAG,CAAC,OAAO,CAAC;IAC7C,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CA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,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,2CAuB7D;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAA0B,EAC1B,MAA6B,EAC7B,MAAuB,EACvB,eAAyC,EACzC,MAAuB,EACvB,KAAqB,EACrB,YAAmC,EACnC,IAAmB,EACnB,OAAyB,EACzB,MAAM,EACN,UAAkB,EAClB,cAAsB,EACtB,KAAK,EACL,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,SAAS,EAAE,EAAE,EACb,eAAe,EACf,cAAc,EACd,sBAA8B,EAC9B,oBAA4B,EAC5B,wBAAgC,EAChC,qBAA4B,EAC5B,wBAAwB,EACxB,QAAQ,EACR,MAAM,EAAE,UAAU,EAClB,aAAyB,EACzB,iBAAiB,EAAE,EAAO,EAC1B,aAAa,EAAE,EAAO,EACtB,oBAAoB,EACpB,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,SAAS,GACV,EAAE,iBAAiB,uDAuxCnB;AA4GD,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,SAAS,EACT,QAAQ,EACR,KAAK,EACL,MAAM,GACP,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,2CA8CA"}
|
package/dist/esm/ChartBuilder.js
CHANGED
|
@@ -731,7 +731,7 @@ export default function ChartBuilder({ TextInput = QuillTextInput, Select = Quil
|
|
|
731
731
|
// marginTop: 6,
|
|
732
732
|
display: 'flex',
|
|
733
733
|
flexDirection: 'column',
|
|
734
|
-
}, children: _jsx(PivotModal, { pivotRowField: pivotRowField, setPivotRowField: setPivotRowField, pivotColumnField: pivotColumnField, setPivotColumnField: setPivotColumnField, pivotValueField: pivotValueField, setPivotValueField: setPivotValueField, pivotAggregation: pivotAggregation, setPivotAggregation: setPivotAggregation, createdPivots: createdPivots, setCreatedPivots: setCreatedPivots, recommendedPivots: recommendedPivots, setRecommendedPivots: setRecommendedPivots, popUpTitle: pivotPopUpTitle, setPopUpTitle: setPivotPopUpTitle, selectedTable: selectedTable, SelectComponent: Select, ButtonComponent: Button, PopoverComponent: Popover, LabelComponent: Label, TextComponent: Text, HeaderComponent: Header, theme: theme, isOpen: showPivotPopover, setIsOpen: setShowPivotPopover, showUpdatePivot: isEdittingPivot, setShowUpdatePivot: setIsEdittingPivot, parentRef: parentRef, data: rows, columns: columns, triggerButtonText: 'Add pivot +', selectedPivotIndex: selectedPivotIndex, setSelectedPivotIndex: setSelectedPivotIndex, removePivot: handleDeletePivot, selectPivot: handleAddPivot, dateRange: dateRange, selectPivotOnEdit: true, showTrigger: !formData.pivot }) }), formData.pivot && (_jsx("div", { style: {
|
|
734
|
+
}, children: _jsx(PivotModal, { pivotRowField: pivotRowField, setPivotRowField: setPivotRowField, pivotColumnField: pivotColumnField, setPivotColumnField: setPivotColumnField, pivotValueField: pivotValueField, setPivotValueField: setPivotValueField, pivotAggregation: pivotAggregation, setPivotAggregation: setPivotAggregation, createdPivots: createdPivots, setCreatedPivots: setCreatedPivots, recommendedPivots: recommendedPivots, setRecommendedPivots: setRecommendedPivots, popUpTitle: pivotPopUpTitle, setPopUpTitle: setPivotPopUpTitle, selectedTable: selectedTable, SelectComponent: Select, ButtonComponent: Button, SecondaryButtonComponent: SecondaryButton, PopoverComponent: Popover, LabelComponent: Label, TextComponent: Text, HeaderComponent: Header, theme: theme, isOpen: showPivotPopover, setIsOpen: setShowPivotPopover, showUpdatePivot: isEdittingPivot, setShowUpdatePivot: setIsEdittingPivot, parentRef: parentRef, data: rows, columns: columns, triggerButtonText: 'Add pivot +', selectedPivotIndex: selectedPivotIndex, setSelectedPivotIndex: setSelectedPivotIndex, removePivot: handleDeletePivot, selectPivot: handleAddPivot, dateRange: dateRange, selectPivotOnEdit: true, showTrigger: !formData.pivot }) }), formData.pivot && (_jsx("div", { style: {
|
|
735
735
|
// width: 592,
|
|
736
736
|
paddingRight: 42,
|
|
737
737
|
maxWidth: 750,
|
package/dist/esm/Dashboard.js
CHANGED
|
@@ -410,7 +410,7 @@ export default function Dashboard({ name, containerStyle, chartContainerStyle =
|
|
|
410
410
|
}, [dashboard, dashboardSections, isLoading]);
|
|
411
411
|
useEffect(() => {
|
|
412
412
|
if (onChangeLoading) {
|
|
413
|
-
onChangeLoading(isLoading);
|
|
413
|
+
onChangeLoading(initialLoad || isLoading);
|
|
414
414
|
}
|
|
415
415
|
}, [isLoading, onChangeLoading]);
|
|
416
416
|
if (!dashboardSections || Object.keys(dashboardSections).length == 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportBuilder.d.ts","sourceRoot":"","sources":["../../src/ReportBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAMd,MAAM,OAAO,CAAC;AACf,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,UAAU,EAMV,oBAAoB,EAIpB,SAAS,EACV,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ReportBuilder.d.ts","sourceRoot":"","sources":["../../src/ReportBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAMd,MAAM,OAAO,CAAC;AACf,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,UAAU,EAMV,oBAAoB,EAIpB,SAAS,EACV,MAAM,2BAA2B,CAAC;AA4HnC;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,gBAAqB,EACrB,wBAA0C,EAC1C,oBAAgC,EAChC,gBAAqB,EACrB,MAAuB,EACvB,eAAyC,EACzC,SAA0B,EAC1B,MAA6B,EAC7B,KAAkB,EAClB,OAAsB,EACtB,IAAgB,EAChB,QAA2B,EAC3B,OAAsB,EACtB,SAA2B,EAC3B,YAAg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