@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
@@ -13,7 +13,7 @@ const react_2 = __importDefault(require("@monaco-editor/react"));
13
13
  const Context_1 = require("./Context");
14
14
  const QuillTable_1 = __importDefault(require("./components/QuillTable"));
15
15
  const dataFetcher_1 = require("./utils/dataFetcher");
16
- const ChartBuilder_1 = __importDefault(require("./ChartBuilder"));
16
+ const ChartBuilder_1 = require("./ChartBuilder");
17
17
  function convertPostgresColumn(column) {
18
18
  let format;
19
19
  let fieldType;
@@ -129,7 +129,7 @@ const QuillButton = ({ onClick, label, theme, secondary, }) => ((0, jsx_runtime_
129
129
  fontFamily: theme?.fontFamily,
130
130
  height: 38,
131
131
  }, onClick: onClick, children: label }));
132
- const QuillTextInput = ({ onChange, value, id, placeholder, theme, }) => {
132
+ const QuillTextInput = ({ onChange, value, id, placeholder, theme, style = {}, }) => {
133
133
  return ((0, jsx_runtime_1.jsx)("input", { style: {
134
134
  display: 'flex',
135
135
  flexDirection: 'row',
@@ -146,9 +146,10 @@ const QuillTextInput = ({ onChange, value, id, placeholder, theme, }) => {
146
146
  borderColor: theme?.borderColor || '#E7E7E7',
147
147
  borderStyle: 'solid',
148
148
  borderRadius: '6px',
149
+ ...style
149
150
  }, id: id, onChange: onChange, value: value, placeholder: placeholder }));
150
151
  };
151
- function QueryEditor({ containerStyle = { height: '100vh' }, ButtonComponent, SecondaryButtonComponent, TextInputComponent, TableComponent = QuillTable_1.default, 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, }) {
152
+ function QueryEditor({ containerStyle = { height: '100vh' }, ButtonComponent, SecondaryButtonComponent, TextInputComponent, TableComponent = QuillTable_1.default, 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, }) {
152
153
  const [sqlPrompt, setSqlPrompt] = (0, react_1.useState)('');
153
154
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
154
155
  const [client] = (0, react_1.useContext)(Context_1.ClientContext);
@@ -276,7 +277,8 @@ function QueryEditor({ containerStyle = { height: '100vh' }, ButtonComponent, Se
276
277
  }
277
278
  }, [query]);
278
279
  /* rest of your methods */
279
- return ((0, jsx_runtime_1.jsxs)("div", { style: containerStyle, children: [(0, jsx_runtime_1.jsx)("div", { style: {
280
+ return ((0, jsx_runtime_1.jsxs)("div", { style: containerStyle, children: [(!chartBuilderHorizontalView ||
281
+ (chartBuilderHorizontalView && !isChartBuilderOpen)) && ((0, jsx_runtime_1.jsx)("div", { style: {
280
282
  height: '100%',
281
283
  display: 'flex',
282
284
  flexDirection: 'column',
@@ -300,8 +302,9 @@ function QueryEditor({ containerStyle = { height: '100vh' }, ButtonComponent, Se
300
302
  display: 'flex',
301
303
  flexDirection: 'row',
302
304
  alignItems: 'center',
305
+ gap: '10px',
303
306
  height: 80,
304
- }, children: [(0, jsx_runtime_1.jsx)("div", { style: { minWidth: 440, marginRight: 10 }, children: (TextInputComponent && ((0, jsx_runtime_1.jsx)(TextInputComponent, { id: "ai-search", value: sqlPrompt, onChange: (e) => setSqlPrompt(e.target.value), placeholder: "Ask a question..." }))) || ((0, jsx_runtime_1.jsx)(QuillTextInput, { id: "ai-search", value: sqlPrompt, onChange: (e) => setSqlPrompt(e.target.value), placeholder: "Ask a question...", theme: theme })) }), (ButtonComponent && ((0, jsx_runtime_1.jsx)(ButtonComponent, { onClick: handleRunSqlPrompt, label: "Ask AI" }))) || ((0, jsx_runtime_1.jsx)(QuillButton, { theme: theme, onClick: handleRunSqlPrompt, label: "Ask AI" }))] }), (0, jsx_runtime_1.jsx)("div", { style: { height: 'calc(50% - 40px)' }, children: (0, jsx_runtime_1.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 }) }), (0, jsx_runtime_1.jsxs)("div", { style: {
307
+ }, children: [(0, jsx_runtime_1.jsx)("div", { style: { minWidth: 440, flexGrow: 1 }, children: (TextInputComponent && ((0, jsx_runtime_1.jsx)(TextInputComponent, { id: "ai-search", value: sqlPrompt, style: { width: '100%' }, onChange: (e) => setSqlPrompt(e.target.value), placeholder: "Ask a question..." }))) || ((0, jsx_runtime_1.jsx)(QuillTextInput, { id: "ai-search", value: sqlPrompt, style: { width: '100%' }, onChange: (e) => setSqlPrompt(e.target.value), placeholder: "Ask a question...", theme: theme })) }), (ButtonComponent && ((0, jsx_runtime_1.jsx)(ButtonComponent, { onClick: handleRunSqlPrompt, label: "Ask AI" }))) || ((0, jsx_runtime_1.jsx)(QuillButton, { theme: theme, onClick: handleRunSqlPrompt, label: "Ask AI" }))] }), (0, jsx_runtime_1.jsx)("div", { style: { height: 'calc(50% - 40px)' }, children: (0, jsx_runtime_1.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 }) }), (0, jsx_runtime_1.jsxs)("div", { style: {
305
308
  display: 'flex',
306
309
  flexDirection: 'column',
307
310
  height: 'calc(50% - 108px)',
@@ -330,7 +333,7 @@ function QueryEditor({ containerStyle = { height: '100vh' }, ButtonComponent, Se
330
333
  justifyContent: 'flex-end',
331
334
  width: '100%',
332
335
  height: '70px',
333
- }, children: (ButtonComponent && ((0, jsx_runtime_1.jsx)(ButtonComponent, { onClick: handleRunQuery, label: "Run query" }))) || ((0, jsx_runtime_1.jsx)(QuillButton, { onClick: () => setIsChartBuilderOpen(true), label: addToDashboardButtonLabel, theme: theme })) }))] })] }) }) }), (0, jsx_runtime_1.jsx)(ChartBuilder_1.default, { 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 })] }));
336
+ }, children: (ButtonComponent && ((0, jsx_runtime_1.jsx)(ButtonComponent, { onClick: () => setIsChartBuilderOpen(true), label: addToDashboardButtonLabel }))) || ((0, jsx_runtime_1.jsx)(QuillButton, { onClick: () => setIsChartBuilderOpen(true), label: addToDashboardButtonLabel, theme: theme })) }))] })] }) }) })), (0, jsx_runtime_1.jsx)(ChartBuilder_1.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 })] }));
334
337
  }
335
338
  exports.default = QueryEditor;
336
339
  const SQLEditorComponent = ({ query, setQuery, handleRunQuery, handleClearQuery, defineEditorTheme, setEditorTheme, ButtonComponent, SecondaryButtonComponent, newQueryEnabled, theme, loading, LoadingComponent, }) => {
@@ -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"}
@@ -12,7 +12,7 @@ const color_1 = require("../../utils/color");
12
12
  const ChartTooltip_1 = __importDefault(require("../../components/Chart/ChartTooltip"));
13
13
  const getDomain_1 = __importDefault(require("../../utils/getDomain"));
14
14
  const react_1 = require("react");
15
- function BarChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isStacked, isAnimationActive = true, hideXAxis = false, hideYAxis = false, hideCartesianGrid = false, }) {
15
+ function BarChart({ colors, colorMap, yAxisFields, data, containerStyle, xAxisField, xAxisFormat, theme, comparison, isStacked, isAnimationActive = true, hideXAxis = false, hideYAxis = false, hideCartesianGrid = false, }) {
16
16
  const [formattedData, setFormattedData] = (0, react_1.useState)([]);
17
17
  (0, react_1.useEffect)(() => {
18
18
  if (!data || data.length === 0) {
@@ -38,11 +38,12 @@ function BarChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxis
38
38
  alignItems: 'center',
39
39
  fontSize: 13,
40
40
  color: theme.secondaryTextColor,
41
+ ...containerStyle,
41
42
  }, children: "No results found for specified time period." }));
42
43
  }
43
44
  return ((0, jsx_runtime_1.jsx)("div", { style: {
44
- ...containerStyle,
45
45
  boxSizing: 'content-box',
46
+ ...containerStyle,
46
47
  }, children: (0, jsx_runtime_1.jsx)(recharts_1.ResponsiveContainer, { width: "100%", height: '100%', children: (0, jsx_runtime_1.jsxs)(recharts_1.BarChart, { data: formattedData, layout: 'horizontal', children: [!hideCartesianGrid && ((0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { horizontal: true, vertical: false, stroke: "#e5e7eb" })), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, { width: 44, hide: hideYAxis, axisLine: false, tickLine: false, type: "number", domain: (0, getDomain_1.default)(data, yAxisFields), tick: { transform: 'translate(-3, 0)' }, style: {
47
48
  fontSize: '12px',
48
49
  fontFamily: theme.chartLabelFontFamily,
@@ -74,8 +75,11 @@ function BarChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxis
74
75
  field: payload[0].dataKey,
75
76
  fields: yAxisFields,
76
77
  }), xAxisFormat: xAxisFormat, xAxisField: xAxisField, colors: colors }));
77
- }, position: { y: 0 } }), yAxisFields.map((elem) => ((0, jsx_runtime_1.jsx)(recharts_1.Bar, { name: elem.label, dataKey: elem.field, stackId: isStacked &&
78
- (elem.field?.replace('comparison_', '') ??
79
- 'unknown'), type: "linear", fill: (0, color_1.selectColor)(elem, colors, yAxisFields.findIndex((field) => field.field === elem.field?.replace('comparison_', ''))), isAnimationActive: isAnimationActive }, elem.field)))] }) }) }));
78
+ }, position: { y: 0 } }), yAxisFields.map((elem) => {
79
+ return ((0, jsx_runtime_1.jsx)(recharts_1.Bar, { name: elem.label, dataKey: elem.field, stackId: isStacked &&
80
+ (elem.field?.replace('comparison_', '') ??
81
+ 'unknown'), type: "linear", fill: (colorMap && colorMap[elem.field]) ??
82
+ (0, color_1.selectColor)(elem, colors, yAxisFields.findIndex((field) => field.field === elem.field?.replace('comparison_', ''))), isAnimationActive: isAnimationActive }, elem.field));
83
+ })] }) }) }));
80
84
  }
81
85
  exports.default = BarChart;
@@ -6,9 +6,9 @@ const Context_1 = require("../../Context");
6
6
  function ChartError({ containerStyle }) {
7
7
  const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
8
8
  return ((0, jsx_runtime_1.jsx)("div", { style: {
9
- ...containerStyle,
10
9
  boxSizing: 'content-box',
11
10
  height: '100%',
11
+ ...containerStyle,
12
12
  }, children: (0, jsx_runtime_1.jsx)("div", { style: {
13
13
  height: containerStyle?.height,
14
14
  width: '100%',
@@ -6,11 +6,11 @@ const Context_1 = require("../../Context");
6
6
  function ChartSkeleton({ containerStyle }) {
7
7
  const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
8
8
  return ((0, jsx_runtime_1.jsx)("div", { style: {
9
- ...containerStyle,
10
9
  boxSizing: 'content-box',
11
10
  height: '100%',
11
+ ...containerStyle,
12
12
  }, children: (0, jsx_runtime_1.jsx)("div", { style: {
13
- height: containerStyle?.height,
13
+ height: '100%',
14
14
  width: '100%',
15
15
  boxSizing: 'content-box',
16
16
  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"}
@@ -12,7 +12,7 @@ const color_1 = require("../../utils/color");
12
12
  const ChartTooltip_1 = __importDefault(require("../../components/Chart/ChartTooltip"));
13
13
  const getDomain_1 = __importDefault(require("../../utils/getDomain"));
14
14
  const react_1 = require("react");
15
- 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', }) {
15
+ 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', }) {
16
16
  const [formattedData, setFormattedData] = (0, react_1.useState)([]);
17
17
  if (!yAxisFields || !yAxisFields.length) {
18
18
  return null;
@@ -48,16 +48,21 @@ function LineChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxi
48
48
  alignItems: 'center',
49
49
  fontSize: 13,
50
50
  color: theme.secondaryTextColor,
51
+ ...containerStyle,
51
52
  }, children: "No results found for specified time period." }));
52
53
  }
53
54
  // Allows the users to override the color scheme on a per-chart basis.
54
- const getCustomColor = (index) => {
55
+ const getCustomColor = (index, field) => {
55
56
  if (index === 0 && customPrimaryColor) {
56
57
  return customPrimaryColor;
57
58
  }
58
59
  if (index === 1 && comparison && customComparisonColor) {
59
60
  return customComparisonColor;
60
61
  }
62
+ if (colorMap && colorMap[field]) {
63
+ // console.log(field, '->', colorMap[field]);
64
+ return colorMap[field];
65
+ }
61
66
  return undefined; // use the default colors from the theme
62
67
  };
63
68
  return ((0, jsx_runtime_1.jsx)("div", { style: { ...containerStyle }, children: (0, jsx_runtime_1.jsx)(recharts_1.ResponsiveContainer, { width: "100%", height: '100%', children: (0, jsx_runtime_1.jsxs)(recharts_1.ComposedChart, { data: formattedData, children: [!hideCartesianGrid && ((0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { horizontal: true, vertical: false, stroke: "#e5e7eb" })), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: xAxisField, hide: hideXAxis, tick: { transform: 'translate(0, 6)' }, style: {
@@ -104,6 +109,8 @@ function LineChart({ colors, yAxisFields, data, containerStyle, xAxisField, xAxi
104
109
  { field: xAxisField, format: xAxisFormat },
105
110
  ],
106
111
  }), xAxisFormat: xAxisFormat, xAxisField: xAxisField, colors: colors, theme: theme }));
107
- }, position: { y: 0 } }), yAxisFields.map((elem, index) => ((0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsxs)("linearGradient", { id: `gradient${index}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "5%", stopColor: getCustomColor(index) ?? (0, color_1.selectColor)(elem, colors, index), stopOpacity: 0.4 }), (0, jsx_runtime_1.jsx)("stop", { offset: "95%", stopColor: 'rgba(0,0,0,0)', stopOpacity: 0 })] }) }, `defs${elem.field + index}`))), yAxisFields.map((elem, index) => ((0, jsx_runtime_1.jsx)(recharts_1.Area, { name: elem.label, type: "linear", dataKey: elem.field, stroke: getCustomColor(index) ?? (0, color_1.selectColor)(elem, colors, index), fill: `url(#gradient${index})`, strokeWidth: 2, dot: false, strokeDasharray: comparison && dashedComparison && index > 0 ? '5 5' : undefined, isAnimationActive: isAnimationActive }, elem.field)))] }) }) }));
112
+ }, position: { y: 0 } }), yAxisFields.map((elem, index) => ((0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsxs)("linearGradient", { id: `gradient${elem.field}${index}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "5%", stopColor: getCustomColor(index, elem.field) ??
113
+ (0, color_1.selectColor)(elem, colors, index), stopOpacity: 0.4 }), (0, jsx_runtime_1.jsx)("stop", { offset: "95%", stopColor: 'rgba(0,0,0,0)', stopOpacity: 0 })] }) }, `defs${elem.field + index}`))), yAxisFields.map((elem, index) => ((0, jsx_runtime_1.jsx)(recharts_1.Area, { name: elem.label, type: "linear", dataKey: elem.field, stroke: getCustomColor(index, elem.field) ??
114
+ (0, color_1.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)))] }) }) }));
108
115
  }
109
116
  exports.default = LineChart;
@@ -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,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- function DashboardItem({ dashboardItem, onClickDashboardItem, theme, style, children, }) {
4
+ function DashboardItem({ dashboardItem, onClickDashboardItem, isLoading, theme, style, children, }) {
5
5
  return ((0, jsx_runtime_1.jsxs)("div", { style: {
6
6
  cursor: 'pointer',
7
7
  ...style,
@@ -65,7 +65,7 @@ function QuillTable({ rows, columns, loading, showDownloadCSVButton, downloadFil
65
65
  return ((0, jsx_runtime_1.jsx)("div", { style: {
66
66
  width: '100%',
67
67
  height: '100%',
68
- overflow: 'visible',
68
+ overflow: 'auto',
69
69
  display: 'flex',
70
70
  flexDirection: 'column',
71
71
  ...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"}
@@ -65,7 +65,7 @@ function AddColumnPopover({ onSave, orderedColumnNames, setOrderedColumnNames, s
65
65
  }, children: [selectedColumns.length > 0 && !isSelectedAllColumns() && ((0, jsx_runtime_1.jsx)(SecondaryButton, { onClick: () => setSelectedColumns(orderedColumnNames.filter((row) => {
66
66
  const [table, _column] = row.split('.');
67
67
  return selectedColumns[0].startsWith(table);
68
- })), children: "Select all" })), selectedColumns.length > 0 && isSelectedAllColumns() && ((0, jsx_runtime_1.jsx)(SecondaryButton, { onClick: () => setSelectedColumns([]), children: "Clear" })), (0, jsx_runtime_1.jsx)(Button, { onMouseUp: () => {
68
+ })), label: "Select all" })), selectedColumns.length > 0 && isSelectedAllColumns() && ((0, jsx_runtime_1.jsx)(SecondaryButton, { onClick: () => setSelectedColumns([]), label: "Clear" })), (0, jsx_runtime_1.jsx)(Button, { onClick: () => {
69
69
  // follow the ordering of the ordered column names
70
70
  let tableName = initialTableName;
71
71
  const orderedSelectedColumns = [];
@@ -105,7 +105,7 @@ function AddColumnPopover({ onSave, orderedColumnNames, setOrderedColumnNames, s
105
105
  setPivot(null);
106
106
  }
107
107
  onSave();
108
- }, children: "Save" })] })] }));
108
+ }, label: "Save" })] })] }));
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 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,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddSortPopover = exports.SortSentence = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const ui_1 = require("./ui");
7
+ const UiComponents_1 = require("../UiComponents");
8
+ const SORT_VALUE_TO_LABEL = {
9
+ ASC: 'ascending',
10
+ DESC: 'descending',
11
+ };
12
+ const SortSentence = ({ sortData, keyPrefix, columns, handleDelete, setEditPopoverKey, setOpenPopover, setActiveEditItem, setIsPending, setActivePath, onSave, popoverTitle = 'Edit Sort', SortPopover, EditPopover, children, }) => {
13
+ const [isOpen, setIsOpen] = (0, react_1.useState)(false);
14
+ const handleClickDelete = (e) => {
15
+ e.stopPropagation(); // don't call onClick handler
16
+ setIsPending(false);
17
+ handleDelete(keyPrefix);
18
+ setActiveEditItem(null);
19
+ setOpenPopover(null);
20
+ setEditPopoverKey(null);
21
+ };
22
+ if (!sortData && (!sortData.expr.column || !sortData.expr.value)) {
23
+ return;
24
+ }
25
+ return ((0, jsx_runtime_1.jsx)("div", { style: { width: '100%' }, children: (0, jsx_runtime_1.jsx)(SortPopover
26
+ // @ts-ignore
27
+ , {
28
+ // @ts-ignore
29
+ 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) => {
30
+ setIsOpen(false);
31
+ onSave(column, direction);
32
+ }, columns: columns, isEdit: true, onDelete: handleClickDelete, column: sortData.expr.column || sortData.expr.value }), isOpen: isOpen, setIsOpen: setIsOpen, onDelete: () => {
33
+ setIsPending(false);
34
+ setActiveEditItem(null);
35
+ setActivePath(null);
36
+ } }) }));
37
+ };
38
+ exports.SortSentence = SortSentence;
39
+ const AddSortPopover = ({ onSave, columns, isEdit, onDelete, column, }) => {
40
+ const [sortColumn, setSortColumn] = (0, react_1.useState)(column || '');
41
+ const [sortDirection, setSortDirection] = (0, react_1.useState)('ASC');
42
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 12 }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'row', gap: 12 }, children: [(0, jsx_runtime_1.jsx)(ui_1.QuillSelect, { value: sortColumn, onChange: (value) => {
43
+ setSortColumn(value);
44
+ }, options: [
45
+ { label: 'Select', value: '' },
46
+ ...columns.map((column) => ({
47
+ label: column.split('.')[1],
48
+ value: column.split('.')[1],
49
+ })),
50
+ ] }), (0, jsx_runtime_1.jsx)(ui_1.QuillSelect, { value: sortDirection, onChange: (value) => {
51
+ setSortDirection(value);
52
+ }, options: [
53
+ { label: 'Ascending', value: 'ASC' },
54
+ { label: 'Descending', value: 'DESC' },
55
+ ] })] }), (0, jsx_runtime_1.jsx)("div", { style: {
56
+ display: 'flex',
57
+ flexDirection: 'row',
58
+ justifyContent: 'end',
59
+ gap: 12,
60
+ }, 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: "Add sort" })] })) : ((0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedButton, { onClick: () => onSave(sortColumn, sortDirection), label: "Add sort" })) })] }));
61
+ };
62
+ exports.AddSortPopover = AddSortPopover;
@@ -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"}
@@ -218,7 +218,8 @@ function convertGroupBy(ast, prevPivot = null, schemaTables) {
218
218
  // Iterate over columns to find aggr_func -> set pivot.aggregationType and pivot.valueField
219
219
  for (let i = 0; i < ast.columns.length; i++) {
220
220
  const column = ast.columns[i];
221
- const field = columns.find((c) => c.field === column.expr?.args?.expr?.column);
221
+ const field = columns.find((c) => c.field === column.expr?.args?.expr?.column ||
222
+ c.field === column.expr?.args?.expr?.value);
222
223
  if (column?.expr?.type === 'aggr_func') {
223
224
  // CASE WHEN
224
225
  if (column.expr?.args?.expr?.type.toLowerCase() === 'case' &&
@@ -535,7 +536,7 @@ function applyPivot(data, pivot, schema) {
535
536
  const newFields = [
536
537
  rowFieldColumnType,
537
538
  ...columnVariants.map((name) => {
538
- return { ...valueFieldColumnType, name };
539
+ return { ...valueFieldColumnType, name, label: name };
539
540
  }),
540
541
  ];
541
542
  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,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importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AddFilterPopover = exports.TagWrapper = exports.QuillFilterPopover = exports.EditPopover = exports.QuillTabs = exports.DEFAULT_TAB_OPTIONS = exports.QuillTableLoadingState = exports.QuillButtonLoadingState = exports.QuillDraggableColumn = exports.QuillSelectColumn = exports.QuillHandleButton = exports.QuillPopover = exports.MemoizedPopover = exports.QuillSelect = exports.CustomContainer = exports.QuillSidebar = exports.QuillSidebarSubHeading = exports.QuillSidebarHeading = exports.QuillTag = exports.QuillReportBuilderTable = exports.QuillTextInput = exports.QuillSecondaryButton = exports.QuillButton = void 0;
6
+ exports.AddFilterPopover = exports.TagWrapper = exports.QuillSortPopover = exports.QuillFilterPopover = exports.EditPopover = exports.QuillTabs = exports.DEFAULT_TAB_OPTIONS = exports.QuillTableLoadingState = exports.QuillButtonLoadingState = exports.QuillDraggableColumn = exports.QuillSelectColumn = exports.QuillHandleButton = exports.QuillPopover = exports.MemoizedPopover = exports.QuillSelect = exports.CustomContainer = exports.QuillSidebar = exports.QuillSidebarSubHeading = exports.QuillSidebarHeading = exports.QuillTag = exports.QuillReportBuilderTable = exports.QuillTextInput = exports.QuillSecondaryButton = exports.QuillButton = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const UiComponents_1 = require("../UiComponents");
@@ -320,7 +320,7 @@ const EditPopover = ({ onSave, onDelete, Button, renderNode, activeEditItem, })
320
320
  justifyContent: 'end',
321
321
  gap: 8,
322
322
  width: '100%',
323
- }, children: [(0, jsx_runtime_1.jsx)(exports.QuillSecondaryButton, { onClick: onDelete, children: "Delete" }), (0, jsx_runtime_1.jsx)(Button, { onClick: onSave, children: "Save" })] })] }));
323
+ }, children: [(0, jsx_runtime_1.jsx)(UiComponents_1.MemoizedSecondaryButton, { onClick: onDelete, label: "Delete" }), (0, jsx_runtime_1.jsx)(Button, { onClick: onSave, label: "Save" })] })] }));
324
324
  };
325
325
  exports.EditPopover = EditPopover;
326
326
  const QuillFilterPopover = ({ filterLabel, onClickDeleteFilter, popoverTitle, popoverChildren, isOpen, setIsOpen, }) => {
@@ -331,6 +331,14 @@ const QuillFilterPopover = ({ filterLabel, onClickDeleteFilter, popoverTitle, po
331
331
  }, children: popoverChildren }));
332
332
  };
333
333
  exports.QuillFilterPopover = QuillFilterPopover;
334
+ const QuillSortPopover = ({ filterLabel, onClickDelete, popoverTitle, popoverChildren, isOpen, setIsOpen, }) => {
335
+ return ((0, jsx_runtime_1.jsx)(exports.QuillPopover, { isOpen: isOpen, title: popoverTitle, trigger: (0, jsx_runtime_1.jsx)(exports.QuillTag, { label: filterLabel, onClickDelete: onClickDelete, onClick: () => {
336
+ setIsOpen((isOpen) => !isOpen);
337
+ } }), onClose: () => {
338
+ setIsOpen(false);
339
+ }, children: popoverChildren }));
340
+ };
341
+ exports.QuillSortPopover = QuillSortPopover;
334
342
  const TagWrapper = ({ isCard, isRow, editPopoverKey, keyPrefix, formData, activeEditItem, setEditPopoverKey, setActiveEditItem, setActivePath, setOpenPopover, setIsPending, clearCheckboxes, fetchSqlQuery, handleDelete, setCheckboxes, handleReplaceSubtree, FilterPopover, getByKey, EditPopover, Button, renderNode, children, }) => {
335
343
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
336
344
  (0, react_1.useEffect)(() => {
@@ -407,6 +415,6 @@ const AddFilterPopover = ({ onSave, Button, renderNode, activeEditItem, }) => {
407
415
  display: 'flex',
408
416
  flexDirection: 'row',
409
417
  justifyContent: 'end',
410
- }, children: (0, jsx_runtime_1.jsx)(Button, { onMouseUp: onSave, children: "Add filter" }) })] }));
418
+ }, children: (0, jsx_runtime_1.jsx)(Button, { onClick: onSave, label: 'Add filter' }) })] }));
411
419
  };
412
420
  exports.AddFilterPopover = AddFilterPopover;
@@ -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,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,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,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,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO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ACR,KAAK,EACL,KAAU,GACX;;;;;;;;CAAA,kDA4FA;AAED,eAAO,MAAM,oBAAoB;;;6CA0BhC,CAAC;AAEF,eAAO,MAAM,cAAc,+CAwD1B,CAAC"}
@@ -49,23 +49,22 @@ const MemoizedButton = ({ label, onClick, primary = true }) => {
49
49
  const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
50
50
  return ((0, jsx_runtime_1.jsxs)("button", { className: "quill-button", onClick: onClick, style: { fontFamily: theme?.fontFamily }, children: [(0, jsx_runtime_1.jsx)("style", { children: `
51
51
  .quill-button {
52
- background-color: #384151;
52
+ background-color: #212121;
53
53
  color: white;
54
54
  height: 40px;
55
55
  border: 1px solid transparent;
56
- font-weight: 500;
56
+ font-weight: 600;
57
57
  border-radius: 6px;
58
58
  box-sizing: content-box;
59
59
  padding-left: 16px;
60
60
  padding-right: 16px;
61
- overflow: hidden;
62
- font-size: 15px;
61
+ font-size: 14px;
62
+ white-space: nowrap;
63
63
  cursor: pointer;
64
64
  }
65
65
  .quill-button:hover {
66
66
  background-color: rgba(56, 65, 81, 0.9);
67
67
  border-radius: 6px;
68
- overflow: hidden;
69
68
  }` }), label] }));
70
69
  };
71
70
  exports.MemoizedButton = MemoizedButton;
@@ -84,6 +83,7 @@ const MemoizedSecondaryButton = ({ label, onClick }) => {
84
83
  box-sizing: content-box;
85
84
  font-size: 15px;
86
85
  cursor: pointer;
86
+ white-space: nowrap;
87
87
  }
88
88
  .quill-secondary-button:hover {
89
89
  background-color: rgba(56, 65, 81, 0.09);
@@ -250,7 +250,7 @@ function MemoizedPopover({ onClose, parentRef, children, style = {}, onClick, sh
250
250
  }, children: children }) }))] }));
251
251
  }
252
252
  exports.MemoizedPopover = MemoizedPopover;
253
- function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, theme, }) {
253
+ function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, theme, style = {}, }) {
254
254
  if (!isOpen) {
255
255
  return null;
256
256
  }
@@ -283,6 +283,7 @@ function MemoizedModal({ isOpen, onClose, setIsOpen, title, children, theme, })
283
283
  borderColor: '#e7e7e7',
284
284
  overflow: 'hidden',
285
285
  // zIndex: 1000,
286
+ ...style,
286
287
  }, children: (0, jsx_runtime_1.jsxs)("div", { style: {
287
288
  // width: "80%",
288
289
  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,M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