@quillsql/react 2.11.7 → 2.11.9

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.
Files changed (113) hide show
  1. package/dist/cjs/BarList.d.ts +1 -0
  2. package/dist/cjs/BarList.d.ts.map +1 -1
  3. package/dist/cjs/BarList.js +55 -46
  4. package/dist/cjs/Chart.d.ts +4 -0
  5. package/dist/cjs/Chart.d.ts.map +1 -1
  6. package/dist/cjs/Chart.js +25 -19
  7. package/dist/cjs/ChartBuilder.d.ts +5 -3
  8. package/dist/cjs/ChartBuilder.d.ts.map +1 -1
  9. package/dist/cjs/ChartBuilder.js +236 -196
  10. package/dist/cjs/ChartEditor.d.ts +3 -1
  11. package/dist/cjs/ChartEditor.d.ts.map +1 -1
  12. package/dist/cjs/ChartEditor.js +17 -2
  13. package/dist/cjs/Dashboard.d.ts +2 -1
  14. package/dist/cjs/Dashboard.d.ts.map +1 -1
  15. package/dist/cjs/Dashboard.js +4 -4
  16. package/dist/cjs/PieChart.d.ts +1 -1
  17. package/dist/cjs/PieChart.d.ts.map +1 -1
  18. package/dist/cjs/PieChart.js +95 -357
  19. package/dist/cjs/ReportBuilder.d.ts +11 -3
  20. package/dist/cjs/ReportBuilder.d.ts.map +1 -1
  21. package/dist/cjs/ReportBuilder.js +224 -99
  22. package/dist/cjs/SQLEditor.d.ts +4 -2
  23. package/dist/cjs/SQLEditor.d.ts.map +1 -1
  24. package/dist/cjs/SQLEditor.js +9 -6
  25. package/dist/cjs/components/Chart/BarChart.d.ts +2 -1
  26. package/dist/cjs/components/Chart/BarChart.d.ts.map +1 -1
  27. package/dist/cjs/components/Chart/BarChart.js +9 -5
  28. package/dist/cjs/components/Chart/ChartError.js +1 -1
  29. package/dist/cjs/components/Chart/ChartSkeleton.js +2 -2
  30. package/dist/cjs/components/Chart/LineChart.d.ts +2 -1
  31. package/dist/cjs/components/Chart/LineChart.d.ts.map +1 -1
  32. package/dist/cjs/components/Chart/LineChart.js +10 -3
  33. package/dist/cjs/components/Dashboard/TableComponent.d.ts +1 -1
  34. package/dist/cjs/components/Dashboard/TableComponent.d.ts.map +1 -1
  35. package/dist/cjs/components/Dashboard/TableComponent.js +1 -1
  36. package/dist/cjs/components/QuillTable.js +1 -1
  37. package/dist/cjs/components/ReportBuilder/AddColumnPopover.d.ts.map +1 -1
  38. package/dist/cjs/components/ReportBuilder/AddColumnPopover.js +2 -2
  39. package/dist/cjs/components/ReportBuilder/AddSortPopover.d.ts +3 -0
  40. package/dist/cjs/components/ReportBuilder/AddSortPopover.d.ts.map +1 -0
  41. package/dist/cjs/components/ReportBuilder/AddSortPopover.js +62 -0
  42. package/dist/cjs/components/ReportBuilder/convert.d.ts.map +1 -1
  43. package/dist/cjs/components/ReportBuilder/convert.js +3 -2
  44. package/dist/cjs/components/ReportBuilder/ui.d.ts +1 -0
  45. package/dist/cjs/components/ReportBuilder/ui.d.ts.map +1 -1
  46. package/dist/cjs/components/ReportBuilder/ui.js +11 -3
  47. package/dist/cjs/components/UiComponents.d.ts +12 -2
  48. package/dist/cjs/components/UiComponents.d.ts.map +1 -1
  49. package/dist/cjs/components/UiComponents.js +7 -6
  50. package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts +2 -1
  51. package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
  52. package/dist/cjs/internals/ReportBuilder/PivotModal.js +47 -56
  53. package/dist/cjs/utils/aggregate.js +2 -2
  54. package/dist/cjs/utils/color.d.ts +25 -0
  55. package/dist/cjs/utils/color.d.ts.map +1 -1
  56. package/dist/cjs/utils/color.js +164 -1
  57. package/dist/esm/BarList.d.ts +1 -0
  58. package/dist/esm/BarList.d.ts.map +1 -1
  59. package/dist/esm/BarList.js +55 -46
  60. package/dist/esm/Chart.d.ts +4 -0
  61. package/dist/esm/Chart.d.ts.map +1 -1
  62. package/dist/esm/Chart.js +25 -19
  63. package/dist/esm/ChartBuilder.d.ts +5 -3
  64. package/dist/esm/ChartBuilder.d.ts.map +1 -1
  65. package/dist/esm/ChartBuilder.js +234 -195
  66. package/dist/esm/ChartEditor.d.ts +3 -1
  67. package/dist/esm/ChartEditor.d.ts.map +1 -1
  68. package/dist/esm/ChartEditor.js +19 -4
  69. package/dist/esm/Dashboard.d.ts +2 -1
  70. package/dist/esm/Dashboard.d.ts.map +1 -1
  71. package/dist/esm/Dashboard.js +4 -4
  72. package/dist/esm/PieChart.d.ts +1 -1
  73. package/dist/esm/PieChart.d.ts.map +1 -1
  74. package/dist/esm/PieChart.js +93 -334
  75. package/dist/esm/ReportBuilder.d.ts +11 -3
  76. package/dist/esm/ReportBuilder.d.ts.map +1 -1
  77. package/dist/esm/ReportBuilder.js +229 -104
  78. package/dist/esm/SQLEditor.d.ts +4 -2
  79. package/dist/esm/SQLEditor.d.ts.map +1 -1
  80. package/dist/esm/SQLEditor.js +9 -6
  81. package/dist/esm/components/Chart/BarChart.d.ts +2 -1
  82. package/dist/esm/components/Chart/BarChart.d.ts.map +1 -1
  83. package/dist/esm/components/Chart/BarChart.js +9 -5
  84. package/dist/esm/components/Chart/ChartError.js +1 -1
  85. package/dist/esm/components/Chart/ChartSkeleton.js +2 -2
  86. package/dist/esm/components/Chart/LineChart.d.ts +2 -1
  87. package/dist/esm/components/Chart/LineChart.d.ts.map +1 -1
  88. package/dist/esm/components/Chart/LineChart.js +10 -3
  89. package/dist/esm/components/Dashboard/TableComponent.d.ts +1 -1
  90. package/dist/esm/components/Dashboard/TableComponent.d.ts.map +1 -1
  91. package/dist/esm/components/Dashboard/TableComponent.js +1 -1
  92. package/dist/esm/components/QuillTable.js +1 -1
  93. package/dist/esm/components/ReportBuilder/AddColumnPopover.d.ts.map +1 -1
  94. package/dist/esm/components/ReportBuilder/AddColumnPopover.js +2 -2
  95. package/dist/esm/components/ReportBuilder/AddSortPopover.d.ts +3 -0
  96. package/dist/esm/components/ReportBuilder/AddSortPopover.d.ts.map +1 -0
  97. package/dist/esm/components/ReportBuilder/AddSortPopover.js +57 -0
  98. package/dist/esm/components/ReportBuilder/convert.d.ts.map +1 -1
  99. package/dist/esm/components/ReportBuilder/convert.js +3 -2
  100. package/dist/esm/components/ReportBuilder/ui.d.ts +1 -0
  101. package/dist/esm/components/ReportBuilder/ui.d.ts.map +1 -1
  102. package/dist/esm/components/ReportBuilder/ui.js +10 -3
  103. package/dist/esm/components/UiComponents.d.ts +12 -2
  104. package/dist/esm/components/UiComponents.d.ts.map +1 -1
  105. package/dist/esm/components/UiComponents.js +7 -6
  106. package/dist/esm/internals/ReportBuilder/PivotModal.d.ts +2 -1
  107. package/dist/esm/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
  108. package/dist/esm/internals/ReportBuilder/PivotModal.js +47 -56
  109. package/dist/esm/utils/aggregate.js +2 -2
  110. package/dist/esm/utils/color.d.ts +25 -0
  111. package/dist/esm/utils/color.d.ts.map +1 -1
  112. package/dist/esm/utils/color.js +160 -0
  113. package/package.json +1 -1
@@ -7,7 +7,7 @@ import MonacoEditor from '@monaco-editor/react';
7
7
  import { ClientContext, SchemaContext, ThemeContext } from './Context';
8
8
  import QuillTable from './components/QuillTable';
9
9
  import { getData, getDataFromCloud } from './utils/dataFetcher';
10
- import ChartBuilder from './ChartBuilder';
10
+ import { ChartBuilderWithModal } from './ChartBuilder';
11
11
  export function convertPostgresColumn(column) {
12
12
  let format;
13
13
  let fieldType;
@@ -122,7 +122,7 @@ const QuillButton = ({ onClick, label, theme, secondary, }) => (_jsx("button", {
122
122
  fontFamily: theme?.fontFamily,
123
123
  height: 38,
124
124
  }, onClick: onClick, children: label }));
125
- const QuillTextInput = ({ onChange, value, id, placeholder, theme, }) => {
125
+ const QuillTextInput = ({ onChange, value, id, placeholder, theme, style = {}, }) => {
126
126
  return (_jsx("input", { style: {
127
127
  display: 'flex',
128
128
  flexDirection: 'row',
@@ -139,9 +139,10 @@ const QuillTextInput = ({ onChange, value, id, placeholder, theme, }) => {
139
139
  borderColor: theme?.borderColor || '#E7E7E7',
140
140
  borderStyle: 'solid',
141
141
  borderRadius: '6px',
142
+ ...style
142
143
  }, id: id, onChange: onChange, value: value, placeholder: placeholder }));
143
144
  };
144
- export default function QueryEditor({ containerStyle = { height: '100vh' }, ButtonComponent, SecondaryButtonComponent, TextInputComponent, TableComponent = QuillTable, newQueryEnabled = false, LoadingComponent, defaultQuery, onChangeQuery, onChangeData, onChangeColumns, onChangeFields, isEditMode = false, chartBuilderEnabled = false, showTableFormatOptions = false, showDateFieldOptions = false, showAccessControlOptions = false, destinationDashboard, chartBuilderTitle, chartBuilderButtonLabel, onAddToDashboardComplete, addToDashboardButtonLabel = 'Add to dashboard', dashboardItem = undefined, organizationName = undefined, }) {
145
+ export default function QueryEditor({ containerStyle = { height: '100vh' }, ButtonComponent, SecondaryButtonComponent, TextInputComponent, TableComponent = QuillTable, newQueryEnabled = false, LoadingComponent, ModalComponent, defaultQuery, onChangeQuery, onChangeData, onChangeColumns, onChangeFields, isEditMode = false, chartBuilderEnabled = false, showTableFormatOptions = false, showDateFieldOptions = false, showAccessControlOptions = false, destinationDashboard, chartBuilderTitle, chartBuilderButtonLabel, onAddToDashboardComplete, addToDashboardButtonLabel = 'Add to dashboard', dashboardItem = undefined, organizationName = undefined, chartBuilderHorizontalView = false, }) {
145
146
  const [sqlPrompt, setSqlPrompt] = useState('');
146
147
  const [isOpen, setIsOpen] = useState(false);
147
148
  const [client] = useContext(ClientContext);
@@ -269,7 +270,8 @@ export default function QueryEditor({ containerStyle = { height: '100vh' }, Butt
269
270
  }
270
271
  }, [query]);
271
272
  /* rest of your methods */
272
- return (_jsxs("div", { style: containerStyle, children: [_jsx("div", { style: {
273
+ return (_jsxs("div", { style: containerStyle, children: [(!chartBuilderHorizontalView ||
274
+ (chartBuilderHorizontalView && !isChartBuilderOpen)) && (_jsx("div", { style: {
273
275
  height: '100%',
274
276
  display: 'flex',
275
277
  flexDirection: 'column',
@@ -293,8 +295,9 @@ export default function QueryEditor({ containerStyle = { height: '100vh' }, Butt
293
295
  display: 'flex',
294
296
  flexDirection: 'row',
295
297
  alignItems: 'center',
298
+ gap: '10px',
296
299
  height: 80,
297
- }, children: [_jsx("div", { style: { minWidth: 440, marginRight: 10 }, children: (TextInputComponent && (_jsx(TextInputComponent, { id: "ai-search", value: sqlPrompt, onChange: (e) => setSqlPrompt(e.target.value), placeholder: "Ask a question..." }))) || (_jsx(QuillTextInput, { id: "ai-search", value: sqlPrompt, onChange: (e) => setSqlPrompt(e.target.value), placeholder: "Ask a question...", theme: theme })) }), (ButtonComponent && (_jsx(ButtonComponent, { onClick: handleRunSqlPrompt, label: "Ask AI" }))) || (_jsx(QuillButton, { theme: theme, onClick: handleRunSqlPrompt, label: "Ask AI" }))] }), _jsx("div", { style: { height: 'calc(50% - 40px)' }, children: _jsx(SQLEditorComponent, { query: query, setQuery: setQuery, handleRunQuery: handleRunQuery, newQueryEnabled: newQueryEnabled, handleClearQuery: handleClearQuery, theme: theme, defineEditorTheme: defineEditorTheme, setEditorTheme: setEditorTheme, ButtonComponent: ButtonComponent, SecondaryButtonComponent: SecondaryButtonComponent, loading: sqlResponseLoading, LoadingComponent: LoadingComponent }) }), _jsxs("div", { style: {
300
+ }, children: [_jsx("div", { style: { minWidth: 440, flexGrow: 1 }, children: (TextInputComponent && (_jsx(TextInputComponent, { id: "ai-search", value: sqlPrompt, style: { width: '100%' }, onChange: (e) => setSqlPrompt(e.target.value), placeholder: "Ask a question..." }))) || (_jsx(QuillTextInput, { id: "ai-search", value: sqlPrompt, style: { width: '100%' }, onChange: (e) => setSqlPrompt(e.target.value), placeholder: "Ask a question...", theme: theme })) }), (ButtonComponent && (_jsx(ButtonComponent, { onClick: handleRunSqlPrompt, label: "Ask AI" }))) || (_jsx(QuillButton, { theme: theme, onClick: handleRunSqlPrompt, label: "Ask AI" }))] }), _jsx("div", { style: { height: 'calc(50% - 40px)' }, children: _jsx(SQLEditorComponent, { query: query, setQuery: setQuery, handleRunQuery: handleRunQuery, newQueryEnabled: newQueryEnabled, handleClearQuery: handleClearQuery, theme: theme, defineEditorTheme: defineEditorTheme, setEditorTheme: setEditorTheme, ButtonComponent: ButtonComponent, SecondaryButtonComponent: SecondaryButtonComponent, loading: sqlResponseLoading, LoadingComponent: LoadingComponent }) }), _jsxs("div", { style: {
298
301
  display: 'flex',
299
302
  flexDirection: 'column',
300
303
  height: 'calc(50% - 108px)',
@@ -323,7 +326,7 @@ export default function QueryEditor({ containerStyle = { height: '100vh' }, Butt
323
326
  justifyContent: 'flex-end',
324
327
  width: '100%',
325
328
  height: '70px',
326
- }, children: (ButtonComponent && (_jsx(ButtonComponent, { onClick: handleRunQuery, label: "Run query" }))) || (_jsx(QuillButton, { onClick: () => setIsChartBuilderOpen(true), label: addToDashboardButtonLabel, theme: theme })) }))] })] }) }) }), _jsx(ChartBuilder, { rows: rows, columns: columns, fields: fields, query: query, isEditMode: isEditMode, isOpen: isChartBuilderOpen, setIsOpen: setIsChartBuilderOpen, onAddToDashboardComplete: onAddToDashboardComplete, showTableFormatOptions: showTableFormatOptions, showDateFieldOptions: showDateFieldOptions, showAccessControlOptions: showAccessControlOptions, destinationDashboard: destinationDashboard, title: chartBuilderTitle, button: chartBuilderButtonLabel, buttonLabel: addToDashboardButtonLabel, dashboardItem: dashboardItem, organizationName: organizationName })] }));
329
+ }, children: (ButtonComponent && (_jsx(ButtonComponent, { onClick: () => setIsChartBuilderOpen(true), label: addToDashboardButtonLabel }))) || (_jsx(QuillButton, { onClick: () => setIsChartBuilderOpen(true), label: addToDashboardButtonLabel, theme: theme })) }))] })] }) }) })), _jsx(ChartBuilderWithModal, { rows: rows, columns: columns, fields: fields, query: query, horizontalView: chartBuilderHorizontalView, isEditMode: isEditMode, isOpen: isChartBuilderOpen, setIsOpen: setIsChartBuilderOpen, onAddToDashboardComplete: onAddToDashboardComplete, showTableFormatOptions: showTableFormatOptions, showDateFieldOptions: showDateFieldOptions, showAccessControlOptions: showAccessControlOptions, destinationDashboard: destinationDashboard, title: chartBuilderTitle, button: chartBuilderButtonLabel, buttonLabel: addToDashboardButtonLabel, dashboardItem: dashboardItem, organizationName: organizationName, Modal: ModalComponent, Button: ButtonComponent })] }));
327
330
  }
328
331
  const SQLEditorComponent = ({ query, setQuery, handleRunQuery, handleClearQuery, defineEditorTheme, setEditorTheme, ButtonComponent, SecondaryButtonComponent, newQueryEnabled, theme, loading, LoadingComponent, }) => {
329
332
  return (_jsxs("div", { style: {
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- export default function BarChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isStacked, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, }: {
2
+ export default function BarChart({ colors, colorMap, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isStacked, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, }: {
3
3
  colors?: string[];
4
+ colorMap?: any;
4
5
  yAxisFields: any[];
5
6
  data: any[];
6
7
  containerStyle?: React.CSSProperties;
@@ -1 +1 @@
1
- {"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Chart/BarChart.tsx"],"names":[],"mappings":";AAiBA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,MAAM,EACN,WAAW,EACX,IAAI,EACJ,cAAc,EACd,UAAU,EACV,WAAW,EACX,KAAK,EACL,UAAU,EACV,SAAS,EACT,iBAAwB,EACxB,SAAiB,EACjB,SAAiB,EACjB,iBAAyB,GAC1B,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,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,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B,2CAkKA"}
1
+ {"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Chart/BarChart.tsx"],"names":[],"mappings":";AAiBA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,MAAM,EACN,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,cAAc,EACd,UAAU,EACV,WAAW,EACX,KAAK,EACL,UAAU,EACV,SAAS,EACT,iBAAwB,EACxB,SAAiB,EACjB,SAAiB,EACjB,iBAAyB,GAC1B,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,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,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B,2CAwKA"}
@@ -7,7 +7,7 @@ import { selectColor } from '../../utils/color';
7
7
  import ChartTooltip from '../../components/Chart/ChartTooltip';
8
8
  import getDomain from '../../utils/getDomain';
9
9
  import { useEffect, useState } from 'react';
10
- export default function BarChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isStacked, isAnimationActive = true, hideXAxis = false, hideYAxis = false, hideCartesianGrid = false, }) {
10
+ export default function BarChart({ colors, colorMap, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isStacked, isAnimationActive = true, hideXAxis = false, hideYAxis = false, hideCartesianGrid = false, }) {
11
11
  const [formattedData, setFormattedData] = useState([]);
12
12
  useEffect(() => {
13
13
  if (!data || data.length === 0) {
@@ -33,11 +33,12 @@ export default function BarChart({ colors, yAxisFields, data, containerStyle, xA
33
33
  alignItems: 'center',
34
34
  fontSize: 13,
35
35
  color: theme.secondaryTextColor,
36
+ ...containerStyle,
36
37
  }, children: "No results found for specified time period." }));
37
38
  }
38
39
  return (_jsx("div", { style: {
39
- ...containerStyle,
40
40
  boxSizing: 'content-box',
41
+ ...containerStyle,
41
42
  }, children: _jsx(ResponsiveContainer, { width: "100%", height: '100%', children: _jsxs(ReChartsBarChart, { data: formattedData, layout: 'horizontal', children: [!hideCartesianGrid && (_jsx(CartesianGrid, { horizontal: true, vertical: false, stroke: "#e5e7eb" })), _jsx(YAxis, { width: 44, hide: hideYAxis, axisLine: false, tickLine: false, type: "number", domain: getDomain(data, yAxisFields), tick: { transform: 'translate(-3, 0)' }, style: {
42
43
  fontSize: '12px',
43
44
  fontFamily: theme.chartLabelFontFamily,
@@ -69,7 +70,10 @@ export default function BarChart({ colors, yAxisFields, data, containerStyle, xA
69
70
  field: payload[0].dataKey,
70
71
  fields: yAxisFields,
71
72
  }), xAxisFormat: xAxisFormat, xAxisField: xAxisField, colors: colors }));
72
- }, position: { y: 0 } }), yAxisFields.map((elem) => (_jsx(Bar, { name: elem.label, dataKey: elem.field, stackId: isStacked &&
73
- (elem.field?.replace('comparison_', '') ??
74
- 'unknown'), type: "linear", fill: selectColor(elem, colors, yAxisFields.findIndex((field) => field.field === elem.field?.replace('comparison_', ''))), isAnimationActive: isAnimationActive }, elem.field)))] }) }) }));
73
+ }, position: { y: 0 } }), yAxisFields.map((elem) => {
74
+ return (_jsx(Bar, { name: elem.label, dataKey: elem.field, stackId: isStacked &&
75
+ (elem.field?.replace('comparison_', '') ??
76
+ 'unknown'), type: "linear", fill: (colorMap && colorMap[elem.field]) ??
77
+ selectColor(elem, colors, yAxisFields.findIndex((field) => field.field === elem.field?.replace('comparison_', ''))), isAnimationActive: isAnimationActive }, elem.field));
78
+ })] }) }) }));
75
79
  }
@@ -4,9 +4,9 @@ import { ThemeContext } from '../../Context';
4
4
  export default function ChartError({ containerStyle }) {
5
5
  const [theme] = useContext(ThemeContext);
6
6
  return (_jsx("div", { style: {
7
- ...containerStyle,
8
7
  boxSizing: 'content-box',
9
8
  height: '100%',
9
+ ...containerStyle,
10
10
  }, children: _jsx("div", { style: {
11
11
  height: containerStyle?.height,
12
12
  width: '100%',
@@ -4,11 +4,11 @@ import { ThemeContext } from '../../Context';
4
4
  export default function ChartSkeleton({ containerStyle }) {
5
5
  const [theme] = useContext(ThemeContext);
6
6
  return (_jsx("div", { style: {
7
- ...containerStyle,
8
7
  boxSizing: 'content-box',
9
8
  height: '100%',
9
+ ...containerStyle,
10
10
  }, children: _jsx("div", { style: {
11
- height: containerStyle?.height,
11
+ height: '100%',
12
12
  width: '100%',
13
13
  boxSizing: 'content-box',
14
14
  borderRadius: 8,
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- export default function LineChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, dashedComparison, customPrimaryColor, customComparisonColor, singlePointStyle, }: {
2
+ export default function LineChart({ colors, colorMap, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, dashedComparison, customPrimaryColor, customComparisonColor, singlePointStyle, }: {
3
3
  colors?: string[];
4
+ colorMap?: any;
4
5
  yAxisFields: any[];
5
6
  data: any[];
6
7
  containerStyle?: React.CSSProperties;
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Chart/LineChart.tsx"],"names":[],"mappings":";AAiBA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,MAAM,EACN,WAAW,EACX,IAAI,EACJ,cAAc,EACd,UAAU,EACV,WAAW,EACX,KAAK,EACL,UAAU,EACV,iBAAwB,EACxB,SAAiB,EACjB,SAAiB,EACjB,iBAAyB,EACzB,gBAAwB,EACxB,kBAA8B,EAC9B,qBAAiC,EACjC,gBAAwB,GACzB,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,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,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,gBAAgB,EAAE,KAAK,GAAG,MAAM,CAAC;CAClC,kDAyNA"}
1
+ {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Chart/LineChart.tsx"],"names":[],"mappings":";AAiBA,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,kBAA8B,EAC9B,qBAAiC,EACjC,gBAAwB,GACzB,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,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,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,gBAAgB,EAAE,KAAK,GAAG,MAAM,CAAC;CAClC,kDAkOA"}
@@ -7,7 +7,7 @@ import { selectColor } from '../../utils/color';
7
7
  import ChartTooltip from '../../components/Chart/ChartTooltip';
8
8
  import getDomain from '../../utils/getDomain';
9
9
  import { useEffect, useState } from 'react';
10
- export default function LineChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isAnimationActive = true, hideXAxis = false, hideYAxis = false, hideCartesianGrid = false, dashedComparison = false, customPrimaryColor = undefined, customComparisonColor = undefined, singlePointStyle = 'dot', }) {
10
+ export default function LineChart({ colors, colorMap = {}, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isAnimationActive = true, hideXAxis = false, hideYAxis = false, hideCartesianGrid = false, dashedComparison = false, customPrimaryColor = undefined, customComparisonColor = undefined, singlePointStyle = 'dot', }) {
11
11
  const [formattedData, setFormattedData] = useState([]);
12
12
  if (!yAxisFields || !yAxisFields.length) {
13
13
  return null;
@@ -43,16 +43,21 @@ export default function LineChart({ colors, yAxisFields, data, containerStyle, x
43
43
  alignItems: 'center',
44
44
  fontSize: 13,
45
45
  color: theme.secondaryTextColor,
46
+ ...containerStyle,
46
47
  }, children: "No results found for specified time period." }));
47
48
  }
48
49
  // Allows the users to override the color scheme on a per-chart basis.
49
- const getCustomColor = (index) => {
50
+ const getCustomColor = (index, field) => {
50
51
  if (index === 0 && customPrimaryColor) {
51
52
  return customPrimaryColor;
52
53
  }
53
54
  if (index === 1 && comparison && customComparisonColor) {
54
55
  return customComparisonColor;
55
56
  }
57
+ if (colorMap && colorMap[field]) {
58
+ // console.log(field, '->', colorMap[field]);
59
+ return colorMap[field];
60
+ }
56
61
  return undefined; // use the default colors from the theme
57
62
  };
58
63
  return (_jsx("div", { style: { ...containerStyle }, children: _jsx(ResponsiveContainer, { width: "100%", height: '100%', children: _jsxs(ReChartsAreaChart, { data: formattedData, children: [!hideCartesianGrid && (_jsx(CartesianGrid, { horizontal: true, vertical: false, stroke: "#e5e7eb" })), _jsx(XAxis, { dataKey: xAxisField, hide: hideXAxis, tick: { transform: 'translate(0, 6)' }, style: {
@@ -99,5 +104,7 @@ export default function LineChart({ colors, yAxisFields, data, containerStyle, x
99
104
  { field: xAxisField, format: xAxisFormat },
100
105
  ],
101
106
  }), xAxisFormat: xAxisFormat, xAxisField: xAxisField, colors: colors, theme: theme }));
102
- }, position: { y: 0 } }), yAxisFields.map((elem, index) => (_jsx("defs", { children: _jsxs("linearGradient", { id: `gradient${index}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "5%", stopColor: getCustomColor(index) ?? selectColor(elem, colors, index), stopOpacity: 0.4 }), _jsx("stop", { offset: "95%", stopColor: 'rgba(0,0,0,0)', stopOpacity: 0 })] }) }, `defs${elem.field + index}`))), yAxisFields.map((elem, index) => (_jsx(Area, { name: elem.label, type: "linear", dataKey: elem.field, stroke: getCustomColor(index) ?? selectColor(elem, colors, index), fill: `url(#gradient${index})`, strokeWidth: 2, dot: false, strokeDasharray: comparison && dashedComparison && index > 0 ? '5 5' : undefined, isAnimationActive: isAnimationActive }, elem.field)))] }) }) }));
107
+ }, position: { y: 0 } }), yAxisFields.map((elem, index) => (_jsx("defs", { children: _jsxs("linearGradient", { id: `gradient${elem.field}${index}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "5%", stopColor: getCustomColor(index, elem.field) ??
108
+ selectColor(elem, colors, index), stopOpacity: 0.4 }), _jsx("stop", { offset: "95%", stopColor: 'rgba(0,0,0,0)', stopOpacity: 0 })] }) }, `defs${elem.field + index}`))), yAxisFields.map((elem, index) => (_jsx(Area, { name: elem.label, type: "linear", dataKey: elem.field, stroke: getCustomColor(index, elem.field) ??
109
+ selectColor(elem, colors, index), fill: `url(#gradient${elem.field}${index})`, strokeWidth: 2, dot: false, strokeDasharray: comparison && dashedComparison && index > 0 ? '5 5' : undefined, isAnimationActive: isAnimationActive }, elem.field)))] }) }) }));
103
110
  }
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- export default function DashboardItem({ dashboardItem, onClickDashboardItem, theme, style, children, }: any): JSX.Element;
2
+ export default function DashboardItem({ dashboardItem, onClickDashboardItem, isLoading, theme, style, children, }: any): JSX.Element;
3
3
  //# sourceMappingURL=TableComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/TableComponent.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,aAAa,EACb,oBAAoB,EACpB,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE,GAAG,GAAG,GAAG,CAAC,OAAO,CA8DnB"}
1
+ {"version":3,"file":"TableComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dashboard/TableComponent.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE,GAAG,GAAG,GAAG,CAAC,OAAO,CA8DnB"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export default function DashboardItem({ dashboardItem, onClickDashboardItem, theme, style, children, }) {
2
+ export default function DashboardItem({ dashboardItem, onClickDashboardItem, isLoading, theme, style, children, }) {
3
3
  return (_jsxs("div", { style: {
4
4
  cursor: 'pointer',
5
5
  ...style,
@@ -60,7 +60,7 @@ export default function QuillTable({ rows, columns, loading, showDownloadCSVButt
60
60
  return (_jsx("div", { style: {
61
61
  width: '100%',
62
62
  height: '100%',
63
- overflow: 'visible',
63
+ overflow: 'auto',
64
64
  display: 'flex',
65
65
  flexDirection: 'column',
66
66
  ...containerStyle,
@@ -1 +1 @@
1
- {"version":3,"file":"AddColumnPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/AddColumnPopover.tsx"],"names":[],"mappings":"AAoBA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,MAAM,EACN,YAAY,GACb,EAAE,GAAG,2CAiML"}
1
+ {"version":3,"file":"AddColumnPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/AddColumnPopover.tsx"],"names":[],"mappings":"AAoBA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,MAAM,EACN,YAAY,GACb,EAAE,GAAG,2CAgML"}
@@ -63,7 +63,7 @@ export default function AddColumnPopover({ onSave, orderedColumnNames, setOrdere
63
63
  }, children: [selectedColumns.length > 0 && !isSelectedAllColumns() && (_jsx(SecondaryButton, { onClick: () => setSelectedColumns(orderedColumnNames.filter((row) => {
64
64
  const [table, _column] = row.split('.');
65
65
  return selectedColumns[0].startsWith(table);
66
- })), children: "Select all" })), selectedColumns.length > 0 && isSelectedAllColumns() && (_jsx(SecondaryButton, { onClick: () => setSelectedColumns([]), children: "Clear" })), _jsx(Button, { onMouseUp: () => {
66
+ })), label: "Select all" })), selectedColumns.length > 0 && isSelectedAllColumns() && (_jsx(SecondaryButton, { onClick: () => setSelectedColumns([]), label: "Clear" })), _jsx(Button, { onClick: () => {
67
67
  // follow the ordering of the ordered column names
68
68
  let tableName = initialTableName;
69
69
  const orderedSelectedColumns = [];
@@ -103,7 +103,7 @@ export default function AddColumnPopover({ onSave, orderedColumnNames, setOrdere
103
103
  setPivot(null);
104
104
  }
105
105
  onSave();
106
- }, children: "Save" })] })] }));
106
+ }, label: "Save" })] })] }));
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 SortSentence: ({ sortData, keyPrefix, columns, handleDelete, setEditPopoverKey, setOpenPopover, setActiveEditItem, setIsPending, setActivePath, onSave, popoverTitle, SortPopover, EditPopover, children, }: any) => import("react/jsx-runtime").JSX.Element | undefined;
2
+ export declare const AddSortPopover: ({ onSave, columns, isEdit, onDelete, column, }: any) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=AddSortPopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddSortPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/AddSortPopover.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY,iMAetB,GAAG,wDA2CL,CAAC;AAEF,eAAO,MAAM,cAAc,mDAMxB,GAAG,4CAuDL,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { QuillSelect } from './ui';
4
+ import { MemoizedButton, MemoizedSecondaryButton } from '../UiComponents';
5
+ const SORT_VALUE_TO_LABEL = {
6
+ ASC: 'ascending',
7
+ DESC: 'descending',
8
+ };
9
+ export const SortSentence = ({ sortData, keyPrefix, columns, handleDelete, setEditPopoverKey, setOpenPopover, setActiveEditItem, setIsPending, setActivePath, onSave, popoverTitle = 'Edit Sort', SortPopover, EditPopover, children, }) => {
10
+ const [isOpen, setIsOpen] = useState(false);
11
+ const handleClickDelete = (e) => {
12
+ e.stopPropagation(); // don't call onClick handler
13
+ setIsPending(false);
14
+ handleDelete(keyPrefix);
15
+ setActiveEditItem(null);
16
+ setOpenPopover(null);
17
+ setEditPopoverKey(null);
18
+ };
19
+ if (!sortData && (!sortData.expr.column || !sortData.expr.value)) {
20
+ return;
21
+ }
22
+ return (_jsx("div", { style: { width: '100%' }, children: _jsx(SortPopover
23
+ // @ts-ignore
24
+ , {
25
+ // @ts-ignore
26
+ filterLabel: `${sortData.expr.column || sortData.expr.value} is ${SORT_VALUE_TO_LABEL[sortData.type]}`, onClickDelete: handleClickDelete, popoverTitle: popoverTitle, popoverChildren: _jsx(EditPopover, { onSave: (column, direction) => {
27
+ setIsOpen(false);
28
+ onSave(column, direction);
29
+ }, columns: columns, isEdit: true, onDelete: handleClickDelete, column: sortData.expr.column || sortData.expr.value }), isOpen: isOpen, setIsOpen: setIsOpen, onDelete: () => {
30
+ setIsPending(false);
31
+ setActiveEditItem(null);
32
+ setActivePath(null);
33
+ } }) }));
34
+ };
35
+ export const AddSortPopover = ({ onSave, columns, isEdit, onDelete, column, }) => {
36
+ const [sortColumn, setSortColumn] = useState(column || '');
37
+ const [sortDirection, setSortDirection] = useState('ASC');
38
+ return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 12 }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: 12 }, children: [_jsx(QuillSelect, { value: sortColumn, onChange: (value) => {
39
+ setSortColumn(value);
40
+ }, options: [
41
+ { label: 'Select', value: '' },
42
+ ...columns.map((column) => ({
43
+ label: column.split('.')[1],
44
+ value: column.split('.')[1],
45
+ })),
46
+ ] }), _jsx(QuillSelect, { value: sortDirection, onChange: (value) => {
47
+ setSortDirection(value);
48
+ }, options: [
49
+ { label: 'Ascending', value: 'ASC' },
50
+ { label: 'Descending', value: 'DESC' },
51
+ ] })] }), _jsx("div", { style: {
52
+ display: 'flex',
53
+ flexDirection: 'row',
54
+ justifyContent: 'end',
55
+ gap: 12,
56
+ }, children: isEdit ? (_jsxs(_Fragment, { children: [_jsx(MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), _jsx(MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "Add sort" })] })) : (_jsx(MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "Add sort" })) })] }));
57
+ };
@@ -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;;;;;;;;;;;EA+Y1B;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,OAuItE;AAID,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAY1E"}
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;;;;;;;;;;;EAiZ1B;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,OAuItE;AAID,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAY1E"}
@@ -211,7 +211,8 @@ export function convertGroupBy(ast, prevPivot = null, schemaTables) {
211
211
  // Iterate over columns to find aggr_func -> set pivot.aggregationType and pivot.valueField
212
212
  for (let i = 0; i < ast.columns.length; i++) {
213
213
  const column = ast.columns[i];
214
- const field = columns.find((c) => c.field === column.expr?.args?.expr?.column);
214
+ const field = columns.find((c) => c.field === column.expr?.args?.expr?.column ||
215
+ c.field === column.expr?.args?.expr?.value);
215
216
  if (column?.expr?.type === 'aggr_func') {
216
217
  // CASE WHEN
217
218
  if (column.expr?.args?.expr?.type.toLowerCase() === 'case' &&
@@ -527,7 +528,7 @@ export function applyPivot(data, pivot, schema) {
527
528
  const newFields = [
528
529
  rowFieldColumnType,
529
530
  ...columnVariants.map((name) => {
530
- return { ...valueFieldColumnType, name };
531
+ return { ...valueFieldColumnType, name, label: name };
531
532
  }),
532
533
  ];
533
534
  for (const row of rows) {
@@ -29,6 +29,7 @@ export declare const DEFAULT_TAB_OPTIONS: {
29
29
  export declare const QuillTabs: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
30
30
  export declare const EditPopover: ({ onSave, onDelete, Button, renderNode, activeEditItem, }: any) => import("react/jsx-runtime").JSX.Element;
31
31
  export declare const QuillFilterPopover: ({ filterLabel, onClickDeleteFilter, popoverTitle, popoverChildren, isOpen, setIsOpen, }: any) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const QuillSortPopover: ({ filterLabel, onClickDelete, popoverTitle, popoverChildren, isOpen, setIsOpen, }: any) => import("react/jsx-runtime").JSX.Element;
32
33
  export declare const TagWrapper: ({ isCard, isRow, editPopoverKey, keyPrefix, formData, activeEditItem, setEditPopoverKey, setActiveEditItem, setActivePath, setOpenPopover, setIsPending, clearCheckboxes, fetchSqlQuery, handleDelete, setCheckboxes, handleReplaceSubtree, FilterPopover, getByKey, EditPopover, Button, renderNode, children, }: any) => import("react/jsx-runtime").JSX.Element;
33
34
  export declare const AddFilterPopover: ({ onSave, Button, renderNode, activeEditItem, }: any) => import("react/jsx-runtime").JSX.Element;
34
35
  //# sourceMappingURL=ui.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/components/ReportBuilder/ui.tsx"],"names":[],"mappings":";AAeA;;;;;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,sGAgBxB,CAAC;AAGF,eAAO,MAAM,eAAe,sGAsB3B,CAAC;AAEF,eAAO,MAAM,WAAW,2BAA4B,GAAG,4CAUtD,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,KA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AAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,KAAU,EACV,OAAO,EACP,MAAM,GACP,EAAE,GAAG,2CAiDL;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,+CAEnC,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"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { forwardRef, useContext, useEffect, useRef, useState } from 'react';
3
- import { MemoizedSelect, MemoizedCheckbox, MemoizedHeader, MemoizedLabel, MemoizedTabs, LoadingSpinner, } from '../UiComponents';
3
+ import { MemoizedSelect, MemoizedCheckbox, MemoizedHeader, MemoizedLabel, MemoizedTabs, LoadingSpinner, MemoizedSecondaryButton, } from '../UiComponents';
4
4
  import MemoizedQuillTable from '../QuillTable';
5
5
  import { ThemeContext } from '../../Context';
6
6
  import { isNodeEmptyCollection } from './util';
@@ -301,7 +301,7 @@ export const EditPopover = ({ onSave, onDelete, Button, renderNode, activeEditIt
301
301
  justifyContent: 'end',
302
302
  gap: 8,
303
303
  width: '100%',
304
- }, children: [_jsx(QuillSecondaryButton, { onClick: onDelete, children: "Delete" }), _jsx(Button, { onClick: onSave, children: "Save" })] })] }));
304
+ }, children: [_jsx(MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), _jsx(Button, { onClick: onSave, label: "Save" })] })] }));
305
305
  };
306
306
  export const QuillFilterPopover = ({ filterLabel, onClickDeleteFilter, popoverTitle, popoverChildren, isOpen, setIsOpen, }) => {
307
307
  return (_jsx(QuillPopover, { isOpen: isOpen, title: popoverTitle, trigger: _jsx(QuillTag, { label: filterLabel, onClickDelete: onClickDeleteFilter, onClick: () => {
@@ -310,6 +310,13 @@ export const QuillFilterPopover = ({ filterLabel, onClickDeleteFilter, popoverTi
310
310
  setIsOpen(false);
311
311
  }, children: popoverChildren }));
312
312
  };
313
+ export const QuillSortPopover = ({ filterLabel, onClickDelete, popoverTitle, popoverChildren, isOpen, setIsOpen, }) => {
314
+ return (_jsx(QuillPopover, { isOpen: isOpen, title: popoverTitle, trigger: _jsx(QuillTag, { label: filterLabel, onClickDelete: onClickDelete, onClick: () => {
315
+ setIsOpen((isOpen) => !isOpen);
316
+ } }), onClose: () => {
317
+ setIsOpen(false);
318
+ }, children: popoverChildren }));
319
+ };
313
320
  export const TagWrapper = ({ isCard, isRow, editPopoverKey, keyPrefix, formData, activeEditItem, setEditPopoverKey, setActiveEditItem, setActivePath, setOpenPopover, setIsPending, clearCheckboxes, fetchSqlQuery, handleDelete, setCheckboxes, handleReplaceSubtree, FilterPopover, getByKey, EditPopover, Button, renderNode, children, }) => {
314
321
  const [isOpen, setIsOpen] = useState(false);
315
322
  useEffect(() => {
@@ -385,5 +392,5 @@ export const AddFilterPopover = ({ onSave, Button, renderNode, activeEditItem, }
385
392
  display: 'flex',
386
393
  flexDirection: 'row',
387
394
  justifyContent: 'end',
388
- }, children: _jsx(Button, { onMouseUp: onSave, children: "Add filter" }) })] }));
395
+ }, children: _jsx(Button, { onClick: onSave, label: 'Add filter' }) })] }));
389
396
  };
@@ -45,6 +45,7 @@ export interface ModalComponentProps {
45
45
  title?: string;
46
46
  setIsOpen: (isOpen: boolean) => void;
47
47
  theme?: any;
48
+ style?: any;
48
49
  }
49
50
  export interface HeaderProps {
50
51
  children: any;
@@ -103,6 +104,14 @@ export declare const MemoizedText: ({ children }: {
103
104
  children: any;
104
105
  }) => import("react/jsx-runtime").JSX.Element;
105
106
  export interface PopoverComponentProps {
107
+ isOpen: boolean;
108
+ setIsOpen: () => void;
109
+ onClose: () => void;
110
+ triggerLabel: string;
111
+ popoverTitle: string;
112
+ popoverChildren: any;
113
+ }
114
+ export interface MemoizedPopoverProps {
106
115
  children: any;
107
116
  onClose?: () => void;
108
117
  parentRef?: any;
@@ -113,14 +122,15 @@ export interface PopoverComponentProps {
113
122
  label: string;
114
123
  setIsOpen: (isOpen: boolean) => void;
115
124
  }
116
- export declare function MemoizedPopover({ onClose, parentRef, children, style, onClick, showTrigger, isOpen, label, setIsOpen, }: PopoverComponentProps): import("react/jsx-runtime").JSX.Element;
117
- export declare function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, theme, }: {
125
+ export declare function MemoizedPopover({ onClose, parentRef, children, style, onClick, showTrigger, isOpen, label, setIsOpen, }: MemoizedPopoverProps): import("react/jsx-runtime").JSX.Element;
126
+ export declare function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, theme, style, }: {
118
127
  isOpen: any;
119
128
  onClose: any;
120
129
  setIsOpen: any;
121
130
  title: any;
122
131
  children: any;
123
132
  theme: any;
133
+ style?: {} | undefined;
124
134
  }): import("react/jsx-runtime").JSX.Element | null;
125
135
  export declare const MemoizedDeleteButton: ({ onClick, style }: {
126
136
  onClick: any;
@@ -1 +1 @@
1
- {"version":3,"file":"UiComponents.d.ts","sourceRoot":"","sources":["../../../src/components/UiComponents.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAK7D,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAA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IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC;AAED,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAU,EACV,OAAO,EACP,WAAkB,EAClB,MAAM,EACN,KAAK,EACL,SAAS,GACV,EAAE,qBAAqB,2CA2DvB;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,KAAK,GACN;;;;;;;CAAA,kDA2FA;AAED,eAAO,MAAM,oBAAoB;;;6CA0BhC,CAAC;AAEF,eAAO,MAAM,cAAc,+CAwD1B,CAAC"}
1
+ {"version":3,"file":"UiComponents.d.ts","sourceRoot":"","sources":["../../../src/components/UiComponents.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAK7D,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,cAAc,C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AAC,EAC5B,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,KAAK,EACL,KAAU,GACX;;;;;;;;CAAA,kDA4FA;AAED,eAAO,MAAM,oBAAoB;;;6CA0BhC,CAAC;AAEF,eAAO,MAAM,cAAc,+CAwD1B,CAAC"}
@@ -44,23 +44,22 @@ export const MemoizedButton = ({ label, onClick, primary = true }) => {
44
44
  const [theme] = useContext(ThemeContext);
45
45
  return (_jsxs("button", { className: "quill-button", onClick: onClick, style: { fontFamily: theme?.fontFamily }, children: [_jsx("style", { children: `
46
46
  .quill-button {
47
- background-color: #384151;
47
+ background-color: #212121;
48
48
  color: white;
49
49
  height: 40px;
50
50
  border: 1px solid transparent;
51
- font-weight: 500;
51
+ font-weight: 600;
52
52
  border-radius: 6px;
53
53
  box-sizing: content-box;
54
54
  padding-left: 16px;
55
55
  padding-right: 16px;
56
- overflow: hidden;
57
- font-size: 15px;
56
+ font-size: 14px;
57
+ white-space: nowrap;
58
58
  cursor: pointer;
59
59
  }
60
60
  .quill-button:hover {
61
61
  background-color: rgba(56, 65, 81, 0.9);
62
62
  border-radius: 6px;
63
- overflow: hidden;
64
63
  }` }), label] }));
65
64
  };
66
65
  export const MemoizedSecondaryButton = ({ label, onClick }) => {
@@ -78,6 +77,7 @@ export const MemoizedSecondaryButton = ({ label, onClick }) => {
78
77
  box-sizing: content-box;
79
78
  font-size: 15px;
80
79
  cursor: pointer;
80
+ white-space: nowrap;
81
81
  }
82
82
  .quill-secondary-button:hover {
83
83
  background-color: rgba(56, 65, 81, 0.09);
@@ -236,7 +236,7 @@ export function MemoizedPopover({ onClose, parentRef, children, style = {}, onCl
236
236
  ...style,
237
237
  }, children: children }) }))] }));
238
238
  }
239
- export function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, theme, }) {
239
+ export function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, theme, style = {}, }) {
240
240
  if (!isOpen) {
241
241
  return null;
242
242
  }
@@ -269,6 +269,7 @@ export function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, the
269
269
  borderColor: '#e7e7e7',
270
270
  overflow: 'hidden',
271
271
  // zIndex: 1000,
272
+ ...style,
272
273
  }, children: _jsxs("div", { style: {
273
274
  // width: "80%",
274
275
  maxHeight: '90vh',
@@ -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, }: {
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, }: {
12
12
  pivotRowField: any;
13
13
  setPivotRowField: any;
14
14
  pivotColumnField: any;
@@ -49,6 +49,7 @@ export declare const PivotModal: ({ pivotRowField, setPivotRowField, pivotColumn
49
49
  showTrigger?: boolean | undefined;
50
50
  rightAlign?: boolean | undefined;
51
51
  parentRef: any;
52
+ recommendPivotCount?: number | undefined;
52
53
  }) => import("react/jsx-runtime").JSX.Element;
53
54
  export declare function generatePivotTableYAxis(pivot: any, cols: any, format: any): any;
54
55
  export declare function isDateField(fieldType: any): boolean;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CA2xBtB,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;;;;;;EAkYtB"}
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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