@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
@@ -14,6 +14,7 @@ export interface BarListProps extends React.HTMLAttributes<HTMLDivElement> {
14
14
  containerStyle: any;
15
15
  xAxisFormat: string;
16
16
  colors?: string[];
17
+ colorMap?: any;
17
18
  theme: any;
18
19
  }
19
20
  export declare function hexToRgbaWith10PercentAlpha(hex: any): string;
@@ -1 +1 @@
1
- {"version":3,"file":"BarList.d.ts","sourceRoot":"","sources":["../../src/BarList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAqExC,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACxE,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,cAAc,EAAE,GAAG,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,GAAG,CAAC;CACZ;AAYD,wBAAgB,2BAA2B,CAAC,GAAG,KAAA,UAW9C;AAED,QAAA,MAAM,OAAO,qFA6dX,CAAC;AAEH,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"BarList.d.ts","sourceRoot":"","sources":["../../src/BarList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAqExC,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACxE,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,cAAc,EAAE,GAAG,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;CACZ;AAYD,wBAAgB,2BAA2B,CAAC,GAAG,KAAA,UAW9C;AAED,QAAA,MAAM,OAAO,qFAkdX,CAAC;AAEH,eAAe,OAAO,CAAC"}
@@ -11,10 +11,10 @@ const react_1 = __importDefault(require("react"));
11
11
  const valueFormatter_1 = require("./utils/valueFormatter");
12
12
  const getWidthsFromValues = (dataValues) => {
13
13
  let maxValue = -Infinity;
14
- dataValues.forEach(value => {
14
+ dataValues.forEach((value) => {
15
15
  maxValue = Math.max(maxValue, value);
16
16
  });
17
- return dataValues.map(value => {
17
+ return dataValues.map((value) => {
18
18
  if (value === 0)
19
19
  return 0;
20
20
  return Math.max((value / maxValue) * 100, 1);
@@ -41,13 +41,26 @@ function hexToRgbaWith10PercentAlpha(hex) {
41
41
  }
42
42
  exports.hexToRgbaWith10PercentAlpha = hexToRgbaWith10PercentAlpha;
43
43
  const BarList = react_1.default.forwardRef((props, ref) => {
44
- const { data = [], yAxisFields, xAxisField, xAxisFormat, colors,
44
+ const { data = [], yAxisFields, xAxisField, xAxisFormat, colors, colorMap = {},
45
45
  // valueFormatter = (value: any) => value,valueFormatter
46
46
  showAnimation = true, className, containerStyle, theme, ...other } = props;
47
- const widths = getWidthsFromValues(data.map(item => item[yAxisFields[0].field]));
48
- const NUM_TO_SHOW = Math.floor(containerStyle?.height / 40) - 1;
47
+ const widths = getWidthsFromValues(data.map((item) => item[yAxisFields[0].field] ?? 0));
48
+ const NUM_TO_SHOW = 5;
49
+ if (!data || data.length === 0) {
50
+ return ((0, jsx_runtime_1.jsx)("div", { style: {
51
+ display: 'flex',
52
+ flex: '1 0 auto',
53
+ height: '100%',
54
+ margin: 'auto',
55
+ justifyContent: 'center',
56
+ alignItems: 'center',
57
+ fontSize: 13,
58
+ color: theme.secondaryTextColor,
59
+ ...containerStyle,
60
+ }, children: "No results found for specified time period." }));
61
+ }
49
62
  if (yAxisFields.length > 1) {
50
- const widths2 = getWidthsFromValues(data.map(item => item[yAxisFields[1].field]));
63
+ const widths2 = getWidthsFromValues(data.map((item) => item[yAxisFields[1].field]));
51
64
  return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, style: {
52
65
  ...containerStyle,
53
66
  // width: '100%',
@@ -74,7 +87,7 @@ const BarList = react_1.default.forwardRef((props, ref) => {
74
87
  position: 'relative',
75
88
  boxSizing: 'content-box',
76
89
  width: '100%',
77
- }, children: [data.slice(0, Math.floor(NUM_TO_SHOW / 2)).map((item, idx) => {
90
+ }, children: [data.slice(0, NUM_TO_SHOW).map((item, idx) => {
78
91
  // const Icon = item.icon;
79
92
  const Icon = null;
80
93
  return ((0, jsx_runtime_1.jsxs)("div", { style: {
@@ -117,7 +130,8 @@ const BarList = react_1.default.forwardRef((props, ref) => {
117
130
  marginBottom: '8px',
118
131
  width: `${widths[idx]}%`,
119
132
  transition: showAnimation ? 'all 2s' : '',
120
- backgroundColor: hexToRgbaWith10PercentAlpha(colors[0]),
133
+ backgroundColor: (colorMap && colorMap[xAxisField]) ??
134
+ hexToRgbaWith10PercentAlpha(colors[0]),
121
135
  boxSizing: 'content-box',
122
136
  }, children: (0, jsx_runtime_1.jsx)("div", { style: {
123
137
  position: 'absolute',
@@ -143,7 +157,8 @@ const BarList = react_1.default.forwardRef((props, ref) => {
143
157
  marginBottom: '8px',
144
158
  width: `${widths2[idx]}%`,
145
159
  transition: showAnimation ? 'all 2s' : '',
146
- backgroundColor: hexToRgbaWith10PercentAlpha(colors[1]),
160
+ backgroundColor: (colorMap && colorMap[xAxisField]) ??
161
+ hexToRgbaWith10PercentAlpha(colors[1]),
147
162
  boxSizing: 'content-box',
148
163
  }, children: (0, jsx_runtime_1.jsx)("div", { style: {
149
164
  boxSizing: 'content-box',
@@ -170,64 +185,58 @@ const BarList = react_1.default.forwardRef((props, ref) => {
170
185
  minWidth: 'min-content',
171
186
  textAlign: 'right',
172
187
  paddingLeft: 10,
173
- }, children: data.slice(0, NUM_TO_SHOW).map((item, idx) => ((0, jsx_runtime_1.jsx)("div", { style: {
174
- boxSizing: 'content-box',
175
- display: 'flex',
176
- justifyContent: 'flex-end',
177
- alignItems: 'center',
178
- marginBottom: idx === data.length - 1 ? 0 : '8px',
179
- height: '36px',
180
- }, children: (0, jsx_runtime_1.jsx)("p", { style: {
181
- color: theme?.chartLabelColor,
188
+ }, children: data.slice(0, NUM_TO_SHOW).map((item, idx) => {
189
+ return ((0, jsx_runtime_1.jsx)("div", { style: {
182
190
  boxSizing: 'content-box',
183
- fontFamily: theme?.chartLabelFontFamily || theme?.fontFamily,
184
- whiteSpace: 'nowrap',
185
- overflow: 'hidden',
186
- textOverflow: 'ellipsis',
187
- fontSize: theme?.fontSizeSmall || '14px',
188
- }, children: (0, valueFormatter_1.valueFormatter)({
189
- value: item[yAxisFields[0].field],
190
- field: yAxisFields[0].field,
191
- fields: yAxisFields,
192
- }) }) }, item[xAxisField] + 'label' + idx))) })] }));
191
+ display: 'flex',
192
+ justifyContent: 'flex-end',
193
+ alignItems: 'center',
194
+ marginBottom: idx === data.length - 1 ? 0 : '8px',
195
+ height: '36px',
196
+ }, children: (0, jsx_runtime_1.jsx)("p", { style: {
197
+ color: theme?.chartLabelColor,
198
+ boxSizing: 'content-box',
199
+ fontFamily: theme?.chartLabelFontFamily || theme?.fontFamily,
200
+ whiteSpace: 'nowrap',
201
+ overflow: 'hidden',
202
+ textOverflow: 'ellipsis',
203
+ fontSize: theme?.fontSizeSmall || '14px',
204
+ }, children: (0, valueFormatter_1.valueFormatter)({
205
+ value: item[yAxisFields[0].field],
206
+ field: yAxisFields[0].field,
207
+ fields: yAxisFields,
208
+ }) }) }, item[xAxisField] + 'label' + idx));
209
+ }) })] }));
193
210
  }
194
211
  return ((0, jsx_runtime_1.jsx)("div", { ref: ref, style: {
195
- ...containerStyle,
196
212
  // width: '100%',
197
213
  boxSizing: 'content-box',
198
- // height: '100%',
199
- // height: hei
214
+ height: '100%',
200
215
  // marginLeft: 25,
201
216
  // background: 'red',
202
217
  // paddingRight: 25,
203
218
  // paddingRight: 25,
219
+ ...containerStyle,
204
220
  }, ...other, children: (0, jsx_runtime_1.jsxs)("div", { style: {
205
221
  display: 'flex',
206
222
  justifyContent: 'space-between',
207
- // paddingTop: 20,
208
- // paddingLeft: 25,
209
223
  boxSizing: 'content-box',
210
224
  overflow: 'hidden',
211
225
  width: '100%',
212
- }, children: [(0, jsx_runtime_1.jsxs)("div", {
213
- // className={twMerge(makeBarListClassName('bars'), 'relative w-full')}
214
- // className="qq-relative-w-full"
215
- style: {
216
- width: 'calc(100%)',
226
+ height: '100%',
227
+ }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
228
+ width: '100%',
217
229
  boxSizing: 'content-box',
218
230
  height: '100%',
219
231
  position: 'relative',
220
232
  paddingRight: 25,
221
233
  }, children: [data.slice(0, NUM_TO_SHOW).map((item, idx) => {
222
- // const Icon = item.icon;
223
- const Icon = null;
224
- return ((0, jsx_runtime_1.jsx)("div", {
225
- // className={`qq-flex qq-items-center qq-h-9 qq-rounded qq-mb-2`}
226
- style: {
234
+ return ((0, jsx_runtime_1.jsx)("div", { style: {
227
235
  width: `${widths[idx]}%`,
228
236
  transition: showAnimation ? 'all 2s' : '',
229
237
  boxSizing: 'content-box',
230
- backgroundColor: hexToRgbaWith10PercentAlpha(colors[0]),
238
+ backgroundColor: (colorMap && colorMap[xAxisField]) ??
239
+ hexToRgbaWith10PercentAlpha(colors[0]),
231
240
  display: 'flex',
232
241
  alignItems: 'center',
233
242
  height: '36px',
@@ -248,7 +257,7 @@ const BarList = react_1.default.forwardRef((props, ref) => {
248
257
  fontFamily: theme?.chartLabelFontFamily || theme?.fontFamily,
249
258
  fontSize: theme?.fontSizeSmall || '14px',
250
259
  }, children: (0, valueFormatter_1.valueFormatter)({
251
- value: item[xAxisField],
260
+ value: item[xAxisField] ?? item[`comparison_${xAxisField}`],
252
261
  field: xAxisField,
253
262
  fields: [{ field: xAxisField, format: xAxisFormat }],
254
263
  }) }) }) }, item[xAxisField] + 'label' + idx));
@@ -278,7 +287,7 @@ const BarList = react_1.default.forwardRef((props, ref) => {
278
287
  textOverflow: 'ellipsis',
279
288
  fontSize: theme?.fontSizeSmall || '14px',
280
289
  }, children: (0, valueFormatter_1.valueFormatter)({
281
- value: item[yAxisFields[0].field],
290
+ value: item[yAxisFields[0].field] ?? 0,
282
291
  field: yAxisFields[0].field,
283
292
  fields: yAxisFields,
284
293
  }) }) }, item[xAxisField] + 'value' + idx))) })] }) }));
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { QuillTheme } from './QuillProvider';
2
3
  interface BaseChartProps {
3
4
  colors?: string[];
4
5
  containerStyle?: React.CSSProperties;
@@ -14,6 +15,9 @@ interface BaseChartProps {
14
15
  customComparisonColor?: string;
15
16
  dateRangeFilterDisabled?: boolean;
16
17
  singlePointStyle?: 'dot' | 'line';
18
+ mapColorsToFields?: (_dashboardItem: DashboardItem, _theme: QuillTheme) => {
19
+ [key: string]: string;
20
+ };
17
21
  }
18
22
  interface WithChartId extends BaseChartProps {
19
23
  chartId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../src/Chart.tsx"],"names":[],"mappings":";AA4BA,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,gBAAgB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACnC;AAED,UAAU,WAAY,SAAQ,cAAc;IAC1C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,mBAAmB,GACnB,oBAAoB,GACpB,eAAe,GACf,cAAc,GACd,UAAU,GACV,aAAa,GACb,eAAe,GACf,oBAAoB,GAC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C7B;AAED,KAAK,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AA+D3C,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,WAQhE;AAaD,QAAA,MAAM,KAAK,SAAU,UAAU,4CAsC9B,CAAC;AA0fF,eAAe,KAAK,CAAC"}
package/dist/cjs/Chart.js CHANGED
@@ -79,9 +79,13 @@ function didFiltersChange(dashboardItem, filters) {
79
79
  return !isEquivalent(dashboardItem.filtersApplied, filters);
80
80
  }
81
81
  exports.didFiltersChange = didFiltersChange;
82
+ function fallbackMapColorsToFields(_dashboardItem, _theme) {
83
+ // By default, if the key is not in the map we use the colors array.
84
+ return {};
85
+ }
82
86
  const Chart = (data) => {
83
87
  if ('config' in data) {
84
- return ((0, jsx_runtime_1.jsx)(ChartDisplay, { ...data, loading: false, isComparison: !!data.config.compareRows?.length }));
88
+ return ((0, jsx_runtime_1.jsx)(ChartDisplay, { ...data, loading: Boolean(!data.config), isComparison: Boolean(data?.config?.compareRows?.length) }));
85
89
  }
86
90
  const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
87
91
  const chartColors = (0, react_1.useMemo)(() => {
@@ -91,14 +95,15 @@ const Chart = (data) => {
91
95
  ? theme.chartColors
92
96
  : ['#4E80EE', '#E14F62', '#55B5A6', '#E9A23B', '#6466E9', '#55B685'];
93
97
  }, [data.colors]);
94
- return ((0, jsx_runtime_1.jsx)(ChartUpdater, { chartId: data.chartId, containerStyle: data.containerStyle, colors: chartColors, theme: theme, isAnimationActive: data.isAnimationActive, hideXAxis: data.hideXAxis, hideYAxis: data.hideYAxis, hideCartesianGrid: data.hideCartesianGrid, dashedComparison: data.dashedComparison, dateRangeFilterDisabled: data.dateRangeFilterDisabled, customPrimaryColor: data.customPrimaryColor, customComparisonColor: data.customComparisonColor, singlePointStyle: data.singlePointStyle ?? 'dot' }));
98
+ return ((0, jsx_runtime_1.jsx)(ChartUpdater, { chartId: data.chartId, containerStyle: data.containerStyle, colors: chartColors, theme: theme, isAnimationActive: data.isAnimationActive, hideXAxis: data.hideXAxis, hideYAxis: data.hideYAxis, hideCartesianGrid: data.hideCartesianGrid, dashedComparison: data.dashedComparison, dateRangeFilterDisabled: data.dateRangeFilterDisabled, customPrimaryColor: data.customPrimaryColor, customComparisonColor: data.customComparisonColor, singlePointStyle: data.singlePointStyle ?? 'dot', mapColorsToFields: data.mapColorsToFields ?? fallbackMapColorsToFields }));
95
99
  };
96
- const ChartUpdater = ({ colors, chartId, containerStyle, theme, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, dashedComparison, dateRangeFilterDisabled, customPrimaryColor, customComparisonColor, singlePointStyle, }) => {
100
+ const ChartUpdater = ({ colors, chartId, containerStyle, theme, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, dashedComparison, dateRangeFilterDisabled, customPrimaryColor, customComparisonColor, singlePointStyle, mapColorsToFields, }) => {
97
101
  const { dispatch, dashboard } = (0, react_1.useContext)(Context_1.DashboardContext);
98
102
  const { dashboardFilters } = (0, react_1.useContext)(Context_1.DashboardFiltersContext);
99
103
  const [initialLoad, setInitialLoad] = (0, react_1.useState)(true);
100
104
  const [loading, setLoading] = (0, react_1.useState)(false);
101
105
  const [isComparison, setIsComparison] = (0, react_1.useState)(false);
106
+ const [colorMap, setColorMap] = (0, react_1.useState)({});
102
107
  const [client, _] = (0, react_1.useContext)(Context_1.ClientContext);
103
108
  (0, react_1.useEffect)(() => {
104
109
  async function getChartOptions() {
@@ -143,14 +148,15 @@ const ChartUpdater = ({ colors, chartId, containerStyle, theme, isAnimationActiv
143
148
  if (resp.compareRows) {
144
149
  (0, merge_1.mergeComparisonRange)(resp);
145
150
  }
151
+ const dashboardItem = { ...resp, filtersApplied: dashboardFilters };
146
152
  dispatch({
147
153
  type: 'UPDATE_DASHBOARD_ITEM',
148
154
  id: chartId,
149
- data: {
150
- ...resp,
151
- filtersApplied: dashboardFilters,
152
- },
155
+ data: dashboardItem,
153
156
  });
157
+ if (mapColorsToFields) {
158
+ setColorMap(mapColorsToFields(dashboardItem, theme));
159
+ }
154
160
  }
155
161
  setLoading(false);
156
162
  }
@@ -162,9 +168,9 @@ const ChartUpdater = ({ colors, chartId, containerStyle, theme, isAnimationActiv
162
168
  setInitialLoad(false);
163
169
  getChartOptions();
164
170
  }, [dashboardFilters, client, chartId]);
165
- return ((0, jsx_runtime_1.jsx)(ChartDisplay, { config: dashboard[chartId], colors: colors, containerStyle: containerStyle, hideXAxis: hideXAxis, hideYAxis: hideYAxis, hideCartesianGrid: hideCartesianGrid, dashedComparison: dashedComparison, singlePointStyle: singlePointStyle, customPrimaryColor: customPrimaryColor, customComparisonColor: customComparisonColor, isAnimationActive: isAnimationActive, isComparison: isComparison, loading: loading || initialLoad }));
171
+ return ((0, jsx_runtime_1.jsx)(ChartDisplay, { config: dashboard[chartId], colors: colors, containerStyle: containerStyle, hideXAxis: hideXAxis, hideYAxis: hideYAxis, hideCartesianGrid: hideCartesianGrid, dashedComparison: dashedComparison, singlePointStyle: singlePointStyle, customPrimaryColor: customPrimaryColor, customComparisonColor: customComparisonColor, isAnimationActive: isAnimationActive, isComparison: isComparison, loading: loading || initialLoad, colorMap: colorMap }));
166
172
  };
167
- const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hideCartesianGrid, dashedComparison, customPrimaryColor, customComparisonColor, isAnimationActive, loading = false, isComparison = false, singlePointStyle = "dot" }) => {
173
+ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hideCartesianGrid, dashedComparison, customPrimaryColor, customComparisonColor, isAnimationActive, loading = false, isComparison = false, singlePointStyle = 'dot', colorMap, }) => {
168
174
  const { dashboardFilters } = (0, react_1.useContext)(Context_1.DashboardFiltersContext);
169
175
  const [theme] = (0, react_1.useContext)(Context_1.ThemeContext);
170
176
  const chartColors = (0, react_1.useMemo)(() => {
@@ -191,7 +197,7 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
191
197
  ]
192
198
  : [null, null, null])
193
199
  : null;
194
- }, [config, dateFilter]);
200
+ }, [config?.pivot]);
195
201
  const pivotTableYAxis = (0, react_1.useMemo)(() => {
196
202
  if (!pivotTable) {
197
203
  return null;
@@ -201,7 +207,7 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
201
207
  return yAxisFields
202
208
  ? (0, PivotModal_1.generatePivotTableYAxis)(pivot, pivotTable.columns, yAxisFields?.[0]?.format)
203
209
  : null;
204
- }, [pivotTable]);
210
+ }, [pivotTable, config?.yAxisFields]);
205
211
  if (!config || loading) {
206
212
  if (loading) {
207
213
  return (0, jsx_runtime_1.jsx)(ChartSkeleton_1.default, { containerStyle: containerStyle });
@@ -222,7 +228,7 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
222
228
  count: parseInt(row[yAxisFields[0].field]) /
223
229
  sumByKey(rows, yAxisFields[0].field),
224
230
  };
225
- }), category: yAxisFields[0].field, index: xAxisField, colors: chartColors, theme: theme }));
231
+ }), category: yAxisFields[0].field, index: xAxisField, colors: chartColors, theme: theme, colorMap: colorMap }));
226
232
  }
227
233
  if (chartTypes.includes('table')) {
228
234
  const data = config;
@@ -255,9 +261,9 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
255
261
  return formattedRow;
256
262
  }, {});
257
263
  });
258
- return ((0, jsx_runtime_1.jsx)(QuillTable_1.default, { rows: formattedRows ?? [], columns: columns ?? data.yAxisFields, containerStyle: {
259
- height: '400px',
264
+ return ((0, jsx_runtime_1.jsx)(QuillTable_1.default, { rows: formattedRows ?? [], columns: columns ?? data.yAxisFields, rowsPerPage: config?.rowsPerPage || 10, containerStyle: {
260
265
  width: containerStyle?.width || '100%',
266
+ height: containerStyle?.height || '400px',
261
267
  }, showDownloadCSVButton: true, downloadCSV: () => {
262
268
  (0, csv_1.downloadCSV)({
263
269
  rows: pivotTable?.rows ?? data.rows ?? [],
@@ -267,7 +273,7 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
267
273
  } }));
268
274
  }
269
275
  if (chartTypes.includes('bar')) {
270
- return ((0, jsx_runtime_1.jsx)(BarList_1.default, { data: pivotTable ? pivotTable.rows : config.rows, theme: theme, yAxisFields: pivotTableYAxis ? pivotTableYAxis : config.yAxisFields, colors: chartColors, xAxisField: config.xAxisField, xAxisFormat: config.xAxisFormat, containerStyle: containerStyle }));
276
+ return ((0, jsx_runtime_1.jsx)(BarList_1.default, { data: pivotTable ? pivotTable.rows : config.rows, theme: theme, yAxisFields: pivotTableYAxis ? pivotTableYAxis : config.yAxisFields, colors: chartColors, xAxisField: config.xAxisField, xAxisFormat: config.xAxisFormat, containerStyle: containerStyle, colorMap: colorMap }));
271
277
  }
272
278
  const yAxisFields = pivotTableYAxis
273
279
  ? pivotTableYAxis
@@ -288,7 +294,7 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
288
294
  if (chartTypes.includes('column')) {
289
295
  return ((0, jsx_runtime_1.jsx)(BarChart_1.default, { colors: chartColors, theme: theme, isStacked: isPivot && yAxisFields.length > (dateFilter?.comparison ? 2 : 1), yAxisFields: yAxisFields,
290
296
  // @ts-ignore
291
- data: data, xAxisField: config.xAxisField, xAxisLabel: config.xAxisLabel, xAxisFormat: config.xAxisFormat, containerStyle: containerStyle, comparison: dateFilter?.comparison, isAnimationActive: isAnimationActive, hideXAxis: hideXAxis, hideYAxis: hideYAxis, hideCartesianGrid: hideCartesianGrid }));
297
+ data: data, xAxisField: config.xAxisField, xAxisLabel: config.xAxisLabel, xAxisFormat: config.xAxisFormat, containerStyle: containerStyle, comparison: dateFilter?.comparison, isAnimationActive: isAnimationActive, hideXAxis: hideXAxis, hideYAxis: hideYAxis, hideCartesianGrid: hideCartesianGrid, colorMap: colorMap }));
292
298
  }
293
299
  if (chartTypes.includes('metric')) {
294
300
  const data = config; // THIS SHOULD ACCOUNT FOR PIVOT TABLES IN THE FUTURE
@@ -320,7 +326,7 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
320
326
  marginRight: 'auto',
321
327
  }, children: [(0, jsx_runtime_1.jsx)("span", { children: data.rows.length > 0 &&
322
328
  (0, valueFormatter_1.valueFormatter)({
323
- value: data.rows[0][data.xAxisField],
329
+ value: data.rows[0][data.xAxisField] ?? 0,
324
330
  field: data.xAxisField,
325
331
  fields: [
326
332
  {
@@ -351,7 +357,7 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
351
357
  color: theme?.secondaryTextColor,
352
358
  }, children: data.rows.length > 0 &&
353
359
  (0, valueFormatter_1.valueFormatter)({
354
- value: data.rows[0][`comparison_${data.xAxisField}`],
360
+ value: data.rows[0][`comparison_${data.xAxisField}`] ?? 0,
355
361
  field: data.xAxisField,
356
362
  fields: [
357
363
  {
@@ -371,6 +377,6 @@ const ChartDisplay = ({ config, colors, containerStyle, hideXAxis, hideYAxis, hi
371
377
  ? 'in ' + comparisonLabel.toLowerCase()
372
378
  : 'previous period' })] }))] }));
373
379
  }
374
- return ((0, jsx_runtime_1.jsx)(LineChart_1.default, { colors: chartColors, yAxisFields: yAxisFields, data: data, xAxisField: config.xAxisField, xAxisLabel: config.xAxisLabel, xAxisFormat: config.xAxisFormat, containerStyle: containerStyle, theme: theme, comparison: dateFilter?.comparison, isAnimationActive: isAnimationActive, hideXAxis: hideXAxis, hideYAxis: hideYAxis, hideCartesianGrid: hideCartesianGrid, dashedComparison: dashedComparison, customPrimaryColor: customPrimaryColor, customComparisonColor: customComparisonColor, singlePointStyle: singlePointStyle }));
380
+ return ((0, jsx_runtime_1.jsx)(LineChart_1.default, { colors: chartColors, colorMap: colorMap, yAxisFields: yAxisFields, data: data, xAxisField: config.xAxisField, xAxisLabel: config.xAxisLabel, xAxisFormat: config.xAxisFormat, containerStyle: containerStyle, theme: theme, comparison: dateFilter?.comparison, isAnimationActive: isAnimationActive, hideXAxis: hideXAxis, hideYAxis: hideYAxis, hideCartesianGrid: hideCartesianGrid, dashedComparison: dashedComparison, customPrimaryColor: customPrimaryColor, customComparisonColor: customComparisonColor, singlePointStyle: singlePointStyle }));
375
381
  };
376
382
  exports.default = Chart;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Pivot } from './internals/ReportBuilder/PivotModal';
3
- import { SelectComponentProps, TextInputComponentProps, ButtonComponentProps, ModalComponentProps, HeaderProps, LabelProps, TextProps, DeleteButtonProps, PopoverComponentProps } from './components/UiComponents';
3
+ import { SelectComponentProps, TextInputComponentProps, ButtonComponentProps, ModalComponentProps, HeaderProps, LabelProps, TextProps, DeleteButtonProps, MemoizedPopoverProps } from './components/UiComponents';
4
4
  import { Column } from './models/Tables';
5
5
  import { Field } from './hooks/useQuill';
6
6
  export declare const numberFormatOptions: string[];
@@ -17,7 +17,7 @@ interface ChartBuilderProps {
17
17
  Text?: (props: TextProps) => JSX.Element;
18
18
  DeleteButton?: (props: DeleteButtonProps) => JSX.Element;
19
19
  Modal?: (props: ModalComponentProps) => JSX.Element;
20
- Popover?: (props: PopoverComponentProps) => JSX.Element;
20
+ Popover?: (props: MemoizedPopoverProps) => JSX.Element;
21
21
  rows: {
22
22
  [key: string]: any;
23
23
  }[];
@@ -27,6 +27,7 @@ interface ChartBuilderProps {
27
27
  formHeaderStyle?: React.CSSProperties;
28
28
  formLabelStyle?: React.CSSProperties;
29
29
  showTableFormatOptions?: boolean;
30
+ horizontalView?: boolean;
30
31
  showDateFieldOptions?: boolean;
31
32
  showAccessControlOptions?: boolean;
32
33
  showDashboardDropdown?: boolean;
@@ -45,6 +46,7 @@ interface ChartBuilderProps {
45
46
  dateColumn?: string;
46
47
  organizationName?: string;
47
48
  }
48
- export default function ChartBuilder(props: ChartBuilderProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare function ChartBuilderWithModal(props: ChartBuilderProps): import("react/jsx-runtime").JSX.Element;
50
+ export default function ChartBuilder({ TextInput, Select, Button, SecondaryButton, Header, Label, DeleteButton, Text, Popover, isOpen, isEditMode, horizontalView, pivot, setIsOpen, rows, columns, query, queryNoDateColumn, dateRange: dr, formHeaderStyle, formLabelStyle, showTableFormatOptions, showDateFieldOptions, showAccessControlOptions, showDashboardDropdown, onAddToDashboardComplete, onDelete, fields: fieldsProp, dashboardItem, recommendedPivots: rp, createdPivots: cp, destinationDashboard, dateColumn, buttonLabel, organizationName, }: ChartBuilderProps): import("react/jsx-runtime").JSX.Element | undefined;
49
51
  export {};
50
52
  //# sourceMappingURL=ChartBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChartBuilder.d.ts","sourceRoot":"","sources":["../../src/ChartBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAWf,OAAO,EACL,KAAK,EAIN,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,SAAS,EACT,iBAAiB,EAWjB,qBAAqB,EAEtB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AA4FzC,eAAO,MAAM,mBAAmB,UAM/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAM7B,CAAC;AAuDF,UAAU,iBAAiB;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,GAAG,CAAC,OAAO,CAAC;IACtD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,GAAG,CAAC,OAAO,CAAC;IAC5D,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,GAAG,CAAC,OAAO,CAAC;IACtD,eAAe,CA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