@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
@@ -26,38 +26,8 @@ const QuillHover = () => {
26
26
  }
27
27
  ` }));
28
28
  };
29
- const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivotColumnField, pivotValueField, setPivotValueField, pivotAggregation, setPivotAggregation, popUpTitle, setPopUpTitle, selectedTable, SelectComponent, ButtonComponent, PopoverComponent, HeaderComponent, LabelComponent, TextComponent, selectedPivotIndex, setSelectedPivotIndex, removePivot, selectPivot, showUpdatePivot, setShowUpdatePivot, data, columns, theme, isOpen, setIsOpen, dateRange, createdPivots, setCreatedPivots, recommendedPivots, setRecommendedPivots, triggerButtonText = 'Pivot', showPivotEditButton = false, showEditOnPivotClick = true, selectPivotOnEdit = false, showTrigger = true, rightAlign = false, parentRef, }) => {
29
+ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivotColumnField, pivotValueField, setPivotValueField, pivotAggregation, setPivotAggregation, popUpTitle, setPopUpTitle, selectedTable, SelectComponent, ButtonComponent, PopoverComponent, HeaderComponent, LabelComponent, TextComponent, selectedPivotIndex, setSelectedPivotIndex, removePivot, selectPivot, showUpdatePivot, setShowUpdatePivot, data, columns, theme, isOpen, setIsOpen, dateRange, createdPivots, setCreatedPivots, recommendedPivots, setRecommendedPivots, triggerButtonText = 'Pivot', showPivotEditButton = false, showEditOnPivotClick = true, selectPivotOnEdit = false, showTrigger = true, rightAlign = false, parentRef, recommendPivotCount = 6, }) => {
30
30
  const [isLoading, setIsLoading] = (0, react_1.useState)(false);
31
- // for testing
32
- // const [createdPivots, setCreatedPivots] = useState<Pivot[]>([
33
- // {
34
- // rowField: 'created_at',
35
- // rowFieldType: 'date',
36
- // columnField: undefined,
37
- // columnFieldType: undefined,
38
- // valueField: 'amount',
39
- // aggregationType: 'sum',
40
- // title: 'sum of amount by created_at',
41
- // },
42
- // {
43
- // rowField: 'merchant',
44
- // rowFieldType: 'varchar',
45
- // columnField: 'created_at',
46
- // columnFieldType: 'date',
47
- // valueField: 'amount',
48
- // aggregationType: 'sum',
49
- // title: 'sum of amount by merchant and created_at',
50
- // },
51
- // {
52
- // rowField: 'created_at',
53
- // rowFieldType: 'date',
54
- // columnField: 'merchant',
55
- // columnFieldType: 'varchar',
56
- // valueField: 'amount',
57
- // aggregationType: 'sum',
58
- // title: 'sum of amount by created_at and merchant',
59
- // },
60
- // ]);
61
31
  const [pivotUpdateIndex, setPivotUpdateIndex] = (0, react_1.useState)(null);
62
32
  const [selectedPivotType, setSelectedPivotType] = (0, react_1.useState)('recommended');
63
33
  const [errors, setErrors] = (0, react_1.useState)([]);
@@ -179,7 +149,7 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
179
149
  };
180
150
  try {
181
151
  const resp = await (0, dataFetcher_1.getDataFromCloud)(client, 'pivotai', cloudBody);
182
- const recommendedPivots = resp?.data?.pivotTables || [];
152
+ const recommendedPivots = resp?.data?.pivotTables.slice(0, recommendPivotCount) || [];
183
153
  // for testing if needed
184
154
  // const recommendedPivots = [
185
155
  // {
@@ -245,7 +215,7 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
245
215
  if (recommendedPivots.length === 0) {
246
216
  refreshPivots();
247
217
  }
248
- }, [refreshPivots]);
218
+ }, []);
249
219
  const recommendedPivotTables = (0, react_1.useMemo)(() => {
250
220
  const pts = recommendedPivots.map((p) => {
251
221
  const { rows, columns } = generatePivotTable(p, data, dateRange, 6);
@@ -331,16 +301,22 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
331
301
  marginBottom: 5,
332
302
  }, children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(LabelComponent, { children: "Row Field" }), (0, jsx_runtime_1.jsx)(SelectComponent, { id: "pivot-row-field", value: pivotRowField, onChange: (e) => {
333
303
  setPivotRowField(e === '' ? undefined : e);
334
- }, options: columnSelectOptions.filter((option) => {
335
- const format = columns.find((col) => col.field === option.value)?.format;
336
- return (format === 'string' ||
337
- ChartBuilder_1.dateFormatOptions.includes(format));
338
- }), theme: theme })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(LabelComponent, { children: "Column Field" }), (0, jsx_runtime_1.jsx)(SelectComponent, { id: "pivot-row-field", value: pivotColumnField, onChange: (e) => {
304
+ }, options: [
305
+ { label: 'Select', value: '' },
306
+ ...columnSelectOptions.filter((option) => {
307
+ const format = columns.find((col) => col.field === option.value)?.format;
308
+ return (format === 'string' ||
309
+ ChartBuilder_1.dateFormatOptions.includes(format));
310
+ }),
311
+ ], theme: theme })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(LabelComponent, { children: "Column Field" }), (0, jsx_runtime_1.jsx)(SelectComponent, { id: "pivot-row-field", value: pivotColumnField, onChange: (e) => {
339
312
  setPivotColumnField(e === '' ? undefined : e);
340
- }, options: columnSelectOptions.filter((option) => {
341
- return (columns.find((col) => col.field === option.value)
342
- ?.format === 'string');
343
- }), theme: theme })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
313
+ }, options: [
314
+ { label: 'Select', value: '' },
315
+ ...columnSelectOptions.filter((option) => {
316
+ return (columns.find((col) => col.field === option.value)
317
+ ?.format === 'string');
318
+ }),
319
+ ], theme: theme })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
344
320
  display: 'flex',
345
321
  flexDirection: 'row',
346
322
  gap: 20,
@@ -348,20 +324,29 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
348
324
  }, children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(LabelComponent, { children: "Value Field" }), (0, jsx_runtime_1.jsx)(SelectComponent, { id: "pivot-row-field", value: pivotValueField, onChange: (e) => {
349
325
  setPivotValueField(e === '' ? undefined : e);
350
326
  }, options: pivotAggregation === 'count'
351
- ? columnSelectOptions
352
- : columnSelectOptions.filter((option) => {
353
- return (option.value === '' ||
354
- ChartBuilder_1.numberFormatOptions.includes(columns.find((col) => col.field === option.value)?.format));
355
- }), theme: theme })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(LabelComponent, { children: "Aggregation Type" }), (0, jsx_runtime_1.jsx)(SelectComponent, { id: "pivot-row-field", value: pivotAggregation, theme: theme, onChange: (e) => {
327
+ ? [
328
+ { label: 'Select', value: '' },
329
+ ...columnSelectOptions,
330
+ ]
331
+ : [
332
+ { label: 'Select', value: '' },
333
+ ...columnSelectOptions.filter((option) => {
334
+ return (option.value === '' ||
335
+ ChartBuilder_1.numberFormatOptions.includes(columns.find((col) => col.field === option.value)?.format));
336
+ }),
337
+ ], theme: theme })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(LabelComponent, { children: "Aggregation Type" }), (0, jsx_runtime_1.jsx)(SelectComponent, { id: "pivot-row-field", value: pivotAggregation, theme: theme, onChange: (e) => {
356
338
  if (e !== 'count' &&
357
339
  pivotValueField &&
358
340
  !ChartBuilder_1.numberFormatOptions.includes(columns.find((col) => col.field === pivotValueField)?.format)) {
359
341
  setPivotValueField(null);
360
342
  }
361
343
  setPivotAggregation(e === '' ? undefined : e);
362
- }, options: ['sum', 'average', 'count'].map((option) => {
363
- return { label: option, value: option };
364
- }) })] })] })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ButtonComponent, { id: "custom-button", onClick: () => {
344
+ }, options: [
345
+ { label: 'Select', value: '' },
346
+ ...['sum', 'average', 'count'].map((option) => {
347
+ return { label: option, value: option };
348
+ }),
349
+ ] })] })] })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ButtonComponent, { id: "custom-button", onClick: () => {
365
350
  const errors = [];
366
351
  if (!pivotRowField) {
367
352
  errors.push('Row field cannot be empty');
@@ -389,12 +374,8 @@ const PivotModal = ({ pivotRowField, setPivotRowField, pivotColumnField, setPivo
389
374
  }
390
375
  setErrors(errors);
391
376
  }, label: popUpTitle }) }), (0, jsx_runtime_1.jsx)("div", { children: errors.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { style: {
392
- fontSize: 14,
393
- marginBottom: '6px',
394
- marginTop: '12px',
395
- fontWeight: '600',
396
- color: theme.secondaryTextColor,
397
- }, children: "Pivot Errors" }), errors.map((error, index) => ((0, jsx_runtime_1.jsx)("div", { style: {
377
+ paddingTop: '8px',
378
+ } }), errors.map((error, index) => ((0, jsx_runtime_1.jsx)("div", { style: {
398
379
  borderRadius: 8,
399
380
  backgroundColor: '#FF9494',
400
381
  paddingLeft: '12px',
@@ -914,6 +895,16 @@ function generatePivotTable(pivot, data, dateRange, isComparison, rowLimit = -1,
914
895
  })
915
896
  : []),
916
897
  ];
898
+ if (pivot.sort) {
899
+ pivotRows.sort((a, b) => {
900
+ if (pivot.sortDirection === 'ASC') {
901
+ return a[pivot.rowField].localeCompare(b[pivot.rowField]);
902
+ }
903
+ else {
904
+ return b[pivot.rowField].localeCompare(a[pivot.rowField]);
905
+ }
906
+ });
907
+ }
917
908
  return { rows: pivotRows, columns };
918
909
  }
919
910
  exports.generatePivotTable = generatePivotTable;
@@ -25,12 +25,12 @@ function findTimePeriod(dateFilter) {
25
25
  else if (dateFilter.initialRange === 'LAST_30_DAYS') {
26
26
  time_span = 1000 * 60 * 60 * 24 * 30;
27
27
  }
28
- else if (dateFilter.initialRange === 'CURRENT_MONTH') {
28
+ else if (dateFilter.initialRange === 'THIS_MONTH') {
29
29
  const now = new Date();
30
30
  const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);
31
31
  time_span = now - startOfMonth;
32
32
  }
33
- else if (dateFilter.initialRange === 'CURRENT_WEEK') {
33
+ else if (dateFilter.initialRange === 'THIS_WEEK') {
34
34
  const today = new Date();
35
35
  time_span = new Date(today.setDate(today.getDate() - today.getDay()));
36
36
  }
@@ -9,5 +9,30 @@ export type Color = (typeof colorValues)[number];
9
9
  * @param index the index of this element in colors
10
10
  */
11
11
  export declare function selectColor(element: any, colors: string[], index: number): string;
12
+ export declare function namedColorToHex(color: string): string;
13
+ /**
14
+ * Converts an RGB color value to HSL. Conversion formula
15
+ * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
16
+ * Assumes r, g, and b are contained in the set [0, 255] and
17
+ * returns h, s, and l in the set [0, 1].
18
+ *
19
+ * @param Number r The red color value
20
+ * @param Number g The green color value
21
+ * @param Number b The blue color value
22
+ * @return Array The HSL representation
23
+ */
24
+ export declare function rgbToHsl(r: any, g: any, b: any): number[];
25
+ /**
26
+ * Converts an HSL color value to RGB. Conversion formula
27
+ * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
28
+ * Assumes h, s, and l are contained in the set [0, 1] and
29
+ * returns r, g, and b in the set [0, 255].
30
+ *
31
+ * @param Number h The hue
32
+ * @param Number s The saturation
33
+ * @param Number l The lightness
34
+ * @return Array The RGB representation
35
+ */
36
+ export declare function HSLtoRGB(h: any, s: any, l: any): number[];
12
37
  export {};
13
38
  //# sourceMappingURL=color.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/utils/color.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,mKAkBP,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,UAuBxE"}
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/utils/color.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,mKAkBP,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,UAuBxE;AAyDD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,UAK5C;AAwJD;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,YA4B9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,YAuB9C"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.selectColor = void 0;
3
+ exports.HSLtoRGB = exports.rgbToHsl = exports.namedColorToHex = exports.selectColor = void 0;
4
4
  const colorValues = [
5
5
  'red',
6
6
  'orange',
@@ -102,6 +102,13 @@ function toGrayscale(rgba) {
102
102
  const avg = (sum / 3).toFixed(2);
103
103
  return `rgb(${avg}, ${avg}, ${avg})`;
104
104
  }
105
+ function namedColorToHex(color) {
106
+ if (Object.keys(COLOR_TO_HEX).includes(color)) {
107
+ return COLOR_TO_HEX[color];
108
+ }
109
+ return color;
110
+ }
111
+ exports.namedColorToHex = namedColorToHex;
105
112
  /**
106
113
  * A comprehensive map of all the CSS named-colors that modern browsers will
107
114
  * recognize, and converts them into their hex values.
@@ -249,3 +256,159 @@ const COLOR_TO_HEX = {
249
256
  yellow: '#ffff00',
250
257
  yellowgreen: '#9acd32',
251
258
  };
259
+ /**
260
+ * Converts an RGB color value to HSL. Conversion formula
261
+ * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
262
+ * Assumes r, g, and b are contained in the set [0, 255] and
263
+ * returns h, s, and l in the set [0, 1].
264
+ *
265
+ * @param Number r The red color value
266
+ * @param Number g The green color value
267
+ * @param Number b The blue color value
268
+ * @return Array The HSL representation
269
+ */
270
+ function rgbToHsl(r, g, b) {
271
+ (r /= 255), (g /= 255), (b /= 255);
272
+ var max = Math.max(r, g, b), min = Math.min(r, g, b);
273
+ var h = (max + min) / 2;
274
+ var s = (max + min) / 2;
275
+ var l = (max + min) / 2;
276
+ if (max == min) {
277
+ h = s = 0; // achromatic
278
+ }
279
+ else {
280
+ var d = max - min;
281
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
282
+ switch (max) {
283
+ case r:
284
+ h = (g - b) / d + (g < b ? 6 : 0);
285
+ break;
286
+ case g:
287
+ h = (b - r) / d + 2;
288
+ break;
289
+ case b:
290
+ h = (r - g) / d + 4;
291
+ break;
292
+ }
293
+ h /= 6;
294
+ }
295
+ return [h, s, l];
296
+ }
297
+ exports.rgbToHsl = rgbToHsl;
298
+ /**
299
+ * Converts an HSL color value to RGB. Conversion formula
300
+ * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
301
+ * Assumes h, s, and l are contained in the set [0, 1] and
302
+ * returns r, g, and b in the set [0, 255].
303
+ *
304
+ * @param Number h The hue
305
+ * @param Number s The saturation
306
+ * @param Number l The lightness
307
+ * @return Array The RGB representation
308
+ */
309
+ function HSLtoRGB(h, s, l) {
310
+ var r, g, b;
311
+ if (s == 0) {
312
+ r = g = b = l; // achromatic
313
+ }
314
+ else {
315
+ const hue2rgb = (p, q, t) => {
316
+ if (t < 0)
317
+ t += 1;
318
+ if (t > 1)
319
+ t -= 1;
320
+ if (t < 1 / 6)
321
+ return p + (q - p) * 6 * t;
322
+ if (t < 1 / 2)
323
+ return q;
324
+ if (t < 2 / 3)
325
+ return p + (q - p) * (2 / 3 - t) * 6;
326
+ return p;
327
+ };
328
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
329
+ var p = 2 * l - q;
330
+ r = hue2rgb(p, q, h + 1 / 3);
331
+ g = hue2rgb(p, q, h);
332
+ b = hue2rgb(p, q, h - 1 / 3);
333
+ }
334
+ return [r * 255, g * 255, b * 255];
335
+ }
336
+ exports.HSLtoRGB = HSLtoRGB;
337
+ /**
338
+ * Converts an RGB color value to HSV. Conversion formula
339
+ * adapted from http://en.wikipedia.org/wiki/HSV_color_space.
340
+ * Assumes r, g, and b are contained in the set [0, 255] and
341
+ * returns h, s, and v in the set [0, 1].
342
+ *
343
+ * @param Number r The red color value
344
+ * @param Number g The green color value
345
+ * @param Number b The blue color value
346
+ * @return Array The HSV representation
347
+ */
348
+ function rgbToHsv(r, g, b) {
349
+ (r = r / 255), (g = g / 255), (b = b / 255);
350
+ var max = Math.max(r, g, b), min = Math.min(r, g, b);
351
+ var h = max;
352
+ var s = max;
353
+ var v = max;
354
+ var d = max - min;
355
+ s = max == 0 ? 0 : d / max;
356
+ if (max == min) {
357
+ h = 0; // achromatic
358
+ }
359
+ else {
360
+ switch (max) {
361
+ case r:
362
+ h = (g - b) / d + (g < b ? 6 : 0);
363
+ break;
364
+ case g:
365
+ h = (b - r) / d + 2;
366
+ break;
367
+ case b:
368
+ h = (r - g) / d + 4;
369
+ break;
370
+ }
371
+ h /= 6;
372
+ }
373
+ return [h, s, v];
374
+ }
375
+ /**
376
+ * Converts an HSV color value to RGB. Conversion formula
377
+ * adapted from http://en.wikipedia.org/wiki/HSV_color_space.
378
+ * Assumes h, s, and v are contained in the set [0, 1] and
379
+ * returns r, g, and b in the set [0, 255].
380
+ *
381
+ * @param Number h The hue
382
+ * @param Number s The saturation
383
+ * @param Number v The value
384
+ * @return Array The RGB representation
385
+ */
386
+ function hsvToRgb(h, s, v) {
387
+ var r, g, b;
388
+ var i = Math.floor(h * 6);
389
+ var f = h * 6 - i;
390
+ var p = v * (1 - s);
391
+ var q = v * (1 - f * s);
392
+ var t = v * (1 - (1 - f) * s);
393
+ switch (i % 6) {
394
+ case 0:
395
+ (r = v), (g = t), (b = p);
396
+ break;
397
+ case 1:
398
+ (r = q), (g = v), (b = p);
399
+ break;
400
+ case 2:
401
+ (r = p), (g = v), (b = t);
402
+ break;
403
+ case 3:
404
+ (r = p), (g = q), (b = v);
405
+ break;
406
+ case 4:
407
+ (r = t), (g = p), (b = v);
408
+ break;
409
+ case 5:
410
+ (r = v), (g = p), (b = q);
411
+ break;
412
+ }
413
+ return [r * 255, g * 255, b * 255];
414
+ }
@@ -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"}
@@ -5,10 +5,10 @@ import React from 'react';
5
5
  import { valueFormatter } from './utils/valueFormatter';
6
6
  const getWidthsFromValues = (dataValues) => {
7
7
  let maxValue = -Infinity;
8
- dataValues.forEach(value => {
8
+ dataValues.forEach((value) => {
9
9
  maxValue = Math.max(maxValue, value);
10
10
  });
11
- return dataValues.map(value => {
11
+ return dataValues.map((value) => {
12
12
  if (value === 0)
13
13
  return 0;
14
14
  return Math.max((value / maxValue) * 100, 1);
@@ -34,13 +34,26 @@ export function hexToRgbaWith10PercentAlpha(hex) {
34
34
  return `rgba(${r}, ${g}, ${b}, ${alpha})`;
35
35
  }
36
36
  const BarList = React.forwardRef((props, ref) => {
37
- const { data = [], yAxisFields, xAxisField, xAxisFormat, colors,
37
+ const { data = [], yAxisFields, xAxisField, xAxisFormat, colors, colorMap = {},
38
38
  // valueFormatter = (value: any) => value,valueFormatter
39
39
  showAnimation = true, className, containerStyle, theme, ...other } = props;
40
- const widths = getWidthsFromValues(data.map(item => item[yAxisFields[0].field]));
41
- const NUM_TO_SHOW = Math.floor(containerStyle?.height / 40) - 1;
40
+ const widths = getWidthsFromValues(data.map((item) => item[yAxisFields[0].field] ?? 0));
41
+ const NUM_TO_SHOW = 5;
42
+ if (!data || data.length === 0) {
43
+ return (_jsx("div", { style: {
44
+ display: 'flex',
45
+ flex: '1 0 auto',
46
+ height: '100%',
47
+ margin: 'auto',
48
+ justifyContent: 'center',
49
+ alignItems: 'center',
50
+ fontSize: 13,
51
+ color: theme.secondaryTextColor,
52
+ ...containerStyle,
53
+ }, children: "No results found for specified time period." }));
54
+ }
42
55
  if (yAxisFields.length > 1) {
43
- const widths2 = getWidthsFromValues(data.map(item => item[yAxisFields[1].field]));
56
+ const widths2 = getWidthsFromValues(data.map((item) => item[yAxisFields[1].field]));
44
57
  return (_jsxs("div", { ref: ref, style: {
45
58
  ...containerStyle,
46
59
  // width: '100%',
@@ -67,7 +80,7 @@ const BarList = React.forwardRef((props, ref) => {
67
80
  position: 'relative',
68
81
  boxSizing: 'content-box',
69
82
  width: '100%',
70
- }, children: [data.slice(0, Math.floor(NUM_TO_SHOW / 2)).map((item, idx) => {
83
+ }, children: [data.slice(0, NUM_TO_SHOW).map((item, idx) => {
71
84
  // const Icon = item.icon;
72
85
  const Icon = null;
73
86
  return (_jsxs("div", { style: {
@@ -110,7 +123,8 @@ const BarList = React.forwardRef((props, ref) => {
110
123
  marginBottom: '8px',
111
124
  width: `${widths[idx]}%`,
112
125
  transition: showAnimation ? 'all 2s' : '',
113
- backgroundColor: hexToRgbaWith10PercentAlpha(colors[0]),
126
+ backgroundColor: (colorMap && colorMap[xAxisField]) ??
127
+ hexToRgbaWith10PercentAlpha(colors[0]),
114
128
  boxSizing: 'content-box',
115
129
  }, children: _jsx("div", { style: {
116
130
  position: 'absolute',
@@ -136,7 +150,8 @@ const BarList = React.forwardRef((props, ref) => {
136
150
  marginBottom: '8px',
137
151
  width: `${widths2[idx]}%`,
138
152
  transition: showAnimation ? 'all 2s' : '',
139
- backgroundColor: hexToRgbaWith10PercentAlpha(colors[1]),
153
+ backgroundColor: (colorMap && colorMap[xAxisField]) ??
154
+ hexToRgbaWith10PercentAlpha(colors[1]),
140
155
  boxSizing: 'content-box',
141
156
  }, children: _jsx("div", { style: {
142
157
  boxSizing: 'content-box',
@@ -163,64 +178,58 @@ const BarList = React.forwardRef((props, ref) => {
163
178
  minWidth: 'min-content',
164
179
  textAlign: 'right',
165
180
  paddingLeft: 10,
166
- }, children: data.slice(0, NUM_TO_SHOW).map((item, idx) => (_jsx("div", { style: {
167
- boxSizing: 'content-box',
168
- display: 'flex',
169
- justifyContent: 'flex-end',
170
- alignItems: 'center',
171
- marginBottom: idx === data.length - 1 ? 0 : '8px',
172
- height: '36px',
173
- }, children: _jsx("p", { style: {
174
- color: theme?.chartLabelColor,
181
+ }, children: data.slice(0, NUM_TO_SHOW).map((item, idx) => {
182
+ return (_jsx("div", { style: {
175
183
  boxSizing: 'content-box',
176
- fontFamily: theme?.chartLabelFontFamily || theme?.fontFamily,
177
- whiteSpace: 'nowrap',
178
- overflow: 'hidden',
179
- textOverflow: 'ellipsis',
180
- fontSize: theme?.fontSizeSmall || '14px',
181
- }, children: valueFormatter({
182
- value: item[yAxisFields[0].field],
183
- field: yAxisFields[0].field,
184
- fields: yAxisFields,
185
- }) }) }, item[xAxisField] + 'label' + idx))) })] }));
184
+ display: 'flex',
185
+ justifyContent: 'flex-end',
186
+ alignItems: 'center',
187
+ marginBottom: idx === data.length - 1 ? 0 : '8px',
188
+ height: '36px',
189
+ }, children: _jsx("p", { style: {
190
+ color: theme?.chartLabelColor,
191
+ boxSizing: 'content-box',
192
+ fontFamily: theme?.chartLabelFontFamily || theme?.fontFamily,
193
+ whiteSpace: 'nowrap',
194
+ overflow: 'hidden',
195
+ textOverflow: 'ellipsis',
196
+ fontSize: theme?.fontSizeSmall || '14px',
197
+ }, children: valueFormatter({
198
+ value: item[yAxisFields[0].field],
199
+ field: yAxisFields[0].field,
200
+ fields: yAxisFields,
201
+ }) }) }, item[xAxisField] + 'label' + idx));
202
+ }) })] }));
186
203
  }
187
204
  return (_jsx("div", { ref: ref, style: {
188
- ...containerStyle,
189
205
  // width: '100%',
190
206
  boxSizing: 'content-box',
191
- // height: '100%',
192
- // height: hei
207
+ height: '100%',
193
208
  // marginLeft: 25,
194
209
  // background: 'red',
195
210
  // paddingRight: 25,
196
211
  // paddingRight: 25,
212
+ ...containerStyle,
197
213
  }, ...other, children: _jsxs("div", { style: {
198
214
  display: 'flex',
199
215
  justifyContent: 'space-between',
200
- // paddingTop: 20,
201
- // paddingLeft: 25,
202
216
  boxSizing: 'content-box',
203
217
  overflow: 'hidden',
204
218
  width: '100%',
205
- }, children: [_jsxs("div", {
206
- // className={twMerge(makeBarListClassName('bars'), 'relative w-full')}
207
- // className="qq-relative-w-full"
208
- style: {
209
- width: 'calc(100%)',
219
+ height: '100%',
220
+ }, children: [_jsxs("div", { style: {
221
+ width: '100%',
210
222
  boxSizing: 'content-box',
211
223
  height: '100%',
212
224
  position: 'relative',
213
225
  paddingRight: 25,
214
226
  }, children: [data.slice(0, NUM_TO_SHOW).map((item, idx) => {
215
- // const Icon = item.icon;
216
- const Icon = null;
217
- return (_jsx("div", {
218
- // className={`qq-flex qq-items-center qq-h-9 qq-rounded qq-mb-2`}
219
- style: {
227
+ return (_jsx("div", { style: {
220
228
  width: `${widths[idx]}%`,
221
229
  transition: showAnimation ? 'all 2s' : '',
222
230
  boxSizing: 'content-box',
223
- backgroundColor: hexToRgbaWith10PercentAlpha(colors[0]),
231
+ backgroundColor: (colorMap && colorMap[xAxisField]) ??
232
+ hexToRgbaWith10PercentAlpha(colors[0]),
224
233
  display: 'flex',
225
234
  alignItems: 'center',
226
235
  height: '36px',
@@ -241,7 +250,7 @@ const BarList = React.forwardRef((props, ref) => {
241
250
  fontFamily: theme?.chartLabelFontFamily || theme?.fontFamily,
242
251
  fontSize: theme?.fontSizeSmall || '14px',
243
252
  }, children: valueFormatter({
244
- value: item[xAxisField],
253
+ value: item[xAxisField] ?? item[`comparison_${xAxisField}`],
245
254
  field: xAxisField,
246
255
  fields: [{ field: xAxisField, format: xAxisFormat }],
247
256
  }) }) }) }, item[xAxisField] + 'label' + idx));
@@ -271,7 +280,7 @@ const BarList = React.forwardRef((props, ref) => {
271
280
  textOverflow: 'ellipsis',
272
281
  fontSize: theme?.fontSizeSmall || '14px',
273
282
  }, children: valueFormatter({
274
- value: item[yAxisFields[0].field],
283
+ value: item[yAxisFields[0].field] ?? 0,
275
284
  field: yAxisFields[0].field,
276
285
  fields: yAxisFields,
277
286
  }) }) }, 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,GACpB,UAAU,GACV,SAAS,GACT,QAAQ,CAAC;AAEb,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,UAAU,UAAW,SAAQ,cAAc;IACzC,MAAM,EAAE,aAAa,GAAG,GAAG,CAAC;CAC7B;AAED,KAAK,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AA+D3C,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,WAQhE;AAKD,QAAA,MAAM,KAAK,SAAU,UAAU,4CAqC9B,CAAC;AAmfF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../src/Chart.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAgB7C,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;IAClC,iBAAiB,CAAC,EAAE,CAClB,cAAc,EAAE,aAAa,EAC7B,MAAM,EAAE,UAAU,KACf;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAChC;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,GACpB,UAAU,GACV,SAAS,GACT,QAAQ,CAAC;AAEb,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,UAAU,UAAW,SAAQ,cAAc;IACzC,MAAM,EAAE,aAAa,GAAG,GAAG,CAAC;CAC7B;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"}